In the previous elog we've compared Matlab and Foton SOS representations using low-order filter. Now we move on to high order filters and see that Foton is pretty bad here.
We consider Chebyshev filter of the first type with cuf off frequency 12 Hz and ripple 1 dB. In the table below we summarize the GAINS obtained by Matlab and Foton for different digital filter orders.
Order |
Matlab |
Foton |
2 |
5.1892960e-06 |
5.1892960e-06 |
4 |
6.8709377e-12 |
6.8709378e-12 |
6 |
5.4523201e-16 |
9.0950127e-18 |
8 |
5.3879305e-21 |
1.2038559e-23 |
We can see that for high orders the gains are completely different (ORDER of 2!!!). Interesting that besides of very bad GAIN, SOS-MATRIX Foton calculates pretty well. I checked up to 5 digit - full coincidence. Only GAIN is very bad.
The filter considered is cheby1("LowPass",6,1,12) and is a part of the bad Cheby filter where we loose coherence and see some other strange things. |