04-12-2010 04:07 PM
Good evening!
I have some sampled data logged in text (.lvm) format which I would like to perform off-line digital filtering to.
I have a Z-transform of the form ( 1 + a * z^-1 )/( 1 + b * z^-1 ) to describe the behaviour for the given sampling rate.
I will use the "Read from Measurement File" to import to LabVIEW as dynamic data, I can then arrange that in an array if need be. I am just unsure of how to implement the z-transform; are there any examples performing a similar function?
I apologise for the "can you help me?" type post but I have struggled to find information on building this.
Any help/references appreciated!
Peter
04-12-2010 04:43 PM
I'm assuming that you don't have the Control Design and Simulation Module.
You can calculate the difference equation, and implement it with shift registers.
04-13-2010 07:45 AM
Thank you for the quick reply.
I do have access to that module and have located the H(z) "Discrete Transfer Function" element.
I have looked at some help files / examples and it would appear that all the simulation elements must lie within the Simulation Loop. Can I pass an array into this loop to use as the input?
I attach the VI I am using to obtain an array of my input data.
Regards,
Peter
04-13-2010 09:45 AM
You don't need the simulation VIs, you need the Control VIs, try something like this.
Your file already gives you an array so you don't need the For loop.
04-14-2010 06:53 AM
04-14-2010 07:08 AM
By the way we are talking about the Z plan and not the S plane? Because if you have the "NI LabVIEW Digital Filter Design Toolkit" you can specify poles and Zeros in the Z plane and hence simulate your filter
04-14-2010 08:53 AM
I don't know the versions of your toolkits, but here is the vi in Labview 8.5, and also a screenshot
04-14-2010 09:36 AM - edited 04-14-2010 09:38 AM
I used the "NI LabVIEW Digital Filter Design Toolkit" and the difference equation method to create my filter. But I am getting some odd results when I apply my input data to the filter.
I have made some notes on the VI to what I am trying to do.
Basically trying to reduce the response time of a first-order system using filtering; the filter will cancel out the previous time constant and replace it with a new one. I have pasted the bode plot of the system into my VI as there is no Flash on my computer to upload on here.
I am still trying to get my head around what is happening - the noise content of my real input signal could be having an adverse effect.
[ edit : attaching the VI ]
Peter
04-14-2010 11:00 AM
Ignore the above post - I realised the 'strange behaviour was the filter adjusting to the initial steady steady state. Putting a longer steady state at the beginning of my sample data let the filter settle before trying to compensate for a change.
In real life the system would run continuously so the large error would only occur when the system first started up.
Now I just need to reduce the noise on my signal to allow for greater amplification; the more a try to speed the system up, the more the noise is amplified.
Peter