Channel impulse reponse estimation with linearly modulated sequence of symbols

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 tutorial is about the channel impulse response estimation with linearly modulated sequences of symbols.

The results of this tutorial can either be used to study the RF impairments of the USRP or as a part of a reception scheme to set up a communication.

In order to just illustrate the kind of issues met just with the RF impairments, the two USPRs have been connected with a cable:

2 USRPs connected by wire

Contents

Tutorial requierements

To do this tutorial, you need:

  • A computer with Matlab
  • 2 USRPs with 2 FLEX 2400 daughterboards
  • The SDR4All toolbox v1.1.1

If you use a previous version of the toolbox, you can either update it or conjugate the received signal.

Theoretical part

We assume in this tutorial that the frequency offset has been corrected.

To estimate the channel impulse response, training sequences are used. This means that a part (or the whole) of the transmitted signal is known from the receiver. As the receiver knows which signal is supposed to be observed, it can evaluate the distorsion induced by the propagation channel and/or the modulation/demodulation stages.

The received signal writes then:

$y(t) = \sum_{n} a_n h(t-nT_s) + b(t)$

So, sampled at $T_e = T_s$ the symbol rate, the discrete-time received writes:

$y_n = \sum_{k} h_k a_{n-k}+ b_n$

The receiver knows the transmitted symbols $\{a_{n}\}$ sequence. The following one has been used:

Transmitted frames

The first frame, BPSK symbols, is added to estimate the frequency offset. The following frames, QPSK symbols, are all the same ones, and use to estimate the channel impulse response. For each frame, this estimation is performed in order to evaluate the time variation of this response.


The channel impulse response consists in searching the coefficients $\hat{h}_k$ such as the computed signal:

$\sum_{k} \hat{h}_k a_{n-k}$

is the closest of the received signal $y_n$. As the noise is Guassian, this condition resumes in the following one:

$\hat{h}_k = argmin \|y_n - \sum_{k} \tilde{h}_k a_{n-k}\|^2$

If $P$ the training sequence length is $P$, $L$ is the estimated length of the traininig sequence, and $A$ is a $P \times L$ Toeplitz matrix which first column equals $[a(0),...,a(P-1)]$ and first column $[a(0),0,...,0]$, this minimization problem rewrites ($y$ and $\tilde{h}$ are vectors):

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

Which solution is given by:

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

Practical part

The practical part is done with Matlab and the SDR4All server. Matlab has to be launch twice:

  • One to handle the TX part
  • One to handle the RX part
Two sessions of matlab are launched

The used matlab scripts are available for downloading:

Note that theses scripts do not perform automatic synchronisation, and you have to handle this preliminary point before applying the proposed script (and also to compensate the frequency offset).

The objective of this demonstration is to evaluate the time variation of the channel impulse response.

The transmitted signal

The transmitted signal generation is quite simple:

[t,y] = GenerateSignal();

In the script GenerateSignal, the transmitted symbols are generated as follows:

load Seqs;  % Contains the training sequence
% Generation of symbols to transmit
NbTrame = 1000;
SymbToTransmit = [appr_offset];
for (iNbtrame=1:NbTrame)
    SymbToTransmit = [SymbToTransmit;appr_symboles.'];
end;

Then the oversampling and the shaping filter are applied:

Symb = kron(SymbToTransmit,[0 0 1 0 0].');

% Shaping filter generation
Te = 1e-6;
Tc = 5*Te;
g = GetNyquistSqrt(0.2,Tc,-100*Te:Te:100*Te);

% signal generation
y = conv(g,Symb);
t = (0:length(y)-1)*Te;

The signal is then transmitted with the matlab interface:

sock=SDR4All_Connect(0,'SlotA','TX');
SDR4All_SetGain(sock,20);
SDR4All_SetFreq(sock,2422e6);
SDR4All_SetInterpRate(sock,256);

When the receiver is ready, you just have to send the signal:

SDR4All_SendData(sock,y);

The received signal processing

At the receiver, start with the USRP card configuration in reception:

sock=SDR4All_Connect(1,'SlotA','RX');
SDR4All_SetGain(sock,45);
SDR4All_SetFreq(sock,2422e6);
SDR4All_SetDecimRate(sock,128);

The sent signal leasts around 1.5s. When you are ready at the transmitter, use the following command:

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

It records 5 seconds of signal. The transmitted signal leasts around 1.5s. So you have of course to catch it. You should observe something like:

You then process the received signal with the commands:

[t2,y2] = SelectUsefulPart(Te,Data); % Be precise !
y2 = y2.';
y2 = y2./max(abs(y2));
[z,offset] = CorrectFrequencyOffset(y2,ones(1,500),5);
[z2] = Adaptative_Filter(z,5,0.2); %0.2 is the bandwidth excess

You can then check if you are correctly synchronise with the commands:

load Seqs
Sig = z2(12100:5:end);
[Error,h] = IREst(appr_offset,Sig);
Error

If correct, you should have an Error close to $2.10^{-2}$ If missed, it is close to $1$. You can then estime the time variation of the channel impulse response:

NbTrames = 1000;
for (iT = 1:NbTrames)
  [Error,h(iT,:)] = IREst(appr_symboles,Sig(length(appr_offset)+(iT-1)*length(appr_symboles):end));
end

And for example, create an avi file to watch it:

h_r = h;
film

Results

The obtained avi file has been posted on youtube:

The variations are due to RF impairments and timer variations.

Personal tools
Software defined radio