High Pass Filtering

Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

ECE4330

Lecture 19
The Fourier Transform (cont.)
Prof. Mohamad Hassoun

This lecture covers the following topics:


 The significance of phase information: Signal transmission example
 Applications of the Fourier transform
o Fourier transform in a basic communication system
o Low-pass filters: ideal vs practical (Butterworth filters)
o Filter Design: low-pass, high-pass, band-pass, band-reject,
notch, and all-pass
 Analog filter design as a numerical optimization problem
 Appendix: Experimental demonstration of amplitude modulation.

The Significance of Phase Information: Signal Transmission Example


As we saw in the previous lecture, an ideal transmission system has
uniform attenuation 𝑘 for all frequencies. Also, the transmitted signal is
received delayed by 𝑡𝑑 , but with no distortion; i.e., 𝑦(𝑡) = 𝑘𝑓(𝑡 − 𝑡𝑑 ).

The above system has the transfer function 𝐻(𝜔) = 𝑘𝑒 −𝑗𝑡𝑑 𝜔 from which
the magnitude and angle are obtained as: |𝐻 (𝜔)| = 𝑘, ∠𝐻 (𝜔) = −𝑡𝑑 𝜔.
Example. Determine the steady-state output for the above ideal
transmission system to the input, 𝑓(𝑡) = cos(𝑡) + cos(2𝑡). Here, the
signal has two component frequencies (𝜔1 = 1, 𝜔2 = 2).
𝑦𝑠𝑠 (𝑡) = |𝐻 (𝜔1 )| cos(𝑡 + ∠𝐻 (𝜔1 )) + |𝐻 (𝜔2 )| cos(2𝑡 + ∠𝐻(𝜔2 ))

= 𝑘cos(𝑡 − 𝑡𝑑 ) + 𝑘cos(2𝑡 − 2𝑡𝑑 )


= 𝑘cos(𝑡 − 𝑡𝑑 ) + 𝑘cos(2(𝑡 − 𝑡𝑑 ))
= 𝑘𝑓(𝑡 − 𝑡𝑑 ) ←No distortion

Let us repeat this problem assuming a constant angle, ∠𝐻(𝜔) = −𝑡𝑑 .

𝑦𝑠𝑠 (𝑡) = 𝑘cos(𝑡 − 𝑡𝑑 ) + 𝑘cos(2𝑡 − 𝑡𝑑 )


𝑡𝑑
= 𝑘cos(𝑡 − 𝑡𝑑 ) + 𝑘cos (2 (𝑡 − )) ≠ 𝑘𝑓(𝑡 − 𝑡𝑑 )
2

Notice that the second component is delayed by half the delay of the first
component. So, different parts of the signal arrive at different times! This
leads to a distorted signal.

The following Mathcad simulations illustrate this phase-based distortion


phenomenon.
Your turn: Consider the following passive linear circuit with 𝐿 = 1
and 𝐶 = 1.

 Determine (by inspection) the steady-state output for the


following inputs:
o 𝑣𝑖𝑛 (𝑡) = 1
o 𝑣𝑖𝑛 (𝑡) = cos(𝜔𝑡), as 𝜔 → ∞
 Determine the transfer function 𝐻 (𝜔).
 Does the circuit distort the amplitude of its input?
 Does the circuit distort the phase of its input?
 Let 𝑣𝑖𝑛 (𝑡) = sin3 (𝑡). Determine the steady-state output, 𝑣𝑠𝑠 (𝑡).
 Repeat for 𝑣𝑖𝑛 (𝑡) = sin(10𝜋𝑡).

Ans.
1 − 𝑠2 1 + 𝜔2
𝐻 (𝑠) = → 𝐻 (𝜔) =
1 + 𝑠2 1 − 𝜔2

𝑣𝑠𝑠 (𝑡) = ∞ + 0.244 sin(3𝑡) = ∞

Note: The circuit resonates at 𝜔 = 1. This circuit is supposed to


operate at 𝜔 ≫ 1. For those high frequencies, the frequency response
of the filter is given by,
𝐻 (𝜔) = −1 = 1𝑒 𝑗𝜋

Therefore, for 𝜔 ≫ 1 the filter is an all-pass filter with constant


phase shift of 𝜋. Refer to the section entitled “All-Pass Filter” later in
this lecture for additional analysis and application.
Fourier Transform in a Basic Communication System
Consider the following communication system.

There are two main factors affecting the design of a communication


system. First, the transmission antenna must be of practical size. The size
of the transmission antenna (𝐿) is proportional to the wave-length,
𝑐 2𝜋𝑐 m
𝐿∝𝜆= = , 𝑐 ≅ 3 x 108
𝑓 𝜔 s
For a (talk radio channel) speech signal, 𝑚(𝑡), the frequency components
are in the range 100Hz < 𝑓 < 20KHz. And the effective signal bandwidth
for intelligible speech is about 5KHz.
So, if we are to transmit speech signals directly then the length of required
transmission antenna would be of the order of several kilometers:
(3)108
𝐿∝𝜆> ≅ 15Km
(20)103
Therefore, we need to shift the signal frequency to a higher range; i.e., we
need to modulate 𝑚(𝑡) so that it rides on a high-frequency signal 𝑦(𝑡) in
order to make the size of the antenna practical.
Other requirements include the ability of the receiver to select one specific
transmission channel from the superposition of several concurrent
transmissions (by different stations), as illustrated in the following figure.

The Fourier transform is a convenient tool for designing communication


systems. The frequency spectrum representation of a signal renders it
easier to understand the processing and design aspects of the system as
compared to the time-domain picture. We start by Fourier transforming
the signals, 𝑚1 (𝑡) and 𝑚2 (𝑡).
Next, we need to shift the spectra of 𝑀1 (𝜔) and 𝑀2 (𝜔) to high
frequencies, but with minimal spectral overlap. This is achieved by
applying frequency division multiplexing (FDM) as illustrated in the
following figure.

Note: For simplicity, we assumed that 𝑚1 (𝑡) and 𝑚2 (𝑡) are even and real
test signals, which leads to even and real Fourier transforms 𝑀1 (𝜔) and
𝑀2 (𝜔), respectively.
The carrier frequencies for AM radio range from 540KHz to 1700KHz
and are spaced at 10KHz intervals. Recall that the radian frequency 𝜔 is
2𝜋 times the Hertz frequency, 𝑓.
From the above figure, we notice that in order to minimize spectral
overlap, we should require that the sum of the signals’ (rad/sec) bandwidth
to be less than the carrier frequency separation:
𝜔𝐵2 + 𝜔𝐵1 < 𝜔𝑐2 − 𝜔𝑐1 or 𝐵2 + 𝐵1 < 𝑓𝑐2 − 𝑓𝑐1
For AM radio, the intelligible signal bandwidth is about 5KHz, which
would require neighboring carrier frequencies to be separated by 10KHz.
The above requirement is important so that the receiving station can
employ a proper narrow band-pass filter to select the spectra of the signal
of interest.
Modulation at the transmitter stage: Consider the Fourier transform pair
𝑚(𝑡) ↔ 𝑀(𝜔). The frequency shift of the signal can be obtained by
multiplying the time-domain signal by 𝑒 𝑗𝜔𝑐 𝑡 (recall the frequency-shift
property of the Fourier transform) as shown below.

Since 𝑒 𝑗𝜔𝑐 𝑡 = cos(𝜔𝑐 𝑡) + 𝑗sin(𝜔𝑐 𝑡) is complex (non-physical), let us see


what happens if the modulator used cos(𝜔𝑐 𝑡) as the modulating signal.

So, the transmitted signal has a duplicated spectrum centered at ±𝜔𝑐


1 1
𝑦 𝑡 ↔ 𝑀 𝜔 − 𝜔𝑐 + 𝑀(𝜔 + 𝜔𝑐 )
( ) ( )
2 2
with uniform attenuation of 50% for each component (refer to the spectral
plot shown below).
The following figure depicts the modulation operation in the time domain:

Now, having received the modulated transmitted signal 𝑦(𝑡) at the


receiver, how can one extract 𝑚(𝑡)?

Let us assume that the receiver can generate a cos(𝜔𝑐 𝑡) that is in phase
with the transmitter’s modulating sinusoid. Multiplying 𝑦(𝑡) by this
sinusoid generates:
1
Using the trigonometric identity: cos 2 (𝑥 ) = 2 (1 + cos 2𝑥), we may write
the demodulated signal 𝑒(𝑡) as
1 1
𝑒(𝑡) = 𝑚 𝑡 + 𝑚(𝑡) cos(2𝜔𝑐 𝑡)
( )
2 2
and write its corresponding Fourier transform as
1 1
𝐸 (𝜔) = 𝑀(𝜔) + [𝑀(𝜔 + 2𝜔𝑐 ) + 𝑀(𝜔 − 2𝜔𝑐 )]
2 4
Here is the associated spectrum,

The spectrum suggests that 𝑀(𝜔) can be extracted using a low-pass filter
whose cutoff frequency is equal to the bandwidth of 𝑚(𝑡).
The above analysis suggests the following receiver circuit [𝜔𝑐 represents
the carrier frequency in rad/sec],

Your turn: Assume a signal 𝑚(𝑡) is modulated by cos(𝜔𝑐 𝑡) and then


demodulated by cos(𝜔𝑐 𝑡 + 𝜃). Determine the expression for the signal
𝑒(𝑡). Discuss the effect of 𝜃.
The following is a Mathcad validation of the above communication system
for the even signal 𝑚(𝑡) = 𝑒 −2|𝑡| . It assumes that the modulation and
demodulation signal is cos(𝜔𝑐 𝑡), where 𝜔𝑐 = 40 rad/sec.
A low-pass filter cut-off frequency is the frequency 𝜔0 at which the filter
√2
attenuation is |𝐻(𝜔0 )| = |𝐻(0)|. The cut-off frequency leads to 50%
2
2
√2 1
power attenuation [( 2 ) = 2], with a dB (decibels) value of
2
√2 1
10log10 (( 2 ) ) = 10log10 (2) ≅ −3dB

The negative sign means attenuation.


When a non-ideal low-pass filter is used, the output signal will be
distorted as can be seen from the above simulation with the first-order
low-pass filter.
Simulations Repeated with a 2nd-order LP filter

Note that the shift 𝑡𝑑 is due to the delay introduced by the filter. This delay
is about 0.17 sec and can be verified by measuring the slope of the 2nd-
order phase response in the vicinity of the origin. Note how the 2nd order
filter leads to less distortion but slightly more delay.
We may repeat the above simulation of the communication system using
Matlab’s Simulink (employing a 2nd-order filter with cut-off frequency
𝜔0 = 10 and dc gain of 2):

Refer to the appendix for an experimental demonstration of amplitude modulation


Low-Pass Filters: Ideal vs Practical (Butterworth Filters)
Ideal “Brick-Wall” Low-Pass Filter (no signal distortion)

The transfer function for this filter can be easily obtained from the magnitude
𝜔
response, |𝐻 (𝜔)| = rect ( ), and phase response, angle(𝐻 (𝜔)) = 𝑒 −𝑗𝜔𝑡𝑑 , as
2𝜔0

𝜔
𝐻 (𝜔) = rect ( ) 𝑒 −𝑗𝜔𝑡𝑑
2𝜔𝑜
The unit-impulse response ℎ(𝑡) for this filter can be obtained using the inverse
Fourier transform of 𝐻 (𝜔) (employ Fourier Pair #18 and the time-shift property)
𝜔 𝜔𝑜
ℎ(𝑡) = 𝐹 −1 {rect ( ) 𝑒 −𝑗𝜔𝑡𝑑 } = sinc[𝜔𝑜 (𝑡 − 𝑡𝑑 )]
2𝜔𝑜 𝜋
So, from the following plot, we observe that ℎ(𝑡) is non-causal; the response of the
filter for an impulse 𝛿(𝑡) applied at 𝑡 = 0 exists for 𝑡 < 0. The above ideal low-
pass filter characteristics cannot be realize physically because ℎ(𝑡) ≠ 0 for 𝑡 < 0.

In the frequency domain, the Paley-Wiener Criterion can be used to test to see if a
mathematical transfer function 𝐻(𝜔) can be realized physically. The criterion is
necessary and sufficient and is mathematically stated in terms of the amplitude
response as

|ln|𝐻 (𝜔)||
∫ 2
𝑑𝜔 < ∞
−∞ 1 + 𝜔

If |𝐻 (𝜔)| does not satisfy the above criterion then it is physically unrealizable. Note
that if |𝐻 (𝜔)| is zero over any finite band then |ln|𝐻 (𝜔)|| = ∞ over that finite
band and the integral is infinite; meaning that the filter is unrealizable. However, it
is possible for the above integral to be finite if |𝐻 (𝜔)| is zero at a single frequency
(or over a set of discrete frequencies).
2
Your turn: Show that the transfer function 𝐻 (𝜔) = 𝑒 −𝑎𝜔 is physically
unrealizable (assume 𝑎 > 0). Employ two methods: (1) By showing that ℎ(𝑡) is
non-causal, and (2) by showing that |𝐻 (𝜔)| violates the Paley-Wiener Criterion.
For Part (1) you may use Mathcad to solve the integral.
The following low-pass filter characteristics are typical of realizable filters. Note
the distortion introduced by the amplitude and phase responses.

Higher-Order Realizable (Practical) Low-Pass Filters

We desire a low-pass filter that is maximally-flat |𝐻 (𝜔)| over


[−𝜔0 , +𝜔0 ]. (Refer to the textbook, Section 7.5.) A class of maximally
flat filters can be obtained by utilizing the Butterworth function where 𝑛 is
the filter order,
1
𝐴(𝜔, 𝑛) = |𝐻 (𝜔, 𝑛)| =
2𝑛
√1 + ( 𝜔 )
𝜔0
The following is a plot showing the magnitude response of the
Butterworth filter for a normalized cut-off frequency, 𝜔𝑜 = 1.

The transfer function for a LP Butterworth filter (has no zeros) is given by


1
𝐻 (𝑠) =
(𝑠 − 𝑝1 )(𝑠 − 𝑝2 ) … (𝑠 − 𝑝𝑛 )
𝑗𝜋(2𝑘+𝑛−1)
𝑗𝜃𝑘
with poles 𝑝𝑘 = 𝑒 =𝑒 2𝑛 , 𝑘 = 1, 2 , … 𝑛, where all poles 𝑝𝑘
belong to the LHP and are symmetrically located on the unit circle. For
example, for 𝑛 = 1, the pole is at −1. For 𝑛 = 2, the poles are complex
3𝜋 5𝜋
𝑗 𝑗
conjugate and are located at 𝑝1 = 𝑒 4 and 𝑝2 = 𝑒 4 .
The transfer function can then be written as (your turn: show it)
1 1
𝐻 (𝑠 ) ≅ 3𝜋 5𝜋
=
𝑗4
(𝑠 − 𝑒 ) (𝑠 − 𝑒 𝑗4
) 𝑠 2 + √2𝑠 + 1

For 𝑛 = 4, the poles are at

leading to the transfer function (your turn: show it)


1
𝐻 (𝑠) =
𝑠 4 + 2.61𝑠 3 + 3.41𝑠 2 + 2.61𝑠 + 1

The following are the magnitude and angle spectra associated with the 2nd
and 4th order Butterworth filters, respectively, with cutoff frequency of
𝑗𝜔
𝜔0 = 10 [obtained by setting 𝑠 = in the above normalized 𝐻(𝑠)],
10
Matlab’s Computation of Butterworth Filter Poles

Your turn: Repeat (employ Mathcad and then repeat employing


Simulink) the earlier analyzed communication system simulation
employing a 3rd order Butterworth LP filter with 𝜔0 = 10. Repeat
with 𝜔0 = 15. The answer is shown below.
Ans. [Employing Mathcad. Left (right) plot has 𝜔0 = 10 (𝜔0 = 15)]

The Significance of Locating Filter Poles on the Unit-Circle


Locating the filter poles on the unit-circle in the LHP of the complex
frequency plane leads to a flat frequency response in the region
[−𝜔0 + 𝜔0 ]. The following example illustrates the effect of moving the
poles off the unit circle.
Let us consider a second-order low-pass filter (𝛼 < 0 for stability)
1 1
𝐻 (𝑠) = =
(𝑠 − 𝑝)(𝑠 − 𝑝∗ ) (𝑠 − (𝛼 + 𝑗𝜔1 ))(𝑠 − (𝛼 − 𝑗𝜔1 ))

The magnitude response for this filter is


1 1
|𝐻 (𝜔)| = =
|𝑗𝜔 − (𝛼 + 𝑗𝜔1 )||𝑗𝜔 − (𝛼 − 𝑗𝜔1 )| 𝐿1 𝐿2

√2 √2
Let the poles of the system for the first filter be 𝑝, 𝑝∗ = − ±𝑗 and for
2 2
√2 √2
the second filter be 𝑝, 𝑝∗ = −0.6 ±𝑗 .
2 2
The (normalized) magnitude response for both filters is compared in the
following Mathcad generated plot. Note: 𝐻2(0) ≅ 1.47 and its magnitude
response is normalized by this same constant in the plot for comparison
purposes.

By inspecting the above plots, we observe that the Butterworth filter


(labelled H1) with the poles on the unit-circle has a relatively flat, non-
increasing magnitude response in the passband region. On the other hand,
the filter (labelled H2) with poles inside the unit-circle exhibits a peak
inside the passband region.
Your turn: Show that the extreme points of |𝐻 (𝜔)| occur at 𝜔 = 0 and 𝜔 =
±√𝜔12 − 𝛼 2 . Also, show that when the poles are on the unit-circle (i.e., when
√𝜔12 + 𝛼 2 = 1) the only extreme point occurs at 𝜔 = 0 and has amplitude 1.
Finally, show that when 𝛼 ≪ 𝜔1 the peaks are at ±𝜔1 with value |𝐻 (±𝜔1 )| ≅
1 1
≅ .
2𝛼𝜔1
𝛼 √𝛼 2 +4𝜔12
Your turn: The following are the transfer functions of the normalized 4th-
order low-pass filters that are normally discussed and compared in
textbooks on analog filter design. Evaluate the filters based on their
magnitude plots.
1
Butterworth: 𝐻1(𝑠) =
(𝑠2 +0.76537𝑠+1)(𝑠2 +1.84776𝑠+1)

105
Bessel: 𝐻2(𝑠) =
(𝑠2 +5.79242𝑠+9.14013)(𝑠2 +4.20758𝑠+11.4878)

0.35785
Chebyshev: 𝐻3(𝑠) =
(𝑠2 +0.35071𝑠+1.06352)(𝑠2 +0.84668𝑠+0.356412)

0.015397(𝑠2 +2.53555)(𝑠2 +12.09931)


Elliptic: 𝐻4(𝑠) =
(𝑠2 +0.25496𝑠+1.06044)(𝑠2 +0.92001𝑠+0.47183)

[Reference: Principles of Active Network Synthesis and Design, Gobind Daryanani (Wiley, 1976)]
Your turn: Employ Mathcad to compute and compare (by plotting) the
phase response (0 < 𝜔 < .9) and the step response (0 < 𝑡 < 15) of each
of the above four filters. Your answers should look like the ones in the
figures below. Evaluate the filters based on the shape of their
corresponding responses.

Filter Design Example. A direct method for designing, say a second-


order, low-pass filter would be to start with the simple generic form of a
2nd-order low-pass filter, written in terms of its coefficients, namely
1
𝐻(𝑠) =
𝑠 2 + 𝑎1 𝑠 + 𝑎0
and then solve for the coefficient such that the filter meets the required
specifications. The frequency response for such filter is given by
1
𝐻(𝜔) =
−𝜔 2 + 𝑗𝑎1 𝜔 + 𝑎0
Assume that the filter specifications are as follows:
 Unit gain at dc
√2
 Gain of at 𝜔 = 1 (cutoff frequency)
2
The first specifications is met by setting 𝑎0 = 1. For the second
specification we need to solve for 𝑎1 according to the equation
√2 1 1 1
|𝐻 (1)| = = |(1−𝜔2 )+𝑗𝑎 | = |𝑗𝑎 | = 𝑎
2 1 𝜔| 𝜔=1 1 1

Solving the algebraic equation we obtain 𝑎1 = √2, leading to the second-


order Butterworth filter
1
𝐻 (𝑠) =
𝑠 2 + √2𝑠 + 1
Let us repeat the design by requiring that the gain is 0.9 for 𝜔 = 1. This
leads to
1 1 1
|𝐻 (1)| = 0.9 = | = =
|(1 − 𝜔 2 ) + 𝑗𝑎1 𝜔| 𝜔=1 |𝑗𝑎1 | 𝑎1

or, 𝑎1 = 1.11. The following plot compares the magnitude response for
both filters. Notice that the second design is not maximally flat in the
passband region.
Your turn: Design a 3rd-order low-pass filter with the 𝐻(𝑠) shown below.
Plot the magnitude response and compare it to that of a 3rd-order low-pass
Butterworth filter. Also, plot the poles of 𝐻(𝑠) in the complex frequency
plain and compare to those of the 3rd-order Butterworth filter.
1
𝐻 (𝑠) =
𝑎3 𝑠 3 + 𝑎2 𝑠 2 + 𝑎1 𝑠 + 𝑎0

with the following specifications:

Note: In the above figure, H2 is the 3rd-order Butterworth filter,


1
𝐻 (𝑠) = 3
𝑠 + 2𝑠 2 + 2𝑠 + 1

Example. Design an analog low-pass Butterworth filter to meet the


specifications below. |𝐻 (𝜔)| = 0.9 for 𝜔 = 1000 and |𝐻 (𝜔)| =
0.1 for 𝜔 = 3000. Plot the spectra of the filter’s frequency response,
𝐻 (ω). You need to find the filter’s order 𝑛 and cutoff frequency 𝜔𝑜 .
Solution:
Employing the magnitude response for a low-pass Butterworth filter and
applying the two requirements we obtain a set of two equations
1
|𝐻 (1000)| = = 0.9
1000 2𝑛
√1 + ( )
𝜔0

1
|𝐻 (3000)| = = 0.1
3000 2𝑛
√1 + ( )
𝜔0

Which can be simplified as

1000 2𝑛 1
( ) = ( 2 ) − 1 = 0.235
𝜔0 0.9
3000 2𝑛 1
( ) = ( 2 ) − 1 = 99
𝜔0 0.1

Taking the natural logarithm of both sides leads to

2𝑛[6.908 − ln(𝜔0 )] = −1.448


2𝑛[8.006 − ln(𝜔0 )] = 4.495

We can now solve the first equation for 2𝑛 and substitute it in the second
equation to get
1.448
[− ] [8.006 − ln(𝜔0 )] = 4.495
(
6.908 − ln 𝜔0 )

or, after some manipulations we get


ln(𝜔0 ) = 7.17 or 𝜔0 ≅ 1,300
Substituting in the first equation and solving gives,
2𝑛[6.908 − 7.17] = −1.448 or 𝑛 ≅ 2.7. So, we round to 𝑛 = 3.

Mathcad verification (numerical solution):

The filter’s transfer function is then (the coefficients can be obtained from
the formula for the poles or from the Butterworth Table of filter
coefficients presented later in this lecture),
1
𝐻(𝑠) = 3 2
𝑠 𝑠 𝑠
(1300) + 2 (1300) + 2 (1300) + 1
The frequency response spectra is plotted below.

Your turn: Design an analog low-pass Butterworth filter to meet the


specifications below. Plot the spectra of the filter’s frequency response,
𝐻 (ω).
|𝐻 (𝜔)| = 0.9 for 𝜔 = 0.2𝜋 and |𝐻 (𝜔)| = 0.2 for 𝜔 = 0.3𝜋
Simulink Simulation of an 8th Order Butterworth Low-Pass Filter

The filter’s input is 𝑓(𝑡) = sin(1100𝑡) + sin(2000𝑡).

Filter passes the lower frequency only; cut-off at 𝜔0 = 1,300 rad/sec:

(The filter input is blue, sin(1100𝑡) is yellow and the filter output is red)
Filter passes both frequencies; cut-off at 𝜔0 = 2,200 rad/sec:

(Filter input: blue; filter output: red. Note the distortion. Try larger 𝜔0 )
Filter Design: Low-Pass, High-Pass, Band-Pass, Band-Reject, All-Pass
In this section we consider the design of (analog) electric filters based on the
Butterworth characteristics. We can summarize the earlier findings of the
normalized (cutoff frequency 𝜔0 = 1) 𝑛𝑡ℎ -order low-pass Butterworth filter
transfer function as,
1 1
𝐻 (𝑠) = =
(𝑠 − 𝑝1 )(𝑠 − 𝑝2 ) … (𝑠 − 𝑝𝑛 ) 𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + ⋯ + 𝑎1 𝑠 + 𝑎0
𝑗𝜋(2𝑘+𝑛−1)
𝑗𝜃𝑘
with poles 𝑝𝑘 = 𝑒 =𝑒 2𝑛 , 𝑘 = 1, 2 , … 𝑛. For convenience, we can
tabulate the values of the poles and denominator coefficients of 𝐻(𝑠) as shown in
the following table (note that 𝑎0 and 𝑎𝑛 are always 1).

𝜃𝑘 n 𝑎0 𝑎1 𝑎2 𝑎3 𝑎4 𝑎5 𝑎6 𝑎7 𝑎8
𝜋 1 1 1
3𝜋 5𝜋 2 1 √2 1
,
4 4
2𝜋 4𝜋 3 1 2 2 1
, 𝜋,
3 3
5𝜋 7𝜋 9𝜋 11𝜋 4 1 2.61 3.41 2.61 1
, , ,
8 8 8 8
3𝜋 4𝜋 6𝜋 7𝜋 5 1 3.24 5.24 5.24 3.24 1
, , 𝜋, ,
5 5 5 5
7𝜋 9𝜋 11𝜋 13𝜋 15𝜋 17𝜋 6 1 3.87 7.46 9.14 7.46 3.87 1
, , , , ,
12 12 12 12 12 12
8 1 5.13 13.14 21.85 25.69 21.85 13.14 5.13 1

The denormalized transfer function for a low-pass Butterworth filter with order 𝑛,
dc gain 𝐾 and cutoff-frequency 𝜔𝑜 can be obtained according to the formula
𝐾
𝐻𝐿𝑃 (𝑠) = 𝑛 𝑛−1
𝑠 𝑠 𝑠
𝑎𝑛 ( ) + 𝑎𝑛−1 ( ) + ⋯ + 𝑎1 ( ) + 1
𝜔𝑜 𝜔𝑜 𝜔𝑜

Example. Obtain a second-order Butterworth low-pass filter with cutoff frequency


1000 rad/sec and dc gain of 10.

From the above table we have the denominator coefficients √2 and 1. Hence, the
normalized transfer function is
1
𝐻 (𝑠) =
𝑠 2 + √2𝑠 + 1
The denormalized filter transfer function (with 𝐾 = 10) is then

10 107
𝐻𝐿𝑃 (𝑠) = 2 =
1(
𝑠 𝑠
) + √2 (103 ) + 1 𝑠2 + 103 √2𝑠 + 106
103

Your turn: Obtain the transfer function for a third-order Butterworth low-pass
filter with cutoff frequency of 1000 rad/sec and dc gain of 10. Plot the magnitude
and angle of 𝐻 (𝜔).
1010
Ans. 𝐻𝐿𝑃 (𝑠) =
𝑠3 +(2)103 𝑠2 +(2)106 𝑠+109

Active Circuit Realization of Second-Order Low-Pass Filters


The following second-order op-amp circuit (known as the Sallen-Key circuit)

has the transfer function (your turn: derive it)


1
𝑅1 𝑅2 𝐶1 𝐶2
𝐻 (𝑠) = 1 1 1
𝑠2 + ( + )𝑠 +
𝑅1 𝐶1 𝑅2 𝐶1 𝑅1 𝑅2 𝐶1 𝐶2

Example. Design the above active circuit such that it realizes the low-pass
Butterworth filter,

107
𝐻𝐿𝑃 (𝑠) =
𝑠2 + 103 √2𝑠 + 106
We may express the above transfer function as

106
𝐻𝐿𝑃 (𝑠) = (10)
𝑠2 + 103 √2𝑠 + 106
which suggests that a Sallen-Key circuit can be used followed by an op-amp
amplifier stage of gain 10. So, by matching coefficients in the expression
1
6
10 𝑅1 𝑅2 𝐶1 𝐶2
= 1 1 1
𝑠 2 + 103 √2𝑠 + 106 𝑠2 + ( + )𝑠 +
𝑅1 𝐶1 𝑅2 𝐶1 𝑅1 𝑅2 𝐶1 𝐶2

1 1 1
we arrive at the requirements = 106 and + = 103 √2. We have
𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝐶1 𝑅2 𝐶1
ample flexibility to set the four element values since we have only two constraints
(equations) to satisfy. So, we choose 𝑅1 = 𝑅2 = 10KThis choice leads to 𝐶1 ≈
0.14F and 𝐶2 = 70.7nF. In practice, the capacitors are picked from what is
available in production and would be chosen as close as possible to the theoretical
values obtained. Alternatively, we can choose practical capacitor values first and
then solve for the resistor values. Potentiometers can then be used to (precisely) set
the resistor values in the circuit. Your turn: Set 𝐶1 = 0.1F and 𝐶2 = 50nF and
solve for 𝑅1 and 𝑅2 .

Higher order filters (with even order) can be implemented by cascading two or
more Sallen-Key stages, with each stage designed to match one conjugate pairs of
poles. In other words if a 4th-order low-pass filter with poles 𝑒 ±𝑗𝜃1 and 𝑒 ±𝑗𝜃2 is to
be realized, then the first Sallen-Key circuit stage is designed to match poles
𝑒 ±𝑗𝜃1 and the second stage matches 𝑒 ±𝑗𝜃2 . A final stage consisting of an op-amp
voltage amplifier circuit is used to set the dc gain, 𝐾. The structure is shown in the
figure below.
High-Pass Butterworth Filter Design
A Butterworth high-pass filter with cutoff frequency 𝜔𝑜 and pass-band frequency
gain 𝐾 can be obtained from a Butterworth low-pass filter with the same cutoff
frequency by performing a three-step process:
Step 1: For a specified value of 𝑛, obtain the low-pass filter normalized transfer
function 𝐻(𝑠),
1
𝐻 (𝑠) =
𝑎𝑛 𝑠 𝑛 + 𝑎𝑛−1 𝑠 𝑛−1 + ⋯ + 𝑎1 𝑠 + 1
1
Step 2: Generate a high-pass filter normalized transfer function by replacing 𝑠 by
𝑠
to obtain
1
𝐻 ′ (𝑠) =
1 𝑛 1 𝑛−1 1
𝑎𝑛 ( ) + 𝑎𝑛−1 ( ) + ⋯ + 𝑎1 ( ) + 1
𝑠 𝑠 𝑠
𝑛
𝑠
=
𝑎𝑛 + 𝑎𝑛−1 𝑠 + ⋯ + 𝑎1 𝑠 𝑛−1 + 𝑠 𝑛
Step 3. Obtain the denormalized high-pass filter from the normalized transfer
𝑠
function (in Step 2) by replacing 𝑠 by and introducing a gain factor 𝐾, if needed.
𝜔𝑜

𝑠 𝑛
𝐾( )
𝜔𝑜
𝐻𝐻𝑃 (𝑠) = 𝑛−1 𝑛
𝑠 𝑠 𝑠
𝑎𝑛 + 𝑎𝑛−1 ( ) + ⋯ + 𝑎1 ( ) +( )
𝜔𝑜 𝜔𝑜 𝜔𝑜

Example. Obtain the transfer function of a 3rd-order high-pass Butterworth filter


with cutoff frequency 103 rad/sec and a high-frequency gain of 10.
From the table of denominator coefficients, the 3rd-order normalized low-pass filter
transfer function is
1
𝐻 (𝑠) =
𝑠 3 + 2𝑠 2 + 2𝑠 + 1
Transforming from low-pass to high-pass by replacing 𝑠 by 1/𝑠 we obtain,


1 𝑠3
𝐻 (𝑠) = =
1 3 1 2 1 1 + 2𝑠 + 2𝑠 2 + 𝑠 3
( ) + 2( ) + 2( )+ 1
𝑠 𝑠 𝑠
𝑠
Now, we denormalize by replacing 𝑠 by to obtain,
𝜔𝑜

𝑠 3
𝐾( )
103
𝐻𝐻𝑃 (𝑠) = 2 3
𝑠 𝑠 𝑠
1 + 2( ) + 2 (103 ) + (103 )
103

which can also be expressed as

𝐾𝑠3
𝐻𝐻𝑃 (𝑠) =
𝑠3 + (2)103 𝑠2 + (2)106 𝑠 + 109
Finally, since the high-frequency gain is specified to be 10, we may obtain the value
of 𝐾 as the solution to
lim 𝐻𝐻𝑃 (𝑠) = 10
𝑠→∞

to obtain 𝐾 = 10.

Your turn: Plot the magnitude and angle response for the above high-pass filter.

Your turn: Show that the following op-amp circuit implements a second-order
high-pass filter. Determine the filter’s cutoff frequency 𝜔𝑜 .
Matlab-Based Analog Filter Design Toolbox: afd
The Analog Filter Design (AFD) Toolbox bundles a suite of tools for analog filter
design and analysis. Given a filter type (high-pass or low-pass) it can calculate pole
and zero placements, display time and frequency-domain system responses,
calculate needed resistor and capacitor values for various active-circuit
implementations and complete several other useful functions.
This toolbox is not part of Matlab and need to be installed as an Add-On. A
compressed folder containing the software is available from the course web page.
Download by clicking the “Analog Filter Design for Matlab” link. Then extract the
files from the downloaded zipped folder. Double-click the file
to install. This will create the Add-On in Matlab, as shown in the following figure.

The executable script afd.m need to be dragged from the unzipped folder and pasted
into the metadata directory as you can see in the above figure. The toolbox is
executed by typing afd at the Matlab prompt. A tutorial is available on the course
webpage. The following example illustrates the design and active-circuit generation
of a (two-stage) fourth-order, low-pass Butterworth filter with 10KHz cutoff
frequency and dc gain of 1. First, enter the values as shown below.
From the “Analyze” menu we choose “List Transfer Function” and then “Plot Poles
and Zeros” to obtain the following:

The frequency response is obtained by choosing “Plot Frequency Response” from


the “Analyze” menu to obtain,
Next, we may design an active Sallen-Key circuit that implements the filter by
selecting “Build Circuit” from the “Build” menu. The two required stages are
shown below along with component values. Here, we choose 5% components.
The design is verified using Multisim as shown in the figure below.

Note to instructor. Demonstrate in class.


Input frequency = 1KHz

Input frequency = 15KHz


Band-Pass and Band-Reject Filter Design

A band-pass filter 𝐻𝐵𝑃 (𝑠) can be achieved by cascading a low-pass filter and a
high-pass filter, 𝐻𝐵𝑃 (𝑠) = 𝐻𝐿𝑃 (𝑠)𝐻𝐻𝑃 (𝑠), as illustrated in the figure below. It is
important to note that the band-pass lower cutoff frequency is the high-pass filter’s
cutoff frequency 𝜔𝐻𝑃 . Also, the band-pass upper cutoff frequency is that of the
low-pass filter’s cutoff frequency 𝜔𝐿𝑃 (with 𝜔𝐿𝑃 > 𝜔𝐻𝑃 ).
Similarly, a band-reject (band-stop) filter can be implemented by adding the outputs
of a low-pass and a high-pass filters (here, 𝐻𝐵𝑆 (𝑠) = 𝐻𝐿𝑃 (𝑠) + 𝐻𝐻𝑃 (𝑠) with
𝜔𝐿𝑃 < 𝜔𝐻𝑃 ) as depicted in the following figure (on the right hand side).

Your turn: Employ Simulink to generate a signal consisting of the sum of three
sinusoids oscillating at frequencies 800 rad/sec, 1000 rad/sec and 1200 rad/sec,
respectively. Design a bandpass analog filter that only passes the 1000 rad/sec
sinusoid. Employ the built-in analog filter block (search the Simulink Library
Browser for “analog filter”) to customize the filter. Solve the problem in two
different ways: (1) Employing a bandpass filter, and (2) Employing a cascade of a
low-pass and a high-pass filters. Which implementation is more efficient in terms of
filter order?

Note to instructor: Demonstrate Simulink solution in class.


Sallen-Key Band-Pass and Band-Reject 2nd-Order Active Filter Circuits
(Note: The two resistor arrangement connecting the output to ground is used to set
the passband gain)

Your turn. Consider the circuit in the following figure. Assume 𝑅 = 2Ω, 𝐿 =
10mH and 𝐶 = 1𝜇F.

𝑉𝑜
a. Determine 𝐻(𝜔) = .
𝑉𝑠
b. Plot |𝐻(𝜔)| versus 𝜔 for 𝜔 ∈ [9,800 10,200]. Identify the filter type.
c. Solve for 𝜔0 such that |𝐻(𝜔0 )| is maximized.
d. Solve for the cutoff frequencies 𝜔𝑐1 and 𝜔𝑐2 .
𝜔0
e. Determine the quality factor = .
𝜔𝑐2 −𝜔𝑐1
(You may employ Mathcad to solve for Parts b, c and d.)

Ans. (Part e) 𝑄 = 135


Notch Filter
A notch filter is a band-reject filter with a very narrow (selective) band stop.
Applications of notch filters include filtering out the 60Hz interference picked up
by electronic circuits from power lines inside buildings. Here, in addition to
exhibiting nulls at 𝜔𝑛 = (2𝜋)60 ≅ 377 rad/sec, we would like the magnitude of
𝐻(𝜔) to be flat at all other frequencies.
One way to design such a filter is to introduce a zero 𝑠𝑧1 at 𝑗𝜔𝑛 (and at
−𝑗𝜔𝑛 , because of the complex conjugate roots required by physical systems). But
in order to cancel the nulling effects of the zeros away from the null frequency we
must introduce poles 𝑠𝑝1 , 𝑠𝑝2 = 𝛼 ± 𝑗𝜔𝑛 (in the LHP; i.e., 𝛼 < 0) that are located
very close to the zeros of 𝐻 (𝜔). Here, 𝛼 should be set to a small fraction of 𝜔𝑛
(say, 𝛼 = −0.1𝜔𝑛 ). Therefore, a notch filter transfer function takes the form,
(𝑠 − 𝑗𝜔𝑛 )(𝑠 + 𝑗𝜔𝑛 )
𝐻 (𝑠) =
[𝑠 − (𝛼 + 𝑗𝜔𝑛 )][𝑠 − (𝛼 − 𝑗𝜔𝑛 )]

The following plot depicts the magnitude spectrum of a (60 Hz) notch filter
with 𝜔𝑛 = 120𝜋 and 𝛼 = −0.1𝜔𝑛 ,
Your turn:
1. Show that the transfer function for the above notch filter is given by,

2𝛼𝑠 − 𝛼 2
𝐻 (𝑠) = 1 +
(𝑠 − 𝛼 )2 + 𝜔𝑛2
2. Show that the impulse response of this filter is given by,

ℎ(𝑡) = 𝛿 (𝑡) − 𝐴(𝛼, 𝜔𝑛 )𝑒 𝛼𝑡 cos(𝜔𝑛 𝑡 + 𝜃(𝜔𝑛 )) 𝑢(𝑡)

𝛼4 −𝛼
where, 𝐴(𝛼, 𝜔𝑛 ) = √4𝛼 2 + 2 and 𝜃(𝜔𝑛 ) = tan−1 ( ).
𝜔𝑛 2𝜔𝑛

3. Plot ℎ(𝑡) vs 𝑡 (excluding the impulse) and |𝐻 (𝜔)| vs 𝜔 for 𝜔𝑛 = 120𝜋 and
𝛼 = −30. Repeat for 𝛼 = −10. What are your conclusions about the effect of
𝛼 on the time it takes for the response of the filter to reach its steady-state?
What about the effects of 𝛼 on the selectivity of the filter?

Your turn: Consider the following notch filter (𝜔𝑛 = 5), with 𝛼 = −1.2 or −0.2.

2𝛼𝑠 − 𝛼 2
𝐻 (𝑠) = 1 +
(𝑠 − 𝛼 )2 + 25
a. Compare the plots of the magnitude and angle responses of these two filters.
b. Employ Mathcad to solve for and plot the zero-state responses of the filter to
the input 𝑓(𝑡) = cos(8𝑡) + cos(5𝑡) for 𝛼 = −1.2 and 𝛼 = −0.2.
Your plots should look like the following plots,
Your turn: Consider the following RLC circuit. Assume that 𝐶 = 100 𝜇F, 𝐿 =
70.3 mH and 𝑅 = 10 

a. Find the steady-state response, 𝑣𝑜𝑢𝑡 (𝑡) for the input 𝑣𝑖𝑛 (𝑡) = cos(120𝜋𝑡) +
0.2cos(2000𝜋𝑡).
b. Plot 𝑣𝑖𝑛 (𝑡) and 𝑣𝑜𝑢𝑡 (𝑡) on the same set of axis (use 0 < 𝑡 < 40 ms and
−1.5 < 𝑣 < 1.5).
c. Plot the magnitude spectrum of 𝐻(𝜔), for 0 < 𝜔 < 2000. What type of filter
does the circuit implement? Determine the frequency that is completely
blocked by the circuit (you may use the trace function of Mathcad)?
Simulink Example of a Notch Filter
http://www.mathworks.com/help/dsp/examples/removing-an-interfering-tone-from-a-streaming-audio-signal.html

A notch filter is used to eliminate a specific frequency from a given signal. In their
most common form, the filter design parameters for notch filters are center
frequency for the notch and the 3 dB bandwidth. The center frequency is the
frequency point at which the filter has a gain of zero. The 3 dB bandwidth measures
the frequency width of the notch of the filter computed at the half-power or -3 dB
attenuation point.
In this example, you tune a notch filter in order to eliminate a 250 Hz sinusoidal
tone corrupting an audio signal. You can control both the center frequency and the
bandwidth of the notch filter and listen to the filtered audio signal as you tune the
design parameters.
The command audioToneRemovalExampleApp launches a user interface designed
to interact with the simulation. It also launches a spectrum analyzer to view the
spectrum of the audio with and without filtering along with the magnitude response
of the notch filter.
All-Pass Filters
Circuits with transfer functions of the form,
(𝑠 − 𝑧1 )(𝑠 − 𝑧2 ) … (𝑠 − 𝑧𝑛 )
𝐻 (𝑠) =
(𝑠 − 𝑝1 )(𝑠 − 𝑝2 ) … (𝑠 − 𝑝𝑛 )
that have the same number of poles as zeros, with each pole (located in the LHP for
stability) having a corresponding zero that is symmetrically (with respect to the 𝑗𝜔
axis) located in the RHP are referred to as all-pass filters. Here, 𝑝𝑖 = −𝑎𝑖 + 𝑗𝑏𝑖 (𝑎𝑖 >
0) and 𝑧𝑖 = 𝑎𝑖 + 𝑗𝑏𝑖 . An all-pass filter has a constant attenuation at
all frequencies but the relative phase between input and output varies with frequency.

An example of a first-order all-pass filter is,


𝑗𝜔 − 𝑎
𝐻 (𝜔) =
𝑗𝜔 + 𝑎
It can be shown that
2𝑎𝜔 𝜔2 −𝑎2
|𝐻(𝜔)| = 1 and ∠𝐻 (𝜔) = atan2 ( , )
𝜔2 +𝑎2 𝜔2 +𝑎2

Your turn: Plot the phase response for the above first-order, all-pass filter (assume
𝑎 = 1).
The transfer functions for a first-order and a second-order all-pass filters take the
following general forms, respectively,
𝑠−𝑎 𝑠2 −𝑎𝑠+𝑏
𝐻 (𝑠 ) = and 𝐻 (𝑠) = (𝑎, 𝑏 > 0)
𝑠+𝑎 𝑠2 +𝑎𝑠+𝑏

The following circuit (presented in a “your turn” problem earlier in this lecture) is
an example of a second-order passive all-pass filter (also known as a lattice phase
equalizer)

The lattice filter has an important application for stereo audio feeds. Phase
distortion on a monophonic audio line does not have a serious effect on the quality of
the sound unless it is very large. The same is true of the absolute phase distortion on
each leg (left and right channels) of a stereo pair of lines. However, the differential
phase between legs has a very dramatic effect on the stereo perception. This is
because the formation of the stereo image in the brain relies on the phase difference
information from the two ears. A phase difference translates to a delay, which in turn
can be interpreted as a direction the sound came from. Consequently, landlines used
by broadcasters for stereo transmissions are equalized to very tight differential phase
specifications.
In other words, an all-pass filter 𝐻1(𝑠) (with proper placement of its poles) can be
used in cascade with the main filter 𝐻(𝑠) so as to affect (shape) the overall phase
response.
Your turn: Derive the transfer functions for the following all-pass filters.

Your turn: A three-amplifier biquad filter is shown in the circuit below. (a)
𝑉1 (𝑠) 𝑉2 (𝑠) 𝑉3 (𝑠)
Determine the transfer functions 𝐻1 (𝑠) = , 𝐻2 (𝑠) = and 𝐻3 (𝑠) =
𝑉𝑖𝑛 (𝑠) 𝑉𝑖𝑛 (𝑠) 𝑉𝑖𝑛 (𝑠)
in terms of the symbolic 𝑅’s and 𝐶’s. (b) Plot (use a log scale for 0.1 < 𝜔 < 10)
the magnitude response for the three transfer functions on the same graph (for the
plot, assume that all resistor values are 1Ω and all capacitor values are 1F). Identify
the filters types. (c) At what frequency does |𝐻2 (𝜔)| attain its maximum value?

Answer for 𝐻2 (𝑠):


−𝐶2 𝑅5 𝑅6 (𝑅2 + 𝑅3 )𝑠
𝐻2 (𝑠) = 𝑅1 𝑅2 +𝑅3 𝑅3
𝑠2 + ( )𝑠 +
𝑅2 𝑅4 𝐶1 𝑅1 +𝑅6 𝑅2 𝑅4 𝑅5 𝐶1 𝐶2
Your turn: Synthesize the following transfer function using the circuit shown
below, and plot its magnitude and angle responses.
𝑉𝑜 (𝑠) 𝑠+4
𝐻 (𝑠) = =−
𝑉𝑖𝑛 (𝑠) 𝑠+6

Your turn: Show that the following circuit has the transfer function shown. Plot
the magnitude and angle responses.
𝑉𝑜 (𝑠) −2𝑠
𝐻 (𝑠) = = 2
𝑉𝑖𝑛 (𝑠) 𝑠 + 2𝑠 + 2

Your turn: The following circuit is a capacitance multiplier. Show that the input
𝐼1 𝑅2
admittance is given by, = (1 + ) 𝐶.
𝑉1 𝑅1
𝑉𝑜 (𝑠)
Your turn: Determine the transfer function 𝐻 (𝑠) = for the following circuit,
𝑉𝑖𝑛 (𝑠)
as a function of 𝐿1 , 𝐿2 , 𝐿3 , 𝐶1 , 𝐶2 and 𝐶3 . Use nodal analysis (two equations) and
then employ Mathcad to solve the equations symbolically. Then, determine integer
𝑠2 (𝑠2 +1)
element values such that 𝐻 (𝑠) = . Plot the filter’s magnitude and angle
2𝑠4 +5𝑠2 +2
response. Discuss the frequency response.

𝑉𝑜 (𝑠)
Your turn: Determine the transfer function 𝐻 (𝑠) = for the following filter.
𝐼𝑖𝑛 (𝑠)
Assume all element values are equal to 1. You may use Mathcad to solve the three
nodal equations. Plot the filter’s magnitude and angle response. Discuss the
frequency response behavior of the filter.

Your turn: Show that the following filter is a fifth-order Butterworth low-pass
filter with dc gain of 0.5 and a -3dB cutoff frequency of about 62.8 MHz. Compare
the magnitude spectrum of this filter to the one using 𝐶1 = 10nF, 𝐶3 = 32nF,
𝐶5 = 10nF, 𝐿2 = 26nF, 𝐿4 = 26nF. Discuss the results.
Analog Filter Design as a Numerical Optimization Problem

Consider an analog filter with the transfer function,

𝑎𝑚 𝑠 𝑚 + 𝑎𝑚−1 𝑠 𝑚−1 + ⋯ + 𝑎1 𝑠 + 𝑎0
𝐻 (s) =
𝑠 𝑛 + 𝑏𝑛−1 𝑠 𝑛−1 + ⋯ + 𝑏1 𝑠 + 𝑏0

Where 𝑚 ≤ 𝑛. We are interested in solving for the 𝑛 + 𝑚 + 2 parameters:

𝑎0 , 𝑎1 , 𝑎2 , … , 𝑎𝑚 , 𝑏0 , 𝑏1 , … 𝑏𝑛−1 , 𝑐

Such that a set of specifications on the magnitude and phase response of


the 𝐻(𝜔) are met. Let us assume that the following set of 𝑁 specifications
are given on the magnitude response of the filter at frequencies ω𝑖 , 𝑖 =
1,2 , … , 𝑁:

|𝐻 (ω1 )| = 𝐴1 , |𝐻 (ω2 )| = 𝐴2 , … , |𝐻 (ω𝑖 )| = 𝐴𝑖 , … |𝐻 (ω𝑁 )| = 𝐴𝑁

Also, based on earlier discussion about minimizing phase distortion, we would like
to force the phase response of the filter to be linear over the pass-band region, i.e.,
∠𝐻(𝜔) = −𝑐𝜔. This adds the following 𝑀 constraints (where, the 𝜔𝑗 ’s
are user specified and are supposed to sample the frequencies of the pass
band),

arg(𝐻 (𝜔1 )) = −𝑐𝜔1 , arg(𝐻 (𝜔2 )) = −𝑐𝜔2 , … , arg (𝐻(𝜔𝑗 ))


= −𝑐𝜔𝑗 , … , arg(𝐻 (𝜔𝑀 )) = −𝑐𝜔𝑀

Typically, the number of specifications (constraints) is greater than the


number of parameters, 𝑁 + 𝑀 > 𝑛 + 𝑚 + 2 (over-determined system of
equations) and a perfect solution does not exist. Note that we may
approximate the filter parameters by minimizing the sum-of-squared error
(SSE) criterion (recall LSE regression problems from your numerical
methods course):
𝐼 (𝑎0 , 𝑎1 , 𝑎2 , … , 𝑎𝑚 , 𝑏0 , 𝑏1 , … 𝑏𝑛−1 , 𝑐 )
𝑁 𝑀
2
= ∑[|𝐻(ω𝑖 )| − 𝐴𝑖 ]2 + 𝜆 ∑[arg(𝐻(𝜔𝑖 )) + 𝑐𝜔𝑖 ]
𝑖=1 𝑖=1

This is a nonlinear optimization problem that can have multiple solutions


(local minima) with varying degrees of solution accuracy. The 𝜆 is a
positive weighting factor that we can increase to give more emphasis on
meeting the phase linearity constraint. A solution (𝑎0∗ , 𝑎1∗ , … , 𝑎𝑚 ∗
,
𝑏0∗ , 𝑏1∗ … 𝑏𝑛−1

, 𝑐 ∗ ) is referred to as the least-squares-error (LSE solution).
The LSE solution is a sort of a “compromise” solution that attempts to
satisfy all constraints, as close as possible.

The SSE criterion 𝐼 is a nonlinear function of its (regression) parameters.


Therefore, special numerical optimization methods must be employed
(such as Matlab’s fminsearch and Mathcad’s Minimize optimization
functions). The problem can have multiple solutions (local minima). Care
must be taken in choosing initial search parameters so that the underlying
numerical algorithms converge to a proper design for the digital filter. By
“proper design” we mean a design that locates the poles to the left of the
𝑗𝜔 axis (ensuring stability). The following example illustrates the LSE-
based filter design.

Example. Design the third-order low-pass analog filter


𝑎2 𝑠 2 + 𝑎1 𝑠 + 𝑎0
𝐻 (s) = 3
𝑠 + 𝑏2 𝑠 2 + 𝑏1 𝑠 + 𝑏0
according to the following specifications:
1. Its magnitude is 1 at ω = 0, 1 at ω = 0.8, and 1 at ω = 0.9
√2
2. Its magnitude at ω = 1 is (cut-off frequency)
2
3. Its magnitude is 0.3 at ω = 1.2 and is 0 at ω = 1.8
4. Its phase is 0 at ω = 0, −0.25𝑐 at ω = 0.25, −0.5𝑐 at ω = 0.5 and
−0.9𝑐 at ω = 0.9, for some positive 𝑐.
So, we have seven parameters to solve for and ten constraints. The SSE
criterion is given by the function (with 𝜆 chosen as 0.2)
𝐼 (𝑎2 , 𝑎1 , 𝑎0 , 𝑏2 , 𝑏1 , 𝑏0 , 𝑐 )
= [(|𝐻 (0)| − 1)2 + (|𝐻 (0.8)| − 1)2 + (|𝐻 (0.9)| − 1)2
2
+ (|𝐻 (1)| − √2/2) + (|𝐻 (1.2)| − 0.3)2 +(|𝐻 (1.8)| − 0)2 ]
2 2
+ (𝜆) [(arg(𝐻(0)) + 0) + (arg(𝐻(0.25)) + 0.25𝑐)
2 2
+ (arg(𝐻(0.5)) + 0.5𝑐) + (arg(𝐻(0.9)) + 0.9𝑐) ]

Note that you have to experiment numerically with several initial search
points and choose the physically feasible solution (e.g., poles in the left
half plane) that gives the smallest value for 𝐼. The following is the
Mathcad worksheet that generates the solution (for the indicated initial
search point),
Therefore, the LSE solution to the optimization problem is,

(𝑎2∗ , 𝑎1∗ , 𝑎0∗ , 𝑏2∗ , 𝑏1∗ , 𝑏0∗ ) = (0.261, 0.061, 0.7, 1.194, 1.303, 0.69)

which achieves a value of 𝐼 = 0.018 . This solution leads to the transfer


function

0.261𝑠 2 + 0.061𝑠 + 0.7


𝐻(𝑠) = 3
𝑠 + 1.194𝑠 2 + 1.303𝑠 + 0.69

The poles are (located poles in the LHP) −0.7179, −0.2381 ± 𝑗0.9511
and the zeros are at −0.1169 ± 𝑗1.6335. The following plot depicts the
location of the poles (blue) and zeros (red).

The following (red trace) is Mathcad’s solution for the magnitude


response. The red circles represent the design magnitude data.
The blue response in the above plot is that for the 3rd-order Butterworth
low-pass filter

1
𝐻 (𝑠) =
𝑠 3 + 2𝑠 2 + 2𝑠 + 1

The following plot compares the phase response for the two filters over
the pass band. The red circles are the angle data.

The following is the LSE solution for the above filter design problem
utilizing Matlab’s fminsearch optimization function.
Case 1: Magnitude and angle specifications are imposed ( 𝜆 = 1)
Case 2: Only Magnitude specifications are imposed (𝜆 = 0)

Your turn: Determine the LSE solution for the third-order analog filter
with the following specifications. Also, generate plots similar to the three
plots shown above.
 Its magnitude is 1 at ω = 0, 1 at ω = 0.9, and 0.85 at ω = 1
 Its magnitude is 0.3 at ω = 1.5 and is 0.2 at ω = 2
 Its magnitude is 0.1 at ω = 3 and is 0 at ω = 5
 Its phase is 0 at ω = 0, −0.25𝑐 at ω = 0.25, −0.5𝑐 at ω = 0.5 and
−0.9𝑐 at ω = 0.9.
Set 𝜆 = 0.3 and experiment with different sets of initial conditions.
Appendix
Experimental Demonstration of Amplitude Modulation

In the following experiment a 1 𝑉𝑝𝑝 positive 1 kHz triangular wave is


modulated by a 20 kHz sinusoid of 1 𝑉𝑝𝑝 . The modulated signal is then
multiplied by the same sinusoidal signal and the resulting signal passes
through a 4th-order low-pass Butterworth filter with cutoff frequency 𝑓𝑜 .

The following picture shows the experimental setup used. It shows the low-
pass filter sitting on top of two analog multipliers. One multiplier is used to
implement modulation. The other multiplier is used for demodulation.

The figure below depicts the spectrum of the demodulated signal.

The following oscilloscope capture depicts the demodulated signal (blue


trace) after passing through the low-pass filter with 𝑓𝑜 = 2 kHz. Here, the
filter attenuates the higher harmonics of the triangular wave causing the
output to look sinusoidal.

The following oscilloscope screen capture depicts the demodulated signal


after passing through the low-pass filter, with 𝑓𝑜 = 10 kHz. Here, the filter
captures all of the significant harmonics of the triangular wave leading to
proper reconstruction. The output signal in this case is 𝑦(𝑡) ≅ 0.5𝑓 (𝑡).

Increasing the filter cutoff frequency to 20 kHz leads to distortion (aliasing)


because the 4th-order filter passes an attenuated portion of the image spectrum,
centered at 40 kHz. This is depicted in the following oscilloscope image.
Mini Project
Design and build a 6th order Butterworth low-pass analog filter with cutoff
frequency of 10 KHz. You need to perform the following:

 Build your filter using available components. Make sure you use low
tolerance capacitors that come as close as possible to the design values. You
might want to use small pots for the resistors.
 Measure the actual values of all resistors and capacitors used. Determine the
actual transfer function, 𝐻(𝑠). Find its coefficients based on the actual
component values used in your circuit.
 Use Mathcad/Matlab to determine the frequency response [plot |𝐻 (𝜔)| 𝑣𝑠 𝜔]
of your filter.
 Determine and plot the poles of your filter. Compare them to the design poles.
 Use Multisim to simulate your filter (using measured component values) and
generate a frequency response plot.
 Test your filter experimentally (using a sine wave generator and an
oscilloscope) and determine its frequency response (generate plot from data).
What is the gain at 1 KHz, 10 KHz, 11 KHz, and 15 KHz?
Submit a complete electronic report (with introduction, discussion, simulations,
oscilloscope outputs and conclusions) to document your work. Be prepared to
demonstrate the hardware setup to your instructor. (Note: This filter can be used as
part of a mini project presented at the end of Lecture 23).
Hints: A cascade of three stages of Sallen-Key circuits can be used to implement
your filter. You may use the AFD Toolbox to design the filter and to determine the
circuit component values. Additional op-amp circuits may be used as buffers and
amplifiers if needed. Make sure you use op-amps with bipolar supply voltages of
±12 Volt or higher. Make sure the signal processed by the filter does not get
clipped (as a result of op-amp saturation).
Sample Student Work (by Alex Pluff, Winter 16)

Comparing the poles for the ideal and the actual (experimental) filters

Actual filter frequency response


In the following oscilloscope pictures, the blue trace represents the input signal and
the yellow trace represent the output signal (1KHz, 10KHz, 11KHz and 15KHz).

You might also like