DSPRelated.com
Forums

An IIR filter gain questio

Started by Rick Lyons May 13, 2006
On 13 May 2006 22:47:55 -0700, "robert bristow-johnson"
<rbj@audioimagination.com> wrote:

>i think the feedforward gain of 1/Gb needs to be changed to just "Gb" >as so: > > x --->(+)---Gb--->------Gf*b0--->(+)---> y > ^ | ^ > | [z^-1] | > | | | > (+)<--a1/Gb--+----Gf*b1--->(+) > ^ | ^ > | [z^-1] | > | | | > +---a2/Gb---+----Gf*b2-----+
Interesting. Bob, if I extract the causal difference equation from your diagram, I get: y(n) = Gb[Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)]+a1y(n-1)+a2y(n-2) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) If I do the same for the equation form that I used in my earlier posting, -1 -2 b + b z + b z Y(z) Gf 0 1 2 ---- = ---- * ---------------- U(z) 1/Gb -1 -2 1 + a z + a z 1 2 I get: y(n)/Gb = Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)+[a1/Gb]y(n-1)+[a2/Gb]y(n-2) = Gf[b0x(n)+b1x(n-1)+b2x(n-2)]+[1/Gb][a1y(n-1)+a2y(n-2)] I hadn't realized it without a detailed look, but the output y(n) from your method IS the scaled value. The output y(n)/Gb from my method needs to be multiplied by Gb before it yields the scaled value: y(n) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) They are mathematically equivalent, but mine requires an additional step before it comes up with the desired answer. Nice catch. Greg
On 13 May 2006 22:47:55 -0700, "robert bristow-johnson"
<rbj@audioimagination.com> wrote:

>i think the feedforward gain of 1/Gb needs to be changed to just "Gb" >as so: > > x --->(+)---Gb--->------Gf*b0--->(+)---> y > ^ | ^ > | [z^-1] | > | | | > (+)<--a1/Gb--+----Gf*b1--->(+) > ^ | ^ > | [z^-1] | > | | | > +---a2/Gb---+----Gf*b2-----+
Interesting. Bob, if I extract the causal difference equation from your diagram, I get: y(n) = Gb[Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)]+a1y(n-1)+a2y(n-2) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) If I do the same for the equation form that I used in my earlier posting, -1 -2 b + b z + b z Y(z) Gf 0 1 2 ---- = ---- * ---------------- U(z) 1/Gb -1 -2 1 + a z + a z 1 2 I get: y(n)/Gb = Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)+[a1/Gb]y(n-1)+[a2/Gb]y(n-2) = Gf[b0x(n)+b1x(n-1)+b2x(n-2)]+[1/Gb][a1y(n-1)+a2y(n-2)] I hadn't realized it without a detailed look, but the output y(n) from your method IS the scaled value. The output y(n)/Gb from my method needs to be multiplied by Gb before it yields the scaled value: y(n) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) They are mathematically equivalent, but mine requires an additional step before it comes up with the desired answer. Nice catch. Greg
On 13 May 2006 22:47:55 -0700, "robert bristow-johnson"
<rbj@audioimagination.com> wrote:

>i think the feedforward gain of 1/Gb needs to be changed to just "Gb" >as so: > > x --->(+)---Gb--->------Gf*b0--->(+)---> y > ^ | ^ > | [z^-1] | > | | | > (+)<--a1/Gb--+----Gf*b1--->(+) > ^ | ^ > | [z^-1] | > | | | > +---a2/Gb---+----Gf*b2-----+
Interesting. Bob, if I extract the causal difference equation from your diagram, I get: y(n) = Gb[Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)]+a1y(n-1)+a2y(n-2) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) If I do the same for the equation form that I used in my earlier posting, -1 -2 b + b z + b z Y(z) Gf 0 1 2 ---- = ---- * ---------------- U(z) 1/Gb -1 -2 1 + a z + a z 1 2 I get: y(n)/Gb = Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)+[a1/Gb]y(n-1)+[a2/Gb]y(n-2) = Gf[b0x(n)+b1x(n-1)+b2x(n-2)]+[1/Gb][a1y(n-1)+a2y(n-2)] I hadn't realized it without a detailed look, but the output y(n) from your method IS the scaled value. The output y(n)/Gb from my method needs to be multiplied by Gb before it yields the scaled value: y(n) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) They are mathematically equivalent, but mine requires an additional step before it comes up with the desired answer. Nice catch. Greg
On 13 May 2006 22:47:55 -0700, "robert bristow-johnson"
<rbj@audioimagination.com> wrote:

>i think the feedforward gain of 1/Gb needs to be changed to just "Gb" >as so: > > x --->(+)---Gb--->------Gf*b0--->(+)---> y > ^ | ^ > | [z^-1] | > | | | > (+)<--a1/Gb--+----Gf*b1--->(+) > ^ | ^ > | [z^-1] | > | | | > +---a2/Gb---+----Gf*b2-----+
Interesting. Bob, if I extract the causal difference equation from your diagram, I get: y(n) = Gb[Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)]+a1y(n-1)+a2y(n-2) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) If I do the same for the equation form that I used in my earlier posting, -1 -2 b + b z + b z Y(z) Gf 0 1 2 ---- = ---- * ---------------- U(z) 1/Gb -1 -2 1 + a z + a z 1 2 I get: y(n)/Gb = Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)+[a1/Gb]y(n-1)+[a2/Gb]y(n-2) = Gf[b0x(n)+b1x(n-1)+b2x(n-2)]+[1/Gb][a1y(n-1)+a2y(n-2)] I hadn't realized it without a detailed look, but the output y(n) from your method IS the scaled value. The output y(n)/Gb from my method needs to be multiplied by Gb before it yields the scaled value: y(n) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) They are mathematically equivalent, but mine requires an additional step before it comes up with the desired answer. Nice catch. Greg
in article ggke62hdescefdbhi4bidmagvaog15i06f@4ax.com, Greg Berchin at
76145.2455@compuswerve.com wrote on 05/14/2006 12:10:

> On 13 May 2006 22:47:55 -0700, "robert bristow-johnson" > <rbj@audioimagination.com> wrote: > > >i think the feedforward gain of 1/Gb needs to be changed to just "Gb" > >as so: > > > > x --->(+)---Gb--->------Gf*b0--->(+)---> y > > ^ | ^ > > | [z^-1] | > > | | | > > (+)<--a1/Gb--+----Gf*b1--->(+) > > ^ | ^ > > | [z^-1] | > > | | | > > +---a2/Gb---+----Gf*b2-----+ > > Interesting. Bob, if I extract the causal difference equation from your > diagram, I get: > > y(n) = Gb[Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)]+a1y(n-1)+a2y(n-2) > > = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2)
that's, of course presuming the feedback signals, a1/Gb*y[n-1] & a2/Gb*y[n-2], get subtracted from "x" and not added to "x", but i'm making no issue of that, just dotting eyes. but, in either case, you can't get that from Rick's original:
> > x --->(+)--1/Gb-->------Gf*b0--->(+)---> y > ^ | ^ > | [z^-1] | > | | | > (+)<--a1/Gb--+----Gf*b1--->(+) > ^ | ^ > | [z^-1] | > | | | > +---a2/Gb---+----Gf*b2-----+ >
because Gb = 1/Gb only if |Gb| = 1.
> If I do the same for the equation form that I used in my earlier > posting, > -1 -2 > b + b z + b z > Y(z) Gf 0 1 2 > ---- = ---- * ---------------- > U(z) 1/Gb -1 -2 > 1 + a z + a z > 1 2 > I get: > > y(n)/Gb = Gfb0x(n)+Gfb1x(n-1)+Gfb2x(n-2)+[a1/Gb]y(n-1)+[a2/Gb]y(n-2) > > = Gf[b0x(n)+b1x(n-1)+b2x(n-2)]+[1/Gb][a1y(n-1)+a2y(n-2)] > > I hadn't realized it without a detailed look, but the output y(n) from > your method IS the scaled value. The output y(n)/Gb from my method > needs to be multiplied by Gb before it yields the scaled value: > > y(n) = GbGf[b0x(n)+b1x(n-1)+b2x(n-2)]+a1y(n-1)+a2y(n-2) > > They are mathematically equivalent,
it can't be quite equivalent. Gb ain't usually the same as 1/Gb.
> Nice catch.
IIR's R US. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Sun, 14 May 2006 19:19:10 GMT, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>but, in either case, you can't get that from Rick's original: > >> >> x --->(+)--1/Gb-->------Gf*b0--->(+)---> y >> ^ | ^ >> | [z^-1] | >> | | | >> (+)<--a1/Gb--+----Gf*b1--->(+) >> ^ | ^ >> | [z^-1] | >> | | | >> +---a2/Gb---+----Gf*b2-----+ >> > >because Gb = 1/Gb only if |Gb| = 1.
Man, you have sharp eyes. I didn't even notice the discrepancy. I was using this: x --->(+)-------->------Gf*b0--->(+)---> y ^ | ^ | [z^-1] | | | | (+)<--a1/Gb--+----Gf*b1--->(+) ^ | ^ | [z^-1] | | | | +---a2/Gb---+----Gf*b2-----+
>IIR's R US.
Touche. Greg
in article ov1f625k78bsbncnb49fdtfduj7ftla1ki@4ax.com, Greg Berchin at
76145.2455@compuswerve.com wrote on 05/14/2006 15:46:

> On Sun, 14 May 2006 19:19:10 GMT, robert bristow-johnson > <rbj@audioimagination.com> wrote: > >> but, in either case, you can't get that from Rick's original: >> >>> >>> x --->(+)--1/Gb-->------Gf*b0--->(+)---> y >>> ^ | ^ >>> | [z^-1] | >>> | | | >>> (+)<--a1/Gb--+----Gf*b1--->(+) >>> ^ | ^ >>> | [z^-1] | >>> | | | >>> +---a2/Gb---+----Gf*b2-----+ >>> >> >> because Gb = 1/Gb only if |Gb| = 1. > > Man, you have sharp eyes.
not any more. Greg, i used to have 20/15 and 20/10 vision. (i think even when we first knew each other in 94.) recently i rolled the odometer over to the next decade, i have a metallic object in my LAD artery, i eat a statin drug every day, have a tiny bottle of nitro tablets, and i can't read those tiny little street names on maps (or even the lettering on that tiny little nitro bottle) or any other really fine print unless the print and contrast is really sharp. i've become far-sighted like my dad was (but at a much later age, as far as i remember, my dad always wore glasses). i will soon have to get reading glasses. never thought the day would come. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Sun, 14 May 2006 20:52:40 GMT, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>> Man, you have sharp eyes. > >not any more.
Sorry to hear that, Bob. Well, then take solace in the fact that you still have a sharp mind. This getting-old stuff is for the birds. Greg
Greg Berchin wrote:
> On Sun, 14 May 2006 20:52:40 GMT, robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >> Man, you have sharp eyes. > > > >not any more. > > Sorry to hear that, Bob.
i'm okay, just taking an opportunity to bitch.
> Well, then take solace in the fact that you > still have a sharp mind.
dunno about that either.
> This getting-old stuff is for the birds.
ya know about 18 years ago, Phyllis's grandma kept saying that while she was in nursing care. she was 90+. i didn't know that it was a "saying" or a clich=E9, just thought it was hers. my dad always used to say that "hindsight is 20-20 vision" and. not hearing it from another source, i had thought it was his quote and thought it was pretty clever. nowadays with Google, you can always check. in CB-speak, "what's your 20", Greg? i think last i heard it was Chicagoland. you're not in MN anymore, i thunk. if someone puts together another comp.dsp conference, i'm gonna have to make it to that one, and will have fewer excuses to miss it. r b-j
On Sun, 14 May 2006 20:52:40 GMT, robert bristow-johnson
<rbj@audioimagination.com> wrote:

  (snipped)
>> >> Man, you have sharp eyes. > >not any more. Greg, i used to have 20/15 and 20/10 vision. (i think even >when we first knew each other in 94.) recently i rolled the odometer over >to the next decade, i have a metallic object in my LAD artery, i eat a >statin drug every day, have a tiny bottle of nitro tablets, and i can't read >those tiny little street names on maps (or even the lettering on that tiny >little nitro bottle) or any other really fine print unless the print and >contrast is really sharp. i've become far-sighted like my dad was (but at a >much later age, as far as i remember, my dad always wore glasses). i will >soon have to get reading glasses. never thought the day would come. >>-- >r b-j rbj@audioimagination.com
Well, ... sorry to hear about those physical problems. I guess I don't feel so bad now knowing I'm not the only one who's fallin' apart. I can't see street signs while I'm driving at night, I haven't stopped by my ex-wife's place to provide any "special service" for many months, & I'm doomed forever to take four metformin tablets every stinkin' day. Actress Betty Davis said it many years ago, "Old age ain't for sissies." Good Hell, she was NOT jokin'. See Ya, [-Rick-]