📄 mpilotremovedlrx.m
字号:
%***************************************************************************
% 802.16-2004 OFDMA PHY - mPilotRemoveDLRx downlink function
%
% Description: This functions removes the pilots from clusetrs, within
% the two OFDMA symbols at input. It outputs the two OFDMA
% symbols without the pilots.Supports both PUSC and
% FUSC. But only FFT size =512 and 1024 in FUSC
%
% Input:
% ZoneConfig: Data Structure that contains zone configuration
% params, including number of carriers, number of
% used carriers, maximum number of subchanels, etc.
% For details please see WiMAX Integration Framework
% Specification document
% ScrambledPayLoad: The output is two OFDMA symbols conaining
% only data carriers which are organized in physical
% carrier order.
% Output:
% ScrambledPayLoadPilots: The output is structured similary to
% the ScrambledPayLoad input, with addition of the
% pilots in the appropriate locations within the
% clusters
%
% Functions:
% N/A
%
% Data Files:
% N/A
%
%***************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: mPilotRemoveDLRx.m.rca $
% $Revision: 1.4 $
% $Date: Fri Dec 15 04:48:14 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function ScrambledPayLoad = mPilotRemoveDLRx(ZoneConfig, ScrambledPayLoadPilots,SymbolIndex)
% Input assumed as: matrix of two vectors, each with OFDMA symbol related pilots
% and data values.
% Output is matrix of two column vectors, one per OFDMA symbol (without pilots)
%PUSC
if (ZoneConfig.ZoneType==2)
N = ZoneConfig.NCluster;
%remove pilots from even symbol
temp = reshape(ScrambledPayLoadPilots(:,1),14,N);
ScrambledPayLoad = reshape([temp(1:4,:);temp(6:8,:);temp(10:14,:)],N*12,1);
%remove pilots from odd symbol
temp = reshape(ScrambledPayLoadPilots(:,2),14,N);
ScrambledPayLoad = [ScrambledPayLoad, reshape([temp(2:12,:);temp(14,:)],N*12,1)];
%FUSC
elseif (ZoneConfig.ZoneType==1)
switch ZoneConfig.NFFT
case 512
VarialbleSet0=((0:24:408)+1).';
VarialbleSet1=((12:24:420)+1).';
ConstantSet0=((72*(2*(0:2))+9)+1).';
ConstantSet1=((72*(2*(0:2)+1)+9)+1).';
case 1024
VarialbleSet0=((0:24:840)+1).';
VarialbleSet1=((12:24:828)+1).';
ConstantSet0=((72*(2*(0:5))+9)+1).';
ConstantSet1=((72*(2*(0:4)+1)+9)+1).';
otherwise
disp(sprintf('FFT size %d is not supported by PilotRemoveDLRx',ZoneConfig.NFFT));
end
% ScrambledPayLoadPilots=[(1:426).' (1:426).' (1:426).' (1:426).' (1:426).'];%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% erase this
% ZoneConfig.NFFTUsed=427;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% erase this
% AsyncPhyControl.PilotAmpl=555;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% erase this
PilotLocation=[];
% for sym=1:size(ScrambledPayLoadPilots,2)
Vset0=VarialbleSet0+(mod((SymbolIndex),2))*6;
Vset1=VarialbleSet1+(mod((SymbolIndex),2))*6;
%ceil(ZoneConfig.NFFTUsed/2) is dumy DC carrier
PilotLocation = [PilotLocation [ConstantSet0 ;ConstantSet1; Vset0; Vset1; ceil(ZoneConfig.NFFTUsed/2)]];
% end
PilotLocation=sort(PilotLocation);
%Add a dumy DC
ScrambledPayLoadPilots_temp=[ScrambledPayLoadPilots(1:(size(ScrambledPayLoadPilots,1)/2),:); int16(zeros(1,size(ScrambledPayLoadPilots,2))) ;ScrambledPayLoadPilots((size(ScrambledPayLoadPilots,1)/2+1):end,:)];
% for sym=1:size(ScrambledPayLoadPilots_temp,2)
for pil=1:size(PilotLocation,1)
ScrambledPayLoadPilots_temp(PilotLocation(end-pil+1,1):end-1,1)=ScrambledPayLoadPilots_temp(PilotLocation(end-pil+1,1)+1:end,1);
end
% end
ScrambledPayLoad=ScrambledPayLoadPilots_temp(1:(ZoneConfig.NFFTUsed-size(PilotLocation,1)),:);
%Remove dumy DC carrier
% ScrambledPayLoadPilots=[ScrambledPayLoadPilots_temp(1:floor(ZoneConfig.NFFTUsed/2),:) ; ScrambledPayLoadPilots_temp((ceil(ZoneConfig.NFFTUsed/2)+1):end,:)];
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -