正确的符号正时和多普勒偏移
Correct symbol timing and frequency offset errors by using thecomm.SymbolSynchronizer
andcomm.CarrierSynchronizer
System objects.
Configuration
Initialize simulation parameters.
M = 16;% Modulation ordernSym = 2000;% Number of symbols in a packetsps = 2;% Samples per symbolspsFilt = 8;每个符号的示例示例和频道的样本spsSync = 2;% Samples per symbol for synchronizerslenFilt = 10;% RRC filter length
Create a matched pair of root raised cosine (RRC) filter System objects for transmitter and receiver.
txfilter = comm.RaisedCosineTransmitFilter(“ Filterspaninsymbols”,lenFilt,...'OutputSamplesPerSymbol',spsFilt,“获得”,sqrt(spsFilt)); rxfilter = comm.RaisedCosineReceiveFilter(“ Filterspaninsymbols”,lenFilt,...'InputSamplesPerSymbol',spsFilt,'DecimationFactor',spsFilt/2,“获得”,sqrt(1/spsFilt));
Create a phase-frequency offset System object to introduce a 100 Hz Doppler shift.
doppler = comm.PhaseFrequencyOffset('FrequencyOffset',100,...'PhaseOffset',45,'SampleRate',1e6);
Create a variable delay System object to introduce timing offsets.
vardelay = dsp.VariableFractionalDelay;
Create carrier and symbol synchronizer System objects to correct for Doppler shift and timing offset, respectively.
carrierSync = comm.CarrierSynchronizer('SamplesPerSymbol',spsSync); symbolSync = comm.SymbolSynchronizer(...'TimingErrorDetector','Early-Late (non-data-aided)',...'SamplesPerSymbol',spsSync);
Create constellation diagram System objects to view the results.
refConst = qammod(0:M-1,M,'UnitAveragePower',真正的);cdReceive = comm.ConstellationDiagram('ReferenceConstellation',refConst,...'SamplesPerSymbol',spsFilt,'Title','Received Signal'); cdDoppler = comm.ConstellationDiagram('ReferenceConstellation',refConst,...'SamplesPerSymbol',spsSync,'Title',“频率校正信号”); cdTiming = comm.ConstellationDiagram('ReferenceConstellation',refConst,...'SamplesPerSymbol',spsSync,'Title',“频率和正时同步信号”);
Main Processing Loop
The main processing loop:
Generates random symbols and applies QAM modulation.
Filters the modulated signal.
Applies frequency and timing offsets.
Passes the transmitted signal through an AWGN channel.
Filters the received signal.
Corrects the Doppler shift.
Corrects the timing offset.
fork = 1:15 data = randi([0 M-1],nSym,1); modSig = qammod(data,M,'UnitAveragePower',真正的);txSig = txfilter(modSig); txDoppler = doppler(txSig); txDelay = varDelay(txDoppler,k/15); rxSig = awgn(txDelay,25); rxFiltSig = rxfilter(rxSig); rxCorr = carrierSync(rxFiltSig); rxData = symbolSync(rxCorr);end
Visualization
绘制接收信号的星座图,频率校正信号以及频率和正时同步信号。特定的星座点无法在接收的信号中识别,并且只能在频率校正信号中部分识别。但是,定时和频率同步信号与预期的QAM星座点对齐。
cdReceive(rxSig)
cdDoppler(rxCorr)
cdTiming(rxData)