Department of Electrical Engineering
EE-232 Signals and Systems
Faculty Member: Sir Qazi Waqas Dated: 23rd November,2023
Section: B Semester: 5th Semester
EE-232 Signals and Systems
Lab 10: Implementation and Analysis of Amplitude Modulation Transmitter and
Receiver System
Open Ended Lab
PLO5/ PLO8/ PLO9/ CLO5
CLO3 CLO4
Modern Ethics and Individual
Tool Usage Safety and Team
Reg. No Work
Name
15 Marks 5 Marks 5 Marks
Muhammad Ahmad Nazir 370307
Zunaira Aziz 367583
Eaman Safdar 388110
EE-232 Signals and Systems Page 1
1. Administrivia
1.1. Open Ended Lab
An open-ended lab is where students are given the freedom to develop their own
solution, instead of merely following the already set guidelines from a lab manual or
elsewhere. The teacher gives the students an objective/purpose and not the procedure.
The students would then have to come up with their own solution to fulfill the purpose.
1.2. Learning Outcomes
By the end of this lab you will be able to:
Understand the operations carried out in the Amplitude modulation and
understand their applications
Apply the concepts on real world signals and systems
1.3. Deliverable
You are required to submit
Code
Observation and experiences
In the beginning of next lab.
EE-232 Signals and Systems Page 2
2. Amplitude Modulation (AM)
Amplitude modulation or AM as it is often called, is a form of modulation used for radio
transmissions for broadcasting and two way radio communication applications. Although
it is one of the earliest used forms of modulation, it is still used today, mainly for long,
medium and short wave broadcasting. Currently, this technique is used in many areas of
communication such as in portable two-way radios; citizens band radio, VHF aircraft radio
and in modems for computers. Amplitude modulation is also used to mention the
mediumwave AM radio broadcasting.
Figure 1: Amplitude Modulation
EE-232 Signals and Systems Page 3
According to the standard definition, “The amplitude of the carrier signal varies in
accordance with the instantaneous amplitude of the modulating signal.” Which means,
the amplitude of the carrier signal containing no information varies as per the amplitude
of the signal containing information, at each instant. This can be well explained by the
figure 1.
The first figure shows the modulating wave, which is the message signal. The next one is
the carrier wave, which is a high frequency signal and contains no information. While the
last one is the resultant modulated wave. It can be observed that the positive and
negative peaks of the carrier wave, are interconnected with an imaginary line. This line
helps recreating the exact shape of the modulating signal. This imaginary line on the
carrier wave is called as Envelope. It is the same as that of the message signal.
The implementation of the AM transmitter and receiver system is fairly simple as seen
in the diagram shown below:
Figure 2: The block diagram of the AM Transmitter-Receiver.
EE-232 Signals and Systems Page 4
LAB TASKS
1. Generate a message signal m(t) as a sum of two sinusoidal. Let it be your message
signal. Plot and analyze both the time domain and frequency domain plots.
Code:
% Initial parameters
Fs = 1000;
T = 1/(1+Fs);
t = 0:T:1;
% Message signal generation
A = 2;
B = 3;
f1 = 100;
f2 = 200;
Message = A * sin(2 * pi* f1 * t) + B * sin(2 * pi* f2 * t);
% Plot the time domain representation
figure;
subplot(2,1,1);
plot(t, Message);
title('Message Signal - Time Domain');
xlabel('Time (s)');
ylabel('Amplitude');
% Plot the frequency domain representation
subplot(2,1,2);
Message_f = fft(Message);
frequencies = linspace(0, Fs, length(Message_f));
plot(frequencies, abs(Message_f));
title('Message Signal - Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
Screenshot:
EE-232 Signals and Systems Page 5
Explanation:
This MATLAB code generates and plots a message signal in both the time and frequency domains.
2. Generate a cosine of 1000Hz and call it you carrier signal. Plot and analyze both
the time domain and the frequency domain plots.
Code:
% Carrier Signal
C = 1;
carrier = C * cos(2 * pi * Fs * t);
% Plot the time domain representation
figure;
subplot(2,1,1);
plot(t, carrier);
title('Carrier Signal - Time Domain');
xlabel('Time (s)');
ylabel('Amplitude');
% Plot the frequency domain representation
subplot(2,1,2);
carrier_f = fft(carrier);
frequencies = linspace(0, Fs, length(carrier_f));
plot(frequencies, abs(carrier_f));
title('Carrier Signal - Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
EE-232 Signals and Systems Page 6
Screenshot:
Explanation:
This MATLAB code generates and plots a message signal in both the time and frequency domains.
3. Now generate the signal that we will receive at the end of the transmitter
system. Plot and analyze both the time and the frequency plots. This signal is the
Amplitude modulated signal, carefully examine these plots. Try identifying the
how the amplitude of the amplitude modulated signal varies with time.
Code:
EE-232 Signals and Systems Page 7
%Transmitted Signal
Transmitted_Signal = Message .* carrier;
% Plot the time domain representation
figure;
subplot(2,1,1);
plot(t, Transmitted_Signal);
title('Transmitted_Signal - Time Domain');
xlabel('Time (s)');
ylabel('Amplitude');
% Plot the frequency domain representation
subplot(2,1,2);
Transmitted_Signal_f = fft(Transmitted_Signal);
frequencies = linspace(0, Fs,
length(Transmitted_Signal_f));
plot(frequencies, abs(Transmitted_Signal_f));
title('Transmitted_Signal - Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
Screenshot:
Explanation:
EE-232 Signals and Systems Page 8
In this task, we modulate the message signal with a carrier signal. The modulation is
performed by element-wise multiplication.
4. Assuming we have a noise less channel we receive the signal generated in the
previous part as the input to the receiver circuit. Generate the output signal by
implementing the system given in the block diagram. Plot and analyze the output
signal. A detailed answer is required focusing on what has actually happened
here.
Code:
%Output Signal
Output_Signal = Transmitted_Signal ./ carrier;
% Plot the time domain representation
figure;
subplot(2,1,1);
plot(t, Output_Signal);
title('Output_Signal - Time Domain');
xlabel('Time (s)');
ylabel('Amplitude');
% Plot the frequency domain representation
subplot(2,1,2);
Output_Signal_f = fft(Output_Signal);
frequencies = linspace(0, Fs,
length(Output_Signal_f));
plot(frequencies, abs(Output_Signal_f));
title('Output_Signal - Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
Screenshot:
EE-232 Signals and Systems Page 9
Explanation:
In this task, we divide the transmitted signal by the carrier signal element-wise to obtain
the output signal.
5. If you would have noticed that the output signal in the previous part was
supposed to be the message signal, but it is quite different. Can you identify what
operation (in terms of filtering) we need to perform to retrieve our original
message signal? Explain how you arrived at your answer.
Explanation:
To retrieve the original message signal from the output signal, we need to perform a filtering
operation known as demodulation or detection. In the context of amplitude modulation (AM),
the common demodulation technique is envelope detection.
The steps involved in envelope detection are as follows:
Rectification: Convert the modulated signal to its absolute value, effectively removing the
negative half.
Low-pass filtering: Apply a low-pass filter to smooth the signal and retain the envelope.
6. Implement the Amplitude Modulation again with the given MATLAB built-in
functions and compare the results with yours.
EE-232 Signals and Systems Page 10
Code:
% Initial parameters
Fs = 3000;
Fc = 1000;
% Message signal generation
A = 2;
B = 3;
f1 = 100;
f2 = 200;
Message = A * sin(2 * pi* f1 * t) + B * sin(2 * pi* f2 * t);
% Plot the time domain representation
figure;
subplot(2,1,1);
plot(t, Message);
title('Message Signal - Time Domain');
xlabel('Time (s)');
ylabel('Amplitude');
% Plot the frequency domain representation
subplot(2,1,2);
message_f = fft(Message);
frequencies = linspace(0, Fs, length(message_f));
plot(frequencies, abs(message_f));
title('Message Signal - Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
% Carrier Signal
C = 1;
carrier = C * cos(2 * pi *Fc * t);
% Plot the time domain representation
figure;
subplot(2,1,1);
plot(t, carrier);
title('Carrier Signal - Time Domain');
xlabel('Time (s)');
ylabel('Amplitude');
% Plot the frequency domain representation
subplot(2,1,2);
carrier_f = fft(carrier);
frequencies = linspace(0, Fc, length(carrier_f));
plot(frequencies, abs(carrier_f));
title('Carrier Signal - Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
EE-232 Signals and Systems Page 11
modulated_signal = ammod( Message , Fc , Fs );
% Plot the time domain representation
figure;
subplot(2,1,1);
plot(t, modulated_signal);
title('modulated_signal - Time Domain');
xlabel('Time (s)');
ylabel('Amplitude');
% Plot the frequency domain representation
subplot(2,1,2);
modulated_signal_f = fft(modulated_signal);
frequencies = linspace(0, Fs,
length(modulated_signal_f));
plot(frequencies, abs(modulated_signal_f));
title('modulated_signal - Frequency Domain');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
Screenshot:
EE-232 Signals and Systems Page 12
Explanation:
This code essentially demonstrates the AM modulation process using Matlab in-built function
‘ammod’, taking a message signal and modulating it onto a carrier signal. The time and
frequency domain representations help visualize the modulated signal.
Conclusion:
In this Open Ended Lab, we were able to understand the operations carried out in
the Amplitude modulation and understand their applications in real-world. It was
a fun lab to do and we got to learn a lot.
EE-232 Signals and Systems Page 13