ELEC 243 Lab

Background

Passive Filters

The following figure shows the basic voltage divider circuit:

\includegraphics[scale=0.650000]{voltage_div.ps}
for which we have the familiar relation:
$\displaystyle v_{out} = \frac{R_2}{R_1 + R_2} v_{in}$ or $\displaystyle \frac{v_{out}}{v_{in}} = \frac{R_2}{R_1 + R_2}$
If $R_1$ and $R_2$ are fixed then the output voltage is a constant fraction of the input, i.e. we have a fixed attenuator. If either or both of them vary, we have a variable attenuator (e.g. a volume control). If $v_{in}$ is constant and one or both of $R_1$ or $R_2$ vary with time, then $v_{out}$ will be a function of time, following the change in $R$ . If either or both of $R_1$ and $R_2$ vary with frequency (i.e. they are impedances rather than pure resistances) then the attenuation (or transfer function) will be a function of frequency, i.e. we have a filter.

If we replace resistances $R_1$ and $R_2$ by impedances $Z_1$ and $Z_2$ and use the phasor representation ($V_{in}$ and $V_{out}$ ) for the input and output voltages, then the voltage divider relation still holds. We define the ratio of the output voltage phasor to the input voltage phasor to be the transfer function:

$\displaystyle H(f)=\frac{V_{out}}{V_{in}} = \frac{Z_2}{Z_1 + Z_2}$

For example if we replace $R_2$ with a capacitor, we get the following circuit:

\includegraphics[scale=0.650000]{low_pass_phasor.ps}
for which
$\displaystyle H(f)=\frac{V_{out}}{V_{in}} = \frac{Z_2}{Z_1 + Z_2} = \frac{1/j2\pi fC}{(1/j2\pi fC)+R} = \frac{1}{1+j2\pi fRC}$

Since $H(f)$ is close to unity for small values of $f$ and goes to zero for large $f$ (i.e. it passes low frequencies and attenuates high frequencies) we call this circuit a low pass filter.

Frequency Response

Since the transfer function describes how effective a system at transmitting (or blocking) sinusoids of a particular frequency, it is also referred to as the frequency response. Note that $H(f)$ is complex. If we want to work with quantities we can measure in the lab, i.e. real numbers, we can express $H(f)$ in polar form in terms of its magnitude ( $\displaystyle \vert H(f)\vert=\frac{\vert V_{out}(f)\vert}{\vert V_{in}(f)\vert}$ ). and phase ( $\displaystyle \angle H(f)=\angle V_{out}(f) - \angle V_{in}(f)$ ).

We can simplify the transfer function of the system above by defining the time constant $\tau=RC$ and the cutoff frequency $f_0=\frac{1}{2\pi RC}$ , which gives

$\displaystyle H(f)=\frac{1}{1+j2\pi f \tau}=\frac{1}{1+j\frac{f}{f_0}}$
For the magnitude of the frequency response, we have
$\displaystyle \vert H(f)\vert=\frac{1}{\vert 1+j\frac{f}{f_0}\vert}=\frac{1}{\sqrt{1+\frac{f^2}{f_0^2}}}$
which looks like this:
\includegraphics[scale=0.350000]{fr1.ps}
Note that for $f = f_0$ , $\vert H(f)\vert=\frac{1}{\sqrt{2}}=0.707$ , and $\angle H(f)=\frac{\pi}{4}$ .

Decibels

You've probably heard the term decibel used in conjunction with sound levels: having a muffler louder than 85 dB will get you a ticket, listening to music at 110 dB will damage your hearing. You've probably also noticed the button marked ATT -20dB on the function generator, so decibels don't just have to do with sound. So what exactly is a decibel? It's a logarithmic way of expressing the ratio of two power levels (or sound pressure levels, or voltage levels, or any other kinds of levels). More precisely,
$\displaystyle {\rm power\: ratio\: in\: dB} = 10 \log(\frac{P_1}{P_0})$
where $P_0$ and $P_1$ are the two powers being compared, and $\log()$ is the common, or base 10 logarithm. If we have two voltage levels, $V_1$ and $V_2$ across the same load resistance, $R_L$ , then
$\displaystyle 10 \log(\frac{P_1}{P_0}) = 10 \log(\frac{{V_1}^2/R_L}{{V_2}^2/R_L}) = 20 \log(\frac{V_1}{V_0})$

Why logarithmic? The smallest perceivable sound level corresponds to an acoustic power density of approximately $10^{-12}\rm W/m^2$ . But the level at which the sensation of sound begins to give way to the sensation of pain is about $1\rm W/m^2$ . To cope with this large dynamic range without loosing track of the number of zeros after the decimal point, a logarithmic scale is useful.

It's important to remember that a decibel measurement expresses a ratio. So it always makes sense to say that a signal x is so many dB greater (or less) than signal y. But if we say that a signal is equal to some number of decibels, then there must be a reference level. For sound, that reference level is usually taken as $10^{-12}\rm W/m^2$ which corresponds to a pressure of $10^{-5}\rm N/m^2$ . If we call this the reference pressure level, $p_0$ , we get the definition of sound pressure level

$\displaystyle {\rm SPL} = 20 \log(\frac{p}{p_0})$
(where we use 20 instead of 10 since power is proportional to the square of the pressure).

In a circuit, the choice of a reference level is not quite so obvious. For voltages, the typical choice is 1 V, which gives "decibels relative to 1 Volt" or dBV for short. Other forms you may encounter are dBW (relative to 1 watt) or dBm (relative to 1 mW).

It is sometimes stated that the response of a filter falls off at "20dB per decade" or "6dB per octave". This is just another way of saying that the response varies as 1/f. In other words, if $f_2$ is 10 times $f_1$ (i.e. the frequencies are separated by one decade) then $\vert H(f_2)\vert$ will be 1/10 of $\vert H(f_2)\vert$ . Since $20 \log(1/10) = -20$ then we have a loss of 20dB (or a gain of -20dB) for each decade increase in frequency. Similarly, for two frequencies separated by one octave (a factor of two) we would have $20 \log(1/2) = -6.02$ or approximately 6dB per octave.

Bode Plots

If we plot the amplitude of the frequency response in dB vs $\log(f)$ we get what's called a Bode Plot (named after Hendrick Bode who devised this method of representation at Bell Labs in the 1940s).

\includegraphics[scale=0.350000]{fr3.ps}
This has several advantages over the linear plot shown in the previous figure.
  1. Since human perception of both loudness and frequency is logarithmic, a Bode Plot represents how we would hear the response of a system.
  2. It compresses large amplitudes and frequencies (or expands small ones, depending on your point of view) allowing for a compact representation of large dynamic ranges.
  3. On a log-log plot, the asymptotic behavior at both low and high frequencies is linear, making it easier to sketch frequency response plots. This is the "20dB per decade" falloff mentioned in the previous section.