Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Finite Impulse Response Filters and the Z-Transform - Notes | ESS 522, Study notes of Environmental Science

Material Type: Notes; Class: DATA COLCTN & ANLYS; Subject: Earth and Space Sciences; University: University of Washington - Seattle; Term: Unknown 2006;

Typology: Study notes

Pre 2010

Uploaded on 03/18/2009

koofers-user-rg0
koofers-user-rg0 🇺🇸

10 documents

1 / 4

Toggle sidebar

Related documents


Partial preview of the text

Download Finite Impulse Response Filters and the Z-Transform - Notes | ESS 522 and more Study notes Environmental Science in PDF only on Docsity!

Finite Impulse Response Filters and the Z-transform

Filtering in the time domain

In Lecture 3 on Linear Systems and Convolution, we introduced the idea of linear systems or

linear filters. We can write the filtering operation in the time domain symbolically in terms of an

operator L as

x ( t )! [ L ]! y ( t ) or y ( t ) = L [ x ( t )] (1)

We can characterize a filter by measuring its response to a delta function

! ( t ) " [ L ] " g ( t ) (2)

The response of the filter to any other input is a convolution of the input and the impulse

response of the filter

x ( t )! [ L ]! g ( t ) * x ( t ) (3)

In the discrete domain we get the same result. If we define a discrete delta function as

!

k

= 1 k = 0

= 0 k " 0

(4)

then

! k

" L " g k

(5)

and the output yl for input sequence xl is given by a discrete convolution

y l

= g k

x l! k

k = 0

N! 1

"

(6)

Here it is worth thinking a little bit about the indicies in equation (6). If the filter is causal then it

does not generate any outputs before an input and g k

is zero for all elements k < 0 and thus, only

needs to be defined for k ≥ 0. Mathematically, there is nothing to stop us introducing filters that

are acausal with non-zero values for negative k and we will come across some, but most

causality is a natural consequence of most physical processes. For a filter to be stable, the

energy of the impulse response must be finite which requires

E = g

2

( t ) dt

!"

"

< " (7)

or for a causal digital filter

g k

2

k = 0

!

"

<! (8)

Equation (8) requires that the magnitude of g k

decay with increasing index. Even if it does not

decay to zero, the impulse response can be represented to arbitrary accuracy by finite number of

samples ( N in equation (6)). If k = 0 corresponds to time zero the indicies of yl in the filter

output refer to the same times as in the input xl. A filter of the type gk that is applied by a

convolution is termed a finite impulse response filter.

Z-transform

If we consider a sequence aj = [ a 0 , a 1 , … aN- 1 ] where samples with negative indices are zero and

the index 0 corresponds to time zeros. The Z transform of aj is given by

Z a j

!

"

$

= A ( z ) = a

0

z

0

  • a 1

z

1

  • a 2

z

2

  • ... + a N % 1

z

N % 1

  • a k

z

j

j = 0

N % 1

&

(9)

where z is a complex number. We can see that if we set

z = exp(!

2 " ik

N

), k = 0 , 1 , ... , N! 1 (10)

the Z transform gives the components of the discrete Fourier transform. Fourier transforms are

just a special case of the Z transform in which z is constrained to sit on the unit circle in the

complex plane.

As one might expect the properties of the Z transform are analogous to the Fourier transform and

there are two that are particularly important for our applications. First multiplication of a Z

transform by z (equivalent to multiplying a DFT by exp(- 2 π ik / N )) results in a time delay of one

sample. Second convolution in the time domain is equivalent to multiplication in the Z

transform domain

Z a j

  • b j

!

"

$

= A ( z ). B ( z ) (11)

We can demonstrate this with a simple example. If the time domain

a j

= 1 2 3

[ ]

, b j

= 2 5

[ ]

a j

  • b j

=

= [ 2 9 16 15 ]

(12)

In the Z transform domain

A ( z ) = 1 + 2 z + 3 z

2

, B ( z ) = 2 + 5 z

A ( z ). B ( z ) = ( 1! 2 ) + ( 2! 2 + 1! 5 ) z + ( 3! 2 + 2! 5 ) z

2

+ ( 3! 5 ) z

3

= 2 + 9 z + 16 z

2

  • 15 z

3

(13)

which gives the same result.

Frequency Response

In Lecture 3 on Linear Systems and Convolution we showed that as an alternative to

characterizing a filter by measuring its impulse response in the time domain, we could also

characterize its response by inputting a harmonic waves at different frequencies and

characterizing its frequency response or transfer function. In the digital domain we can write

exp

i 2! kj

N

"

$

%

&

'

( [ L ] ( y

j

(14)

We know we can relate k and j to the frequency and time respectively by

f =

k

N! t

, t = j! t (15)

By defining

f ' =

k

N

, t ' = j (16)

we obtain a ‘dimensionless’ frequency that has a periodicity of 1 and a Nyquist frequency of 0.5,

and a dimensionless time which has a sample interval of unity. Equation (14) becomes

exp ( i 2! f ' t ') " L " y

t '

(17)

For convenience we will drop the primes.

Now let us first consider a very simple scaling filter (convolution with a single element filter a 0 ).

Equation (14) gives

exp ( i 2! ft ) " a

0

[ ] "^ a

0

exp ( i 2! ft ) (18)

The filter response is the output over the input and is given by

Filter Transfer Function =

output

input

=

G ( f ) X ( f )

X ( f )

= G ( f ) (19)

Clearly for the scaling filter we can write

G ( f ) = a 0

(20)

The scaling filter has a flat frequency response

Second consider a unit delay filter (convolution with a filter [0 a 1 ])

exp ( i 2! ft ) " a

1

z

[ ]

" a 1

exp $ i 2! f ( t # 1 )

%

&

'

(21)

From equation (19) we get

G ( f ) = a 1

exp (! i 2 " f ) (22)

The amplitude (or magnitude) spectrum is | G ( f )| = a 1

and the phase spectrum - 2 π f. The filter acts

to retard the phase by 2π f. The convention for filters is to use the phase lag spectrum (the

negative of the phase spectrum) which is for this filter is φ( f ) = 2 π f. As we are already aware

from our work with the Fourier transform, one applies a delay or lag in the time domain by

applying a linear adjustment to phase in the frequency domain.

Now consider a two-element filter with [ L ] = [ a 0 a 1 z ]. Applying this filter to a harmonic filter

gives

exp ( i 2! ft ) " a

0

  • a 1

z

[ ]

" a 0

exp [ i 2! ft ] + a

1

exp $ i 2! f ( t # 1 )

%

&

'

(23)

The filter transfer function is

G ( f ) = a 0

  • a 1

exp (! i 2 " f )

= a 0

  • a 1

# cos ( 2 " f )

$

%

&

! i a 1

# sin ( 2 " f )

$

%

&

(24)

The amplitude spectrum is given by the magnitude of G ( f )

G ( f ) = a 0

  • a 1

" cos^ (^2!^ f )

$

%

2

  • a 1

" sin^ (^2!^ f )

$

%

2

= a 0

2

  • a 1

2

  • 2 a 0

a 1

cos ( 2! f )

(25)

The amplitude spectrum has two interesting properties. First we can see that the two element

filters [a 0 a 1 ] and [a 1 a 0 ] have the same amplitude – a set of filters with the same amplitude

response is termed a suite. Second we can see that if a 0 a 1 > 0, this is if a 1 and a 2 have the same

sign then | G (0)| > | G (0.5)| which means the amplitude response at zero frequency is higher than

at the Nyquist frequency. We have a low pass filter. Conversely, if a 0

a 1

< 0, this is if a 1

and a 2

have opposite signs, then | G (0)| > | G (0.5)| which means the amplitude response at zero frequency

is lower than at the Nyquist frequency. We have a low pass filter.

The phase lag spectrum is given by

!( f ) = tan

" 1

a 1

sin ( 2 # f )

a 0

  • a 1

cos ( 2 # f )

$

%

&

'

(

)

(26)

Now if |a 0

| > |a 1

|, it is clear that the denominator of equation (26) does not change sign. For -

0.5 > f > 0.5, - π/2 < φ( f ) < π/2 and if we look at the phase over a large interval it will remain

bounded between these limits. However, if |a 0 | < |a 1 |, the denominator of equation will change

sign and the expression in square brackets will go to infinity. For - 0.5 > f > 0.5, φ( f ) will vary

between – π and π and when viewed over a larger frequency interval it will be unbounded (once

the 2π jumps are removed at the Nyquist frequency and its periodic repetition) For this reason a

two element filter with |a 0 | > |a 1 | is known as minimum phase while a two element filter with

|a 0

| < |a 1

| is known as maximum phase. You will understand the phase of minimum and

maximum phase filters after completing the exercise that follows this lecture.

Filters with more than two elements can be constructed by convolving together two element

filters. If all the component two element filters are minimum phase then the resulting filter will

be minimum phase and the phase will be bounded. If all the component two-element filters are

maximum phase then the resulting filter will be maximum phase and the phase will be

unbounded. If some of the two element component filters are minimum phase and others are

maximum phase, the resulting filter is termed mixed-phase.

Unlike a two element filter, the magnitude of the successive elements in a minimum phase filter

does not decay monotonically but it does have the fastest build up of partial energy of the filter

suite. That is the quantity

E

partial

= a j

2

, 0! M

j = o

M

"

< N (27)

is a maximum for the minimum phase filter. For this reason minimum phase filters are also

known as minimum delay filters. Maximum phase filters have the slowest build up of partial

energy in a filter suite and are therefore also known as maximum delay