The bilinear transformation is the substitution
used to convert the representation of a continuous (or "analog") system into the representation of a discrete (or "digital") system.
For example, the second order low pass Butterworth filter with cutoff frequency ω_{c} is usually given by the Laplace transform transfer function
With the bilinear transformation, the Z transform transfer function of the same filter is
Scaling to obtain 1 in the denominator, we have
and the impulse response of the filter (its actual implementation in practice) is
where x(n) are the samples of the input signal and y(n) are the samples of the output signal.
Derivation of the bilinear transformation
The bilinear transformation follows from the Taylor series expansion of the function e^{sT/2}.
Frequency warping of the bilinear transformation
Note that the properties of the resulting filter are evaluated at s = -jω or z = e^{-jω}. However,
Thus, the discrete filter H(z), obtained after the bilinear transformation of H(s), will behave, at the discrete frequency ω_{d}, the same way the continuous filter H(s) behaves at the frequency ω_{a} = 2 tan(ω_{d}/2). (Alternatively, ω_{d} = 2 arctan(ω_{a}/2)).
Take, for example, the Butterworth filter above. Its magnitude response, computed from H(s), is
The magnitude response of the filter after bilinear transformation can be computed from
and is
This warping of the frequency domain is small for small ω and increases as ω increases (ω is between 0 and π). At ω_{a} = 1, for example, ω_{d} ≈ 0.927.
When designing digital filters, this frequency warping can be remedied in one of two ways. First, a discrete filter with the cutoff frequency ω_{d} can be designed with the bilinear transformation on the continuous filter with the cutoff frequency ω_{a} = 2 tan(ω_{d}/2). Alternatively, instead of the bilinear transformation, one can use the biquad transformation
For example, the second order low-boost shelving filter with cutoff frequency ω_{c} and gain G
can be written with the bilinear transformation as
or with the biquad transform as
The corresponding magnitude responses for the example cutoff frequency ω_{c} = 2 in both cases, K = tan(ω_{c} / 2), sampling rate of 2000 Hz, and gain of G = 2 (≈ 6 dB) are below.
Filter stability and the bilinear transformation
Note that, for s = σ – j ω, if Re(s) = σ < 0, then
Thus, if we have the Laplace transform transfer function of a stable filter with roots of the denominator in the left part of the s- complex plane, the transfer function that we will obtain with the bilinear transformation would have roots that are inside the unit circle and the filter will still be stable. The bilinear transformation preserves stability.