LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Aligning" acquired data for hysteresis analysis

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

0 Kudos
Message 1 of 2
(2,424 Views)
Arrays_BD.pngArrays_FP.png 

You'll need the OpenG VIs for this, but you'll need them for EVERYTHING anyway :).  I wouldn't be surprised if someone came along behind me with a much simpler method.  BTW - the first image is actually a VI Snippet made with the Code Capture Tool.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 2
(2,411 Views)