Communications Toolbox    
amod

Analog passband modulator

Syntax

Optional Inputs

Input
Default Value, or Default Behavior If Input Is Omitted
offset
-min(min(x))
opt
Omitting this argument causes amod to produce the lower sideband instead of the upper sideband.
deviation
1

Description

The function amod performs analog passband modulation. The corresponding demodulation function is ademod. The table below lists the modulation schemes that amod supports.

Modulation Scheme
Fourth Input Argument
Amplitude modulation, double sideband with transmission carrier
'amdsb-tc'
Amplitude modulation, double sideband suppressed carrier
'amdsb-sc'
Amplitude modulation, single sideband suppressed carrier
'amssb' or 'amssb/up'
Quadrature amplitude modulation
'qam'
Frequency modulation
'fm'
Phase modulation
'pm'

For All Syntaxes

The generic syntax y = amod(x,Fc,Fs,...) modulates the message signal that x represents. Fc is the carrier frequency in hertz, and Fs is the sampling rate in hertz. (Thus 1/Fs represents the time interval between two consecutive samples in x.) The initial phase of the carrier signal is zero. By the Nyquist theorem, the sampling rate must be at least twice as large as the modulation carrier frequency. x and y are real matrices whose sizes depend on the demodulation method:

The generic syntax y = amod(x,Fc,[Fs initphase],...) is the same, except that the third input argument is a two-element vector instead of a scalar. The first entry, Fs, is the sampling rate as described in the paragraph above. The second entry, initphase, is the initial phase of the carrier signal, measured in radians.

For Specific Syntaxes

y = amod(x,Fc,Fs,'amdsb-tc',offset) implements double-sideband amplitude modulation. offset is the value added to x prior to the modulation. If you omit offset, then its default value is -min(min(x)). This default value produces 100% modulation.

y = amod(x,Fc,Fs,'amdsb-sc') implements double-sideband suppressed-carrier amplitude modulation.

y = amod(x,Fc,Fs,'amssb/opt') implements single-sideband suppressed-carrier amplitude modulation. By default, it produces the lower sideband; if opt is up, then the function produces the upper sideband. This syntax does a Hilbert transform in the frequency domain.

y = amod(x,Fc,Fs,'amssb/opt',num,den) is the same as the syntax above, except that it specifies a time-domain Hilbert filter. num and den are row vectors that give the coefficients, in descending order, of the numerator and denominator of the filter's transfer function. You can use the function hilbiir to design the Hilbert filter.

y = amod(x,Fc,Fs,'amssb/opt',hilbertflag) is the same as the syntax above, except that it uses a default time-domain Hilbert filter. The filter's transfer function is defined by [num,den] = hilbiir(1/Fs), where num and den are as in the paragraph above. The input argument hilbertflag can have any value.

y = amod(x,Fc,Fs,'qam') implements quadrature amplitude modulation. x is a two-column matrix whose first column represents the in-phase signal and whose second column represents the quadrature signal. y is a column vector.

y = amod(x,Fc,Fs,'fm',deviation) implements frequency modulation. The spectrum of the modulated signal is between min(x) + Fc and max(x) + Fc. The optional argument deviation is a scalar that represents the frequency deviation constant of the modulation. The command y = amod(x,Fc,Fs,'fm',deviation) is equivalent to the command y = amod(x*deviation,Fc,Fs,'fm').

y = amod(x,Fc,Fs,'pm',deviation) implements phase modulation. The optional argument deviation is a scalar that represents the phase deviation constant of the modulation. The command y = amod(x,Fc,Fs,'pm',deviation) is equivalent to the command y = amod(x*deviation,Fc,Fs,'pm').

[y,t] = amod(...) returns the computation time in t.

Examples

Double- and Single-Sideband Comparison Example

The first example compares the spectra of signals after modulation using the double-sideband and single-sideband techniques. The message signal is a frequency-one sine wave and the carrier signal is a 10 Hz sine wave. The script below uses the 'amdsb-sc' and 'amssb' arguments in the amod function to produce modulated signals ydouble and ysingle, respectively. It then plots the spectra of both modulated signals.

Notice that the spectrum in the left plot has two peaks; these are the lower and the upper sidebands of the modulated signal. The two sidebands are symmetrical with respect to the 10 Hz carrier frequency, Fc. The spectrum of a DSB-SC AM modulated signal is twice as wide as the input signal bandwidth. In the right plot, there is one peak because the SSB AM technique requires amod to transmit only one sideband.

Hilbert Filter Example

The next example uses a Hilbert filter in the time domain.

The resulting plot is on the left below. If you replace the sixth line above with

then modulation uses a Hilbert transform in the frequency domain. The result is the plot on the right below. The two plots differ slightly in their initial errors.

See Also
ademod, dmod, ddemod, amodce, ademodce


  ademodce amodce