How to calculate IIR coefficient from filterDesigner
조회 수: 53 (최근 30일)
이전 댓글 표시
Hi i am newbie and i am using filterDesiner command to generate an IIR filter. After finishing design filter with Filter Designer window, my result is as below:

And i generated a header C code file and my result is as below:

And i do not know how to convert my result to the coefficient i need. My coefficient i need is the coefficient in the equatation:
y(n) = b0*x(n) + b1*x(n-1) ... + bM*x(n-M) - a1*y(n-1) - ... - aN*y(n-M)
I need a table of [b0 .... bM] and [a1 ... aM].
댓글 수: 0
답변 (2개)
Sriram Tadavarty
2020년 3월 23일
Hi Thanah,
To export the filiter coefficients, you can try the following as suggested here https://www.mathworks.com/help/signal/examples/introduction-to-filter-designer.html#FDAToolExample-8
Hope this helps.
Regards,
Sriram
댓글 수: 2
Sriram Tadavarty
2020년 3월 24일
편집: Sriram Tadavarty
2020년 3월 24일
Hi,
You are right. For the IIR filter, the coefficients you get is in the form of SOS and G. To convert those in to filter numerator and denominator, you can try sos2tf function, which provides the required coefficients.
Hope this helps.
Regards,
Sriram
James Pollard
2021년 11월 10일
Hi Thanh,
If you haven't already solved this problem by now, please see attached an Arduino library I wrote, which takes the outputted 'fdacoefs.h' file and realises it into an IIR filter.
If you study the fdacoefs.h file, you will notice that the 'num' array holds the B matrix coefficients and, likewise, the 'den' array holds both the A and S matrix coefficients.
If you realise this into simulink, you will find a block model of how these values are used. If this doesn't fit your equation model, then you should be able to adapt it.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital and Analog Filters에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!