07-14-2014 07:04 PM
Has anyone had experience with implementing or using the quadgk (numerical integration) algorithm in LabVIEW?
07-15-2014 12:29 AM
07-15-2014 02:23 PM
Mike,
I originally put this out here because one of the researchers (here at UF) wants real-time code that does numerical integration using the quadgk procedure.
Subsequent investigation indicates that quadgk is thought to give better accuracy for ‘ill-behaved’ curves. However, ill-behaved would mean the curve is doing ‘unusual’ things between sample points, requiring the Gauss-Kronrod interval selection algorithm to reduce the error.
Seems to me if the sample rate is high compared to the signal rate of change, the trapezoid-approximation fit would give a very good curve fit, yet be much simpler to implemented on a real-time target.
Comments?
Jim
07-15-2014 02:43 PM - edited 07-15-2014 02:45 PM
I see what you are saying, but in a very real sense anything that happens between samples, didn't really happen.
"Ill-behaved" is a nice term for mathematicians. It could include processes that are doing bizarre things or data that is noisey. The important thing is that the sample rate is at least twice the maximum frequency of interest in the signal. Moreover, you need to have hardware antialias filters to cut off all frequencies above the Nyquist point. Assuming you meet those criteria and exercise good noise abatement procedures to reduce inband noise, you need to look at the data and see what it looks like. That will tell you what you need to use.
Mike...