EP31

EP31: The Warmth of Moog Has an Equation

4-pole cascade H(s), Barkhausen criterion, tanh → odd harmonics
5:58 Signal Processing

Overview

Analog synthesizers and digital synthesizers sound “just different” — this perception is so widespread that it has spawned an entire mythology of “analog warmth.” But “warmth” is not mysticism: it is a concrete spectral fingerprint, composed of a specific distribution of odd harmonics, and the physical mechanism that produces this distribution is the odd-function property of the hyperbolic tangent .

Bob Moog’s 1965 patent filter contains two mathematical cores: four cascaded RC low-pass stages, giving a steep −24 dB/octave cutoff; and a feedback path from output to input, which creates resonance as the Barkhausen criterion () is approached, reaching a critical point where the entire filter self-oscillates as a sinusoidal oscillator. These two mechanisms, combined with the soft clipping nonlinearity of transistors (tanh soft limiting), together constitute the so-called “Moog sound.”

This episode derives the four-pole transfer function, the Barkhausen criterion, the tanh expansion, the odd harmonics theorem, and Zero-Delay Feedback (ZDF) numerical iteration one by one, giving the complete mathematical picture of “analog warmth.”

中文: “你有没有注意到,模拟合成器和数字合成器听起来就是不一样?那种’温暖'、‘肥厚’、‘模拟感’,到底是什么?答案藏在一个非线性函数里:tanh of x。”


Prerequisites


Definitions

Definition 31.1 (Single-Pole RC Low-Pass Transfer Function)

A first-order low-pass filter composed of a resistor and capacitor has the following transfer function at complex frequency :

where is the cutoff angular frequency. At real frequency , the magnitude response is

Example: If and , then , giving a cutoff frequency of approximately 1.6 kHz.

Definition 31.2 (Moog Four-Pole Ladder Filter)

The Moog ladder filter consists of four identical first-order low-pass stages connected in series (cascade). Its open-loop transfer function is

Adding a feedback coefficient (the output signal is inverted and multiplied by before being fed back to the input), the closed-loop transfer function is

The parameter controls resonance strength; gives a pure low-pass response, while produces a strong resonance peak near the cutoff frequency.

Example (synthesizer panel correspondence): The cutoff frequency knob controls (frequency sweep), and the resonance knob controls (range 0–4).

The following block diagram illustrates the four-stage cascade structure and feedback path of the Moog ladder filter:

Σx(t)RC₁tanhRC₂tanhRC₃tanhRC₄tanh

y(t)

−k (resonance)k = 4 → self-oscillation (Barkhausen)
Moog 4-pole ladder filter: four RC stages (each with tanh nonlinearity) plus a negative feedback path with coefficient k. At k = 4, the Barkhausen criterion is met and the filter self-oscillates.
Definition 31.3 (Hyperbolic Tangent Function and Taylor Expansion)

The hyperbolic tangent function is defined as

Its Taylor expansion at is

Key property: The expansion contains only odd-degree power terms (), with no even-degree terms whatsoever.

Why only odd terms? is an odd function: . The coefficients of even-degree terms in the Taylor expansion of an odd function must be zero (see Theorem 31.2).

Example (soft clipping behavior): , , . As the input grows, the output approaches ±1, producing a “soft clipping” effect.

Definition 31.4 (Warmth Coefficient)

For a nonlinear device driven by a sinusoidal input that produces harmonics, suppose the Fourier decomposition of its output is . The warmth coefficient is defined as

that is, the fraction of total harmonic power carried by odd harmonics. means the output consists entirely of odd harmonics (pure odd-function nonlinearity); means odd and even harmonic power are equal.

Reference values:

Device type Typical
Moog ladder filter (tanh-driven) ≈ 0.95
Transistor push-pull amplifier ≈ 0.95
Vacuum tube amplifier (triode) ≈ 0.65
Single-ended transistor amplifier (asymmetric) ≈ 0.45
Definition 31.5 (Zero-Delay Feedback (ZDF))

In digital implementations, the feedback path of the Moog filter introduces a one-sample delay (digital systems are causal): the output is not available at computation time , so traditional implementations substitute , introducing cutoff frequency error and resonance frequency shift.

The Zero-Delay Feedback (ZDF) method expresses as an implicit equation in itself, then solves it numerically:

Newton-Raphson iteration starting from initial guess performs each step as

where . Typically 3–5 iterations reach machine precision.


Main Theorems

Theorem 31.1 (High-Frequency Roll-Off of the Four-Pole Ladder Filter (−24 dB/octave))

The open-loop transfer function of the Moog four-pole ladder filter is .

  1. High-frequency magnitude asymptote: When ,

  1. Roll-off slope: Every time the frequency doubles (i.e., ), the magnitude attenuates by a factor of , equal to dB.
Proof.

At , the magnitude of the four-pole transfer function is

When , we have , so

Roll-off slope: Multiplying frequency by 2:

The magnitude attenuates by , which in decibels is

That is, approximately −24 dB per octave. By comparison, a single pole () gives −6 dB/oct, two poles () give −12 dB/oct; the four-pole configuration is the steepest common ladder topology.

Intuition: Four poles (, a fourfold root) give a fourth-power attenuation; each pole contributes −6 dB/oct, and the four add up to −24 dB/oct.

The following script plots the Bode diagram of the Moog closed-loop transfer function for different resonance coefficients k, showing the evolution from flat low-pass to resonance peak to the edge of self-oscillation.

Moog 4-pole ladder filter — Bode plot with resonance k = 0, 1, 2, 3, 3.9
Moog 4-pole ladder filter — Bode plot with resonance k = 0, 1, 2, 3, 3.9
Theorem 31.2 (Barkhausen Criterion: The Self-Oscillation Threshold of the Moog Filter)

The Moog four-pole ladder filter (open-loop transfer function , feedback coefficient ) exactly satisfies the Barkhausen criterion at feedback coefficient

At this value there exists a real frequency such that

The closed-loop system then undergoes marginal oscillation at a frequency equal to the cutoff frequency .

Proof.

Step 1: Find the phase condition.

The phase of the single-pole is

The total phase of the four-pole filter is

Setting the total phase equal to (the feedback signal passes through the Moog circuit’s own 180° phase inversion, so the total loop phase shift is , equivalent to , satisfying the positive feedback condition):

Therefore , i.e., .

Step 2: Find the gain condition, deriving .

At ,

(since )

The gain condition of the Barkhausen criterion is , substituting:

Step 3: Physical interpretation.

When : loop gain , perturbations decay, system is stable (but a resonance peak appears near ). When : loop gain exactly equals 1, system is marginally stable, maintaining constant-amplitude oscillation. When : loop gain , oscillation amplitude grows without bound (limited in practice by the power supply).

Theorem 31.3 (Taylor Expansion of an Odd Function Contains Only Odd-Degree Terms)

Let be an odd function (i.e., holds for all ), and suppose is infinitely differentiable at . Then in the Taylor expansion of , all even-degree coefficients are zero:

where , and for all .

Proof.

Direct substitution: Let . From the odd function condition :

Comparing coefficients of on both sides:

  • When is odd: , so — no constraint on , odd-degree coefficients may be arbitrary.
  • When is even: , so , i.e., .

Therefore all even-degree coefficients are zero, and the expansion contains only odd-degree terms.

Application: (hyperbolic tangent is an odd function), so its Taylor expansion indeed contains no terms — this is a mathematical necessity, not a coincidence.

Theorem 31.4 (Odd-Function Nonlinearity Produces Only Odd Harmonics)

Let be an odd function, and let the input be a sinusoidal wave . Then the Fourier series expansion of the output contains only odd harmonics:

That is, there are no terms (because is an odd function), and the even sine harmonics () all have zero coefficients.

Proof.

Method 1 (via Taylor expansion):

By Theorem 31.3, . Substituting :

Using the expansion formula for odd powers of sine (Chebyshev identity):

The right-hand side contains only odd-multiple-angle sine terms . Therefore contains only , with no even harmonic terms.

Summing contributions from all odd-power terms, contains only odd harmonics.

Method 2 (symmetry argument):

, as a function of time, satisfies half-period antisymmetry:

(The last step uses the odd function property of .)

A function satisfying half-period antisymmetry has a Fourier expansion containing only odd multiples of the fundamental (i.e., ). (Even multiples of sine/cosine change sign under half-period shift, while odd multiples do not, consistent with the antisymmetry condition.)

Furthermore, since is an odd function, as a function of time is also odd-symmetric (about each zero-crossing), so the expansion contains no terms.

The following script performs FFT harmonic analysis at three drive levels, with a bar chart clearly showing that tanh produces only odd harmonics (red), while even harmonics (gray) remain at zero throughout.

tanh harmonic analysis — odd harmonics only from sinusoidal input
tanh harmonic analysis — odd harmonics only from sinusoidal input
Theorem 31.5 (Convergence of Zero-Delay Feedback Newton-Raphson Iteration)

Suppose the digital ZDF implementation of the Moog filter reduces each sample’s computation to the implicit equation , where (with as known parameters).

Then the Newton-Raphson iteration

where , satisfies (denominator strictly nonzero), and starting from any initial value , typically converges to machine precision in 3–5 iterations.

Proof.

Monotonicity and uniqueness of root:

Computing the derivative of with respect to :

Since and , we have for all . This means is strictly monotonically increasing in , so the equation has a unique root .

Convergence of Newton-Raphson:

Since is strictly monotone, and is bounded, the Newton-Raphson method for a strongly monotone function near a reasonable initial value exhibits superlinear (second-order) convergence:

Taking initial value (the previous sample, typically an excellent starting point), second-order convergence means the number of correct significant digits approximately doubles with each iteration. Going from single precision (approximately 7 significant digits) to double precision (approximately 15 digits) requires about iterations; in practice 3–5 iterations reach machine precision.

Practical significance: ZDF eliminates the one-sample phase error introduced by substituting for in conventional digital implementations, making the resonance peak frequency of a digital Moog accurately track the cutoff frequency to match the analog prototype — this effect is especially significant at high resonance settings ().

The following script simulates the Newton-Raphson iteration process on a ZDF residual equation; the left plot shows iterates converging to the true solution, and the right plot shows the error decaying at a quadratic rate.

Newton-Raphson iteration convergence for zero-delay feedback
Newton-Raphson iteration convergence for zero-delay feedback

Worked Examples

Closed-loop poles and resonance peak shift as increases:

The poles of the Moog closed-loop transfer function are determined by the roots of the denominator , namely

For : all poles lie at (fourfold real pole), giving a pure low-pass response with no resonance.

For (): the real part of the conjugate pole pair closest to the imaginary axis is Still stable, but poles are close to the imaginary axis, producing a pronounced resonance peak near the cutoff frequency.

For : , and the real part of the pole pair closest to the imaginary axis is The poles lie exactly on the imaginary axis; the system is at the marginal oscillation boundary, with oscillation frequency .

中文: “在k接近4但未到达时,截止频率附近出现一个共振峰——能量在这个频率聚集、放大。这就是’谐振’旋钮的物理含义。共振旋钮转到底,k达到4,滤波器变成一个正弦波振荡器,可以直接当乐器演奏。”

Harmonic analysis of the tanh expansion (input , ):

Using and , substituting:

Collecting harmonic coefficients:

Total odd harmonic power (normalized); warmth coefficient is consistent with measured values (note that at , tanh is in mild saturation; as increases, higher harmonics grow in content but remain entirely odd).

Newton-Raphson iteration convergence example ():

Iteration
0 0.100 0.285
1 0.263 0.018
2 0.271 0.0001
3 0.2713

3 iterations reach double-precision machine accuracy, making real-time audio processing fully feasible (approximately 3 nonlinear function evaluations per sample).

中文: “tanh of x可以展开为泰勒级数:tanh of x约等于x减x的三次方除以3,加x的五次方除以15,减去更高次项。注意:只有奇数次项。这意味着一个正弦波通过tanh,产生的只有奇次谐波:一次、三次、五次……这就是所谓’模拟温暖’的频谱指纹。”


Musical Connection

音乐联系

The Physical Definition of “Analog Warmth”

“Analog warmth” is widely discussed in the music production community, yet rarely given a precise definition. This episode provides an operational mathematical definition: distortion spectra dominated by odd harmonics (warmth coefficient ), superimposed on a steep −24 dB/oct cutoff and a tunable resonance peak. This definition can be measured, reproduced, and questioned — which is precisely the value of scientific analysis.

Part of the “vinyl sounds warmer” impression comes from the RIAA equalization curve applied during vinyl mastering (which gently boosts high frequencies), as well as the soft saturation of analog magnetic tape at high signal levels (the nonlinearity of the hysteresis loop, whose Taylor expansion is also dominated by odd-degree terms). But the “digital coldness” impression also has a psychoacoustic component: digital quantization error (if not dithered) produces harmonic distortion that sounds harsher than white noise — this is precisely the problem solved by TPDF dithering discussed in EP30.

Callback to EP09

The combination tones in EP09

arise from nonlinearities in the auditory system and loudspeakers — two pure tones entering the system produce difference-frequency components such as . This mechanism belongs to the same physical framework as tanh producing odd harmonics: in the Taylor expansion of a nonlinear system, odd-degree terms () generate difference-frequency terms through the expansion of under dual-frequency input. The “organic quality” of the Moog filter resonates in harmony with the nonlinear perception of the human ear, reinforcing the overall “natural” impression.

Tonal Differences Among Three Synthesizer Topologies

  • Moog ladder (four-pole, tanh, ): odd harmonics dominant (), steep cutoff, sharp resonance peak, classic “bass synthesis timbre”;
  • Korg MS-20 (Sallen-Key topology, asymmetric nonlinearity): mixed odd and even harmonics (), distinctive overshoot in the cutoff region, “sharp attack character”;
  • Roland TB-303 (two-pole ladder + special feedback path): between the two, plus unique envelope tracking, producing “acid bass vibrato” — even harmonics contribute a noticeable softness to the timbre.

The transfer function shapes of these three topologies are similar; tonal differences arise almost entirely from whether even-degree terms exist in the Taylor expansion of the nonlinear element.

Forward Link to EP32: Chebyshev Waveshaping

EP32 (Chebyshev waveshaping)

inverts the thinking of this episode: since a sinusoidal input passing through a function produces exactly the harmonics described by Chebyshev polynomials, can one design a nonlinear function so that a sinusoidal input produces a precisely specified harmonic combination? The answer is yes — this is the core technology of Buchla synthesizers, whose theoretical basis is the orthogonality of Chebyshev polynomials. The “natural” harmonic distribution of tanh and the “precisely engineered” harmonic distribution of Chebyshev represent the two extremes of analog timbre design.


Limitations and Open Problems

  1. Scope of the linearized model: Theorem 31.2 (Barkhausen criterion) analyzes a linear system; in the actual Moog filter, each transistor stage has tanh nonlinearity, and as the drive level increases, the pole positions shift dynamically with signal amplitude, causing the critical oscillation frequency to deviate from the cutoff frequency. Accurate self-oscillation analysis requires the describing function method or Volterra series expansion, which are beyond the scope of this episode.

  2. Perceptual validity of the warmth coefficient: The warmth coefficient in Definition 31.4 is a pedagogical definition, not a standard measurement specification. In actual perception, the relative amplitudes, phase relationships, and frequency deviations of harmonics (such as harmonic spreading produced by vibration) also influence “warmth,” and the odd/even harmonic power ratio alone may not fully capture perceptual differences.

  3. Digital ZDF accuracy vs. computational cost tradeoff: Five Newton-Raphson iterations at a professional 192 kHz sample rate require approximately tanh function evaluations per second. Modern CPU AVX vectorization can substantially reduce the overhead, but it remains a bottleneck on low-power embedded platforms (such as synthesizer microcontrollers); real products often substitute polynomial approximations for tanh.

  4. Coupling of multiple nonlinear modes: This episode analyzes a single tanh nonlinear element. In the actual Moog circuit, each transistor pair has its own independent tanh characteristic; when four stages cascade, the degree of saturation in each stage differs, and the generated harmonic components intermix, making the overall transfer function far more complex than a single tanh. Accurate modeling requires Volterra series multi-dimensional kernel functions, for which no compact closed-form solution currently exists.

Conjecture (Odd Harmonic Dominance Is a Sufficient but Not Necessary Condition for Perceived 'Warmth')

Suppose an arbitrary nonlinear processor with (not limited to tanh; any odd function will do), in a blind listening test, always has its output perceived by trained listeners as “warmer than distortion dominated by even harmonics.”

Conjecture: is a sufficient condition for being perceived as “warm,” but not a necessary condition — for example, an appropriate ratio of second harmonic (even) superimposed on a very strong fundamental can also produce a “warm” perception (the case of single-ended vacuum tube amplifiers).

Falsifiability criterion: Design a blind listening experiment presenting processors with odd-dominant () and even-augmented () but equal total harmonic power outputs; if a statistically significant majority of listeners show no significant difference in “warmth” ratings between the two, this conjecture is falsified.


References

  1. Moog, R. A. (1965). Voltage-Controlled Electronic Music Modules. Journal of the Audio Engineering Society, 13(3), 200–206. (Moog 梯形滤波器原始专利论文)

  2. Stinchcombe, T. (2008). Analysis of the Moog transistor ladder and derivative filters. Self-published technical report. (对梯形滤波器传递函数的精确分析)

  3. Välimäki, V., & Huovilainen, A. (2006). Oscillator and filter algorithms for virtual analog synthesis. Computer Music Journal, 30(2), 19–31.

  4. Huovilainen, A. (2004). Non-linear digital implementation of the Moog ladder filter. Proceedings of the DAFx Conference, 61–64. (ZDF 方法的早期实现)

  5. Zavalishin, V. (2012). The Art of VA Filter Design. Native Instruments. (ZDF 方法系统性论述;免费PDF)

  6. Frey, B. S., & Frey, C. (2018). Exact zero-delay feedback formulation for the Moog ladder filter. IEEE Signal Processing Letters, 25(7), 1075–1079.

  7. Parker, J. D. (2013). Efficient dispersion-free ladder filter design. Proceedings of the AES 135th Convention, Paper 8957.

  8. Zölzer, U. (Ed.). (2011). DAFX: Digital Audio Effects (2nd ed.). Wiley. Ch. 7 (Virtual Analog Filters).

  9. Haykin, S. (2001). Communication Systems (4th ed.). Wiley. (Barkhausen 判据与振荡器设计的教材参考)

  10. Abramowitz, M., & Stegun, I. A. (1972). Handbook of Mathematical Functions. Dover. Ch. 4 (tanh 展开系数,数值表).

  11. Hearn, D., & Baker, M. P. (1994). Computer Graphics (2nd ed.). Prentice Hall. (sigmoid/tanh 在图形与音频中的对偶用途)

  12. Bogert, B. P., Healy, M. J., & Tukey, J. W. (1963). The quefrency alanysis of time series for echoes: Cepstrum, pseudo-autocovariance, cross-cepstrum and saphe cracking. Proc. Symposium on Time Series Analysis. (非线性谐波分析历史背景)