Exp 2
Exp 2
OBJECTIVES
PRE-LAB ASSIGNMENT
2. Determine and sketch the power spectral density (PSD) functions cor-
responding to the above line codes. Use Rb = 1 kbps. Let f1 > 0 be
the location of the first spectral null in the PSD function. If the trans-
mission bandwidth BT of a line code is determined by f1 , determine
BT for the line codes in question 1 as a function of Rb .
2 Experiment 2: Binary Signalling Formats ELE 745
PROCEDURE
Binary 1’s and 0’s such as in pulse-code modulation (PCM) systems, may be
represented in various serial bit signalling formats called line codes. In this
section you will study signalling formats and their properties.
A.1 You will use the MATLAB function wave gen to generate waveforms
representing a binary sequence:
where Rb is the binary data rate specified in bits per second (bps).
If you use the function wave gen with the first two arguments only, it
will default to the binary data rate set by the variable binary data rate,
which is 1,000 bps. Create the following binary sequence:
À b = [ 1 0 1 0 1 1 ];
Since you will compare waveforms at the same Rb , you can use the
function wave gen with only two arguments.
Q2.1 For the above set of line codes determine which will gener-
ate a waveform with no dc component regardless of binary
sequence represented. Why is the absence of a dc compo-
nent of any practical significance for the transmission of
waveforms?
ELE 745 Experiment 2: Binary Signalling Formats 3
À b = binary(1000);
Display the PSD function of each line code used in part A.1:
Let:
• fp1 : first spectral peak; • fn1 : first spectral null;
• fp2 : second spectral peak; • fn2 : second spectral null;
such that all f(.) > 0. Record your observations in Table 2.1.
Table 2.1
Location of the first spectral null determines transmission bandwidth
BT .
B . Channel Characteristics
NOISE
À b = binary(10);
À x = wave gen( b, ’polar nrz’, 1000 );
BT = Hz.
B.2 Consider a baseband data transmission channel with unity gain and ad-
ditive white Gaussian noise (AWGN) where the noise power is 10−2 W
and the channel bandwidth is 4.9 kHz. Transmit waveform x over this
channel. Display the channel input and output waveforms:
b̂ =
À y = channel(x,1,sigma,4900);
À waveplot(y)
where sigma ∈ {0.1, 0.5, 1, 2, 5}. At what noise power level, does the
channel output waveform becomes indistinguishable from noise?
B.4 You can also observe effects of increasing channel noise power by look-
ing at the PSD of the channel output waveform.
À b = binary(1000);
À x = wave gen(b, ’polar nrz’, 1000);
À clf; subplot(121); psdf(x);
À subplot(122); psdf(channel(x,1,0.01,4900))
À hold on
À subplot(122); psdf(channel(x,1,1,4900))
À subplot(122); psdf(channel(x,1,5,4900))
where bw ∈ {3000, 2000, 1000, 500}. Observe the delay in the output
waveform due to filtering characteristics of the channel. Plot the input
and output waveforms. Determine the appropriate sampling instants
for the decoding of the waveform for the case bw = 500.
C . Eye Diagram
Effects of channel filtering and noise can be best seen by observing the output
waveform in the form of an “eye diagram”. The eye diagram is generated
with multiple sweeps where each sweep is triggered by a clock signal and the
sweep width is slightly larger than the binary data period Tb = 1/Rb . In this
simulation the eye diagram is based on a sweep width of 2Tb .
À b = [ 1 0 0 1 0 1 1 0 ];
À x = wave gen( b, ’polar nrz’, 1000);
À clf
À subplot(221), waveplot(x)
À subplot(223), eye diag(x)
The eye diagram for the waveform x represents what you should expect
to see for an undistorted signal. To observe how the eye diagram is
generated and to observe effects of signal distortion as the signal x is
transmitted over a finite bandwidth channel with no noise component:
À y = channel( x, 1, 0, 4000 );
À subplot(222), waveplot(y)
À subplot(224), eye diag(y,-1)
If the second argument to the function eye diag is negative, you have
to hit the Return key for the next trace to be displayed. This will assist
you to understand how the eye diagram is generated.
C.2 Key parameters to be measured with an eye diagram are shown below.
ELE 745 Experiment 2: Binary Signalling Formats 7
-3
x 10 EYE DIAGRAM
1.5
E
1
0.5
B
0 slope C
D
-0.5
A
-1
-1.5
t*
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time [sec] -3
x 10
Generate the eye diagram from a polar NRZ waveform at the channel
output for values of noise variance s2 and channel bandwidth bw shown
in Table 2.2. Record t∗ , A and B for each set of s2 and bw.
À clf
À b = binary(100);
À x = wave gen( b, ’polar nrz’, 1000 );
À eye diag( channel( x, 1, s2, bw ) )
8 Experiment 2: Binary Signalling Formats ELE 745
Table 2.2
C.3 Repeat step C.2 for manchester line code and record your results in
Table 2.3.
Table 2.3
Q2.4 When you compare the eye diagrams from C.2 and C.3
for s2 = 0.01 and bw = 1000, for which line code do you
observe a “reasonable” eye diagram? Explain the difference
in terms of the respective line code properties.
C.4 Generate eye diagrams as in step C.2 for polar RZ and unipolar RZ
and unipolar NRZ line codes and observe how the line code dictates
the shape and the symmetry of the eye diagram.