Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IIR Filter design Signature and algorithm unclear #14

Open
TobiasGlaubach opened this issue Aug 15, 2018 · 2 comments
Open

IIR Filter design Signature and algorithm unclear #14

TobiasGlaubach opened this issue Aug 15, 2018 · 2 comments

Comments

@TobiasGlaubach
Copy link

TobiasGlaubach commented Aug 15, 2018

This issue is based on discussion in the Mathnet forum.

I tried to figure out the actual usage of the IirCoefficients Methods and found a bunch of irregularities or counter intuitive things:

  1. Frequency inputs instead of periods is counter intuitive compared to other packages for filter design (MATLAB, Octave and scipy).
  2. width Parameters for LowPass is a bit unclear. What exactly is the bandwidth of a lowpass filter, if a cutoff frequency is already given?
  3. The returned coefficients as an array with a beeing the first 3 and b beeing the last three values is a bit obscure I find.
  4. There are no unit tests or examples for the FIR and IIR methods.
  5. The algorithm used to calculate the filter coefficients is not documented.

Also I tried plotting the bode plots of the designed lowpass filters and could not figure out, how the given input parameters correspond to the frequencies of the resulting transfer functions.

Plot example matrix bandwidth and cutoff frequency varied from 0Hz...100Hz in steps of 20Hz (blue magnitude, green phase):

grafik

Plot example matrix bandwidth and cutoff frequency equal for range from 0Hz...100Hz with 25 points (blue magnitude, green phase):

grafik

@TobiasGlaubach
Copy link
Author

Also as pointed out in the discussion mentioned above, the generated transfer functions are unstable for most input combination. The only stable input combinations I found were.

bandwidth == cutoff
&& 
(0.22 * samplingFrequency) >= cutoff 
&& 
(samplingFrequency / 3) < cutoff 

Also any input with bandwidth >= samplingFrequency / 2 as well as any input with cutoff == 0 produces improper filter sizes (numberator length > denominator length).

@heltonbiker
Copy link

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants