Analog Filters Filters can be used to attenuate unwanted signals such as interference or noise or to isolate desired signals from unwanted. They use the frequency response of a measuring system to alter the dynamic characteristics of a signal. A common instrumentation filter application is the attenuation of high frequencies to avoid frequency aliasing in the sampled data. Filters can be broadly classified as: Low-pass High-pass Band-pass Notch eliminate high frequency components. eliminate low frequency components. eliminate frequencies outside of a given range or band. eliminate frequencies in a given range or band. Simple first-order systems can be used as low-pass filters because they attenuate higher frequencies more than lower frequencies. The thermocouples used in the lab would respond poorly to high frequency (> 1 Hz) temperature fluctuations. AnalogFilters.docx - November 20, 2008 - Page 1
AnalogFilters.docx - November 20, 2008 - Page 2
AnalogFilters.docx - November 20, 2008 - Page 3
Some examples of low-pass filters are given below: (Figure from Doebelin) AnalogFilters.docx - November 20, 2008 - Page 4
1 M ( ) = (3.10) 2 1/ 2 1 ( ) 1 ( ) = tan (3.9) db= 20log M ( / 2 ) = 20log M ( f ) We can improve the roll-off characteristics of a lowpass filter by cascading several stages: AnalogFilters.docx - November 20, 2008 - Page 5
Magnitude Ratio For the cascaded filter, the magnitude ratio and phase shift are: 1 M ( f ) = 2k [1 + ( f/ f 1/2 c) ] 1 2,3 (6.57, 6.60 ) ( f ) = ( f ) k i=1 i The magnitude ratio is plotted as a function of normalized frequency, f/f c where f c is the filter cutoff frequency, for values of k = 1, 2, 3, 4 and 5 below: Cascaded Butterworth Filtering 1 0.1 1 Stage 2 Stage 3 Stage 4 Stage 5 Stage 0.01 0.01 0.1 1 10 f/fc The phase shift is increased by the cascading, but that is usually not important. AnalogFilters.docx - November 20, 2008 - Page 6
To keep the later filter stages from loading down the earlier ones, try putting a unity gain amplifier between them AnalogFilters.docx - November 20, 2008 - Page 7
Here are some examples of high pass filters, from Doebelin: AnalogFilters.docx - November 20, 2008 - Page 8
Cascading can also be used to improve the performance of high-pass filters: Figure 6.32 in 2 nd and 3 rd Edition The filters described above are all passive, that is they involve no external power supply. Improved performance can be obtained from active filters, which use operational amplifiers. Some examples are shown below: AnalogFilters.docx - November 20, 2008 - Page 9
AnalogFilters.docx - November 20, 2008 - Page 10
Comparison of Common Low Pass Filter Types Figure 3 From www.maxim-ic.com Filter Basics: Anti-Aliasing AnalogFilters.docx - November 20, 2008 - Page 11
Key Features of Low Pass Filter Types a. Bessel: linear phase shift, gradual roll off b. Butterworth: Steeper roll off, nonlinear phase shift c. Chebyshev: Steep roll off, nonlinear phase shift, non-smooth pass band magnitude ratio d. Elliptic: very steep roll off, nonlinear phase shift, non-smooth pass band magnitude ratio. Example 6.6 Design a one-stage Butterworth RC Low-pass filter with a cutoff frequency of -3 db set at 100 Hz. KNOWN f c = 100 Hz, k = 1 M(100 Hz) = - 3 db =.707 FIND R, C and δ SOLUTION Remember = RC = 1/2f c for a single pole RC filter! therefore: f c = 1/2RC = 100 Hz RC = 1/200 = 0.00159 AnalogFilters.docx - November 20, 2008 - Page 12
EXAMPLE FINAL EXAM QUESTIONS: 1. Given a 1000 ohm resistor what size capacitor would be required to build a single pole Butterworth low pass filter with a cut off frequency of 100 Hz? a. 1.59 uf b. 5 uf c. 2.5 uf d. 100 uf 2. Which low pass filter type has the steepest magnitude ratio roll off? a. Bessel b. Butterworth c. Chebyshev d. Elliptic 3. Which low pass filter type has a linear phase shift? a. Bessel b. Butterworth c. Chebyshev d. Elliptic AnalogFilters.docx - November 20, 2008 - Page 13
Digital Filtering As we have discussed earlier, any reasonably "well behaved" function can be written as a Fourier Series 2n t f ( t ) = Ansin + n i=0 T We can use the Fourier series representation to filter the original signal. For example, suppose we want to filter out all frequencies greater than 10 times the fundamental frequency. Defining a new function: 10 2n t f ( t ) = Ansin + n i=0 T f'(t) will contain all frequency components of f(t) which are 10 times the fundamental frequency. It will contain none of the higher frequency components. It is a perfect low pass filter. We can also use the Fourier series to produce a high pass filter. 2n t f ( t ) = Ansin + n i=11 T AnalogFilters.docx - November 20, 2008 - Page 14
This will filter out everything with a frequency 10 times the fundamental. We can make a notch filter using: 9 2n t f ( t ) = Ansin + n i=1 T 2n t + Ansin + n i=11 T This will filter out everything with a frequency = 10 times the fundamental. Finally, a bandpass filter which will pass only the components with frequencies between 8 and 12 times the fundamental frequency is given by: 12 f t = A nt + n ( ) nsin i=8 AnalogFilters.docx - November 20, 2008 - Page 15
The disadvantage of the Fourier Series method is the time required to calculate the series. In this form the method can't be used to filter data as it is obtained. A variety of Fast Fourier Transform methods have been developed for online filtering. Faster computers have also made digital filtering more practical. Of course, these methods work only for signals which can be digitized - usually electrical voltages. Example Given the hardware in our lab design a multi-stage lowpass Butterworth filter with a cutoff frequency of 1 khz that will attenuate an input signal to the level of the quantization noise above 2 khz? The input signal can be expressed as: Given the input signal the gain must be set to 1 to avoid clipping the ±6 volt signal. Therefore the quantization level is volts. The Butterworth filter magnitude ratio needed to reduce the 2000 Hz ±1 volt signal to ±½Q is Therefore At least a 10 stage filter would be required to attenuate the 2 khz signal to the level of the quantization noise. Due to the gradual roll off of Butterworth filters many stages are needed to produce an effective anti-aliasing filter. AnalogFilters.docx - November 20, 2008 - Page 16