Control smoothing LPF

Algorithm development and general DSP issues

Moderator: frank

Post Reply
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Control smoothing LPF

Post by Digital Larry »

I am pretty sure that from a point of theoretical DSP purity, low pass filters built using the "RDFX" instruction would generally be of the form:

Code: Select all

RDFX 33,factor
WRAX 33,(1 - factor)
However, in most supplied Spin examples, since factor is much smaller than 1 for many cases, (1 - factor) is simply replaced by 1.0. I'm sure the response is not very far off. But why not make it correct?
frank
Posts: 1244
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank »

Because where you have the (1-factor) is not actually part of the filter, it is to write the result to a register and keep the result in the acc.

Edit: To expand on this, RDFX is basically executing:
Y(n) = (X(n) - (Y(n-1))*C + Y(n-1)
which has no DC gain because if X(n) is a constant then Y(n) -> X(n)
Frank Thomson
Experimental Noize
Digital Larry
Posts: 338
Joined: Mon Nov 12, 2012 1:12 pm
Contact:

Post by Digital Larry »

Ah-ha! I think I get it. I'll have to let it ferment for awhile 8^).

Thanks!
Post Reply