DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Universal filter behaviour

Hi all,

 

I want to apply an IIR/Cauer filter to a mesure. Since Dasylab doesn't support this filter, I've used Matlab to obtain the numerator/denominator of the Z-transform (I've used the 'ellip' command, obtaining the vectors 'a' and 'b'). I've put the coefficients in an Universal Filter add-on, selecting the option "IIR", but it doesn't work !?!. I've tested different configurations, changing the order of the coefficientes, changing the denominator by the numerator, etc., but there is no way to obtain the good results, that is, the same results I can obtain with Matlab, what I'm doing wrong??

 

Thanks!

JP

0 Kudos
Message 1 of 18
(8,722 Views)

Hi you,

please provide the worksheet, and/or the data used as input, the result and the values you expect to be the result.

 

 

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 2 of 18
(8,713 Views)

Here you are the worksheet and some screen captures. Sorry but I can't attach the data files because of confidentiality restrictions. I've also included the results obtained with Matlab.

 

The filter coefficientes have been obtained with Matlab as follows:

 


>> [b, a] = ellip(6, 0.01, 60, 0.025, 'high')

b = 0.8796   -5.2751   13.1838  -17.5767   13.1838   -5.2751    0.8796
a = 1.0000   -5.7428   13.7500  -17.5684   12.6337   -4.8481    0.7756

 

and they are applied using the "filter" command, which help says:

 

>> help filter
 FILTER One-dimensional digital filter.
    Y = FILTER(B,A,X) filters the data in vector X with the
    filter described by vectors A and B to create the filtered
    data Y.  The filter is a "Direct Form II Transposed"
    implementation of the standard difference equation:
 
    a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
                          - a(2)*y(n-1) - ... - a(na+1)*y(n-na)
 
    If a(1) is not equal to 1, FILTER normalizes the filter
    coefficients by a(1).

 

It would be very useful to know how exactly the coefficients are applied by DasyLab, in order to be compared to the "filter" function of Matlab.

 

Thanks a lot in advance!

Download All
0 Kudos
Message 3 of 18
(8,708 Views)

DASYLab's help files say that the first coefficient has to be equal to 1 and the other have to be normed to 1.

 

All of your coefficients are equal to zero.

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 4 of 18
(8,700 Views)

Hi,

 

well, I don't know why you get all the coefficients to zero when you open the worksheet, they have values when we open the same file with our DasyLab version 11 Net, maybe an issue related to the used version? Anyway, I don't understand very much how to "norm to the smallest value 1" as the help says, and it's a bit strange to norm only the denominator. I've carried out the following operations in Matlab:

 

>> [b, a] = ellip(6, 0.01, 60, 0.025, 'high')

b = 0.8796   -5.2751   13.1838  -17.5767   13.1838   -5.2751   0.8796
a = 1.0000   -5.7428   13.7500  -17.5684   12.6337   -4.8481   0.7756

>> a = a ./ max(abs(a))

a = 0.0569   -0.3269    0.7827   -1.0000    0.7191   -0.2760   0.0441

 

I've used the values of the vector 'b' as numerator, the values of the vector 'a' as denominator, but changing the first one by 1. And it doesn't work either.

 

Maybe the main question would be: if I use n1 n2 n3 ... n7 as numerator coefficients, and d1 d2 d3 ... d7 as denominator coefficients, in the Universal Filter, what is the z-transform used by this module to be applied to the signal?

 

Thanks!

 

 

0 Kudos
Message 5 of 18
(8,672 Views)

Well, does anybody have at least some clue/idea about how I could implement this function in Dasylab?

 

y(t) = b(1)*x(t) + b(2)*x(t-1) + b(3)*x(t-2) - a(2)*y(t-1) - a(3)*y(t-2)

 

where 'y' is the output and 'x' is the input. The first part, related to 'x', I think it can be implemented using the "Delay" module, but the rest, with the output 'y', I don't know at all. Maybe it's necessary to make a loop, but it gives me error in Dasylab, any ideas?

 

Thanks!

0 Kudos
Message 6 of 18
(8,630 Views)

Try the formula module with the various incoming values delayed.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 7 of 18
(8,621 Views)

Hi everyone

That seems same like the equation of 4-channel butterworth filter (also called CFC filters) according to SAEJ211. Has anyone succed to implement this kindo of formula to Dasylab?

 

 

0 Kudos
Message 8 of 18
(4,271 Views)

Try the attached sample - pretty self explanatory. Coeefs are calculated with Excel file.

 

cheers,

thomas

0 Kudos
Message 9 of 18
(4,257 Views)

Hi Thomas,

 

And thanks for your replay but I can't open example. It gives me error: Cannot read connect matrix. Abort. I have Dasylab 2016 Pro (14.2.0). Can  I do something for that?

 

 

0 Kudos
Message 10 of 18
(4,247 Views)