10-11-2019 08:48 AM
Hello everyone ,
I'm trying to filter a signal with the VI Zero phase using a normalized set of reverse and forward coefficient that I already calculated using Matlab , but I'm getting Nan as Outputs.
I already checked my inputs to be sure not to have any Nan in it.
The zero phase VI seems to work well with other set of coefficients.
Solved! Go to Solution.
10-11-2019 09:13 AM - edited 10-11-2019 09:15 AM
Hi Aa,
thanks for attaching a VI with some default data!
It often helps to plot the data and to limit the amount of data:
The larger you set the "length" of the input data the larger get the resulting values (0.7m and 2.8m). At around length >=2100 the results become so large you only see NaNs… (Because you reach the max value for DBL datatype!)
10-11-2019 09:57 AM
Hi GerdW,
Thanks for the solution.
Yet I still find it weird how the outputs reach such large values. With the same coefficients using matlab I get another result completly different ! That's why i didn't check the magnitude of the outputs.
Those coefficients correspond to an 8th order lowpass butterworth filter at 0.35hz taking the frequency sampling as 20hz.
Do you know why such large values appear using this VI ?
Thank you again for your help .
10-11-2019 10:26 AM - edited 10-11-2019 10:32 AM
Hi Aa,
your coefficient values look "unusual" to me…
Have you read the LabVIEW help for the ZeroPhase filter and have you played with the example VI, which is linked to at the bottom of the help?
Have you tried to generate coefficients as suggested in the LabVIEW help?
I did:
10-14-2019 09:36 AM
Hi GerdW,
Yes I did read LabVIEW Help for the Zerophase filter. I already tried your proposition.
The VI attached shows the error between labview's zero phase filtering and the target.
I think I will try the Mathscript function y = filter_zerophase(b, a, x).
Thanks for your help