What Does the Integral x(t).vi Do?Primary Software: LabVIEW Development Systems>>Professional Development SystemPrimary Software Version: 5.0 Primary Software Fixed Version: N/A Secondary Software: LabVIEW Toolkits>>Math Interface Toolkit
Problem: The Integral x(t) VI may at first appear to integrate incorrectly--everything is shifted by a constant. Why? Solution: Integral x(t) performs the discrete integration of the sampled signal X. Integral x(t) calculates a definite integral. The value of the output array at any value x is the area under the curve of the input array between 0 and x. One common pitfall with integrals is neglecting the integration constant. For instance, integral( sin(x) ) = -cos(x) + C is more correct than integral( sin(x) ) = -cos(x). When scientists use integrals, they are often more interested in the shape and properties of the function, rather than the integration constant. Thus, for many purposes, integral( sin(x) ) essentially is -cos(x). This is, in fact, the result produced by the Integration VI included with the G Math Toolkit. However, Integrate x(t) is actually a definite integral--the value of the output array at any value x is the "area under the curve" of the input array between 0 and x, and its result includes the integration constant. Thus, if you feed in an array that is sin(x), Integral x(t).vi returns f(x) = integral( sin(x) ) = -cos(x) + C. Since sin(x) = 0 when x = 0, then f(0) = 0 which implies that 0 = -cos(0) + C. Thus, C = 1. Therefore, f(x) = -cos(x) + 1. So what do the three input values do? The "dt" input is the length of time between each element in the array. Thus the amplitude and period of the resulting output depend on the value of dt. (For instance, if one period of the sine wave is 100 points and dt is 1 sec, then the frequency of the sine wave is .01 Hz. If dt is 2 sec, the frequency is .005 H) The initial and final condition inputs are the values of array elements -1 and sizeof(array) + 1, respectively. The initial condition and final condition minimize the overall error by increasing the accuracy at the boundaries, especially when the number of samples is small. Determining boundary conditions before the fact enhances accuracy. For more information see LabVIEW >> Help ... >> VI, Function, & How-To Help ... >> VI and Function Reference >> Analyze VIs >> Signal Processing VIs >> Time Domain VIs >> Integral x(t) Related Links: Attachments:
Report Date: 04/22/1999 Last Updated: 08/18/2004 Document ID: 1KL99ILL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
