FIR Filters Lecture #7 Chapter 5 8
What Is this Course All About? To Gai a Appreciatio of the Various Types of Sigals ad Systems To Aalyze The Various Types of Systems To Lear the Skills ad Tools eeded to Perform These Aalyses. To Uderstad How Computers Process Sigals ad Systems 8
Discrete-time Systems: Filters Study Discrete-time systems Discrete-time Filters Fiite Impulse Respose (FIR) Filters Ifiite Impulse Respose (IIR) Filters Recall: Discrete-time system. y[]=t {x[]} 8
Movig Average Filter Movig average or ruig average filter: Choose a -poit averagig method: For example: y[]= / (x[]+x[]+x[]) y[]= / (x[]+x[]+x[]) Or y[]= / (x[]+x[+]+x[+]) This is called a differece equatio Used to completely describe the FIR for - < < 8
Example The followig sequece, x[], is a fiite legth sequece sice it oly has values with a fiite rage 4. This rage is called the support of the sequece If we apply the differece equatio we have the follow sequece for y[]: 7 x[ ] 6 5 4-4 - - - 4 5 6 7 7 y[ ] 6 5 4-4 - - - 4 5 6 7 84
A closer Look If we tabulate the x[] ad y[] - - - 4 5 6 x [ ] 4 6 4 y [ ].6666667 4 4.6666667 4.6666667 The highlighted umbers show how y[] is calculated. Note that the output is loger tha the iput. Ad if stads for time, the y[] is a predictio of the future. For example, y[] depeds ot oly o x[] but also o x[] ad x[]. 85
Causality A system whose preset values deped oly o the preset ad the past is called a Causal system A system whose preset values deped o the future is called a No-causal system Let s rewrite our movig average filter to be causal: y[]= / (x[]+x[-]+x[-]) 86
Causal Movig Average filter The ew sequeces: 7 6 x[ ] 7 6 y[ ] 5 5 4 4 - - - 4 5 6 7 - - - 4 5 6 7 The ew table: - - - 4 5 6 7 x [ ] 4 6 4 y [ ].6666667 4 4.6666667 4.6666667 87
The Geeral FIR Filter We ca exted our movig average differece equatio to this geeral form: Note that: y[ ] M k this system is causal depeds o a fiite sequece of past values of x[] The coefficiets, b k s, ca viewed as a weights ad therefore our filter becomes a weighted ruig average We call M the order of the FIR ad umber of coefficiets is called the filter legth ad is equal to M+ b k x[ k] 88
Aother Example Let s see how the followig sequece is affected by a -poit FIR ad a 7-poit FIR x[] x[ ]. cos( 8 elsewhere y[ ] - poit FIR k x[ k] ) 4 y[] -poit FIR for 4 7 - poit FIR y[ ] 7 6 k x[ k] -5 5 5 5 5 4 45-5 5 5 5 5 4 45 y[] 7-poit FIR -5 5 5 5 5 4 45 5 89
Uit Impulse Sequece The uit impulse oly has a value at =. The otatio used to represet the uit impulse is called the (Kroecker) delta fuctio: δ [] = for =, elsewhere Therefore, shifted impulses are: δ[-] = for =, elsewhere δ[-k] = for =k, elsewhere 9
Applicatio of the Uit Impulse Oe may use the uit impulse to represet our first sequece as: 7 6 5 4 x[ ] -4 - - - 4 5 6 7 x[ ] [ ] 4 [ ] 6 [ ] 4 [ ] [ 4] - 4 5 [] 4 [ -] 4 6 [ -] 6 4 [ -] 4 [ -4] x [ ] 4 6 4 9
Uit Impulse Represetatio of a Sequece I fact, ay sequece ca be represeted as sum of uit impulse fuctios. x[ ] k x[ k] [ x[] [ x[ ] [ ] k] ] x[] [ x[] [ ] ] 9
Uit Impulse Respose Sequece Whe the iput to a FIR is a uit impulse sequece x []=δ [], the output is defied as the uit impulse respose, h []. b,,,, M h[ ] M k b [ k k] otherwise I other words, the impulse respose h[] of the FIR is the sequece of differece equatio coefficiets. Sice h[]= for < ad > M, the legth of the h[] is fiite. This is why the system is called a fiite impulse respose, FIR, system 9
Uit Impulse Respose Sequece M h [ ] bk[ k] b[ ] + b[ ] + b[ ] bl[ l] bm[ M] k h[ ] h[] b h[] b hl [] b hm [ ] b hm [ ] l M - h[] b b b b b M l l M M+ 94
95 The Uit Impulse Respose of a - poit Average FIR ]} [ ] [ ] [ { ] [ ] [ ] [ ] [ - poit FIR k h k x y k k h[].5 - - - 4 5 6
Uit-Delay System A simple operator performs shift of the sequece by uits. y[]=x[ - ] Whe =, the system is called the uit delay. y[]=x[ -] The impulse respose of this system becomes: h[]=δ [ - ] 96
A Uit Delay System 7 x[ ] 6 5 4 - - - 4 5 6 7 7 y[ ] 6 5 4 - - - 4 5 6 7 7 6 5 4 y[ ] What is this oe? - - - 4 5 6 7 97
Homework Exercises: 5. 5.4 Problems: 5., 5., 5., 5.6 98