|
A new version of the website is under development, powered by MediaWiki! You can already use it here. | |||||||||||
|
OFDM signal time and frequency synchronisation with two USRPs and matlab An algorithm for time and frequency synchronisation of an OFDM signal is shown in this page. This algorithm is based on the OFDM cycle prefix. The following process has been done:
1. Basics of the theoretical part of the algorithm $ \forallk \in[0,D-1], x(k+N) = x(k) $
if $N$ is the number of carriers and $D$ the cycle prefix length in samples. Thanks to the cycle prefix, it is possible to proove that the received signal $y(n)$ is strongly correlated with its delayed version. In particular, the statistical expectation of the signal $y(n+N)y^*(n)$ presents peaks when n coincides with the beginning of an OFDM symbol. Time synchronisation is done by detection the first peak in the estimate of the expectation of the signal $y(n+N)y^*(n)$. Further, the value taken by the expectation at this peak is a complex number which phase equals $2 \pi\Deltaf N$ where $\Deltaf$ is the frequency carrier of the received signal. The frequency synchronisation can be done once $\Deltaf$ has been estimated. 2. Illustration with real signals 2.1. Signal generation at the transmitter The signal has been generated with the following commands:
u = 0:3;
The matlab file [GenerateOFDMSignal.m] can be downloaded from this page.
QPSK_Symb = [exp(2*i*pi*((2*u+1)/8))]; Symb = QPSK_Symb(floor(4*rand(100*256,1))+1); [t,y] = GenerateOFDMSignal(1,2,Symb,256,256/4); 2.2. Signal processing at the receiver The received signal is composed of several delayed burts, each burst being a replica of the transmitted signal. The received signal can be downloaded from this page ([acqui.dat]), and read with the script [ReadAcquiSignal.m] with the command:
[t,y] = ReadAcquiSignal('acqui.dat');
All scripts used at the receiver are also available for downloading: [Receiver.zip]. The signal processing at the receiver starts with the selection of a burst:
[t2,y2] = SelectUsefulPart(t,y);
The correlation of the received signal is then computed, an filtered by an average filter to produce an estimate of the
statistical expectation:
z = y2(1:length(y2)-256*2).*conj(y2(256*2+1:length(y2)));
An illustration of a part of z2 is shown on the figure below:
z2 = 1/128*conv(z,ones(128,1)); z2 = z2(128:end); 2.3. Time and frequency synchronisation results on each OFDM symbol Once the signal z2 has been generated, it only remains to identify the peak, and estimate the frequency offset from their values. This is done thanks to the following script (as 100 OFDM symbols have been transmitted):
[t0(1),Value(1),ipeak] = SearchFirstPeak(t,z2,(256+64)*2);
Illustrations of the values of t0 and CFO are (respectively) below:
for (iOFDMSymb=1:99) [t0(iOFDMSymb+1),Value(iOFDMSymb+1),ipeak] = SearchNextPeak(ipeak,t,z2,(256+64)*2); end CFO = angle(Value)/(2*pi*256*2); Attached files: [ AF1 ] GenerateOFDMSignal.m[ AF2 ] acqui.dat [ AF3 ] ReadAcquiSignal.m [ AF4 ] Receiver.zip |
|||||||||||
| About | Contact | Site map | Support | ||||||||||||