0
$\begingroup$

I have plot some of the IIR filter's impulse responses and some of them are exponentially increasing, increasing, decreasing etc but some IIR's impulse response approaches 0. If for example I have an IIR filter defined by its lccde:

$$ 6 y[n] + y[n-1] - 2y[n-2] = x[n] - 2x[n-1] $$

or

$$ y[n] = \frac{1}{6}x[n] - \frac{1}{3}x[n-1] - \frac{1}{6}y[n-1] + \frac{1}{3}y[n-2] $$

when I plot its impulse response in matlab:

[h,n] = impz([1 -2],[6 1 -2]);
stem(n,h);

its impulse response would approach 0, and this zero value will bestarting at n = 23. Does this mean that the IIR is an FIR since I can cut off the impulse response at n = 23?

$\endgroup$
  • 2
    $\begingroup$ $y[23]$ is really zero? or just very tiny? $\endgroup$ – robert bristow-johnson Nov 29 '16 at 17:12
  • $\begingroup$ Plot the amplitude on a log scale $\endgroup$ – Hilmar Nov 29 '16 at 17:21
  • $\begingroup$ Wait so this lccde does not approach 0? how do I plot this properly/ $\endgroup$ – LeBlanc Lord Nov 29 '16 at 17:28
  • $\begingroup$ It's an IIR. infinite impulse response, as explained in comments and answers to your two other questions, already (1, 2). you must stop tackling IIRs with the tools only applicable to FIRs! $\endgroup$ – Marcus Müller Nov 29 '16 at 17:41
  • $\begingroup$ @LeBlancLord: plot(20*log10(h)); $\endgroup$ – Hilmar Nov 29 '16 at 18:51
1
$\begingroup$

As per the exact solution of a discrete LTI system:

$$y(t)=C A^k x_0+C\sum_{k=0}^{t-1}A^{t-k-1} B u(k)+D u(t)$$

and considering that $u(t)=\delta(t)$ and $x_0=0$ for the impulse response, we have:

$$h(t)=C A^{t-1} B+D \delta(t)$$

where $A$,$B$,$C$ and $D$ are the state space discrete matrices:

$$x(t+1)=Ax(t)+Bu(t)\\y(t)=Cx(t)+Du(t)$$

Which in this case are obtained as:

b=[1/6 -1/3 0];
a=[1 1/6 -1/3];
[A,B,C,D]=tf2ss(b,a);

Hence, aside numerical issues, both methods gave the same results:

[h,t] = impz([1 -2],[6 1 -2]);
stem(t,h);

t=(0:23)';
h(1)=D*1;
for k=2:length(t)
    h(k,1)=C*A^(k-2)*B;
end
stem(t,h);

So the $t$=23th term on the $h(t)$ signal is: $$h(23)=C A^{t-1} B|_{t=23}=C A^{22} B=-3.39702260269318e^{-05} $$

Though small, the $t$th term never vanishes, hence, transfer functions with denominator different than the identity vector, will always be an IIR.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.