You are on page 1of 6

Bangladesh University of Engineering and Technology

Course no. EEE 438


Course Name: Digital Communication Laboratory

Lab-report on experiment 03

“ Line Coding – PSD and BER vs. SNR ”

Name: Muhammad Najmus Sakib


Student ID : 1406047
Date of Submission: 23.11. 2018
Task 01. Write a code (null_BW.m) which will take a bit stream of length
10. Plot all the waveforms using line_code function. Also find out power
spectrum for all of them. Find out the first null bandwidth and whether it is
DC null or not. Compare with the theory given in the table of the labsheet.

Solution: null_BW.m contains all the necessary code to plot the waveforms.
Observing the PSD, we find out the following:

available line codes:

1. unipolar_nrz : first null BW at Rb


2. polar nrz : first null BW at Rb
3. unipolar_rz : first null BW at 2*Rb
4. polar_rz : first null BW at 2*Rb
5. bipolar_ami : first null BW at Rb
6. manchester_unipolar : first null BW at 2*Rb
7. manchester_polar : first null BW at 2*Rb
8. miller_unipolar : first null BW at 2*Rb
9. miller_polar : first null BW at 2*Rb

The code outputs the following with regards to which line-coding has dc-
null:
unipolar nrz : No dc null manchester unipolar : No dc null
polar nrz : No dc null manchester polar : Has dc null
unipolar rz : No dc null miller unipolar : No dc null
polar rz : No dc null miller polar : Has dc null
bipolar ami : No dc null

Task 02. For Manchester(Polar), take number of bits in the bit_stream as 20,
50, 100, 200, 500, 1000, 2000. Plot the power spectrum for all of them.
What is the change in the spectrum?

Solution: We took different values for bit-stream length, but the power
spectrum remained almost the same.
Task 03. In deriving the BER vs SNR plot for the Unipolar NRZ code,
multiple samples were taken from the bit interval and their average was
compared with a threshold.
Change this number of samples per bit and observe how the BER is affected.
Explain why taking more samples per bit ensures better error performance.

Solution: BER vs. K plot obtained for Unipolar NRZ code:

It’s clear from this that the BER does decrease if the bit interval, K
increases. Taking more samples ensures better error performance,
Because, since noise is randomly fluctuating in nature, it can degrade the
signal badly, which would result in error in detection of bits.
But, if many samples within a very short range, the fluctuating nature of the
noise can’t do much, because even before the signal gets degraded, we are
taking many samples already, so averaging these samples will result in better
signal detection.
Task 4. Plot BER vs SNR curve for -30:5:10 dB for all of the schemes in a
single plot. Take 5000 as number of bits in the stream. You have to encode,
then mix noise and finally decode it to find out the BER.

Solution:
Necessary codes were compiled to get the BER vs. SNR curve for all the
schemes.

Individual plots in a single figure:


All plots done in a single figure:

Fig. BER vs. SNR graph

You might also like