Comb filter implementation.
Hi All,
I'm new to SigmaStudio and I'm trying to implement the following algorithm (comb filter). I have no problems with y(n) = x(n) – x(n - Nf) but when I try to add the 'alpha' term I get an error 'illegal feedback'. Sampling frequency is 48k and Nf is 800. Alpha must be less than 1.
y(n) = x(n) – x(n - Nf) + alpha*y(n – Nf)
Any input would be appreciated.
Best regards,
Bob
Hi Bob,
Welcome to the SigmaDSP community.
In order to route a signal back to an earlier point in the flow (for example, like the feedback in most digital filters), you need to use a feedback cell. This acts as a kind of compiler directive that will prevent the compiler from flagging a feedback error.
You can find the feedback cell in the library here:
Here's an example of the feedback cell used in practice:
This is an implementation of this simple recursive filter:
A clarification: The feedback block includes a built-in delay of one sample. That's how it works. Thus, if for example a comb filter needs a N-sample delay, make the explicit delay (N-1) samples. When only a one-sample delay is needed, the feedback block itself provides it.
The feedback block has many interesting uses besides making nonstandard recursive filters. Many of these involve slow moving signals where the feedback block's one-sample delay may be safely ignored. Yet it's always present.
Please log in to reply.





