Excercises
==========
Equivalent Circuits
-------------------
We have already seen that two resistors in series can be replaced with
one resistor. Thus the circuit
.. tikz::
:xscale: 35
\draw (0,0) to[R=$R_1$,o-] (2,0) to[R=$R_2$,-o] (4,0);
is equivalent with one resistor
.. tikz::
:xscale: 35
\draw (0,0) to[R=$R_1+R_2$,o-o] (4,0);
We also have that the parallel connection of two resistors:
.. tikz::
:xscale: 35
\draw (0,0)
to[short,o-] (1,0)
to[short] (1,0.6)
to[R=$R_1$] (3,0.6)
to[short] (3,0)
to[short,-o] (4,0);
\draw (1,0)
to[short] (1,-0.6)
to[R=$R_2$] (3,-0.6)
to[short] (3,0);
is equivalent with one resistor:
.. tikz::
:xscale: 35
\draw (0,0) to[R=$\frac{R_1 R_2}{R_1+R_2}$,o-o] (4,0);
#. The entire circuit below can be replaced with
just one resistor, what is the value of this resistor?
.. tikz::
:xscale: 50
\draw (0,3)
to[R=$R_1$,o-] (4,3)
to[R=$R_3$] (8,3)
to[R=$R_4$] (8,0)
to[short,-o] (0,0);
\draw (4,3) to[R=$R_2$] (4,0);
#. The same applies for the circuit below. Surpringly enough the
simple series and parallel resistors tricks won't help you out
here.
.. tikz::
:xscale: 50
\draw (0,0) to[short,o-] (1,0);
\draw (1,-1)
to[short] (1,1)
to[R=$R_1$] (3,1)
to[R=$R_2$] (5,1)
to[short] (5,-1);
\draw (5,0) to[short,-o] (6,0);
\draw (1,-1)
to[R=$R_3$] (3,-1)
to[R=$R_4$] (5,-1);
\draw (3,1) to[R=$R_5$] (3,-1);
The use of the Kirchhoff laws will help you out here. Or look on
the web for the $Y-\Delta$ transformation.
Complex Impedance
-----------------
If you read $Z, Z_1$ etc. instead of $R, R_1$ etc. in the equivalent
circuits in the previous exercise then the results are perfectly
useable for inductors, capacitors and combinations with resistors.
#. Show that the series connection of two inductors with inductances
of $L_1$ and $L_2$ Henry is equivalent with an inductor of $L_1+L_2$
Henry.
#. What is the equivalent inductance $L$ of two inductors ($L_1$ and
$L_2$) connected in parallel?
#. What is the equivalent capacity of two capacitors connected in
series?
#. What is the equivalent capacity of two capacitors connected in
parallel?
Control Sound Level
-------------------
The amplifier in your stereo system amplifies the analog signal with a
small amplitude to a signal of larger amplitude and more power to
drive your speakers.
.. tikz::
:xscale: 45
\draw (0,4)
to[short,o-] (2,4)
to[R=$R_1$] (2,2)
to[R=$R_2$] (2,0)
to[short,-o] (0,0);
\draw (2,2)
to[short] (4,2)
%to[generic,n=S1] (4,0)
to[loudspeaker, l=Speaker ($8\Omega$)] (4,0)
to[short] (2,0);
%\speaker{S1}{0}
At home i have a set of speakers connected to the amplifier i the
living room and a second set of speakers in the kitchen connected to
the same amplifier. Works great but unfortunately the speakers in the
kitchen need less energy (lower amplitude) to generate the same sound
level as the speakers in the living room. So either the music in the
kitchen is too loud or the music in the living room is too soft.
To make sound levels equal in both areas we can use a simple *voltage
divider* as depicted here. The voltage $u_1$ is from a source (the
amplifier) measured at the input terminals on the left.
Calculate the voltage $u_2$ (over the speaker) in terms of $u_1$,
$R_1$ and $R_2$. The speaker itself can be seen as a resistor and
should be taken into account.
Keep in mind that the amplifier is build to expect a *load* of about
$8 \Omega$. How would you choose $R_1$ and $R_2$ such that $u_2 =
u_1/3$ *and* the load for the amplifier is still about $8 \Omega$.
..
#. If done correctly the circuit you designed will work correctly
(please use resistors that are made for the amount of current and
thus power you can expect... else you get a result that is too
hot). But replacing the two resistors with a *potentiometer*
enables you to control the sound level in the kitchen from no sound
to full sound.
Look up on the web what a potentiometer is and how to use it to
replace the two resistors in the circuit. Again be sure to select a
potmeter (you might as well learn the slang) that is capable of the
power you throw at it. High power potmeters are not cheap!
The potmeter in your amplifier is used in more or less the same
voltage dividing function. But it is done for the signal that is
not amplified yet, this makes that the potmeter doesn't have to
cope with a lot of power (and thus can be cheaper).
Bode Diagram
------------
The international way to pronounce Bode is 'Bodee' but mr Bode was a
dutch gentlemen so we can call him 'Boduh'.
In previous sections we have sketched the transfer function on
logarithmic scales. We have plotted $|H(\w)|$ as a function of $\w$.
#. Redo these plots but this time plot $|H(f)|$ as a function of $f$
where $f$ is the frequency in Hz.
#. Augnents these plots with the phase plot $\angle H(f)$ as a
function of $f$. Note that $f$ is still plotted on a logarithmic
scale but the phase on a linear scale.
Design 2-way X-over
-------------------
#. Now consider the task of designing a cross-over filter for a two
way speaker system. Both drivers, the woofer and the tweeter, are 8
$\Omega$. Again a cross-over frequency of around 2 kHz is
required. We will use the simple filters as discussed in previous
sections. Plot in one figure the magnitude of the frequency
response of the low-pass $H_L(\omega)$ and high-pass $H_H(\omega)$
filters.
Also plot the magnitude of their sum (note: first adding then
taking the magnitude). In case of ideal speakers (none of them are
in reality of course) you want a perfect constant total frequency
response. Is that what you get?
#. At this `webpage `_
you find a calculator for two way x-over design. You can check your
design using the calculator and setting the crossover type to "1st
order Butterworth" (not quite as in a Butterworth filter the corner
frequencies for the low and high pass filter are not precisely
equal but close enough in practice).
Use the calculator to design a 1st order filter using the "Solen
Split" setting. What are the corner frequencies for the high and
low pass filters in this case?
.. figure:: /figures/philips_xover.*
:align: right
:figwidth: 40%
#. Let's return to the Philips x-over filter. Their high-pass filter
is not quite what we have done before. They have added an inductor
parallel to the driver.
Calculate the frequency response of the high pass filter (assuming
an inductance $L$ and capacitance $C$ in the high pass
filter). Make a Bode plot of the magnitude. What is the corner
frequency and what is the decay in dB per octave?
RIAA Correction
---------------
I still play vinyl records that i collected in the days CD's were non
existing (and no, there was no streaming music in those days because
there was no digital music and there was no internet ...).
As you know vinyl records store music in an analog form. The grooves
in the record encode the changing sound pressure. The needle follows
the groove and will start to vibrate. This vibration (movement) of the
needle makes a magnet move with respect to a coil (or the other way
round if you have a deep pocket) and induce a voltage that is
propertional to the sound level.
We won't go into any of the nice details like:
- how do you encode the left and right sound signals using just one
needle (see nice `animation
`_), and
- how do you get the grooves in the record in the first place, and
- how do you deal with the fact that the record is spinning at the
same speed and thus the length of groove the needle travels in one
second depends on whether the needle is at the start or the end of
the record,
and other nasty practical problems. One problem we do look it in this
exercise is the fact that low frequencies tend to be close to the
mechanical eigen vibrations of the needle system. To much low
frequencies would throw the needle out of the groove. Therefore the
RIAA system was developed. Before the audio signal is transformed into
grooves on the record the signal is filtered. Low frequencies are
attenuated. But then when the needle follows the groove and you would
not correct the sound signal you would hear a sound with too much high
frequency content. So we have increase the low frequencies and
decrease the high frequencies. There are a lot of ways to make such a
filter. Here we discuss a simple (very simple..) analog filter using a
few passive components. We only give a mono version.
.. Here explanation of:
- constant angular velocity (RPM)
- varying velocity along track
- compare with CD
- rumble, flutter and all that (mechanical problems...)
- why RIAA is used
In order to restore the original sound signal we need to filter the
signal coming from the record player using the RIAA decoding
curve. A passive filter to do this is sketched:
.. tikz::
:xscale: 35
\draw (0,5)
to[R=$75k\Omega$,o-] (3,5)
to[short,-o] (5,5);
\draw (3,5)
to[C, l_=$0.02916\mu F$] (3,3)
to[R, l_=$10.905 k\Omega$] (3,1)
to[short] (4,1);
\draw (4,5)
to[C=$0.01\mu F$] (4,0) node[tground] {};
.. this is comment, in fact this is the encoding riaa filtering
.. tikz::
\draw (0,0)
to[short,o-,l=\$u_i\$] (1,0)
to[R] (3,0)
to[R] (5,0)
to[short,-o, l=\$u_o\$] (6,0);
\draw (1, 0)
to[short] (1, 1)
to[C] (3, 1)
to[C] (5, 1)
to[short] (5, 0)
to[R] (5,-2) node[tground] {};
\draw (3,0)
to[short] (3,1);
#. Calculate the complex transfer function (symbolic math allowed).
#. Plot the frequency response of this passive filter (both amplitude
as well as phase).
#. Search for the RIAA response curve on the web and compare it with
your calculated curve (be aware that there are two curves: one for
recording sound on the record and one for reconstructing the
original sound, this exercise is about the latter curve).
Non Inverting OpAmp
-------------------
Consider the following opamp circuit.
$u_o/u_i$.
.. tikz::
:xscale: 35
\draw
(0,0) node[op amp, yscale=-1] (opamp) {}
(opamp.+) to[short, -o] ++(-1,0) node [left] {$u_i$}
(opamp.-) to[short,-* ] ++(0,-1) coordinate(A)
(opamp.out) to[short,-* ] ++(0.5,0) coordinate (B) to[short,-o] ++(1,0) node[right] {$u_o$}
(A) -- ++(1,0) to[R,l=$R_1$] ++(1,0) -| (B)
(A) to[R, l=$R_2$] ++(0,-2) node[ground]{}
;
#. Calculate the amplification $u_o/u_i$ assuming an ideal op amp.
#. Explain that replacing either one of the resistors by a capacitor
is not going to lead to a stable frequency response. An intuitive
explanation looking at the behaviour of a capacitor at low and high
frequencies suffices.
Sallen Key opamp filter
-----------------------
In the section on active filters a Sallen-Key high-pass filter is given.
#. Starting from the transfer function of a generic Sallen-Key filter
prove the expressions for $H(s)$ for the high-pass filter.
#. Can you make a **first order** low-pass filter by a clever choice
of the resistor and capacitor values starting from the generic
Sallen-Key filter?
#. Show that replacing a resistor with a capacitor and vice versa will
change the high-pass filter into a low-pass filter.
Audio Equalizer
---------------
.. sidebar:: Mini Project
This exercise is more of a mini project to be done in the last two
weeks of the course. If you take up the challenge you should:
- analyze an analog equalizer and simulate (parts of) it in
Multisim, and
- analyze and reproduce a digital equalizer (e.g. the one
implemented in *pulseeffects*)
In your analysis, both in the analog as well as the digital case
you should give a derivation of the formula's for the frequency
response of the total filter and for the digital version an
implementation would be nice inclusing measurements of the
frequency response.
In an audio system it is sometimes nice to be able to change the
frequency response of the system: to increase or decrease the response
to certain frequencies in the signal. That is where an **audio
equalizer** comes in. An audio equilizer for instance can increase the
bass response (to compensate a bit for the small speaker enclosures
you own) or compensate for strange frequency dips or peaks that are
introduced by your room acoustics. A typical analog equalizer from the
previous century looked a bit like shown in the figure below.
.. figure:: /figures/audio_equalizer_akai.png
:width: 50%
**Analog Audio Equalizer.** The are 7 potentiometers for the left
and right audio channels. Each of the 7 potentiometers influences a
band of frequencies. Note that the potentiometers are all set in
the top position (so all frequency bands are boosted) something
that defeats the purpose of an audio equalizer.
A typical circuit for an audio equalizer (only 2 bands are shown
instead of the 7 bands as shown in the figure) is given in the figure
below.
.. figure:: /figures/two_stages_equalizer.png
**Circuit for Two bands of an audio equalizer.**
.. figure:: /figures/two_stages_response.png
**Response of the two band audio equalizer.** The colors of the
curves correspond with the colors of the probe in the previous
figure.
Nowadays a lot of audio processing is done digitally. The figure below
shows the GUI for the equalizer that is availabel in pulseeffects that
makes a lot of audio effects available in the pulseaudio framework on
linux.
.. figure:: /figures/pulseeffects_equalizer.png
**Digital Audio Equalizer.** Shown is the user interface of
the digital audio equalizer to be used in the pulseaudio
framework on linux systems.
Find a possible implementation for such an equalizer on the
web. Calculate the frequency response of one band and implement (at
least) one band using Python (need not be a real time filter).
Note: there is no (not yet) solution for this exercise!