Professional Documents
Culture Documents
4 1
4.1 OBJECTIVE
The study will focus on simulating digital modulation and demodulation
techniques: PAM (Pulse Amplitude Modulation), PWM (Pulse Width
Modulation) and PPM (Pulse Position Modulation).
Fig. 4.1 Comparison of sine and square signal waveform and spectrum
Fig. 4.2 Waveforms for the PAM, PWM and PPM signals
For PWM, on the other hand, the pulse duration varies depending on the
message (amplitude) of each sample. It can be seen that, when the message
signal amplitude is negative, the duration of each pulse is shorter (the duty factor
is below 50%), while for positive values of m(t) we obtain a longer duration for
the pulses.
When modulating the PPM signal, the position of each pulse will change,
relative to the same information.
4 INTRODUCTION TO DIGITAL COMMUNICATIONS
Practical assgnments:
1. Run the simulation, then open the scope and compare the waveforms
for the three signals. You should get the same result as in Fig. 4.6.
Note that for the entire width of each pulse, it displays the same
waveform as the message signal. This is the result of natural
sampling.
2. Open the Simulink Library Browser, then go to DSP System Toolbox
-> Filtering -> Filter Implementations and drag the Analog Filter
Design block from this category to the model. Now go the the filter’s
parameters and set Design method to Butterworth, Filter type to
Lowpass, Filter order to 8 and Passband edge frequency to
2*pi*2000 rad/s.
Question: What is the maximum cutoff frequency we can use for an ideal/real
LPF, if we can sample at a 10KHz rate?
Practical assgnments:
3. Connect the input of the filter to the output of the sampler. Then, open
the scope, go to View -> Configuration Properties and change the
number of input ports from 3 to 4. You can now connect the output of
the Analog Filter Design block to the fourth input to the scope. Don’t
forget to change the layout of the scope to 4 rows.
If you couldn’t configure the model by following the previous indications,
you can open the PAM_demod.slx model.
Practical assgnments:
4. Run the simulation and compare the demodulated signal (fourth plot)
with the original message. You should get the same result as in Fig.
4.7. Is the reconstructed waveform identical to the original? What
about the amplitude?
8 INTRODUCTION TO DIGITAL COMMUNICATIONS
Practical assgnments:
5. Go to the parameters of the Pulse generator block and change the pulse
width to 5% and repeat the simulation. Keep an eye on the
reconstructed signal. Now change the pulse width to 75%. What
happens to the demodulated signal amplitude? Can you explain why?
6. Now set the pulse width back to 25% and repeat the simulation, this
time by changing the message signal frequency to: 1500, 2000, 2200
KHZ. What happens this time?
7. Set the message signal frequency back to 1KHz and add an Averaging
Power Spectral Density block (from the Library Browser) and set its
buffer length to 1024, No. of fft points to 4096, plot after 64 points,
sample time 8e-6. Change the simulation time from 2 to 12 ms.
Connect the input of this block to the output of the sampler and run the
simulation. Can you identify the original message signal, and the first
DSB replica?
ANALOG AND DIGITAL COMMUNICATIONS – LAB. 4 9
Practical assgnments:
8. Change the analog filter design type to Bandpass, and the lower and
upper edge frequencies to 2*pi*8000 and 2*pi*12000 and run the
simulation. What can you say about the waveform of the signal you
obtain after this filtering stage? Is it a baseband or a modulated signal?
If it is modulated, what would the carrier frequency be?
Now open the PAM_SH.slx model file, also depicted in Fig. 4.8. The
model is similar to the previous, the only difference being the block usedfor
sampling. This time, we use a sample&hold method.
Practical assgnments:
9. Repeat steps 2-7 with the sample/hold model and and compare the
results.
10 INTRODUCTION TO DIGITAL COMMUNICATIONS
To generate a PWM signal, one has to compare the message signal with an
carrier signal, that is typically a triangle (or sawtooth) waveform with the
frequency greater (10 times or more) that the message signal frequency.
Question: Why do we typically generate a PWM signal by comparing the
message signal with a triangle waveform?
Hence, for this exercise we are going to create, in Simulink, a model that has a
repeating triangle sequence block with the frequency 10 time higher than the
message signal, sine wave) waveform. We are going to compare this triangle
sequence with the sinewave and the resulting signal should be the PWM signal.
For this part of the lab load the PWM.slx model, Figure 4.8. In the model we
have a Repeating sequence that we use to generate the triangle waveform. The
frequency of the triangle waveform is 104 Hz and the amplitude of 1V. The
Message signal is a sine wave with a frequency of 103 Hz and amplitude of 0.9
V.
Run the PWM.slx simulink model for 1ms and configure the model
configuration parameters to a Fixed Step Solver with a Fundamental Sample
time of 2e-6. In Figure 4.9 the output of the PWM Simulink Model is presented.
Question: Explain the PWM model waveforms from Figure 4.9?
ANALOG AND DIGITAL COMMUNICATIONS – LAB. 4 11
Fig. 4.9 PWM Signal (top), Message Signal (sine wave) and Triangle Wave
(bottom)
Practical assgnments:
9. Increase/Decrease Amplitude of the Message signal. Explain the
results.
10.Increase/Decrease the Frequency of the Message signal. Explain the
results.
11.Increase/Decrease the Frequency of the triangle waveform. Explain the
results.
12.Increase/Decrease Amplitude of the Message signal. Explain the
results.
13.Inverse the triangle waveform (i.e start with the positive peak). Explain
the results.
14.Replace the sine wave block with a Signal Generator block and run the
model for different types of signal. Explain the results
12 INTRODUCTION TO DIGITAL COMMUNICATIONS
starting from the same point as the rising edge of the input signal, with an widith
of 5 µs.
Run the PPM.slx simulink model for 1ms and configure the model configuration
parameters to a Fixed Step Solver with a Fundamental Sample time of 2e-6. In
Figure 4.x the output of the PPM Simulink Model is presented.
Question: Explain the PPM model waveforms from Figure 4.11?
Fig. 4.11 PPM Signal (top), Message Signal (sine wave) and Sawtooth Wave
(bottom)
Practical assgnments:
15.Increase/Decrease Amplitude of the Message signal. Explain the
results.
16.Increase/Decrease the Frequency of the Message signal. Explain the
results.
17.Increase/Decrease the Frequency of the sawtooth waveform. Explain
the results.
18.Increase/Decrease Amplitude of the Message signal. Explain the
results.
19.Is the presented model also a PPM generator? Demonstrate why it is or
why it isn’t.
20.Re-run the Simulink model for other message waveforms. Explain the
results