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

S2 · Lesson 37 · Noise and distortion lab

Integrated noise, noise figure, harmonics and intercepts, in Python

Noise sets the smallest signal a circuit can handle and distortion sets the largest, and between them lies its dynamic range. The formulas for both are first-order approximations: flicker noise integrated over a band, the noise figure from a source, harmonics from a power series, and the bipolar pair's 148(v/VT)2 third harmonic. This lab computes each exactly in Python, including a discrete Fourier transform of a real tanh pair's output, and measures how far the approximations hold.

  • The curves are a bipolar differential pair's third-harmonic distortion against input amplitude: the series approximation 148(v/VT)2 and the exact result from the tanh characteristic.
  • They agree closely at a few millivolts and part as the amplitude grows: the next term of the series has the opposite sign, so the exact HD3 falls slightly below the approximation.
  • The lab computes the exact curve with a Fourier transform.

Predict

A bipolar pair is driven with 10 mV peak. What does the series approximation give for HD3, and is the exact value higher or lower?

Name it

The tools

  • Integrated noise: with white density ew and flicker corner fc, the rms noise from f1 to f2 is ew2[(f2−f1)+fcln⁡(f2/f1)].
  • Harmonics from a power series y=a1x+a2x2+a3x3 for x=Acos⁡ωt: HD2≈a2A/(2a1) and HD3≈a3A2/(4a1).
  • Third-order intercept (input amplitude): AIP3=43|a1/a3|.
  • Exact harmonics: sample one period of the output at N points and take the DFT magnitudes at bins 1 and 3.

Check

Write integrated_noise(ew, fc, f1, f2): rms noise voltage over the band.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write harmonics(a1, a2, a3, A): return (HD2, HD3) from the power-series approximations, and iip3(a1, a3): the input amplitude at the third-order intercept.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write pair_hd3(v_mv, N=4096): the exact HD3 of a bipolar pair, the ratio of the third to the first DFT magnitude of tanh⁡(vsin⁡(2πk/N)/2VT) over one period (k = 0..N−1, VT = 25.85 mV).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write dynamic_range(noise_rms, a1, a3, hd3_max): the largest amplitude whose HD3 (from the series) stays under hd3_max, divided by the rms noise, returned in dB; amplitudes are peak, so convert to rms by /2.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why does the series approximation for a bipolar pair's third harmonic overestimate the exact value at larger amplitudes?