Impulse invariance method for analog-to-digital filter conversion
Convert a sixth-order analog Butterworth lowpass filter to a digital filter using impulse invariance. Specify a sample rate of 10 Hz and a cutoff frequency of 2 Hz. Display the frequency response of the filter.
f = 2; fs = 10; [b,a] = butter(6,2*pi*f,'s'); [bz,az] = impinvar(b,a,fs); freqz(bz,az,1024,fs)
Convert a third-order analog elliptic filter to a digital filter using impulse invariance. Specify a sample rate Hz, a passband edge frequency of 2.5 Hz, a passband ripple of 1 dB, and a stopband attenuation of 60 dB. Display the impulse response of the digital filter.
fs = 10; [b,a] = ellip(3,1,60,2*pi*2.5,'s'); [bz,az] = impinvar(b,a,fs); impz(bz,az,,fs)
Derive the impulse response of the analog filter by finding the residues, , and poles, , of the transfer function and inverting the Laplace transform explicitly using
Overlay the impulse response of the analog filter. Impulse invariance introduces a gain of to the digital filter. Multiply the analog impulse response by this gain to enable meaningful comparison.
[r,p] = residue(b,a); t = linspace(0,4,1000); h = real(r.'*exp(p.*t)/fs); hold on plot(t,h) hold off
a— Analog filter transfer function coefficients
Analog filter transfer function coefficients, specified as vectors.
[b,a] = butter(6,2*pi*10,'s') specifies a 6th-order
Butterworth filter with a cutoff frequency of 10 Hz.
fs— Sample rate
Sample rate, specified as a positive scalar.
0.001(default) | positive scalar
Tolerance, specified as a positive scalar. The tolerance determines whether poles
are repeated. A larger tolerance increases the likelihood that
impinvar interprets closely located poles as multiplicities
(repeated ones). The default tolerance corresponds to 0.1% of a pole magnitude. The
accuracy of the pole values is still limited to the accuracy obtainable by the
az— Digital filter transfer function coefficients
Digital filter transfer function coefficients, returned as vectors.
impinvar performs the impulse-invariant method of analog-to-digital
transfer function conversion discussed in reference :
It finds the partial fraction expansion of the system represented by
It replaces the poles
p by the poles
It finds the transfer function coefficients of the system from the residues from step 1 and the poles from step 2.
 Antoniou, Andreas. Digital Filters. New York: McGraw-Hill, Inc., 1993.
 Parks, Thomas W., and C. Sidney Burrus. Digital Filter Design. New York: John Wiley & Sons, 1987.