| Signal Processing Toolbox | ![]() |
Voltage controlled oscillator.
Syntax
y=vco(x,fc,fs) y=vco(x,[Fmin Fmax],fs)
Description
y creates a signal that oscillates at a frequency determined by the real input vector or array = vco(x,fc,fs)
x with sampling frequency fs. fc is the carrier or reference frequency; when x is 0, y is an fc Hz cosine with amplitude 1 sampled at fs Hz. x ranges from -1 to 1, where x = -1 corresponds to 0 frequency output, x = 0 corresponds to fc, and x = 1 corresponds to 2*fc. Output y is the same size as x.
y scales the frequency modulation range so that ±1 values of = vco(x,[Fmin Fmax],fs)
x yield oscillations of Fmin Hz and Fmax Hz respectively. For best results, Fmin and Fmax should be in the range 0 to fs/2.
By default, fs is 1 and fc is fs/4.
If x is a matrix, vco produces a matrix whose columns oscillate according to the columns of x.
Example
Generate two seconds of a signal sampled at 10,000 samples/second whose instantaneous frequency is a triangle function of time.
fs=10000; t=0:1/fs:2; x=vco(sawtooth(2*pi*t,0.75),[0.1 0.4]*fs,fs);
Plot the spectrogram of the generated signal.
specgram(x,512,fs,kaiser(256,5),220)
Algorithm
vco performs FM modulation using the modulate function.
Diagnostics
If any values of x lie outside [-1, 1], vco gives the following error message.
X outside of range [-1,1].
See Also
|
Demodulation for communications simulation. |
|
Modulation for communications simulation. |
| upfirdn | xcorr | ![]() |