Home > other >  OFDM symbol synchronization algorithm is proposed
OFDM symbol synchronization algorithm is proposed

Time:10-24

I recently doing a S& C and park, the improved algorithm of symbol synchronization algorithm, matlab point problems, however, is in the calculation of mean square error (mse) under different drying ratio, with no major changes to the error! But the timing synchronization is not much problem! Just under different drying ratio timing synchronization points are in a position! Stick program, which a great god can help me have a look at what's the problem? Thank you first!
Close all;
clc;
% % % % % % % % % % % % % % % % % % % % % % % % parameter Settings % % % % % % % % % % % % % % % % % % % % % % % % % %
Ts=1 * 10 ^ (8); % into the channel signal sampling frequency
TolPac=1; % input data blocks
PacketLen=1; % of each symbol number, before each to join the pilot,
ShortPeriod=2; % frame head repeated cycles of
NTimes=40; Running % 20 times average collection
M=64; % modulation index
% EbNo=0:30;
NFFT=256; % Length of IFFT
CpLength=32; % Length of Prefix
NSubc=128; % Number of subcarriers
Nsamp=NFFT/NSubc;
Deltad=256; % accurate bit synchronization points
Deltaderr=0; % mean square error (mse)
Loop=100;
Derr=zeros (1, 11);
% SNR=EbNo + 10 * log10 (log2 (M)) - 10 * log10 (nsamp); % SNR
% SNR=1:2:30;
O=0;
For SNR=0:2:20
Deltaderr=0;
O=o + 1;
% * * * * * * * * * * * * * * * * * * * * * * * * * * the main loop part * * * * * * * * * * * * * * * * * * * * * * * * * *
Nloop=100; % Number of simulation loops
For iii=1: nloop
SmSeeds=[0, 1 1 1 0 0, 1]; The seeds of 235
% random sequenceSTraining=m_sequence (SmSeeds);
STraining_zero=[STraining (1: end), 0];
STraining %=round (rand (1, NFFT/2)); Exp (I * 5 * PI/4) *
Pmod_STraining=6.48 * pskmod (STraining_zero, 2)/SQRT (2);
ST_zero=zeros (1, NFFT);
For k=1: length (pmod_STraining)
ST_zero (2 * k - 1)=pmod_STraining (k); % on the odd number of carrier modulation pmod_STraining,
End
Referenceb=reshape (ST_zero, NFFT, 1);
Re_ifft=ifft (ST_zero);
Resh=reshape (re_ifft, NFFT/4, 4);
Bar (abs (re_ifft))
% %
% % % % % % % % % % % % % % % % % % % % % % % % the Generate signal sources % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% Bit=(1, NSubc TolPac PacketLen * * * log2 (M));
Bit=randint (1, NSubc TolPac PacketLen * * * log2 (M));
BitTemp=reshape (Bit TolPac PacketLen * * NSubc, log2 (M));
BitDe=bi2de (BitTemp, 'left - the MSB); % binary to decimal
SymbolMod=qammod (BitDe, M); % 64 qam modulation
SymbolS2P=reshape (SymbolMod NSubc, PacketLen * TolPac);
Symbol_In_Zero=[SymbolS2P (1: NSubc/2, :); zeros ((NFFT - NSubc), PacketLen * TolPac); SymbolS2P (NSubc/2 + 1: end, :)]; Add zero %
Symbol_ref_b=[referenceb Symbol_In_Zero];
SymbolIFFT=ifft (Symbol_ref_b);
% % % % % % % % % % % % % block inserted pilot frequency % % % % % % % % % % % % % %
Pilot %=ifft (LTrain). ';
% SymbolPilot=zeros (NFFT, PacketLen * TolPac + TolPac);
% for k=1: TolPac;
% SymbolPilot (:, (k - 1) * (PacketLen PacketLen + k + 1) * k)=[pilot, SymbolIFFT (:, (k - 1) * PacketLen + 1: k * PacketLen)];
% % end block inserted pilot frequency
SymbolPilot=SymbolIFFT;
SymbolCP=[SymbolPilot (end - CpLength + 1: end, :); SymbolPilot]; % prefix insert
[nr, nl]=size (SymbolCP);
SymbolTS2P=reshape (SymbolCP, 1, nr * nl); % and string conversion
DataFrame_o=SymbolTS2P;
T_err=100;
Df=0;
T_errhead=zeros (1, t_err);
DataFrame=[t_errhead DataFrame_o];
% % % % % % % % % % % % channel % % % % % % % % % % % % % % %;
% % for ktimes=1: NTimes run 20 times average collection
Ktimes=1;
Df (ktimes)=0;
DataR=DataFrame;
K=1: length (DataR);
DeltaF (k)=exp (1 j * 2 * PI * Df (ktimes) * (k - 1)/(NFFT));
DataFreq=DataR. * DeltaF;
DataR=awgn (DataFreq, SNR, "measured");
% end
% end
% -- -- -- -- -- -- -- -- -- -- -- -- -- - park -- -- -- -- -- -- -- -- -- %
Mtime=t_err + (NFFT + CpLength) + NFFT/2;
P=zeros (1, mtime); R=zeros (1, mtime);
For k=NFFT/2 + 1: mtime
For m=1, NFFT/2
P=P (k) (k) + (DataR (k + m)) * DataR (k - m);
R (k)=R (k) + abs (DataR (m + k)) * abs (DataR (m + k));
End
F (k)=abs (P (k)/R (k));
% f_est (k)=1/PI * Angle (P (k))
The end;
F=(F);
B=Max (F); The maximum % o
G=the find (F==b);
Deltaderr=deltaderr + (g - deltad) ^ 2;
% end
End
Derr (o)=SQRT (deltaderr/(nloop));
End
Figure (' Color ', 'w');
SNR=0:2:20;
B=% z (SNR + 1);
Semilogy (SNR, derr, '- r *')
The axis ([0,20,0.001, 1000]);
Xlabel (' SNR (dB));
Ylabel (' Variance of Timing Offset Estimation (squared sample) ');

CodePudding user response:

OFDM symbol timing synchronization hello I'm doing now mean square error curve got to want to add this algorithm to the basic system ber curve but get error rate has been fifty percent can I learn from your total program thank you
  • Related