Professional Documents
Culture Documents
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.
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)
With our naked eye we could barely see any change on the diagrams. The rng is stand for Random Number Generation.
When Matlab generates random numbers, they're not truly random; they are based on a pseudo-random number
generating algorithm. The rng command controls the seed, or starting point, for this value. The "default" values resets it
to the original value that MATLAB starts with; this evolves over time.
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 and bigger number respectively. The following is
the result.
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.
Pic 8 AM Wave with pw = 0.01
From this set of diagram we can observe that each time the value of pw is increasing, it also increasing the size of the
information bit of the signal. As the information signal is pure step, then the convolution happened on the section that
include the value of 1 in the information bit is neatly “cropped” the carrier signal.
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).
If we apply the value of pw = 0,05 and fc= 15 and plot the result on the matlab, the result is shown at Pic 12.