This Homework Is Due On Wednesday, February 26, 2020, at 11:59PM. Self-Grades Are Due On Monday, March 2, 2020, at 11:59PM
This Homework Is Due On Wednesday, February 26, 2020, at 11:59PM. Self-Grades Are Due On Monday, March 2, 2020, at 11:59PM
1 Phasors
Solution
𝑗
The impedances are as follows: 𝑍 𝑅 = 𝑅 = 1.5, 𝑍 𝐶 = 1
𝑗𝜔𝐶 = 1
𝑗𝜔 = − 𝜔 and
𝐿 = 𝑗𝜔𝐿 = 𝑗𝜔.
(a) 𝑍 𝑅 (@𝜔 = 0.5) (b) 𝑍 𝐶 (@𝜔 = 0.5) (c) 𝑍 𝐿 (@𝜔 = 0.5) (d) 𝑍𝑡𝑜𝑡𝑎𝑙 (@𝜔 = 0.5)
Solution
Substituting for 𝜔 = 12 in the above answers, we get, 𝑍 𝑅 = 1.5, 𝑍 𝐶 = −2𝑗
and 𝑍 𝐿 = 0.5𝑗. Since the elements are
√ in series, 𝑍𝑡𝑜𝑡𝑎𝑙 = 𝑍 𝐿 + 𝑍 𝐶 + 𝑍 𝑅 =
1.5 − 1.5𝑗. This has magnitude 1.5 2 and phase − 𝜋4 . Following are the
plots:
1
HW 4 @ 2020-02-27 11:12:09-08:00
(a) 𝑍 𝑅 (@𝜔 = 0.5) (b) 𝑍 𝐶 (@𝜔 = 0.5) (c) 𝑍 𝐿 (@𝜔 = 0.5) (d) 𝑍𝑡𝑜𝑡𝑎𝑙 (@𝜔 = 0.5)
Figure 3: Impedances at 𝜔 = 1.
Solution
Following the same method as last time, with 𝜔 = 1, 𝑍 𝑅 = 1.5, 𝑍 𝐶 = −𝑗,
𝑍 𝐿 = 𝑗 and 𝑍𝑡𝑜𝑡𝑎𝑙 = 1.5 Thishas magnitude 1.5 and phase 0.
Figure 4: Impedances at 𝜔 = 1.
2
EECS 16B Spring 2020 HW 4
Figure 5: Impedances at 𝜔 = 2.
Solution
Again, following the same method as last time, with 𝜔 = 2, 𝑍 𝑅 = 1.5, √
𝑍 𝐶 = −0.5𝑗, 𝑍 𝐿 = 2𝑗 and 𝑍𝑡𝑜𝑡 𝑎𝑙 = 1.5 + 1.5𝑗. This has magnitude 1.5 2
and phase + 𝜋4 .
Figure 6: Impedances at 𝜔 = 2.
Solution
From our above answers, clearly the natural frequency, 𝜔𝑛 = 1 rad/s .
This is where the imaginary parts of the impedance cancel each other.
2 Low-pass Filter
You have a 1 kΩ resistor and a 1 µF capacitor wired up as a low-pass filter.
a) Draw the filter circuit, labeling the input node, output node, and
ground.
3
HW 4 @ 2020-02-27 11:12:09-08:00
Solution
𝑅
𝑉𝑜𝑢𝑡
𝑉𝑖𝑛 𝐶
b) Write down the transfer function of the filter, 𝐻(𝑗𝜔) that relates the
output voltage phasor to the input voltage phasor. Be sure to use the
given values for the components.
Solution
First, we convert everything into the phasor domain. We have,
𝑍 𝑅 = 𝑅 = 1 × 103 Ω (1)
1 1
𝑍𝐶 = = F (2)
𝑗𝜔𝐶 𝑗𝜔 × 10−6
𝑍𝐶 e
𝑉
e𝑜𝑢𝑡 = 𝑉𝑖𝑛 (3)
𝑍𝐶 + 𝑍𝑅
1
𝑉
e𝑜𝑢𝑡 𝑗𝜔𝐶
= 𝐻(𝜔) = (4)
𝑉
e𝑖𝑛 𝑅+ 1
𝑗𝜔𝐶
1
= (5)
1 + 𝑗𝜔𝑅𝐶
1
= (6)
1 + 𝑗𝜔/ 𝑅𝐶
1
1
= (7)
1 + 𝑗𝜔 × 10−3
(8)
c) Write an exact expression for the magnitude of 𝐻(𝑗𝜔 = 𝑗106 ), and give
an approximate numerical answer.
4
EECS 16B Spring 2020 HW 4
Solution
We obtained this expression for the transfer function’s magnitude above:
p
1 + 𝜔2 /𝜔2𝑐
|𝐻(𝜔)| =
1 + 𝜔2 /𝜔 2𝑐
d) Write an exact expression for the phase of 𝐻(𝑗𝜔 = 𝑗1), and give an
approximate numerical answer.
Solution
We obtained this expression for the transfer function’s phase above:
𝜔
∠ 𝐻(𝜔) = atan2(− , 1)
𝜔𝑐
Plugging in for 𝜔 = 1:
100
∠ 𝐻(𝜔 = 1) = atan2(− , 1) = tan−1 (−10−3 )
103
e) Write down an expression for the time-domain output waveform 𝑉𝑜𝑢𝑡 (𝑡)
of this filter if the input voltage is 𝑉(𝑡) = 1 sin(1000𝑡) V. You can assume
that any transients have died out — we are interested in the steady-state
waveform.
5
HW 4 @ 2020-02-27 11:12:09-08:00
Solution
√
3 2 1
|𝐻(𝜔 = 10 )| = =√
2 2
1
𝑉𝑜𝑢𝑡 (𝑡) = √ sin 1000𝑡 − 45◦
2
f) Use a computer or calculator to help you sketch the Bode plot (both
magnitude and phase) of the filter on the graph paper below.
6
EECS 16B Spring 2020 HW 4
103
102
101
|𝐻(𝜔)|
100
10−1
10−2
10−3
10−4 −1
10 100 101 102 103 104 105 106 107
𝜔
Semi-log plot of transfer function phase
80
60
40
20
∠ 𝐻(𝜔)
0
−20
−40
−60
−80
10−1 100 101 102 103 104 105 106 107
𝜔
7
HW 4 @ 2020-02-27 11:12:09-08:00
Solution
Log-log plot of transfer function magnitude
4
10
103
102
101
|𝐻(𝜔)|
100
10−1
10−2
10−3
10−4 −1
10 100 101 102 103 104 105 106 107
𝜔
Semi-log plot of transfer function phase
80
60
40
20
∠ 𝐻(𝜔)
0
−20
−40
−60
−80
10−1 100 101 102 103 104 105 106 107
𝜔
a) First, you realize that you can build simple filters using a resistor and a
8
EECS 16B Spring 2020 HW 4
capacitor. Design the first-order passive low and high pass filters with
following frequency ranges for each filter using 1 µF capacitors. (“Passive”
means that the filter does not require any power supply.)
Solution
a) Low-pass filter
1
𝑓3 dB = = 2400 Hz
2𝜋𝑅𝐶
Therefore, we need a 66 Ω resistor.
66 Ω
𝑉in 𝑉out
1 µF
b) High-pass filter
1
𝑓3 dB = = 100 Hz
2𝜋𝑅𝐶
Therefore, we need a 1.6 kΩ resistor.
1 µF
𝑉in 𝑉out
1.6 kΩ
9
HW 4 @ 2020-02-27 11:12:09-08:00
Solution
𝐶𝐻
𝑅𝐿
𝑉in 𝑉out
𝐶𝐿 𝑅𝐻
1
1
1
𝑗𝜔𝐶 𝐻 + 𝑅𝐻 1
𝑗𝜔𝐶 𝐿 1 + 𝑗𝜔𝑅 𝐻 𝐶 𝐻
+ 𝑅𝐻 k = =
𝑗𝜔𝐶 𝐻 𝑗𝜔𝐶 𝐿 1
𝑗𝜔𝐶 𝐿 + 1
𝑗𝜔𝐶 𝐻 + 𝑅𝐻 −𝜔2 𝑅 𝐻 𝐶 𝐿 𝐶 𝐻 + 𝑗𝜔(𝐶 𝐻 + 𝐶 𝐿 )
Therefore, the transfer function from 𝑉in of the low pass filter to 𝑉out of
the low pass filter is
1
𝑗𝜔𝐶 𝐻 + 𝑅𝐻 k 1
𝑗𝜔𝐶 𝐿 1 + 𝑗𝜔𝑅 𝐻 𝐶 𝐻
𝐻𝐿𝑃𝐹 = =
𝜔2 𝑅 𝐿 𝑅 𝐻 𝐶 𝐿 𝐶 𝐻 + 𝑗𝜔(𝑅 𝐻 𝐶 𝐻 + 𝑅 𝐿 𝐶 𝐿 + 𝑅 𝐿 𝐶 𝐻 )
𝑅𝐿 + 1
+ 𝑅𝐻 k 1 1−
𝑗𝜔𝐶 𝐻 𝑗𝜔𝐶 𝐿
And, the transfer function from 𝑉out of the low pass filter to 𝑉out of the
high pass filter is
𝑗𝜔𝑅 𝐻 𝐶 𝐻
𝐻𝐻𝑃𝐹 =
1 + 𝑗𝜔𝑅 𝐻 𝐶 𝐻
10
EECS 16B Spring 2020 HW 4
c) Plug the component values you found in (a) into the transfer function
𝐻𝐵𝑃𝐹 . Using MATLAB or IPython, draw a Bode plot from 0.1 Hz to 1 GHz.
If you use iPython, you may find the function scipy.signal.bode useful.
What are the frequencies at which the numerator and denumerator of
the transfer function become zero? What is the maximum magnitude of
𝐻𝐵𝑃𝐹 in dB? Is that something that you want? If not, explain why not and
suggest a simple way (either adding passive or active components) to fix
it.
Solution
𝑗𝜔(1.6 · 10−3 )
𝐻𝐵𝑃𝐹 =
1 − 𝜔2 (1.1 · 10−7 ) + 𝑗𝜔(1.7 · 10−3 )
The Bode plot is as below.
There are two roots for denumerator and one root for numerator at 100 Hz,
2.4 kHz, and DC, respectively. The maximum magnitude (around 500 Hz
= 3.14 × 103 rad
s ) is
𝑗(3.14 · 103 )(1.6 · 10−3 )
V
= 0.94 = −0.52 dB
1 − (3.14 · 103 )2 (1.1 · 10−7 ) + 𝑗(3.14 · 103 )(1.7 · 10−3 )
V
11
HW 4 @ 2020-02-27 11:12:09-08:00
𝑗𝜔𝑅 𝐻 𝐶 𝐻
𝐻ideal BPF =
(1 + 𝑗𝜔𝑅 𝐻 𝐶 𝐻 )(1 + 𝑗𝜔𝑅 𝐿 𝐶 𝐿 )
𝑗𝜔𝑅 𝐻 𝐶 𝐻
=
1 − 𝜔 𝑅 𝐻 𝐶 𝐻 𝑅 𝐿 𝐶 𝐿 + 𝑗𝜔(𝑅 𝐿 𝐶 𝐿 + 𝑅 𝐻 𝐶 𝐻 )
2
Therefore, in our circuit, only the 𝑗𝜔𝑅 𝐿 𝐶 𝐻 term is added at the denomina-
tor. Because 𝑅 𝐿 = 66 Ω is small, it did not cause any significant problem
in our case. 𝑗𝜔𝑅 𝐿 𝐶 𝐻 is added because the low pass filter is experiencing
impedance loading from the high pass filter, leading to a change in 𝐻𝐿𝑃𝐹 .
However, to be safe, a simple solution is to place a voltage buffer between
the filters as below.
Note that the ideal voltage buffer has infinite input impedance and zero
output impedance. This blocks any load effects from the following stage,
and the next stage will see the op-amp output as an ideal voltage source.
− 𝐶𝐻
𝑅𝐿 𝑉out
𝑉in +
𝑅𝐻
𝐶𝐿
d) Now that you know how to make filters and amplifiers, we can finally
build a system for the color organ circuit below. Before going into the
actual schematic design, you must first set specifications for each block.
The goal of the circuit is to divide the input signal into three frequency
bands and turn the LEDs on based on the input signal’s frequency.
In this problem, assume that the mic board’s transfer function is of the
following form:
𝑗𝜔
𝑗𝜔 1 + 𝜔𝑧1
𝑉𝑀𝐼𝐶 = 𝐾 𝑀𝐼𝐶
𝑗𝜔 𝑗𝜔 𝑗𝜔
1+ 𝜔𝑝1 1+ 𝜔𝑝2 1+ 𝜔𝑝3
12
EECS 16B Spring 2020 HW 4
4.54 · 10−4 𝑗𝜔
𝐻𝐵𝑃𝐹 =
𝑗𝜔 𝑗𝜔
1+ 400𝜋 1+ 4000𝜋
𝑗𝜔
8000𝜋
𝐻𝐻𝑃𝐹 = 𝑗𝜔
1 + 8000𝜋
What are the phasor voltages at the output of each filter as a function of
3(1+𝑗𝜔(1.5·103 ))
𝜔? To clarify, 1+𝑗𝜔(2·100) would be a valid phasor voltage at the output
of some filter. Assume that there are ideal voltage buffers before and after
each filter.
Solution
Because we know that we have 1 𝑉𝑝𝑝 at 40 Hz, we can plug 2𝜋 · 40 into 𝜔
to get 𝐾 𝑀𝐼𝐶 .
13
HW 4 @ 2020-02-27 11:12:09-08:00
𝑗(80𝜋)
𝑗(80𝜋) 1 +
𝜔𝑧1
1 = 𝐾 ·
𝑗(80𝜋) 𝑗(80𝜋) 𝑗(80𝜋)
1+ 𝜔𝑝1 1 + 𝜔𝑝2 1 + 𝜔𝑝3
𝑗𝜔
𝑗𝜔 1 + 400𝜋
𝑉𝐿𝑃𝐹 = 0.034 · 2
𝑗𝜔 𝑗𝜔 𝑗𝜔
1+ 20𝜋 1+ 200𝜋 1+ 20000𝜋
(𝑗𝜔)2
𝑉𝐵𝑃𝐹 = 7.72 · 10−6 ·
𝑗𝜔 𝑗𝜔 𝑗𝜔 𝑗𝜔
1+ 20𝜋 1+ 200𝜋 1+ 4000𝜋 1+ 20000𝜋
𝑗𝜔
(𝑗𝜔)2
8000𝜋 1+ 400𝜋
𝑉𝐻𝑃𝐹 = 0.017 ·
𝑗𝜔 𝑗𝜔 𝑗𝜔 𝑗𝑤
1+ 20𝜋 1+ 200𝜋 1+ 8000𝜋 1+ 20000𝜋
e) For 50 Hz, 1000 Hz, and 8000 Hz, what is the voltage gain required of
each non-inverting amplifier such that the output peak to peak voltage
measured right before the 10 Ω resistor is 5 𝑉𝑝𝑝 ?
Solution
V
Therefore, the non-inverting amplifier gain should be 18.5 V (or
25.3 dB).
14
EECS 16B Spring 2020 HW 4
15
HW 4 @ 2020-02-27 11:12:09-08:00
4 Mystery Microphone
You are working for Mysterious Miniature Microphone Multinational when
your manager asks you to test a batch of the company’s new microphones.
You grab one of the new microphones off the shelf, use a tone generator 1 to
play pure tones of uniform amplitude at various frequencies, and measure the
resultant peak-to-peak voltages using an oscilloscope. You collect data, and
then plot it (on a logarithmic scale). The plot is shown below:
Solution
The microphone is most sensitive to frequencies in the range of 320 Hz to
5 kHz, and least sensitive below ≈ 100 Hz or so.
You report these findings to your manager, who thanks you for the
preliminary data and proceeds to co-ordinate some human listener tests.
1 Note that soundwaves are simply sinusoids at various frequencies with some amplitude
and phase. The microphone’s diaphragm oscillates with the sound (pressure) waves, moving the
attached wire coil back and forth over an internal magnet, which induces a current in the wire. In
this way, a microphone can be modeled as a signal-dependent current source. The output current
can be converted to a voltage by simply adding a known resistor to the circuit and measuring the
voltage across that resistor.
16
EECS 16B Spring 2020 HW 4
In the meantime, your manager asks you to predict the effects of the
microphone recordings on human listeners, and encourages you to start
thinking more deeply about the relationships.
b) For testing purposes, you have a song with sub-bass (150 Hz or less),
mid-range (≈ 1 kHz), and some high frequency electronic parts (> 12 kHz).
Which frequency ranges of the song would you be able to hear easily, and
which parts would you have trouble hearing? Why?
Solution
The mid-range would be most audible since the amplitude is the highest
at these frequencies. The high frequency electronic parts are the next
loudest. The sub-bass parts would be the parts you have trouble hearing
since the output amplitude is so low.
c) After a few weeks, your manager reports back to you on the findings.
Apparently, this microphone causes some people’s voices to sound re-
ally weird, resulting in users threatening to switch to products from a
competing microphone company.
It turns out that we can design some filters to “fix” the frequency response
so that the different frequencies can be recorded more equally, thus
avoiding distortion. Imagine that you have a few (say up to 4 or so) blocks.
Each of these blocks detects a set range of frequencies, and if the signal is
within this range, it will switch on a op-amp circuit of your choice. For
example, it can be configured to switch on an op-amp filter to double the
voltage for signals between 100 Hz and 200 Hz.
What ranges of signals would require such a block, and what gain would
you apply to each block such that the resulting peak-to-peak voltage is
about 5 V for all frequencies?
Solution
The output amplitude for < 100 Hz is ≈ 0.5 V, so it needs a gain of 10.
For 100-160Hz, the amplitude is ≈ 2.5 V, so it needs a gain of 2.
320-5000Hz already has an amplitude of 5V, so no gain is needed.
10000-20000Hz has an amplitude of ≈ 1.5 V, so it needs a gain of 3.33.
17
HW 4 @ 2020-02-27 11:12:09-08:00
a) What sources (if any) did you use as you worked through the home-
work?
b) If you worked with someone on this homework, who did you work
with? List names and student ID’s. (In case of homework party, you can
also just describe the group.)
c) How did you work on this homework? (For example, I first worked by
myself for 2 hours, but got stuck on problem 3, so I went to office hours. Then I
went to homework party for a few hours, where I finished the homework.)
d) Roughly how many total hours did you work on this homework?
18