<< Chapter < Page Chapter >> Page >

In the previous labs, different mathematical transformation tools to represent analog and discrete signals were examined. This final lab builds on the knowledge gained in the previous labs to show how to use these tools to perform signal processing.

Analog filtering

Analog filters are defined over a continuous range of frequencies. Four basic kinds of analog filters are lowpass, highpass, bandpass and bandstop. [link] shows the ideal characteristics of these filters. In the noise removal example of Lab 5 , an ideal lowpass filter was used to remove high-frequency noise. However, the ideal characteristics are not physically realizable and actual filters can only approximate the ideal characteristics. The RC series circuit analyzed in Lab 3 and Lab 4 is a simple example of an analog lowpass filter.

Characteristics of Ideal Filters (a) Lowpass, (b) Highpass, (c) Bandpass, (d) Bandstop

The voltage output for the circuit shown in [link] is given by [link] :

V out = 1 / ( jωC ) R + 1 / ( jωC ) V in size 12{V rSub { size 8{ ital "out"} } = { {1/ \( jωC \) } over {R+1/ \( jωC \) } } V rSub { size 8{ ital "in"} } } {}
RC Series Circuit Used as Analog Lowpass Filter

The magnitude and phase response can be easily found to be [link] :

H ( ω ) = V out V in = 1 1 + ω 2 R 2 C 2 size 12{ lline H \( ω \) rline = lline { {V rSub { size 8{ ital "out"} } } over {V rSub { size 8{ ital "in"} } } } rline = { {1} over { sqrt {1+ω rSup { size 8{2} } R rSup { size 8{2} } C rSup { size 8{2} } } } } } {}
H ( ω ) = arg V out V in = tan 1 ( ω RC ) size 12{∠H \( ω \) ="arg" left ( { {V rSub { size 8{ ital "out"} } } over {V rSub { size 8{ ital "in"} } } } right )= - "tan" rSup { size 8{ - 1} } \( ω ital "RC" \) } {}

If the positions of R and C are interchanged, a simple analog highpass filter is obtained as shown in [link] .

RC Series Circuit Used as Analog Highpass Filter

The voltage output for this circuit is given by

V out = R R + 1 / ( jωC ) V in size 12{V rSub { size 8{ ital "out"} } = { {R} over {R+1/ \( jωC \) } } V rSub { size 8{ ital "in"} } } {}

The corresponding magnitude and phase responses are

H ( ω ) = V out V in = 1 1 + 1 / ( ω 2 R 2 C 2 ) size 12{ lline H \( ω \) rline = lline { {V rSub { size 8{ ital "out"} } } over {V rSub { size 8{ ital "in"} } } } rline = { {1} over { sqrt {1+1/ \( ω rSup { size 8{2} } R rSup { size 8{2} } C rSup { size 8{2} } \) } } } } {}
H ( ω ) = arg V out V in = tan 1 1 ω RC size 12{∠H \( ω \) ="arg" left ( { {V rSub { size 8{ ital "out"} } } over {V rSub { size 8{ ital "in"} } } } right )="tan" rSup { size 8{ - 1} } left ( { {1} over {ω ital "RC"} } right )} {}

Digital filtering

Digital signal filtering is a fundamental concept in digital signal processing. Two basic kinds of digital filters that are widely used are FIR and IIR:

FIR (finite impulse response) – filters having finite unit sample responses

IIR (infinite impulse response) – filters having infinite unit sample responses

Unit sample response denotes the output in response to a unit input signal. It is common to express digital filters in the form of difference equations. In this form, an FIR filter is expressed as

y [ n ] = k = 0 N b k x [ n k ] size 12{y \[ n \] = Sum cSub { size 8{k=0} } cSup { size 8{N} } {b rSub { size 8{k} } x \[ n - k \]} } {}

where b size 12{b} {} ’s denote the filter coefficients andthe filter order. As described by this equation, an FIR filter uses a current input x [ n ] size 12{x \[ n \] } {} and a number of previous inputs x [ n k ] size 12{x \[ n - k \] } {} to generate a current output y [ n ] size 12{y \[ n \] } {} .

The difference equation of an IIR filter is given by

y [ n ] = k = 0 N b k x [ n k ] k = 1 M a k y [ n k ] size 12{y \[ n \] = Sum cSub { size 8{k=0} } cSup { size 8{N} } {b rSub { size 8{k} } x \[ n - k \]} - Sum cSub { size 8{k=1} } cSup { size 8{M} } {a rSub { size 8{k} } y \[ n - k \] } } {}

where b size 12{b} {} ’s and a size 12{a} {} ’s denote the filter coefficients and N size 12{b} {} and M size 12{b} {} the number of zeros and poles, respectively. As indicated by Equation (8), an IIR filter uses a number of previous outputs y [ n k ] size 12{y \[ n - k \] } {} as well as a current and a number of previous inputs to generate a current output y [ n ] size 12{y \[ n \] } {} .

In general, as compared to IIR filters, FIR filters require less precision and are computationally more stable. Table 1 lists some of the differences between FIR and IIR filters. For the theoretical details on these differences, refer to [link] .

FIR Filter Attributes versus IIR Filter Attributes
Attribute FIR filter IIR filter
Stability Always stable Conditionally stable
Computational complexity More operations Fewer operations
Precision Less coefficient precision required Higher coefficient precision required

where b size 12{b} {} ’s and a size 12{a} {} ’s denote the filter coefficients andandthe number of zeros and poles, respectively. As indicated by Equation (8), an IIR filter uses a number of previous outputs y [ n k ] size 12{y \[ n - k \] } {} as well as a current and a number of previous inputs to generate a current output y [ n ] size 12{y \[ n \] } {} .

H ( ω ) = b 0 + b 1 e + . . . + b N e jN ω 1 + a 1 e + . . . + a M e jM ω size 12{H \( ω \) = { {b rSub { size 8{0} } +b rSub { size 8{1} } e rSup { size 8{ - jω} } + "." "." "." +b rSub { size 8{N} } e rSup { size 8{ - ital "jN"ω} } } over {1+a rSub { size 8{1} } e rSup { size 8{ - jω} } + "." "." "." +a rSub { size 8{M} } e rSup { size 8{ - ital "jM"ω} } } } } {}

It is well-known that a direct-form implementation expressed by Equation (9) is sensitive, in terms of stability, to coefficient quantization errors. Noting that the second-order cascade form produces a more response that is more resistant to quantization noise [link] , the above transfer function is often written and implemented as follows:

H ( ω ) = k = 1 N s b 0k + b 1k e + b 2k e j2ω 1 + a 1k e + a 2k e j2ω size 12{H \( ω \) = Prod cSub { size 8{k=1} } cSup { size 8{N rSub { size 6{s} } } } { { {b rSub { size 8{0k} } +b rSub { size 8{1k} } e rSup { size 8{ - jω} } +b rSub { size 8{2k} } e rSup { size 8{ - j2ω} } } over {1+a rSub { size 8{1k} } e rSup { size 8{ - jω} } +a rSub { size 8{2k} } e rSup { size 8{ - j2ω} } } } } } {}

where N s = N / 2 size 12{N rSub { size 8{s} } = left lfloor N/2 right rfloor } {} and . size 12{ left lfloor "." right rfloor } {} represents the largest integer less than or equal to the argument. This serial or cascaded structure is illustrated in [link] .

Cascaded Filter Stages

Each second-order filter is considered to be of direct-form II, shown in [link] , for its memory efficiency. One can implement each second-order filter in software. Normally, digital filters are implemented in software, but one can also implement them in hardware by using digital circuit adders and shifters.

Second Order Direct-Form II

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, An interactive approach to signals and systems laboratory. OpenStax CNX. Sep 06, 2012 Download for free at http://cnx.org/content/col10667/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'An interactive approach to signals and systems laboratory' conversation and receive update notifications?

Ask