0
$\begingroup$

i got an IIR filter bu I have only the coefficients. now i'd like to be able to change the filter characteristics of the low pass filter (the "cutoff" frequency) but all i got are a and b coefficients. i'd like to be able to set a multiplier that will "scale" the filter by that amount. if i set the multiplier to 0.5 i'd like to filter the same but two times lower or two times slower (50 Hz cutoff instead of 100Hz)

is it possible ? Or is it a lost cause ? and with Matlab ?

thanks so much

Jeff

$\endgroup$
8
  • 1
    $\begingroup$ you should be more complete about what your low-pass filter is. what order is it? IIR? can you show us the transfer function or the difference equation? $\endgroup$ Jun 27, 2020 at 14:22
  • 1
    $\begingroup$ If you are simply trying to scale the filter proportionally, you can do this by resampling the coefficients accordingly. (So for your example of 50 Hz cutoff instead of 100 Hz, if you mean you want to scale the entire filter by that factor of 1/2, then you can interpolate the coefficients by 2 using standard interpolation techniques. For example insert 0's and do 2 pt moving averages to get the new coefficients. $\endgroup$ Jun 27, 2020 at 15:08
  • 1
    $\begingroup$ @Jeff yes it is just reverse from my first comment I deleted-- To scale the filter response in half, interpolate x2 (since you are not actually changing the sampling rate, so the response will scale accordingly) $\endgroup$ Jun 27, 2020 at 15:09
  • 1
    $\begingroup$ One numerator coefficient has no frequency effect (it is a constant gain) so that would not change. $\endgroup$ Jun 27, 2020 at 15:10
  • 1
    $\begingroup$ This is very clear to me for the case of an FIR filter, and I believe it would apply to an IIR but I am not 100% confident. If you try this, please confirm back if it did work (or not). It's just a polynomial that is sampled in either case, so I don't see why that wouldn't work, but haven't done this myself for an IIR so giving my hesitation of confidence. $\endgroup$ Jun 27, 2020 at 15:11

1 Answer 1

1
$\begingroup$

Your probably your best option here is "frequency warping". You can calculate the poles and zeros from the coefficients, warp the poles and zeros and then recalculate the coefficients again.

Warping is a procedure the applies a conformal mapping to the poles/zeros. Specifically a conformal mapping that maps the unit circle onto itself will maintain the overall shape of the filter but either bunch it up or stretch in the low frequencies (and vice versa in the high frequencies). A good choice is a first order allpass filter, that indeed maps the unit circle onto itself.

Loosely speaking you replace all delays in your filter with a first order all pass filter and recalculate the poles and zeros. That takes a bit of math to work out the details, but the actual code would be quite efficient.

$\endgroup$
1
  • $\begingroup$ thank you very much $\endgroup$
    – Jeff
    Jun 28, 2020 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.