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

Valid HTML 4.01 Transitional

Tutorial : Transmission of a linearly modulated sequence of symbols
1. The "hello world !" of the communication with two USRPs, matlab and windows 
2. Transmission of linearly modulation of sequences of QPSK and 16-QAM symbols. The received constellation. 
3. Frequency offset estimation with linearly modulated sequence of symbols 
4. Channel impulse response estimation with a linearly modulated sequence of symbols 
5. Transmission of a binary signal with a linearly modulated sequence of symbols 
6. Transmission of an image with the USRP (matlab/windows) 
Discussion
The last comment is from Boris Danev:

For me it worked well. Make sure that you select the burst correctly. Try to do it as precise as possible. Alternatively you may want to connect the usrps with a cable to eliminate interference and see if it works in this case.

Add a comment


Structure of this article
1 Goals of this tutorial
2 Signal generation at the transmitter
3 Signal processing at the receiver
4 Source code of the tutorial
   4-1 Transmitter side
   4-2 The transmission
   4-3 Receiver side
More about SDR4Teaching >> Linear modulations
Frequency offset estimation with linearly modulated sequence of symbols 

Transmission of an image with the USRP (matlab/windows) 

Transmission of linearly modulation of sequences of QPSK and 16-QAM symbols. The received constellation. 

Estimation of the RF impairments of the USRP throught channel impulse response estimation 

Channel impulse response estimation with a linearly modulated sequence of symbols 



See also
SDR4Teaching >> Linear modulations 

SDR4Teaching >> OFDM Signals 

SDR4Teaching >> RF impairments 

Transmission of a binary signal with a linearly modulated sequence of symbols

1. Goals of this tutorial

The goal of this tutorial is to set up a digital communications between 2 USRP connected to 2 computers running matlab. A text has been chosed for transmission. On the transmitter side, it has been mapped into QPSK symbols, and a linearly modulated sequences of these symbols has been generated. Training sequences have been added to the information sequence so that the receiver is able to compensate the RF impairements and the channel distorsions on the signal.

On the receiver side, the signal is processed to remove the frequency offsets between the 2 USRP. The channel impulse response is then estimated and the received symbols decoded. The process ends with the reconstruction of the text.

In this demo, no error correcting code has been used.

2. Signal generation at the transmitter

The goal of this tutorial is to transmit the following text:

Afternoon in School
The Last Lesson

When will the bell ring, and end this weariness?
How long have they tugged the leash, and strained apart
My pack of unruly hounds: I cannot start
Them again on a quarry of knowledge they hate to hunt,
I can haul them and urge them no more.
No more can I endure to bear the brunt
Of the books that lie out on the desks: a full three score
Of several insults of blotted pages and scrawl
Of slovenly work that they have offered me.
I am sick, and tired more than any thrall
Upon the woodstacks working weariedly.


And shall I take
The last dear fuel and heap it on my soul
Till I rouse my will like a fire to consume
Their dross of indifference, and burn the scroll
Of their insults in punishment? - I will not!
I will not waste myself to embers for them,
Not all for them shall the fires of my life be hot,
For myself a heap of ashes of weariness, till sleep
Shall have raked the embers clear: I will keep
Some of my strength for myself, for if I should sell
It all for them, I should hate them -
- I will sit and wait for the bell.

D. H. Lawrence


This text has therefore been translated into a sequence of ASCII numbers. The sequence of ASCII numbers has been translated into a sequences of binary digits which has then be mapped to a QPSK constellation with the Gray mapping technique.

This set of QPSK symbols (4460 symbols) has been splitted in 5 parts of 892 symbols to insert training sequences to estimate periodically in time the channel impulse response. A BPSK training sequence has also been added at the beginning of the frame to estimate the frequency offset. Finally, the following frame structure has been used:

The frame structure, with BPSK and QPSK symbols

With the following parameters:
  • K=500
  • P=200
  • N=892
  • M=5

3. Signal processing at the receiver

The processing at the receiver is based on the following tutorials: The following treatments are applied to the received signal:
  1. Selection of a burst in the received signal
  2. Maximisation of the SNR with the adaptative filter
  3. Resampling the received signal to the symbol rate
  4. Frequency offset correction: The rough estimator has been used
Then, for each frame composed of a training sequence of 200 QPSK symbols and 892 symbols of data:
  1. The channel impulse response has been estimated.
  2. As the channel is assumed Gaussian, the equalisation is then performed as the division of the received sequence by the main coefficient of the channel impulse response.
  3. The data symbols are then unmapped
These 3 operations are performed for each frame, i.e. 5 times.

4. Source code of the tutorial

The transmission system is composed of 2 USRP connected to 2 computers running Matlab

4.1. Transmitter side

The code used to generate the transmitted signal can be downloaded : [transmitter.zip]. The following code has been used to generate the signal:
fid = fopen('poeme.txt');
A = fread(fid);
fclose(fid);
[Symb] = BytesToQPSK(A);
[t,y,QPSK_TS] = GenerateSignal(Symb);

4.2. The transmission

The signal is then transmitted. On the transmitter side:
USRP_Init(); USRP_SendSignal(y);
And on the receiver side, at the mean time:
USRP_Init(); [t,y] = USRP_ReceiveSignal(2);
The received signal can also be downloaded here : [acqui.dat]. To read this signal with matlab, you can use the script [ReadAcquiSignal.m], with the following commands:
[t,y] = ReadAcquiSignal('acqui.Dat');

4.3. Receiver side

The code used on the receiver side is available for downloading : [receiver.zip]. The following code has been used:
[t2,y2] = SelectUsefulPart(t,y); % Selection of a burst of interest
[ y3 ] = Adaptative_Filter(y2,5,0.2); % Adaptative filter
%
% Manual synchronisation : You keep the offset that gives the best constellation z = y3(1:5:end);plot(z,'b+');figure(1);axis('square');
z = y3(2:5:end);plot(z,'b+');figure(2);axis('square');
z = y3(3:5:end);plot(z,'b+');figure(3);axis('square');
z = y3(4:5:end);plot(z,'b+');figure(4);axis('square');
z = y3(5:5:end);plot(z,'b+');figure(5);axis('square');

[z2,offset1] = CorrectFrequencyOffset(z,ones(500,1),1); % Frequency offset correction

% Fine synchronisation : you test several offset to minimise the variable Error: [Error,h] = IREst(QPSK_TS,z2(560:end));
[Error,h] = IREst(QPSK_TS,z2(570:end));
[Error,h] = IREst(QPSK_TS,z2(580:end));
%
%
% Signal of interest:
I = find(abs(h)==max(abs(h)));
z3 = z2(570+I-1:end)/h(I);
[Bytes] = SymbToBytes(z3(201:200+892));
disp(sprintf('%s',char(Bytes)));
%
% An so on for the 5 frames

Attached files:

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