[Spuc-users] all pole filter implementation
Brought to you by:
spuc
|
From: Sergini K. <ser...@gm...> - 2013-06-12 13:31:55
|
Hello,
I'm sorry to bother here but I didn't find another option to get some help.
I would like to get some advice about the I should code an all-pole filter
using the *iir_df* class.
Here is the type of transfer function I would like to create:
(H(z) = 1 / (1 - a1*z[n-1] - a2*z[n-2] - ... - aN*z[n-N]) )
Here is what I've done so far:
* for (int i=0; i<block_size; i++) {
SPUC::iir_df<float>
synth_filt(pcoeffs,
order,
*
* zcoeffs,
*
* 1);
for (int k=0; k<block_size; k++) {
output[k] =
gain*synth_filt.update(input[k]);
}
}*
You should note that to avoid using files to define my filter's poles and
zeros I added a constructor to the *iir_df* class.
I've checked my constructor already. It's working just fine however my *
output* values are way to big in comparison of the input values.
Am I doing a "input---->FILTER---->output" process with this code? Am I
using the right functions for that?
Some modifications or a simple example of what I should be great of you!
Thanks
|