Procedure: Introduction To SIMULINK AM Modulation and Demodulation
Procedure: Introduction To SIMULINK AM Modulation and Demodulation
1. What is SIMULINK?
Simulink is a software package that enables you to model, simulate, and analyze systems
whose outputs change over time. Such systems are often referred to as dynamic systems.
Simulink can be used to explore the behavior of a wide range of real-world dynamic
systems, including electrical circuits, shock absorbers, braking systems, and many other
electrical, mechanical, and thermodynamic systems.
Simulating a dynamic system is a two-step process with Simulink. First, a user creates a
block diagram, using the Simulink model editor, which graphically depicts time-
dependent mathematical relationships among the system’s inputs, states, and outputs. The
user then commands Simulink to simulate the system represented by the model from a
specified start time to a specified stop time.
Start up the Matlab (We use Matlab version 6.5.1 in this and the following experiments.),
type “simulink” (small letters!!) in the command window.
Fig. 1
1
EE423 Lab #2.
In the “Simulink Library Browser” window, click “File”-> “New” -> “Model”
Fig. 2
2
EE423 Lab #2.
Example 1:
Simulate Sine wave f (t ) = sin( 1000 * 2π * t )
Fig. 3
3
EE423 Lab #2.
Fig. 4
Fig. 5
4
EE423 Lab #2.
Fig. 6
Fig. 7
Fig. 8
5
EE423 Lab #2.
Example 2:
Use the “FFT” block as Spectrum Analyzer
1. Refer to Fig. 9 to set the diagram. To add “B-FFT”, choose “DSP Blockset” ->
“DSP Sinks” -> “FFT Spectrum Scope”. Use Fig. 10 and Fig. 11 to set “FFT
Scope”. After you finish setting, the “FFT Scope” becomes “B-FFT Scope”.
2. To draw a line from an existing line to the spectrum scope, keep pressing “Ctrl”
button and then use the similar procedure of example1.
3. Use Fig. 4, Fig. 5 and Fig.7 to set environment and Sine source parameters.
4. Run the program and you should see the spectrum as shown in Fig. 12
Fig. 9
6
EE423 Lab #2.
Fig. 10
Fig. 11
7
EE423 Lab #2.
Fig. 12
8
EE423 Lab #2.
Example 3:
Product of Two Sine Waves
Fig. 13
9
EE423 Lab #2.
Fig. 14
Fig. 15
10
EE423 Lab #2.
Fig. 16
Fig. 17
11
EE423 Lab #2.
v AM (t ) = Vc [1 + ms (t )] cos ωc t
Vc V mV c mV c
V AM (ω) =δ (ω − ωc ) + c δ (ω + ωc ) + S (ω − ωc ) + S (ω + ωc )
2 2 2 2
where s (ω −ωc ) is the Fourier transform of s (t ) .
AM modulated Demodulated
|u(t)| BPF
signal u(t) signal s(t)
12
EE423 Lab #2.
Fig. 18
13
EE423 Lab #2.
There is another method of demodulating AM signal other than the envelope detection
we used for part 5, called synchronous detection. The demodulation process is
multiplying V AM (t ) by cos ωc t :
V c [1 + ms (t )] V c [1 + ms (t )]
VAM (t ) * cos ωc t = + cos 2ωc t
2 2
Vc ms (t )
After low pass filtering and DC blocking, we get the output signal which is
2
proportional to the original signal.
This demodulating scheme can be viewed as:
14
EE423 Lab #2.
The 2 carrier signals are the same, as well as the two BPFs. Add a Mux to compare the
demodulated signals by using 2 methods respectively. Include all scope output plots in
your lab reports.
6. Questions:
Only one question in this experiment, but may be challenging:
In example3, we choose 1/51200 as the sample time. Change it to 1/50000 to see the
difference in frequency domain. Print out figures for these two cases and explain why
this difference happens.
15