Sunday, March 23, 2014
NETWORK DEVICES
Layer
2 Functionality
Network Switching
Function of a Router
MAIN FUNCTION OF ROUTER
PACKET FORWARDING:
PACKET SWITCHING:
PACKET FILTERING:
Function of a Repeater
FREQUENCY
MODULATION
A) OBJECTIVES
§ To understand
message signal, carrier signal and FM modulated waveform.
§ To use MATLAB to:
- Create FM
signal by modulating a sinusoidal and non-sinusoidal message onto a carrier.
- Examine frequency
spectrum of frequency modulated signal.
- Evaluate
frequency spectrum of the modulated signal when the modulation index is varied.
- Demodulate the
FM signal and recover the original message waveform.
§ To illustrate FM
blocks using SIMULINK.
B) THEORY OF FREQUENCY MODULATION
FREQUENCY MODULATION (FM)
An alternative system to Amplitude Modulation
is Frequency Modulation. In this modulation scheme the carrier frequency
increases as the voltage in the information signal increases and decreases in
frequency as it reduces. The larger the amplitude of the information signal,
the further the frequency of the carrier signal is shifted from its starting
point. The frequency of the information signal determines how many times a
second this change in frequency occurs. This modulation process does not affect
the amplitude of the carrier.
|
The amplitude of the modulated carrier is held constant and either the
phase or the time derivative of the phase of the carrier is varied linearly
with the message signal m(t). Thus the general angle
modulated signal is given by:
x(t) = Ac cos (2p fct + q (t) )
The quantity 2p fc + q (t) = yi(t) is called the
instantaneous phase of x(t), while the quantity q (t) is called the phase deviation of x(t). The instantaneous
angular frequency of x(t), defined as the rate of change of the
instantaneous phase and having units of radians per second, is given by:
|
The instantaneous frequency fi (t), having units of
Hertz (Hz), of x(t) is accordingly given by:
|
The quantity is called the
angular frequency deviation. The two basic types of angle modulation are Phase
Modulation (PM) and Frequency Modulation (FM).
VARIATION OFq (t) PRODUCES PHASE
MODULATION
Phase modulation implies that q (t) is proportional
to the modulating signal. Thus q (t)=kpm(t), where kp is the deviation
constant in radians per unit of m(t). Therefore, the time domain
expression for PM is given by:
|
x(t) = Ac cos (2p fct
+ kpm(t))
VARIATION OF PRODUCES
FREQUENCY MODULATION
Frequency modulation implies that is proportional to the
modulating signal. This yield:
|
Thus, in FM the instantaneous
frequency varies linearly with the message signal and is given by:
|
fi = fc + kf m(t).
The term kf , expressed in Hertz per unit of m(t), represents the
frequency sensitivity of the FM signal.
The phase angle q (t) of FM signal is
given by:
|
Therefore, the time domain expression for FM is given by:
|
FREQUENCY
DEVIATION, MODULATION INDEX AND SPECTRUM OF FM
Consider a sinusoidal modulating information signal given by:
|
m(t) =
Am cos(2p fm t )
The instantaneous frequency of the resulting FM signal equals:
|
fi(t) = fc + kf m(t) = fc + kf Am cos(2p fm
t )
|
The maximum change in instantaneous frequency fi from the carrier
frequency fc, is known as frequency deviation Df, where it is given
by:
D f = kf Am
Frequency deviation is a useful parameter for determining the bandwidth
of FM signals. For example, an information signal of peak-to-peak voltage of 6
volts and a frequency of 10kHz with a frequency deviation of 15 kHz/V would
cause a FM carrier to change by a total of 90 kHz (45 kHz above and below the
original carrier frequency). The carrier frequency would be swept over this
range 10,000 times a second.
Next, the FM modulated signal is given by:
|
where is the
modulation index of the modulated signal. In general, for a non-sinusoidal m(t)
signal, the modulation index is defined as:
|
where, W is the bandwidth of the message signal, m(t).
In case of a sinusoidal message signal, the modulated signal can be
represented by:
|
where Jn(b) is known as Bessel functions in the order n and
argument b. Some of the selected
values of Jn(b) is listed in Table 1. In the frequency domain, we
have:
|
From the equations (14) and (15) and Table 1, we observe that :
1.
The spectrum consists of a carrier-frequency
component and an infinite number of sideband components at frequencies fc ± nfm (n = 1,2,3,4,5…..).
2.
The relative amplitudes of the spectral lines depend
on the value of Jn(b), and the value of Jn(b) becomes very
small for large values of n.
3.
The number of significant spectral lines (that is,
having appreciable relative amplitude) is a function of the modulation index b. With b << 1, only
J0 and J1 are significant, so the
spectrum will consists of carrier and two sideband lines. But if b >> 1, there will be many sideband lines. The
amplitude spectrums of FM signals for several values of b are shown in Figure
2.
n\b
|
0.1
|
0.2
|
0.5
|
1
|
2
|
5
|
0
|
0.997
|
0.990
|
0.938
|
0.765
|
0.224
|
-0.178
|
1
|
0.050
|
0.100
|
0.242
|
0.440
|
0.577
|
-0.328
|
2
|
0.001
|
0.005
|
0.031
|
0.115
|
0.353
|
0.047
|
3
|
|
|
0.003
|
0.020
|
0.129
|
0.365
|
4
|
|
|
|
0.002
|
0.034
|
0.391
|
5
|
|
|
|
|
0.007
|
0.261
|
6
|
|
|
|
|
0.001
|
0.131
|
7
|
|
|
|
|
|
0.053
|
8
|
|
|
|
|
|
0.018
|
9
|
|
|
|
|
|
0.006
|
10
|
|
|
|
|
|
0.001
|
Table 1: Selected value of Jn(b).
Figure 2:
Amplitude spectrum of sinusoidal modulated FM signals (fm fixed).
C) MATLAB AND SIMULINK
MATLAB is an interactive
matrix based system for scientific and engineering numeric computation and
visualization. Its strength lies in the fact that complex numerical problem can
be solved easily and in a fraction of the time required with a programming
language such as Fortran or C. It is also powerful in the sense that by using
its relatively simple programming capabilities, MATLAB can be easily extended
to create new commands and functions.
SIMULINK is a software
package in MATLAB used for modeling, simulating and analyzing dynamical
systems. It supports linear and nonlinear systems, modeled in continuous time,
sampled time or a hybrid of the two. Systems can also be multirate that has
different parts that are sampled or updated at different rates. For modeling,
SIMULINK provides a graphical user interface (GUI) for building models as block
diagrams, using click-and-drag mouse operations. With this interface, you can
draw the models just as you would with pencil and paper (or as most textbooks
depict them). It also includes a comprehensive block library of sinks, sources,
linear and nonlinear components and connectors.
Models are hierarchical, so you can build models using both top-down
and bottom-up approaches. You can view the system at a high level, then
double-click on blocks to go down through the levels to see increasing levels
of model detail. This approach provides insight into how a model is organized
and how its parts interact. After you define a model, you can simulate it,
using a choice of integration methods, either from the SIMULINK menus or by
entering commands in MATLAB's command window. The menus are particularly convenient
for interactive work, while the command-line approach is very useful for
running a batch of simulations. Using scopes and other display blocks, you can
see the simulation results while the simulation is running. In addition, you
can change parameters and immediately see what happens, for "what if"
exploration. The simulation results can be put in the MATLAB workspace for
post-processing and visualization. Model analysis tools include linearization
and trimming tools, which can be accessed from the MATLAB command line, plus
the many tools in MATLAB and its application toolboxes.
D) EXPERIMENT PROCEDURES – MATLAB
1.
Open and start the MATLAB program by double-clicking
the MATLAB icon.
2.
Type the command in the MATLAB COMMAND WINDOW or
create a script file in the MATLAB EDITOR.
3.
Given a 100Hz continuous time sinusoidal message
signal, m1(t) = 0.8 sin (200pt) is frequency
modulated by a carrier of s1(t)
= 0.8 cos (2000pt). Using
sufficient points and sampling interval of 0.0001 seconds, plot the message
and carrier signals for duration of 0.05 seconds. (Use the commands subplot
and plot in MATLAB and select an
appropriate time interval for each plot).
4.
Write the time domain expression for the modulated
signal by using the following equation:
Find the result of by integrating
the message signal, m1(t). Assuming that the frequency
sensitivity, kf = 625 Hz/V, what is the modulation index for this
signal? Plot the modulated signal for the duration of 0.05 seconds.
You can also find the result of numerically in MATLAB by using
cumsum(x)/Fs, function where x and Fs are the message signal and sampling
rate used, respectively. Plot the modulated signal using the cumsum function
for the duration of 0.05 seconds. Compare the plots. Are they the same?
5.
You can make use of the modulate function in
MATLAB to generate your FM signals. Study this function by typing help
modulate in the MATLAB command prompt. Repeat your plot for the modulated
signal using this function. (Note that the kf for the modulate function must be set to kf = 2p(kf )/Fs, as a normalized
value with respect to the sampling rate).
6. The normalized
magnitude spectra (or frequency spectrum) of a signal can be plotted using the
built-in fft and fftshift functions in MATLAB. Use the following
MATLAB function ft.m in order to plot the magnitude spectra or spectrum
for message signal, m1(t).
% Fourier Transform
function, m-input signal, ts-sampling interval
% Save this function as ft.m
in MATLAB work directory
function [M,m]=ft(m,ts) %
return the value M and m
df=0.5; % frequency
resolution
fs=1/ts; % sampling
frequency
n1=fs/df; % refining resolution
n2=length(m); % number of point of the
signal
n=2^(max(nextpow2(n1),nextpow2(n2)));
M=fft(m,n); % fourier transform of
the signal
m=[m,zeros(1,n-n2)];
df=fs/n
M=M/fs; % scaling
f=[0:df:df*(length(m)-1)]-fs/2;
% frequency vector
plot(f,abs(fftshift(M))) % plot & shift the DC
component
Subsequently, use the above function to plot the magnitude spectra
(spectrum) for the carrier, s1(t) and frequency-modulated
signal, x1(t). You may use the command axis to refine
the scales in your plot.
7. Frequency
modulation can be categorized into either narrowband or wideband. When the
modulation index, b is very small, it is
usually called narrowband FM (NBFM). Generate the spectrum of the above
frequency-modulated signal, x1(t) when the modulation index, b = 0.005, 0.1, 1,
10 and 50. Observe the change of the spectrum shape for various modulation
indices. What can you conclude when the modulation index is very large?
8. MATLAB has a
built-in function called demod utilizing the linear frequency-to-voltage
transfer characteristic (frequency discriminator) that could be used to
demodulate a FM signal. All parameters used in the demod function are as
sets in the previous modulate
function. Generate the time domain plot for demodulated FM signal when b = 5 by using
this function. Did you recover the original message signal?
9.
Now, consider a non-sinusoidal message signal of, m2(t)
as shown below:
with a bandwidth of 20Hz is
modulated by a carrier, s2(t) = cos (400pt). Assuming that
the frequency sensitivity, kf = 50, what is the
modulation index for this FM signal?
Plot the time domain and
spectrum for the above message m2(t), carrier s2(t)
and modulated signal x2(t). Use the functions cumsum and modulate for the
modulated signal for comparison purposes. You may look at the command subplot for instruction on plotting
several figures in one display window. Limit your time domain plot to a
sampling interval of 0.0005 seconds for duration of 0.15 seconds. Demodulate
the FM signal and compare to the original message signal.
E) EXPERIMENT PROCEDURES – SIMULINK
1.
Type simulink at the MATLAB COMMAND
prompt.
* The
Simulink Library Browser window is opened.
2.
Create a new model window by clicking the Create
a new model button on the Library Browser toolbar or click File
>> New >> Model.
* A
new empty workspace window is opened.
3.
Double-click
to expand the Simulink folder at the Library Browser window.
4.
Double-click to expand the Sources
sub-folder in the Simulink folder.
5.
Drag and drop Signal Generator module
into the new empty workspace window.
6.
Go to Communications Blockset -> Modulation
-> Analog Passband Modulation sub-folder.
7.
Drag and drop FM Passband and FDM
Passband modules into the workspace window.
8.
Go to DSP Blockset -> Filtering ->
Filter Designs sub-folder. Drag and drop Analog Filter Design
module into the workspace window.
9.
Go to Simulink -> Sinks sub-folder.
Drag and drop THREE Scope modules into workspace window.
10. Go to Simulink
Extras -> Additional Sinks sub-folder. Drag and drop FOUR Power
Spectral Density modules into workspace window.
11. Connect all the
inserted modules as shown below.
12. Set
the parameters of the different blocks in your workspace as
follows:
Block Model
|
Parameters to be set
|
Signal Generator
|
Waveform type: Sine
Amplitude: 0.8
Frequency: 100 Hz
|
FM Passband Modulator & Demodulator
|
Carrier Frequency: 1 kHz
Initial phase: 0 radian
Modulation constant: 625 Hz/V
Sample time: 10 ms
|
Analog Filter Design
|
Filter type: Butterworth Low Pass Filter
Filter Order: 5
Passband Edge: 600 rad/s
|
Power Spectral Density
|
Length of buffer: 4096
Number of points for fft: 4096
Plot after how many points: 4096
Sample time: 10 ms
|
13. Set
the simulation parameters (Simulation >> Parameters) as
follows:
14. Run
(Simulation >> Start) the simulation and observe the output
waveforms in both time and frequency domains of the message, carrier, modulated
and demodulated signals. Compare these graphs with that obtained in Section D)
EXPERIMENT PROCEDURES – MATLAB.
15. Change
the message to a square wave and run the simulation again. What is the optimum
cut-off frequency for the low pass filter at the demodulator?
F)
REFERENCES
[1] B. P. Lathi,
“Modern Digital and Analog Communication Systems”
Subscribe to:
Posts (Atom)