Communications Toolbox | ![]() ![]() |
Syntax
y = amodce(x,Fs,'
amdsb-tc
'
,offset); y = amodce(x,Fs,'
amdsb-sc
'
); y = amodce(x,Fs,'
amssb
'
); y = amodce(x,Fs,'
amssb/time
'
,num,den); y = amodce(x,Fs,'
amssb/time
'
); y = amodce(x,Fs,'
qam
'
); y = amodce(x,Fs,'
fm
',deviation
); y = amodce(x,Fs,'
pm
'
,deviation); y = amodce(x,[Fs initphase],...);
Optional Inputs
Input |
Default Value, or Default Behavior If Input Is Omitted |
offset |
-min(min(x)) |
deviation |
1 |
Description
The function amodce
performs analog baseband modulation. The corresponding demodulation function is ademodce
. The table below lists the modulation schemes that amodce
supports.
For All Syntaxes
The generic syntax y = amodce(x,Fs,...)
modulates the message signal that x
represents, and returns the modulated signal's complex envelope. The input and output signals share the same sampling rate Fs
, measured in hertz. (Thus 1/Fs
represents the time interval between two consecutive samples in x
.) The initial phase of the carrier signal is zero. x
is a real matrix and y
is a complex matrix. Their sizes depend on the modulation method:
x
must have an even number of columns. The odd-numbered columns in x
represent in-phase components and the even-numbered columns represent quadrature components. If x
is n-by-2m, then y
is n-by-m and each pair of columns of x
is processed separately.
x
and y
have the same dimensions. If x
is a two-dimensional matrix, then each column of x
is processed separately.
The generic syntax y = amodce(x,[Fs initphase],...)
is the same, except that the second 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 = amodce(x,Fs,
implements double-sideband amplitude modulation. '
amdsb-tc
'
,offset)
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 = amodce(x,Fs,
implements double-sideband suppressed-carrier amplitude modulation.'
amdsb-sc
'
)
y = amodce(x,Fs,
implements single-sideband suppressed-carrier amplitude modulation. By default, it produces the lower sideband. It does a Hilbert transform in the frequency domain.'
amssb
'
)
y = amodce(x,Fs,
is the same as the syntax above, except that it specifies a time-domain Hilbert filter. '
amssb/time
'
,num,den)
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 = amodce(x,Fs,
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 '
amssb/time
'
)
[num,den] = hilbiir(1/Fs)
, where num
and den
are as in the paragraph above.
y = amodce(x,Fs,
implements quadrature amplitude modulation. '
qam
'
)
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 = amodce(x,Fs,
implements frequency modulation. The bandwidth of the modulated signal is '
fm
',deviation
)
max(x)-min(x)
. The optional argument deviation
is a scalar that represents the frequency deviation constant of the modulation.
y = amodce(x,Fs,
implements phase modulation. The optional argument '
pm
',deviation
)
deviation
is a scalar that represents the phase deviation constant of the modulation.
Examples
This example is similar to the one under the heading Hilbert Filter Example on the amod
reference page, except that it uses baseband simulation. The plots in the passband (amod
) example show far more obvious errors in the recovered signal.
Fs = 100; % Sampling rate of signal [numh,denh] = hilbiir(1/Fs,15/Fs,15); % Design Hilbert filter. t = [0:1/Fs:5]'; % Times to sample the signal x = cos(t); % Signal is a cosine wave. y = amodce(x,[Fs pi/4],'amssb/time',numh,denh); % Modulate, % using a Hilbert filter in the time domain. z = ademodce(y,[Fs pi/4],'amssb'); % Demodulate. % Find order of magnitude of average difference between x and z. d = ceil(log10(sum(abs(x-z))/length(x)))
The output shows that the average difference between the original and recovered signals is smaller than 10-16.
Other examples using amodce
are in the sections Representing Analog Signals and Simple Analog Modulation Example.
See Also
ademodce
, dmodce
, ddemodce
, amod
, ademod
![]() | amod | apkconst | ![]() |