EEE117L Lab 9

docx

School

California State University, Sacramento *

*We aren’t endorsed by this school

Course

117L

Subject

Electrical Engineering

Date

Dec 6, 2023

Type

docx

Pages

8

Report

Uploaded by ConstableWren9561

ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series Objective 1. Derive the Fourier series for common periodic signals; sine, square, triangle and saw- tooth waveforms 2. Design and simulate oscillators for the various waveforms and use the Fast Fourier Transform function in PSPICE to display the Fourier Series. Section 1: Fourier Series Calculations According to Fourier analysis, a periodic function can be represented by an infinite sum of sine and cosine functions that are harmonically related. For instance, a square wave may be considered to be a superposition of an infinite number of odd harmonic frequencies whose amplitudes decrease inversely with frequency. The fundamental, or lowest frequency, is the frequency of the square wave. Figure 1 depicts how the harmonics add together to form the square wave. In this diagram, 2L is the period of the wave form and the frequency is 1/2L Figure 1, Odd harmonics add together to form a square wave. Table 1, Normalized Fourier Coefficients Wave Form Fourier Series Equation Harmonics 1 st (1Hz) 2 nd (2Hz) 3 rd (3Hz) 4 th (4Hz) 5 th (5Hz) 6 th (6Hz) 7 th (7Hz) Square Wave 1.273 0 0.423 0 0.254 0 0.182 Triangle Wave 0.811 0 -0.090 0 0.034 0 -0.016 Note: π L = 2 π 2 L For a 2V square wave with 100Hz frequency, the Fourier’s series for the first 7 harmonics is:
ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series x(t) = 2.546 sin ( 2 π 100 t ) +0.846 sin ( 2 π 300 t ) +0.508 sin ( 2 π 500 t )+ ¿ 364 sin ( 2 π 7 00 t ) In our lab, we will first design and simulate a Square Wave Oscillator and then a Triangle Wave Oscillator . We will simulate the Transient Response ( time domain ) and then use the Fast Fourier Transform ( FFT ) function in PSPICE to converter and display the signal in the frequency domain . Before simulating the circuits, let’s first calculate the Fourier coefficients and harmonic frequencies for a square wave and then a triangle wave. Scale the parameters in table 1 to fill-in the table below. Table 2: Calculated Fourier coefficients and harmonic frequencies. Wave Form Parameter Harmonics 1 st 2 nd 3 rd 4 th 5 th 6 th 7 th Square Wave 10V, 1 kHz Coefficient (amplitude) 0 0 0 Harmonic Frequency 1kHz 0 0 0 Triangle Wave 5V 500 Hz Coefficient (amplitude) 0 0 0 Harmonic Frequency 500Hz 0 0 0 Section 2: Square Wave Oscillator Operational Amplifiers make excellent low frequency square wave generators by wiring them as relaxation oscillators. Figure 2 shows a common circuit for a basic relaxation oscillator. Examination of this circuit shows that it contains two voltage dividers, each driven by the output of the op-amp and each with its output going to one of the op-amp input terminals. One of the voltage dividers is resistive and feeds back to the non-inverting input . The other voltage divider comprises of and RC circuit, R1 and C1, and generate a timing waveform to the inverting input of the op-amp. The op-amp behaves as a voltage comparator (switch) which is activated by the relative voltage levels at the two input signals. To understand the operation, assume that C1 is initially fully discharged. The output is driven to positive saturation level by the voltage divider at the op amp’s positive input (+). This applies a positive voltage to both of the voltage dividers. Under this condition, half of the positive saturation voltage is applied to the non-inverting input of the op-amp via R2-R3 resistive divider and a rising positive voltage applied to the inverting input through R1 and C1. As C1 charges up exponentially through R1 and the positive output of the op amp, the voltage at the inverting input eventually exceeds the potential at the non- inverting input. At that point, the op-amp comes out of saturation and its output swings negative. Under this condition, the voltage at the non-inverting input of the op-amp swings negative through R2 and R3, but the inverting input tends to be held steady by the charge on C1. The result is that the op-amp output abruptly switches to negative saturation. C1 begins to discharge in the negative direction via R1 and
ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series applies raising negative voltage to the inverting input. Eventually, the negative potential at the inverting terminal exceeds the negative voltage at the non-inverting terminal, causing the output to swing back into positive saturation. The sequence continues to repeat, creating a series of square waves. The period of the square wave depends on the time constant of the R1-C1 combination and on the voltage dividing ratio or R2 and R3. The operating frequency can be changed by altering any one of these variables. Note that we want to switch half way through the period of the square wave. So the switching frequency is set by using the equation, ¿ 1 2 R 1 C 1 . Figure 2, Square Wave Oscillation Amplifier 1. Calculate the RC time constant to produce a 1k Hz oscillation frequency and calculate values for R1 and C1. With PSPICE, run a transient analysis of the square wave oscillator to capture the voltage waveform at the op-amp output. Explain the relationship between the RC time constant and the frequency. In your transient response, display 5 periods of the waveform. 2. To run a Fast Fourier Transform, and select the FFT icon the PSPICE menu bar. In your lab report, show the PSPICE FFT response and compare it to the calculated Fourier series coefficients that were listed in table 2. Note: To convert the transient response to a Fourier Series, select he FFT icon on the display task bar. Also, when PSPICE converts from the transient display to the frequency domain, it will provide a very wide bandwidth. Adjust the x-axis of the display to provide better f = 1 2 R 1 C 1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series resolution of the Fourier coefficients. For the 1kHz oscillator, a 10kHz frequency band it recommended Figure 3, Notes for modifying the frequency scale of the Fourier Series Section 3: Triangle Wave Oscillator A simple triangle wave generator can be produced by placing an integrating amplifier at the output of the square wave generator. Figure 4 shows a schematic of a simple triangle wave generator. Figure 4, Triangle Wave Generator The frequency of the triangular wave will be the same as that of square wave. The integrator circuit is connected as an inverting amplifier. When the output of the square wave generator For the 1 kHz oscillator, change the x-axis to 10kHz to show the first 7 harmonics Integrating Square Wave Generator
ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series swings positive, the output of the integrator will swing low and start a transition based on the RC time constant created by R4 and C3. The square wave signal is applied to the inverting input of the op-amp through the input resistor R4. Resistor R5 in conjunction with R4 sets the gain of the integrator and resistor R5 in conjunction with C2 sets the bandwidth. After the square wave oscillator starts up, it produces an input current within the integrators inputs resistor R4. An opposing current is created in the integrating capacitor C2, The negative feedback compels the op-amp to produce a voltage at its output so that it maintains the virtual ground at the inverting input. Since the capacitor is charging its impedance Zc2 keeps increasing and the gain Zc2/R4 also keeps increasing. This results in a ramp at the output of the op-amp that increases in a rate proportional to the RC time constant ( =R4C2). This ramp increases in amplitude until the capacitor is fully charged. Note that we want to design so that the time constant is approximately half the period of the square wave. Next, when the input to the integrator (square wave) falls to the negative peak, the capacitor quickly discharges through the input resistor R4 and starts charging in the opposite polarity. Now the conditions are reversed and the output of the op-amp will be a ramp that is going to the negative side at a rate proportional to the R4C2 time constant. This cycle is repeated and the result will be a triangular waveform at the output of the op-amp integrator. 3. Modify the capacitor C1 to change the square wave oscillation frequency to 500 Hz. The gain in the integrating stage is set by the ratio of R5/R4. Start with a gain of 1. Calculate the value of C2 so that the time constant is approximately half of the square waves period to produce the . “integrating ramp” when the output of the square wave generator swings positive and negative Run the PSPICE transient simulation to verify the oscillation frequency is close to 500 Hs. Next adjust R5 as necessary so that the signal swings between +5 and -5 volts. Re-run the simulation and adjust the scaling to capture 5 periods of the waveform. 4. Use the FFT function to convert the time domain transient response to a Fourier Series in the frequency domain. Adjust the frequency scale (x-axis) on your plot to show the first 10 harmonics. Show you transient and FFT plots in your report and comment on any differences between the calculated and simulated Fourier coefficients.
ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series Section 4: Wein-Bridge Sinusoidal Oscillator A Wien bridge oscillator can produce a sinusoidal output waveform without any input. An example Wien bridge oscillator is shown in Fig. 4, which consists of a feedback amplifier with an RC band pass filter connected in the positive feedback path and a resistive divider connected in the negative feedback path. The RC network applies an attenuated, phase shifted version of Vout to the positive input terminal, while the negative input terminal receives an also attenuated but not phase shifted version of Vout. The dynamics of the feedback loop, in an attempt to equalize the potentials of the positive and negative terminals, produces the final oscillatory waveform of the output. Figure 5, Wein Bridge Oscillator The best way to understand the Wien bridge oscillator is to invoke the “virtual ground” property of feedback amplifier. Assuming that the open loop gain of the op amp is large, the voltage difference between the positive and negative terminals must be very small, i.e., V+ and V are essentially equipotential. Therefore we have: R1=R2 C1=C2 f= 1 2 πRC
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series Where R 1 =R 2 =R and C 1 = C 2 = C. Note that the transfer function of the band pass filter is real only when ω = 1/RC, which yields V+ = Vout/3. In turn, this leads to the following constraint for R3 and R4 to yield oscillation: A small signal loop gain analysis reveals that R4 ≤ R3/2 should be satisfied in order to have RHP (right half plane) poles for sustained oscillation of the Wien bridge oscillator. For further details, refer to https://www.electronics-tutorials.ws/oscillator/wien_bridge.html 5. Calculate the RC time constant and resistor values for a 1kHz oscillation. Simulate the Wein Bridge oscillator and run a transient simulation. Note that it takes some time for the Wein Bridge Oscillator to build up to full amplitude. Figure 6 shows an example of the oscillator starting up, where the simulation starts at 0 second and runs to 100 ms. Figure 6, 1kHz Oscillator Output with 100mS run time Once you have verified that the circuit is functional, you can then display a sorter run time. Figure 7, shows the transient response between 90ms and 100 ms.
ECE117L Lab 10 Operational Amplifier Oscillators and Fourier Series Figure 7, 1kHz Oscillator Output Between 90ms and 100ms 6. When you have narrowed the time period of the display, run the FFT on the sinusoid output. Scale the Fourier Series plot to have 10kHz bandwidth and include it in your report. Comment on the frequency content of the sine wave oscillator