Difference between revisions of "Bode plots"

From Course Wiki
Jump to: navigation, search
(Some guidelines for drawing magnitude Bode plots:)
(Some guidelines for drawing magnitude Bode plots:)
Line 57: Line 57:
 
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.
 
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 drawing magnitude Bode plots:====
+
====Some guidelines for drawing slopes in magnitude Bode plots:====
 
*Get the transfer function into the form <math>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}... }</math>
 
*Get the transfer function into the form <math>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}... }</math>
 
*Anytime you pass <math>\omega_z</math> from the numerator, the slope of the magnitude plot should increase by <math>20  a</math> (the exponent) dB/decade
 
*Anytime you pass <math>\omega_z</math> from the numerator, the slope of the magnitude plot should increase by <math>20  a</math> (the exponent) dB/decade

Revision as of 20:51, 22 July 2016

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. Let's first define 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.
  • 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 drawing 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