You are on page 1of 3

Lab 2 measurements

L1: EVM and BER measurements

In this exercise we estimate SINR from the measured EVM values.
The example files used in this exercise are located in the directory ~/SoftwareRadio/EVM
The OFDM transmitter is implemented in EVM_Tx.grc . The signal from the test source is transmitter
by using OFDM modulation.
The receiver Implementation is in EVM_Rx.grc. The receiver automatically searches for the training
sequence and synchronizes with transmitter.
The receiver plots the measured signal IQ diagram and in the system window are the measured BER
For recording the data samples set the recoding data file to ~/SoftwareRadio/EVM/EVM_Data.dat and
the flag file ~/SoftwareRadio/EVM/EVM_Flag.dat
Configuration of the system:
RF carrier frequency: 2.45 GHz
Receiving bandwidth: 3.125 MHz
FFT size: 512 samples
1. Run the transmitter and receiver and check that the signal appears in the FFT windows. (if not
restart the transmitter till the it starts to transmit the signal). You will see the OFDM spectrum in
the output window as well as the BER measurements at the output console of the GRC.
2. For the default signal strength (Tx Gain 20)
1. Record the spectrum screenshot from the FFT window
2. Run the receiver and record about 2000 frames (you see the number of subframes in the
receiver windown)
3. Run the Matlab file EVM_Measurements.m and record
1. The constellation plot and the EVM plot
2. SINR and EVM values that are printed in the Matlab main window
4. Record BER value visible in gnuradio-companion screen.
3. Measure the EVM dependency on transmitted signal strength. Record the values into table
In this measurement you can change the SNR by changing the signal strength. You can
change the signal transmission power by tuning the scaling constant const visible in the
slider at the output FFT window of the transmitter.
For each selected power level (const) record the signal strength, EVM, SINR and BER.
BER is visible in the receiver grc output window. EVM and SINR you get by running the
matlab script EVM_Measurements.m.

Multiplying Const




4. Plot the BER vs SINR curves using the above readings. (You can plot them by using Matlab).

L2. Implementing and testing module written in Python

In this exercise we implement a simple QPSK demodulator in Python. The implemented block will be
visible in gnuradio-companion.
In this exercise we generate the block basic structure by using gr_modtool. The tool generates the basic
directory and file structure. The block can be implemented by filling the pregenerated files with the
signal processing code.
Generation of a block has following general steps.
1. Create directory structure with gr_modtool
2. Write the test of your block. The test code will be in the file
3. Create the signal processing code into the file
4. Specify the block graphical interface in the xml file.
5. Compile, test and install the block.
In this exercises we use the example given in tutorial
Follow the instructions given in this webpage while implementing you block.
1. Go to the directory where you will create your block and use gr_modtool to create new module
gr_modtool newmod tutorial
2. Use gr_modtool and add new block for Gray_coding
What type of block you will use?
How the parameter gray_code is provided?
How and where different type of input and output formats are described?
3. Open the file where the function main code body will be and add interface definition
The file is in ~/tutorial/python/[YourFileName].py

4. In the same file write function for computing minimum distance between the constellation
points and received sampels
5. Open the testcode file. It is ~/tutorial/python/qa_[YourFileName].py
6. Add testcode to your implementations.
On which line the test code creates the decoder block?
On which line the code executes decoding?
Shuld the test result to be exactly equal to the expected values?
7. Create new directory where you will build your code ~/tutorial/build
8. Go to the new directory and build your codeback
>cmake ../
9. Test your code
>make test
Take screenshot of the test run.
10. Modify the xml file ~/tutorial/grc/[YourFileName].xml for the correct variables, input and
11. You can install the code into GNUradio
> sudo make install
> sudo ldconfig
12. Test your block in gnuradio companion.
Start gnuradio-companion and create a flowchart that tests you code.
Include into your report your GNUradio flowchart.
Why do you think that your block is operating correctly?