LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Integration VI

Solved!
Go to solution

dsb@NI wrote:

I recommend path 3 because it requires one less assumption (wavelength spacing to get required accuracy).


Can you explain the term "required accuracy", because I did not see any such requirements.

 

Chances are that integration of a relatively slowly changing signal with over 1000 points is only very weakly dependent on the actual integration method, especially since the signal is noisy to begin with.

0 Kudos
Message 21 of 25
(139 Views)

@altenbach wrote:

dsb@NI wrote:

I recommend path 3 because it requires one less assumption (wavelength spacing to get required accuracy).


Can you explain the term "required accuracy", because I did not see any such requirements.

OP did not share any accuracy requirements. Ironically enough, I was assuming that there was an accuracy requirement even if it was loosely defined as accurate enough. I think we have all been working towards a simple integration method that doesn't introduce error. 

 


@altenbach wrote:

Chances are that integration of a relatively slowly changing signal with over 1000 points is only very weakly dependent on the actual integration method, especially since the signal is noisy to begin with.


OP's signal does have sharp edges (rapid/instantaneous changes). When we resample to a linear x spacing, the spacing determines how accurately the resampled signal/spectrum captures those rapid changes. I have consistently favored the uneven integration because the input spectrum is uneven in x. The uneven integration captures the rapid changes without introducing resampling error.

 

Good observation about the noise. LED47 hasn't noted noise as an issue. However, since it seems as though the integration is aggregating power, I am dubious of any part of the corrected (noisy) spectrum that is negative (and, therefore, subtracts from the integrated result). @LED47 can figure out how to handle sharp transitions, noise in the spectrum, and negative spectrum values.

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 22 of 25
(116 Views)

Yes, the current interpolation takes a tiny bite out of the trailing sharp edge. The OP needs to decide if this is significant.

 

altenbach_0-1766083172275.png

 

Message 23 of 25
(109 Views)

Also, the ratio of the two integrals is 1.00036, minute compared to all other errors.

 

altenbach_0-1766084020099.png

 

I still strongly prefer to use the built-in uneven integration, even for the running integral. Anything handmade is less tested.

 

altenbach_0-1766084662893.png

 

You can look inside the uneven integration and it pretty nice code. 😄

 

Message 24 of 25
(107 Views)

@altenbach wrote:

...

I still strongly prefer to use the built-in uneven integration, even for the running integral. Anything handmade is less tested.


Well said!

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 25 of 25
(91 Views)