# Impulse invariance

Impulse invariance is a technique for designing discrete-time infinite-impulse-response (IIR) filters from continuous-time filters in which the impulse response of the continuous-time system is sampled to produce the impulse response of the discrete-time system. The frequency response of the discrete-time system will be a sum of shifted copies of the frequency response of the continuous-time system; if the continuous-time system is approximately band-limited to a frequency less than the Nyquist frequency of the sampling, then the frequency response of the discrete-time system will be approximately equal to it for frequencies below the Nyquist frequency.

## Discussion

The continuous-time system's impulse response, $h_{c}(t)$, is sampled with sampling period $T$ to produce the discrete-time system's impulse response, $h[n]$.
    $h[n]=Th_{c}(nT)\,$
Thus, the frequency responses of the two systems are related by
    $H(e^{j\omega })={\frac {1}{T}}\sum _{k=-\infty }^{\infty }{TH_{c}\left(j{\frac {\omega }{T}}+j{\frac {2{\pi }}{T}}k\right)}\,$
If the continuous time filter is approximately band-limited (i.e. $H_{c}(j\Omega )<\delta$ when $|\Omega |\geq \pi /T$), then the frequency response of the discrete-time system will be approximately the continuous-time system's frequency response for frequencies below π radians per sample (below the Nyquist frequency 1/(2T) Hz):
    $H(e^{j\omega })=H_{c}(j\omega /T)\,$ for $|\omega |\leq \pi \,$

### Comparison to the bilinear transform

Note that aliasing will occur, including aliasing below the Nyquist frequency to the extent that the continuous-time filter's response is nonzero above that frequency. The bilinear transform is an alternative to impulse invariance that uses a different mapping that maps the continuous-time system's frequency response, out to infinite frequency, into the range of frequencies up to the Nyquist frequency in the discrete-time case, as opposed to mapping frequencies linearly with circular overlap as impulse invariance does.

### Effect on poles in system function

If the continuous poles at $s=s_{k}$, the system function can be written in partial fraction expansion as
    $H_{c}(s)=\sum _{k=1}^{N}{\frac {A_{k}}{s-s_{k}}}\,$
Thus, using the inverse Laplace transform, the impulse response is
    $h_{c}(t)={\begin{cases}\sum _{k=1}^{N}{A_{k}e^{s_{k}t}},&t\geq 0\\0,&{\mbox{otherwise}}\end{cases}}$
The corresponding discrete-time system's impulse response is then defined as the following
    $h[n]=Th_{c}(nT)\,$
    $h[n]=T\sum _{k=1}^{N}{A_{k}e^{s_{k}nT}u[n]}\,$
Performing a z-transform on the discrete-time impulse response produces the following discrete-time system function
    $H(z)=T\sum _{k=1}^{N}{\frac {A_{k}}{1-e^{s_{k}T}z^{-1}}}\,$
Thus the poles from the continuous-time system function are translated to poles at z = e$^{skT}$. The zeros, if any, are not so simply mapped.

### Poles and zeros

If the system function has zeros as well as poles, they can be mapped the same way, but the result is no longer an impulse invariance result: the discrete-time impulse response is not equal simply to samples of the continuous-time impulse response. This method is known as the matched Z-transform method, or pole–zero mapping.

### Stability and causality

Since poles in the continuous-time system at s = s$_k$ transform to poles in the discrete-time system at z = exp(s$_k$T), poles in the left half of the s-plane map to inside the unit circle in the z-plane; so if the continuous-time filter is causal and stable, then the discrete-time filter will be causal and stable as well.

### Corrected formula

When a causal continuous-time impulse response has a discontinuity at $t=0$, the expressions above are not consistent. This is because $h_{c}(0)$ has different right and left limits, and should really only contribute their average, half its right value $h_{c}(0_{+})$, to $h[0]$.
Making this correction gives
    $h[n]=T\left(h_{c}(nT)-{\frac {1}{2}}h_{c}(0_{+})\delta [n]\right)\,$
    $h[n]=T\sum _{k=1}^{N}{A_{k}e^{s_{k}nT}}\left(u[n]-{\frac {1}{2}}\delta [n]\right)\,$
Performing a z-transform on the discrete-time impulse response produces the following discrete-time system function
    $H(z)=T\sum _{k=1}^{N}{{\frac {A_{k}}{1-e^{s_{k}T}z^{-1}}}-{\frac {T}{2}}\sum _{k=1}^{N}A_{k}}.$
The second sum is zero for filters without a discontinuity, which is why ignoring it is often safe.