Wednesday, June 30, 2010

WHAT IS A FIRST ORDER ACTIVE FILTER?



What is an active low pass filter? Fig. 1 shows a simple first order low pass filter. Since it is a linear time invariant amplifier, we can write the transfer function in the frequency domain as

G = Vo / Vi = K * Wo / (s + Wo)

where K is the basic DC gain (see the link below for more information on op-amps), and we define s and Wo as

s = j * 2 * Pi * f, (j is the square-root of minus one, Pi = 3.14159…, and f is the frequency of computation.)

Wo = 2 * Pi * fo . fo = 1 / (2*Pi*R2*C)

K = - R2 /R1

where fo is the “cut-off frequency” of the filter. Since the filter is a first order filter, a Bode plot of gain vs. frequency would show that at the cut-off frequency, fo, the gain will decline at the rate of -20db per decade of increase of frequency.

A more useful and practical way to compute gain of this filter is to compute its absolute (non-complex) value as

Gabs = K * Wo / (W^2 + Wo^2)^1/2

In words, the above equation would read absolute gain is the product of K, and Wo, divided by the square root of the sum of the squares of W and Wo.

We can intuitively see that if W >> Wo the impedance of C will be a lot less than R2 and the gain will be very low, essentially blocking high frequencies from passing. In the high frequency range the circuit acts as an integrator. On the other hand, if W is much less than Wo, the impedance of C becomes very large compared to R2 so the low frequencies are passed all the way down to and including DC signals.

WHAT IS A FIRST ORDER HIGH PASS FILTER?



What are the basic equations for the first order high pass filter shown in Fig. 1?



In the frequency domain for a time invariant linear network we can write the transfer function of gain from input to output as



G = Go * s / (s + Wo)



where s = j *2 *Pi *f, and j is the square root of -1, Pi = 3.14159… , and f is the frequency variable. Go is the gain in the pass band and Wo = 2*Pi*fo. fo is the frequency at filter cut-off. G is the complex gain and the expression shows us that the transfer function has what is called a “zero” in its response at f=0, and a “pole” in its response at Wo (the cut-off frequency in radians.) A more practical equation has been derived from taking the absolute value of the gain and expressing it as



Gabs = Go*W / (W^2 + Wo^2)^1/2



where W= 2*Pi*f. From the above equation we see that as W becomes much greater than Wo, the response approaches Go = -R2 / R1. We can also see that as f approaches zero, the gain also approaches zero.


Lastly, we can easily compute the cut-off frequency fo as



fo = 1 / (2*Pi*R1*C)



The first order high pass filter is useful for removing very low frequency noise from a signal. But due to its first order characteristic, its roll-off below the cut-off frequency fo is only -20db per decade of frequency. So for example if the cut-off frequency is 10KHZ, the signal would be down to -80db at 1 HZ, assuming we had zero db in the pass band, or a gain of 1.0.

WHAT IS A SALLEN-KEY FILTER?

The Sallen-Key filter can be configured in a number of different ways. We will discuss a low pass filter shown in Fig. 1. (at bottom of post.) This is a second order filter and provides 40db attenuation per decade of frequency above the cut-off frequency. This is a useful circuit for applications where we wish to obtain a fairly rapid roll-off with a one-stage filter.

I won’t go into the transfer function equation here. If you want to study it, you can find the equation on Wikipedia. But to explain my design procedure (which is not found on Wikipedia), we do need to know the equations for the cut-off frequency, fo, and the quality factor, Q, of the circuit which are as follows:

fo = 1 / ( 2 * Pi * (R1*R2*C1*C2)^1/2)

The inner parenthetical quantity is the square-root of the product of the R’s and C’s multiplied together.

Q = ((R1*R2*C1*C2)^1/2) / (C2*(R1+R2))

where again the numerator is the square-root of the product of R’s and C’s. These are the equations we need to design the circuit.

First we combine the two equations to get the product of fo and Q:

Q*fo = 1 / (2*Pi*(R1+R2)*C2)

A Butterworth maximally flat filter would have a Q equal to the reciprocal of the square-root of two. For ease of calculation here, I will set Q = 1 to obtain a simple equation for fo:

fo = 1 / (2*Pi*(R1+R2)*C2)

where in all of the above Pi = 3.14159…

Assume that we want a filter with a 10KHZ cut-off and we are satisfied with a Q = 1 which will provide a reasonably flat response in its pass band. Then we know that the quantity important to the cut-off frequency is

(R1+R2)*C2 = 1 / (2*Pi*fo) = 1.5915 X 10^-5

The units of the above are reciprocal radian frequency. Let C2 be set to a reasonable value of say 1 nano-farad. (Don’t make C2 too large a value because C1 will need to be even larger.) Now we have that

R1+R2 = 15910

So as a quick approximation let us set R1 = R2 = 8K ohms each so the total is 16K ohms. Then we can calculate C1 from the square of our first equation above as

C1 = 1 / (4*Pi^2*R1*R2*fo^2*C2)

C1 = 3.957 X 10^-9 ~ 4 nano-farad

Now let’s check the design by calculating fo and Q:

fo = 1 / (2*Pi*(R1*R2*C1*C2)^1/2) = 9947 Hz

That is close enough to our original goal of a 10KHZ cut-off frequency.

Now for Q:

Q = (R1*R2*C1*C2)^2 / (C2*(R1+R2)) = (8000^2*4X10^-9*1X^-9)^1/2 / (1X^-9*16000) = 1.0

The calculated value of Q agrees with our original decision to set Q = 1.

I have now completed the design of the filter so that we have the following component values:

R1 = R2 =8K

C1 = 1X10^-9

C2= 4X10^-9

Q = 1.0

fo = 10KHZ

In fact I simulated the design using a 1MHZ JFET input op-amp and had the following results:

fo ~ 12.7KHZ (-3db down frequency)

flatness 1.3 db DC to 7KHZ

40 db per decade attenuation above 10KHZ

-54 db at 300KHZ then rising slowly to -46db at 1MHZ.

The response was very smooth with no ring or ripple in the pass-band, with a steady 40db per decade roll-off after cut-off.


The Butterworth Filter

The Butterworth filter is a class of filters that meet certain mathematical characteristics and performance characteristics that can be met by certain filter types both passive and active. The Butterworth filter theory was developed by Stephen Butterworth in 1930. The theory is still applied today.
A Butterworth filter is maximally flat in the pass band-- that is no ripples, and has a monotonic shape in its pass band and in its stop band. The Butterworth filter is the only type that is monotonic in the stop band as opposed to Bessel, Chebyshev, and elliptic filter types which are not. In the stop band, the Butterworth filter rolls off at a rate of -20db per decade for each order. First order is -20db slope. Second order is -40db. Third order is -60db, etc. But the Butterworth filter does not have as sharp a cut-off slope as the other filter types. The Butterworth filter has a more linear phase response in its pass band.

The transfer function for the Butterworth filter can be written in terms of its poles of its characteristic equation (the denominator of the function.) There are no zeroes in the function which accounts for its monotonic characteristic.

H(S) = Ho /(II(k=1,n) (S-Sk)/Wc)

Ho = DC gain
II(k=1,n) means the product of the factors to follow
S=complex radian frequency = j*2*Pi*f
Sk’s = roots or pole locations in terms or radian frequency
Wc = j*2*Pi*Fo , the radian frequency for the cut-off frequency Fo
k,n is an index range for the product of factors to indicate the order of the filter from 1 to order n

The Butterworth polynomials have been calculated for normalized Butterworth filters (by setting the cut-off radian frequency Wc = 1.) We will list the first 3 Butterworth polynomials here. Higher orders can be looked up in standard tables found in most filter texts, or on the Internet by searching on “Butterworth filters.”

n=1 s+1

n=2 s^2 + sqrt( 2) * s + 1

n=2 (s + 1) * (s^2 + s + 1)

The root of the above polynomials are all negative and lie on the unit circle surrounding 0,0 on the complex plane.