7.6 Filters
7.6 Filters
1. Filter Applications and Ideal Filter Characteristics
1.1 Filter Applications
Signal Processing:
Noise reduction and signal enhancement.
Signal separation (demultiplexing).
Anti-aliasing before sampling.
Communications:
Channel selection in radios.
Modulation and demodulation.
Equalization to compensate channel distortion.
Audio Processing:
Graphic equalizers.
Crossover networks in speakers.
Noise cancellation.
Image Processing:
Edge detection.
Image smoothing/enhancement.
Pattern recognition.
Control Systems:
Noise filtering in sensor measurements.
Loop shaping for stability.
Biomedical:
ECG/EEG signal conditioning.
Removing power line interference.
1.2 Ideal Filter Characteristics
Ideal Low-Pass Filter:
H(jω)={10∣ω∣<ωc∣ω∣>ωc
Passband: −ωc<ω<ωc
Stopband: ∣ω∣>ωc
Impulse response: h(t)=πωcsinc(ωct)
Ideal High-Pass Filter:
H(jω)={01∣ω∣<ωc∣ω∣>ωc
HHP(jω)=1−HLP(jω)
Ideal Band-Pass Filter:
H(jω)={10ω1<∣ω∣<ω2otherwise
Center frequency: ω0=2ω1+ω2
Bandwidth: BW=ω2−ω1
Ideal Band-Stop (Notch) Filter:
H(jω)={01ω1<∣ω∣<ω2otherwise
HBS(jω)=1−HBP(jω)
Problems with Ideal Filters:
Non-causal impulse response (extends to t<0).
Infinite duration impulse response.
Physically unrealizable.
Sharp transitions cause Gibbs phenomenon.
2. Digital vs. Analog Filters
2.1 Analog Filters
Characteristics:
Process continuous-time signals.
Implemented with RLC components, op-amps.
Operate in real-time.
Advantages:
No quantization noise.
High speed (limited only by components).
No aliasing issues.
Can handle very high frequencies.
Disadvantages:
Component tolerances affect performance.
Temperature sensitivity.
Difficult to tune/adjust.
Bulky for low frequencies.
2.2 Digital Filters
Characteristics:
Process discrete-time signals.
Implemented in software or digital hardware.
Operate on sampled data.
Advantages:
High accuracy and reproducibility.
Easy to modify (programmable).
No component aging or temperature drift.
Can implement complex filters.
Linear phase achievable.
Disadvantages:
Limited by sampling rate.
Quantization errors.
Finite word-length effects.
Computational delay.
Aliasing if not properly designed.
2.3 Comparison Summary
Signal Type
Continuous-time
Discrete-time
Implementation
Hardware (RLC, op-amps)
Software/hardware
Accuracy
Limited by components
Limited by word length
Flexibility
Fixed by design
Programmable
Frequency Range
High (GHz)
Limited by sampling
Cost
Increases with precision
Decreases with technology
Stability
Component dependent
Algorithm dependent
3. Active vs. Passive Filters
3.1 Passive Filters
Components: Resistors (R), Capacitors (C), Inductors (L).
No External Power: Use only passive components.
Common Types:
RC filters: First-order, no inductors.
RL filters: First-order.
RLC filters: Second-order, can resonate.
LC filters: Second-order, no resistors.
Frequency Response Characteristics:
Low-pass RC: H(jω)=1+jωRC1
High-pass RC: H(jω)=1+jωRCjωRC
Cutoff frequency: ωc=RC1
Roll-off: 20 dB/decade per pole.
Advantages:
Simple and reliable.
No power supply needed.
Good for high frequencies.
No noise from active components.
Disadvantages:
Signal attenuation (loss).
Impedance matching issues.
Inductors large at low frequencies.
Loading effects.
3.2 Active Filters
Components: Op-amps with resistors and capacitors (no inductors).
External Power: Requires power supply for op-amps.
Common Topologies:
Sallen-Key: Popular second-order configuration.
Multiple Feedback (MFB).
State Variable: Can implement all filter types.
Biquad: Second-order section.
Frequency Response Characteristics:
Can have gain (>1).
High input impedance, low output impedance.
No loading effects between stages.
Precise control of parameters.
Advantages:
Gain available (amplification).
No inductors (compact size).
Good isolation between stages.
Tunable (via variable resistors).
Can implement complex filters.
Disadvantages:
Limited bandwidth (op-amp limitations).
Requires power supply.
Noise from active components.
Stability concerns.
More complex than passive.
3.3 Comparison Summary
Power
No external power
Requires power
Components
R, L, C
R, C, Op-amps
Gain
Attenuation only
Gain possible
Size
Large (inductors)
Compact
Frequency
Good for high freq
Limited by op-amps
Cost
Low for simple
Higher
Noise
Thermal only
Op-amp noise
4. Analog Filter Approximations
4.1 Butterworth Filter (Maximally Flat)
Magnitude Response: ∣H(jω)∣2=1+(ω/ωc)2N1 where N = filter order, ωc = cutoff frequency.
Characteristics:
Maximally flat in passband (no ripple).
Monotonic in both passband and stopband.
Roll-off: 20N dB/decade.
Group delay not constant.
Pole Locations:
Equally spaced on circle of radius ωc.
In left half-plane (for stability).
Angles: θk=2π+2N(2k−1)π, k=1,2,...,N
Transfer Function: H(s)=∏k=1N(s−sk)KωcN where sk are the poles.
Design Steps:
Determine N from specifications.
Find pole locations.
Form transfer function.
Realize with circuit.
4.2 Chebyshev Filters
4.2.1 Type I (Equiripple in Passband)
Magnitude Response: ∣H(jω)∣2=1+ϵ2TN2(ω/ωc)1 where TN(x) = Chebyshev polynomial of order N.
Characteristics:
Equiripple in passband.
Monotonic in stopband.
Sharper roll-off than Butterworth for same order.
Ripple controlled by ϵ.
Parameters:
Passband ripple (δ in dB): ϵ=10δ/10−1
Order N determined by stopband requirements.
4.2.2 Type II (Equiripple in Stopband)
Magnitude Response: ∣H(jω)∣2=1+ϵ2[TN(ωs/ω)TN(ωs/ωc)]21
Characteristics:
Monotonic in passband.
Equiripple in stopband.
Better phase response than Type I.
4.3 Comparison of Approximations
Butterworth
Flat
Monotonic
Moderate
Nonlinear
Chebyshev I
Ripple
Monotonic
Steep
Nonlinear
Chebyshev II
Monotonic
Ripple
Steep
Better than I
Elliptic
Ripple
Ripple
Steepest
Worst
Bessel
Flat
Poor
Gentle
Linear
4.4 Filter Order Determination
For Butterworth: N≥2log(ωs/ωp)log[10Ap/10−110As/10−1] where:
Ap = passband attenuation (dB)
As = stopband attenuation (dB)
ωp = passband edge
ωs = stopband edge
5. Digital Filter Fundamentals
5.1 Digital Filter Representation
General form: y[n]=∑k=0Mbkx[n−k]−∑k=1Naky[n−k]
x[n] = input
y[n] = output
bk = feedforward coefficients
ak = feedback coefficients
5.2 Transfer Function
H(z)=X(z)Y(z)=1+∑k=1Nakz−k∑k=0Mbkz−k
5.3 Frequency Response
H(ejΩ)=H(z)z=ejΩ
Periodic with period 2π.
Ω=ωT = normalized frequency.
6. Finite Impulse Response (FIR) Filters
6.1 Definition and Structure
Difference Equation: y[n]=∑k=0Mbkx[n−k]
No feedback terms (ak=0 for k≥1).
Impulse Response:
Finite length: h[n]=bn for n=0,1,...,M.
Length = M+1 (order = M).
Transfer Function: H(z)=∑k=0Mh[k]z−k
Only zeros (except possibly at origin).
Always stable (no poles except at z=0).
6.2 FIR Filter Design Methods
Window Method:
Truncate ideal impulse response with window.
h[n]=hd[n]⋅w[n] for n=−M/2,...,M/2.
Common windows: Rectangular, Hamming, Hanning, Blackman.
Frequency Sampling Method:
Specify desired frequency response at equidistant points.
Compute inverse DFT for filter coefficients.
Optimal (Parks-McClellan) Method:
Minimax design using Remez exchange algorithm.
Optimal in Chebyshev sense.
Produces equiripple error.
6.3 Linear Phase FIR Filters
For linear phase: h[n]=±h[M−n] Four types:
Type I: Symmetric, odd length (M even)
Can implement all filter types.
Type II: Symmetric, even length (M odd)
H(π) = 0, cannot implement high-pass.
Type III: Anti-symmetric, odd length
H(0) = H(π) = 0, suitable for Hilbert transformers.
Type IV: Anti-symmetric, even length
H(0) = 0, suitable for differentiators.
6.4 Advantages of FIR Filters
Always stable.
Linear phase achievable.
Simple implementation.
No limit cycles.
Good numerical properties.
6.5 Disadvantages of FIR Filters
High order needed for sharp cutoff.
Large delay (group delay = M/2 samples).
Computationally intensive.
7. Infinite Impulse Response (IIR) Filters
7.1 Definition and Structure
Difference Equation: y[n]=∑k=0Mbkx[n−k]−∑k=1Naky[n−k]
Contains feedback terms.
Transfer Function: H(z)=1+∑k=1Nakz−k∑k=0Mbkz−k
Both poles and zeros.
Canonical Forms:
Direct Form I: Separate feedforward and feedback.
Direct Form II: Minimal storage.
Cascade Form: Series of second-order sections.
Parallel Form: Parallel second-order sections.
7.2 IIR Filter Design Methods
Analog-to-Digital Transformation:
Impulse Invariance: Sample analog impulse response.
Preserves time response.
May cause aliasing.
Bilinear Transform: s=T21+z−11−z−1
No aliasing.
Warps frequency axis.
Direct Digital Design:
Least squares method.
Prony's method.
7.3 Stability Considerations
Stability Condition: All poles inside unit circle (|poles| < 1).
Stability Test:
Compute poles of H(z).
Jury's stability test.
Schur-Cohn test.
7.4 Advantages of IIR Filters
Lower order for same specifications.
Less computation per output sample.
Can match analog filters.
Efficient implementation.
7.5 Disadvantages of IIR Filters
Nonlinear phase (except all-pass).
Potential instability.
Limit cycles due to quantization.
Sensitivity to coefficient quantization.
8. FIR vs IIR Comparison
Impulse Response
Finite duration
Infinite duration
Stability
Always stable
Can be unstable
Phase
Linear phase possible
Nonlinear phase
Order
High for sharp cutoff
Low for sharp cutoff
Computation
More per output
Less per output
Delay
Large
Small
Design Methods
Window, optimal
Bilinear, impulse invariance
Implementation
Simple
More complex
Applications
Where phase important
Where efficiency important
9. Important Formulas
9.1 Analog Filter Design
Butterworth: ∣H(jω)∣2=1+(ω/ωc)2N1
Chebyshev Type I: ∣H(jω)∣2=1+ϵ2TN2(ω/ωc)1
Order Calculation: N≥2log(ωs/ωp)log[(10As/10−1)/(10Ap/10−1)]
9.2 Digital Filter Structures
FIR Direct Form: y[n]=∑k=0Mh[k]x[n−k]
IIR Direct Form II: w[n]=x[n]−∑k=1Nakw[n−k] y[n]=∑k=0Mbkw[n−k]
9.3 Transformations
Bilinear Transform: s=T21+z−11−z−1 Prewarping: ωa=T2tan(2ωdT)
Impulse Invariance: h[n]=Thc(nT)
9.4 Filter Specifications
Passband ripple: δp (linear) or Ap (dB).
Stopband attenuation: δs (linear) or As (dB).
Cutoff frequency: ωc (3-dB point).
Transition band: ωs−ωp.
9.5 Window Functions (Length M+1)
Rectangular: w[n]=1
Hamming: w[n]=0.54−0.46cos(2πn/M)
Hanning: w[n]=0.5−0.5cos(2πn/M)
Blackman: w[n]=0.42−0.5cos(2πn/M)+0.08cos(4πn/M)
9.6 Linear Phase Conditions
For FIR filter of length L = M+1:
Type I (M even): h[n]=h[M−n]
Type II (M odd): h[n]=h[M−n]
Type III (M even): h[n]=−h[M−n]
Type IV (M odd): h[n]=−h[M−n]
9.7 Group Delay
FIR with linear phase: τg=M/2 samples.
General: τg(Ω)=−dΩd∠H(ejΩ)
Last updated