11-21-2012 08:27 AM
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
11-22-2012 02:59 AM
Hi you,
please provide the worksheet, and/or the data used as input, the result and the values you expect to be the result.
11-22-2012 07:21 AM
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!
11-22-2012 07:42 AM
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.
11-23-2012 05:23 AM
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!
12-01-2012 11:39 AM
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!
12-03-2012 07:49 AM
Try the formula module with the various incoming values delayed.
03-03-2020 11:04 AM
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?
03-04-2020 02:01 AM - edited 03-04-2020 02:39 AM
Try the attached sample - pretty self explanatory. Coeefs are calculated with Excel file.
cheers,
thomas
03-04-2020 02:41 AM
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?