Transfer Functions and Linear Active Networks Using Operational Amplifiers

25
Transfer Functions and Linear Active Networks Using Operational Amplifiers Written By: Sachin Mehta University of Nevada, Reno

Transcript of Transfer Functions and Linear Active Networks Using Operational Amplifiers

Page 1: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Transfer Functions and Linear Active Networks Using Operational Amplifiers

Written By: Sachin MehtaUniversity of Nevada, Reno

Page 2: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Abstract: The application of filters in the world of electronics and most everything around us in the world is an important area that needs to be studied and improved, if possible. Different types of filters can give the user specific responses and outputs that can be modified quite simply and with ease, but only if the transfer function is known. The analysis of the transfer function gives an algebraic representation of a linear, time-invariant filter—and is especially useful in the frequency domain. The analysis of the circuit depicted in Figure 1 was completed in various ways and the outputs were then studied and compared. For example, the circuit shown in Figure 1 was physically put together on the Jameco breadboard, with components provided in the Capstone Laboratory room. For example, three Bode Plots of the circuit were assembled: one using Matlab, another from MultiSim, and the last one was generated using a function generator and the spectrum analyzer in the lab room. Having these different plots helped illustrate the significance of percent error that arise with varying engineering techniques. Figure 4 displays the data obtained from the physical circuit compared to the ideal Bode Plot of the circuit’s transfer function. It is apparent that there is some percent discrepancy among the obtained data and how the circuit should act in theory.

Procedure: By inspection, this laboratory experiment involved a great deal of circuit theory and principles however will not be discussed in great detail in the remainder of this report. Using these circuit principles, equations were derived from the circuit schematic shown in Figure 1. It was important to recognize that the network in question was implemented using an integrator, an adder, and an inverting amplifier.

Figure 1: Circuit Schematic of Active Network with Adder, Integrator, & Inverting Amplifier

2

Page 3: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Part 1 of the lab experiment had various parts—the first of which involved circuit analysis. Node equations were developed and manipulated in order to find the voltage transfer function

of the circuit. They can be summarized as is done below, which eventually gave the voltage transfer function of the electronic circuit—called H(s).

V 1=−V ¿−V 3

V out=−V 1

j∗R∗C∗ω

−V out=V 3

V ¿=−V 1−V 3

V out=( −1j∗R∗C∗ω

)×(−V 1−V 3)

V out=( −1j∗R∗C∗ω

)×(−V ¿+V out)

V out=( V ¿

j∗R∗C∗ω )−(V out

j∗R∗C∗ω)

V outV ¿×(1+ 1

j∗R∗C∗ω )=( 1j∗R∗C∗ω )

V outV ¿

=( 1jωRC+1 )

V outV ¿

( s)=( 1RCs+1 )=H (s) (1)

With Eq. (1)—the transfer function—now known, various responses and transient responses were able to be analyzed for the circuit. For example, using the Laplace transform theory of convolution, we were able to determine the unit impulse of the linear active network. Taking the inverse transform of out transfer function provided us with the impulse response. I developed a code for Matlab which gave the inverse Laplace transform of our transfer function above (Eq. (1)).

3

Page 4: Transfer Functions and Linear Active Networks Using Operational Amplifiers

By inputting the correct resistance and capacitance values, the calculated unit impulse for the network in Fig. 1 was found to be:

e−tRC

RC = e

−t10000∗.01× 10−6

10000∗(0.01×10−6) = 10000 e

−t10000∗.01×10−6 = 10000 e−10000 t

As in the impulse response, the parameters you find in a second order system determine aspects of the step response. The damping ratio, ϛ, will determine how much the system oscillates as the response decays toward steady state. The undamped natural frequency, ωn, determines how fast the system oscillates during any transient response. And finally, the DC gain simply determines the size of the steady state response when the input settles out to a constant value. One can think of the step response simply as the integral of the impulse response.

Note that the impulse response of a filter, in the time domain, is proportional to the bandwidth of the filter in the frequency domain. This means that the narrower the impulse—the wider the bandwidth of the filter. So using Matlab we were able to determine this response and the plot is shown in Fig. 2. This plot displays the unit impulse response of our active network. It is trivial to compare this response to the unit impulse function found above and examine that they are in fact the same.

4

Page 5: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Figure 2: Ideal Impulse Response of Transfer Function using Matlab

On the other hand, the step response of the lab’s circuit was found to be the plot shown in Fig. 3. Taking the integral of the impulse response was performed using Matlab giving the step response of our circuit to be:

s ( t )=∫ 10000e−10000 t=−e−10000 t

Figure 3: Matlab Output of Step Response of Network

5

Page 6: Transfer Functions and Linear Active Networks Using Operational Amplifiers

One of the most important outputs that were found in this lab experiment was the Bode Plot of the circuit over a specific frequency range. Both the magnitude and phase plots can be viewed in Fig. 4—and it is important to note that this output shows both the Transfer Functions Bode Plot, as well as the experimental Bode Plot superimposed on the same plot. It is shown clearly and specified on the plot which magnitude (dB) data is which.

Figure 4: Bode Plot of Matlab Output and Experimental Data Bode Plot

Part 2 of this lab experiment was the modeling of our circuit in state space representation. These sets of simultaneous differential equations allows for x to be a state variable vector and the coefficents to be arranged in matrices. We assumed that x(0) = 0 and then applied the Laplace transform to obtain the following:

6

Page 7: Transfer Functions and Linear Active Networks Using Operational Amplifiers

That equation can be written in terms of the output voltage in our circuit. Using Matlab, the state space representation of our circuit was found from the following code:

Using Matlab, we again determined models of the impulse response, as well as the unit step response and developed plots of these. However, for this section of the lab experiment we plotted the step and impulse of the state-space model of the circuit. The state differential equations are simply just another way to describe a dynamic system. The state variables shown above in the clip of Matlab code simply provide and describe the future response of the active network in Fig. 1. Using Matlab, we were also able to develop the impulse response of the state-space model (Fig. 5) and the step response of the state-space model (Fig. 6). The state-space model of our circuit from Fig. 1 was found to be as follows:

x=−10000 x+128V ¿

V out=78.13x+0V ¿

7

Page 8: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Figure 5: Unit Impulse Response of State-Space Model of Circuit

Figure 6: Unit Step Response of State-Space Model of Circuit

Comparing Figures 2 and 5 with each other show that the state-space model of the circuit is truly just another way to represent the dynamic system shown in Fig 1. Along the same lines, one can examine Figures 3 and 6 with each other and can determine that the outputs are indeed the same. This was double-checked by using the tracing cursor on both of the step

8

Page 9: Transfer Functions and Linear Active Networks Using Operational Amplifiers

response plots. At a time of 0.0004053 seconds, the amplitude reached was a mere 0.9826 V. On both plots (Fig. 3 & 6)—this data point was determined to be the exact same—showing that the results obtained from the transfer function’s step response and the state-space step response were equivalent.

Part 3 of this laboratory experiment involved the detailed design of the same circuit from Fig. 1. Using an online electronics dealer—Mouser—I was able to determine the estimated cost that it would take in order to construct this filter, using three LF347N operational amplifier, one capacitor, and six resistors. Of course, the total cost shown in Table 1 ($ 95.01) is estimated due to the various and abundant electronics parts that are being manufactured today.

Table 1: Part Supply List for Active Network shown in Fig. 1

Component Type

Description

Mouser Part # Mfr. Part # Manufacturer Voltage Rating or Operating

Supply Voltage(V)

Tolerance Power Rating

Price per

Unit($)

Units Total Price ($)

Operational Amplifier

595-LF347N LF347N Texas Instruments

7 to 36 +/- 3.5 V to +/- 18 V

N/A 0.75 3 2.25

Metal Foil Resistor (10 kΩ)

71-S102JT10K000T

B

Y078510K0000T9L

Vishay Precision

Group

300 0.01% 600mW 15.25 6 91.50

Capacitor (0.01µF)

598-715P10356KD3

715P10356KD3 Cornell Dubilier

600 5% N/A 1.26 1 1.26

95.01

My detailed design also involved the implementation of the MultiSim program—and electrical circuit design suite—that is very convenient and helpful in construction and analysis. Fig. 7 depicts the circuit that I designed—again using the same LF347N Wide Bandwidth Quad JFET Input Operational Amplifier and the same resistors and capacitors from the schematic in Fig. 1. The Fig. 8 below shows all the pin-pin connections, and the only part not quite realistic is the use of all three of the amplifiers’ voltage rails. Since in reality, the actual pin connection of the op amp (LF347N) shown in the parts list has a total of only two of voltage rails (pins) that will power each of the 4 inverting op amps in the package.

9

Page 10: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Figure 7: Linear Active Network with Operational Amplifier Design with MultiSim

Figure 8: Pin Connections for LF347N Operational Amplifier

Part 4 of the laboratory experiment was the practical part of the experiment and involved the actual construction of a physical circuit on the breadboard. Using six 10 kΩ resistors provided by the course instructor and one 0.01 µF capacitor, along with a wire kit, we were able to design the same circuit in Fig. 1. We supplied the circuit with +/- 5 Vp-p and studied the outputs from both the oscilloscope, as well the dynamic spectrum analyzer (Stanford Research Systems Model SR785). By using the function generator, we supplied our circuit at a specified frequency

10

Page 11: Transfer Functions and Linear Active Networks Using Operational Amplifiers

and obtained the plots shown in Fig. 9—which depicts the Bode Plot of our circuit (magnitude plot). By examining the plot carefully, we can see the cutoff frequency (or the -3dB point).

Figure 9: Spectrum Analyzer Output of Bode Plot (Magnitude plot)

The output of the phase from the spectrum analyzer, on the other hand, is depicted in Fig. 10 but also clearly shows the cursor at the -3dB point (or the cutoff frequency)—giving the cutoff frequency of our circuit.

Figure 10: Spectrum Analyzer Output of Bode Plot (Phase plot)

Knowing the theoretical cutoff frequency equation (Eq. 2), we were able to compare the experimental corner frequency with it. The calculation of the theoretical cutoff frequency was done as follows:

fc = 1

2π RC =

1

2π 10000∗(0.01∗10−6)=1591.55Hz

11

Page 12: Transfer Functions and Linear Active Networks Using Operational Amplifiers

If you look at the magnitude Bode Plot, it is clear that the -3.014 dB point takes place at a frequency of 1.696 kHz or 1696 Hz. There lies a percent error among this value and the theoretical value. The percent error is as follows:

|1696−1591.55|1591.55

×100=6.56%

This amount of error could be the result of percent discrepancies in the resistors that were used, as well as the capacitor. Ideally, the resistors should have been 10 kΩ, but in reality they are not. In addition, the calibration of the machinery and equipment that was used could have affected our results. Moreover, the percent discrepancy that was calculated was done using the -3.014 dB point from the spectrum analyzer plot—not the exact -3 dB point. This definitely had an impact on the 6.56% result.

Sending a square wave at a specified voltage to the input of our circuit, using a frequency of 1 kHz allowed us to obtain the step response of our linear active network. Fig. 11 clearly shows the oscilloscope output screenshot that was obtained during the experiment.

Figure 11: Oscilloscope Output of Physical Circuit

In an ideal amplifier, the input voltage is a unit step function, and the output voltage is also a unit step function, but the practical amplifiers used in the experiment cannot change their output instantaneously, if the input changes suddenly. Comparing this output to Fig. 3 & Fig. 6

12

Page 13: Transfer Functions and Linear Active Networks Using Operational Amplifiers

shows that the circuit which we built was in fact the linear network which we wanted. The step responses of both the state-space model and the transfer function both look similar to the unit step response that is displayed above in Fig. 11.

Part 5 of the laboratory experiment involved using MultiSim to obtain a step response of the network in Fig. 7. This response could be compared to the ideal Matlab response, as well as the experimental step response in order to see if the circuit was behaving as it should. The step response output or transient analysis obtained from MultiSim is shown below in Fig. 12.

Figure 12: Step Response with MultiSim

The output shown above shows a input signal given to the circuit and the output response (the exponential plot). The output above shows a similar step response to that of Fig. 3 (Step Response of Transfer Function with Matlab), Fig. 6 (Step Response of State-Space Model with Matlab) and Fig. 11 (Experimental Oscilloscope Step Response Output).

Part 6 of the laboratory experiment used circuit theorems and the relatively minimal use of algebra. Knowing the cutoff frequency that was found above from the Eq. (2), we designed another low pass filter that would meet the same exact specifications of the circuit shown in Fig. 1.

Rearranging the cutoff frequency equation—and solving for the capacitance gives C= 12πR f c

Choosing a 10 kΩ resistor and plugging in 1.696 kHz as the corner frequency gives:

C= 1

2π 10000∗(1.696×103)=9.384×10−9 F

13

Page 14: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Building a schematic of our circuit design using MultiSim (Fig. 13) allowed us to obtain a step response for the circuit. Inputting a 5 V input voltage resulted in the step response of Fig. 14.

Figure 13: Equivalent Circuit Schematic of Circuit in Fig. 1

Figure 14: MultiSim Step Response Output of Equivalent Circuit

14

Page 15: Transfer Functions and Linear Active Networks Using Operational Amplifiers

The filter that is displayed above is a simple first order low-pass active filter. It has a simple RC filter stage and has a unity gain feedback.

The transfer function of this low pass filter is the same as that shown in Eq. (1). For this circuit the transfer function is as follows:

( 1RCs+1 )=( 1

10000∗(9.384∗10−9)s+1 )=¿ ( 1

9.384∗10−5 s+1 )=H eq(s)

We then applied Matlab in order to analyze the step response of H(s) shown above. The code used for this was as follows:

The step response that we obtained as a Matlab output is depicted in Fig. 15 below. By comparing this to the response obtained in Fig. (3), as well as Fig. (6), we found that these plots are in fact similar. This coincides with our goal of finding an equivalent circuit to that of Fig. 1, by using only one operational amplifier.

15

Page 16: Transfer Functions and Linear Active Networks Using Operational Amplifiers

Figure 15: Matlab Output of Step Response of Equivalent Circuit Transfer Function

In addition, we were able to compare the Bode Plots from the plots shown earlier in this report.

Figure 16: Bode Plot of Equivalent Circuit’s Transfer Function

16

Page 17: Transfer Functions and Linear Active Networks Using Operational Amplifiers

The Bode Plot above, if examined, is of close comparison to that plot shown in Fig. 4 from this lab report. There is likely some amount of percent error that could be a result of Matlab using the theoretical transfer function to plot the magnitude and phase of the equivalent circuit, while MultiSim did not. These errors are usually always the case in experiments, but the goal is always to reduce these percentages to as minimal as possible. This can provide proof that the data provided is very accurate.

Part 7-Questions

a) A low pass filter, like the circuit constructed for this lab, has many applications in practice. One important thing that all audiophiles must have is a subwoofer—which takes out all high frequencies and only uses the low frequencies. This results in the shaking of vehicles and the noise filled movie theatres. Digital algorithms also use these filters in order to smooth data sets, blur images, and things of that nature. Their importance in the field of electronics will never be underestimated and will always be used. Musicians also find the need for filters in order to have the required spectral information that they want to play and harmonics at different levels.

b) The circuit constructed during this lab can be thought of as stable because the poles of the closed loop transfer function are found in the left half of the s-plane. The left half of this plane is equivalent to being negative and real—meaning that if a pole is located here, then the system is stable. Another aspect of this stability is the Nyquist Diagram of this circuit and its transfer function. Shown below, in Fig. 14, is the Nyquist Plot for this lab experiment’s circuit.

Figure 14: Nyquist Diagram of Transfer Function and Circuit

17

Page 18: Transfer Functions and Linear Active Networks Using Operational Amplifiers

c) When analyzing a unit impulse response of a filter circuit, it is easiest to relate it to the transfer function of the circuit—that is the voltage transfer function or H(s). Their relationship is simply that the inverse Laplace Transform of the transfer function gives the impulse response of the circuit. However, one has to make sure that the transfer function is in terms of the s-domain (or the frequency domain). For our circuit, larger values for the resistors, and the capacitor would in turn make it take longer for our circuit to reach its steady state value. This would result in a change of the corner frequency—making it change to a lower frequency.

Summary: The laboratory experiment conducted and discussed about in this report provided an in-depth view into the world of filter analysis and its relationship to feedback control systems. Designing the linear active network (Fig. 1) was completed in order to analyze various parts of circuit theory and engineering. The Bode Plots, made throughout this laboratory experiment, were all constructed using different engineering tools that were at our disposal—including MultiSim, Matlab, and the Spectrum Analyzer from the laboratory room itself. The Bode Plots in Fig. 4 show an important aspect of this lab—and the use of simple transfer functions. Obtaining the Bode Plot from the transfer function with Matlab, and comparing it to our Bode Plot made from actual experimental data reinforced the principle fact that Eq. (1) was indeed the response of the circuit in Fig. 1. It is important to note that the spectrum analyzer output (Fig. 9 & Fig. 10) found the cutoff frequency of our circuit to be 1.696 kHz at a phase of 44.43°. In ideal conditions, this phase should have been 45°--and the percent discrepancy between our experimental data and the expected value was calculated to be 1.283%. This was considered a negligible amount of error—meaning that our experimental data pulled from our constructed breadboarded circuit and the spectrum analyzer was very accurate. This percent error was most likely the result of using resistors and capacitors that are never 100% the correct values. In addition, the equipment like the function generator, the power supply, and even the spectrum analyzer may not have been calibrated properly. One important aspect of this lab was the modeling of a circuit—whether it is with a transfer function, the state-space model, or even with the use of specific engineering software. This laboratory experiment took all three of these methods and applied them to the analysis of the active network seen in Fig. 1. The results found by applying the transfer function—Eq. (1)—found the step response (Fig. 3) to be the same as when the state-space transformation was used (Fig. 6). These plots—being the exact same—clearly displayed that there are in fact various ways to model the active filter from Fig. 1. In fact, even another completely different circuit (Fig. 13) gave a step response exactly the same as that of Fig. 3. This result displays the principle of filter design and that different circuits can be used for the same application with the same cutoff frequency. Moreover, the application of Laplace Transform theory showed how mathematical equations relate to circuit

18

Page 19: Transfer Functions and Linear Active Networks Using Operational Amplifiers

analysis and the impulse response/step response. This laboratory experiment delved into the fact that the impulse response simply means how the circuit behaves due to a specific input. This laboratory experiment was indicative of the type of work that might be done at an electronics firm of some sort, where it is crucial to be familiar with how software (like Matlab and MultiSim) work –and how they relate and can be used in order to find all sort of data (Bode Plots, Laplace Transforms, Integrals, Filter Design, AC Analyses, Transient Analyses, etc).

19