modulate
|
Page in progress. |
Modulation for modeling communication systems.
| Library |
|
Arguments
Input arguments
#
fs —
sampling rate
Arbitrary type
Details
The sampling rate specified as a real positive scalar.
#
method —
The modulation method
Arbitrary type
Details
The modulation method used, possible values:
-
"am"or"amdsb-sc"— amplitude modulation, two side bands, suppressed carrier. Multipliesxon a sinusoid with a frequency fc.y = x.*cos(2*pi*fc*t)
-
amdsb-tc— amplitude modulation, two side bands, transmitted carrier. Subtracts the scalar valueoptfromxand multiplies the result by a sinusoid with a frequency fc.y = (x-opt).*cos(2*pi*fc*t)
If you do not specify
opt, thenmodulateuses the default valuemin(min(x))so that the useful signal(x-opt)is non-negative and has a minimum value of `0'. -
amssb— amplitude modulation, single sideband. Multipliesxon a sinusoid with frequencyfcand adds the result to the Hilbert transformxmultiplied by a phase - shifted sinusoid with frequencyfc.y = x.*cos(2*pi*fc*t)+imag(hilbert(x)).*sin(2*pi*fc*t)
This method effectively eliminates the upper sideband.
-
"fm"— frequency modulation. Creates a sinusoid with an instantaneous frequency that varies depending on the useful signalx.y = cos(2*pi*fc*t + opt*cumsum(x))
The function
cumsumis a rectangular approximation of the integral ofx. Themodulatefunction usesoptas a frequency modulation constant. If you do not specify the valueopt, thenmodulateuses the default valueopt=(fc/fs)*2*pi/(max(max(x))), therefore the maximum frequency deviation fromfc`will be `fcHz. -
"pm"— phase modulation. Creates a sinusoid with a frequency offc`the phase of which varies depending on the useful signal `x.y=cos(2*pi*fc*t + opt*x)
-
pwm" is pulse width modulation. Creates a modulated pulse width signal based on the pulse lengths in `x. Elements ofxare in the range from0to1and determine the duration of each pulse in fractions of a period. The pulses start at the beginning of each carrier period, meaning they are aligned to the left. When calling the functionmodulate(x,fc,fs,"pwm","centered")"the pulses are centered at the beginning of each period. The length of `_(y,t)is equal tolength(x)*fs/fc. -
"ppm"— pulse-position modulation. Creates a pulse-position modulated signal from the pulse positions inx. Elements ofxare in the range from0to1, setting the left edge of each pulse in fractions of a period. The valueoptis a scalar from0to1, which defines the length of each pulse in fractions of a period. The default value foroptis0.1'. The length of `_(y,t)is equal tolength(x)*fs/fc. -
"qam" is quadrature amplitude modulation. Creates a signal using quadrature amplitude modulation from the signals
xandopt.y = x.*cos(2*pi*fc*t) + opt.*sin(2*pi*fc*t)
#
x —
a useful signal
Arbitrary type
Details
a useful signal defined as a real vector or matrix.
#
fc —
carrier frequency
Arbitrary type
Details
The carrier frequency used to modulate the useful signal is given as a real positive scalar.