# How to determine if an IIR filter is causal or non-causal?

It may sound impractical, as only causal system are passively realizable, but what I am facing is a general statement made regarding recursive digital filters: for them to be stable, the poles should be inside the unit circle. I am not able to see that how without knowing type of system that the system is causal or non causal one can comment on location of poles for system to be stable.

I also know that for system to be stable its output should only be dependent on values of input at or before observation time for instant below is causal

• I'm assuming in your third equation you meant to write $y[n+K]$ instead of $y[n-K]$? – Florian Jul 1 at 15:21
• "... only causal system are passively realizable ..." I wouldn't know how to realize non-causal systems with active electronics either. – Matt L. Jul 1 at 15:45
• @MattL. Aren't you assuming that $n$ is temporal rather than spatial? – Rodrigo de Azevedo Jul 6 at 17:36
• @RodrigodeAzevedo: Sure I am, causality is always about time. – Matt L. Jul 6 at 18:21

First of all, it's not correct to say "poles should (always) be inside the unit circle for an LTI system to be stable" ; unless it's implied that system is also causal. Otherwise, if the system is noncausal, then its poles should be outside of unit circle for the system being stable.

For IIR systems that are described by LCCDEs causality must be externally imposed on the system (consistent wit the initial conditions), and cannot be derived from the equation alone. For example, the system

$$y[n] + a y[n-1] = b x[n]$$ cannot be concluded to be causal, as the equation can also be written as

$$y[n] = (-1/a) y[n+1] -(b/a) x[n+1]$$ which is (apparently) indicating a noncausal dependence on the current output on both future input and future output.

Therefore this difference equation can signify both a causal and a noncausal system. Its solution should be derived by assuming a causal system or noncausal system.

This is also understood by the fact that a given transfer function $$H(z)$$ will have a corresponding LCCDE representation, but will have multiple ROCs. For each ROC the LCCDE should be solved accordingly, yielding a different solution for each assumption. But the LCCDE is the same.

FIR systems do not have poles (except at origin or infinity) and have no issues with stability and they don't posses regions of convergences on the z-plane. Hence their equation will be signifying the causality such as: $$y[n] = a x[n+1] + b x[n] + c x[n-1]$$ is a noncausal FIR system and you cannot manipulate the given equation into a causal form.

Or the following system $$y[n] = a x[n] + b x[n-1] + c x[n-2]$$ is a causal FIR system and you cannot manipulate the given equation into a noncausal form...

So causality shall be an assumed property for IIR systems.

Substitute $$m = n+K$$, i.e., $$n=m-K$$. This gives $$y[m-K] = -a_1 y[m-K+1] - \ldots - a_{K-1} y[m-1] - a_K y[m] + b_0 x[m-K] + b_1 x[m-K-1] + \ldots+ b_L x[m-K-L].$$ Rearranging gives $$y[m] = -\frac{a_{K-1}}{a_K} y[m-1] - \frac{a_{K-2}}{a_K} y[m-2]-\ldots-\frac{a_1}{a_K}y[m-K+1] - \frac{1}{a_K}y[m-K] + \frac{b_0}{a_K}x[m-K] + \ldots + \frac{b_L}{a_K}x[m-K-L].$$

That's a causal filter to me.

From the difference equation alone you cannot tell if a system is causal or not. For example, the difference equation

$$y[n]=-a_1y[n-1]-a_2y[n-2]+b_0x[n]\tag{1}$$

can be used to describe three different systems. The first one is a causal system, as suggested by the form given in $$(1)$$.

However, rewriting $$(1)$$ as

$$y[n-2]=-\frac{a_1}{a_2}y[n-1]-\frac{1}{a_2}y[n]+\frac{b_0}{a_2}x[n]\tag{2}$$

suggests an anti-causal system, where all output values depend on future values of the input and output.

Yet a third way of rewriting $$(1)$$ suggests a non-causal (two-sided) system, where the current output value depends on past and on future values of the input and output:

$$y[n-1]=-\frac{a_2}{a_1}y[n-2]-\frac{1}{a_1}y[n]+\frac{b_0}{a_1}x[n]\tag{3}$$

It's the initial conditions that can define such a system to be causal. In the $$\mathcal{Z}$$-transform domain, the three different system interpretations $$(1)-(3)$$ correspond to three different regions of convergence.