12-08-2009 05:04 PM
If there is a more appropriate term than "aligning" for this, please let me know. I'm going to try to be detailed here since I do not think I am using proper nomenclature to describe some of what I am trying to do...
I am working with a product which outputs an angle as a voltage level between 0-5VDC. This angle is also being read by a test setup and is already acquired in LV as an angle. I have two inputs, one in degrees from the test setup, one in volts from the product- both represent the angle.
My goal is to compare the 0-5VDC signal to the angle sensed by the test system and measure the hysteresis in the product sensor.
Example data would take this form:
Prod Sense V Actual Angle
2.5 V 12 degrees
2.5 V 12 degrees
2.5 V 12 degrees
2.8 V 13 degrees
2.8 V 13 degrees
3.0 V 14 degrees
3.0 V 14 degrees
3.0 V 14 degrees
3.0 V 14 degrees
4.4 V 15 degrees
4.4 V 15 degrees
4.7 V 16 degrees
4.7 V 16 degrees
4.7 V 16 degrees
4.7 V 16 degrees
4.7 V 16 degrees
After moving in one rotation, the data is acquired again with the product moving in the opposite rotation, from 16 degrees to 12 degrees. The voltages are slightly different this time because of gear lash and other factors.
When it comes time to compare the two directions, I would like to look at the Prod Sense V for only one of each angle per direction.
In this case:
2.5 V 12 degrees
2.8 V 13 degrees
3.0 V 14 degrees
4.4 V 15 degrees
4.7 V 16 degrees
Then, I would like to arrange that data in an array so it is "aligned" with the data from the other direction.
One problem I run in to is that I may not have a particular angle reading for one direction. For instance, when returning, I may not have sensed 14 degrees. I would need to align the data accordingly, either throwing out that reading for one direction or estimating it for the other.
It would be nice if my final data looked something like this:
Actual Angle Sensor Reading Forward Sensor Reading Backward
12 degrees 2.5 V 2.9 V
13 degrees 2.8 V 3.2 V
14 degrees 3.0 V n/a
15 degrees 4.4 V 5.0 V
16 degrees 4.7 V 5.3 V
Are there any LV routines or popular DSP algorithms/concepts that can help me better understand how to do this? In the past I have exported the data to Excel and used VBA to "align" the data. I'd like to move the analysis inside LV.
I can't help thinking that there is more I can learn about what I'm trying to do if I only knew what terms to search for or where to look.
Thanks for any help!
Dave
12-08-2009 06:53 PM