Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Digital iir filter stability checking.

Status
Not open for further replies.

RaccoonAlpha

Newbie level 2
Joined
Jan 14, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
24
Hi all,

I am trying to confirm the stability of some digital iir filters I am using.

I have downloaded a trial of Matlab 2014b and have been attempting to use the isstable function to check stability, this tells me that my high frequency notch and bandpass filters are stable but my mains (50Hz) noise notch filter and my 10Hz high pass filter are not.

they both show one pole at around -2.4 + 0i as shown in the image below.



this is obviously why isstable is returning 0, so I tried designing a notch filter with both poles and zeros at +/- 2.25 degrees (8KHz sample rate) with a radius of 1 for zeroes and 0.9 for the poles. as can be seen in the picture below.



this generated a decent looking frequency response on matlab using the freqz function but transferring to a practical application of the filter in excel produced an output which oscillated out of control when subject to an impulse (value of 1) at sample #5 and all remaining samples where 0.

2608131400_1421244880.png


my a and b coefficients were generated from matlab using the poly(n) function where n = zero locations to generate my b coefficients and n = pole locations to generate my a coefficients.

this gave me
a = [1, -1.7986122652, 0.809999999964175]
b = [1, -1.9984580724, 0.999999999913979]

the above excel graph was generated using the formula:

=SUM(($C$2*B9)+($D$2*B8)+($E$2*B7)+($D$3*C8)+($E$3*C7))

where D3,E3 are my b coefficients, C2,D2,E2 are my a coefficients, B9-7 are my current and two previous input samples and C8-7 are my two previously filtered outputs.

I do not understand this, Matlab says the coefficients should provide a stable filter but excel is saying otherwise!!! can anyone see an issue with my workings of anything that I may have overlooked.

Any help would be much appreciated.
 

this turned out to be the formula I was using, matlab seems to use the formula equivalent to

=SUM(($C$2*B9)+($D$2*B8)+($E$2*B7)-($D$3*C8)-($E$3 *C7))

therefore inverting my b coefficients fixed the problem.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top