Experiment 2 : DSB-SC Modulation and Demodulation
Objective: DSB-SC Modulation and Demodulation
Description: In this experiment you will design an
analog modulator and an analog demodulator. Both simple multiplier
type and nonlinear element type Modulators/Demodulators will be
constructed. You will compare the received signal with the transmitted
signal and also study the effect of phase shift at the demodulator.
The carrier frequency will be 500kHz, which is in the commercial AM
radio frequency range. The signal bandwidth will be 20kHz, which is
the bandwidth needed for high quality music. (Actual systems may use a
smaller bandwidth.)
Instructions
-
0. Recall:
- Recall that you need to set the simulation parameters T_SIM and
T_SAMPLE (as you did in the first experiment).
- It would be a good idea to read the instructions for experiment 1
before starting.
- Save your models in separate .mdl files as you finish each part of
the experiment.
-
I. Initialization:
Copy the initialization files for the
experiment into your Matlab working directory.
Note: You have to do the
initialization again since the initialization files are different from
those used in Experiment 1.
The following constants should be set by the startup
file. Use who in the matlab workspace to check if the
constants are all there. Some additional constants may also be set,
but you can ignore them.
- F_CARR = 2*pi*5e05 ----------Carrier Frequency, rad/sec
- T_PERIOD = 2*pi/F_CARR --------Time period of carrier
- T_SAMPLE = T_PERIOD/4.01 ----Sampling period used in Simulink
- FFT_NUM_PTS = 4096 ----------Number of points used for FFT
- T_SIM = FFT_NUM_PTS*T_SAMPLE ------Time of simulation
- NUM_SAMPLES = T_SIM/T_SAMPLE ------Total number of samples
- BW_MESSAGE = 2*pi*2e04 ------Message Bandwidth.
- F_CUTOFF = BW_MESSAGE*2 -----Cutoff frequency of lowpass Butterworth filter
- F_BAND_LOW = F_CARR-F_CUTOFF -----Lower cutoff of bandpass Butterworth filter
- F_BAND_HIGH = F_CARR+F_CUTOFF ----Higher cutoff of bandpass Butterworth filter
- a_NONLIN = 2 ----------Linear component of Nonlinear Device.
- b_NONLIN = 1 ----------Quadratic component of Nonlinear Device.
To speed up your block selection, the library ece359lib also has
standard blocks from the simulink menu.
- II. Multiplier Modulator/Demodulator: As in
Figure 4.1 of the book
- Select the Message Signal block form the ece359lib
library. This block produces a signal m(t)
band-limited to BW_MESSAGE.
- Multiply this signal by a unit magnitude sinusoid at frequency
F_CARR (rad/sec). It's okay to use a sine
wave rather than a cosine wave (that we used in class), as long as you
use the same sinusoid at the demodulator. The multiplier
output is the modulated signal s(t) (the
greek symbol phi(t) was used in
class, but here s(t) is used instead).
- Now construct a multiplier demodulator. Use a Butterworth lowpass
filter with cutoff F_CUTOFF, and order 5 for the
demodulator.
- Adjust the demodulator oscillator amplitude (i.e. use a factor of
2) to make the demodulator output v(t)
equal in amplitude to the input m(t).
- Look at the Fourier transforms of m(t), s(t),
v(t). Use the scope block to
see the time characteristics of the signals.
- III. Nonlinear Modulator/Demodulator Figure 4.3
of text. (You need to design the demodulator structure using the same
nonlinear device.) This might be a big simulink model, refer to this link for additional help.
- For the same input signal m(t) as in
II, implement the nonlinear device based modulator of Figure 4.3 of
the text.
- Use a Butterworth order 3 band-pass filter with the parameters
F_BAND_LOW, F_BAND_HIGH for the modulator. The nonlinear
device may be obtained from ece359lib/Nonlinear Block. It has
parameters a_NONLIN and b_NONLIN which have been preset to 2 and 1,
respectively.
- Implement a nonlinear device based demodulator
without using any
multipliers. Hint: The demodulator has a
structure very similar to that of the modulator, except that it has a
lowpass filter at the end. Use the lowpass filter of II.
- Obtain the Fourier transforms of m(t), s(t),
v(t). Use the scope block to see
the time characteristics of the signals.
-
IV. Phase Offset: Study the effect of phase offset
between the carrier and the receiver.
- Use the setup of part II, but for m(t), use a sinusoid with frequency
BW_MESSAGE/5 instead of the random Message
Signal. You do not need the Fourier transform blocks for this
part.
- Give the receiver oscillator phase offsets with respect to the
transmit oscillator in the range from 0 to pi in steps of
pi/4. Reminder Matlab accepts the pi
symbol, no need to give the decimal approximation 3.14.
- Observe time domain characteristics of the received signal. Note
the level of attenuation (with sign) of the received signal for
different phase shifts. You must measure the attenuation using
the scope. The Fourier transformer
does not preserve the sign. (A rough estimate of the
attenuation, obtained by looking at the scope will suffice).
- Plot the attenuation vs. phase shift. (Note the
attenuation in a table and feed the data into Matlab to make a plot.)
Take more phase offset values if needed.
Questions
- Write the equations relating m(t), s(t),
v(t). in II. (that is write the other two in terms of m(t)
) Verify your simulation results. You do not need to submit any
plots for this part.
- Submit a block diagram of II.
- Submit a block diagram of III. Label any ambiguous components.
- Write the equations relating m(t), s(t),
v(t) in III. Your equations should explain the working of the
demodulator.
- Give plots of both m(t) and v(t) for
III. Also give plots of the Fourier transforms of m(t), s(t) and v(t).
- Explain with equations the phase-attenuation plot obtained in
IV. Submit this plot.
- Print the Fourier transform of the demodulated signal of part IV
when phase shift is pi/2. Do you see anything unusual? Explain what
you see.
- Using the setup of part IV, and phase offset zero, show the
transmitted signal with a solid line and the received one with a
dashed line on the same plot. See scope
for details. Comment on the delay between the two signals.
Extra credit - Can you justify the value of this
delay?
ECE 359 home