FILTERS
Assoc. Prof. Huang Zhiwei
Email:
[email protected] Tel: 6516 8856
Office: E2-02-30
© Copyright National University of Singapore. All Rights Reserved.
OVERVIEW
1. Fundamentals
a. Frequency
b. Complex Exponentials
c. Impedance
2. Frequency Response
3. Input-Output Relationship of Filters
4. Passive Filters
a. Low-pass Filter
b. High-pass Filter
c. Bandpass Filter
5. Active Filters
a. Low-pass Filter
b. High-pass Filter
c. Bandpass Filter
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
OVERVIEW
Reference:
Chapter 1. Basic Concepts of Medical Instrumentation
Medical Instrumentation Application and Design, 4th Edition
Robert A. Peura and John G. Webster
ISBN: 978-0-471-67600-3
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.1 FREQUENCY
• In DC circuits, voltages and currents are constants, and do not change with time.
• In AC circuits, voltages and currents change with time. Sinusoidal waves are widely
used in AC circuits.
• They can be represented as:
2𝜋
𝐴 𝑠𝑖𝑛 2𝜋𝑓𝑡 + 𝜃 = 𝐴 𝑠𝑖𝑛 𝜔𝑡 + 𝜃 = 𝐴 𝑠𝑖𝑛 𝑡+𝜃
𝑇
Where 𝐴 = amplitude of sine wave 𝝅/𝟐
𝑓 = frequency of since wave (Hz)
𝜔 = 2𝜋𝑓 = angular frequency (rad/s)
θ = phase angle of sine wave (rad)
𝑇 = 1/𝑓 = period (s)
• The sine function lags 90° in phase behind the cosine function.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.2 COMPLEX EXPONENTIAL
• Since sinusoidal sources e.g. 𝑣 𝑡 = 𝐴𝑐𝑜𝑠(𝜔𝑡 + 𝜙) changes with time, a
more efficient way to describe them is to use complex exponential forms:
𝐴𝑅𝑒 𝑒 𝑗 𝜔𝑡+𝜙 = 𝐴𝑅𝑒 𝑒 𝑗𝜙 𝑒 𝑗𝜔𝑡 = 𝑅𝑒[ 𝐴𝑒 𝑗𝜙 𝑒 𝑗𝜔𝑡 ]
• Representation comes from Euler’s identity:
𝐸𝑢𝑙𝑒𝑟 ′ 𝑠 𝑓𝑜𝑟𝑚𝑢𝑙𝑎: 𝑒 𝑗𝜔𝑡 = cos(𝜔𝑡) + 𝑗 sin(𝜔𝑡)
𝑒 −𝑗𝜔𝑡 = cos(−𝜔𝑡) + 𝑗 sin(−𝜔𝑡)= cos(𝜔𝑡) − 𝑗 sin(𝜔𝑡)
1 𝑗𝜔𝑡
sin 𝜔𝑡 = 𝑒 − 𝑒 −𝑗𝜔𝑡
2𝑗
1 𝑗𝜔𝑡
cos 𝜔𝑡 = 𝑒 + 𝑒 −𝑗𝜔𝑡
2
• 𝑉 = 𝐴𝑒 𝑗𝜙 = 𝐴∠𝜙 (vector for voltage phasor).
– 𝐴 = 𝑉 = magnitude for the modulus of 𝑉
– 𝜙 = 𝐴𝑟𝑔[𝑉] = phase of 𝑉
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.3 IMPEDANCE 𝑣 𝑜𝑟 𝑖 = 𝑅𝑒[ 𝐴𝑒 𝑗𝜙 𝑒 𝑗𝜔𝑡
Resistance Inductance Capacitance
𝑣(𝑡) = 𝑅𝑖(𝑡) 𝑑𝑖(𝑡) 𝑑𝑣(𝑡)
𝑣(𝑡) = 𝐿 𝑖(𝑡) = 𝐶
𝑉𝑒 𝑗𝜃 = 𝑅𝐼𝑒 𝑗𝜙 𝑑𝑡 𝑑𝑡
𝑉∠𝜃 = 𝑅𝐼∠𝜙 𝑉𝑒 = 𝑗𝜔𝐿𝐼𝑒 𝑗𝜙
𝑗𝜃
𝐼𝑒 = 𝑗𝜔𝐶𝑉𝑒 𝑗𝜃
𝑗𝜙
∴ 𝑉 = 𝑅 𝐼Ԧ 𝑉∠𝜃 = 𝑗𝜔𝐿𝐼∠𝜙 1 −𝑗
𝑉∠𝜃 = 𝐼∠𝜙= 𝐼∠𝜙
𝑗𝜔𝐶 𝜔𝐶
𝜃 = 𝜙, ∴ voltage and ∴ 𝑉 = 𝑗𝜔𝐿𝐼Ԧ
1 −𝑗
current are in phase. Since 𝜃 = 𝜙 + 90°, voltage ∴𝑉 = 𝐼Ԧ = 𝐼Ԧ
𝑗𝜔𝐶 𝜔𝐶
leads the current by 90°. Since 𝜃 = 𝜙 − 90°, current
leads the voltage by 90°.
• In general, 𝑉 = 𝑍Ԧ𝐼,
Ԧ where 𝑍Ԧ is the impedance of the component.
1
• 𝑍Ԧ𝑅 = 𝑅, 𝑍Ԧ𝐶 = 𝑗𝜔𝐶, 𝑍Ԧ𝐿 = 𝑗𝜔𝐿.
• With phasor representation, the capacitor or inductor behaves like a
resistor with a “complex resistance” or an impedance.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
EXAMPLE 4.1 IMPEDANCE
Determine the current flowing in the series AC circuit:
i i
V ∿
i
𝑉 = 𝑖 𝑅𝑇 = 𝑖 (𝑅 + 1/𝑗𝑤𝐶 + 𝑗𝑤𝐿)
1
𝑖 = 𝑉/ (𝑅 + 1/𝑗𝑤𝐶 + 𝑗𝑤𝐿)=𝑉/ (𝑅 + 𝑗 𝑤𝐿 − )
𝑤𝐶
= 230/ (3 + 𝑗 (2𝝅𝑋50𝑋31.9𝑋10^(−3) − 1/(2𝝅𝑋50x319x10^(-6)))
= 230/ (3 + 0.03𝑗) =76.7 /tan-1(-0.01) (A) =76.7 /-0.570 (A)
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.4 FREQUENCY RESPONSE
• Since the impedance of capacitors and inductors changes with frequency,
performance of the circuit will also change with frequency.
• This change in the circuit performance (usually the gain, G) with varying
frequency is called the frequency response of the circuit.
Ideal gain
Open-loop gain.
Closed-loop gain.
Advantage of Amplifier-circuit gain
negative feedback: can never exceed the
frequency response op-amp gain.
is greatly extended.
Gain-bandwidth product
e.g. [Gain x Bandwidth =106 Hz]
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.4 FREQUENCY RESPONSE
• Voltage gain and power gain are important parameters in designing an
amplifier circuit.
• The voltage gain, G (or Av) described so far is in absolute form.
• It is a common practice to express the power and voltage gains in decibels
(dB) (i.e., base-10 logarithm):
Vout
Voltage gain AV ( dB ) = 20 log AV = 20 log
Vin
Pout
Power gain A P ( dB) = 10 log A P = 10 log
Pin
where |AV| and |AP| are the voltage and power gains.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
EXAMPLE 4.2 FREQUENCY RESPONSE
Given Vin = 10 mV and Vout = 7.07 mV (or 10/√2 mV ), find AV(dB).
Vout 7.07mV
A V (dB) = 20 log = 20 log = −3dB
Vin 10mV
• Negative dB values represent a power loss.
• When the output voltage is 0.707 (or 1/√2) of the input voltage, its voltage
gain is -3 dB.
To convert voltage gain from absolute value To convert voltage gain from dB form to
to dB form absolute value
Convert Av = 100 to dB value Convert Av = 40dB to absolute value
Av (dB) = 20 log 100 40 dB = 20 log Av
= 40 dB log Av = 40/20
Av = 10 (40/20)
Av = 100 times or 100 V/V
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.4 FREQUENCY RESPONSE
A graphical representation of the relationship between amplifier gain and
operating frequency is called a Frequency Response Curve:
Av (dB)
mid-band or pass-band
Av(pass)
3dB
Av(-3dB) 1Τ 2
1Τ 2
linear scale
cutoff or corner frequency
f (Hz)
Log scale
fL Bandwidth (BW) fH
• fH = High Cutoff Frequency, fL = Low Cutoff Frequency
• Bandwidth (BW) = fH – fL
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.4 FREQUENCY RESPONSE
• Most amplifiers have relatively constant gain over a certain range of
frequencies known as “pass-band” or “mid-band” gain.
• This band of frequencies over which the gain is relatively constant is called
the bandwidth (BW) of the amplifier, BW = fH – fL.
• When the operating frequency goes outside this frequency range, the gain
begins to drop off.
• The low (fL) and high (fH) cutoff frequencies are also referred to corner
frequency, break or half-power frequencies.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.5 INPUT-OUTPUT RELATIONSHIP OF FILTERS
• A filter is an electronic circuit which performs signal processing functions
that attenuates sinusoidal voltage signals at undesired frequencies and
passes signals at preferred frequencies.
• Filters therefore alter the amplitude and phase of the input signal in a
desired way.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.5 INPUT-OUTPUT RELATIONSHIP OF FILTERS
𝑣𝑖 𝑣𝑜
Input source Filter Output
• Electronic circuit implementation (Passive and Active Filters)
• Software algorithm implementation (Part 2)
𝑣𝑖 = 𝑉𝑚 sin 𝜔𝑡 + 𝜙
𝑣𝑜 = 𝑉𝑚 𝑇(𝜔) sin 𝜔𝑡 + 𝜙 + 𝜃 𝜔
Where 𝑉𝑚 = amplitude of the input signal.
𝑇(𝜔) = amplitude of the transfer function of filter (amplitude
response).
𝜃 𝜔 = phase of 𝑇 𝜔 (phase response).
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.5 INPUT-OUTPUT RELATIONSHIP OF FILTERS
Low-pass High-pass
Ideal low-pass filter
Bandpass Bandstop
1 𝑖𝑓 𝑓 < 𝑓𝑐
𝑇 𝑓 =ቊ
0 𝑖𝑓 𝑓 > 𝑓𝑐
𝜔
where 𝑓 = 2𝜋
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.6.1 LOW-PASS PASSIVE FILTER
• The first-order RC and RL networks approximate a low-pass filter.
• Example: Filtering out interfering RF signals and noise from ECG.
𝑣𝑜 1Τ𝑗𝜔𝐶 𝑣𝑜 𝑅
𝑇 𝜔 = = 𝑇 𝜔 = =
𝑣𝑖 𝑅 + 1Τ𝑗𝜔𝐶 𝑣𝑖 𝑅 + 𝑗𝜔𝐿
1 1
= 1+𝑗𝜔𝑅𝐶 = 1+𝑗𝜔Τ𝜔
𝑐
1 𝑅
= 1+𝑗𝜔Τ𝜔 Where 𝜔𝑐 = 𝐿
𝑐
1
Where 𝜔𝑐 = 𝑅𝐶
• At 𝜔 = 𝜔𝑐 (corner frequency or cutoff frequency), the magnitude is 1Τ 2
times the magnitude at 𝜔=0 that the voltage experiences a -3dB drop.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.6.2 HIGH-PASS PASSIVE FILTER
• High-pass filters can also be realized with first-order RC or RL circuits.
• Example: Filtering out dc offset and low-frequency artifacts due to
electrodes in ECG signal.
𝑣𝑜 𝑅 𝑣𝑜 𝑗𝜔𝐿
𝑇 𝜔 = = 𝑇 𝜔 = =
𝑣𝑖 𝑅 + 1Τ𝑗𝜔𝐶 𝑣𝑖 𝑅 + 𝑗𝜔𝐿
1 1
= 1−𝑗𝜔 Τ𝜔 = 1−𝑗𝜔 Τ𝜔
𝑐 𝑐
1 𝑅
Where 𝜔𝑐 = 𝑅𝐶 Where 𝜔𝑐 = 𝐿
• The corner frequency of the high-pass filter is 𝜔𝑐 .
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.6.3 BANDPASS PASSIVE FILTER
• Second-order circuits e.g. RLC circuits can be used to realize bandpass and
bandstop (or notch) filters.
• Alternatively, a combination of a low-pass circuit and a high-pass circuit
can be used to achieve the same filtering effect.
Low-pass filter High-pass filter
𝑣𝑖 𝑣𝑜
corner corner
Input source frequency 𝜔2 frequency 𝜔1
Output
• If a single filter cannot satisfy the requirement
of signal processing, several filters can be
cascaded together to form a multistage filter.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.7 ACTIVE FILTERS
Passive Filters Active Filters
• Contains passive components (R, L, C). • Combination of passive and active
• Operates only on signal input with no components (e.g. transistors, op-
external power supply. amps and battery).
• No power gain (no amplification). • Require an external power source.
• Theoretically, passive filters have no • Power gain (amplification).
frequency limitations. • Active filters have limitations due to
• Cheaper. active elements.
• More expensive.
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.7.1 LOW-PASS ACTIVE FILTER
(Recall the inverting op-amp?)
- 𝑣− = 0
𝑣+ = 0
When
(At low frequency, the Cut-off frequency
circuit approximates to an
inverting amplifier with
−𝑅𝑓
gain, 𝐺 = )
𝑅𝑖
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.7.2 HIGH-PASS ACTIVE FILTER
(Recall the inverting op-amp?)
𝑣− = 0
𝑣+ = 0
(At high frequency, the Cut-off frequency
circuit approximates to an
inverting amplifier with
−𝑅𝑓
gain, 𝐺 = )
𝑅𝑖
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
4.7.3 BANDPASS ACTIVE FILTER
Cut-off frequencies
FILTERS
© Copyright National University of Singapore. All Rights Reserved.
SUMMARY
1.Frequency
2.Complex Exponentials
3.Impedance
4.Frequency Response
5.Input-Output Relationship of Filters
6.Passive Filters
a. Low-pass Filter
b. High-pass Filter
c. Bandpass Filter
7. Active Filters
a. Low-pass Filter
b. High-pass Filter
c. Bandpass Filter
FILTERS
© Copyright National University of Singapore. All Rights Reserved.