DSPRelated.com
Forums

IIR filter paradox?

Started by Shafik November 17, 2004
Hello all,

This is just a though experiment, and Im sure Im wrong, I just dont
know why Im wrong :-).

Consider a simple recursive filter, defined as

H(z) = 1 / (z - 0.5)

On the z-plane, this translates to a pole at 0.5 DC. Meaning that the
output of the filter is infinite when the input is a theoretically
perfect DC value of 0.5.

This makes a filter like that unstable, even when all poles are inside
the unit circle. 

What gives?
--Shafik

"Shafik" <shafik@u.arizona.edu> writes:

> Hello all, > > This is just a though experiment, and Im sure Im wrong, I just dont > know why Im wrong :-). > > Consider a simple recursive filter, defined as > > H(z) = 1 / (z - 0.5) > > On the z-plane, this translates to a pole at 0.5 DC. Meaning that the > output of the filter is infinite when the input is a theoretically > perfect DC value of 0.5. > > This makes a filter like that unstable, even when all poles are inside > the unit circle. > > What gives? > --Shafik
Hi Shafik, Remember that in a discrete-time system, the frequency response is evaluated at points on the unit circle, H(w) = H(z) at z = e^{j*w*Ts), where Ts is the sample period and w is absolute radian frequency. So it's impossible to have a signal at 0.5 - 0.5 is not on the unit circle. -- % Randy Yates % "Though you ride on the wheels of tomorrow, %% Fuquay-Varina, NC % you still wander the fields of your %%% 919-577-9882 % sorrow." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr
I've had this confusion before myself, thinking that a filter like that grows
infinitely.  In fact, it does not, and I will demonstrate that with an example.
First, let me re-write your transfer function in a bit more standard notation:

H(z) = z^-1 / (1 - 0.5z^-1)

This implies a difference equation of:
y(n) = x(n-1) + 0.5*y(n-1)

So if you feed in an input of 0.5, after 1 sample, you get 0.5 out.  After 2
samples, you get 0.5 + 0.5^2 = .75.  Carrying it out a bit further, the output
sequence goes like this:
0.5
0.75
0.875
0.9375
0.96875
0.984375
...
Eventually it converges to one.  At first, you might think that since the output
is always increasing for a DC input, it must be unstable.  But the rate of
growth is decreasing, so it converges assymptotically to a finite value.

If you plot the frequency response of the filter, you will see it has a
magnitude of 2 (~6dB) at DC.  This is consistent with the observation above that
when you put in 0.5, you get out 1.0.  In fact, for this filter, as long as the
feedback coeficient (0.5 in this case) is less than one, the output will
converge and the filter is stable.  This is consistent with the notion that a
filter is stable as long as all poles are inside the unit circle.


"Shafik" <shafik@u.arizona.edu> wrote in message
news:1100737879.558705.323960@z14g2000cwz.googlegroups.com...
> Hello all, > > This is just a though experiment, and Im sure Im wrong, I just dont > know why Im wrong :-). > > Consider a simple recursive filter, defined as > > H(z) = 1 / (z - 0.5) > > On the z-plane, this translates to a pole at 0.5 DC. Meaning that the > output of the filter is infinite when the input is a theoretically > perfect DC value of 0.5. > > This makes a filter like that unstable, even when all poles are inside > the unit circle. > > What gives? > --Shafik >
Thanks Jon, that actually makes a lot of sense.

As Randy corrected me, what I was thinking of as DC was actually a
growing exponential, with no sinusoudal component:

e^0.5n * u(n)

The output blows up here because of the input, not because the filter
is unstable.

However, just to play devil's advocate, what if the pole was  at -0.5,
corresponding to a decaying exponential.

This means, that if I feed this filter that decaying exponential, my
output magnitude will go to infinte.
How come the filter is unstable now? :-)

--Shafik

Actually, forget what I just said. I was mixing up the s-plane and the
z-plane.

--Shafik

Actually, forget what I just said. I was mixing up the s-plane and the
z-plane.

--Shafik

"Shafik" <shafik@u.arizona.edu> writes:

> Thanks Jon, that actually makes a lot of sense. > > As Randy corrected me, what I was thinking of as DC was actually a > growing exponential, with no sinusoudal component: > > e^0.5n * u(n) > > The output blows up here because of the input, not because the filter > is unstable. > > However, just to play devil's advocate, what if the pole was at -0.5, > corresponding to a decaying exponential. > > This means, that if I feed this filter that decaying exponential, my > output magnitude will go to infinte. > How come the filter is unstable now? :-)
Hi again Shafik, You're asking some very good questions! Have you studied the "region of convergence" for z-transforms? It is there you will find your answers, at least from an engineering point-of-view. To understand it as a mathematician, study Laurent series expansions and their regions of convergence (the same thing, really!). But to get to your specific question, first consider the following notions. Let "a" be a complex number. What is f(a) = \sum_{n=0}^{+\infty} a^n? Well, to answer this let's study the truncated series f_N(a) = \sum_{n=0}^{N-1} a^n. Write it out like this: f_N(a) = a^0 + a^1 + a^2 + ... + a^{N-1}. Then write out a*f_N(a): a*f_N(a) = a^1 + a^2 + ... + a^{N-1} + a^N. Now take the difference f_N(a) - a*f_N(a): f_N(a) - a*f_N(a) = f_N(a)(1-a) = a^0 + a^1 + a^2 + ... + a^{N-1}. - ( 0 + a^1 + a^2 + ... + a^{N-1} + a^N) = a^0 - a^N. Thus f_N(a) = (a^0 - a^N)/(1-a) = (1 - a^N)/(1-a). Now consider the limit as N approaches infinity of f_N(a). If the magnitude of "a" is less than 1, then the term a^N goes to zero and f(a) - 1/(1-a), |a| < 1. OK, are you with me so far? Now consider the system you proposed, H(z) = 1/(z-0.5). By the way, this system is associated with 0.5^n, not e^{j*0.5*n}. Consider the causal form of this system, h[n] = (0.5^n}*u[n]. Then the z-transform of h[n] is H(z) = \sum_{n=-\infty}^{+\infty} h[n]*z^{-n} = \sum_{n=0}^{+\infty} (0.5^n)*z^{-n} = \sum_{n=0}^{+\infty} (0.5*z^{-1})^n. Well, from the exercise we just did above, we know this converges if and only if |0.5*z^{-1}| < 1, which means |z| > 0.5 (note this is strictly greater than)! So setting |z| = 0.5 won't work, which is what you've done. If we considered the acausal form of the system, the ROC would change to |z| < 0.5 - we still wouldn't be able to put 0.5^n into this system! These are the reasons why the phenomena you observe exist. -- Randy Yates Sony Ericsson Mobile Communications Research Triangle Park, NC, USA randy.yates@sonyericsson.com, 919-472-1124
"Shafik" <shafik@u.arizona.edu> wrote in message 
news:1100761863.334077.110810@f14g2000cwb.googlegroups.com...
> Actually, forget what I just said. I was mixing up the s-plane and the > z-plane.
As long as you keep the two distinct, it appears you still have a misconception. It doesn't matter (much) what the signal is. The location of the poles and zeros tell you what the system is going to do. So, if a discrete system has a pole at +0.5, the pole is still inside the unit circle and the system is stable. Poles being inside the unit circle means that the system unit sample response decays. The further from the unit circle, the more rapid the decay. (If outside the unit circle, the more rapid the growth). If the unit sample response decays, then the system step response ends up a constant and the system response to a step sinusoid ends up a constant sinusoid. That's my simple-minded mental model. Fred