I'm trying to improve my poor understanding of analogue filters. Similarly to this question, I've always wondered why libraries like scipy offer an option to design an analogue filter, and when I would want to use that mode.

Re-phrasing the other question more specifically: What do the (digital?) numbers of the filter coefficients $a_0$, $a_1$, $\ldots$ and $b_0$, $b_1$, $\ldots$ mean in the case of an analogue filter?

My basic mental model of an analogue filter is that it is e.g. an analogue circuit composed of capacitors and inductors, which operates in continuous time obviously. The filter coefficients $a_0$, $a_1$, $\ldots$ and $b_0$, $b_1$, $\ldots$ however suggest discrete time due to their integer indices. When I see them my brain immediately jumps back into digital world, thinking

$$ y_i = b_0 x_i + b_1 x_{i-1} + \ldots + a_1 y_{i-1} \ldots $$

I cannot make sense of the coefficient in the analogue world. So what do the coefficients mean returned by filter design functions like butter, ellip, or bessel in analog mode?


2 Answers 2


Instead of thinking of it as:

$$ y_i = b_0 x_i + b_1 x_{i-1} + \ldots + a_1 y_{i-1} \ldots $$

think of it as

$$ y(t) = b_0 x(t) + b_1 x'(t) + b_2 x''(t) + \ldots + a_1 y'(t) + a_2 y''(t) \ldots $$

where $x'(t)$ is the first derivative of $x(t)$.

  • $\begingroup$ As always, in retrospect it is so obvious that the question feels silly ;). $\endgroup$
    – bluenote10
    Jan 4 at 22:44
  • 1
    $\begingroup$ One thing that makes this a little harder is that, in the digital filter, the coefficients are all dimensionless numbers. Just numbers. Computers know how to multiply numbers. But in an analog filter, $x(t)$ and $x'(t)$ do not have the same dimension. So to add these things together, then $b_0$ and $b_1$ also do not have the same dimension, but $b_0 x(t)$ and $b_1 x'(t)$, those two terms must have the same dimension. $\endgroup$ Jan 4 at 22:47
  • 1
    $\begingroup$ Ah, just think like a mathematician -- $t$ (and everything else) is dimensionless, and things like seconds and kilograms and volts and whatnot are just things invented by physicists to make mathematician's lives difficult. $\endgroup$
    – TimWescott
    Jan 4 at 23:56
  • $\begingroup$ $$ $$ --- Ha ha! --- $$ $$ $\endgroup$ Jan 5 at 0:11

Great question!

What are the coefficients / transfer function $H(s)$

In the context of analog filters, the filter coefficients $a_0, a_1, \dots$ and $b_0, b_1, \dots$ represent the parameters of the filter's transfer function in the $s$-domain (Laplace domain). The transfer function of an analog filter is typically expressed as a ratio of polynomials in $s$:

$$H(s) = \frac{B(s)}{A(s)} = \frac{b_0 + b_1s + b_2s^2 +\dots}{a_0 + a_1s + a_2s^2 + \dots}$$

Relationship to physical components

In an analog filter composed of capacitors, inductors, and resistors, the coefficients in the filter's transfer function are derived from the physical properties of these components and their configuration in the circuit. The process involves translating the electrical properties of the components into a mathematical model.

  • Resistors $R$ are their resistance value in ohms (Ω).
  • Capacitors $C$ are represented by $\frac{1}{sC}$ where $C$ is the capacitance in farads (F)
  • Inductors $L$ are represented by $sL$ where $L$ is the inductance in henries (H).

The relationships between voltage and current for each component are used to write down equations characterizing the circuit's behavior. Using techniques like Kirchhoff's laws and node analysis, these equations are combined to form a differential equation describing the entire circuit. The differential equation is then transformed into the $s$-domain using the Laplace transform, resulting in a transfer function $H(s)$ of the form mentioned earlier.

Example: deriving $H(s)$ for a RC low-pass filter

​A passive RC low-pass filter consists of a resistor $R$ and a capacitor $C$ in series. The output is taken across the capacitor:

enter image description here

  1. The voltage across the resistor is $V_R = V_{in} - V_{out}$
  2. Applying Kirchhoff's Voltage Law: $V_{in} - V_{R} - V_{C} = 0$ where $V_C = V_{out}$.
  3. Ohm's Law for the resistor gives $V_R = IR$ where $I$ is the current through the resistor.
    For the capacitor, the relationship between voltage and current is $I = C\frac{dV_C}{dt}$
  4. The Laplace transform of $\frac{dV_C}{dt}$ is $sV_C(s)$ so in Laplace domain we have: $$V_R(s) = I(s)R$$ $$V_C(s) = \frac{1}{sC}I(s)$$
  5. The transfer function is the ratio of the output to the input: $$H(s) = \frac{V_{out}(s)}{V_{in}(s)} = \frac{V_C(s)}{V_R(s)+V_C(s)} = \frac{1}{sC} \frac{I(s)}{I(s)(R + \frac{1}{sC})} = \frac{1}{1 + RCs}$$
  6. Here $b_0 = 1, a_0 = 1$ and $a_1 = RC$, directly relating the coefficients to the resistor and capacitor values in the circuit.

Going discrete

One way to go from an analog transfer function ($s$-domain) to its corresponding discrete transfer function ($z$-domain), i.e. to derive the digital filter coefficients $a_0, a_1, \dots$ and $b_0, b_1, \dots$ is through the Bilinear transform

Hope this helped!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.