Impulse invariance method for analog-to-digital filter conversion
[bz,az] = impinvar(b,a,fs)
[bz,az] = impinvar(b,a,fs,tol)
[bz,az] = impinvar(b,a,fs) creates
a digital filter with numerator and denominator coefficients
respectively, whose impulse response is equal to the impulse response
of the analog filter with coefficients
1/fs. If you leave out the argument
fs as the empty vector
it takes the default value of 1 Hz.
[bz,az] = impinvar(b,a,fs,tol) uses
the tolerance specified by
tol to determine whether
poles are repeated. A larger tolerance increases the likelihood that
closely located poles as multiplicities (repeated ones). The default
is 0.001, or 0.1% of a pole's magnitude. The accuracy of the pole
values is still limited to the accuracy obtainable by the
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 fourth-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
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
It finds the transfer function coefficients of the system from the residues from step 1 and the poles from step 2.
 Parks, Thomas W., and C. Sidney Burrus. Digital Filter Design. New York: John Wiley & Sons, 1987.
 Antoniou, Andreas. Digital Filters. New York: McGraw-Hill, Inc., 1993.