A19 of 18
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A1 · Lesson 9 · Log scales

Power laws are straight lines on log-log axes

Open almost any datasheet and the graphs have strange axes: 10, 100, 1k, 10k, evenly spaced. A filter's response, a capacitor's impedance against frequency, a transistor's gain against current, all on log scales. They're used because they let one picture span many decades. They also turn the most common relationship in engineering, the power law, into a straight line whose slope you can read off with a ruler.

Play

  • Both axes are logarithmic. The curve is y=kxn.
  • Set n to 2, then to 1, then to −1. What shape do you get each time?
  • Change k. What does it do to the line, and what does it leave alone?

Predict

On log-log axes, y=x2 is a straight line. How many decades does it climb for each decade it moves right?

Name it

Equal distances mean equal ratios

On a log scale, a number sits at the position of its logarithm. So the distance between two points depends only on their ratio: 1 to 10, 10 to 100 and 3 to 30 are all the same length. Two ratios get their own names:

  • a decade is a factor of 10;
  • an octave is a factor of 2 (from music, where an octave doubles the pitch).

Counting them is taking a logarithm:

decades from a to b=log10⁡baoctaves from a to b=log2⁡ba=log10⁡(b/a)log10⁡2

One octave is 0.301 decade, and one decade is 3.32 octaves. Audio runs from 20 Hz to 20 kHz: three decades, or about ten octaves.

Reading a log axis. Inside one decade, a number x times the decade's start sits log10⁡x of the way across: 2 is 30% of the way, 3 is 48%, 5 is 70%. That's why the gridlines bunch up toward the right end of each decade.

The middle of a log axis is the geometric mean. Halfway between a and b is the number with the same ratio to each:

xmid=ab

Halfway between 100 Hz and 10 kHz is 1 kHz, nowhere near the arithmetic mean of 5050 Hz. The center frequency of a band-pass filter is defined this way.

Power laws are straight lines. Take the logarithm of y=kxn:

log⁡y=log⁡k+nlog⁡x

On log-log axes that's a straight line with slope n, measured in decades of y per decade of x. A few you'll meet constantly:

  • P=V2/R against V: slope 2;
  • a capacitor's impedance, 1/(2πfC), against f: slope −1, falling one decade per decade;
  • the field of a point charge against distance: slope −2, the inverse-square law.

To find the exponent from a graph, pick two points on the line and divide: n=log⁡(y2/y1)/log⁡(x2/x1).

Exponentials want a different plot. y=Ae−t/τ is straight on axes with a log y and a linear t (a semi-log plot), since ln⁡y=ln⁡A−t/τ. That's how a capacitor's discharge or a radioactive decay is checked against theory.

Worked example

A filter's response is plotted from 10 Hz to 100 kHz. How many decades and octaves does the axis span, and what frequency sits in the middle?

Show the solution
  1. Decades. log10⁡10000010=log10⁡104=4
  2. Octaves. Each decade is 3.32 octaves: 4×3.32=13.3
  3. Middle. The middle is the geometric mean: f=10×100000Hz=1000Hz On the page, 1 kHz sits exactly halfway across, two decades from each end.

Answer the axis spans 4 decades, or 13.3 octaves, and 1 kHz sits in the middle.

Worked example

On a log-log plot, a part's impedance falls in a straight line from 1.59 kΩ at 100 Hz to 15.9 Ω at 10 kHz. What's the slope, and what is the part?

Show the solution
  1. Slope. n=log⁡(15.9/1590)log⁡(10000/100)=log⁡0.01log⁡100=−22=−1
  2. Name the part. Impedance falling as 1/f is a capacitor's signature, 1/(2πfC).
  3. Solve for C. Either point works; at 100 Hz, C=12π×100×1590F=1.00μF

Answer the slope is −1, and the part is a 1.00 µF capacitor.

Worked example

A capacitor discharging through a resistor is plotted on semi-log axes. Its voltage falls from 10 V to 1 V in 23 ms. What's the time constant?

Show the solution
  1. Time for a tenfold fall. For V=V0e−t/τ, a fall by a factor of 10 takes τln⁡10=2.30τ
  2. Solve for the time constant. τ=23ms2.30=10.0ms
  3. Read the plot. On the semi-log plot, every decade of fall takes the same 23 ms.
  4. Check the line. If the points bent away from a straight line, the discharge wouldn't be a single exponential: a leaky capacitor could do that, or a resistor whose value changes with voltage.

Answer the time constant is 10.0 ms.

Check

A frequency response is plotted from 20 Hz to 20 kHz. How many decades does the axis span?

Check

How many octaves are there from 220 Hz to 1000 Hz?

Check

What frequency sits halfway between 20 Hz and 1000 Hz on a log axis?

Check

A log axis runs from 1 to 10 over 10 cm. How many centimeters from its left end is the 4?

Check

On log-log axes, a straight line passes through x = 20, y = 5 and x = 200, y = 0.05. It's a power law y=kxn. What is n?

Check

Which axes make y=5e−t/2 a straight line?

Explain why

Explain why changing k in y=kxn moves the line on log-log axes without changing its slope.

Practice

Keep practicing

11 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.