ECE 1201 Electronic Measurements and Circuits Laboratory
Total Page:16
File Type:pdf, Size:1020Kb
ECE 1201 – Electronic Measurements and Circuits Laboratory
Experiment #7 -- Frequency Response of Filters
INTRODUCTION
With circuits containing energy storage elements, we are often interested in the steady state response rather than the transient response. An important special case arises when the sources in a system are periodic. Periodic sources are either sinusoidal or can be modeled as a linear sum of sinusoids. An analog signal is filtered by using it as the input to a circuit that changes the signal’s frequency content. Some examples of analog filtering are the use of filters to to attenuate 60 Hz or 120 Hz “noise” due to the power line or low-pass filtering to reduce “hiss” in audio. Usually, we think of filter circuits in a 2-port sense, where we have an input and output port with input and output signals represented by voltages or currents. The circuits shown on the following page are 2-port circuits with the function generator (FG) providing the input. In this lab, we’ll focus on voltage signals. We characterize a filter by its “frequency response” i.e. the transfer function as a function of frequency. The transfer function is the output voltage divided by the input voltage. The transfer function has two independent parameters: magnitude and phase. A plot of the frequency response or transfer function of a circuit shows the variation of its magnitude and phase with frequency. For a variety of reasons, both magnitude and phase are usually plotted against the log of frequency (usually in radians). Further, the magnitudes are also typically plotted on a log scale (i.e., in terms of decibels (dB) =20*log 10[magnitude]). Phase is usually plotted in units of degrees (not radians) over the range (-180, +180] degrees.
EXPERIMENT
A. Single Stage Filters Three single stage filter circuits are given on the following page. The first two are passive and the third is an active filter (so-called because it employs an op-amp).. The third filter is an active filter and is particularly easy to analyze since the transfer function can be expressed as
Vo (jω) / Vi (jω) = - Z2 (jω) / Z1 (jω), where Z2 is the impedance in the feedback loop (i.e. C in parallel with R2) and Z1 is the impedance in the input leg of the circuit (i.e. R1).
For each of these three circuits, do the following:
1. For the pre-lab derive the transfer function: H(jw)=Vo(jw)/Vi(jw) for each of the three filters. Use impedance notions and voltage divider relationships. Include inductor resistance in your calculations (this will require you to measure the resistance of the inductors before you do the prelab). For each circuit plot the magnitude and phase responses using linear axes. Then plot these more carefully using a log scale for frequency, a log scale for magnitude and a linear scale for phase (Bode plots). MatLab can do these calculations automatically (FREQS function). To use this function the transfer function must be written as a quotient of two polynomials in power of s = j, These amplitude and phase plots from FREQS should be included in the prelab. Please plot the frequency scale as a linear scale. Next, use Pspice to generate plots of the amplitude of the transfer functions versus frequency. The Pspice calculations can be done either as part of the pre-lab or as part of the work that you do in lab. Characterize the kind of filter each seems to represent: e.g. low-pass, high-pass, band-pass, band-reject, etc. Export each plot of amplitude versus frequency to an Excel spread sheet. (In Pspice, click of the name of the vaiable in the output plot, then Control C (to copy) and Control V (to paste into an Excel spreadsheet.)
2. Design an experimental procedure, applicable to all three circuits, to determine the frequency response of each of the circuits. (Have this design included in your pre-lab. The design should suggest the frequency range to be scanned and the voltage amplitudes to be used.) In the lab build each circuit and evaluate its magnitude response over an appropriate range of frequencies. Be sure to take a large number of data points over the frequency range where the filters’ responses are changing rapidly. You may assume that the capacitors are ideal, but you will want to make separate DC measurements of the resistance of all inductors. In this part you may use any available Labview programs to facilitate your data acquisition (e.g., the automatic measurement of a magnitude response). The link to the sweep demo (instrument interface) is found on under-ee on “conmael1.ee.pit.edu” (L), sweep demo, executable, sweepVI.exe You will need to follow the Labview instructions in order to use this link.
Copy each transfer function into the spreadsheet that has the theoretical predictions of amplitude versus frequency and compare the experimental result to theory.
R
+ V V L o FG i -
Filter 1: R = 510 ; L = 1mH
C L
Vo V R FG i
Filter 2: C = .1 F ; L = 22 mH; R = 2 K
R2
C R1 - + Vo FG Vi Filter 3: R1 = 1 K ; R2 = 10 K ; C = .1F B. Band-Pass Cascade Filter In this part of the experiment, we are going to cascade band- pass filters (of the same type as in part A, filter 2) in order to get more pronounced changes in the magnitude response as we vary frequency. This will give us a more selective band-pass filter. In the design that we’ll be using (shown below), the stages are not well isolated, so a correct theoretical analysis would be fairly complicated. This is just the right kind of application for a simulation tool like PSpice, so no hand calculations will be necessary in the prelab analysis of this filter. In your pre-lab, prepare PSpice simulations of the circuit (below) and run an “AC Sweep” (over roughly the range 10 Hz to 100KHz) to generate plots of the magnitude responses at V1, V2 and V3 in the circuit. Also, look up the Fourier Series coefficients for a square wave with no DC offset (i.e. average value of 0), so you have a sense of which harmonics exist in a square wave. Here are some references concerning the expansion of a square wave into a sum of sinsusoids: a) Dorf and Svoboda, Introduction to Electric Circuits, 7th edition (old edition ECE 0031, 0041 text)-see pages 718-719 and 723-725) [similar material is on pages 680-1 in the 6th edition and in Exercise 15.3-1, page 743 of the 8th edition], b) Hayt, Jr., Kemmerly and Durbin, Engineering Circuit Analysis, 6th edition (old ECE 0031, 0041 text)-see pages-652-653 (problem 18.3) or/and pages 664-665 (Example 18.4. Be sure to set τ = T/2), c) Signals and Systems, 2 nd edition, Oppenheim and Willsky, pages 193-4 (Be sure to set the time that the square wave is on (2T1 to one half of the period T).
Choose R in the 200-390 ohms range and choose L and C to give a center frequency somewhere in the 2Khz to 10Khz range. ( L = 22 mH is a convenient value.) (Use convenient values: those which you can assemble from components in your lab-kit)
C C L C L L V1 V2 V3
R FG R R
In the lab session, build the filter:
1. Measure the magnitude responses experimentally at V1, V2, and V3 and compare them to the pSpice simulations. What is the effect of the cascade on the shape of the magnitude
response? For your comparison of V3 with pSpice you should capture the data file from pSpice and plot the theoretical data from pSpice on the same graph as the experimental (LabView) data. The input voltage (output from the FG) will vary with frequency. It is necessary to take a data file of the input voltage versus frequency.
Copy each transfer functions into the spreadsheet that has the theoretical predictions of
amplitudes V1, V2 and V3 versus frequency and compare the experimental results to theory.
2. Now change the FG to square wave mode with 5 Vpp and no DC offset. Vary the frequency of the FG from about 50 Hz up to an order of magnitude beyond the center frequency of your filter. Observe qualitatively how the output waveform changes at each of the 3 “taps” on the
filter (V1, V2, V3). Is there a special frequency for the input square wave where the output V 3 is a good looking sinusoid? If you can find such a frequency, can you relate it to the harmonics you expect to see for the square wave? Take representative sketches. Please note: The variation of square wave frequency should be done by hand i.e. do not use Labview to vary the frequency of the square wave.
If you realized each stage of the cascade with an op amp filter, how would this ease your analysis of the cascade in the case where you have no available CAD tools? (Hint: typical op amp filters have very low output impedance and moderate to high input impedances).
Update: February 15, 2006 Minor updates, part A, October 9, 2006 Update October 8, 2007 Update B1 October 22, 2007, Typo correction October 18, 2010. Small changes made November 2, 2010. Update October 12, 2011. Changes to references in part B, October 14, 2011. Update on theory/experimental comparison October 19, 2011. Typo corrected February 21, 2012 Revised August 21, 2017