⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdatademodulation.m

📁 OFDMA 物理层开发的matlab 源码.飞思卡尔提供.对物理层开发的工程师有帮助!
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Property of Freescale
%  Freescale Confidential Proprietary
%  Freescale Copyright (C) 2005 All rights reserved
%  ----------------------------------------------------------------------------
%  $RCSfile: mDataDemodulation.m.rca $
%  $Revision: 1.4 $
%  $Date: Mon Oct 30 18:36:27 2006 $
%  Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%***************************************************************************
%  802.16-2004 OFDMA PHY - mDataDemodulation
%
%    Description: % This function receives two OFDMA symbols
%                   with data, pilot and DC values organized in 2
%                   vectors of Nused carriers. The recived
%                   data is demodulated using PRBS sequence which is
%                   generated by the mGenPRBS function.
%                   In the demodulation the OFDMA symbol index is taken
%                   into account. The DC carrier is removed at the end.
%    Input:
%           SymbolIndex: The index of the first (out of 2 input) OFDMA
%                       symbols within the frame. This index is usefull to
%                       decide on even or odd cluster structure to start
%                       with.
%
%           OutTPRx:    Two OFDMA symbols with data, pilot and DC carriers
%                       located at the physical carriers (one OFDM symbol
%                       per column)
%
%           wk:         PRBS sequence ( +/- 1 )
%
%     Output:
%           out:        Demodulated data and pilot subcarriers (DC removed)
%
%    Functions:
%                N/A
%
%    Data Files:
%                N/A
%
%***************************************************************************

%-- Matlab files used by this file
%-- End of list

function out = mDataDemodulation(OutTPRx , wk, SymbolIndex);

[m,n] = size(OutTPRx);
if mod(m,2)
    error('Error: Input vector length should be even.');
end

%add DC carrier
OutTPRx = [OutTPRx(1:m/2,:); zeros(1,n); OutTPRx(m/2+1:m,:)];
[m,n] = size(OutTPRx);

%demodulation per OFDM symbol
for s=1:n,
    offset = mod(s-1+SymbolIndex,32);
    temp(:,s) = wk(offset+(1:m)).*double(OutTPRx(:,s));
end

%output class is equal to input class
out = zeros(m-1,n,class(OutTPRx));

%remove DC
out(:,:) = [temp(1:floor(m/2),:);temp(floor(m/2)+2:m,:)];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -