Professional Documents
Culture Documents
Starting Simulink
>> simulink
Alternatively, you can hit the Simulink button at the top of the MATLAB
window as shown in figure (1).
Basic Elements
There are two major classes of items in Simulink: blocks and lines. Blocks
are used to generate, modify, combine, output, and display signals. Lines are used
to transfer signals from one block to another.
1. Blocks
There are many libraries in Simulink Library Browser, in turn; each of them
contains many classes of blocks. One of the commonly used libraries is Simulink.
There are several general classes of blocks within the Simulink library such
that:
Blocks have zero to several input terminals and zero to several output
terminals. Input terminals are indicated by a small open triangle. Output terminals
are indicated by a small triangular point. The block shown in figure (4) has one
input terminal on the left and one output terminal on the right.
Figure (4) Abs Block with one input terminal and one output terminal
2. Lines
Lines transmit signals in the direction indicated by the arrow. Lines must
always transmit signals from the output terminal of one block to the input terminal
of another block. On exception to this is a line can tap off of another line, splitting
the signal to each of two destination blocks.
Lines can never inject a signal into another line; lines must be combined
through the use of a block such as a summing junction.
The simple model shown in figure (5) consists of two blocks: Sine Wave,
and Scope blocks. The Sine Wave is a Source block from which a sine wave input
signal originates. This signal is transferred through the line in the direction
indicated by the arrow to the Scope block. The Scope is a Sink block used to
display a signal much like an oscilloscope.
Modifying Blocks
Where: A = 0, ω = 2*π*f = 1, ϕ = 0.
Running Simulation
Note that the simulation is at a very low level relative to the axes of the
scope. To fix this, hit the autoscale button (binoculars), which will rescale the
axes.
Simulink simulated the system for ten seconds even though the system had
not reached steady state. To correct this, you need to change the parameters of the
simulation itself. In the model window, select Configuration Parameters from
the Simulation menu. You will see the dialog box shown in figure (9).
Signal Routing Mux Combine several input lines into a vector line.
Procedure:
o x(t) = sin(t+20)*2.5cos(3t)
o x(t) = [1+sin(3t)]cos(40t)
o x(t) = 2+sin(2πt+40)
2. If x(t) = 3sin(4t), and y(t) = 4cos(40t), display both of signals on the same
axis of Scope block.
3. For the above question, change the sampling time of Sine Wave block to
0.001 and the stop time of simulation to 20. What is the effect of sampling
time on the speed of simulation and the shape of signals that are displayed
in Scope window.
Object:
Apparatus:
1. CM6 Panel.
3. Oscilloscope.
Theory:
The high frequency sinusoidal signal that is used in the modulation is known
as the carrier signal, or simply "the carrier". The low frequency signal that is used
in modulating the carrier signal (or sinusoidal signal) is known as the "data signal"
or the "message signal" or “modulating signal” or “Baseband signal”. It is
important to notice that a simple sinusoidal carrier contains no information of its
own.
Xc (t) = Ac sin(ωc t + φc )
The symbols Ac, ωc and φc all represent parameters that can be modulated in
the carrier waveform in order to carry information. According to these parameters,
there are three types of modulation: Amplitude modulation, Frequency
modulation, and Phase modulation.
Types of Modulation
1. Amplitude modulation
2. Frequency modulation
3. Phase modulation
A type of modulation where the phase of the carrier signal (φc) is varied
accordance to the message signal.
Where:
𝑉𝑚𝑎𝑥 − 𝑉𝑚𝑖𝑛
𝑚=
𝑉𝑚𝑎𝑥 + 𝑉𝑚𝑖𝑛
It is e asily verified that AM is not linear since it does not satisfy the
superposition principle. However, it is incrementally linear, i.e. an increment of
the input is linearly related to an increment of the output.
𝐴𝑚
If S(t) = Am cos(ωm t) then m=
𝐴𝑐
And
1
XAM (t) = Ac cos(ωc t) + Ac ∗ m ∗ [ cos(ωc + ωm ) + cos(ωc − ωm )]
2
1 1
XAM (t) = Ac cos(ωc t) + Ac ∗ m ∗ cos(ωc + ωm ) + Ac ∗ m ∗ cos(ωc − ωm )
2 2
The first term of the above equation has no information to transmit, and
represent the carrier signal only. The second and third term represent the upper
and lower sideband respectively. The upper and lower sideband have the same
information.
Figure (2) show the spectrum of the XAM signal. It is apparent that the
bandwidth B of the modulated signal is twice the bandwidth of the baseband
signal.
B = 2*fm
Procedure:
1. Connect +12V, -12V & GND from master unit to banana socket 1, 3 & 2
respectively.
2. Ensure that all switch faults are in OFF position.
3. Apply audio input 1 kHz, 200 mVp.p. Sinewave from audio generator to
socket 12 from DTFFG III.
4. Apply carrier input 500 kHz, (keep Time/div. = 2 µs and set 1 div.), 2 Vp.p.
sinewave from DTFFG III function generator to socket 16.
5. Keep switch SW1 at TC (Transmitted Carrier) position.
6. Connect CRO between socket 11 & 32 (i.e. GND) & draw the modulated
output (DSB-LC).
7. Take measurements & determine the modulation index.
2. Use sine wave generator for message signal with the following information:
Am = 0.5 Vp, ωm = 2π*(2000) rad/sec and zero for other parameters.
3. Use sine wave generator for carrier signal with the following information:
AC =1 Vp, ωC = 2π*(50000) rad/sec and zero for other parameters.
4. Set stop time = 0.001, and Max step size = 0.001 / 2048.
Discussion:
1. Define modulation.
3. Define:
a) The circuit that causes one signal to modulate another, and give the
names of the two signals applied to this circuit.
b) What is the name given to the new signals generated by the modulation
process.
4. Are these statements true or false. Explain your answer
6. Explain the reason for making the modulation index (m) less than unity in
DSB_LC modulation.
Am
Vmax Vmin Ac
Xm(f)
f
-fm fm
XAM(f)
f
-fc fc - fm fc fc + fm
S(t)
XAM(t)
DC Ac cos(ωc t)
Scope1
message
multiply Scope
0.75
Constant
carrier
Object:
Apparatus:
1. CM6 Panel.
3. Signal Generator.
4. Oscilloscope.
Theory:
There exist several techniques for AM demodulation. They fall into two
different classes: Synchronous (Coherent) demodulation and Non Coherent
demodulation.
A. Coherent demodulation:
B. Non-Coherent demodulation:
During the negative half cycle, there is no conduction in the diode but the
output voltages is maintained by the capacitor which discharge of the capacitor
depends upon the time constant (RC). This means that the time constant of the
circuit must be much larger than the period of the carrier (1/fc). On the other hand,
the circuit should not distort the information signal S(t). This implies that the time
constant must be smaller than the period of the highest frequency present in the
signal (BW).
1 1
> RC ≫
Bw fc
If the above condition is satisfied, the signal obtained at the output will be
proportional to the envelop of the AM signal XAM(t). Here again, a dc blocking
capacitor is needed to eliminate the dc value present in the demodulated signal.
Procedure:
1. Connect +12V, -12V & GND from master unit to banana socket 1, 3 & 2
respectively.
2. Make connections as per wiring sequences as shown in fig. (2).
3. Ensure that all switch faults are in OFF position.
4. Keep TC/SC switch i.e.sw1 @ TC position.
5. Apply audio input (sinewave @ 1 kHz, 200 mVp.p.) to socket 12 from
DTFFG III (audio frequency generator) from master unit.
6. Apply carrier input (500 kHz, sin 6 Vp.p. - Time/div = 2 µs and set 1 div), to
socket 16 from master unit function generator (DTFFG III).
7. Draw demodulated output at socket 31.
8. Vary applied audio around 1 kHz & confirm its being received at
demodulated output.
Discussion:
2. Derive a relationship between the time constant RC, and modulation index.
Object:
Apparatus:
1. CM6 Panel.
Theory:
In AM, we spend more than half of the total power transmitting a carrier
that conveys no information. When cost is not of prime importance, but making
the best use of a limited transmitter power is, for example when a single
transmitter serves only a few receivers, suppressed carrier modulation is
preferred. Examples occur in military, industrial, and amateur radio
communication systems. The DSB-SC transmits just the sidebands without
transmitting the carrier, but demodulation is more difficult.
Ac Am
XDSB−SC (t) = [cos(ωc + ωm ) + cos(ωc − ωm )]
2
As seen in the above equation, the DSB-SC signal contains only the upper
and lower sidebands and there is no carrier.
Except for a missing impulse, the spectrum of DSB-SC and the one of AM
look alike, however, in the time domain, this is a fundamental difference. The
DSB-SC envelope and phase are given by:
0 s(t) > 0
r(t) = AC |s(t)| φ(t) = {
π s(t) < 0
As shown in figure (1), every time the message signal s(t) changes sign, the
modulated signal Undergoes a phase reversal. Therefore, the DSB-SC signal
cannot be demodulated with a simple envelope detector.
Procedure
1. Connect +12V, -12V & GND from master unit to banana Socket 1, 3 & 2
respectively.
3. Apply audio input 1 kHz, 1.5 Vp.p. sinewave from audio generator to socket
12 from DTFFG III.
4. Apply carrier input 600 kHz, (keep Time/div.= 0.5 µs and set 3.3 div.),
1.5 Vp.p. sinewave from DTFFG III function generator to socket 16.
6. Connect CRO between socket 11 & 32 i.e. GND & draw the modulated
output (DSB-SC).
2. Use sine wave generator for message signal with the following information:
Am = 1 Vp, ωm = 2π*(2000) rad/sec and zero for other parameters.
Analog Communication Lab. 29
Experiment No. (4) Double Sideband Suppressed Carrier (DSB-SC)
3. Use sine wave generator for carrier signal with the following information:
AC =3 Vp, ωC = 2π*(50000) rad/sec and zero for other parameters.
Discussion:
a. Modulation index.
b. Carrier frequency.
c. Message frequency.
15
10
-5
-10
-15
0 0.5 1 1.5 2 2.5 3 3.5 4
Object:
Apparatus:
1. CM6 Panel.
2. Master Unit.
3. Signal Generator.
4. Oscilloscope.
Theory:
1. Carrier is transmitted.
3. Carrier is recovered from the received signal using phase looked loop
(PLL).
Procedure:
1. Connect +12V, -12V & GND from master unit to banana socket 1, 3 & 2
respectively.
2. Make connections as per wiring sequence & set up as shown in fig. (1).
5. Apply audio input (sinwave @ 1kHz, 1.5 Vp.p.) to socket 12 from DTFFG
III (audio frequency generator)
6. Apply carrier input (600 kHz, sin 1.5 Vp.p.- keep Time/div.= 0.5 µs & set
3.3 div.) to socket 16 from master unit function generator (DTFFG III).
2. Use sine wave generator for message signal with the following information:
Am = 1, fm = 2*pi*3000 rad/sec and zero for other parameters.
3. Use sine wave generator for carrier signal with the following information:
Ac = 1, fc = 2*pi*40000 rad/sec and zero for other parameters.
4. Use sine wave generator for synchronous carrier with the following
information: AS=1, fS = 2*pi*40000 rad/sec and zero for other parameters.
6. Set the simulation parameters as (N=2048, Max step size =0.003/N, stop
simulation time=0.003)
Discussion:
2. With the aid of equations, Explain the effect of phase shift (ΔΦ) of the local
oscillator at homodyne receiver for DSC-SC demodulation.
5. Derive the equation to get the message from DSB-SC signal using
homodyne receiver.
6. What is the relation between carrier frequency of received signal and the
intermediate frequency of super-heterodyne receiver.
message Scope4
butter
1 Scope7
Analog
carrier synch. carrier Filter Design
Object:
Apparatus:
1. CM6 Panel.
2. XPO-COM Master Unit.
3. Signal Generator.
4. Oscilloscope.
Theory:
There is more than one way to generate SSB carriers. One method is to use
a DSB-SC modulator and then eliminate one sideband (either the lower or the
upper) with a filter as shown in figure (1) and it is called "filter method". That
method is conceptually simple but has a significant drawback. The filter can be
challenging to design: it must have a quite sharp roll - off that will pass the one
sideband but reject the other sideband that is just the other side of the carrier
frequency. SSB modulated signal can be generated by a different method. This
method is known as the "phasing method", and it incorporates a Hilbert
transform as shown in figure (2).
Procedure:
1. Connect +12V, -12V & GND from master unit to banana socket 1, 3 & 2
respectively.
2. Make connections as per wiring sequence & set up as shown in fig. (2).
6. Apply audio input (sin wave @ 1 kHz, 1.5 Vp.p.) to socket 4 & 20 i.e. audio
output from DTFFG III (audio frequency generator).
7. Apply carrier input (600 kHz, sine 1.5 Vp.p. - keep Time/div =0.5 µs and set
3.3 div.) to socket 9, 24 from master unit function generator (DTFFG III).
9. You will get sinewave which frequency = carrier-audio (i.e. lower side
band).
1. Connect +12V, -12V & GND from master unit to banana socket 1, 3 & 2
respectively.
2. Make connections as per wiring sequence & set up as shown in fig. (3).
7. Apply carrier input (600 kHz, sin 1.5 Vp.p. - keep Time/div =0.5 µs & set
3.3 div.) to socket 9 & 24 from master unit function generator (DTFFG III).
2. Use sine wave generator for message signal with the following information:
Am=3, ωm = 3 rad/sec and zero for other parameters.
3. Use sine wave generator for carrier signal with the following information:
Ac=4, ωc = 40 rad/sec and zero for other parameters.
Discussion:
1. Compare between Phase method and Filter method that are used in SSB
modulation.
2. Comment on the condition that must be satisfied by the SSB filter in filter
method and the phase changer in phase method.
3. Show with the aid of equations and block diagram the generation of (USB)
signal by using phase shift method.
6. Explain what Hilbert Transform is, and how we use it to generate SSB
signal.
S(t)
AC cos(ωct)
Object:
Apparatus:
1. CM-7 panel.
3. Function Generator.
4. Oscilloscope.
Theory:
Am
Xfm = Ac cos[ωc t + k f sin(ω𝑚 t)]
ω𝑚
Where,
𝜃(𝑡) = ωc 𝑡 + mf ∗ sin(ω𝑚 𝑡 )
1 𝑑Ɵ(𝑡) 1 𝑑
𝐹𝐼𝑛𝑠 = ∗ = ∗ [2𝜋𝑓𝑐 𝑡 + 𝑚𝑓 sin(2𝜋𝑓𝑚 𝑡)]
2𝜋 𝑑𝑡 2𝜋 𝑑𝑡
= 𝑓𝑐 + 𝑓𝑚 ∗ 𝑚𝑓 cos(2𝜋𝑓𝑚 𝑡)
From the above equation we can see that the frequency of the FM signal
causes frequency deviation (∆f) from the center frequency of the carrier when the
message amplitude is varied.
Where 𝐽𝑜 (𝑚𝑓 ), 𝐽1 (𝑚𝑓 ) etc. are in volts, and are the levels of the
frequency components of the FM signal for 𝐴𝑐 = 1 V.
The spectrum is dependent on mf, the modulation index, and Table (1) gives
the values of the Bessel-functions J0, J1, J2, etc... for mf = 0 to 15. The bandwidth
of an FM signal depends on the modulation index (mf), and the well-known
Carson’s Rule approximates it:
BW = 2 (∆f + fm)
The factor (2) in the equation is to account for both the upper and lower
sidebands (left and right of the carrier). This equation gives the bandwidth, which
contains 98% of the signal power.
FM Generation:
FM Demodulation:
There are many methods to detect the message signal from FM signal. In
our experiment, we will use the Slop detector. In this method the FM signal
converted to AM signal by using a tuned circuit and then the message signal can
be detected from the obtained AM signal by using envelop detector circuit as
shown in figure (3).
Procedure:
Part-A: FM Generation
5- Set the function generator signal to sine wave with frequency of (8 kHz)
and amplitude of (5 Vp.p).
8- Set the modulation index to (10) for the same input message amplitude
and then draw the output signal.
Part-B FM Detection
5- Set the function generator signal to sine wave with frequency of (4 kHz)
and amplitude of (1 Vp.p).
6- Draw the output signal.
Discussion:
a) AM DSB-LC
b) AM SSB-SC
c) FM
5- Find the value of the FM modulation index when the input message
frequency equal to (5 kHz) and maximum frequency deviation equal to
(5 kHz).