PDA

View Full Version : Deriving IIR coefficients for exponential


axlq
10-06-2004, 06:34 AM
All right, I've learned a lot from this group in the past
couple of months. Starting from almost zero knowledge of
DSP, I learned how to derive digitial IIR filter coefficients
from any arbitrary all-pole polynomial filter. I have a
layman's understanding of s-plane and z-plane. I published
the solution for generalized all-pole filter coefficients at
http://unicorn.us.com/alex/allpolefilters.html for any other newbie
who needs help.

Now, suppose my transfer function for a lowpass filter isn't a ratio
of polynomials at all, but rather an exponential function like this:

H(s) = exp(-a * s^b)

What would you call this? A no-pole filter?

I can't very well do a bilinear transformation on it, to express it
in the Z plane. Or maybe I can, if I approximate it by a Taylor
Series polynomial -- but I suspect that's the wrong approach. Maybe
I don't have to convert to Z plane at all?

Can anyone offer this newbie guidance (or a solution) on how to
determine the corresponding digitial IIR filter coefficients for
this thing?

Thanks.
-Alex

Rune Allnor
10-06-2004, 12:44 PM
[email protected] (axlq) wrote in message news:<[email protected]>...
> All right, I've learned a lot from this group in the past
> couple of months. Starting from almost zero knowledge of
> DSP, I learned how to derive digitial IIR filter coefficients
> from any arbitrary all-pole polynomial filter. I have a
> layman's understanding of s-plane and z-plane. I published
> the solution for generalized all-pole filter coefficients at
> http://unicorn.us.com/alex/allpolefilters.html for any other newbie
> who needs help.
>
> Now, suppose my transfer function for a lowpass filter isn't a ratio
> of polynomials at all, but rather an exponential function like this:
>
> H(s) = exp(-a * s^b)
>
> What would you call this? A no-pole filter?

Nope. It's a non-rational (irrational?) transfer function. Rational
functions are fractions of finite-order polynomials, just the same way
that rational numbers are fractions of integers.

So, what you have here is a H(s) that is analytic in the sense that
a Laurent series exists and converges. The down-side is that the
Laurent series is infinitely long, which, in turn, means that the
RLC network needed to implement this H(s) comprises infinitely many
components. If you specified the function as H(z) in the complex
z domain, the difference equation would need infinitely many
coefficients. Very cumbersome to work with, in other words.

> I can't very well do a bilinear transformation on it, to express it
> in the Z plane.

Neither can I...

> Or maybe I can, if I approximate it by a Taylor
> Series polynomial -- but I suspect that's the wrong approach.

Homework? It's a good question, though, and I suspect you are touching
at the correct answer: You need the system to be of finite order
in any practical applications. I'd go for a finite-order approximation,
i.e. express the exp function as an infinite series and truncate
it after a 'suitable' number of terms.

> Maybe
> I don't have to convert to Z plane at all?

If you are going to use the thing in a discrete-time application,
you have to. An alternative to the bilinear transform is to compute
the time-domain impulse response and use the impulse invariance method.
Perhaps a roundabout way, although not quite as cumbersome as the
bilinear tranform (it's not easy to generate an IIR filter from a
time-domain response, though), but you end up in the z plane no
matter what.

> Can anyone offer this newbie guidance (or a solution) on how to
> determine the corresponding digitial IIR filter coefficients for
> this thing?

Sorry, no. Filters of infinite order are not quite my cup of tea.
If this really is homework, it's just the kind of thing I'd be
very happy to give to my own students... < diabolic grin >

Rune

axlq
10-06-2004, 10:04 PM
In article <[email protected]>,
Rune Allnor <[email protected]> wrote:
>[email protected] (axlq) wrote in message news:<[email protected]>...
>> Now, suppose my transfer function for a lowpass filter isn't a ratio
>> of polynomials at all, but rather an exponential function like this:
>>
>> H(s) = exp(-a * s^b)

>... what you have here is a H(s) that is analytic in the sense that
>a Laurent series exists and converges. The down-side is that the
>Laurent series is infinitely long, which, in turn, means that the
>RLC network needed to implement this H(s) comprises infinitely many
>components. If you specified the function as H(z) in the complex
>z domain, the difference equation would need infinitely many
>coefficients. Very cumbersome to work with, in other words.

Hm. I thought what I described above could be considered a
"gaussian filter" of sorts. And I thought that gaussian filters
have a finite number of coefficients. Maybe if I knew how to derive
THOSE, my curiosity would be satisfied.

>Homework?

I'm not in school. I got my physics degree back in 1983, and an MBA
in 1992. This problem isn't even related to my day job, although
potentially it could be (I work for a defense company). My interest
in digital filters arose from my personal exploration of technical
analysis of financial markets; however, my current question isn't
even related to that. I posted my question because I'm curious
about about something I cannot solve by myself. This newsgroup
was a great help in helping me understand how to derive rational
function polynomial filters. I thought perhaps I could get some
further understanding of this different problem, for which Google
searching has been no help.

>It's a good question, though, and I suspect you are touching
>at the correct answer: You need the system to be of finite order
>in any practical applications. I'd go for a finite-order approximation,
>i.e. express the exp function as an infinite series and truncate
>it after a 'suitable' number of terms.

Isn't the transfer function of a gaussian filter similar? Something
like this: H(s) = g * exp(-a * s^2)

My own version above simply generalizes s^2 to s^b. If there's
something about s^2 that makes it special and finite, how are the
digital filter coefficients derived?

>> Can anyone offer this newbie guidance (or a solution) on how to
>> determine the corresponding digitial IIR filter coefficients for
>> this thing?
>
>Sorry, no. Filters of infinite order are not quite my cup of tea.
>If this really is homework, it's just the kind of thing I'd be
>very happy to give to my own students... < diabolic grin >

Heh. If you would do that, would you share the best or most amusing
answers here?

When *I* was in school, we didn't learn anything about digital
filtering. As I implied in my earlier article, pretty much
everything I learned about digital filters came from this newsgroup
and related articles.

-Alex

Richard Owlett
10-06-2004, 10:09 PM
axlq wrote:

> In article <[email protected]>,
> Rune Allnor <[email protected]> wrote:
>
>>[email protected] (axlq) wrote in message news:<[email protected]>...
>>
>>>Now, suppose my transfer function for a lowpass filter isn't a ratio
>>>of polynomials at all, but rather an exponential function like this:
>>>
>>> H(s) = exp(-a * s^b)
>
>
>>... what you have here is a H(s) that is analytic in the sense that
>>a Laurent series exists and converges. The down-side is that the
>>Laurent series is infinitely long, which, in turn, means that the
>>RLC network needed to implement this H(s) comprises infinitely many
>>components. If you specified the function as H(z) in the complex
>>z domain, the difference equation would need infinitely many
>>coefficients. Very cumbersome to work with, in other words.
>
>
> Hm. I thought what I described above could be considered a
> "gaussian filter" of sorts. And I thought that gaussian filters
> have a finite number of coefficients. Maybe if I knew how to derive
> THOSE, my curiosity would be satisfied.
>
>
>>Homework?
>
>
> I'm not in school. I got my physics degree back in 1983, and an MBA
> in 1992. This problem isn't even related to my day job, although
> potentially it could be (I work for a defense company). My interest
> in digital filters arose from my personal exploration of technical
> analysis of financial markets; however, my current question isn't
> even related to that. I posted my question because I'm curious
> about about something I cannot solve by myself. This newsgroup
> was a great help in helping me understand how to derive rational
> function polynomial filters. I thought perhaps I could get some
> further understanding of this different problem, for which Google
> searching has been no help.
>
>
>>It's a good question, though, and I suspect you are touching
>>at the correct answer: You need the system to be of finite order
>>in any practical applications. I'd go for a finite-order approximation,
>>i.e. express the exp function as an infinite series and truncate
>>it after a 'suitable' number of terms.
>
>
> Isn't the transfer function of a gaussian filter similar? Something
> like this: H(s) = g * exp(-a * s^2)
>
> My own version above simply generalizes s^2 to s^b. If there's
> something about s^2 that makes it special and finite, how are the
> digital filter coefficients derived?
>
>
>>>Can anyone offer this newbie guidance (or a solution) on how to
>>>determine the corresponding digitial IIR filter coefficients for
>>>this thing?
>>
>>Sorry, no. Filters of infinite order are not quite my cup of tea.
>>If this really is homework, it's just the kind of thing I'd be
>>very happy to give to my own students... < diabolic grin >
>
>
> Heh. If you would do that, would you share the best or most amusing
> answers here?
>
> When *I* was in school, we didn't learn anything about digital
> filtering. As I implied in my earlier article, pretty much
> everything I learned about digital filters came from this newsgroup
> and related articles.
>
> -Alex

please join my thread titled "What constitutes a "homework" question?"

Jerry Avins
10-06-2004, 10:21 PM
Richard Owlett wrote:

...

> please join my thread titled "What constitutes a "homework" question?"

Maybe "assigned for class" is the description most of us have in mind.

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Rune Allnor
10-07-2004, 06:56 AM
[email protected] (axlq) wrote in message news:<[email protected]>...
> In article <[email protected]>,
> Rune Allnor <[email protected]> wrote:
> >[email protected] (axlq) wrote in message news:<[email protected]>...
> >> Now, suppose my transfer function for a lowpass filter isn't a ratio
> >> of polynomials at all, but rather an exponential function like this:
> >>
> >> H(s) = exp(-a * s^b)
>
> >... what you have here is a H(s) that is analytic in the sense that
> >a Laurent series exists and converges. The down-side is that the
> >Laurent series is infinitely long, which, in turn, means that the
> >RLC network needed to implement this H(s) comprises infinitely many
> >components. If you specified the function as H(z) in the complex
> >z domain, the difference equation would need infinitely many
> >coefficients. Very cumbersome to work with, in other words.
>
> Hm. I thought what I described above could be considered a
> "gaussian filter" of sorts. And I thought that gaussian filters
> have a finite number of coefficients. Maybe if I knew how to derive
> THOSE, my curiosity would be satisfied.

Gaussian filters would be designed as truncated Gauss curves (i.e. they
are of finite length), and would be implemented as FIR filters.

> >Homework?
>
> I'm not in school. I got my physics degree back in 1983, and an MBA
> in 1992. This problem isn't even related to my day job, although
> potentially it could be (I work for a defense company). My interest
> in digital filters arose from my personal exploration of technical
> analysis of financial markets; however, my current question isn't
> even related to that. I posted my question because I'm curious
> about about something I cannot solve by myself. This newsgroup
> was a great help in helping me understand how to derive rational
> function polynomial filters. I thought perhaps I could get some
> further understanding of this different problem, for which Google
> searching has been no help.

Linear system analysis deals almost exclusively with systems of
rational transfer functions. The reasons are that the representations
are of finite order. One usually prefers a finite-order approximation
to the desired response, than an infinite-order exact response. The
reason is that systems of infinite order are cumbersome to work with.

This does not necessarily mean that no one have analyzed infinite-order
systems. It means that such analyses (if they have ever been done) would
be hard to find. I have never seen such an analaysis, and I have never
heard or seen it mentioned anywhere, that such analyses have ben done,
or are even possible. On the other hand, I'm not omniscient.

> >It's a good question, though, and I suspect you are touching
> >at the correct answer: You need the system to be of finite order
> >in any practical applications. I'd go for a finite-order approximation,
> >i.e. express the exp function as an infinite series and truncate
> >it after a 'suitable' number of terms.
>
> Isn't the transfer function of a gaussian filter similar? Something
> like this: H(s) = g * exp(-a * s^2)
>
> My own version above simply generalizes s^2 to s^b. If there's
> something about s^2 that makes it special and finite, how are the
> digital filter coefficients derived?

One usually uses finite-order FIR approximations, as commented above.

Rune

axlq
10-08-2004, 05:00 AM
In article <[email protected]>,
Rune Allnor <[email protected]> wrote:
>Gaussian filters would be designed as truncated Gauss curves (i.e. they
>are of finite length), and would be implemented as FIR filters.

Yes, the only implementation I had ever seen was FIR. I could swear
I saw a reference to an IIR Gaussian however. After failing to
figure it out, I thought maybe someone else had, so I thought I'd
ask.

I guess the only practical way to do it is to approximate the
gaussian function by a polynomial.

Thanks for the explanation. As always, I learn new things here.

-Alex

Rune Allnor
10-08-2004, 10:53 AM
[email protected] (axlq) wrote in message news:<[email protected]>...
> In article <[email protected]>,
> Rune Allnor <[email protected]> wrote:
> >Gaussian filters would be designed as truncated Gauss curves (i.e. they
> >are of finite length), and would be implemented as FIR filters.
>
> Yes, the only implementation I had ever seen was FIR. I could swear
> I saw a reference to an IIR Gaussian however. After failing to
> figure it out, I thought maybe someone else had, so I thought I'd
> ask.

Well, the adjective "Gaussian" appears all over the place ("Gaussian
filter", "Gaussian signal", "Gaussian PDF",...), so it's no wonder
one some times have a hard time figuring out what's going on.

Rune

Clay Turner
10-08-2004, 04:39 PM
Hello Alex,

You can split the impulse response into two sequences whee one is causal and
the other is anticausal.

See the paper "Recursive Gaussian Derivative Filters" by van Vliet and
Verbeek. They also cover the design of Gaussian filters.

http://www.ph.tn.tudelft.nl/People/lucas/publications/1998/ICPR98LVTYPV/ICPR98LVTYPV.pdf

Clay



"axlq" <[email protected]> wrote in message
news:[email protected]...
> In article <[email protected]>,
> Rune Allnor <[email protected]> wrote:
> >Gaussian filters would be designed as truncated Gauss curves (i.e. they
> >are of finite length), and would be implemented as FIR filters.
>
> Yes, the only implementation I had ever seen was FIR. I could swear
> I saw a reference to an IIR Gaussian however. After failing to
> figure it out, I thought maybe someone else had, so I thought I'd
> ask.
>
> I guess the only practical way to do it is to approximate the
> gaussian function by a polynomial.
>
> Thanks for the explanation. As always, I learn new things here.
>
> -Alex