Standard AM signal generation in Matlab

Amplitude Modulation (AM) is a popular technique used to transmit information through radio waves. In this technique, the amplitude of a high frequency carrier signal is varied according to the amplitude of a low frequency message signal. The modulated signal can be demodulated at the receiver end to retrieve the original message signal. In this blog post, we will discuss how to implement standard AM using MATLAB.

See also previous tutorial on amplitude modulation.


- SSB-SC AM signal generation in Matlab with built-in function 

- SSB-SC AM signal generation in Matlab

Equation of standard AM

The equation of standard AM wave is,

\(s(t) = A_c[1+k_a m(t)] cos(2 \pi f t)\)

where \(k_a\) is amplitude sensitivity of the AM modulator. 

This equation describing a wave is called standard AM wave because the frequency described all the frequency content of AM wave.

The a(t) given below is called envelope of the standard AM.

\( a(t)=A_c|1+k_a m(t)| \)

The following is equation of percentage modulation,

\(percentage \space modulation = k_a m(t) \times 100\)

The following shows the circuit diagram for generating standard AM signal. 

standard AM circuit diagram

Matlab Code

The following is matlab code for generation of AM signal in Matlab.

Ac=input('enter carrier signal amplitude: ');
Am=input('enter message signal amplitude(Am<Ac): ');    
fc=input('enter carrier frequency: ');
fm=input('enter message frequency(fm<fc): ');
ka=input('enter amplitude sensitivity: '); 

fs = 2*fc;      % sampling frequency
ts = 1/fs;     % sampling time

% Generate message signal
t = (0:ts:100*ts).';  % time vector
m = Am*cos(2*pi*fm*t); % message signal

% Generate carrier signal
c = Ac*cos(2*pi*fc*t); % carrier signal

% Perform DSB-SC AM modulation
s = (1+ka*m).*c;

% Plot the signals
title('Message signal');
xlabel('Time (s)');

title('Carrier signal');
xlabel('Time (s)');

title('Standard AM signal');
xlabel('Time (s)');

This MATLAB code demonstrates how to perform standard Amplitude Modulation (AM) on a message signal. The code begins by asking the user to input the amplitude of the carrier signal (Ac), the amplitude of the message signal (Am), the frequency of the carrier signal (fc), the frequency of the message signal (fm), and the amplitude sensitivity (ka).

standard AM inputs
 The sampling frequency (fs) is calculated as twice the carrier frequency (2*fc), and the sampling time (ts) is calculated as the inverse of the sampling frequency (1/fs).

Next, the code generates the message signal using a time vector t ranging from 0 to 100*ts, and a cosine function of frequency fm and amplitude Am. The carrier signal is generated using a cosine function of frequency fc and amplitude Ac.

The DSB-SC AM modulation is performed by multiplying the carrier signal by (1+ka*m), where m is the message signal and ka is the amplitude sensitivity. The modulated signal s is obtained by multiplying the carrier signal by (1+ka*m).

Finally, the code plots the message signal, carrier signal, and modulated signal in three subplots using the subplot and plot functions. The first subplot shows the message signal, the second subplot shows the carrier signal, and the third subplot shows the modulated signal. Each plot has a title, x-axis label, and y-axis label.

The signal waveform of standard AM signal is shown below.

standard AM waveform
In summary, this MATLAB code demonstrates how to perform DSB-SC AM modulation on a message signal using user-input values for the carrier signal amplitude, message signal amplitude, carrier frequency, message frequency, and amplitude sensitivity. The resulting modulated signal is then plotted along with the original message and carrier signals.

Post a Comment

Previous Post Next Post