Download presentation
1
Workshop on Digital Signal and Image processing
Filters Speaker: Dr. Rubaiyat Yasmin Dept. of Information and Communication Engineering, R.U. 25 May, 2012
2
Introduction: What is filter? Why needed? Electronic circuits
Perform signal processing functions Why needed? To remove unwanted frequency components from the signal, To enhance wanted ones.
3
Objective: Basic understanding Analog Filters Digital Filters
Adaptive Filters
4
Basic Types of Filters:
Four Main Filter Types: Low-pass High-pass Band-pass Band-reject
5
Basic Types of Filters (Contd)
Pass band, H(f)=1 Stop band, H(f)=0 Cut-off frequency
6
Frequency Response Curve
Low pass filter: Frequency Response Curve power = amp2; amp = sqrt(power) 1/2 power = sqrt(2)/2 amp = ~71% amp
7
Frequency Response Curve
High pass filter: Passes high frequencies, attenuates lows. Frequency Response Curve
8
Frequency Response Curve
Band pass filter: Frequency Response Curve Passes band of frequencies, attenuates those above and below band. Most common in implementations of discrete Fourier transform to separate out harmonics.
9
Frequency Response Curve
Band reject filter: Stops band of frequencies, passes those above and below band. Most common in removing electric hum (50 Hertz A/C). Frequency Response Curve
10
Analogue designs Common Approach :
Frequencies are specified in the Ω domain (in rad/s)) Exist for all the standard filter types (lowpass, highpass, bandpass, bandreject). Common Approach : To define a standard lowpass filter, and To use standard analogue-analogue transformations from lowpass to the other types, prior to performing the bilinear transform. Important families: Butterworth Chebyshev Elliptic
11
Butterworth Filter: Maximally flat
12
Chebyshev Filter: Equiripple response in pass-band (up to ωc),
Monotonically decreasing in stop-band
13
Elliptic Filter: Equiripple in both pass-band and stop-band
14
Other Types of Analogue Filter
Bessel filters, which are almost linear phase. • Involve different degrees of flexibility and trade-offs in specifying transition bandwidth, ripple amplitude in pass-band/stop-band and phase linearity. For a given band edge frequency, ripple specification, and filter order, narrower transition bandwidth can be traded off against worse phase linearity
15
Why Digital:
17
Basic concept :
18
What is a Digital Filter?
Numerical procedure or algorithm that transforms a given sequence of numbers into a second sequence that has some more desirable properties. Input sequence Output sequence Digital Filter xn yn
19
Desired features Depend on the application, for example Input Signal
Output generated by sensing device (microphone) having less noise or interferences speech with reduced redundancy for more efficient transmission
20
Examples of filtering operations
Noise suppression: • received radio signals • signals received by image sensors (TV, infrared imaging devices) • electrical signals measured from human body (brain heart, neurological signals) • signals recorded on analog media such as analog magnetic tapes
21
Enhancement of selected frequency ranges:
• treble and bass control or graphic equalizers increase sound level and high and low level frequencies to compensate for the lower sensitivity of the ear • enhancement of edges in images improve recognition of object (by human or computer)
22
Specific operations: • differentiation • integration
• Hilbert transform These operations can be approximated by digital filters operating on the sampled input signal
23
The Basic of Digital Filters
Filters work by using one or both of the following methods: Delay a copy of the input signal (by x number of samples), and combine the delayed input signal with the new input signal. (Finite Impulse Response, FIR, or feedforward filter) Delay a copy of the output signal (by x number of samples), and combine it with the new input signal. (Infinite Impulse Response, IIR, feedback filter) FIR filters are “finite” there is a specific limit to the number of times that any delayed sample is added to a new input sample (one!). IIR filters, as with any feedback device, create a loop, hence the term infinite. The feedback, or loop, is scaled so that it rarely is infinite. (think high school PA system) Both types of filters are essentially delay units. FIR Filters IIR Filters
24
FIR Filters FIR filter of length M (order N=M-1, order - number of delays) The Order of the filter is equal to the number of samples you look back
26
Frequency-domain Equivalent:
The impulse response is of finite length M FIR filters have only zeros (no poles), hence known also as all-zero filters FIR filters also known as feedforward or non-recursive, or transversal Frequency-domain Equivalent: Now N-point DFT (Y(k)) and then N-point IDFT (y(n)) can be used to compute standard convolution product and thus to perform linear filtering (given how efficient FFT is)
27
FIR Design Methods • Impulse response truncation
the simplest design method, has undesirable frequency domain-characteristics, not very useful • Windowing design method simple and convenient but not optimal, i.e. order achieved is not minimum possible • Optimal filter design methods
28
Approximated filters obtained by truncation
29
FIR Filter Design Consider the Window method:
Determine ideal response function If length of ideal function is too long, multiply ideal response by a finite length window function Note that multiplication by window in time domain means convolution (and smearing) in the frequency domain
30
FIR Window Design Concept
Lowpass filter: cutoff at 0.2 fs . 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.6 0.8 1 1.2 Frequency (fraction of fs) Amplitude (linear scale)
31
FIR Design Concept (cont.)
Time domain response (Inverse DTFT) 0.4 0.35 0.3 0.25 0.2 Amplitude 0.15 0.1 0.05 -0.05 -0.1 -60 -40 -20 20 40 60 Sample Index
32
FIR Design Concept Window function to limit response length
1.2 1 0.8 Hamming window 0.6 Amplitude 0.4 0.2 -0.2 -60 -40 -20 20 40 60 Sample Index
33
FIR Design Concept (cont.)
Windowed and shifted (causal) result 0.4 0.35 0.3 0.25 0.2 Amplitude 0.15 0.1 0.05 -0.05 -0.1 5 10 15 20 25 30 35 40 Sample Index
34
FIR Design Concept Resulting frequency response of filter 10 -10
-10 Magnitude (dB) -20 -30 -40 -50 -60 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Frequency (fraction of fs)
35
Window Design Method Rectangular Window Frequency Response
36
Truncated Filter Increasing the dimension of the window M:
The width of the main lobe decreases The area under side lobes remain constant
37
Solution to Sharp Discontinuity of Rectangular Window
Use windows with no abrupt discontinuity in their time- domain response and consequently low side-lobes in their frequency response. In this case, the reduced ripple comes at the expense of a wider transition region However, this can be compensated for by increasing the length of the filter.
38
Alternative Windows -Time Domain
• Hanning • Hamming • Blackman Window Characteristics: A wider transition region (wider main-lobe) is compensated by much lower side-lobes and thus less ripples.
39
Filter realised with rectangular/Hanning window
M = 16 M = 40 There are much less ripples for the Hanning window but that the transition width has increased Transition width can be improved by increasing the size of the Hanning window to M = 40
40
Windows characteristics
• Fundamental trade-off between main-lobe width and side-lobe amplitude • As window smoother, peak side-lobe decreases, but the main-lobe width increases. • Need to increase window length to achieve same transition bandwidth. Specification necessary for Window Design Method
41
Window Design Procedure
• Ideal frequency response has infinite impulse response • To be implemented in practice it has to be - truncated - shifted to the right (to make is causal) • Truncation is just pre-multiplication by a rectangular window - the filter of a large order has a narrow transition band - however, sharp discontinuity results in side-lobe interference independent of the filter’s order and shape Gibbs phenomenon • Windows with no abrupt discontinuity can be used to reduce Gibbs oscillations (e.g. Hanning, Hamming, Blackman)
42
Windowed FIR filter design procedure
1. Select a suitable window function 2. Specify an ideal response Hd(ω) 3. Compute the coefficients of the ideal filter hd(n) 4. Multiply the ideal coefficients by the window function to give the filter coefficients 5. Evaluate the frequency response of the resulting filter and iterate if necessary (typically, it means increase M if the constraints you have been given have not been satisfied)
43
FIR Filter Design Using Windows
FIR filter design based on windows is simple and robust, however, it is not optimal: • The resulting pass-band and stop-band parameters are equal even though often the specification is more strict in the stop band than in the pass band unnecessary high accuracy in the pass band • The ripple of the window is not uniform (decays as we move away from discontinuity points according to side-lobe pattern of the window) by allowing more freedom in the ripple behaviour we may be able to reduce filter’s order and hence its complexity FIR Design by Optimisation Least-Square Method
44
Design of IIR Filters IIR as a class of LTI Filters
Difference equation: Transfer function: To give an Infinite Impulse Response (IIR), a filter must be recursive, that is, incorporate feedback N ≠ 0, M ≠ 0
45
IIR Filters Design from an Analogue Prototype
Almost all methods rely on converting an analogue filter to a digital one Analogue to Digital Conversion: Analogue Digital
46
Methods: Stable analogue filters become stable digital filters
Impulse Invariant method Matched z-transform method Backward Difference Method Z- 0.5 = 0.5 - 0.5 = 0.5 Stable analogue filters become stable digital filters No high-pass filter possible! Poles are conned to a relatively small set of frequencies
47
Imaginary axis in the s domain are not mapped to the unit circle
The frequency response will be considerably distorted Analogue high-pass filter cannot be mapped to digital high-pass Poles of the digital filter cannot lie in the correct region Rarely used Correction : Bilinear transform Most popular method frequency response same characteristics impulse response may be quite different
48
Properties of the Bilinear Transform
Two important cases: 1. With σ=0 Imaginary (frequency) axis in the s-plane maps to the unit circle in the z-plane Left half s-plane maps onto the interior of the unit circle 2. With σ <0, s-plane z-plane Suitable frequency response, stability for digital filter
49
Design using the bilinear transform
The steps of the bilinear transform method are as follows: 1. “Warp” the digital critical (e.g. band-edge or "corner") frequencies ωi , in other words compute the corresponding analogue critical frequencies Ωi= tan(ωi/2). 2. Design an analogue filter which satisfies the resulting filter response specification. 3. Apply the bilinear transform
50
Example: Magnitude Frequency Response
51
Designing high-pass, band-pass and band-stop filters
Concentrated on IIR filters with low-pass characteristics. • Various techniques available to transform a low-pass filter into a high-pass/band pass/band-stop filters. Frequency transformation in the analogue domain
52
Transformation table:
53
Adaptive Digital Filters
Top Adaptive Digital Filters 9.6 • Adaptive digital filters are self learning filters, whereby an FIR (or IIR) is designed based on the characteristics of input signals. No other frequency response information or specification information is available. • An adaptive digital filter is often represented by a signal flow graph with adaptive nature of weights shown: x(k-1) x(k-2) Adaptive x(k) Weights Input w0 w1 w 2 d(k) - + y(k) e(k) Output Error August 2007, Version 3.8/21/07 For Academic Use Only. All Rights Reserved
54
Adaptive Signal Processing:
Top Adaptive Signal Processing: 9.7 “The aim is to adapt the digital filter such that the input signal x(k) is filtered to produce y(k) which when subtracted from desired signal d(k), will minimise the power of the error signal e(k).” desired d(k) signal + input y(k) e(k) signal Adaptive FIR Σ x(k) Digital Filter Output- error signal signal Adaptive Algorithm e(k) = d(k) - y(k) y(k) = Filter(x(k)) August 2007, Version 3.8/21/07 For Academic Use Only. All Rights Reserved
55
Adaptive Filter Nomenclature
If the digital filter is FIR or all-zero, the adaptive system can also be called Moving Average or MA. If the digital filter is all-pole, the adaptive system can also be called Autoregressive or AR. If the digital filter is an IIR with zeros, the adaptive system can also be called ARMA. This presentation addresses FIR or MA filters only.
56
Coefficient Adaptation
The principal behind determining the coefficients of the filter model is to maximize the statistical correlation between the desired signal and the coefficients. Typically, this is done by minimizing the correlation between the error signal and the filter state as is relevant to the coefficients. If the adaptive filter is working, the error signal decreases in magnitude, which slows down the movement of the coefficients. The filter is therefore converging to a solution.
57
Applications of Adaptive Filters
System identification: adaptive equalization The adaptive filter attempts to model an unknown external system. Interference cancellation The adaptive filter attempts to isolate the component of a primary signal that is not part of a reference signal. Linear prediction This is like interference cancellation, but the adaptive filter uses a delayed version of the primary signal as the reference.
58
Architectures 9.9 Delay Unknown x(k) Adaptive Σ Σ s(k) System Filter -
Top Architectures 9.9 Delay s(k) + n)k) d(k) y(k) +e(k) d(k) Unknown x(k) Adaptive x(k) Adaptive y(k) +e(k) Σ n’(k) Σ s(k) System Filter - Filter - Noise Cancellation Inverse System Identification Unknown System d(k) x(k) y(k) +e(k) d(k) + Adaptive x(k) Adaptive Filter y(k) e(k) Delay Σ Σ - s(k) Filter - Prediction System Identification August 2007, Version 3.8/21/07 For Academic Use Only. All Rights Reserved
59
Application Examples • System Identification:
Top Application Examples 9.10 • System Identification: • Channel identification; Echo Cancellation • Inverse System Identification: • Digital communications equalisation. • Noise Cancellation: • Active Noise Cancellation; Interference cancellation for CDMA • Prediction: • Periodic noise suppression; Periodic signal extraction; Speech coders; CMDA interference suppression. August 2007, Version 3.8/21/07 For Academic Use Only. All Rights Reserved
60
Least-Mean-Square (LMS) Algorithm
Linear adaptive filtering algorithm Differs from steepest descent Widely used for its simplicity Consists of: 1) A filtering process (mainly FIR model) 2) An adaptive process
61
Parameters: M = # of taps (length of filter)
μ = step-size parameter Filter output is: y(n) = ŵH(n)u(n) Error signal is: e(n) = d(n) – y(n) Tap-weight vector: ŵ(n+1) = ŵ(n) + μu(n)e*(n)
62
The Recursive Least-Squares (RLS) Algorithm
1. Let n=1 2. Compute the gain vector k(n)= p(n-1)u(n)/1+uT(n) p(n-1)u(n) 3. Compute the true estimation error (n) 4. Update the estimate of the coefficient vector ŵ(n) = ŵ(n-1) + k(n) (n) 5. Update the error correlation matrix p(n)= p(n-1)-k(n)uT(n)p(n-1) 6. Increment n by 1, go back to step 2 Convergence is better but computationally expensive
63
Thank You
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.