<< Chapter < Page Chapter >> Page >
An oscillator creates a sinusoidal oscillation with a specified frequency f and input Φ(t)
An oscillator creates a sinusoidal oscillation with a specified frequency f 0 and input Φ ( t ) .

There are many ways to build oscillators from analog components. Generally, there is an amplifier and a feedback circuit thatreturns a portion of the amplified wave back to the input. When the feedback is aligned properly in phase, sustained oscillationsoccur.

Digital oscillators are simpler, since they can be directly calculated; no amplifier or feedbackare needed. For example, a “digital” sine wave of frequency f Hz and a phase of Φ radians can be represented mathematically as

s ( k T s ) = cos ( 2 π f k T s + Φ ) ,

where T s is the time between samples and where k is an integer counter k = 1 , 2 , 3 , ... . [link] can be directly implemented in M atlab :

f=10; phi=0;                % specify frequency and phase time=2;                     % length of timeTs=1/100;                   % time interval between samples t=Ts:Ts:time;               % create a time vectorx=cos(2*pi*f*t+phi);        % create cos wave plotspec(x,Ts)              % draw waveform and spectrum
speccos.m plot the spectrum of a cosine wave (download file)

The output of speccos.m is shown in [link] . As expected, the time plot shows an undulating sinusoidal signalwith f = 10 repetitions in each second. The spectrum shows two spikes,one at f = 10  Hz and one at f = - 10 Hz. Why are there two spikes? Basic Fourier theory shows thatthe Fourier transform of a cosine wave is a pair of delta functions at plus and minus the frequency of thecosine wave. The two spikes of [link] mirror these two delta functions. Alternatively, recall thata cosine wave can be written using Euler's formula as the sum of two complex exponentials, as in [link] . The spikes of [link] represent the magnitudes of these two (complex valued) exponentials.

A sinusoidal oscillator creates a signal that can be viewed in the time domain as in the top plot, or in the frequency domain as in the bottom plot.
A sinusoidal oscillator creates a signal that can be viewed in the time domain as in the top plot, or in the frequencydomain as in the bottom plot.

Mimic the code in speccos.m to find the spectrum of a cosine wave

  1. for different frequencies f=1, 2, 20, 30 Hz,
  2. for different phases Φ = 0 , 0 . 1 , π / 8 , π / 2 radians,
  3. for different sampling rates Ts=1/10, 1/1000, 1/100000 .

Let x 1 ( t ) be a cosine wave of frequency f = 10 , x 2 ( t ) be a cosine wave of frequency f = 18 , and x 3 ( t ) be a cosine wave of frequency f = 33 . Let x ( t ) = x 1 ( t ) + 0 . 5 * x 2 ( t ) + 2 * x 3 ( t ) . Find the spectrum of x ( t ) . What property of the Fourier transform does this illustrate?

Find the spectrum of a cosine wave when

  1. Φ is a function of time. Try Φ ( t ) = 10 π t ,
  2. Φ is a function of time. Try Φ ( t ) = π t 2 ,
  3. f is a function of time. Try f ( t ) = s i n ( 2 π t ) ,
  4. f is a function of time. Try f ( t ) = t 2 .

The second element: linear filters

Linear time invariant filters shape the spectrum of a signal. If the signal has too much energy in the low frequencies,a highpass filter can remove them. If the signal has too much highfrequency noise, a lowpass filter can reject it.If a signal of interest resides only between f * and f * , then a bandpass filter tuned to passfrequencies between f * and f * can remove out-of-band interference and noise. More generally, suppose that a signal has frequencybands in which the magnitude of the spectrum is lower than desired and other bands in which the magnitude is greater than desired.Then a linear filter can compensate by increasing or decreasing the magnitude.This section provides an overview of how to implement simple filters in M atlab . More thorough treatments of the theory, design,use, and implementation of filters are given in Chapter  [link] .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Software receiver design. OpenStax CNX. Aug 13, 2013 Download for free at http://cnx.org/content/col11510/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Software receiver design' conversation and receive update notifications?

Ask