Professional Documents
Culture Documents
Amplitude Modulation
Amplitude Modulation
In order that a radio signal can carry audio or other information for
broadcasting or for two way radio communication, it must be modulated or
changed in some way. Although there are a number of ways in which a
radio signal may be modulated, one of the easiest is to change its
amplitude in line with variations of the sound.
signal.
Assuming that the nrg in the instructions are typo since the main program and
functions written are containing nrg variable in nowhere, I assume that the actual
concern is the rng variable in the first function. The change I made is highlighted in the
following script.
function am_plot(idx,m,c,u,rng)
% AM_PLOT Plots the three modulation signals
% am_plot(m,c,u,rng)
% idx: x index (it can represent time or frequency)
% m: modulating signal
% c: carrier signal
% u: modulated signal
% rng: range of x axis to plot (optional)
if nargin < 5; rng = 1; end % default value for rng
The following script could be found in second MATLAB Function, The am_plot function.
The highlighted part showing the declaration value for the rng value. The following is the
original plot and the result after I modified the value of rng.
You can see this behaviour if you do something like called rand(10,1), then calling
rng('default') then repeating the rand command. It will generate exactly the same "random"
numbers.
This is generally useful for situations where you want to repeat an (ex ante) random outcome.
For instance, in Monte Carlo simulation or in simulation-based optimization procedures.
But if the questions asked about the nargin variable, then the result would be totally different.
The following is the change that happened to the diagram if I change the value of nargin to 8.
This variation is customizing fc variable in the third program, the one that I named
am_calculation. The original value is 20, I varied it with 10 and 30 to portray the smaller
Pic 4 The
and bigger number Result of Program,
respectively. with rngisvalue
The following changed to 5
the result.
% Now make the second message signal
pw = 0.1; % pulse width
m = rectpuls(t,pw);
% Now make a new carrier
fc = 60; % carrier frequency
c = cos(2*pi*fc*t);
% Modulate the signal
u = m.*c;
The variable pulse width (pw) is now declared with the value of 0,1. Now the diagram is looked
like this
Pic 7 The AM wave with pw =
0.1
The middle segment, the carrier signal is going to be a lot narrower as it value is increasing to
60 as expected. The top section, is the information bit of the signal, now represented as a step
signal with a pulse width of 0.1 second. The convolution of both middle and top wave is
represented on the bottom segment. A brief wave consist of carrier-like-shaped signal with the
information bit as it’s “border”
Then, as instructed, I changed the value of pw to 0.01, 0,2. 0,5 and 0,75. The result can be
seen on these following set of diagrams.
We can also observe that in the frequency diagram, there is two peaks that always happened
in both negative and positive side of the diagram, This is called upper sideband (from the
positive side) and lower sideband (from the negative side).