# Differences

This shows you the differences between two versions of the page.

 — courses:ee3703_2017:spectrumanalyzer [2019/02/11 16:14] (current) Line 1: Line 1: + ====== Final project: Spectrum analyzer ====== + ===== Description ===== + A spectrum analyzer is useful for measuring the frequency content of a signal. If an oscilloscope plots v(t) versus t, a spectrum analyzer plots S<​sub>​v​(f) versus f where S<​sub>​v​(f) is the spectral density of v(t). In this project you'll build a simple spectrum analyzer. All the building blocks are familiar to you from previous experiments. ​ + + A basic realization of a spectrum analyzer is a very narrow bandpass filter that can be tuned to any frequency f<​sub>​0​ followed by an signal strength(rms/​envelope) detector. The output will be the strength of the input signal inside the passband of the bandpass filter. For very narrow bandwidths, there is very little variation in S<​sub>​v​(f) inside the filter'​s passband and what is measured (by an rms detector) corresponds to sqrt(S<​sub>​v​(f)*f<​sub>​b​) where f<​sub>​b​ is the filter'​s bandwidth. It is very difficult to realize a tunable narrow bandpass filter and therefore, the signal is translated using a mixer driven by a variable frequency oscillator to a fixed frequency bandpass filter. In the system above, the input frequencies are in the range 0.5-5kHz(A lower limit of 0.1kHz enables ac coupling in the signal chain). These frequencies can be upconverted to 10kHz by mixing them with a local oscillator signal in the range 10.5-15kHz. A 10kHz filter is used to extract the signal component and an envelope detector or a rectifier+filter is used to measure the signal strength. ​ + + ===== Block diagram and specifications ===== + {{:​courses:​ec330_2008:​spectrumanalyzer.png?​600}} + + The block diagram of the spectrum analyzer is shown in the above figure. Each block is described briefly below. For a more detailed description of the spectrum analyzer, see the references at the end of the page. + + * Low pass filter: This is used to reject the image frequencies-20.5-25kHz which also result in a 10kHz signal when mixed with 10.5-15kHz local oscillator. Use a fourth order Chebyshev filter realized as a cascade of two single opamp second order sections. See below for single opamp filter topologies. + * Mixer: This is used to mix the input signal with the local oscillator. Use an MC1496 double balanced modulator with a differential to single ended converter for this. + * Local oscillator: Output frequency varies from 10.5-15kHz as a linear function of the control voltage V<​sub>​ctl​. ​ + * Bandpass filter: Isolates the signal in a narrow band around 10kHz. Use a g<​sub>​m​-C filter with a quality factor of 20 for this purpose. ​ + * Envelope detector: This is used to measure the signal strength + + The control voltage V<​sub>​ctl​ to the VCO is a measure of the frequency at which the signal strength is measured and forms the X co-ordinate of the display. The output of the envelope detector is the Y co-ordinate. By sweeping V<​sub>​ctl​ slowly, it is possible to measure the signal strength versus frequency. Plotting the envelope detector output versus V<​sub>​ctl​ on the oscilloscope in X-Y mode, one can get a display of the signal spectrum. ​ + + ===== Sallen-Key filter ===== + {{:​courses:​ec330_2008:​sallenkeyfilter.png?​300}} + + The topology of a Sallen-Key filter is shown above. A fourth order Chebyshev filter with a passband attenuation of 1dB can be made with a cascade of two second order sections with {f<​sub>​p​=0.96f<​sub>​0,​ Q=3.56} and {f<​sub>​p​=0.53f<​sub>​0,​ Q=0.78} where f<​sub>​0​ is the desired passband edge(5kHz in this case). ​ Use LF347 opamps. + + ===== Bandpass filter ===== + Use the active RC filter with LF347 opamp you built in [[activercfilter|this experiment]] with V<​sub>​i1,​R​ as the input and V<​sub>​1​ as the output. Design it for a quality factor of 20 and verify it. If you are unable to realize a Q of 20 in a single stage, use two stages in cascade each with a Q of 10. + + ===== Oscillator ===== + + You can use the oscillator you built in [[oscillator|this experiment]]. ​ + + If you are bored of that topology, you can try the one below. The frequency of oscillation is given by I<​sub>​ctl/​(4C*V<​sub>​BE​). V<​sub>​BE​ ~ 0.65V. Fig. (a) shows the schematic and (b, c) show the two phases of oscillation. Choose I<​sub>​ctl​*R<​sub>​L​ to be more than a diode drop(0.65V). Take the output from the collectors to obtain a square wave. The diodes in parallel with the collector load prevent the collector voltage from going too low. (Use 1N4148 diodes whenever available. 1N4001 series diodes have thick leads which can be a bit difficult to insert into the breadboard.) + + {{:​courses:​ec330_2008:​bjtosc.png?​600}} + + ===== Envelope detector ===== + + {{envdet.png?​300}} + + A precision envelope detector is shown above. When the input voltage is greater than the output, the opamp output swings up, forward biasing the diode and completing the negative feedback loop. The output follows the input. When the input is less than the output, the opamp output swings negative, breaking the feedback loop. The output voltage is held on C<​sub>​L​ and is discharged through the resistor R<​sub>​L​. The time constant C<​sub>​L​R<​sub>​L​ should be set so that the output doesn'​t decay too much between consecutive cycles of the lowest frequency input. Use an additional RC section for filtering if necessary. + + ===== Rectifier+filter ===== + + {{hwrect.png?​400}} + + One of the problems with the precision peak detector above is that, during negative half cycles of V<​sub>​i,​ the opamp is not in negative feedback, and the output jumps to -V<​sub>​sat​. It has to jump back up to the right value and this can cause problems at higher frequencies. An alternative is to half wave rectify and filter the input as shown above. The output will be the average of the half wave rectified waveform, which is a measure of the input signal strength. + * Current flows through R<​sub>​1​||C<​sub>​1​ in negative half cycles of V<​sub>​i​ + * Choose R<​sub>​1​C<​sub>​1​ to remove the lowest input frequency + * D<​sub>​2​ maintains negative feedback around the opamp in positive half cycles of V<​sub>​i​ + * Use an additional RC section for filtering if necessary. + + ===== How to go about building it ===== + One of you can work on the envelope detector, bandpass filter, and the mixer and the other can work on the sweep oscillator and the image rejection lowpass filter. Start working backwards from the envelope detector and test each part before connecting it to the following stage. The sweep oscillator and the lowpass filter can be tested individually before connecting them to the mixer. + ===== References ===== + * [[http://​en.wikipedia.org/​wiki/​Spectrum_analyzer|Spectrum analyzer on Wikipedia]] + * {{5965-7920E.pdf|Spectrum analyzer basics}} Seminar slides from Agilent technologies ​ + * {{5952-0292.pdf|Spectrum analysis basics}} Agilent technologies application note 150