Tools4SDR   A new version of the website is under development, powered by MediaWiki! You can already use it here.
 
 
 
 

Valid HTML 4.01 Transitional

Discussion
The last comment is from Murali Krishna:

I am working on implementing OSTBC using usrp's. I would like to know whether it is possible through Matlab. Has any one tried before on this topic?

Add a comment


Structure of this article
1 Basics of the theoretical part of the algorithm
2 Illustration with real signals
   2-1 Signal generation at the transmitter
   2-2 Signal processing at the receiver
   2-3 Time and frequency synchronisation results on each OFDM symbol


See also
SDR4Teaching >> Linear modulations 

SDR4Teaching >> OFDM Signals 

SDR4Teaching >> RF impairments 

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. On the first computer, an OFDM signal has been generated with matlab.
  2. This signal has been transmitted thanks to an USRP to another USRP connected to a second PC also running windows and matlab
  3. The time and frequency synchronisation of the OFDM signal has been performed on the received signal on the second PC with matlab
The two USRP have been connected by wire:

Two USRP connected by a wire (instead of using antennas)

1. Basics of the theoretical part of the algorithm

This time and frequency synchronisation algorithm is based on the OFDM cycle prefix. If $x(k)$ is the sequence of OFDM symbols generated by the transmitter, the following relation holds:
$ \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;
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);
The matlab file [GenerateOFDMSignal.m] can be downloaded from this page.

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)));
z2 = 1/128*conv(z,ones(128,1));
z2 = z2(128:end);
An illustration of a part of z2 is shown on the figure below:

Time window correlation of the received signal

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);
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);
Illustrations of the values of t0 and CFO are (respectively) below:

Time offset of each OFDM symbol

Frequency offset of each OFDM symbol

Attached files:

[ AF1 ] GenerateOFDMSignal.m
[ AF2 ] acqui.dat
[ AF3 ] ReadAcquiSignal.m
[ AF4 ] Receiver.zip
About | Contact | Site map | Support