ECEN 2612 PSpice and Fourier Analysis (10.0 points) Lab #8

Name:

Partner:

Objective: To use OrCAD PSpice to examine the active filter from an earlier lab and the harmonic content of a periodic signal. The periodic signal to be used is a square wave.

For reference, the Fourier series for a square wave v(t) of amplitude Vm and period T is

where . Note: The fundamental amplitude is , only odd harmonics are present, and the harmonic amplitudes decrease as 1/n.

Procedure:

1.  Set-up and tuning (2.0 points)

a)  Build this circuit in PSpice. In this step, use a sinusoidal VAC source for Vi and set its amplitude to 1V. Also, use the “ua741/opamp” for the OpAmp.

Obtain a plot of output/input (gain) vs. frequency using the AC sweep analysis. Be sure to use a DEC (log) frequency variation and vary frequency from about 10x below to 10x above the resonant frequency, fo. How many points per decade are needed for a good plot? Is 100 points per decade enough or too many? Carefully measure the value of fo. Compare it with the value you obtained from the experimental active filter lab which used this circuit (Lab #7).

b)  Now obtain a square wave source for Vi. Use a VPWL_RE_FOREVER piece-wise linear source. Before you connect it into the circuit above, build a simple PSpice test circuit consisting of the VPWL source connected to a single R. Then use TRANsient analysis to plot several periods of the waveform and be sure you have a nice square wave. Try adjusting some values to be sure you know how to use this source.

Here are suggestions for several of the PWL source parameters. Double-click on the part to edit its part parameters.

TSF = Period of the waveform; VSF = 1.0;

FIRST_nPAIRS = (0, 0) (1m, +1) (0.5, +1) (0.501, -1) (1, -1) (1.001, 0)

TSF is a time scale factor, and can be used to easily change the period without re-entering the PWL string of numbers. VSF is a voltage scale factor, and you should leave this set to 1.0 since that is the amplitude of the PWL numbers already.

2.  Finding harmonics (3.0 points)

Now replace Vi with the PWL source that you tested. Be sure the frequency of the PWL source is equal to your filter’s resonant frequency for this replacement. Use TRAN analysis to obtain a plot of Vi and Vo together. Be sure you set TRAN analysis with sufficient number of time points to give smooth curves. Vo should look somewhat like the fundamental sine wave since the filter is passing that frequency. Measure its amplitude. Compare it with the theoretical value obtained from the Fourier equation for the square wave. Are we overlooking anything? Discuss your results.

Now change only the frequency of the PWL source to fo / 2 (multiply TSF by 2), and obtain another plot of Vi and Vo together. Measure the amplitude of Vo; this will be the amplitude of the second harmonic of the square wave. Again, compare with the theoretical value. Repeat for fo/3, fo/4, … fo/7. This will get you the results for the 3rd and higher harmonic outputs. You do not need to print out the plots for fo/5, fo/6, fo/7.

3.  PSpice Fourier (2.0 points)

You may have noted the presence of “Fourier Analysis” in the PSpice TRAN setup under Output File Options. Set TSF back to 1/ fo. Then, do a “Fourier Analysis” of the Vi square wave source itself, and compare its results with your other work and with the theory. Study the output and explain what you get.

4.  Removing the Q enhancing (1.0 point)

Change the filter in the following ways: (a) move R4 to be in parallel with R3 and connected to ground; (b) compute new values for R1a and R1b so that their parallel resistance is the same as before but the divider ratio R1a/(R1a+R1b) is 11 times larger than before. This removes the Q-enhancing positive feedback (the R3, R4, resistors) but keeps the center frequency and center-frequency gain about the same.

Basically repeat (1a) ONLY by running an AC sweep over a suitable frequency range in order to plot the filter magnitude response. Print a hardcopy of the plot and mark on it longhand the position and values of the quantities needed to obtain the results asked for. Hint: Plot the output/input ratio instead of just the output in order to get the gain directly from the plot, like in Step 1a.

Measure the quality factor (Q) both before and after the changes. Put all the results in a small table which should contain the center frequency in Hz, the center-frequency gain, the half-power bandwidth in Hz, and the quality factor for both cases. Use the graphs from Step 1a. and 4 to complete these calculations. Compare filters from Steps 1 & 4.

5.  Summary of results (1.0 point)

Discuss your results with the filter and summarize the results from step 2 in a table containing the PSpice and theoretical amplitudes for each of the first 7 harmonics of the square wave.

Normally with PSpice work like this, at least one example schematic, one printed .OUT file, and several Probe outputs must be included. Write some NOTES and other careful labeling on your PSpice printouts. Set the PSpice “print area” appropriately for your circuit schematic to allow for maximum clarity of your work. And print PSpice work using the PSpice print capabilities, not copy/paste unless you can do that with good resolution.

REPORT: Keep a complete record of all data, results, observations, and answers to questions, written neatly and legibly on the unlined side of standard engineering paper. Attach the lab sheet as a cover. (1.0 points)

This is due at the end of next lab session!

P.Munro 30-March-2015 02:08 PM Page 1 of 2