Recursive Filtering By Omari Sarjeant What it is
Recursive Filtering By Omari Sarjeant
What it is? • Based on the Moving Average Filter • Uses Simple Repetitive Algorithms • Current Output is a function of current and previous inputs and previous outputs weighted by the coefficients a 0, a 1, b 1, etc… Figure 1
Pros/Cons • Pro – Fast Algorithm – Small Program File – Adjustable • Cons – Sensitive to data type – Poor Frequency Domain Response (Inability to separate individual frequencies well)
How They Work • Moving Average Filter – Averages a set of Inputs to Calculate Output Figure 2 Figure 3
How They Work Cont. • Previous calculation and current calculation are redundant • Algorithm is Simplified by storing previous output
Recursive Filters Generalized • Output as function of weighted inputs and outputs (Figure 1) • Design can be implemented based of a single parameter X, where coefficients a 0, a 1, b 1, etc… are functions of X.
My Project • Recursive Filtering with Dynamic Control over the parameter X • Given Four buttons for controls – Three of them select the type of filter to use • Single Pole Low/High Pass • Four Pole Low Pass – Fourth button cycles through X parameter.
Why? • Starting with Basics • Simple Algorithm • Useful Application
Details • Used I 2 S Program from Lab as a launch point since setup and initialization where not affected. • Combined the “Blink” program into project to use buttons for control.
Project – Stage 1 • Storing Previous Data – This was done by changing “i. Channel” variables into arrays. – In IRS. c the arrays were shifted as new data came in and old data went out.
My Project – Stage Two • Generalized Filter Design – A generalize filter was designed in “Process Data. c” – The Output was the summation of previous inputs and outputs, dictated by the value of their respective coefficients – This was then sent out for transfer and the output array was shifted
My Project – Stage 3 • The buttons changed the values of the coefficients accordingly: • PF 8 – PF 9 – • PF 10 – PF 11 – modified X by. 025
Problems Encountered • When Filters are applied the produce noise • This only occurred when multiplication or division was added to the code • Tried shifting data; using fract data type • Unable to resolve this problem (many hours wasted!)
FIN • Sources that helped – Analog Devices – The Scientist and Engineer's Guide to Digital Signal Processing(Ch 15 & Ch 19) – Power Point Slides and lectures by V. Kepuska – Fellow Students
- Slides: 14