Owning Palette: Advanced FIR Filtering VIs
Requires: Full Development System
Computes the convolution of the input sequences X and Y. Wire data to the X and Y inputs to determine the polymorphic instance to use or manually select the instance.
Use the pulldown menu to select an instance of this VI.
X is the first input sequence.  
Y is the second input sequence.  
algorithm specifies the convolution method to use. When algorithm is direct, this VI computes the convolution using the direct method of linear convolution. When algorithm is frequency domain, this VI computes the convolution using an FFTbased technique. If X and Y are small, the direct method typically is faster. If X and Y are large, the frequency domain method typically is faster. Additionally, slight numerical differences can exist between the two methods.


X * Y is the convolution of X and Y.  
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. 
X is the first complex valued input sequence.  
Y is the second complex valued input sequence.  
algorithm specifies the convolution method to use. When algorithm is direct, this VI computes the convolution using the direct method of linear convolution. When algorithm is frequency domain, this VI computes the convolution using an FFTbased technique. If X and Y are small, the direct method typically is faster. If X and Y are large, the frequency domain method typically is faster. Additionally, slight numerical differences can exist between the two methods.


X * Y is the convolution of X and Y.  
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. 
X is the first input sequence.  
Y is the second input sequence.  
algorithm specifies the convolution method to use. When algorithm is direct, this VI computes the convolution using the direct method of linear convolution. When algorithm is frequency domain, this VI computes the convolution using an FFTbased technique. If X and Y are small, the direct method typically is faster. If X and Y are large, the frequency domain method typically is faster. Additionally, slight numerical differences can exist between the two methods.


output size determines the size of X * Y.


X * Y is the convolution of X and Y.  
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. 
X is the first complex valued input sequence.  
Y is the second complex valued input sequence.  
algorithm specifies the convolution method to use. When algorithm is direct, this VI computes the convolution using the direct method of linear convolution. When algorithm is frequency domain, this VI computes the convolution using an FFTbased technique. If X and Y are small, the direct method typically is faster. If X and Y are large, the frequency domain method typically is faster. Additionally, slight numerical differences can exist between the two methods.


output size determines the size of X * Y.


X * Y is the convolution of X and Y.  
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. 
The linear convolution of the signals x(t) and y(t) is defined as:
where the symbol * denotes linear convolution.
When algorithm is direct, this VI uses the following equation to perform the discrete implementation of the linear convolution and obtain the elements of X * Y.
for i = 0, 1, 2, … , M+N–2
where h is X * Y
N is the number of elements in X,
M is the number of elements in Y,
the indexed elements outside the ranges of X and Y are equal to zero, as shown in the following relationships:
x_{j} = 0, j < 0, or j N
and
y_{j} = 0, j < 0, or j M.
When algorithm is frequency domain, this VI completes the following steps, in order, to compute the linear convolution:
X'(f) = FFT(x')
Y'(f) = FFT(y')
X * Y = IFFT(X'(f) · Y'(f))
Thus, this VI computes the linear convolution, not the circular convolution. However, because x(t) * y(t)_{N} X(f)Y(f) is a Fourier transform pair, where x(t) * y(t)_{N} is the circular convolution of x(t) and y(t), you can create a circular version of the convolution. To compute the circular convolution, you can use a block diagram similar to the block diagram shown in the following illustration.
When algorithm is direct, this VI uses the following equation to compute the twodimensional convolution of the input matrices X and Y.
for i = 0, 1, 2, … , M_{1}+M_{2}–2 and j = 0, 1, 2, … , N_{1}+N_{2}–2
where h is X * Y,
M_{1} is the number of rows of matrix X,
N_{1} is the number of columns of matrix X,
M_{2} is the number of rows of matrix Y,
N_{2} is the number of columns of matrix Y,
The indexed elements outside the ranges of X and Y are equal to zero, as shown in the following relationships:
x(m,n), m < 0 or m M_{1} or n < 0 or n N_{1}
and
y(m,n) , m < 0 or m M_{2} or n < 0 or n N_{2}.
When algorithm is frequency domain, this VI completes the following steps, in order, to compute the twodimensional convolution:
X'(f) = FFT(x')
Y'(f) = FFT(y')
X * Y = IFFT(X'(f) · Y'(f))
The output size determines the size of the output matrix X * Y as shown in the following illustration.
Refer to the Edge Detection with 2D Convolution VI in the labview\examples\Signal Processing\Signal Operation directory for an example of using the Convolution VI.