LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

integrating waveform

Solved!
Go to solution

Hi,

 

I am trying to understand the integration of a waveform. I used two vi to calculate the integral of a sine wave although the shape of the graph is different the values on y-axis are different. Can someone explain this ? and which is a better way to integrate a waveform. If I were to calculate definite integral of a waveform from 0 - t, whats the best approach to achieve this ? I am not familiar to integrate a waveform not represented in terms of formula. My goal is integrate an acquired sine signal.

 

integrating_waveform.PNG

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 1 of 7
(5,808 Views)

By any chance are you sampling at 1KHz?  The Express VI integrates a signal, while the Integral function "performs the discrete integration of the sampled function X".  The difference is the presence or absence of dt, the time step.  Integrating the signal (which carries dt along with it) implicitly includes it as the step size, while the integral of the "sampled function" needs you to add the step size (0.001 sec) into the sum.

0 Kudos
Message 2 of 7
(5,803 Views)

yes I am sampling at 1KHZ. I still don't understand the difference in y-axis values ? can you please elaborate ?

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 3 of 7
(5,801 Views)

If you sample at 1 KHz, dt = 0.001.  0.318 = 318 * 0.001.

0 Kudos
Message 4 of 7
(5,796 Views)

you left dT at 1 rather than the correct 0.001 value


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 7
(5,791 Views)

thanks for explaining I understand now. I also wanted to know if both the methods are same ? which method is better for calculating the integral of waveform ?

Rajnikant Singh
Iowa State University (Research Assistant)

0 Kudos
Message 6 of 7
(5,763 Views)
Solution
Accepted by topic author raj_iastate

essentially they are very simillar underneath.  I would tend to avoid the extra overhead of the Express vi.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(5,747 Views)