Time synchronisation with linearly modulated sequences of symbols and Matlab

From Tools4SDR

Jump to: navigation, search
Tutorial: Digital communication with linearly modulated sequence of symbols
1. General introduction
2. Frequency offset estimation
3. Channel impulse response estimation
4. Synchronisation
5. A simple receiver
6. The complete scheme

This page is a tutorial about the synchronisation to a frame with linearly modulated sequences of symbols. It is based on the following tutorials:

The scripts use at the receiver with Matlab are available for downloading here.

Contents

Signal generation

We first deal with the signal generation problem. We need a signal that contains data to synchronize with. We therefore use the software which sends in a continuous way training sequences. We just need then to record a signal and process it.

Note that you have to use the same training sequence file with the TX and with the RX.

Getting a signal and performing prior treatments

Recording a signal

The signal is received with Matlab and the SDR4All toolbox. It requieres hence to lauch the SDR4All server before starting to use the Matlab scripts. The configuration of the USRP is done with the following commands:

[sock] = SDR4All_Connect(0,'SlotA','RX');
[gain_min,gain_max,gain_step] = SDR4All_GetGain(sock);
[freq_min,freq_max] = SDR4All_GetFreq(sock);
SDR4All_SetGain(sock,(gain_max+gain_min)/2);
SDR4All_SetDecimRate(sock,128); % It as to be adapted if you transmit data with another bandwith than 500kHz
SDR4All_SetFreq(sock,2422e6);

Check on the server interface that your command have been correctly understood by the server. Run then the acquisition process with for 5s of signals:

[Data] = SDR4All_GetData(sock,5*1000*500);

Prior treatments

The following prior treatments are then done:

  • Normalize the received signal
  • Correct the frequency offset
  • Filter with the adaptative filter

These steps are done as follows:

Data = Data./sqrt(mean(abs(Data).^2));
[z] = CorrectFrequencyOffset(Data,5);
[z2] = Adaptative_Filter(z,5,0.22);

Synchronisation

The synchronisation is done with the channel impulse response estimation algorithm. As mentionned in this tutorial, the channel impulse response is estimated as:

$\hat{h} = argmin \|y - X \tilde{h} \|^2$

Which solution is given by:

$\hat{h} = inv(X^H X)X^H y$

The estimation error can also be estimated with these formula, as:

$\epsilon = \|y - X \hat{h}\|^2$

If the signal is synchronised, $\epsilon$ is small. Otherwise not. The synchronisation can hence be done as follows:

for (iA=1:10:40000)
[epsilon ((iA-1)/10+1),h] = IREst(Appr_Seq,z2(iA:5:iA+1300));
end
plot(epsilon)

The epsilon values are plotted below. As illustrated, the beginning of each training sequence can then easily be estimated:

Personal tools
Software defined radio