Communications Toolbox | ![]() ![]() |
Syntax
z = ademod(y,Fc,Fs,'
amdsb-tc
'
,offset,num,den); z = ademod(y,Fc,Fs,'
amdsb-tc/costas
'
,offset,num,den); z = ademod(y,Fc,Fs,'
amdsb-sc
'
,num,den); z = ademod(y,Fc,Fs,'
amdsb-sc/costas
'
,num,den); z = ademod(y,Fc,Fs,'
amssb
'
,num,den); z = ademod(y,Fc,Fs,'
qam
'
,num,den); z = ademod(y,Fc,Fs,'
fm
'
,num,den,vcoconst); z = ademod(y,Fc,Fs,'
pm
'
,num,den,vcoconst); z = ademod(y,Fc,[Fs initphase],...
);
Optional Inputs
Input |
Default Value |
offset |
Appropriate value so that each output signal has zero mean |
num, den |
[num,den] = |
vcoconst |
1 |
Description
The function ademod
performs analog passband demodulation. The corresponding modulation function is amod
. The table below lists the demodulation schemes that ademod
supports.
For All Syntaxes
The generic syntax z = ademod(y,Fc,Fs,...)
demodulates the received signal that y
represents. Fc
is the carrier frequency in hertz, and Fs
is the sampling rate in hertz. The initial phase of the carrier signal is zero.
y
and z
are real matrices whose sizes depend on the demodulation method:
y
is a length-n vector, then z
is an n-by-2 matrix. Otherwise, if y
is n-by-m, then z
is n-by-2m and each column of y
is processed separately. The odd-numbered columns in z
represent in-phase components and the even-numbered columns represent quadrature components.
y
and z
have the same dimensions. If y
is a two-dimensional matrix, then each column of y
is processed separately.
The generic syntax z = ademod(y,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. The second entry, initphase
, is the initial phase of the carrier signal, measured in radians.
ademod
uses a lowpass filter with sample time 1/Fs
while demodulating, in order to filter out the carrier signal. To specify the lowpass filter, include num
and den
in the list of input arguments. num
and den
are row vectors that give the coefficients, in descending order, of the numerator and denominator of the filter's transfer function. If num
is empty, zero, or absent, then the default filter is a Butterworth filter whose parameters come from the command below. butter
is in the Signal Processing Toolbox.
For Specific Syntaxes
z = ademod(y,Fc,Fs,
implements double-sideband amplitude demodulation. '
amdsb-tc
'
,offset,num,den)
offset
is a vector whose kth entry is subtracted from the kth signal after the demodulation. If offset
is empty, then by default z
is adjusted so that each column has mean zero (or so that z
has mean zero in case z
is a vector).
z = ademod(y,Fc,Fs,
is the same as the syntax above, except that the algorithm includes a Costas phase-locked loop.'
amdsb-tc/costas
'
,offset,num,den)
z = ademod(y,Fc,Fs,
implements double-sideband suppressed-carrier amplitude demodulation.'
amdsb-sc
'
,num,den)
z = ademod(y,Fc,Fs,
is the same as the syntax above, except that the algorithm includes a Costas phase-locked loop.'
amdsb-sc/costas
'
,num,den)
z = ademod(y,Fc,Fs,
implements single-sideband suppressed-carrier amplitude demodulation.'
amssb
'
,num,den)
z = ademod(y,Fc,Fs,
implements quadrature amplitude demodulation.'
qam
'
,num,den)
z = ademod(y,Fc,Fs,
implements frequency demodulation. The spectrum of the demodulated signal is between '
fm
'
,num,den,vcoconst)
min(y) + Fc
and max(y) + Fc
. The demodulation process uses a phase-locked loop composed of a multiplier (as a phase detector), a lowpass filter, and a voltage-controlled oscillator (VCO). If Fs
is a two-element vector, then its second element is the initial phase of the VCO, in radians. The optional argument vcoconst
is a scalar that represents the VCO constant in Hz/V.
z = ademod(y,Fc,Fs,
implements phase demodulation. The demodulation process uses a phase-locked loop (which acts as an FM demodulator) cascaded with an integrator. The phase-locked loop consists of a multiplier (as a phase detector), a lowpass filter, and a voltage-controlled oscillator (VCO). If '
pm
'
,num,den,vcoconst)
Fs
is a two-element vector, then its second element is the initial phase of the VCO, in radians. The optional argument vcoconst
is a scalar that represents the input signal's sensitivity.
Examples
This example illustrates the use of the offset
argument. Because the first ademod
command uses the same offset
value of .3 that the amod
command used, z1
is similar to the original message signal. Because the second ademod
command omits offset
, z2
has mean close to zero (not exactly zero because of roundoff error).
Fc = 25; % Carrier signal frequency Fs = 100; % Sampling rate of signal t = [0:1/Fs:5]'; % Times to sample the signals x = [cos(t), sin(t)]; % Cosine signal and sine signal y = amod(x,Fc,Fs,'amdsb-tc',.3); % Modulate % and shift the values up by .3. z1 = ademod(y,Fc,Fs,'amdsb-tc',.3); % Demodulate. z2 = ademod(y,Fc,Fs,'amdsb-tc'); % Demodulate. plot(t,z1,'b',t,z2,'r--') % Plot recovered signal.
The plot shows z1
as a solid line and z2
as a dashed line.
Other examples using ademod
are the Hilbert Filter Example on the reference page for amod
, and in Example: Varying the Filter's Cutoff Frequency.
See Also
amod
, dmod
, ddemod
, amodce
, ademodce
![]() | Functions - Alphabetical List | ademodce | ![]() |