Quadrature VI

Owning Palette: Integration & Differentiation VIs

Requires: Full Development System

Performs numerical integration using adaptive quadrature approach. You must manually select the polymorphic instance to use.

Details  Example

Use the pull-down menu to select an instance of this VI.

 Add to the block diagram  Find on the palette

1D Quadrature (VI)

data is a variant that you can use to pass arbitrary values to the integrand VI.
integrand is a strictly typed reference to the VI that implements the expression to integrate. Create this VI by starting from the VI template located in labview\vi.lib\Analysis\8numeric.llb\1D Quadrature Integrand.vit.

 Open template
Note  The elements in the X array of the integrand VI specify the values of the independent variable at different times. Because the X array represents one variable, you cannot separate the elements in this array.
upper limit is the upper limit of the integral. The default is 1.
lower limit is the lower limit of the integral. The default is 0.
tolerance controls the accuracy of the quadrature. A smaller tolerance leads to a more accurate result but more computation time. The default is 1E-5.
result returns the integral result.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

1D Quadrature (Formula)

integrand specifies the expression you want to integrate. The independent variable must be x.
upper limit is the upper limit of the integral. The default is 1.
lower limit is the lower limit of the integral. The default is 0.
tolerance controls the accuracy of the quadrature. A smaller tolerance leads to a more accurate result but more computation time. The default is 1E-5.
result returns the integral result.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

2D Quadrature (VI)

data is a variant that you can use to pass arbitrary values to the integrand VI.
integrand is a strictly typed reference to the VI that implements the expression to integrate. Create this VI by starting from the VI template located in labview\vi.lib\Analysis\8numeric.llb\2D Quadrature Integrand.vit.

 Open template
Note  The elements in the X array and Y array of the integrand VI specify the values of the two integral variables at different time stamps. The X array and Y array represent the first and second variables, respectively, so you cannot separate the elements in the X array and Y array.
Upper Limits specifies the upper limits of the integral.
x upper limit is the upper limit of the first integral variable x. The default is 1.
y upper limit is the upper limit of the second integral variable y. The default is 1.
Lower Limits specifies the lower limits of the integral.
x lower limit is the lower limit of the first integral variable x. The default is 0.
y lower limit is the lower limit of the second integral variable y. The default is 0.
tolerance controls the accuracy of the quadrature. A smaller tolerance leads to a more accurate result but more computation time. The default is 1E-5.
result returns the integral result.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

2D Quadrature (Formula)

integrand specifies the expression you want to integrate. The first and second integral variables must be x and y, respectively.
Upper Limits specifies the upper limits of the integral.
x upper limit is the upper limit of the first integral variable x. The default is 1.
y upper limit is the upper limit of the second integral variable y. The default is 1.
Lower Limits specifies the lower limits of the integral.
x lower limit is the lower limit of the first integral variable x. The default is 0.
y lower limit is the lower limit of the second integral variable y. The default is 0.
tolerance controls the accuracy of the quadrature. A smaller tolerance leads to a more accurate result but more computation time. The default is 1E-5.
result returns the integral result.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

3D Quadrature (VI)

data is a variant that you can use to pass arbitrary values to the integrand VI.
integrand is a strictly typed reference to the VI that implements the expression to integrate. Create this VI by starting from the VI template located in labview\vi.lib\Analysis\8numeric.llb\3D Quadrature Integrand.vit.

 Open template
Note  The elements in the X array, Y array and Z array of the integrand VI specify the values of the three integral variables at different time stamps. X array, Y array and Z array represent the first, second and third variable, respectively, so you cannot separate the elements in X array, Y array and Z array.
Upper Limits specifies the upper limits of the integral.
x upper limit is the upper limit of the first integral variable x. The default is 1.
y upper limit is the upper limit of the second integral variable y. The default is 1.
z upper limit is the upper limit of the third integral variable z. The default is 1.
Lower Limits specifies the lower limits of the integral.
x lower limit is the lower limit of the first integral variable x. The default is 0.
y lower limit is the lower limit of the second integral variable y. The default is 0.
z lower limit is the lower limit of the third integral variable z. The default is 0.
tolerance controls the accuracy of the quadrature. A smaller tolerance leads to a more accurate result but more computation time. The default is 1E-5.
result returns the integral result.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

3D Quadrature (Formula)

integrand specifies the expression you want to integrate. The first, second, and third integral variables must be x, y, and z, respectively.
Upper Limits specifies the upper limits of the integral.
x upper limit is the upper limit of the first integral variable x. The default is 1.
y upper limit is the upper limit of the second integral variable y. The default is 1.
z upper limit is the upper limit of the third integral variable z. The default is 1.
Lower Limits specifies the lower limits of the integral.
x lower limit is the lower limit of the first integral variable x. The default is 0.
y lower limit is the lower limit of the second integral variable y. The default is 0.
z lower limit is the lower limit of the third integral variable z. The default is 0.
tolerance controls the accuracy of the quadrature. A smaller tolerance leads to a more accurate result but more computation time. The default is 1E-5.
result returns the integral result.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

Quadrature Details

This VI compares the difference between the 4-points and 7-points Lobatto quadratures on the interval with tolerance to terminate the calculation iteration. If the difference is less than the tolerance, the algorithm stops the iteration and moves on to next interval.

1D Quadrature

This VI numerically evaluates the following integral using the adaptive Lobatto quadrature:

where x1 is the upper limit and x0 is the lower limit.

To obtain high accuracy, this VI divides an interval into subintervals when the integrand f(x) varies sharply, as shown in the following front panel.

2D Quadrature

This VI numerically evaluates the following integral using the adaptive Lobatto quadrature:

where x1 is x upper limit, x0 is x lower limit, y1 is y upper limit, and y0 is y lower limit.

The 2D Quadrature instances divide an interval block into many sub-blocks when the integrand f(x,y) varies sharply.

3D Quadrature

This VI numerically evaluates the following integral using the adaptive Lobatto quadrature:

where x1 is x upper limit, x0 is x lower limit, y1 is y upper limit, y0 is y lower limit, z1 is z upper limit, z0 is z lower limit.

The 3D Quadrature instances divide an interval cube into many sub-cubes when the integrand f(x,y,z) varies sharply.

Example

Refer to the VI Reference Based Quadrature VI in the labview\examples\Mathematics\Integration and Differentiation directory for an example of using the Quadrature VI.

 Open example  Find related examples