Generate DSB-AM Signal in Matlab

Amplitude Modulation (AM) is a type of modulation used in radio broadcasting to transmit audio signals over a carrier wave. In AM, the amplitude of the carrier wave is varied in proportion to the audio signal, which is known as the "modulating" signal.

There are three types of AM modulation: Double-Sideband AM (DSB-AM), Single-Sideband AM (SSB-AM), and Standard AM.

Double-Sideband AM (DSB-AM): DSB-AM is the simplest form of AM modulation, where both the upper and lower sidebands are transmitted along with the carrier wave. DSB-AM requires a bandwidth equal to twice the highest frequency in the modulating signal. This makes it an inefficient use of the available frequency spectrum. It can be generated using diode modulator circuit or using integrated circuit(IC) such as MC1496 Balanced Modulator Demodulator IC. 

Single-Sideband AM (SSB-AM): SSB-AM is a more efficient version of AM modulation where only one of the sidebands is transmitted along with the carrier wave. This reduces the required bandwidth to just the highest frequency in the modulating signal. There are two types of SSB-AM: Upper-Sideband AM (USB-AM) and Lower-Sideband AM (LSB-AM).
 

Standard AM: Standard AM, also known as Double-Sideband Suppressed Carrier (DSB-SC) AM, is a form of AM modulation where the carrier wave is completely suppressed, and only the two sidebands are transmitted. Standard AM is more efficient than DSB-AM because it requires half the bandwidth for the same modulating signal.

Here we show how to generate DSB-AM signal in Matlab.

The message and carrier signal are defined as follows.

The message signal, \(m(t)\), is given by:
m(t)=Amcos⁡(2Ï€fmt)

where  \(A_m\) is the amplitude of the message signal, and  \(f_m\) is the frequency of the message signal.

The carrier signal,  \(c(t)\), is given by:
c(t)=Accos⁡(2Ï€fct)

where  \(A_c\) is the amplitude of the carrier signal, and \(f_c\) is the frequency of the carrier signal.

The modulation index, \(m_i\), is defined as:
mi=AmAc​​
where \(A_m\) is the amplitude of the message signal, and \(A_c\) is the amplitude of the carrier signal.
 

    DSB-AM signal in Matlab

The DSB-AM signal is product of the message signal and the carrier signal, that is:

\(s_{dsb-am} = m(t)s(t)\)
or, \(s_{dsb-am} = Amcos⁡(2Ï€fmt) \times Accos⁡(2Ï€fct)\)
or,  \(s_{dsb-am} = AmAc \times cos⁡(2Ï€fmt) \times cos⁡(2Ï€fct)\)
 
The following is Matlab code to generate DSB-AM signal.

% AM modulation parameters
Ac=input('enter carrier signal amplitude: ');
Am=input('enter message signal amplitude: ');
fc=input('enter carrier frequency: ');
fm=input('enter message frequency');% fm<fc
% fc = 1000;      % carrier frequency (Hz)
% fm = 100;       % message signal frequency (Hz)
% Ac = 1;       % carrier amplitude
% Am = 0.5;       % message signal amplitude

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


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

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

% Perform AM modulation
s = m.*c; % AM signal

% Plot the signals
subplot(3,1,1);
plot(t,m);
title('Message signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,2);
plot(t,c);
title('Carrier signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,3);
plot(t,s);
title('AM signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,1)
xlabel('Time (s)')

The DSB-AM signal is created by multiplying the message signal with the carrier signal. The code takes the following input parameters from the user:
  • Carrier signal amplitude (Ac)
  • Message signal amplitude (Am)
  • Carrier frequency (fc)
  • Message frequency (fm)

The code then calculates the sampling frequency (fs) as twice the carrier frequency (2*fc) and the sampling time (ts) as the inverse of the sampling frequency (1/fs).

Next, the code generates the message signal (m) using the message signal amplitude (Am), the message frequency (fm), and the time vector (t). The time vector (t) is created using the sampling time (ts).

The code generates the carrier signal (c) using the carrier signal amplitude (Ac), the carrier frequency (fc), and the time vector (t).

The code performs AM modulation by multiplying the message signal (m) with the carrier signal (c) and storing the result in the variable s.

Finally, the code plots the message signal, carrier signal, and AM signal in separate subplots.

The DSB-AM signal can be expressed as:

s(t) = AcAmcos(2Ï€fmt)cos(2Ï€fct)

where Ac is the amplitude of the carrier signal, Am is the amplitude of the message signal, fc is the frequency of the carrier signal, fm is the frequency of the message signal, t is time, and s(t) is the DSB-AM signal.

In the code, this equation is implemented in the line:

s = m.*c;

where .* is the element-wise multiplication operator.


After running the code by entering the amplitude and frequency values in the matlab command prompt, we obtain the following message signal, carrier signal and DSB-AM signal waveform.

DSB-AM signal waveform matlab

For example, we enter the carrier amplitude of 0.8, frequency of 1000, the message signal amplitude is 0.5 and the frequency is 100 as shown below.
 

 
References:

Post a Comment

Previous Post Next Post