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

📄 mfpultxharness.m

📁 OFDMA 物理层开发的matlab 源码.飞思卡尔提供.对物理层开发的工程师有帮助!
💻 M
字号:
%***************************************************************************
% 802.16-2004 OFDMA PHY - mFPULTxHarness Uplink function
%
%    Description:
%           Matlab function for simulating subscriber station Tx (UL)
%           freq. domain processing
%
%    Inputs:
%         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
%       AsyncPhyCtrl: Asynchronous PHY control data structure
%                     contains info such as UlPremableBase IDCell, etc.
%        SymbolIndex: Symbol index within frame of the first OFDMA symbol to
%                     be output.
%           inp:      one slot vector coming from UP
%           TC:       test case number
%           write_tv: enable (y/n) to write test vectors
%     scrambl_enable: enable (y/n) to scramble data and pilot carrier
%                     positions
%
%    Output:
%           Out:      Three OFDMA symbols, each NFFT long
%
%    Data Files:
%                N/A
%    Functions/scripts:
%                GenerateULTable
%                mGenPRBS
%                DataModulation
%                MapULTx
%
%***************************************************************************

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Property of Freescale
%  Freescale Confidential Proprietary
%  Freescale Copyright (C) 2005 All rights reserved
%  ----------------------------------------------------------------------------
%  $RCSfile: mFPULTxHarness.m.rca $
%  Tag $Name:  $
%  $Revision: 1.8 $
%  $Date: Fri Dec  8 14:08:17 2006 $
%  Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%-- Matlab files used by this file
% MapULTx
% mDataModulation
% GenerateULTable
%-- End of list


function Out = mFPULTxHarness(ZoneConfig, AsyncPhyCtrl, SymbolIndex, inp,...
    PRBS, scrambl_enable)


[m,n] = size(inp);
if n~=1
    error('Error: Input must be one column vector.');
end
if m~=ZoneConfig.MaxSubch*48
    error('Error: Unexpected input vector length.');
end


if scrambl_enable == 'y'
    % vector containing subchannel numbers
    subAllocVector = 0:ZoneConfig.MaxSubch-1;
    % Calculate data and pilot carrier locations (scrambling enabled)
    [dataOVec, dataPVec, pilotLocVec, rotationOffVec] = ...
        GenerateULTable(subAllocVector, AsyncPhyCtrl.UlPermBase, ...
        ZoneConfig.Nsubcarriers, ZoneConfig.TilesPerSubch,...
        ZoneConfig.NFFT);
else
    % assign logical locations to physical locations (scrambling disabled)
    rotationOffVec = zeros(1,3);
    dataPVec = [];
    dataOVec = [];
    pilotLocVec = [];
    init_dataOVec = 1:24;
    for ks=1:ZoneConfig.MaxSubch,
        slot_dataOVec = init_dataOVec + (ks-1)*24;
        slot_dataPVec = [2,3,6,7,10,11,14,15,18,19,22,23] + (ks-1)*24;
        slot_pilotLocVec = [1,4,5,8,9,12,13,16,17,20,21,24] + (ks-1)*24;
        dataPVec = [dataPVec; slot_dataPVec];
        dataOVec = [dataOVec; slot_dataOVec];
        pilotLocVec = [pilotLocVec; slot_pilotLocVec];
    end
end

%subchannel rotation off
rotationOffVec = zeros(1,ZoneConfig.MaxSubch);


% Map UP Tx Data and Pilot values to the appropriate data locations: one
% slot vector from UP is mapped into 3 OFDMA symbols
SlotNo   = floor(SymbolIndex/3)+1;
%PilotVec = AsyncPhyCtrl.PilotAmpl*ones(1,17);
PilotVec = AsyncPhyCtrl.PilotAmpl*ones(1,ZoneConfig.MaxSubch);
MapOut = MapULTx(ZoneConfig.MaxSubch, ZoneConfig.Nsubcarriers,ZoneConfig.NFFT,...
    pilotLocVec, dataOVec, dataPVec, rotationOffVec, SlotNo,...
    inp.', PilotVec).';


%add DC ... modulate data, pilots and DC
ModOut = mDataModulation(MapOut, PRBS', SymbolIndex);
Out=ModOut;


⌨️ 快捷键说明

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