Reg :: Issues with Filter Designing in SciLab
Sumit Adhikari
sumit.adhikari at gmail.com
Tue Aug 2 16:04:09 CEST 2011
Okay I did reduce the problem. Attached is the script!
When I run with show_issue = 0 (Line 12) I have everything perfect. With
that I try to get the filter coefficients using the commands :
getArray(invert(a))
getArray(invert(b))
The coefficient obtained in this way shows stability problem and has
completely different response in MATLAB.
In order to debug this enable show_issue = 1 (line 12), by which I enter
coefficient to re-construct the filter and this time it is
completely different and in agreement with MATLAB result!
Hope I am missing something while I am printing a and b. Can anybody tell me
what is the issue with my printing of a and b ?
Regards,
--
Sumit Adhikari,
Institute of Computer Technology,
Faculty of Electrical Engineering,
Vienna University of Technology,
Gußhausstraße 27-29,1040 Vienna
On Tue, Aug 2, 2011 at 10:38 AM, Sumit Adhikari <sumit.adhikari at gmail.com>wrote:
> Dear All,
>
> I am designing an IIR filter scilab, in which the quantized filter response
> is as follows:
>
> ###########################################################################
> FLDN :: Designed Filter := Hiir_q
>
> 2 3 4 5 6 7
> 8 9 10 11 12 13 14 15
> 139 - 208z + 7920z - 25291z + 55974z - 66935z + 46643z + 26354z -
> 95388z + 136947z - 100619z + 33947z + 39939z - 63176z + 54471z - 24951z
>
> 16
>
> + 7607z
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> 2 3 4
> 5 6 7 8 9 10
> 14419729 - 2.352D+08z + 1.827D+09z - 8.997D+09z + 3.148D+10z -
> 8.305D+10z + 1.710D+11z - 2.806D+11z + 3.709D+11z - 3.965D+11z + 3.420D+11z
>
> 11 12 13 14 15
> 16
> - 2.358D+11z + 1.275D+11z - 5.233D+10z + 1.541D+10z - 2.917D+09z +
> 2.684D+08z
>
>
> ###########################################################################
>
>
> Hiir_q is stable and I tested this filter with quantized input for 16-bits.
> So, when I was satisfied I got the filter coefficients like as follows :
>
>
> -->getArray(invert(a))
> B(01) = 268435456
> B(02) = 1377518686
> B(03) = -1768307133
> B(04) = -786674615
> B(05) = -1379482255
> B(06) = 441572766
> B(07) = -1550825035
> B(08) = -1373807840
> B(09) = 1486413132
> B(10) = -1394174588
> B(11) = -787299224
> B(12) = -1440621730
> B(13) = 1413056441
> B(14) = -406911246
> B(15) = 1826903011
> B(16) = -235150099
> B(17) = 14419729
>
> -->getArray(invert(b))
> B(01) = 7607
> B(02) = -24951
> B(03) = 54471
> B(04) = -63176
> B(05) = 39939
> B(06) = 33947
> B(07) = -100619
> B(08) = 136947
> B(09) = -95388
> B(10) = 26354
> B(11) = 46643
> B(12) = -66935
> B(13) = 55974
> B(14) = -25291
> B(15) = 7920
> B(16) = -208
> B(17) = 139
>
> -->
>
> and then tried to implement it using a double precision C++/SystemC model.
> I found that the filter output is unstable. While I was debugging,
> as a check I copied and pasted these coefficients in MATLAB so that I can
> be sure what is going wrong. With my surprise I found that
> the MATLAB is showing completely different response and a completely
> unstable filter.
>
> I think I am doing some mistake. Can anybody please point out where ?
>
> Regards,
>
>
> --
> Sumit Adhikari,
> Institute of Computer Technology,
> Faculty of Electrical Engineering,
> Vienna University of Technology,
> Gußhausstraße 27-29,1040 Vienna
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110802/dc467856/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FIRFilterProblem.sci
Type: application/octet-stream
Size: 3147 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110802/dc467856/attachment.obj>
More information about the users
mailing list