LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Derivative help (probably my ignorance)

Solved!
Go to solution

I am taking the derivative of a position time plot to get the velocity. It is working other than the first and last points shoot up and down excessively. This is probably where my ignorance from not being in a calculus class room in a while is. I assume it has something to do with the way the derivative VI functions.

I attached a sample graph to show what it is doing.

0 Kudos
Message 1 of 8
(2,615 Views)

If the data file isnt in there, here it is

 

EDIT the file extension wont attach so hopefully it is in the Read from VI

0 Kudos
Message 2 of 8
(2,608 Views)

@Patrick H. wrote:

If the data file isnt in there, here it is

 

EDIT the file extension wont attach so hopefully it is in the Read from VI


??  How can a data file be "in the Read from VI".

 

What extension are you trying attach?  Post it as .zip file.

0 Kudos
Message 3 of 8
(2,591 Views)

What is the extension of the file you were trying to attach? You can always zip it up.

 

Your VI does not contain any data. Please do the following:

 

  1. Create an indicator at the 2D array. (right-click wire, create indicator)
  2. Run the VI so the indicator contains data.
  3. Right click the 2D array terminal and "change to constant"
  4. Delete the file IO stuff
  5. Saven the VI under a new name an attach it once more.

 

0 Kudos
Message 4 of 8
(2,589 Views)

I run a .lvm file. I kept the IO stuff because it has to read from row 5 down to row 2003 or somewhere around there.

I put the .lvm and .csv in a zip folder.

I didnt know if it attached in the original VI with the VI itself.

But here is the folder and keep in mind, this is a temporary VI to show my graph.

0 Kudos
Message 5 of 8
(2,585 Views)
Solution
Accepted by topic author Patrick H.

You have a very large DC offset in the data.  Average about 5.7 with variations of less than 0.1.  Subtract the mean before you take the derivative.

 

Top graph is derivative of (signal - mean). Bottom graph is signal.

 

Lynn

 

After mean.png

Message 6 of 8
(2,576 Views)

Thank you Lynn

0 Kudos
Message 7 of 8
(2,564 Views)

Patrick H,

 

Glad to help.  It is often useful to visualize the data which is causing problems.  Temporarily drop waveform graphs on the front panel and look at the data.  When I did that with your data it was obvious that the dc transient was affecting your results.

 

Lynn

0 Kudos
Message 8 of 8
(2,548 Views)