Making a Bode plot for your electrical engineering homework

William W
6 min readFeb 7, 2021

--

I remember when I was doing my ECE homework back in college and how the methods we were taught on making a Bode plot were rather clunky and difficult to remember. The textbooks weren’t much help and I couldn’t find a good explanation online. Today, we’ll go over how to make a Bode plot in a way that even a high school student should be comfortable with. The only requisite knowledge is a passing familiarity with complex (imaginary) numbers.

We’ll go over two ways to make a Bode plot. By hand and with our trusty TI-89-calculator (or any calculator with a computer algebra system).

Finding the Bode plot by hand:

A typical homework question might ask: “Draw the Bode plots (both phase and magnitude) of the transfer function: H(s) = 10⁵/(s+10³)”

A transfer function is just a complex number. Which means it can have the form a + b*j. Here, “a” is the real part and “b” is the imaginary part. When plotted on a complex plane where the x-axis is the real number line and the y-axis is the imaginary number line (also known as an Argand diagram), we have a point. We refer to the straight line distance from the origin as the magnitude and the angle from the positive x-axis as the phase. See the following diagram to jog your memory.

Quick example of a complex number and its magnitude and phase.

As we can see, the magnitude of any number a + b*j is found with the pythagorean theorem. We just find sqrt(a² + b²) and that is our magnitude.

Remember that s = j*omega or s = j*ω. Omega is our frequency. For now, pretend omega is just some constant.

Plug in j*ω instead of s and we get H(j*ω) = 10⁵/(10³+j*ω). Treating ω as a constant, we have a complex number, but it’s not of the form a + b*j. To remove any complex parts in the denominator, we multiply by the denominator’s complex conjugate. So if the denominator has the form c +d*j, we multiply H(j*ω) by (c - d*j) / (c - d*j).

In this case, H(j*ω) * (10³ - j*ω)/(10³ - j*ω) = 10⁸ - 10⁵*(j*ω) / ( 10⁶ + ω²).

Now we have H(j*ω) = [ 10⁸ - 10⁵*(j*ω) ] / (10⁶ + ω²). Here, the real part “a”, is 10⁸/(10⁶ +ω²). The imaginary part “b” is -10⁵*ω/(10⁶ +ω²)

To find our magnitude, we find sqrt(a² + b²).

Magnitude = sqrt(a² +b²) = sqrt[ (10⁸/(10⁶ +ω²))² + (-10⁵*ω/(10⁶ + ω²))²]

= sqrt( 10¹⁶/(10⁶ + ω²)² + 10¹⁰*ω²/(10⁶ + ω²)² )

[a and b have the same denominator]

= sqrt( (10¹⁶ + 10¹⁰*ω²)/(10⁶ + ω²)² )

= sqrt(10¹⁶+10¹⁰*ω²) / (10⁶+ω²)

=10⁵*sqrt(10⁶ + ω²)/(10⁶ + ω²)

or 10⁵/sqrt(10⁶ + ω²) since sqrt(n)/n = 1/sqrt(n)

To find our phase, we notice that a >0 and b < 0 at any positive ω (Bode plots are only meaningful at positive ω). This means our Argand diagram will always have a point in Quadrant 4 (the bottom right).

So the phase in quadrant 4 will be arctan(b/a). If you’re ever confused about the sign of the phase, just do the quadrant test. Phase is always going to be arctan(b/a), but always remember that this assumes the form a +j*b. If a is negative in the form a + j*b, it is also negative when placed as an argument in the arctan. Same goes for b, or if both a and b are negative. When calculating the range of a and b, remember that ω ranges from [0, ∞). Also note that arctan(-z) = -arctan(z) in case you’re confused about an answer key.

Phase = arctan( [-10⁵*ω/(10⁶+ω²) ] / [10⁸/(10⁶+ω²)] )

= arctan( (-10⁵)*ω*(10⁶+ω²) / [(10⁶+ω²)(10⁸) ])

= arctan(-10⁵*ω/10⁸)

∠H(ω) = arctan(-ω/1000)

Now that the hard part is done, we just need to plot it on a graph. In Bode plots, the x-axis is your angular frequency ω. It is usually a logarithmic scale, from ω = 0, 1, 10, 100, 1000, and so on until 10¹⁰. The y-axis is just the result of the magnitude and phase functions we found earlier. However, in the case of the magnitude, we scale the axis to 20*log(magnitude), where the log is base 10.**

Magnitude = 10⁵/sqrt(10⁶ + ω²)

Phase = arctan( -ω/1000).

Finding the Bode plot with a TI-89:

This is much easier, but make sure to at least show the initial setup of your calculations before punching it into your calculator. At a minimum, put down the four key equations:

s = j*ω

H(ω) = a+b*j

H(ω)| = sqrt(a² + b²)

∠H(ω) = arctan(b/a)

Starting with H(s) = H(ω) = 10⁵/(j*ω+10³), type this into your calculator:

10 ^ 5 /(i*w + 10^ 3). (Feel free to use 1E5 or 1E3 instead if you want. You can also use any letter, but w is visually similar to ω).

Now if it isn’t already, set your calculator to polar format by hitting MODE, scroll down to “angle” and select “DEGREE.” Then scroll down to “complex format”, then select option “POLAR.”

When you hit enter, the following should come out:

100000/sqrt(w² + 1000000) ∠ -tan-¹(w/1000)

The left portion (before the angle brace ∠) is your magnitude.

The right portion is your phase.

Now the graphing is the same. We just set up our tables. Except, we can use the TI-89’s “|” or “such that” key to do this faster. The “|”key is to the left of the “7” key.

For each magnitude point, type: 100000/sqrt(w² + 1000000) | w = 1

Then simply keep changing the value of w for each point. Alternatively, you can set this plot up each time in the graphing window, but that’s rather time consuming and unnecessary when we only need 5–7 points anyway.

Do the same for the phase, type: -tan-¹(w/1000)| w = 1, 10, 100 …

Plot the points out, draw curvy connected lines, and you’ve got your Bode plot!

**Why? Let’s quickly define a deciBel. A deciBel is just 1 tenth of a Bel. What is a Bel? Well, it’s actually a unitless quantity. It’s like the “parts per million.” There’s no units. Anything can exist in a 1 to 1 million ratio. So, affixing the SI “deci” prefix to a “Bel” just means there are 10 deciBels per 1 Bel. We could have easily called it an OogaBooga and a deciOogaBooga.

For now, assume that one Bel is the log base 10 of “something”, such that log(something) = 1 Bel. This means that there are 10*log(something) deciBels in 1 Bel.

Let’s assume this “something” is a ratio of powers. For example, the power dissipated by two different circuits, so that:

1 Bel = 10*log(Power of circuit 1 / Power of circuit 2) deciBels

As we know, Power = Voltage² / Resistance. Assuming both circuits have constant resistance, we can express the power ratio of both circuits as a function of their voltages:

1 Bel = 10*log((Voltage_1)²/(Voltage_2)²) deciBels

Recall that we can take exponents out of the argument of a log and they become multipliers ( example: log(k³) = 3*log(k) ). Let’s do that here:

1 Bel = 20*log(Voltage_1/Voltage_2) dB

And remember what a transfer function is, it’s just H = Y/X. We were originally given H(s) = 10⁵/(s+10³). The ratio of our input voltage to output voltage changes as a function of frequency, as does the phase difference between the voltages. That is what our Bode plot is attempting to show.

Note that if Power_1 happened to equal 2*Power_2, we would see 10*log(2) = 3.01 dB. This is often referred to as the 3 dB “cutoff” point. It is the point at which a signal is roughly 50% “attenuated.” You can find this point by setting the log argument equal to 2. Often, you will be given some complicated power and voltage equations with ω in them and asked to find the 3 dB frequency or “upper corner” frequency. Just roll back to the basic definition of a dB, and know that you’re solving for 2 (or 0.5) when you’re asked that. Then once you find ω, remember that ω = 2*π*f.

As electrical engineers, it is our solemn privilege to practice analytic techniques that have been rendered obsolete by modern computer systems.

--

--

William W
William W

Written by William W

Electrical Engineering. Software developer and cofounder of a startup.

No responses yet