Signal Processing Toolbox
  Go to function:
    Search    Help Desk 
modulate    See Also

Modulation for communications simulation.

Syntax

Description

y = modulate(x,Fc,Fs,'method') and

y = modulate(x,Fc,Fs,'method',opt) modulate the real message signal x with a carrier frequency Fc and sampling frequency Fs, using one of the options listed below for method. Note that some methods accept an option, opt.

amdsb-sc
or
am
Amplitude modulation, double sideband, suppressed carrier. Multiplies x by a sinusoid of frequency Fc:
y = x.*cos(2*pi*Fc*t)

amdsb-tc
Amplitude modulation, double sideband, transmitted carrier. Subtracts scalar opt from x and multiplies the result by a sinusoid of frequency Fc:
y = (x-opt).*cos(2*pi*Fc*t)

If the opt parameter is not present, modulate uses a default of min(min(x)) so that the message signal (x-opt) is entirely non-negative and has a minimum value of 0.

amssb
Amplitude modulation, single sideband. Multiplies x by a sinusoid of frequency Fc and adds the result to the Hilbert transform of x multiplied by a phase shifted sinusoid of frequency Fc:
y = x.*cos(2*pi*Fc*t)+imag(hilbert(x)).*sin(2*pi*Fc*t)

This effectively removes the upper sideband.

fm
Frequency modulation. Creates a sinusoid with instantaneous frequency that varies with the message signal x:
y = cos(2*pi*Fc*t + opt*cumsum(x))

cumsum is a rectangular approximation to the integral of x. modulate uses opt as the constant of frequency modulation. If opt is not present, modulate uses a default of
opt = (Fc/Fs)*2*pi/(max(max(x)))

so the maximum frequency excursion from Fc is Fc Hz.

pm
Phase modulation. Creates a sinusoid of frequency Fc whose phase varies with the message signal x:
y = cos(2*pi*Fc*t + opt*x)

modulate uses opt as the constant of phase modulation. If opt is not present, modulate uses a default of
opt = pi/(max(max(x)))

so the maximum phase excursion is radians.

pwm
Pulse-width modulation. Creates a pulse-width modulated signal from the pulse widths in x. The elements of x must be between 0 and 1, specifying the width of each pulse in fractions of a period. The pulses start at the beginning of each period, that is, they are left justified.
modulate(x,Fc,Fs,'pwm','centered')

yields pulses centered at the beginning of each period. y is length length(x)*Fs/Fc.

ptm
Pulse time modulation. Creates a pulse time modulated signal from the pulse times in x. The elements of x must be between 0 and 1, specifying the left edge of each pulse in fractions of a period. opt is a scalar between 0 and 1 that specifies the length of each pulse in fractions of a period. The default for opt is 0.1. y is length length(x)*Fs/Fc.
qam
Quadrature amplitude modulation. Creates a quadrature amplitude modulated signal from signals x and opt:
y = x.*cos(2*pi*Fc*t) + opt.*sin(2*pi*Fc*t)

opt must be the same size as x.

If you do not specify method, then modulate assumes am. Except for the pwm and ptm cases, y is the same size as x.

If x is an array, modulate modulates its columns.

[y,t] = modulate(x,Fc,Fs) returns the internal time vector t that modulate uses in its computations.

See Also

demod
Demodulation for communications simulation.
vco
Voltage controlled oscillator.


[ Previous | Help Desk | Next ]