LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating a waveform to obtain a running sum of the amplitude

I am trying to decide the easiest way to integrate a waveform. I have obtained a signal and done a series of waveform operations on it, not I need to sum up the amplitudes of the waveform. I am assuming that the best way to do this is going to be using some sort of integration. I can't seem to get a simple integrator to do this.

Thanks for your help
0 Kudos
Message 1 of 8
(4,039 Views)
I suggest simple numerical integration. That is, for each sample you multiply it by the dT between it and the previous sample and then add that to your total. From a purist point of view, its not all that accurate (though you can obtain better results with small dT or using Newtons approximations or whatever). Benefit of this is that is usually pretty fast and usually accurate enough. It may or may not be a viable option given your unstated requirements or goals.
0 Kudos
Message 2 of 8
(4,039 Views)
Here is a little more information about the application. I have used data aquisitions to aquire two AC voltage waveforms. I have rectified the waveforms, and summed the two waveforms together. Now I need to take a summation (running sum) of the resulting waveform. Accuracy is somewhat of a concern, as this running sum will be used to calculate a series of costs and usage characteristics.

Hope this helps by giving an idea of what I am looking to do.

I have tried to do the numeric integration, but I am having a problem getting the waveform to sample as needed. My other idea was to convert the waveform to (x,y) coordinates and work with that data. I'm not sure what the best way will be.
0 Kudos
Message 3 of 8
(4,039 Views)
Please claify.

Do you want the integral or the sum?

THe off-the shelf integral stuff wants samples at equally spaced dt.

The sum can be accomplished usign a shift register,
or,
the sum array function.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(4,039 Views)
I am truly looking for a running sum of a series of numbers. In this case, the numbers are coming in the form of an electrical waveform.
0 Kudos
Message 5 of 8
(4,039 Views)
err, you mean if your data stream looks like this:
1.1
1.2
1.2
1.3
1.2
1.1

you want your output to be 1.1 + 1.2 + 1.2 + 1.3 + 1.2 + 1.1 = 7.1?
0 Kudos
Message 6 of 8
(4,039 Views)
That is the idea.

I'm not sure if I will have to sample the waveform to obtain points though.

I really appreciate your attention!!
0 Kudos
Message 7 of 8
(4,039 Views)
If I understand you, I think this VI will show you what you need to know.

Good luck.
0 Kudos
Message 8 of 8
(4,039 Views)