DSP: DT Filter Design via Impulse Invariance

Digital Discrete-Time Filter Design via Impulse Invariance

D. Richard Brown III

D. Richard Brown III 1 / 9 DSP: DT Filter Design via Impulse Invariance General Requirements for CT/DT Transformation

Requirement 1: Points on the imaginary axis in the s-domain must be mapped to points on the unit circle in the z-domain.

Requirement 2: Stable causal CT transfer functions must be transformed to stable causal DT transfer functions. Recall that stable causal CT transfer functions have their poles in the left-half plane. s-domain z-domain

D. Richard Brown III 2 / 9 DSP: DT Filter Design via Impulse Invariance Impulse Invariance Basics

Given a causal LTI CT system impulse response hc(t), we can set the DT impulse response to match up at the sampling times:

h[n]= hc(t)|t=nT = hc(nT ) for n = 0, 1,...

Does this CT→DT transformation satisfy the general requirements?

D. Richard Brown III 3 / 9 DSP: DT Filter Design via Impulse Invariance Impulse Invariance: Simple Example

1 Suppose you are given a causal LTI CT system with Hc(s)= s−a . The at aT n inverse gives hc(t)= e u(t). Hence h[n]= e u[n]. What is H(z)? Rewrite

aT n aT n n h[n]= e u[n]= e u[n]= α u[n]  Table lookup tells us 1 H(z)= 1 − eaT z−1 with ROC |z| > eaT . Remarks: ◮ Suppose a is on on the imaginary axis. What is the magnitude of the pole of H(z)? ◮ Suppose a is complex with negative real part. What can you say about the magnitude of the pole of H(z)?

D. Richard Brown III 4 / 9 DSP: DT Filter Design via Impulse Invariance Impulse Invariance Example

% CT system 1 % H(s) = 1/(s-a) CT a = -0.5; h[n] 0.9 tfinal = 20; Matlab impulse response of H(z) ctnum = 1; ctden = [1 -a]; 0.8 ctsys = tf(ctnum,ctden); [y,t] = impulse(ctsys,tfinal); 0.7 plot(t,y,’r’) 0.6 % DT system T = 0.5; 0.5 alpha = exp(a*T); dtnum = [1 0]; impulse response 0.4 dtden = [1 -alpha]; dtsys = tf(dtnum,dtden,T); 0.3 [dty,dtt] = impulse(dtsys,tfinal); hold on 0.2 n=0:length(dtt)-1; plot(dtt,alpha.^n,’b+’); stem(dtt,dty); 0.1 hold off 0 xlabel(’time’); 0 2 4 6 8 10 12 14 16 18 20 ylabel(’impulse response’); time legend(’CT’,’h[n]’,’Matlab impulse response of H(z)’);

D. Richard Brown III 5 / 9 DSP: DT Filter Design via Impulse Invariance Impulse invariance doesn’t imply invariance to all inputs

% step responses 5 % note these results are consistent with CT % the final value theorems Matlab step response of H(z) 4.5 [ys,ts] = step(ctsys,tfinal); [dtys,dtts] = step(dtsys,tfinal); figure(2) 4 plot(ts,ys,’r’) hold on 3.5 stem(dtts,dtys); hold off 3 xlabel(’time’); ylabel(’step response’); 2.5 legend(’CT’,’Matlab step response of H(z)’); step response 2

1.5

1

0.5

0 0 2 4 6 8 10 12 14 16 18 20 time In general, you can pick a particular input and match the response of the DT system to the response of the CT system for that input. But the response to other inputs will be different.

D. Richard Brown III 6 / 9 DSP: DT Filter Design via Impulse Invariance Impulse Invariance: Frequency Response

Recall that h[n]= h(nT ) for n =0, 1,... . What is the relationship between jω H(e ) and Hc(jΩ)? We’ve covered the relationship between the CTFT and the DTFT a few times: ∞ jω 1 ω − k2π H(e )= Hc T  T  k=X−∞ Remarks: ◮ π If Hc(jΩ) is bandlimited such that Hc(jΩ) ≈ 0 for all Ω ≥ T , then there will be negligible overlap in the sum of shifted spectra and

jω 1 ω H(e ) ≈ Hc j for |ω|≤ π T  T  Hence, after reconstruction, the DT system designed via impulse invariance accurately emulates the CT system’s frequency response. ◮ If Hc(jΩ) is not bandlimited, e.g. Hc(jΩ) is a notch filter, there will be and the resulting DT system’s frequency response is not likely to be an accurate emulation of the CT system’s frequency response.

D. Richard Brown III 7 / 9 DSP: DT Filter Design via Impulse Invariance Impulse-Invariant Lowpass Butterworth Filter Design Ex.

10 CT Butterworth LPF DT Butterworth LPF via impulse invariance 0

−10

−20

−30

−40 magnitude response −50

−60

−70

−80 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 normalized frequency (times π)

D. Richard Brown III 8 / 9 DSP: DT Filter Design via Impulse Invariance Impulse Invariance: Final Remarks

1. Main idea is to preserve characteristics of the CT impulse response in the DT impulse response, e.g. fast settling time, etc. 2. Frequency response of DT system is only a good replica of CT system if the CT system is bandlimited (negligible aliasing). 3. Idea can be extended to other types of waveform invariance, e.g. step invariance. 4. The impulse invariance technique maps poles from s = ak on the s-plane to z = eakT on the z-plane. 5. The impulse response of a DT IIR filter is not directly useful for implementation. We need a transfer function or a difference equation. 6. See Matlab function impinvar.

D. Richard Brown III 9 / 9