LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IIR Cascade Filter Implementation with imported coefficients

Hi, MstrES:

I have designed both the Cascaded Second-Order and Direct form Butterworth highpass filter (0.1 Cut off, 1000 Sampling, 5th Order) in LabVIEW, they give the same results. And the poles of these filters all lie within the unit circle, which means they are stable. I wonder if you could provide those corresponding filter coefficients from Matlab, or you can verify yourself whether all those Matlab poles lie within the unit circle. Thanks.

Message Edited by strong@ni on 02-27-2008 11:27 PM
0 Kudos
Message 21 of 26
(1,698 Views)
Hi, MstrES:

I am attaching a VI showing the design process and the way to verify the stability of a filter. You can try those Matlab filter coefficients using this VI. Thanks.
0 Kudos
Message 22 of 26
(1,690 Views)
Hello again,
 
I`ve taken a look at your VI and i see you only use a couple of samples. Even though the zeroes and poles in my VI are within the unit circle, the filter still acts unstable.
 
I`ve attached my VI to this reply, but it`s a little messy one.
 
From the top down, you`ll see the Filtered Signal, Fast Fourier Transformation, 4 frequencies (3 optional), wether filter 1 or 2 should be active, reset button, the magnitude response from filter 1, 2 and 1&2.
Then some controls; (from left to right) Filter 1 controls, Filter 2 array control (matlab coefficients), Filter 2 indicator after optional convertion.
The desired convertion structure and a button if you want to convert the filter, stability indicator, and below that the coefficients of filter 1 and to the right of that the difference between filter 1 coefficients and filter 2 after convertion.
And last but not least, a zeroes&poles graph and to the right of it a zoomed in one.
 
I was planning to clean it up soon, so sorry again about the mess


Message Edited by MstrES on 02-28-2008 02:10 AM
0 Kudos
Message 23 of 26
(1,677 Views)

Hello again again,

After a quick use of your VI i`ve noticed that the matlab coefficients has a pole outside of the unit circle.

I`m not that familiar with manual filter structure convertion and i`m a bit confused about the fact that the Labview (Cascaded SOS Form II Transposed to) Direct Form II is unstable in my VI while the poles are correctly inside the unit circle.

*I`m using Labview 8,5 with Addons software for Advanced Filter Design.*

0 Kudos
Message 24 of 26
(1,674 Views)
Hi, MstrES:

I have looked into your VI, and found the problem you explained.

Then I have to explain the reasons for those unstability as follow : The cascaded form are different from the direct form, when transforming form the cascaded form to direct form, there must be some kinds of computation to realize it. And the fact is that the poles of the original filter are quite close to the unit circle, so when performing the computation, there is inevitably some rounding errors in the coefficients(also zeros and poles), because of this reason, it's likely that the poles will go a bit beyond the unit circle, thus making the filter unstable. This is common when leaping between those different filter forms.

So I think the way to settle this problem is to in advance know the exact form of the filter you want(design it directly) thus avoiding the operations to change the forms.
Thanks
0 Kudos
Message 25 of 26
(1,655 Views)
Hello hello,
 
Thanks for the explanation because i already suspected it to be an error during the convertion.
To re-asure that this is the cause of the unstability, i`m going to look at different filters with higher and lower cut off frequencies. Maybe then i`ll have hard evidence that the convertion changes the poles and thus stability.
 
Nontheless i`m trying to figure out why Matlab designs an Unstable filter. Maybe that is just a software error, i don`t know.
 
I haven`t found a method to choose the filter structure when creating the filter. I`m not that experienced in building one and therefore i used the basic subvi`s.
 
I guess i should look into that and create a VI that allows *even more* unexperienced users to create a filter with support and help functions allong the way.
 
Thanks for the help, i`ll post my findings soon.
0 Kudos
Message 26 of 26
(1,649 Views)