From: Patrick Noffke <patrick.noffke@gmail.com>
Subject: Re: RFC: Generic Fixed-Point IIR Filter
Date: Thu, 26 Mar 2015 14:30:07 -0700 (PDT)
Date: 2015-03-26T14:30:07-07:00 [thread overview]
Message-ID: <3c1e4e95-f9d1-4d1f-950e-197278b6960e@googlegroups.com> (raw)
In-Reply-To: <mf1snt$3j6$1@loke.gir.dk>
On Thursday, March 26, 2015 at 4:12:30 PM UTC-5, Randy Brukardt wrote:
> Right. The rule specifically does not allow something like:
> A * B * C
Ah, okay.
If I change the calculation to
Filter.Y (1) := Filter.B (1) * Filter.X (1) +
Filter.B (2) * Filter.X (2) +
Filter.B (3) * Filter.X (3) -
Filter.A (2) * Filter.Y (2) -
Filter.A (3) * Filter.Y (3);
Filter.Y (1) := Filter.Y (1) / Filter.A (1);
Then it compiles. So it didn't like me doing the division with a universal_fixed product as the numerator.
In my case, A(1) is 1.0, but that is not always the case, so there could still be overflow. I suppose I could change this to a Normalized_IIR_Filter (implying A(1) is 1.0).
Thanks for your help.
Patrick
next prev parent reply other threads:[~2015-03-26 21:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 16:25 RFC: Generic Fixed-Point IIR Filter Patrick Noffke
2015-03-26 17:05 ` Dmitry A. Kazakov
2015-03-26 17:41 ` Jeffrey Carter
2015-03-26 19:44 ` Patrick Noffke
2015-03-26 20:34 ` Randy Brukardt
2015-03-26 20:39 ` Jeffrey Carter
2015-03-26 21:12 ` Randy Brukardt
2015-03-26 21:30 ` Patrick Noffke [this message]
2015-03-26 22:02 ` Jeffrey Carter
2015-03-27 12:17 ` G.B.
2015-03-26 21:17 ` Patrick Noffke
2015-03-26 20:37 ` Jeffrey Carter
2015-03-27 11:37 ` Brian Drummond
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox