www.gusucode.com > wlan 源码程序 matlab案例代码 > wlan/RecoverLSIGfromPhaseandFrequencyOffsetExample.m

    %% Recover L-SIG from Phase and Frequency Offset
% Recover the L-SIG from a channel that introduces a fixed phase and frequency offset.  

%% 
% Create a VHT configuration object corresponding to a 160 MHz SISO channel.
% Generate the transmitted L-SIG field. 
cfgVHT = wlanVHTConfig('ChannelBandwidth','CBW160');
txLSIG = wlanLSIG(cfgVHT);
%%
% Create a recovery configuration object and disable pilot phase tracking.
cfgRec = wlanRecoveryConfig('PilotPhaseTracking','None');

%% 
% To introduce a 45 degree phase offset and a 100 Hz frequency offset,
% create a phase and frequency offset System object.
pfOffset = comm.PhaseFrequencyOffset('SampleRate',160e6,'PhaseOffset',45, ...
    'FrequencyOffset',100);  

%% 
% Introduce phase and frequency offsets to the transmitted L-SIG. Pass
% the L-SIG through an AWGN channel. 
rxLSIG = awgn(pfOffset(txLSIG),20);  

%% 
% Recover the L-SIG information bits, the failure check status, and the
% equalized symbols. 
[recLSIGData,failCheck,eqSym] = wlanLSIGRecover(rxLSIG,ones(416,1),0.01,'CBW160',cfgRec);  

%% 
% Verify that the L-SIG passed the failure checks. 
failCheck  

%% 
% Plot the equalized symbols. The 45 degree phase offset is visible. 
scatterplot(eqSym)
grid