LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time error between two waveforms

If I subtract two waveforms and feed the resulting difference waveform into an RMS function, I get the RMS of the amplitude errors between the two waveforms. A smilar RMS error calculation for the time axis is required. Is there an existing function that would do this, or how would I approach building a VI to accomplish this?
0 Kudos
Message 1 of 4
(2,902 Views)
Hello C. Allen Weekley,

Thank you for contacting National Instruments.

Will you please elaborate on what you mean by "RMS error calculation for the time axis?" Are you looking for the phase shift?

When you subtract two waveforms, you are calculating the difference between two amplitudes at a given time. Do you now want to find the difference between two times at a given amplitude?

Please respond with more information and I will try to help.

Have a great day,

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,902 Views)
Sean,
Thank you for the reply. I should go back to my client to see if they can give me a more specific definition, but the approach I thought of was as you described, subtracting the difference in times at the same amplitude. But, one problem is that there could be many places where the waveform crossed the same amplitude. I actually tried programming this but I did not find a good way to handle that problem. Intuitively, one could look at a waveform and a time-shifted waveform of a similar shape, and say that the sum of all the time differences between similar points would be the total error. However, this concept is based on the shape of the waveform and I am not sure how one would approach programming it.
Allen
0 Kudos
Message 3 of 4
(2,902 Views)
Hello Allen,

I am not sure what kind of waveforms you will be measuring, but I
thought I would put some ideas out there until you can talk to your
client.

Assuming your two signals will be periodic and similar (same
amplitude, frequency, shape), you can always use the Peak Detector VI
to determine the different peaks and valleys. You can then subtract
the resulting location arrays to determine the time shift between the
two signals.

Some data manipulation is required to get the shift into units of
time. I have attached an example VI to help you get started.

I hope this helps,

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,902 Views)