Simulate Propagation Channels
This example shows how to simulate propagation channels. It demonstrates how to generate cell-specific reference signals, map them onto a resource grid, perform OFDM modulation, and pass the result through a fading channel.
Specify the cell-wide settings as fields in the structureenb
. Many of the functions used in this example require a subset of these fields.
enb.NDLRB = 9; enb.CyclicPrefix ='Normal';enb.phichduration ='Normal';enb.CFI = 3; enb.Ng ='第六';enb.CellRefP = 1; enb.NCellID = 10; enb.NSubframe = 0; enb.DuplexMode ='FDD';antennaPort = 0;
资源网格和传输波形
生成一个副帧资源网格。要创建资源网格,请致电ltedlresourcegrid
function. This function creates an empty resource grid for one subframe.
子帧= ltedlresourcegrid(enb);
Generate cell-specific reference symbols (CellRS) and map them onto the resource elements (REs) of a resource grid using linear indices.
cellRSsymbols = lteCellRS(enb,antennaPort); cellRSindices = lteCellRSIndices(enb,antennaPort,{'1based'}); subframe(cellRSindices) = cellRSsymbols;
执行子帧中复杂符号的OFDM调制,subframe
, using cell-wide settings structureenb
.
[txwaveform,info] = lteofdmmodulate(ENB,副帧);
The first output argument,txWaveform
, contains the transmitted OFDM modulated symbols. The second output argument,info
, is a structure that contains details about the modulation process. The fieldinfo.SamplingRate
provides the sampling rate,
, of the time domain waveform:
where 是OFDM逆傅立叶变换(IFT)的大小。
Propagation Channel
构建LTE多径褪色通道。首先,通过创建结构,设置通道参数channel
.
channel.Seed = 1; channel.NRxAnts = 1; channel.DelayProfile ='EVA';channel.dopplerfreq = 5;channel.mimocrolation ='Low';channel.samplingrate = info.samplingrate;channel.intimeime = 0;
The sampling rate in the channel model,channel.SamplingRate
, must be set to theinfo
field of theSamplingRate
returned by thelteOFDMModulate
function.
Pass data through the LTE fading channel by calling thelteFadingChannel
function. This function generates an LTE multipath fading channel, as specified in TS 36.101 (See reference [1]). The first input argument,txWaveform
, is an array of LTE transmitted samples. Each row contains the waveform samples for each of the transmit antennas. These waveforms are filtered with the delay profiles as specified in the parameter structure,channel
.
rxWaveform = lteFadingChannel(channel,txWaveform);
Received Waveform
The output argument,rxWaveform
, is the channel output signal matrix. Each row corresponds to the waveform at each of the receive antennas. Since you have defined one receive antenna, the number of rows in therxWaveform
matrix is one.
size(rxWaveform)
ans =1×21920 1
Plot Signal Before and After Fading Channel
显示一个频谱分析仪更加积极re-channel and after-channel waveforms. Use SpectralAverages = 10 to reduce noise in the plotted signals
title ='Waveform Before and After Fading Channel';saScope = dsp.SpectrumAnalyzer('SampleRate',info.SamplingRate,'ShowLegend',true,...'SpectralAverages',10,'标题',title,“频道名称”,{'Before','After'}); saScope([txWaveform,rxWaveform]);
参考
3GPP TS 36.101 "User Equipment (UE) radio transmission and reception".
See Also
lteFadingChannel
|lteHSTChannel
|lteMovingChannel