Top Banner
LAB REPORT 3 EXPERIMENT A.LAB EXAM Implement and design : Lowpass Filter Highpass Filter Bandpass Filter Tools : MATLAB/SIMULINK B.THEORICAL INTRODUCTION TO FILTER DESIGN A filter is a system, which is designed to limit the spectrum of the signal to preassigned frequencies. The goal is to transfer the frequencies (frequency components) of the pass band as distortionless as possible and to cut the stop band frequencies. Usually the filters are of low pass, high pass, band pass or band stop type. A filter is a network that provides perfect transmission for signal with frequencies in certain passband region and infinite attenuation in the stopband regions. Such ideal characteristics cannot be attained, and the goal of filter design is to approximate the ideal requirements to within an acceptable tolerance. Filters are used in all frequency ranges and are categorized into three main groups: Low-pass filter (LPF) that transmit all signals between DC and some upper limit c and attenuate all signals with frequencies above c .
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lab Report 3

LAB REPORT 3

EXPERIMENT

A.LAB EXAM

Implement and design :

Lowpass Filter

Highpass Filter

Bandpass Filter

Tools : MATLAB/SIMULINK

B.THEORICAL

INTRODUCTION TO FILTER DESIGN

A filter is a system, which is designed to limit the spectrum of the signal to preassigned frequencies. The goal is to transfer the frequencies (frequency components) of the pass band as distortionless as possible and to cut the stop band frequencies. Usually the filters are of low pass, high pass, band pass or band stop type.

A filter is a network that provides perfect transmission for signal with frequencies in certain passband region and infinite attenuation in the stopband regions. Such ideal characteristics cannot be attained, and the goal of filter design is to approximate the ideal requirements to within an acceptable tolerance. Filters are used in all frequency ranges and are categorized into three main groups: Low-pass filter (LPF) that transmit all signals between DC and some upper limit c and

attenuate all signals with frequencies above c.

Page 2: Lab Report 3

High-pass filter (HPF) that pass all signal with frequencies above the cutoff value c and

reject signal with frequencies below c.

Band-pass filter (BPF) that passes signal with frequencies in the range of 1 to 2 and reject

frequencies outside this range. The complement to band-pass filter is the band-reject or band-stop filter.

Page 3: Lab Report 3

In each of these categories the filter can be further divided into active and passive type. The output power of passive filter will always be less than the input power while active filter allows power gain. In this lab we will only discuss passive filter. The characteristic of a passive filter can be described using the transfer function approach or the attenuation function approach. In low frequency circuit the transfer function (H()) description is used while at microwave frequency the attenuation function description is preferred. Figure 1.1a to Figure 1.1c show the characteristics of the three filter categories. Note that the characteristics shown are for passive filter.

Figure 1.1A � A low-pass filter frequency response.

A Filter

H()

V1() V2()

1

2

V

VH

1

21020

V

VLognAttenuatio

c

|H()

1 Transfer

function

Attenuation/dB

0

c

3

10

20

30

40

Attenuation/dB

0

c

3

10

20

30

40 c

|H()

1 Transfer

function

Page 4: Lab Report 3

Figure 1.1B � A high-pass filter frequency response.

Figure 1.1C � A band-pass filter frequency response.

Realization of Filters At frequency below 1.0GHz, filters are usually implemented using lumped elements such as resistors, inductors and capacitors. For active filters, operational amplifier is sometimes used. There are essentially two low-frequency filter syntheses techniques in common use. These are referred to as the image-parameter method (IPM) and the insertion-loss method (ILM). The image-parameter method provides a relatively simple filter design approach but has the disadvantage that an arbitrary frequency response cannot be incorporated into the design. The IPM approach divides a filter into a cascade of two-port networks, and attempt to come up with the schematic of each two-port, such that when combined, give the required frequency response. The insertion-loss method begins with a complete specification of a physically realizable frequency characteristic, and from this a suitable filter schematic is synthesized. Again we will ignore the image parameter method and only concentrate on the insertion loss method, whose design procedure is based on the attenuation response or insertion loss of a filter. The insertion loss of a two-port network is given by:

21

1

load todeliveredPower

source thefrom availablePower

load

incIL P

PP (2.1)

Where is the reflection coefficient looking into the filter (we assume no loss in the filter).

Design of a filter using the insertion-loss approach usually begins by designing a normalized low-pass prototype (LPP). The LPP is a low-pass filter with source and load resistance of 1 and cutoff frequency of 1 Radian/s. Figure 2.1 shows the characteristics. Impedance transformation and frequency scaling are then applied to denormalize the LPP and synthesize different type of filters with different cutoff frequencies.

1

|H()

1 Transfer

function

2

Attenuation/dB

0

1

3

10

20

30

40 2

A Filter

H()

V1() V2() RS =1

RL =1

Attenuation/dB

0

c = 1

3

10

20

30

40

Page 5: Lab Report 3

Figure 2.1 � A normalized LPP filter network with unity cutoff frequency (1Radian/s).

I. LOWPASS-FILTERS

1.1. Fundamentals of low-pass filters

The most simple low-pass filter is the passive RC low-pass network shown in Figure 2.1

Figure 2.1 First � order passive RC low-pass

Its transfer function is:

Where the complex frequency variable, s j , allows for any time variable signals. For pure

sine waves, the damping constant, , becomes zero and s j

For a normalized presentation of the transfer function, s is referred to the filter�s corner

frequency, or -3dB frequency, C , and has these relationships:

With the corner frequency of the low-pass in Figure 2 being 1/ 2Cf RC , s becomes s = sRC

and the transfer function A(s) results in:

The magnitude of the gain response is:

For frequency 1 , the rolloff is 20dB/decade. For a steeper rolloff, n filter stages can be connected in series as shown in Figure 2.2. To avoid loading effects, op amps, operating as impedance converts, separate the individual filter stages.

Page 6: Lab Report 3

Figure 2.2. Fourth � order Passive RC Low-pass with Decoupling Amplifiers

The resulting transfer function is:

In this case that all filters have same cut-off frequency, Cf , the coefficients

become, 1 2 .... 2 1nn , and Cf of each partial filter is 1/ times higher than

Cf of the overall filter

Figure 2.3 shown the results of a fourth-order RC low-pass filter. The rolloff of each partial filter (Curve 1) is -20dB/decade, increasing the roll-off of the overall filter (Curve 2) to 80dB/decade.

Page 7: Lab Report 3

Figure 2.3. Frequency and Phase Responses of a Fourth-order Passive RC low-pass filter

In comparision to the ideal low-pass, the RC low-pass lacks in the following characteristics:

The passband gain varies long before the corner frequency,. Cf thus amplifying the upper

passband frequencies less than the lower passband The transition from the passband into the stopband is not sharp, but happens gradually,

moving the actual 80-dB roll by 1.5 octaves above Cf

The phase response is not linear, thus increasing the amount of signal distortion significantly

The gain phase response of a low-pass filter can be optimized to satis fy one of the following three criteria:

1. A maximum passband flatness, 2. An immediate passband � to � stopband transition 3. A linear phase response

For that purpose, the transfer function must allow for complex poles and needs to be of the following type:

Where A0 is the passband gain at dc, and ai and bi are the filter coefficients.

Page 8: Lab Report 3

Since the denominator is a product of quadratic terms, the transfer function represents a series of cascaded second-order low-pass stages, with ai and bi being positive real coefficients. These coefficients define the complex pole locations for each second-oerder filter stage, thus determining the behavior of its transfer function.

Low-pass prototype (LPP) filters have the form shown in Figure 2.6 (An alternative network where the position of inductor and capacitor is interchanged is also applicable). The network consists of reactive elements forming a ladder, usually known as a ladder network. The order of the network corresponds to the number of reactive elements. Impedance transformation and frequency scaling are then applied to transform the network to non-unity cutoff frequency, non-unity source/load resistance and to other types of filters such as high-pass, band-pass or band-stop. Examples of high-pass and band-pass filter networks are shown in Figure 2.5 and Figure 2.6 respectively.

Figure 2.4 � Low-pass prototype using LC elements.

Figure 2.5 � Example of high-pass filter, note the position of inductor and capacitor is interchanged as compared with low pass filter.

Figure 2.6 � Example of band pass-filter, the capacitor is replaced with parallel LC network while the inductor is replaced with series LC network.

L1=g2 L2=g4

C1=g1 C2=g3 RL= gN+1

1

L1=g1 L2=g3

C1=g2 C2=g4 RL= gN+1 g0= 1

L2 L1

C1 CN

C2 L2

L1 C1 L3 C3

CN LN

Page 9: Lab Report 3

1.2 Examples Low-pass Filters

1.2.1. Butterworth Low-pass Filter

The Butterworth low-pass filter provides maximum passband flatness. Therefore. A Butterworth low-pass is often used as anti-aliasing filter in data converter applications where precise signal levels are required across the entire passband.

Figure 2.7 plots the gain response different orders of Butterworth low-pass filters versus the normalized frequency axis,.. the higher the filter order, the longer the passband flatness.

The frequency response of the Butterworth Filter approximation function is also often referred to as "maximally flat" (no ripples) response because the pass band is designed to have a frequency response which is as flat as mathematically possible from 0Hz (DC) until the cut-off frequency at -3dB with no ripples. Higher frequencies beyond the cut-off point rolls-off down to zero in the stop band at 20dB/decade or 6dB/octave. This is because it has a "quality factor", "Q" of just 0.707. However, one main disadvantage of the Butterworth filter is that it achieves this pass band flatness at the expense of a wide transition band as the filter changes from the pass band to the stop band. It also has poor phase characteristics as well. The ideal frequency response, referred to as a "brick wall" filter, and the standard Butterworth approximations, for different filter orders are given below.

Note that the higher the filter order, the higher the number of cascaded stages there are within the filter design, and the closer the filter becomes to the ideal "brick wall" response. However, in practice this "ideal" frequency response is unattainable as it produces excessive passband ripple.

Where the generalised equation representing a "nth" Order Butterworth filters frequency response is given as:

Page 10: Lab Report 3

Where: n represents the filter order, Omega ù is equal to 2ð� and Epsilon å is the maximum pass band gain, (Amax). If Amax is defined at a frequency equal to the cut-off -3dB corner point (�c), å will then be equal to one and therefore å2 will also be one. However, if you now wish to define Amax at a different voltage gain value, for example 1dB, or 1.1220 (1dB = 20logAmax) then the new value of epsilon, å is found by:

Where:

H0 = the Maximum Pass band Gain, Amax.

H1 = the Minimum Pass band Gain.

Transpose the equation to give:

The Frequency Response of a filter can be defined mathematically by its Transfer Function with the standard Voltage Transfer Function H(jù) written as:

Where:

Vout = the output signal voltage.

Vin = the input signal voltage.

j = to the square root of -1 (√-1)

ù = the radian frequency (2ð�)

Note: (jù) can also be written as (s) to denote the S-domain. and the resultant transfer function for a second-order low pass filter is given as:

Page 11: Lab Report 3

Figure 2.7 Amplitude response of Butterworth Low-pass Filters

1.2.2. Tschebyscheff low-pass filters

The Tschebyscheff low-pass filters provide an even higher gain rolloff above�However, as Figure 2.8 shows, the passband gain is not monotone, but contains ripples of constant magnitude instead. For a given filter order, the higher the passband ripples, the higher the filters rolloff

Figure 2.8. Gain responses of Tschebyscheff low-pass filters

With increasing filter order, the influence of the ripple magnitude on the filter rolloff diminishes.

Page 12: Lab Report 3

Each ripple accounts for one second-order filter stage. Filters with even order numbers generate ripples above the 0-dB line, while filters with odd order numbers create ripples below 0 dB.

Type I:

These are the most common Chebyshev filters. The gain (or amplitude) response as a function of angular frequency ù of the nth order low pass filter is

where is the ripple factor, ù0 is the cutoff frequency and Tn() is a Chebyshev polynomial of the nth order.

The passband exhibits equiripple behavior, with the ripple determined by the ripple factor . In the passband, the Chebyshev polynomial alternates between 0 and 1 so the filter gain will

alternate between maxima at G = 1 and minima at . At the cutoff

frequency ù0 the gain again has the value but continues to drop into the stop band as the frequency increases. This behavior is shown in the diagram on the right. (note: the common definition of the cutoff frequency to −3 dB does not hold for Chebyshev filters!)

The order of a Chebyshev filter is equal to the number of reactive components (for example, inductors) needed to realize the filter using analog electronics.

The ripple is often given in dB:

Ripple in dB =

so that a ripple amplitude of 3 dB results from

An even steeper roll-off can be obtained if we allow for ripple in the stop band, by allowing zeroes on the jù-axis in the complex plane. This will however result in less suppression in the stop band. The result is called an elliptic filter, also known as Cauer filters.

Page 13: Lab Report 3

Log of the absolute value of the gain of an 8th order Chebyshev type I filter in complex frequency space (s = ó + jù) with å = 0.1 and ù0 = 1. The white spots are poles and are arranged on an ellipse with a semi-axis of 0.3836... in ó and 1.071... in ù. The transfer function poles are those poles in the left half plane. Black corresponds to a gain of 0.05 or less, white corresponds to a gain of 20 or more.

For simplicity, assume that the cutoff frequency is equal to unity. The poles (ùpm) of the gain of the Chebyshev filter will be the zeroes of the denominator of the gain. Using the complex frequency s:

Defining − js = cos(è) and using the trigonometric definition of the Chebyshev polynomials yields:

Solving for è

where the multiple values of the arc cosine function are made explicit using the integer index m. The poles of the Chebyshev gain function are then:

Page 14: Lab Report 3

Using the properties of the trigonometric and hyperbolic functions, this may be written in explicitly complex form:

where m = 1, 2,..., n and

This may be viewed as an equation parametric in èn and it demonstrates that the poles lie on an

ellipse in s-space centered at s = 0 with a real semi-axis of length and

an imaginary semi-axis of length of

The above expression yields the poles of the gain G. For each complex pole, there is another which is the complex conjugate, and for each conjugate pair there are two more that are the negatives of the pair. The transfer function must be stable, so that its poles will be those of the gain that have negative real parts and therefore lie in the left half plane of complex frequency space. The transfer function is then given by

where are only those poles with a negative sign in front of the real term in the above equation for the poles.

Gain and group delay of a fifth-order type I Chebyshev filter with å = 0.5.

Page 15: Lab Report 3

The group delay is defined as the derivative of the phase with respect to angular frequency and is a measure of the distortion in the signal introduced by phase differences for different frequencies.

The gain and the group delay for a fifth order type I Chebyshev filter with å=0.5 are plotted in the graph on the left. It can be seen that there are ripples in the gain and the group delay in the passband but not in the stop band.

Type II

Also known as inverse Chebyshev, this type is less common because it does not roll off as fast as type I, and requires more components. It has no ripple in the passband, but does have equiripple in the stopband. The gain is:

In the stop band, the Chebyshev polynomial will oscillate between 0 and 1 so that the gain will oscillate between zero and

and the smallest frequency at which this maximum is attained will be the cutoff frequency ù0. The parameter å is thus related to the stopbandattenuation ã in decibels by:

For a stopband attenuation of 5dB, å = 0.6801; for an attenuation of 10dB, å = 0.3333. The frequency fC = ùC/2ð is the cutoff frequency. The 3dB frequency fH is related to fC by:

Page 16: Lab Report 3

Again, assuming that the cutoff frequency is equal to unity, the poles (ùpm) of the gain of the Chebyshev filter will be the zeroes of the denominator of the gain:

The poles of gain of the type II Chebyshev filter will be the inverse of the poles of the type I filter:

where m = 1, 2, ..., n . The zeroes (ùzm) of the type II Chebyshev filter will be the zeroes of the numerator of the gain:

The zeroes of the type II Chebyshev filter will thus be the inverse of the zeroes of the Chebyshev polynomial.

for m = 1, 2, ..., n.

Page 17: Lab Report 3

1.2.3 Bessel Low-pass filters

The Bessel low-pass filters have a linear phase response over a wide frequency range, which results in a constant group delay in that frequency range. Bessel low-pass filters, therefore, provide an optimum square-wave transmission behavior. However, the passband gain of a Bessel low-pass filter is not as flat as that the Butterworth low-pass, and the transition from passband to stopband is by far not as sharp that of a Tschebyscheff low-pass filter

Figure 2.9. Comparison of phase response of fourth-order low-pass filters

A Bessel low-pass filter is characterized by its transfer function

Page 18: Lab Report 3

where èn(s) is a reverse Bessel polynomial from which the filter gets its name and ù0 is a frequency chosen to give the desired cut-off frequency. The filter has a low-frequency group delay of 1 / ù0.

The transfer function of the Bessel filter is a rational function whose denominator is a reverse Bessel polynomial, such as the following:

The reverse Bessel polynomials are given by:

where

1.3.Low-pass Filter Design

Figure 2.10. Cascading Filter Stages for Higher-Order Filters

The transfer function of a single stage is:

Page 19: Lab Report 3

02

( )(1 )i

i i

AA s

a s b s

For first-order filter, the coefficient b is always zero ( 1 0b ), thus yielding:

0

1

( )1

AA s

a s

The first-order and second-order filter stages are the building blocks for higher-order fil-ters. Often the filters operate at unity gain (A0=1) to lessen the stringent demands on the op amp�s open-loop gain. 1.3.1. First-Order Low-Pass Filter

Figure 2.11. First-Order Noninverting Low-Pass Filter

Figure 2.12. First-Order Inverting Low-pass Filter

The transfer functions of the circuits are:

2

3

1 1

1

( )1 C

R

RA s

R C s

and

2

1

2 1

( )1 C

R

RA s

R C s

The negative sign indicates that the inverting amplifier generates a 0180 phase shift from the filter input to the output. The coefficient comparison between the tow transfer functions and :

Page 20: Lab Report 3

20

3

1R

AR

and 20

1

RA

R

1 1 1Ca R C and 1 2 1Ca R C

To dimension the circuit, specify for the corner frequency ( Cf ), the dc gain ( 0A ), and capacitor

1C , and the solve for resistors 1R and 2R :

11

12 C

aR

f C and 1

212 C

aR

f C

2 3 0( 1)R R A and 21

0

RR

A

Note, that all filter types are identical in their first order and 1 1a . For higher filter orders,

however, 1 1a because the corner frequency of the first-order stage is different from the corner

frequency of the overall filter.

1.3.2. Second-order Low-pass Filter

There are two topologies for a second-order low-pass filter, the Sallen-Key and the Multiple Feedback (MFB) topology.

Sallen � Key topology:

Figure 2.13. General Sallen-Key Low-pass Filter

Figure 2.14. Unity-Gain Sallen-Key Low-pass Filter

Page 21: Lab Report 3

Multiple Feedback topology

Figure 2.15. Second-order MFB Low-pass Filter.

1.3.3. Higher � order Low-pass Filter

Higher-order low-pass Filter are required to sharpen a desired filter characteristic. For that purpose, first-order and second-order filter stages are connected in series, so that the product of the individual frequency responses results in the optimized frequency response of the overall filter.

1.4. High-Pass Filter Design

By replacing the resistors of a low-pass filter with capacitors, and its capacitors with resistors, a high-pass filter is created

Figure 2.12. Low-pass to High-Pass Transition Components Exchange

To plot the gain response of a high-pass filter, mirror the gain response of a low-pass filter at the corner frequency, 1 , thus replacing with 1/ and S with 1/S

Figure 2.13. Developing The Gain Response of a High-Pass Filter

Page 22: Lab Report 3

The general transfer function of a high-pass filter is then :

2

( )1 i i

i

AA s

a b

s s

With A

being the passband gain.

The transfer function of a single stage is :

2

( )1 i i

AA s

a b

s s

With b = 0 for first-order filters, the transfer function of a first-order filter simplifies to:

0( )1 i

AA s

a

s

1.4.1. First-order High-Pass Filter

Figure 2.14. First � order Noninverting High-pass Filter

Figure 2.15. First � order inverting High-pass Filter

The transfer functions of the circuits are:

Page 23: Lab Report 3

2

3

1 1

1

( )1 1

1 .C

R

RA s

R C s

and

2

1

1 1

( )1 1

1 .C

R

RA s

R C s

The negative sign indicates that the inverting amplifier generates a 0180 phase shift from the filter input to the output. The coefficient comparison between the two transfer functions and two different passband gain factors:

2

3

1R

AR

and 2

1

RA

R

While the term for the coefficient 1a is the same for both circuits:

1 1 11/ Ca R C

To dimension the circuit, specify the corner frequency ( Cf ), the dc gain ( A

), and capacitor

( 1C ), and then solve for 1R and 2R :

11 1

1

2 C

Rf a C

2 3( 1)R R A

and 2 1R R A

1.4.2. Second-order High-pass Filter

High-pass filters use the same two topologies as the low-pass filters: Sallen-Key and Multiple Feedback. The only difference is that the positions of the resistors and the capacitors have changed.

Sallen-Key Topology

Figure 2.16. General Sallen-Key High-Pass Filter

Page 24: Lab Report 3

Figure 2.17. Unity-Gain Sallen-Key High-Pass Filter

Multiple Feedback Topology

Figure 2.18. Second-order MFB High-pass Filter

1.4.3. Higher-order High-pass Filter

Likewise, as with the low-pass filters, higher-order high-pass filters are designed by cascading first-order and second-order filter stages. The filter coefficients are the same ones used for the low-pass filter design.

1.5. Band-pass Filter Design

A high-pass response was generated by replacing the term S in the low-pass transfer function with the transformation 1/S. Likewise, a band-pass characteristic is generated by replacing the S term with the transformation:

1 1s

s

In this case, the passband characteristic of a low-pass filter is transformed into the upper passband half of a band-pass filter. The upper passband is then mirrored at the mid frequency,

( 1)mf , into the lower passband half.

Page 25: Lab Report 3

Figure 2.16. Low-pass to Band-Pass Transition

The corner frequency of the low-pass filter transforms to the lower and upper -3dB frequencies

of the band-pass, 1 and 2 . The difference between both frequencies is defined as the

normalized bandwidth :

2 1

The normalized mid frequency, where Q = 1, is:

2 11m

In analogy to the resonant circuits, the quality factor Q is defined as the ratio of the mid

frequency ( mf ) to the bandwidth (B):

2 1 2 1

1 1m mf fQ

B f f

The simplest design of a band-pass filter is the connection of a high-pass filter and a low-pass filter series, which is commonly done in wide-band filter applications. Thus, a first-order high-pass and a first-order low-pass provide a second-order band-pass, while a second-order high-pass and a second-order low-pass result in a fourth-order band-pass response.

In comparison to wide-band filters, narrow-band filters of higher order consist of cascaded second-order band-pass filters that use the Sallen-Key or the Multiple Feedback (MFB) topology.

1.5.1. Second-order Band-pass Filter

Sallen-Key topology

Page 26: Lab Report 3

Figure 2.17. Sallen-Key Band-Pass

Multiple Feedback Topology

Figure 2.18. MFB Band-pass