% Script to implement and visualize Amplitude Modulation (AM)
% Define carrier signal parameters carrier_frequency = 50; % Hz carrier_amplitude = 1;
% Define message signal parameters message_frequency = 5; % Hz message_amplitude = 0.8; modulation_index = 0.7;
% (0 to 1)
% Define time vector sampling_frequency = 500; % Hz (at least 2x carrier frequency) t = 0:1/sampling_frequency:1;
% Generate the carrier signal carrier_signal = carrier_amplitude * cos(2 * pi * carrier_frequency * t);
% Generate the message signal message_signal = message_amplitude * cos(2 * pi * message_frequency * t);
% Implement Amplitude Modulation (Standard AM) am_signal = (carrier_amplitude + modulation_index *
message_signal) .* cos(2 * pi * carrier_frequency * t);
% Implement Amplitude Modulation with suppressed carrier (DSB-SC) dsb_sc_signal = message_signal .* cos(2 * pi *
carrier_frequency * t);
% Plot the signals figure; subplot(3, 1, 1); plot(t, carrier_signal); xlabel('Time (s)'); ylabel('Carrier Signal'); title(['Carrier
(Fc = ', num2str(carrier_frequency), ' Hz)']); grid on;
subplot(3, 1, 2); plot(t, message_signal); xlabel('Time (s)'); ylabel('Message Signal'); title(['Message (Fm = ',
num2str(message_frequency), ' Hz)']); grid on;
subplot(3, 1, 3); plot(t, am_signal); xlabel('Time (s)'); ylabel('AM Signal'); title(['Amplitude Modulation (m = ',
num2str(modulation_index), ')']); grid on;
figure; plot(t, dsb_sc_signal); xlabel('Time (s)'); ylabel('DSB-SC Signal'); title('Double-Sideband Suppressed Carrier
(DSB-SC) AM'); grid on;
% Theory: Amplitude Modulation (AM) is a fundamental modulation technique % used in communication systems to
transmit information over a carrier wave. % In standard AM, the amplitude of the high-frequency carrier signal is varied
% in proportion to the instantaneous amplitude of the low-frequency message % signal. The modulation index (m)
determines the extent of amplitude variation. % Double-Sideband Suppressed Carrier (DSB-SC) AM is a variation where
the carrier % frequency component is suppressed, leading to more efficient power usage. % This code generates and
visualizes the carrier, message, and the resulting % AM (both standard and DSB-SC) signals, illustrating the basic
principle of % amplitude modulation.