Lab 3 - ECE 223

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Portland Community College

ENGR 222

Lab 3: Active Filters

Author:
Lynn Nguyen

May 27, 2022


1 Introduction
In this lab, we designed various types of active bandpass filters, including multi-staged filters,
second order filters, and Sallen-Key filters. To better emulate a real-world process, we used realistic
component values for capacitance and resistance to compare to our ideal calculations. Additionally,
we used Octave as an alternative method of simulation and plotting.

2 Procedure
First, we designed a 3 stage active bandpass filter, which included a low pass stage, a high pass
stage, and optionally a final amplification stage. Each of the filter stages were to be first order. We
were given specific corner frequencies and a peak magnitude (in dB) to design to. The components
(resistors and capacitors) we chose had to have values found in a given list of realistic component
values. We then built this design in Multisim and simulated an AC sweep in order to obtain a Bode
plot of the circuit.
We repeated these steps with a narrowband bandpass filter, which had a higher quality factor,
and a Sallen-Key filter. Both of these had the same center frequency, but different bandwidths
compared to the first bandpass filter. For all of these, build the Multisim circuit only using realistic
components.
Next, we rebuilt the first staged bandpass filter to use TL072 op amps, which are real op amps
you can buy. Then, we designed any of the three previous filters in order to maximize quality factor
while maintaining a given peak magnitude. Additionally, each of the types of filters were simulated
in Octave using their transfer functions.

3 Results
3.1 Active Bandpass Filter

The center frequency ωo = ωc1 ∗ ωc2 is 948.68 Hz.
1
To decide on the component values for each stage, I used the formula RC = ωc . This meant to
achieve 300 Hz and 3000 Hz cutoff frequencies, the value of RC had to be 0.000531 and 0.0000531,
respectively. For the resistor that determined the frequency, I used a series combination of 3.3kΩ
and two 1kΩ for an equivalent resistance of 5.3kΩ. I then used either the 0.1µF or 0.01µF for the
capacitance values. This allowed me to achieve relatively ideal RC values of 0.00053 and 0.000053
for each cutoff frequency.
The tradeoff I had to make was for the other resistors, since there was a limit to the number of
resistors we could use. Ideally, the filter would have a gain of 1, so the feedback and input resistors
would have the same values. However, for that to happen, I would’ve had to use all 12 resistors in
just the filter stages. Instead, I chose to use a singular 5.6kΩ resistor, which was a close enough
value and would allow me to meet the components limit. This meant the gains were approximately

1
5% off in each stage.
R
Finally, for the last gain stage, I used the formulas |H(jω)| = − Rfi and A = 20 ∗ log10 (|H(jω)|)
Rf Rf
to find that Ri = 102/20 , since the specified gain value was 2 dB. This meant the ratio Ri had to
be approximately 1.26. To do this, I used a series combination of 10kΩ, 1kΩ, and 1.5kΩ resistors,or
an equivalent of 12.5kΩ for the feedback resistor. I used a singular 10kΩ for the input resistor.

Figure 1: Multisim diagram of the initial design, using realistic component values

Figure 2: AC sweep analysis showing the Bode plot of the initial design, with cursors at the center
and cutoff frequencies

The center frequency of the circuit was 957.26 Hz, which had an error of under 1% from the
desired frequency. However, the cutoff frequencies at 254 Hz and 3.54 kHz had errors of between
15%-18%, which was not ideal.

2
Figure 3: Closeup view showing the maximum magnitudes in dB at the different stages, with the
blue line being before the amp stage, and the green line showing the final signal after amplification

I realized that because of the low quality of each first order filter, as well as the inconsistent gain
at each stage, the magnitude would drop, for a total of -0.83 dB after the two filter stages. While
the final stage was indeed attenuating the signal by 2 dB, the final signal was lower as a result. In
order to achieve a final magnitude of 2 dB, the final amp stage would have to attenuate the signal
Rf
by about 3 dB instead. Using the formula K = 103/20 , I revised the final amp stage to have a Ri
ratio of about 1.413.

Figure 4: Multisim circuit diagram of the revised circuit with a new amplification stage

3
Figure 5: Bode plot of the revised circuit with cursors at the center frequency and cutoff frequencies

The revised filter has similar cutoff and center frequencies. However, the maximum magnitude
is now at 2.16 dB.

3.2 High-Q Bandpass Filter


Following the given textbook example, I used the following equations to find the resistor values such
that the circuit would have a quality factor Q = 10 and K = 1.259 for a final gain of 2 dB. This
assumes a circuit where ωo = 1 rad/s and C = 1 F.

R1 = Q/K = 10/1.259 = 7.943Ω


R2 = 10/(2 ∗ Q2 − K) = 10/(200 − 1.259) = 0.0503Ω
R3 = 2Q = 2(10) = 20Ω

Next, I found the frequency scale factor kf , using the center frequency of 948.68 Hz.
2π∗948.68
kf = 1 = 5960.73

I then arbitrarily chose to use 0.1 µF capacitors. This allowed me to solve for km .

km = ( k1f )( CC′ ) = 1
5960.73∗10− 7
= 1677.65

Table 1: The scaled resistance values, and the configuration of realistic resistors used to achieve
them, are shown in the below table.

4
Resistor Resistance (Ideal) Resistance (Realistic)
R1 13326.22Ω 10kΩ+3.3kΩ
R2 84.42Ω 330Ω∥330Ω∥330Ω∥330Ω
R3 33552.94Ω 15kΩ+15kΩ+3.3kΩ

Figure 6: Multisim diagram of the high-Q bandpass filter, using realistic components

Figure 7: Bode plot of the high-Q bandpass filter, with center and cutoff frequencies marked

5
The center frequency is 957 Hz, similar to that of the first 3-stage filter. However, the cutoff
frequencies are 908.25 Hz and 1002 Hz, which gives a bandpass of 93.75 Hz. Using the formula
ωo
Q = β , we see that the quality factor Q for this circuit is 10.21. Additionally, the maximum
magnitude is at 1.955 dB. Comparing the actual values of Q, gain and center frequency, we see that
the filter successfully met all three criteria within 5% error for each value.

3.3 Sallen-Key Bandpass Filter


The given criteria were that the final gain was 2 dB, fc = 948.68 Hz and Q = 10. To simplify
calculations, I used the equal R, equal C method. First, I arbitrarily chose all capacitors to be 0.01
µF.
√ √
2 2
R= ωo = 2∗π∗948.68 = 23725Ω

The only resistor that had a different value was the feedback resistor. To calculate this, I used
K=1.2589 (converted from the 2 dB criteria).

Rf = (K − 1)R = .2589 ∗ 23725 = 6142Ω

Figure 8: Multisim diagram of the Sallen-Key bandpass filter, using realistic components

6
Figure 9: Bode plot of the Sallen-Key bandpass filter, with the center and corner frequencies marked

Figure 10: Closeup view showing the maximum magnitudes in dB at the different stages, with the
blue line being before the amplification, and the green line showing the final signal after amplification

The center frequency was 954 Hz, with corner frequencies of 406.5 Hz and 2.26 kHz. This gives
a bandwidth of 1854.7 Hz. Once again, as seen in figure 10, the maximum magnitude was not 2 dB,
but the amplifier successfully attenuated the signal right before the op amp from -8.7 dB to -6.7
dB. To meet design criteria, I revised the circuit to have an amplification of approximately 10.7 dB
so the final magnitude would be 2 dB.

7
Figure 11: Multisim diagram of the revised Sallen-Key filter, with realistic components

Figure 12: Bode plot of the revised Sallen-Key filter, with cutoff and center frequencies marked

8
By changing the feedback resistance, I was able to experimentally achieve a magnitude of 2.004
dB. As I increased the gain, the quality factor increased. That meant the corner frequencies become
closer to the center frequency. This was more evident when using a feedback resistance much higher
than the other resistors.

3.4 TL072 Op-Amp


After rebuilding the circuit to use TL072 op amps, there were no noticeable changes to the filter
output, including gains, center and corner frequencies, within the audible spectrum from 20 Hz to
20kHz. However

Figure 13: Multisim diagram of the first bandpass filter, except using TL072 op amps instead

9
Figure 14: Bode plot of the bandpass filter using TL072 op amps

3.5 Maximizing Quality


Of the three types of filter shown, the filter that seems to be most easily tweaked to maximize
the quality factor while maintaining a 2 dB gain was the second, high-Q bandpass filter. It had
approximately the same number components as the Sallen-Key filter, but due to different topology,
is more flexible towards our criteria.
I was limited to how large or small resistance values could be based on the realistic components.
Since the size of the resistors are approximately proportional to Q, the maximum quality factor
were constrained in turn.
Additionally, to keep this design exercise realistic, I kept the same criteria of under 12 resistors,
4 capacitors and using realistic components.

10
Figure 15: Multisim diagram of the narrowband circuit designed to maximum quality factor

Figure 16: Bode plot of the narrowband circuit with maximized quality factor

11
I was able to achieve a quality factor of 56 using the realistic components. The bandwidth
for this circuit was just 14 Hz. At the center frequency of 909 Hz, the circuit had a gain of 2.64
dB. While this is somewhat close to the desired specifications, a filter of this high quality would
realistically not be acceptable for the criteria. Because the bandwidth is so small, the desired center
frequency of 948.68 Hz is not within it. Additionally, due to the high cutoff rate of the filter, the
magnitude at 948.68 Hz is nowhere near 2 dB. When coupled with the imprecise component values,
the high quality factor of this design actually prevents the filter from performing acceptably.

3.6 Octave Simulation


For the first staged bandpass filter, the transfer function with idealized values is as follows.

−Kωc2 s (−2.373∗104 )s
H(s) = s2 +ωc2 s+ωc1 ωc2
= s2 +(1.885∗104 )s+(3.553∗107 )

Figure 17: Idealized Bode plot of the staged bandpass filter using Octave Online

While the Bode plot here visually shares a similar quality factor to that of the Multisim one,
it has a different peak magnitude. In the Multisim version, the peak magnitude at the center
frequency was below 0 dB. This could be because the component values used in the Octave version
were exact, while the Multisim version’s were not. As a result, in each stage, the slightly off ratios
of the feedback and input impedances would’ve introduced gain.

12
Figure 18: Bode plot of the narrowband bandpass filter using Octave Online

The narrowband bandpass filter has the following transfer function:


−s
R1 C −750.4s
H(s) = s2 + 2
s+ 1 = s2 +596.1s+3.554∗107
R3 C Req R3 C 2

The Octave simulation shares approximately the same center frequency and quality factor (vi-
sually) as the Multisim simulation. It also showed that the peak magnitude was at approximately
2 dB.
The Sallen-Key filter has the following transfer function:
K
s 5306∗s
H(s) = RC
4−K
s + RC s+ 2 2
2
= s2 +(1.155∗104 )s+(3.553∗107 )
(RC)

13
Figure 19: Bode plot of the Sallen-Key filter using Octave Online

This Octave Bode plot closely matched the Multisim counterpart. This was confusing to me,
however, since this plot used the idealized transfer function that was designed to have a peak
magnitude of 2 dB. Instead, it had a peak magnitude of about -6 dB, which was what the Multisim
version had.

4 Conclusion
This lab demonstrated how design based in theory and calculations has to make compromises when
it reaches actual manufacturing and building stages. In order to build the circuits under realistic
production constraints (including component values and amounts), I had to make tradeoffs regarding
how precise different specifications, like quality factor and gain, were. Throughout the process, there
were several times the realistically designed circuits would not behave the way they ideally should.
As a result, I often had to revise the designs after testing. I thought this was good practice for how
the engineering process works.
Additionally, I got some practice working with Octave. Compared to Multisim, Octave is not
as intuitive as it is not as visual and more math and script oriented. However, I think this did well
to reinforce the theory and math behind transfer functions better.

14

You might also like