Bode plots

From Course Wiki
Jump to: navigation, search
20.309: Biological Instrumentation and Measurement

ImageBar 774.jpg


Transfer functions and Bode plots

To characterize the frequency response of a circuit, it is often helpful to find the transfer function of a circuit, as we did in the example above. A transfer function, usually denoted as $ H(\omega) $ or $ H(f) $, is defined to be the ratio of the output voltage to the input voltage as a function of frequency, i.e. $ H(f) = {V_{out} \over V_{in}} $. (Remember that $ \omega = 2 \pi f $.) Also note that only two things can happen to a sine wave passing through a linear, time-invariant system (like an RLC circuit): it's magnitude can be changed; and the signal can be delayed. The delay and percentage change in the magnitude are a function of frequency. Thus, the transfer function is a complex-valued function of frequency that specifies the magnitude and phase shift of a particular system for all frequencies. The change in amplitude is often called the gain, and the delay is usually thought of in terms of a phase shift of the sine wave.

One helpful way to visualize a transfer function is to make two plots, called Bode plots. The first plot shows the magnitude of the transfer function verses frequency on a set of log-log axes. The second plot shows the phase shift versus log frequency. (Traditionally, Bode plots are constructed only using straight-line segments to represent the transfer function by means of straight edges and fine draft pen sets. Since plotting complicated functions is now done by computer, exact plots may be substituted for the traditional methods.)

Plotting the magnitude of the transfer function

Let's first plot the magnitude of the transfer function as a Bode plot. We will take the RC circuit from the example on the previous page to demonstrate how to create the plot. Recall that the transfer function for the low-pass RC circuit to the right was

ExampleRCCircuit.png
$ H(\omega ) = {V_{out} \over V_{in}} = {1 \over 1+ j \omega RC} $

The magnitude of this function is given by (for a refresher on how to find the magnitude of a complex number, click here)

$ |H(\omega )| = {1 \over \sqrt {1 + \omega ^2 R^2 C^2}} $

A magnitude Bode plot typically has the y-axis in units of decibels (dB), which is defined to be 20 times the logarithm of the magnitude. More specifically,

$ |H(\omega )|_{dB} = 20 log |H(\omega )| $

The x-axis is typically in units of radians if you're using $ \omega $ or Hz if you're using $ f $. It is also on a log-scale, so you'll usually see it in increments that increase by ten-fold, known as a decade.

Step-by-step method to create magnitude Bode plot

  • To create the Bode plot, think about the following:
  1. Identify the cutoff frequency ($ \omega_c $). This is a convenient frequency to think about, where we will consider $ \omega << \omega_c $ to be a low frequency and $ \omega >> \omega_c $ to be a high frequency. You will see why it is called a cutoff frequency soon.
    Looking at the denominator of your magnitude function, you can see that at small frequencies the 1 dominates, but at large frequencies, the frequency term dominates. We can say that roughly, where the frequency term begins to play a role is when $ 1 = \omega^2 R^2 C^2 $. At this point, we can rearrange the expression to see that $ \omega = {1 \over RC} $.
    This is what we define to be the cutoff frequency:
    $ \omega_c = {1 \over RC}. $
  2. What is the value of $ |H(\omega )| $ at low frequencies ($ \omega << \omega_c $)?
    Plug in $ \omega = 0 $ to your magnitude function and you can see that
    $ |H(\omega )| = 1 $, so $ |H(\omega )|_{dB} = 0 $
    Let's plot what we know so far. With a Bode plot we can approximate most things with straight line segments. We will get into more exact details later.
    BodePlotMag1.png
  3. What is the value of $ |H(\omega )| $ at high frequencies ($ \omega >> \omega_c $)?
    As $ \omega \rarr \infin $, you can see that
    $ |H(\omega )| \rarr 0 $, so $ |H(\omega )|_{dB} \rarr - \infin $ or a very negative number.
    Let's add this information to our plot.
    BodePlotMag2.png
  • You're Bode plot pretty much looks complete! How did we know the slope of the line at higher frequencies?
    Let's look at the equation in a bit more detail.
    $ |H(\omega )|_{dB} = 20 log({1 \over \sqrt {1+ \omega^2 R^2 C^2}}) $
    $ |H(\omega )|_{dB} = 20 log(1) - 20 log(\sqrt {1+ \omega^2 R^2 C^2}) $
    $ |H(\omega )|_{dB} = - 20 log(\sqrt {1+ ({\omega \over \omega_c})^2}) $
    $ |H(\omega )|_{dB} = - 10 log( 1+ ({\omega \over \omega_c})^2) $
    When we are considering $ \omega >> \omega_c $, the frequency term dominates the 1, such that
    $ |H(\omega )|_{dB} \cong - 20 log( {\omega \over \omega_c}) $
    Thus, every time the frequency increases ten-fold (a decade), the magnitude decreases by -20 dB. We say that the slope of the line at high frequencies is -20 dB per decade. Now that we know this, we can figure out a quicker way to determine slope, which we will discuss in the next section.
  • Next, an important fact to point out is that the straight lines we drew are just approximations, especially near the cutoff frequency. The lines serve as asymptotes. If you take a closer look at what happens near the cutoff frequency, you will see that if $ \omega = \omega_c $,
    $ |H(\omega_c )|_{dB} = - 10 log( 1+ ({\omega_c \over \omega_c})^2) $
    $ |H(\omega_c )|_{dB} = - 10 log(2) $
    $ |H(\omega_c )|_{dB} = -3 dB $
    Thus, people also call the cutoff frequency the 3 dB point.
    The following plot shows a little more detail of the actual magnitude of the frequency response of the circuit we evaluated.
BodePlotMag3.png
  • Looking at the plot, you can see the frequency response of your circuit. It becomes clear that at high frequencies, the magnitude of your transfer function becomes smaller and smaller. In other words, $ V_{out} $ becomes much smaller than $ V_{in} $. This is why the circuit is called a low-pass filter. You can also see now why the cutoff frequency deserves its name, since the circuit starts to cut off the signal near that frequency.

Now that you've completed this example, you can follow the same steps to plot the magnitude bode plot for any circuit for which you have the transfer function.

Some guidelines for finding slopes in magnitude Bode plots

  • Get the transfer function into the form $ H(\omega ) = {A (1+ {j\omega \over \omega_{z1}})^{a1} (1+ {j\omega \over \omega_{z2}})^{a2} ...\over (1+ {j\omega \over \omega_{p1}})^{b1} (1+ {j\omega \over \omega_{p2}})^{b2}... } $
  • Anytime you pass $ \omega_z $ from the numerator, the slope of the magnitude plot should increase by $ 20 a $ (the exponent) dB/decade
    For example, when the magnitude plot hits $ \omega_{z1} $, the slope should increase by $ 20 a1 $ dB/decade
  • Anytime you pass $ \omega _p $ from the denominator, the slope of the magnitude plot should decrease by $ -20 b $ (the exponent) dB/decade
    For example, when the magnitude plot hits $ \omega_{p1} $, the slope should decrease by $ -20 b1 $ dB/decade
  • The effect of each cutoff frequency superimposes on the Bode plot.
  • Here is an example. Given a circuit with the following transfer function, let's use the steps of our method to plot the magnitude Bode plot. Assume $ \omega_2 = 10 \omega_1 $
    $ H(\omega) = {1 \over (1+ {j\omega \over \omega_1})(1+{j\omega \over \omega_2})} $
    1. There are two cutoff frequencies: $ \omega_1 $ and $ \omega_2 $
    2. At very low frequencies, $ |H(\omega)|_{dB} = 0 $
    3. As the frequency gets higher, $ |H(\omega)|_{dB} $ becomes increasingly negative
    From the guidelines above, we know that after the magnitude plot hits $ \omega_1 $, the slope decreases -20dB/decade. Then after $ \omega_2 $, the slope decreases by another -20 dB/decade, totaling -40 dB/decade.
    Thus we can draw the following Bode plot
BodePlotMag4.png

Plotting the phase of the transfer function

To demonstrate plotting the phase of the transfer function, let's use our low-pass RC circuit shown on the right. Recall that the transfer function is given by

ExampleRCCircuit.png
$ H(\omega ) = {V_{out} \over V_{in}} = {1 \over 1+ j \omega RC} $
Remember that $ \ang H(\omega) = \ang (numerator) - \ang (denominator) $ (click here for review of complex numbers)
$ \ang (numerator) = \ang 1 = 0 $
$ \ang (denominator) = \ang (1+ j\omega RC) = arctan(\omega RC) $
Thus, $ \ang H(\omega) = -arctan(\omega RC) = -arctan({\omega \over \omega_c}) $
where $ \omega_c = {1 \over RC} $ is the cutoff frequency

The phase Bode plot has phase on the y-axis in a linear scale, and frequency on the x-axis on a log-scale.

Steps to plotting the phase Bode plot

  • The steps for creating a phase Bode plot are similar to those for the magnitude Bode plot
  1. Identify cutoff frequency: As mentioned above, the cutoff frequency for this transfer function is $ \omega_c = {1 \over RC} $
    At the cutoff frequency, $ \ang H(\omega_c) = -45 \deg $
  2. What is the value of $ |H(\omega )| $ at low frequencies ($ \omega << \omega_c $)?
    Plug in $ \omega = 0 $ to your magnitude function and you can see that
    $ \ang H(\omega) = 0 $
  3. What is the value of $ |H(\omega )| $ at high frequencies ($ \omega >> \omega_c $)?
    As $ \omega \rarr \infin $, you can see that
    $ \ang H(\omega) = -90 \deg $
  4. To draw the Bode plot, we need to connect 0 degrees at low frequencies to -90 degrees at high frequencies. For this, we draw a sloping line that goes from a phase of 0 degrees one decade before the cutoff frequency to a phase of -90 degrees one decade after the cutoff frequency, while passing through -45 degrees at the cutoff frequency. The plot is shown below.
BodePlotPhase1.png
  • Remember that the straight line segments are just approximations, and that the actual phase response of the system is has smoother edges.

Some guidelines for finding slopes in magnitude Bode plots

  • Get the transfer function into the form $ H(\omega ) = {A (1+ {j\omega \over \omega_{z1}})^{a1} (1+ {j\omega \over \omega_{z2}})^{a2} ...\over (1+ {j\omega \over \omega_{p1}})^{b1} (1+ {j\omega \over \omega_{p2}})^{b2}... } $
  • Anytime you pass $ \omega_z $ from the numerator, the slope of the phase plot from one decade before to one decade after $ \omega_z $ should increase by $ 45 a $ (the exponent) degrees/decade
    For example, from $ {1 \over 10}\omega_{z1} $ to $ 10\omega_{z1} $, the slope should increase by $ 45 a1 $ degrees/decade
  • Anytime you pass $ \omega _p $ from the denominator, the slope of the phase plot from one decade before to one decade after $ \omega_p $ should decrease by $ -45 b $ (the exponent) degrees/decade
    For example, from $ {1 \over 10}\omega_{p1} $ to $ 10\omega_{p1} $ , the slope should decrease by $ -45 b1 $ degrees/decade
  • The effect of each cutoff frequency superimposes on the Bode plot.
  • Here is an example. Given a circuit with the following transfer function, let's use the steps of our method to plot the magnitude Bode plot. Assume $ \omega_2 = 10 \omega_1 $
    $ H(\omega) = {1 \over (1+ {j\omega \over \omega_1})(1+{j\omega \over \omega_2})} $
    1. There are two cutoff frequencies: $ \omega_1 $ and $ \omega_2 $
    2. At very low frequencies, $ \ang H(\omega) = 0 $
    3. As the frequency gets higher, $ \ang H(\omega) $
    From the guidelines above, we know that from $ {1 \over 10}\omega_1 $ to $ 10 \omega_1 $, the slope decreases -45 degrees/decade. Then from $ {1 \over 10}\omega_2 $ to $ 10 \omega_2 $, the slope decreases by another -45 degrees/decade.
    Thus we can draw the following Bode plot
BodePlotPhase2.png


Examples of frequency responses of common filters