ammod

Amplitude modulation

Syntax

y = ammod(x,Fc,Fs)
y = ammod(x,Fc,Fs,ini_phase)
y = ammod(x,Fc,Fs,ini_phase,carramp)

Description

y = ammod(x,Fc,Fs) uses the message signal x to modulate a carrier signal with frequency Fc (Hz) using amplitude modulation. The carrier signal and x have sample frequency Fs (Hz). The modulated signal has zero initial phase and zero carrier amplitude, so the result is suppressed-carrier modulation.

    Note:   The x, Fc, and Fs input arguments must satisfy Fs > 2(Fc + BW), where BW is the bandwidth of the modulating signal x.

y = ammod(x,Fc,Fs,ini_phase) specifies the initial phase in the modulated signal y in radians.

y = ammod(x,Fc,Fs,ini_phase,carramp) performs transmitted-carrier modulation instead of suppressed-carrier modulation. The carrier amplitude is carramp.

Examples

The example below compares double-sideband and single-sideband amplitude modulation.

% Sample the signal 100 times per second, for 2 seconds.
Fs = 100;
t = [0:2*Fs+1]'/Fs;
Fc = 10; % Carrier frequency
x = sin(2*pi*t); % Sinusoidal signal

% Modulate x using single- and double-sideband AM.
ydouble = ammod(x,Fc,Fs);
ysingle = ssbmod(x,Fc,Fs);

% Compute spectra of both modulated signals.
zdouble = fft(ydouble);
zdouble = abs(zdouble(1:length(zdouble)/2+1));
frqdouble = [0:length(zdouble)-1]*Fs/length(zdouble)/2;
zsingle = fft(ysingle);
zsingle = abs(zsingle(1:length(zsingle)/2+1));
frqsingle = [0:length(zsingle)-1]*Fs/length(zsingle)/2;

% Plot spectra of both modulated signals.
figure;
subplot(2,1,1); plot(frqdouble,zdouble);
title('Spectrum of double-sideband signal');
subplot(2,1,2); plot(frqsingle,zsingle);
title('Spectrum of single-sideband signal');

See Also

| | |

Was this topic helpful?