ch04
ch04
c. Split phase;
d. NRZ mark;
e. Polar RZ;
f. Unipolar RZ.
Problem 4.2
This is a matter of adapting Figures 4.2 top and bottom to the data sequence given in the
problem statement.
Problem 4.3
These are a matter of …lling in the details given at the ends of Examples 4.1 through 4.5.
Problem 4.4
This is a matter of adapting Figure 4.2, second plot, to the data sequence given in the
problem statement.
1
2CHAPTER 4. BASEBAND COMMUNICATION SYSTEMS IN THE ABSENCE OF NOISE
Problem 4.5
This is a matter of adapting Figure 4.2, third - …fth plots, to the data sequence given in
the problem statement.
Problem 4.6
a. 4 kbps;
b. 2 kbps;
c. 2 kbps;
Problem 4.7
The input pulse is
x1 (t) = Au (t) Au (t T)
By the superposition property of a linear system, the total response is y1 (t) = y11 (t) y12 (t)
which gives (4:30) :
4.1. PROBLEM SOLUTIONS 3
Problem 4.8
Because PRC (f ) is even, it follows that
Z 1
1
pRC (t) = F [PRC (f )] = 2 PRC (f ) cos (2 f t) df
0
Z (1 )=2T Z (1+ )=2T
T 1
= 2T cos (2 f t) df + T 1 + cos f cos (2 f t) df
0 (1 )=2T 2T
1 1+ 1
sin T t sin T t sin T t
= 2T +T T
2 t 2 t 2 t
Z (1+ )=2T
T 1
+T cos f cos (2 f t) df
(1 )=2T 2T
1 1+
sin T t sin T t
= T +T
2 t 2 t
Z (1+ )=2T
T T 1 T 1
+ cos f + 2 f t + cos f 2 ft df
2 (1 )=2T 2T 2T
1 1+
sin T t sin T t
= T +T
2 t 2 t
h i (1+ )=2T h i (1+ )=2T
T 1 T 1
T sin f 2T + 2 ft T sin f 2T 2 ft
+ T
+ T
2 +2 t 2 2 t
(1 )=2T (1 )=2T
1 1+
sin T t sin T t
= T +T
2h t 2 t i h i
T 1+ 1 1+ T 1 1 1
T sin 2T 2T + T t T sin 2T 2T + T t
+
2 T= + 2 t 2 T= + 2 t
h i i h
T 1+ T 1 1 1+
1 1
T sin t 2T T sin 2T 2T TT t 2T
+
2 T= 2 t 2 T= 2 t
sin ( t=T ) cos ( t=T ) 1 1 1 t t
= + cos sin
t=T 2 t=T T =2 t 1 T =2 t + 1 T T
1 sin ( t=T )
= 1 2 cos ( t=T )
1 (T =2 t) t=T
" #
(T =2 t)2 sin ( t=T ) cos ( t=T )
= 2 cos ( t=T ) = sinc (t=T )
1 (T =2 t) t=T 1 (2 t=T )2
4CHAPTER 4. BASEBAND COMMUNICATION SYSTEMS IN THE ABSENCE OF NOISE
Problem 4.9
From (4:37) the ‡at-top portion of the spectrum goes to f = 1=2T and the transition region
is 0 in frequency extent. The remaining spectrum is 0 for 1=2T < f 1=T . Setting = 0
in (4:36) clearly gives pRC (t) = sinc(t=T ).
Problem 4.10
The MATLAB program is given below. The plot of the desired frequency response functions
follows the program.
% Problem 4_10
% Computation and plotting of transmitter and receiver frequency responses
% for raised cosine signaling through lowpass Butterworth …ltered channel
%
clear all
A = char(’-’,’:’,’–’,’-.’);
clf
f3dB = input(’Enter channel …lter 3-dB frequency, Hz => ’);
n_poles = input(’Enter number of poles for Butterworth …lter repr channel => ’);
Rb = input(’Enter data rate, bits/s => ’);
beta0 = input(’Enter vector of betas (max no = 3) => ’);
Lbeta = length(beta0);
for n = 1:Lbeta
beta = beta0(n);
f1 = 0:.1:(1-beta)*Rb/2;
HR1 = sqrt(1+(f1/f3dB).^(2*n_poles));
f2 = (1-beta)*Rb/2:.1:(1+beta)*Rb/2;
HR2 = sqrt(1+(f2/f3dB).^(2*n_poles)).*cos(pi*(f2-(1-beta)*Rb/2)./(2*beta*Rb));
f3 = (1+beta)*Rb/2:.1:Rb;
HR3 = zeros(size(f3));
f = [f1 f2 f3];
HR = [HR1 HR2 HR3];
plot(f,HR,A(n,:), ’LineWidth’, 1.5),xlabel(’{nitf}, Hz’),...
ylabel(’j{nitH_R}({nitf})j or j{nitH_T}({nitf})j’)
if n == 1
hold on
end
end
title([’Bit rate = ’,num2str(Rb),’bps; channel …lter 3-dB frequency = ’,num2str(f3dB),
’Hz; no. of poles = ’,num2str(n_poles)]),...
if Lbeta == 1
legend([’nbeta = ’,num2str(beta0(1))],1)
4.1. PROBLEM SOLUTIONS 5
Bit rate = 5000 bps; channel filter 3-dB frequency = 5000 Hz; no. of poles = 1
1.4
β=1
1.2 β = 0.5
1
|HR(f )| or |HT(f )|
0.8
0.6
0.4
0.2
0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
f, Hz
elseif Lbeta == 2
legend([’nbeta = ’,num2str(beta0(1))],[’nbeta = ’,num2str(beta0(2))],1)
elseif Lbeta == 3
legend([’nbeta = ’,num2str(beta0(1))],[’nbeta = ’,num2str(beta0(2))],...
[’nbeta = ’,num2str(beta0(3))],1)
end
Problem 4.11
1
a. This spectrum has the zero-ISI property. The appropriate sample rate is T = 1:5W .
Problem 4.12
b. Use the transform pair (t) $ sinc2 (f ) with duality to produce the transform pair
sinc2 (t) $ (f ). Then use scale change to get sinc2 (at) $ a 1 (f =a). Apply this
to P (f ) with a = 2=T to get
Problem 4.13
Use (4:37) and set the maximum frequency equal to 7 kHz:
1+
= 7 kHz
2T
1
But T = 9 kbps, so
2 7
1+ =
9
14 5
= 1 = = 0:556
9 9
Problem 4.14
Its inverse is 2 3
1:0217 0:0163 0:0209
[Pc ] 1
= 4 0:0216 1:0423 0:0163 5
0:0626 0:0216 1:0217
The equalizer coe¢ cients are the middle column:
Problem 4.15
Its inverse is
2 3
1:0218 0:1067 0:0218 0:0046 0:0018
6 0:2111 1:0438 0:1111 0:0227 0:0046 7
6 7
[Pc ] = 6
6 0:0651 0:2179 1:0451 0:1111 0:0218 7
7
4 0:0234 0:0673 0:2179 1:0438 0:1067 5
0:0101 0:0234 0:0651 0:2111 1:0218
The equalizer coe¢ cients are the middle column:
Problem 4.16
y (t) = x (t) + x (t m)
8CHAPTER 4. BASEBAND COMMUNICATION SYSTEMS IN THE ABSENCE OF NOISE
Using the superposition and time delay theorems, its Fourier transform is
Y (f ) = X (f ) [1 + exp ( j2 m f )]
Using the superposition and time delay theorems, the Fourier transform of z (t) is
N
X
Z (f ) = Y (f ) i exp [ j2 (i 1) ]
i=1
c. From part a,
1 1
=
H (f ) 1 + exp ( j2 mf )
2 3
= 1 exp ( j2 mf ) + exp ( j4 mf ) exp ( j6 mf ) + :::
Problem 4.17
c.
1 4
PE0 = exp ( z0 ) = 10
2
or z0 = ln 2 + 4 ln 10
= 8:52 = 9:3 dB
Problem 4.18
The problem statement is incorrect. The FFT length should have been given as NF F T =
5; 000. Since this corresponds to fs = 50 Hz, the spectral line at the bit rate corresponds
to 50 1000=5000 = 1 Hz:
Problem 4.19
The modi…ed program follows with the spectrum shown in Fig. 4.2. The spectral line at
the bit rate does not appear to be much di¤erent than that of Fig 4.16.
% Problem 4-19
%
nsym = 1000; nsamp = 50; lambda = 0.7;
[b,a] = butter(3,2*lambda/nsamp);
l = nsym*nsamp; % Total sequence length
y = zeros(1,l-nsamp+1); % Initalize output vector
x =2*round(rand(1,nsym))-1; % Components of x = +1 or -1
10CHAPTER 4. BASEBAND COMMUNICATION SYSTEMS IN THE ABSENCE OF NOISE
Amplitude 1
-1
0 100 200 300 400 500 600
1.5
Amplitude
0.5
0
0 100 200 300 400 500 600
1
Spectrum
0.5
0
0 200 400 600 800 1000 1200 1400 1600 1800 2000
FFT Bin
Problem 4.20
4.2. COMPUTER EXERCISES 11
PC h i
= cos2
PT 2
We want
h i h i p 2 p
cos2 = 0:1 or cos = 0:1 or = cos 1
0:1 = 0:7952
2 2
n_samp = N_sym*sam_sym;
t = 0:ts:(n_samp-1)*ts;
s = 3279;
rand(’state’, s);
ss = sign(rand(1, N_sym) - 0.5); % Bipolar
data = 0.5*(ss+1); % Unipolar
x1 = zeros(size(t));
for n = 1:N_sym
x1 = x1 + ss(n)*unit_pulse((t-(n-1)*T_sym-T_sym/2)/T_sym); %NRZ change
end
y1 = …lter(num, den, x1);
x2 = zeros(size(t));
sgn = 1;
for n = 1:N_sym
if n == 1
x2 = x2 + ss(1)*unit_pulse((t-(n-1)*T_sym-T_sym/2)/T_sym); %NRZ mark
else
x2 = x2 + sgn*ss(1)*unit_pulse((t-(n-1)*T_sym-T_sym/2)/T_sym);
end
if n < N_sym
if data(n+1) == 1
sgn = -sgn;
elseif data(n+1) == 0
sgn = sgn;
end
end
end
y2 = …lter(num, den, x2);
x3 = zeros(size(t));
for n = 1:N_sym
x3 = x3 + data(n)*unit_pulse(2*(t-(n-1)*T_sym-T_sym/4)/T_sym); %Unip RZ
end
y3 = …lter(num, den, x3);
x4 = zeros(size(t));
for n = 1:N_sym
x4 = x4 + ss(n)*unit_pulse(2*(t-(n-1)*T_sym-T_sym/4)/T_sym); %Polar RZ
end
y4 = …lter(num, den, x4);
x5 = zeros(size(t));
sgn = 1;
4.2. COMPUTER EXERCISES 13
for n = 1:N_sym
x5 = x5 + sgn*data(n)*unit_pulse(2*(t-(n-1)*T_sym-T_sym/4)/T_sym); %Bip
RZ
if data(n) > 0
sgn = -sgn;
end
end
y5 = …lter(num, den, x5);
x6 = zeros(size(t)); %Split phase
for n = 1:N_sym
x6 = x6 + ss(n)*(unit_pulse(2*(t-(n-1)*T_sym-T_sym/4)/T_sym) ...
-unit_pulse(2*(t-(n-1)*T_sym-3*T_sym/4)/T_sym));
end
y6 = …lter(num, den, x6);
…gure(1)
subplot(6,1,1), plot(t, x1, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’NRZ change’), title(’Baseband binary data formats; un…ltered’)
subplot(6,1,2), plot(t, x2, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’NRZ mark’)
subplot(6,1,3), plot(t, x3, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Unipolar RZ’)
subplot(6,1,4), plot(t, x4, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Polar RZ’)
subplot(6,1,5), plot(t, x5, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Bipolar RZ’)
subplot(6,1,6), plot(t, x6, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Split phase’), xlabel(’Time, seconds’)
…gure(2)
subplot(6,1,1), plot(t, y1, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’NRZ change’), ...
title([’Butterworth …lter; order = ’, num2str(N_order), ’; ...
BW = ’, num2str(BWT_sym), ’/T_b_i_t’])
subplot(6,1,2), plot(t, y2, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’NRZ mark’)
subplot(6,1,3), plot(t, y3, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Unipolar RZ’)
subplot(6,1,4), plot(t, y4, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Polar RZ’)
subplot(6,1,5), plot(t, y5, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Bipolar RZ’)
14CHAPTER 4. BASEBAND COMMUNICATION SYSTEMS IN THE ABSENCE OF NOISE
subplot(6,1,6), plot(t, y6, ’LineWidth’, 1.5), axis([min(t) max(t) -1.2 1.2]), ...
ylabel(’Split phase’), xlabel(’Time, seconds’)
% End of script …le
function y = unit_step(t)
% Function for generating the unit step
%
y = zeros(size(t));
I = …nd(t >= 0);
y(I) = ones(size(I));
function y = unit_pulse(t)
% Unit rectangular pulse function
%
y = unit_step(t+0.5) - unit_step(t-0.5);
>> ce4_1
Enter order of Butterworth …lter => 2
Enter bandwidth X sym dur product => 1
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
Time, seconds
16CHAPTER 4. BASEBAND COMMUNICATION SYSTEMS IN THE ABSENCE OF NOISE
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
1
0
-1
0 2 4 6 8 10 12 14 16 18
Time, seconds
4.2. COMPUTER EXERCISES 17
beta = beta0(n);
f1 = 0:delf:(1-beta)*Rb/2;
HR1 = sqrt(1+(f1/f3dB).^(2*n_poles));
f2 = (1-beta)*Rb/2:delf:(1+beta)*Rb/2;
HR2 = sqrt(1+(f2/f3dB).^(2*n_poles)).*cos(pi*(f2-(1-beta)*Rb/2)./(2*beta*Rb));
f3 = (1+beta)*Rb/2:delf:Rb;
HR3 = zeros(size(f3));
f = [f1 f2 f3];
HR = [HR1 HR2 HR3];
plot(f,HR,A(n,:), ’LineWidth’, 1.5)
if n == 1
hold on
xlabel(’{nitf}, Hz’),ylabel(’j{nitH_R}({nitf})j or j{nitH_T}({nitf})j’)
title([’Bit rate = ’,num2str(Rb),’bps; ch …lter 3-dB freq = ’,num2str(f3dB),’Hz;
no. of poles = ’,...
num2str(n_poles) ’; nbeta = ’, num2str(beta0)])
end
end
Bit rate = 5000 bps; ch filter 3-dB freq = 2000 Hz; no. of poles = 2; β = 0 0.5 1
2
1.8
1.6
1.4
|HR(f )| or |HT(f )|
1.2
0.8
0.6
0.4
0.2
0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
f, Hz
4.2. COMPUTER EXERCISES 19
Pc = [];
for k = 1:n_tap
Pc(:, k) = pc(n_center-k+1:n_center+n_tap-k)’;
end
Pcinv = inv(Pc);
A = Pcinv(:,nn);
disp(’The equalizer tap vector is:’)
disp(A)
nT = [-(n_center-1):n_center-1];
peq = [];
n_eq = n_samp-n_tap+1;
nTc = [-‡oor(n_eq/2):‡oor(n_eq/2)];
for n = 1:n_eq
Nd = n-1;
pcd = pc(Nd+1:n_tap+Nd)’;
peq(n) = A’*‡ipud(pcd);
end
subplot(2,1,1), stem(nT, pc), axis([min(nT) max(nT) -0.5 1.5]), ...
xlabel(’{nitn}’), ylabel(’{nitp_c}({nitn})’)
title([’Input sequence and zero-forced equalizer output for ’, num2str(n_tap), ’-tap
equalizer’])
subplot(2,1,2), stem(nTc, peq), axis([min(nT) max(nT) -0.5 1.5]), ...
xlabel(’{nitn}’), ylabel(’{nitp}_e_q({nitn})’)
% End of script …le
>> ce4_3
Number of taps => 5
The equalizer tap vector is:
0.1581
-0.3160
1.2068
-0.4405
0.2577
1
pc (n)
0.5
-0.5
-6 -4 -2 0 2 4 6
n
1.5
1
peq(n)
0.5
-0.5
-6 -4 -2 0 2 4 6
n