Modeling Digital Communications Matlab Files Giordano Solution Manual Simulink
Modeling Digital Communications Matlab Files Giordano Solution Manual Simulink
Answers to Chapters
Chapter 1 Problems
Prob 1-1 Modify the Simulink model in Figure 1-12 to produce two sinusoidal waves with the
following parameters:
frequency =1 rad/sec for both waves
amplitude =1 volt for both waves
phase =0 for one wave and π/2 for the second wave
sample time=0.01 seconds
a. Show the Simulink Model and include an information block
b. Display each wave on a separate trace in the scope and label all axes.
Hint: Find the demux block in the Simulink library
Ans:
a
Figure 1-1
b.
1
June 3, 2014
Figure 1-2
a. Develop a Simulink model for x(t) with an included information block. Assume a 10
sec simulation time
b. Display x(t) in a scope over the range 0 to 2 π with labels
c. Modify the Simulink model obtained in part a by overlaying a square wave that is +1
between 0 and π and -1 from π to 2π and repeats thereafter
d. Display the overlay result in a scope over the range 0 to 2 π with labels
Note that x(t) represents the first three terms of the Fourier series of the square wave.
Ans.
a.
2
June 3, 2014
Figure 1-3
b.
Figure 1-4
3
June 3, 2014
c.
Figure 1-5
d.
4
June 3, 2014
Figure 1-6
Prob 1-3 Amplitude Modulation (AM) with a tone modulator having a unity modulation index is
expressed as ( ) ( ( )) ( )
a. Develop a Simulink model for x(t) with an included information block. Use a 10
second simulation time and Goto and From routing blocks from Signal Routing to
simplify the model.
b. Display the x(t) and cos(t) on a scope with labeled axes
c. From the Simulink library, add an AM modulation block to the simulation and form the
difference between x(t) and the output of the AM library block
d. Display x(t), cos(t), the AM library output and the difference on a scope with four
traces. Insert x axis title on bottom trace only, don’t label y-axis but ad a title to each
plot
Ans.
a.
5
June 3, 2014
Figure 1-7
b.
6
June 3, 2014
Figure 1-8
c.
7
June 3, 2014
Figure 1-9
d.
8
June 3, 2014
Figure 1-10
Prob 1-4 Develop a Simulink model with a sine wave input that feeds both a DSB AM block and
a quantizer followed by a DSB AM block. Assume a 2 second simulation and sine wave block
parameters as follows:
Sine wave amplitude=2, Frequency=20π rad/sec, Sample time=0.001 sec.
For the DSB AM block assume the parameters are:
input signal offset=1, carrier frequency=100, initial phase =0
a. Show the model with an included information block
b. Assume the quantization interval =0.5 and display the following signals in a scope
with 4 traces:
sine wave output, DSB AM output, quantizer/DSB AM output, difference between
the DSB AM output, and quantizer/DSB AM output
Provide titles for each trace and label only the x-axis
c. Repeat part a with a quantization interval =0.05
Ans.
a.
9
June 3, 2014
Figure 1-11
b.
10
June 3, 2014
Figure 1-12
c.
11
June 3, 2014
Figure 1-13
12
June 3, 2014
Chapter 2 Problems
Prob 2-1 Find the average power of a sinusoid with the following parameters:
frequency =1 rad/sec
amplitude =0.5 volts
sample time=0.01 seconds
a. Show the Simulink Model using the running Variance block and include an
information block. Assume a 100 second simulation time.
b. Display the output in the scope and label all axes
c. Show the results in a Display block and compare to the theoretical value.
Ans.
a.
Figure 2-1
b.
13
June 3, 2014
Figure 2-2
c If ( ) ( ), then the average power is . For A=0.5 the average power is 1/8
Prob 2-2 In the Simulink model in Figure 2-1 enter the vector [1 4] for amplitude and
[2*pi 20*pi] for frequency. Use a 0.001 second sample time and a simulation time of 2 seconds.
a. Display the results in the scope
b. Show the Simulink model with the simulated average powers and compare the result
to the theoretical powers.
c. Develop a model that allows each sinusoid to be displayed separately and label all
axes in the scope output
Ans:
14
June 3, 2014
Figure 2-3
15
June 3, 2014
Figure 2-4
b. The power of green sinusoid is displayed as =0.5 and the power of the blue sinusoid
is =8 watts
c. Figure 2-5 separates the two signals by use of the demux block in the Simulink model
and Figure 2-6 displays the results
16
June 3, 2014
Figure 2-5
17
June 3, 2014
Figure 2-6
Prob 2-3 Develop a sample-based Simulink model for a sine block connected to a scope by:
1) Selecting the sine block from the Simulink section of the Simulink library
2) Selecting the sine block from the DSP sources in the Simulink library
Assume the phase is zero, the sample time is 0.05 seconds and the frequency is 1 Hz.
a. Compute the power for both signals
b. Plot the scope output and compare the results
Ans:
18
June 3, 2014
Figure 2-7
19
June 3, 2014
Figure 2-8
20
June 3, 2014
Figure 2-9
a. The power observed from the running variance computation is 0.5 watts in both
cases
b. The time plots in Figure 2-10 display the same result for both sine blocks. Note that
the DSP block can generate complex signals
Figure 2-10 (Top figure: Simulink sine; bottom figure: DSP sine)
21
June 3, 2014
The top figure is from the sine block in the Simulink section of the library and the bottom figure
is from the sine block in the DSP library. The results are the same in both cases
Prob 2-4 Find the average power in the square of a sine wave. Assume the following parameters:
frequency =2π rad/sec
amplitude =1 volt
sample time=0.01 seconds
a. Show the Simulink Model with an information block. For a 10 second
simulation time compute the power of the squared sine wave using the
running Variance and running RMS blocks and show the results in Display
blocks
b. Display the output in the scope and label all axes
c. Repeat Part a. using 100 second simulation
d. Compare the results in Parts a. and c. with theoretical values
Ans;
a.
Figure 2-11
22
June 3, 2014
b.
a. Figure 2-12
c.
Figure 2-13
23
June 3, 2014
Prob 2-5 In the Simulink model in Figure 2-1 insert an AWGN block at the output of the sine
block and change the sample time to 0.01 seconds. Modify the scope to display the sine output
and the output of the AWGN block
a. Display the revised Simulink model. Plot the results assuming the SNR=0 dB in the
AWGN block and report the signal power from the output of the AWGN block
b. Change the run time to 100 seconds and report the results of the signal power from the
output of the AWGN block and explain the difference from Part a. above
c. Change the SNR in the AWGN block to be 10 dB. Explain the resulting change in the
power from the output of the AWGN block
Ans.
a. Figure 2-14 displays the revised Simulink model with the AWGN block and Figure 2-15
plots the scope output
24
June 3, 2014
Figure 2-14
25
June 3, 2014
Figure 2-15
The average power is 0.9177 and should be one since the signal power=0.5 and the noise power
is the same as the signal power.
b. Increasing the run time to 100 seconds allows a better estimate of the power to be
determined. In this case the power is 1.002 and is roughly the same as the power that is
expected with 0 dB SNR
c. Changing the SNR to 10 dB produces an estimated power that is 0.5508. The power of
the signal is 0.5; with SNR=10 dB the noise power is 0.5/10 =0.05. The sum of the
signal and noise powers is then 0.55
26
June 3, 2014
Ans:
Figure 2-16
The parameters in the Sine Wave block are as shown in Figure 2-17
27
June 3, 2014
Figure 2-17
The imaginary part associated with the sine3 scope is seen to be very small as seen in
Figure 2-18
28
June 3, 2014
Figure 2-18
The real part associated with sine scope1 is shown in Figure 2-19 once it is edited to modify the
x-axis scale. The simulated results are in good agreement with the theoretical expression. Note
that in this simulation the buffer overlap was set to zero. A nonzero overlap distorts the
simulated result.
29
June 3, 2014
Figure 2-19
a. Insert a 256 buffer overlap while retaining the 2048 FFT length. Compute the spectrum
magnitude
b. With no buffer overlap reduce the FFT length to 256. Compute the spectrum magnitude
and the power spectrum magnitude using the spectrum analyzer
Ans
30
June 3, 2014
Figure 2-20
Note that a bias is introduced in this spectrum where the peak is about the same as the case with
no buffer overlap but the frequencies are displaced from +/-100 Hz
31
June 3, 2014
Figure 2-21
In this figure the sidelobes are higher than those in Figure 2-11
32
June 3, 2014
Figure 2-22
This figure has higher sidelobes than Figure 2-12 with a peak that is closer to the -6 dBW
theoretical value.
Prob 2-8 Develop a Simulink model to determine the power spectrum of a vector of 4 sinusoids
with all having a unity amplitude and orthogonal frequencies 100,200,300 and 400. Use the DSP
sine wave block as a source and compute the spectrum using an average of 10.
Ans
33
June 3, 2014
Figure 2-23
Figure 2-24
34
June 3, 2014
Chapter 3 Problems
Prob 3.1 Reduce the symbol time to 0.1 seconds in the Figure 3-18 Simulink model using
Eb/No=3 dB with a simulation time =100,000 seconds.
a. Does the BER remain the same as the case with 1 second symbol duration?
b. Why does it take longer to execute with 0.1 second symbols?
Prob 3.2 Using the symbol time as 0.1 seconds in the Figure 3-18 Simulink model increase
Eb/No=10 dB with a simulation time =100,000 seconds. Does the BER remain the same as the
case with 1 second symbol duration using Eb/No=10 dB?
Ans: a. No for Eb/No=10 dB, the symbols with a 1 second duration , there are 100,000 symbols
sent and few errors are produced; many more symbols must be sent to estimate the BER for
Eb/No=10 dB. With a 0.1 second symbol duration 1,000,000 symbols are sent thus providing a
better estimate of the BER.
Prob 3.3 Using the symbol time as 0.1 seconds in the Figure 3-18 Simulink model with
Eb/No=10 dB, select frame based simulation with 10 samples per symbol
Prob 3.4 Figure 3-37 presents a simulation where the channel introduces a fixed phase offset .In
this simulation the phase offset is set to 30 degrees and the BER is sent to the work space for a
range of values between 0 and 10 dB. The BER results are plotted in Figure where the bertool is
used to compute the theoretical and simulated BER cases. The results show the degradation from
a fixed channel phase offset compared to the case where no offset exists.
35
June 3, 2014
Repeat this simulation where the 30 degree phase offset is introduced in the demodulator and the
channel phase offset is set to zero. Do you get the same results?
Ans: The results are the same if the same offset is used. In the channel phase offset the angle is
entered in degrees. In the BPSK demodulator the phase offset is entered in radians. If the
conversion from degrees to radians in the BPSK demodulator is not made, the results will be
very different. See the input values for the BPSK demodulator shown below.
36
June 3, 2014
Prob 3.5 In Figure 3-38 a sine wave is added to filtered Gaussian noise with the following
parameters:
Gauss noise block: zero mean, var=0.25, sample time Ts=0.01 sec, frame based with
1000 samples/frame
Low pass filter block: Filter specs:FIR, minimum, single rate; freq specs: normalized 0
to1,fpass=0.45,fstop=0.55; magnitude specs:dB units,Astop=1,Apass=60,equiripple
Sine wave block: amplitude=0, frequency=10 Hz, phase=0, sample time Ts=0.01 sec,
frame based with 1000 samples/frame
a. Execute the simulation using 1000 sec and observe the spectrum analyzer output:
37
June 3, 2014
Observe that the spectrum analyzer output extends from -50 to +50 Hz and explain what
sets these limits? What are the frequency limits for the lowpass filter?
b. Add a running variance block at the output of the Gaussian noise block, the output of
the sine wave block, the output of the lowpass filter and the output of the adder.
What power levels are obtained?
c. Make the following changes in the lowpass filter: fpass=0.2,fstop=0.3. What power
levels are obtained and explain what the differences are due to compared to part a
above.
Ans: Part a. The limits are determined by –fs/2 to fs/2 where fs=1/Ts=100 Hz. The fpass=0.45
and fstop=0.55 set these limits and are approximately +/-25 Hz.
Part b. The output powers are; sine wave power=0.5 watts, Gaussian noise power=0.25 watts
,lowpass filter output power=0.12 watts as a result of the filter response and the output of the
adder=0.62 watts and (0.5+0.12)
38
June 3, 2014
39
June 3, 2014
The output powers are; sine wave power=0.5 watts, Gaussian noise power=0.25 watts ,lowpass
filter output power=0.055 watts as a result of the filter response and the output of the adder=0.56
watts and (0.5+0.055). The lowpass filter response has reduced the bandwidth by about one-half
resulting in a lowpass filter power output that is about one-half the value seen in Part b.
40
June 3, 2014
Chapter 4 Problems
Prob 4-1 Modify the parameters in the Simulink model shown in Figure 4-1 to reproduce the
curves in Figure 4-6.
Ans In the simulation model if the model has M in the source block, modulator block and
demodulator block, then the value of M must be entered in the Matlab command window. Also if
k is the label in the gain block, then k =log2 (M) must be entered in the Matlab command
window. Otherwise specific values of M and k must be entered each time in the blocks in the
model; for example, enter M=8 in the source block, modulator block and demodulator block and
k=3 in the gain block. To run the bertool select the mode in the AWGN block as Es/No(dB) and
enter EbNo+10*log10(k)
Prob 4-2 Using Simulink show that M=2 and M=4 produce about the same BER
Ans In the attached model run the model for b =2,4,6 and record the simulated error rate for
both M=2 and M=4; as shown in the table below.
41
June 3, 2014
Prob 4-3 Using the QAM Simulink model, determine the simulated BER for M=256 and
compare the result to the theoretical performance
Ans
BER QAM 256 Average Power
0
Blue solid line theoretical;Red dashed line simulated
10
-1
10
-2
10
BER
-3
10
-4
10
-5
10
0 5 10 15 20 25
E /N (dB)
b 0
Prob 4-4 For M=16 compute the simulated QAM BER for b in the range from 10 to 15 dB
assuming both peak and average power. What is the theoretical peak power degradation? What is
the approximate degradation obtained in the simulation?
Ans. Calculate degradation in b due to peak power with M=16 and amplitude =1.
∑( )
42
June 3, 2014
= [ ( ) ( ) (√ ) ]= or 2.55 dB
1/3
√ /3
-2
10
-3 2.55 dB approximately
10
BER
-4
10
-5
10
-6
10
10 11 12 13 14 15 16
E /N (dB)
b 0
43
June 3, 2014
Prob 4-5 In the Figure 4-16 model change the method in the Saleh block to cubic polynomial
with the third order intercept point=30 dBm, AM/PM conversion=0 degrees per dB, lower input
power =10 dBm and upper input power =inf. Assume b =15 dB and the simulation
time=100,000 seconds.
Ans: a. From the simulation the BER is 0.127 for the cubic polynomial and 0.014
b. The scatter plots are input of cubic polynomial (left) output of cubic polynomial (right)
44
June 3, 2014
45
June 3, 2014
Chapter 5 Problems
Prob 5-1 Replace auto in the spectrum scope with RBW= 5 Hz and compare the spectrum with
Figure 5-3
Ans; The peaks of the FSK tones now show better resolution with RBW=5 Hz (4.99 Hz shown
in Figure)
0
-10
-20
dBW
-30
-40
-50
Prob 5-2 The power out of the modulator is 1 watt. A sine wave has a power of 0.5 watts.
Explain why the power is 1 watt.
Ans: The FSK modulator output is complex where the real and imaginary parts are sinusoids and
each have 0.5 watts so that the magnitude of the complex output is 1 watt. See the Figure that
computes the power in the real and imaginary parts of the BFSK modulator output.
46
June 3, 2014
Prob 5-3 Why does the real part not indicate a change in frequency from one symbol to the next
whereas the imaginary does show the change in frequency?
When the symbols change from +200 Hz to -200 Hz the real part is unaffected due to the cosine
term whereas the imaginary part changes sign due to the sine term
Prob 5-4 Modify the Simulink model in Figure 5-10 and reproduce the plot for M=32.
Ans: Change M-ary number sin random intger block ,FSK modulator and FSK demodulator to
32. In the AWGN block select Es/No mode and insert EbNo+10*log10(5). Change the gain
block to 16/31. Use bertool with steps of 2 dB to obtain result in Figure 13.
Prob 5-5 Using the model in Fig 5-16, obtain a BER plot in the range b =0 to 10 dB for MSK
and compare the simulated result to the theoretical MSK BER.
Ans:
47
June 3, 2014
Prob 5-6 In the Simulink model in Figure 5-15 let BT =10, change the GMSK scale to 25 and
compute the power spectrum. How does this result compare to the MSK power spectrum.
Ans
48
June 3, 2014
10
-10
-20
-30
dBW
-40
-50
-60
-70
-80
49
June 3, 2014
Chapter 6 Problems
Prob 6-1 In the Figure 6-16 Simulink model verify that the output of the math function block 1/u
is correct.
Ans Input of math function block has magnitude=0.7275 with an angle = -2.36 radians. Forming
the reciprocal results in a magnitude=1/0.7275=1.3745 with an angle = +2.36 radians. The real
part is then 1.3745 cos(2.36x180/pi)= -0.9757 and an imaginary part
=1.3745sin(2.36x180/pi)=0.9682
Prob 6-2 Retaining ̅̅̅ =10 dB, and the Jakes model with Doppler shift=0.01 Hz,
modify the Figure 6-16 Simulink model to use 0.1 Hz as the maximum diffuse Doppler shift
with the average second path gain X=-100 dB.
a. What is the resulting BER?
b. Repeat this computation for X=- 3dB and determine the BER.
Prob 6-3 Figure 6-16 shows that at the end of the 10,000 second simulation the magnitude of the
main multipath component is 0.7275 and the second component is 1.143. Using a modified
simulation based on the same Rician and AWGN parameter selections, show that over the 10,000
second simulation time, the main component magnitude is on average greater than the second
component magnitude. What is the magnitude of these components after 10,000 seconds in your
simulation
Ans: The blocks labeled mean are running averages in this model.
50
June 3, 2014
The magnitude of the main component is 0.7275 and the second component magnitude is 0.5317
Prob 6-4 Continuing with the simulation developed in Prob 6-3 change the model to use the
second path for AGC . What is the resulting BER and explain the change?
Ans: BER=0.4415. Two issues resulted in a poor BER for this model. First the second path is
weaker than the first path; second the model is not synchronized in time to use the second path.
Prob 6-5 Prove that the null exhibited in Figure 6-13 occurs at 0.25 Hz from the peak.
Ans: The channel impulse response is ( ) () ( ) where a=1/2, D=2 seconds and
s(t) is the BPSK output. The transfer function is then ( ) ( )( ) where S(f) is
the Fourier transform of s(t). The normalized magnitude response is given by
| ( )|
| ( )|
( ) ; the null occurs at f=1/4 Hz
Prob 6-6 Using the Simulink model provided below Compute the spectrum with the parameters
RBW=0.05 Hz, trace options=100 average and frequency options=linear, 50% overlap and
rectangular window
51
June 3, 2014
a. Find the frequency location of the null and explain its location
b. What is the magnitude of the normalized spectrum from Prob 6-5 at zero frequency and
explain?
c. Increase the delay to 4 seconds and determine the location of the null
Ans : The spectrum of the BPSK / channel output is shown next
-8
-9
-10
-11
-12
dBW
-13
-14
-15
-16
-17
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
Frequency (mHz)
a. The channel frequency response is the same as that in Prob 6-5 and the null occurs at
0.25 Hz.
b. The spectrum of the BPSK output is shown next
52
June 3, 2014
-12
-12.2
-12.4
-12.6
-12.8
dBW
-13
-13.2
-13.4
-13.6
-13.8
-14
RBW: 50 mHz, NFFT: 20, Span: 1 Hz, CF: 0 Hz
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
Frequency (mHz)
At zero frequency the BPSK magnitude -12.1 dBW and the spectrum of the
BPSK/.channel output -8.9 dBW. The difference is 3.2 dB. From Prob 6-5 the magnitude
of the normalized response is 2.25 or 3.5 dB.
c. The location of the null is 0.125 Hz and is found by changing the delay to 4 seconds.
53
June 3, 2014
Chapter 7 Problems
Prob 7-1 Change the BFSK tone spacing to 500 Hz and obtain the simulated BER performance
for BFSK in Rayleigh fading assuming noncoherent detection over the range 0 to 25 dB in 2 dB
steps.
Ans
b. Performance shown below agrees with theory; the BER does not depend on the selected
frequency
54
June 3, 2014
0
BFSK in Rayleigh fading 500Hz tone spacing
10
theoretical
-1
10
BER
simulated
-2
10
-3
10
0 5 10 15 20 25
Ave SNR (dB)
Prob 7-2 Using the model in Figure 7-1 with the model parameters used for Figure7-4, obtain the
simulated and theoretical BER performance for BFSK in Rayleigh fading assuming noncoherent
detection with a symbol time of 2 seconds. Explain the result
Ans The BER result given below shows a serious degradation in BER for the simulated case.
The problem is that the Doppler shift must be less than 1/10Ts. For this simulation with 2 second
symbol time 1/10 Ts=1/20. However the simulation was executed with a Doppler shift = 0.5Hz
which is much larger than the minimum 0.05 Hz rendering the results invalid.
55
June 3, 2014
0
BFSK in Rayleigh fading symbol time=2 sec, Doppler shift=0.5 Hz
10
simulated
-1
10
theoretical
BER
-2
10
-3
10
0 5 10 15 20 25
Ave SNR (dB)
Prob 7-3 Execute the model below for binary CPFSK in AWGN
1 bit/symbol,1 sample/symbol
Sample-based
Symbol period= 1 sec
Modulation index =0.75
Simulation time=1500 sec
Random integer seed=37
Input signal power =1 watt
Traceback depth =16
56
June 3, 2014
Ans
a. BER=0.0245
b. The theoretical BER corresponds to coherent BFSK, i.e.
(√ )
-2
10
h=0.75
BER
-3
10
-4
10
-5
10
-6
10
0 2 4 6 8 10 12
Eb/N0 (dB)
c. The theoretical BER for binary coherently demodulated FSK in Rayleigh fading
(T Rappaport Wireless Communications, Principles and Practice,. Prentice Hall
1966,p286) is
[ √ ]
̅̅̅
57
June 3, 2014
h=0.7
h=0.75
-1
10
BER
-2
10
-3
10
0 5 10 15 20 25
Ave SNR (dB)
Prob 7-4 For K=3 and ̅̅̅=10 dB compute the theoretical BER for BFSK in Rician fading with
noncoherent detection. And discuss how it compares to the simulated BER
Ans
̅̅̅̅
( ) ( )
̅̅̅̅
̅̅̅
This result compares favorably to the simulated result of 0.037 obtained with 100 errors
Prob 7-5 Compute the simulated and theoretical BER performance for BFSK in Rician fading for
K=1,3 and 10 with no multipath and a maximum diffuse Doppler shift=0.5 Hz. Assume ̅̅̅ has 2
dB steps ; for K=1 let maximum value of ̅̅̅ =30, for K=3 maximum value of ̅̅̅ =26 and for
K=10 maximum value of ̅̅̅ =16.
Ans.
58
June 3, 2014
0
BFSK in Rician fading (solid =theoretical,markers=simulated)
10
-1
theoretical Rayleigh fading
10
K=1
-2
10
BER
-3
10
K=10 K=3
-4
10
-5
10
0 5 10 15 20 25 30
Ave SNR (dB)
59
June 3, 2014
Chapter 8 Problems
Prob 8-1 a. Find the theoretical BER for the parameters used in Figurer 8-1
b. Using the high SNR approximation find the theoretical BER for the parameters used
in Figurer 8-4 and compare to the simulated result
c. Compute the theoretical result in item b above for ̅̅̅=20 dB using the high SNR
assumption
( )
The simulated result is 2 x10-5 ; the difference results from the approximation where
the SNR is not high enough. In this case the more accurate formula in Appendix A is
needed
c. ( ) ( ) ( ) ( )
̅̅̅
Prob 8-3 Modify the Simulink model in Figure 8-7 to simulate BER results using
maximum Doppler shift values =0.1 Hz and 0.001 Hz for the same range in ̅̅̅ as Figure 8-8 ;
include the theoretical results for diversity 4 and the maximum Doppler shift =0.01 Hz
Ans:
60
June 3, 2014
0
16QAM Rayleigh Fading 2x2 Alamouti STBC
10
-1 Doppler=0.1Hz
10
-2 Theoretical
10
Doppler=0.001Hz Doppler=0.01Hz
BER
-3
10
-4
10
-5
10
-6
10
0 5 10 15 20 25
E /N (dB)
b 0
Prob 8-4 Modify the Simulink model in Figure 8-7 to use 2 transmit antennas and 1 receive
antenna with the following model parameters:
61
June 3, 2014
c. Repeat part b. with Doppler shift = 0.001 Hz and find the BER
Ans
62
June 3, 2014
0
Rayleigh Fading Alamouti Code 2 trans & 1 rcv antenna
10
-4
10
-5
10
0 5 10 15 20 25
Ave SNR(dB)
Chapter 9 Problems
Prob 9-1 a.Find the simulated BER for a BCH(15,11) code with BPSK in AWGN for 6 dB.
b Compare the simulated and theoretical result with uncoded BPSK in AWGN
c. What is the minimum distance of the code?
d. What is the theoretical upper bound?
Ans
a. For 6 dB simulated BCH(15,11) BPSK BER =1.18 x10-3 (simulation time =1,000,000 sec);
b. Simulated BPSK BER(uncoded)= 2.37 x10-3 ; theoretical BER, (√ )= 2.4 x10-3
c. n=24 -1 => m=4; n-k< 4t => t=1 and dmin =3
d. ∑ ( )( ) ( ) with (√ ).
63
June 3, 2014
Prob 9-2 a. Select the binary linear encoder and decoder from the Communications System
Toolbox and construct a Simulink model for the Hamming(7,4) code with BPSK. Use the
Hamming code generator matrix [Beye(4)] with B=[110;011;111;101].Use the same model
parameters as those in the Figure 9-6 Simulink model. Find the BER for =7 dB and compare
the result to the value obtained in the Figure 9-6 Simulink model.
Ans
B=
1 1 0
0 1 1
1 1 1
1 0 1
1 1 0 1 0 0 0
64
June 3, 2014
0 1 1 0 1 0 0
1 1 1 0 0 1 0
1 0 1 0 0 0 1
The simulated BER for =7 dB is 6.4x10-4 and is identical to the simulated BER obtained in the
Figure 9-6 Simulink model
Prob 9-3 Sklar1 has provided an approximate BER for a Golay(24,12) given by
∑ ( ) ( )
Compare the BER with the above formula with the BER presented in Section 9.1 for =6 dB
Ans.
Both the above formula and the upper bound from Section 9.1 give BER=6.09x10 -4
Prob 9-4 Develop a Simulink model for RS(63,57) with 64QAM in AWGN
a. Compare the simulated performance of the RS(63,57) 64 QAM case with uncoded 64
QAM with =14 dB
b. For this code what is the minimum distance and number of correctable errors?
c. Estimate the theoretical BER
Ans
a. BER=3.9x10-4 with =14 dB
1
B Sklar Digital Communications, second ed, Prentice Hall, 2001, p 370
65
June 3, 2014
66
June 3, 2014
Chapter 10 Problems
Prob 10-1 This problem estimates BER results with and without interleaving. Develop a
Simulink model with Rayleigh fading for BCH(31,16) BPSK with a maximum Doppler=0.1 Hz
67
June 3, 2014
68
June 3, 2014
b-d..
0
Rayleigh Fading (0.1 Hz) BPSK
10
-1
10
-2
Theoretical uncoded BPSK
10
BER
-3
10
-5
10
0 5 10 15 20 25 30 35 40
E /N ave (dB)
b 0
Prob 10-2 Develop and display a Simulink model with Rayleigh fading for Hamming(7,4) BPSK
with an general block interleaver [7:-1:1].'
a. Simulate the BER every dB between 0-22 dB with maximum Doppler shifts =0.01 Hz
and 0.1 Hz and compare the BER with theoretical uncoded BPSK
b. Identify the model parameters in a. above
c. Simulate the BER every dB between 0-12 dB with Hamming(7,4) coding and BPSK
assuming a maximum Doppler shifts =0.1 Hz and Alamouti 2x2 STBC; compare with
theoretical uncoded BPSK for diversity=4.
d. Identify the model parameters in c. above
Ans
69
June 3, 2014
0
Hamming (7,4) BPSK Interleaver [7:-1:1].' Rayleigh Fading
10
-1
10
0.01 Hz
BER
-2
10
0.1 Hz
-3
10
-4
10
0 5 10 15 20 25 30
E /N ave(dB)
b 0
70
June 3, 2014
c. Simulink Model for Hamming(7,4) BPSK in Rayleigh Fading with Alamouti 2x2; BER
Performance of BPSK in Rayleigh Fading with Hamming(7,4) code and STBC 2x2
71
June 3, 2014
0
BPSK Rayleigh Fading
10
Hamming(7,4 BPSK
Rayleigh fading (0.1 Hz)
-1
10 Interleaver [7:-1:1].'
Alamouti 2x2
BER
-2
10
-4
10
0 2 4 6 8 10 12 14
E /N ave(dB)
b 0
Chapter 11 Problems
Problem 11.1
In the Simulink model in Figure 11.4 for the convolutional code with K=7 and soft decisions
change the traceback depth from 48 to 32 and 10 and determine BER for Eb/No in the range
from 0 to 4 dB with 100 errors for all three cases.
Ans
73
June 3, 2014
Problem 11.2 Find the simulated BER for the convolutional code K=9 with feedback taps [561
753] for Eb/No in the range from 0 to 5 dB. Assume AWGN with coherent BPSK, the traceback
depth =56 and hard decisions. List the Simulink model parameters and determine the upper
bound from the bertool.
Ans
74
June 3, 2014
75
June 3, 2014
Problem 11.3 Using the Simulink model in Figure 11-9 for soft decisions and the associated
Simulink model parameters obtain the BER in Rayleigh fading with a stop criterion of both 100
and 200 errors for Eb/No values between 0 and 12 dB in 1 dB steps. List the Simulink model
parameters.
Ans
77
June 3, 2014
Problem 11.4 Using the Simulink model in Figure 11-9 for soft decisions and the associated
Simulink model parameters obtain the BER in Rayleigh fading with a stop criterion of 200
errors for Eb/No values between 0 and 12 dB in 1 dB steps with both 0.1 and 0.01 maximum
Doppler shift. List the Simulink model parameters.
Ans
78
June 3, 2014
79
June 3, 2014
Problem 11.5 Modify the Simulink models in Figures 11-8 and 11-9 to incorporate 28x28
interleaving. Obtain the BER for hard and soft decisions in Rayleigh fading and compare the
results with 14x14 interleaving. Display the Simulink models for hard and soft decisions. List the
Simulink model parameters.
Ans
80
June 3, 2014
The Simulink model parameters for the hard decision Simulink model are listed as follows
Model Parameters for rate ½ ,K=7 convolutional code BPSK in Rayleigh Fading & AWGN
(hard decisions)
• BPSK antipodal signals =+1 and -1 (M=2)
• Feedback taps [171 133 ]
• Symbol period =0.5 sec
• Frame-based with 392 samples/frame
• Simulation time=stop with 200 errors
• Bernoulli binary probability of zero=0.5
• Input signal power = 1 watt
• Delay for error rate computation = computation delay= 48 sec
• Jakes with Maximum Doppler shift =0.1 Hz
• Interleaver 28x28
• Receive delay=0
• Traceback depth=48
• Es/No=Eb/No+10log(1/2)
The Simulink model parameters for soft decisions are listed as follows
Model Parameters for rate ½ ,K=7 convolutional code BPSK in Rayleigh Fading & AWGN
(3 bit soft decisions)
• BPSK antipodal signals =+1 and -1 (M=2)
• Feedback taps [171 133 ]
• Symbol period =0.5 sec
• Frame-based with 392 samples/frame
• Simulation time=stop with 200 errors
• Bernoulli binary probability of zero=0.5
• Input signal power = 1 watt
• BPSK soft demod noise variance= 1/(10^((EbNo-10*log10(2))/10))
• Delay for error rate computation = computation delay= 48 sec
• Jakes with Maximum Doppler shift =0.1 Hz
• Interleaver 28x28
• Receive delay=0
• Traceback depth=48
• Es/No=Eb/No-10log(2)
• [-3:3]*1.9 quantizer boundary points with output unit8
81
June 3, 2014
82
June 3, 2014
Problem 11.6 Using the Simulink model in Figure11-9 for soft decisions and the associated
Simulink model parameters obtain the BER with a stop criterion of 200 errors for Eb/No values
between 0 and 10 dB in 1 dB steps where the Rayleigh fading channel is replaced with a Rician
channel using the Rician parameters listed below. Show the model and plot the BER for both the
Rayleigh and Rice cases.
Ans
83
June 3, 2014
Problem 11-7 Replace the Simulink models in Figures 11-12 and 11-13 with Alamouti STBC
2x1. Compute the BER for this case and compare the results with STBC 2x2. List the Simulink
model parameters and display the hard and soft decision models including the STBC 2x1 model
Ans
84
June 3, 2014
85
June 3, 2014
86
June 3, 2014
87
June 3, 2014
Chapter 12 Problems
Problem 12-1 Change the scale factor in the Simulink model from 0.01 to a) 0.1 and b) 0.001.
Plot the error magnitude and the real part of the center tap coefficient as a function of time and
compare the results to the case with the 0.01 scale factor
Ans
88
June 3, 2014
Faster convergence with 0.1 scale factor compared to 0.1 scale factor and slower
convergence with 0.001 scale factor compared to 0.1 scale factor
Faster convergence with 0.1 scale factor compared to 0.1 scale factor and slower
convergence with 0.001 scale factor compared to 0.1 scale factor. Accuracy of
coefficient value is reduced with faster scale factor.
Problem 12-2 Modify the Simulink model in Figures 12-4 - 12-6 to use a two tap
adaptive LMS equalizer with p=0 for synchronization and coefficients c o and c1
89
June 3, 2014
Ans
{ } { [ ( ) ]}
{ }
[ ][ ] [ ]
[ ] [ ]
90
June 3, 2014
Real part of c1
91
June 3, 2014
Real part of c0
92
June 3, 2014
Problem 12-3 Modify the Simulink model in Figure 12-24 to implement a channel with
multipath gains (1 0.5). Using the bertool obtain the BER for the linear LMS and decision
feedback equalizers and compare the results to the channel with no multipath
Ans
Problem 12.4 Construct a Simulink model to compare the performance of the RLS decision
feedback equalizer from the Simulink library with the linear RLS equalizer assuming BPSK
modulation over a two path multipath channel with multipath gains=[0 -3] dB and delay
vector=[0 1] sec.
Assume that the RLS decision feedback equalizer has 8 feed forward and 8 feedback taps with a
0.9 forgetting factor. Assume that the linear RLS equalizer has 8 taps with 0.8 forgetting factor .
Use 10 samples/frame, 1 second symbol time,1 sample/sec
93
June 3, 2014
a. Execute the Simulink model for 10,000 sec with Eb/No=15 dB and display the model
b. List the Simulink model parameters
c. Plot the source output, the RLS linear equalized BPSK demodulator output and the RLS decision
feedback equalized BPSK demodulator output to demonstrate that proper synchronization has
been achieved
d. Plot the theoretical BPSK BER with no multipath, the BER from the BPSK demodulator output
with linear RLS equalization and the BER from the BPSK demodulator output with decision
feedback RLS equalization. Assume 2 dB steps and use a range of Eb/No values between 0 and
24 dB.
Ans
Eb/No=15 dB
The Simulink model parameters for this example are listed as follows:
94
June 3, 2014
Model Parameters for Linear RLS and Decision Feedback RLS Equalizers
Rayleigh fading Two path channel ;delay vector=[0 1] sec; multipath gains=[0 -3] dB
95
June 3, 2014
96
June 3, 2014
97