FIR and IIR Filter

Contents
Reference vedio
Digital Filter Introduction and Overview
- Digital filter is huge part of DSP
- input signal represnted by a discreate time sequence (fixed sampling frequency, )
- Nyquist frequency limit ()
FIR
1. FIR Filter Theory
- FIR: Finite Impulse Response
- It is defined by a finite number of coefficients (h) , and the output is acquired by convolution of the input signal with the impulse response.
- Fourier transform of the impulse response = frequency response of filter
- convolution in time domain = multiplication in frequency domain
FIR fomulas
- (discrete time)
- inpulse response length = M
2. FIR Filter Design
Rough Design procedure
- design the required frequency response
- inverse Fourier transform
- find the impulse response (h)
The Window-Sinc Method
then we get sinc function
-
Problems
- Non-casual (t < 0, value != 0): solve by shifting response
- Infinite length: solve by truncating
- Continuous: solve by sampling
-
The output after shifting, truncating and sampling
- Problems
- Side-lobes: solve by multiplying impulse response by windowing function (smoothing)
Window-Sinc FIR Filter Design Procedure
- Choices When Designing FIR Filters
- Sampling frequency
- Filter length
- Frequency response, filter type: low-pass, high-pass, band-pass, band-stop
- Window function
- Time-domain properties: linear phase, minimum phase, maximum flatness
3. FIR Filter Software Implementation
Convolution and Circular Buffers
- convolution formula:
- If we use a linear buffer, we need to shift the data every time we get a new sample
- We can solve this problem by using a circular buffer

Serial Oscilloscope Tool
IIR
1. IIR vs FIR
IIR | FIR | |
---|---|---|
Impulse Response | Infinite | Finite |
Performance | X | O |
Speed | O | X |
Stability | can be unstable | always stable |
2. IIR Filter Theory
- IIR: Infinite Impulse Response
- Recursive filter which use feedback to bypass a longer convolution
IIR fomulas
- (discrete time)
- are filter coefficients

3. IIR Filter Design
Design methods
- Online tools or Matlab
- Use standard types: Butterworth, Chebyshev, Elliptic
- Optimisation methods (minimise some cost function)
- Analogues prototypes + discretisation
- Z-transform
4. IIR Filter Software Implementation
SKIP