DSPRelated.com
Forums

generating stable IIR filter?

Started by mk July 14, 2006
Hi,
I am trying to generate an IIR filter from an H(s) and having
difficulty stabilizing it. The H(s) in question is documented here:
ftp://ftp.iol.unh.edu/pub/ethernet/test_suites/CL25_PMD/PMD_Test_Suite_v3.4.pdf
on page 44 equation 25.C-5. It defines a high pass system as it's two
transformers with a piece of cable in between so when the cable is
short transformers block all DC. I used the bilinear transform which
gives a second order Z transform which I used to generate a difference
equation. But the filter keeps blowing up. Any suggestions on how to
stabilize it or how to generate an IIR filter out of this system would
be very much appreciated. From my Oppenheim/Schafer I glean that it
might be difficult to do a high pass IIR using these transforms but I
am not sure how accurate that impression is.

Thanks.
mk wrote:
> Hi, > I am trying to generate an IIR filter from an H(s) and having > difficulty stabilizing it. The H(s) in question is documented here: > ftp://ftp.iol.unh.edu/pub/ethernet/test_suites/CL25_PMD/PMD_Test_Suite_v3.4.pdf > on page 44 equation 25.C-5. It defines a high pass system as it's two > transformers with a piece of cable in between so when the cable is > short transformers block all DC. I used the bilinear transform which > gives a second order Z transform which I used to generate a difference > equation. But the filter keeps blowing up. Any suggestions on how to > stabilize it or how to generate an IIR filter out of this system would > be very much appreciated. From my Oppenheim/Schafer I glean that it > might be difficult to do a high pass IIR using these transforms but I > am not sure how accurate that impression is. >
Define "Blow up". For that matter, what bilinear transformation are you using? If you're substituting 2 z - 1 s = --- ------- T z + 1 then any stable continuous-time system should result in a stable sampled-time system. It may be _wrong_, but it should be stable. I would suspect that you're either getting the bilinear transform wrong or you've got a problem in your filter implementation that's making an unstable filter out of a stable transfer function. My preferred method for generating IIR filters is to take the frequency response that I want, then fit a transfer function to it, without attempting to start from a 'prototype' in the s domain. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
mk wrote:
> Hi,
Hello yourself!
> ... a high pass system as it's two > transformers with a piece of cable in between so when the cable is > short transformers block all DC. ...
When the cable is long, transformers pass DC? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
On Fri, 14 Jul 2006 10:57:36 -0400, Jerry Avins <jya@ieee.org> wrote:

>mk wrote: >> Hi, > >Hello yourself! > >> ... a high pass system as it's two >> transformers with a piece of cable in between so when the cable is >> short transformers block all DC. ... > >When the cable is long, transformers pass DC?
Ha, ha; you think you're cute but you're not. I guess I should've said "when the cable is short, only DC is blocked without other distortion which might happen because of the cable effects" And I agree that comp.dsp is getting more rude. Why would anyone post such an inane comment without any meaningful content? And what's that "Hello yourself!" about ? Have an extra source of ! electrons?
On Fri, 14 Jul 2006 10:57:36 -0400, Jerry Avins <jya@ieee.org> wrote:

>mk wrote: >> Hi, > >Hello yourself! > >> ... a high pass system as it's two >> transformers with a piece of cable in between so when the cable is >> short transformers block all DC. ... > >When the cable is long, transformers pass DC?
Ha, ha; you think you're cute but you're not. I guess I should've said "when the cable is short, only DC is blocked without other distortion which might happen because of the cable effects" And I agree that comp.dsp is getting more rude. Why would anyone post such an inane comment without any meaningful content? And what's that "Hello yourself!" about ? Have an extra source of ! electrons?
On Fri, 14 Jul 2006 10:57:36 -0400, Jerry Avins <jya@ieee.org> wrote:

>mk wrote: >> Hi, > >Hello yourself! > >> ... a high pass system as it's two >> transformers with a piece of cable in between so when the cable is >> short transformers block all DC. ... > >When the cable is long, transformers pass DC?
Ha, ha; you think you're cute but you're not. I guess I should've said "when the cable is short, only DC is blocked without other distortion which might happen because of the cable effects" And I agree that comp.dsp is getting more rude. Why would anyone post such an inane comment without any meaningful content? And what's that "Hello yourself!" about ? Have an extra source of ! electrons?
mk wrote:
> On Fri, 14 Jul 2006 10:57:36 -0400, Jerry Avins <jya@ieee.org> wrote: > >> mk wrote: >>> Hi, >> Hello yourself! >> >>> ... a high pass system as it's two >>> transformers with a piece of cable in between so when the cable is >>> short transformers block all DC. ... >> When the cable is long, transformers pass DC? > > Ha, ha; you think you're cute but you're not. I guess I should've said > "when the cable is short, only DC is blocked without other distortion > which might happen because of the cable effects" > > And I agree that comp.dsp is getting more rude. Why would anyone post > such an inane comment without any meaningful content? And what's that > "Hello yourself!" about ? Have an extra source of ! electrons?
I can at best guess what you mean. All I really know is what you write. You wrote "when the cable is short transformers block all DC." Of course that makes no sense. It was incumbent on you to correct it, and you did. "Hello yourself" is "My hello back to you." Now that you've made it clear that what you want is a DC blocker, I have meaningful content for you R.B-J posted a very stable one here using fraction saving about a year or two ago. Google the archives for it. (He may point you to it.) Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Fri, 14 Jul 2006 14:15:00 -0400, Jerry Avins <jya@ieee.org> wrote:

>mk wrote: >> On Fri, 14 Jul 2006 10:57:36 -0400, Jerry Avins <jya@ieee.org> wrote: >> >>> mk wrote: >>>> Hi, >>> Hello yourself! >>> >>>> ... a high pass system as it's two >>>> transformers with a piece of cable in between so when the cable is >>>> short transformers block all DC. ... >>> When the cable is long, transformers pass DC? >> >> Ha, ha; you think you're cute but you're not. I guess I should've said >> "when the cable is short, only DC is blocked without other distortion >> which might happen because of the cable effects" >> >> And I agree that comp.dsp is getting more rude. Why would anyone post >> such an inane comment without any meaningful content? And what's that >> "Hello yourself!" about ? Have an extra source of ! electrons? > >I can at best guess what you mean. All I really know is what you write.
So you read through all of "I am trying to generate an IIR filter from an H(s) and having difficulty stabilizing it. The H(s) in question is documented here: ftp://ftp.iol.unh.edu/pub/ethernet/test_suites/CL25_PMD/PMD_Test_Suite_v3.4.pdf on page 44 equation 25.C-5. It defines a high pass system as it's two transformers with a piece of cable in between" and got confused by "when the cable is short transformers block all DC" ? Why did you have to guess ? Isn't "a high pass system as it's two transformers with a piece of cable in between" clear enough ? If you had to guess, couldn't you guess that "a high pass system as it's two transformers with a piece of cable in between" would also block DC when the cable is long ?
>You wrote "when the cable is short transformers block all DC." Of course >that makes no sense. It was incumbent on you to correct it, and you did. >
Granted but there is way too much information in context which shows that that's not what's meant; unless of course you're purposefully ignoring the said context.
> Now that you've made it clear that what you want is a DC blocker,
I don't want a DC blocker per se. I know about R.B-J's code. What I am trying to do is to model a given H(s). I happen to know that it is a DC blocker but I have to model the given system so that it depends on the parameters (L1, L2, Rl etc) so any DC blocker wouldn't do alas, albeit a very nice one. I think Tim's suggestion makes sense at this point.
On Fri, 14 Jul 2006 14:15:00 -0400, Jerry Avins <jya@ieee.org> wrote:

>mk wrote: >> On Fri, 14 Jul 2006 10:57:36 -0400, Jerry Avins <jya@ieee.org> wrote: >> >>> mk wrote: >>>> Hi, >>> Hello yourself! >>> >>>> ... a high pass system as it's two >>>> transformers with a piece of cable in between so when the cable is >>>> short transformers block all DC. ... >>> When the cable is long, transformers pass DC? >> >> Ha, ha; you think you're cute but you're not. I guess I should've said >> "when the cable is short, only DC is blocked without other distortion >> which might happen because of the cable effects" >> >> And I agree that comp.dsp is getting more rude. Why would anyone post >> such an inane comment without any meaningful content? And what's that >> "Hello yourself!" about ? Have an extra source of ! electrons? > >I can at best guess what you mean. All I really know is what you write.
So you read through all of "I am trying to generate an IIR filter from an H(s) and having difficulty stabilizing it. The H(s) in question is documented here: ftp://ftp.iol.unh.edu/pub/ethernet/test_suites/CL25_PMD/PMD_Test_Suite_v3.4.pdf on page 44 equation 25.C-5. It defines a high pass system as it's two transformers with a piece of cable in between" and got confused by "when the cable is short transformers block all DC" ? Why did you have to guess ? Isn't "a high pass system as it's two transformers with a piece of cable in between" clear enough ? If you had to guess, couldn't you guess that "a high pass system as it's two transformers with a piece of cable in between" would also block DC when the cable is long ?
>You wrote "when the cable is short transformers block all DC." Of course >that makes no sense. It was incumbent on you to correct it, and you did. >
Granted but there is way too much information in context which shows that that's not what's meant; unless of course you're purposefully ignoring the said context.
> Now that you've made it clear that what you want is a DC blocker,
I don't want a DC blocker per se. I know about R.B-J's code. What I am trying to do is to model a given H(s). I happen to know that it is a DC blocker but I have to model the given system so that it depends on the parameters (L1, L2, Rl etc) so any DC blocker wouldn't do alas, albeit a very nice one. I think Tim's suggestion makes sense at this point.
mk <kal*@dspia.*comdelete> wrote in
news:s9ofb2hq44se9694r6daqp0r34539h7s91@4ax.com: 

> On Fri, 14 Jul 2006 14:15:00 -0400, Jerry Avins <jya@ieee.org> wrote: > >>mk wrote: >>> On Fri, 14 Jul 2006 10:57:36 -0400, Jerry Avins <jya@ieee.org> >>> wrote: >>> >>>> mk wrote: >>>>> Hi, >>>> Hello yourself! >>>> >>>>> ... a high pass system as it's two >>>>> transformers with a piece of cable in between so when the cable is >>>>> short transformers block all DC. ... >>>> When the cable is long, transformers pass DC? >>> >>> Ha, ha; you think you're cute but you're not. I guess I should've >>> said "when the cable is short, only DC is blocked without other >>> distortion which might happen because of the cable effects" >>> >>> And I agree that comp.dsp is getting more rude. Why would anyone >>> post such an inane comment without any meaningful content? And >>> what's that "Hello yourself!" about ? Have an extra source of ! >>> electrons? >> >>I can at best guess what you mean. All I really know is what you >>write. > > So you read through all of > "I am trying to generate an IIR filter from an H(s) and having > difficulty stabilizing it. The H(s) in question is documented here: > ftp://ftp.iol.unh.edu/pub/ethernet/test_suites/CL25_PMD/PMD_Test_Suite_ > v3.4.pdf on page 44 equation 25.C-5. It defines a high pass system as > it's two transformers with a piece of cable in between" > and got confused by "when the cable is short transformers block all > DC" ? > Why did you have to guess ? Isn't "a high pass system as it's two > transformers with a piece of cable in between" clear enough ? If you > had to guess, couldn't you guess that "a high pass system as it's two > transformers with a piece of cable in between" would also block DC > when the cable is long ? > >>You wrote "when the cable is short transformers block all DC." Of >>course that makes no sense. It was incumbent on you to correct it, and >>you did. >> > Granted but there is way too much information in context which shows > that that's not what's meant; unless of course you're purposefully > ignoring the said context. > >> Now that you've made it clear that what you want is a DC blocker, > > I don't want a DC blocker per se. I know about R.B-J's code. What I am > trying to do is to model a given H(s). I happen to know that it is a > DC blocker but I have to model the given system so that it depends on > the parameters (L1, L2, Rl etc) so any DC blocker wouldn't do alas, > albeit a very nice one. > > I think Tim's suggestion makes sense at this point. >
A common problem with IIR filters is that they often require very accurate math precision. This is particularly true when the sample rate is high as compared to the desired filter corner frequencies and Q. You may have poles very close to the unit circle. Filter topology and greater precision may be needed. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com