low, high and band pass filters€¦ · web viewsecondly, the theory holds true during...

12
EE211-13 Low, High and Band Pass Filters From theory to implementation Author: Zachary Rauen Experiment collaboration with Jake Brigante Writing Assignment 3 Prof. T. Ortmeyer 4/4/2014 Overview In order to reinforce the idea of filters, it was required to design a low pass filter with a low frequency gain of 2 and a corner frequency of 1KHz. Using simulation and circuit implementation the theory of filters holds true within tolerance. The reason tolerance was needed was due to common circuit error. In an ideal situation, such as during the simulation, the theory

Upload: others

Post on 29-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

EE211-13

Low, High and Band Pass Filters

From theory to implementation

Author: Zachary RauenExperiment collaboration with Jake Brigante

Writing Assignment 3Prof. T. Ortmeyer

4/4/2014

Overview

In order to reinforce the idea of filters, it was required to design a low pass filter with a low frequency gain of 2 and a corner frequency of 1KHz. Using simulation and circuit implementation the theory of filters holds true within tolerance. The reason tolerance was needed was due to common circuit error. In an ideal situation, such as during the simulation, the theory holds up indefinitely.

Page 2: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

1. Introduction

In order to demonstrate the knowledge of filters, it is necessary to properly build working models. The work done in these laboratory experiments serves to prove the theory behind these filters. The theory will be proven twofold. First, they will be proven by a simple simulation using the LTspice software. Secondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency gain of 2.0 and corner frequency of 1000 hertz. The constraint is to use a 10k ohm resistor for R¿. This requires the basic understandings of linear circuitry such as operational amplifiers, capacitors, resistors and the essential power supply and ground. This circuitry knowledge can even be used to create the theory behind the filters, but as this has already been proven before, this paper’s scope will serve as a demonstration of the understanding of filters.

2. Theory 1

Filters are developed with the use of op amp circuits with feedback. One of the widely used base circuits for op amp feedback is provided as Figure 1.

The gain of this circuit is vout divided by vin though by custom, and to make the plots easier to see and understand, this is usually turned into decibels.

Gain(db )=20 log10|V outV in

|[1]

Figure 1. Op amp with feedback

Page 3: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

This means that a change in magnitude of gain would be a change of 20db. From this definition we can start to determine the frequency response of an op amp circuit. This requires a variation of the frequency and testing of the gain in decibels in order to create the frequency response plot.

We can also determine the power of the circuit from the equation

Pout=V out2

R load [2]

which also leads us to determine the point at which the power drops by half. This ends up being P1 /2=.707V max which is also commonly called the corner frequency because it’s where the passband filter has its boundary. Though, since the frequency response uses decibels, we need to know the corner frequency in decibel terms. Using 0.707 with equation 1 gives us a drop of 3 decibels meaning the corner frequency occurs when the decibels lower by 3 from the maximum. This is also the considered to be limits of the passband filters, also known as the cutoff.

2.2. Filters

Looking back at Figure 1 it can be observed that the gain, without knowing the voltages, can be represented as a ratio of the resistors, Z fand Z¿.

T (s )=−Z fZ in [3]

For this purpose, we can ignore the negation as this theory deals with the gain only. The negation comes into play for phase shifts. This is also only true for frequencies in the workable range for the op amp.

2.3. Low Pass

Low pass filters have frequencies lower than the desired frequency pass with a constant gain while the rest drop off to zero gain. For a low pass filter, rather than using a standard resistor for Z f the filter uses a parallel RC connection. In terms of s, this would give a Z f of

Z f (s )=−11R f

+sC f=−

Rf1+sC f Rf

[4]

With equation 4 and holding Z¿ as a standard resistor this would give a circuit gain of

Page 4: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

T (s )=

−R fRin

1+sR fC f=

−K L1+s /ωL [5]

where K L is the low frequency gain and ωL is the the corner frequency with units of radians per second. Looking to the denominator, at low values of ω the gain will be high but as it approaches ωL the gain will go to zero; confirming the idea of a low pass filter. This means that the corner frequency would be

ωL=1

R fC f [6]

3. Design

For the specific design problem at hand it is imperative to use what is given to find the undetermined values such as the values of R f and C f . For R f this can be determined with the numerator of equation 5. Since R¿ and the desired gain are already known this can be simply solved to give R f=20kohm. Isolated out as equation 6 the capacitance of the circuit can be found having already found R f and given the desired ωL. Solving gives C f=7.9577nF. Also, in order to determine the proper look of the following graphs, the ideal needs to be determined; shown below as Figure 2. Note that in this figure f L represents the corner frequency.

4. Simulation 4.2. Setup

Figure 2: Ideal low pass filter.

Page 5: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

This simulation was done using the LTspice software. The base file provided was modified to fit the design specifications. The final product of which can be found as Appendix A.

4.3. Results

After running the newly adjusted program a graph of the gain versus the frequency can be made. The figure that appears is adjusted to be understandable. This becomes Figure 3.

Upon inspection of the graph the solid line is the line that is needed and the dotted line becomes ignored. To confirm the theory the corner frequency needs to be at 1000hertz meaning the graph needs to be 3 decibels below the maximum at 1KHz. This is confirmed by looking where the graph intersects the 3 decibel mark as the maximum gain is 6 decibels. On the note of the maximum gain, a gain of 2 needed to be achieved. Converting this to decibel Gain (db )=20 log (2 )=6.02db confirming that the gain desired is also reached. With both the corner frequency and the gain of the low pass filter being proven via simulation, the next step in this process is to implement this to a live circuit.

5. Implementation 5.2. Setup

To set up such a circuit would require the op amp, wires, a bread board, power source, and of course a digital multimeter (DMM) to measure the values of the output. The circuit gets built

Figure 3: Gain versus frequency for a low pass filter.

Page 6: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

according to Figure 1 where the feedback is a capacitor and a resistor rather than just a resistor. Once the circuit is built data can be read from the output pin of the op amp.

5.3. Results

In order to confirm the low pass filter accuracy multiple readouts need to be taken from the output node. Doing this at differing frequencies, as dictated by the definition of the filter, gives the following table, Table A.

Frequency (KHz)

Gain (db)

0.1 6.02060.2 6.02060.3 6.02060.5 5.483157

1 3.6368722 -0.354583 -2.853355 -7.9588

10 -13.555620 -19.172130 -21.938250 -24.437

100 -30.4576

From a quick observation of the table it can be seen that at the desired corner frequency the gain is approaching the needed 3 decibels. This can be made more understandable via plotting, shown below as Figure 3.

Table A: Decibel readings for varying frequencies

Page 7: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

10-1

100

101

102

-35

-30

-25

-20

-15

-10

-5

0

5

10Frequency versus Decibels

Frequency (KHz)

Gai

n (d

b)

It is easier to see, graphically in Figure 4, that the correct gain is achieved for low frequencies. Also it’s simpler to observe that at a frequency of 1KHz there is a clear drop towards 3 decibels as should happen with this low pass filter. This means that the implementation is also a success for the low pass filter.

6. Conclusions

From theory to implementation the idea of a filter, specifically the low pass band filter, is a confirmed success in ability and knowledge. Although, there was some deviation from the theory for values, for instance during implementation the corner frequency was not exactly 3 decibels lower. Fortunately this would not be enough to disprove the low pass filter because it is within tolerance for circuitry. For this design problem, using simulation and implementation was more than enough to prove the theory of filters. With just basic circuitry knowledge and the work provided here, it would be easily possible for someone to recreate the work. These working models prove the theory of filters, specifically the low pass filter.

7. References

[1] T. Ortmeyer. Lab 16: Filter Design and Simulation. 2014.

Figure 4: Gain versus frequency for a low pass filter.

Page 8: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

8. Appendices 8.2. Appendix A: LTspice Code * Op-Amp comparator

************************************************************************The following subcircuit was taken from*http://www.national.com:80/pf/LM/LM741.html***********************************************************************

*//////////////////////////////////////////////////////////////////////* (C) National Semiconductor, Inc.* Models developed and under copyright by:* National Semiconductor, Inc.

*/////////////////////////////////////////////////////////////////////* Legal Notice: This material is intended for free software support.* The file may be copied, and distributed; however, reselling the* material is illegal

*////////////////////////////////////////////////////////////////////* For ordering or technical information on these models, contact:* National Semiconductor's Customer Response Center* 7:00 A.M.--7:00 P.M. U.S. Central Time* (800) 272-9959* For Applications support, contact the Internet address:* [email protected]

*//////////////////////////////////////////////////////////*LM741 OPERATIONAL AMPLIFIER MACRO-MODEL*//////////////////////////////////////////////////////////** connections: non-inverting input* | inverting input* | | positive power supply* | | | negative power supply* | | | | output* | | | | |* | | | | |.SUBCKT LM741/NS 1 2 99 50 28**Features:*Improved performance over industry standards*Plug-in replacement for LM709,LM201,MC1439,748*Input and output overload protection*****************INPUT STAGE***************IOS 2 1 20N*Input offset currentR1 1 3 250KR2 3 2 250KI1 4 50 100UR3 5 99 517R4 6 99 517

Page 9: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

Q1 5 2 4 QXQ2 6 7 4 QX*Fp2=2.55 MHzC4 5 6 60.3614P************COMMON MODE EFFECT************I2 99 50 1.6MA*^Quiescent supply currentEOS 7 1 POLY(1) 16 49 1E-3 1*Input offset voltage.^R8 99 49 40KR9 49 50 40K**********OUTPUT VOLTAGE LIMITING********V2 99 8 1.63D1 9 8 DXD2 10 9 DXV3 10 50 1.63***************SECOND STAGE***************EH 99 98 99 49 1G1 98 9 5 6 2.1E-3*Fp1=5 HzR5 98 9 95.493MEGC3 98 9 333.33P****************POLE STAGE*****************Fp=30 MHzG3 98 15 9 49 1E-6R12 98 15 1MEGC5 98 15 5.3052E-15**********COMMON-MODE ZERO STAGE***********Fpcm=300 HzG4 98 16 3 49 3.1623E-8L2 98 17 530.5MR13 17 16 1K***************OUTPUT STAGE***************F6 50 99 POLY(1) V6 450U 1E1 99 23 99 15 1R16 24 23 25D5 26 24 DXV6 26 22 0.65VR17 23 25 25D6 25 27 DXV7 22 27 0.65VV5 22 21 0.18VD4 21 15 DXV4 20 22 0.18V

Page 10: Low, High and Band Pass Filters€¦ · Web viewSecondly, the theory holds true during implementation to a real working circuit. The task is to design a low pass filter with low frequency

D3 15 20 DXL3 22 28 100PRL3 22 28 100K****************MODELS USED***************.MODEL DX D(IS=1E-15).MODEL QX NPN(BF=625)*.ENDS*$

* The main Program

* comparator circuit with signal vi plus noise vnoise on input terminal* 100 with output on node 200*** node1 node2 <offset> <ampl> <freq> <td> <dampingfactor> <phase>vi 101 0 ac 1v

* op-amp terminals: +in -in +ps -ps outxOAmp 100 0 14 15 200 LM741/NS; This line calls the sub-circuit for the op-amp LM741Vcc 14 0 dc +12vVee 15 0 dc -12vRin 100 101 10kohmRf 200 100 20kohmCf 200 100 7.9557nF

* transient analysis statement* <print step value> <final time value> <no-print value> <step ceiling value>.ac dec 20 10hz 100khz* this probe statement saves all variables for plotting.probe.end