CIS5930 Course Project 1

(Here is a sample Python code we used in the class.)

In this project, you will be asked to implement a simple BPSK transmitter/receiver with GNU Software Defined Radio. Basically, the transmitter will read a binary file and write the modulated digital waveform to a file. The receiver will read the digital signal from the file and reproduce the original binary file.

The transmitter divides the file in 1500-byte blocks and sends each block as a frame. The frame contains a frame preamble, a frame header, and the data. The preamble is 16 bytes where each byte is 85. The header is also 16 bytes, with the first two bytes as the sequence number and other bytes repeating the first two bytes to provide redundancy. Between two frames, an idle interval should be inserted. The length of the idle interval should be uniformly random from the time to send 200 bytes to 2000 bytes.

In addition, you are asked to write a signal processing block to emulate the wireless channel under AWGN. The signal processing block should take the output of the transmitter and a random noise taken from the Gaussian distribution as inputs, and add the noise with data signal to produce the output. The power of the noise should be controlled by a parameter.

You are asked to analyze the received file and compare it with the original file and find the BER. You should run the code under various noise levels and record the BER. You are asked to show the BER as a function of the noise level in a graph to be generated by Matlab. 

AWGN is a commonly used model for noise. In wireless communications, it assumes that both the I channel and the Q channel will be added with a real number taken from the Gaussian distribution when mean 0 and variance \sigma^2, where \sigma^2 represents the noise power and is the parameter to be set in our project. You can use

gr.noise_source_c [f, i, s] gr_noise_type_t type,
                              float amplitude,
                              long seed )

for generating the noise. You may check http://www.nd.edu/~jnl/sdr/docs/tutorials/9.html#tth_sEc2.2 for how to use this source. The amplitude controls the noise power and you should try 11 values where the amplitude goes from 0 to 0.5 at a step of 0.05.

Matlab is a commonly used software to generate scientific figures, among many other of its uses. You should have an account at ``program1’’. In linux, type ``ssh -X program1’’, then type ``matlab’’, you should see Matlab running. Here is a sample code to read from a txt file and generate the figures using ``plot’’ function.

As mentioned in the class, to write a signal processing block, you should copy the entire ``how_to_write_a_block’’ directory into your working directory. You may want to modify ``gr_mpsk_receiver.cc’’ and ``gr_mpsk_receiver.h’’ into your own code for certain functions.

Here is the binary file you should transmit. It is 30KB, and need exactly 20 frames.