Convolution
Convolution of two input data.
blockType: Convolution
Path in the library:
|
Description
Block Convolution performs convolution of the first dimension of a multidimensional input array with the first dimension of the multidimensional input array . The block can also perform convolution of a column vector with the first dimension of a multidimensional input array.
The general equation for convolution is:
Two blocks are suitable for convolution of two input signals.:
-
Convolution;
Block Convolution assumes that all the elements and available at each time step, and calculates the entire convolution at each step.
Block Discrete FIR Filter It can be used to convolve signals in situations where all the elements available at each time step, but — this is the sequence that arrives during the entire simulation time. When using the block Discrete FIR Filter the convolution is calculated only once.
Ports
Input
#
IN_1
—
the first input signal
scalar | vector | the matrix | multidimensional array
Details
The first input signal , specified as a scalar, vector, matrix, or multidimensional array.
If both input signals are real, then the output signal is real. If one or both input signals are complex, then the output signal is complex. All dimensions of the input ports for both input signals, except the first one, must have the same value.
Input signals and are equal to zero if they are indexed outside their valid ranges.
| Data types |
|
| Complex numbers support |
Yes |
#
IN_2
—
second input signal
scalar | vector | the matrix | multidimensional array
Details
Second input signal , specified as a scalar, vector, matrix, or multidimensional array.
If both input signals are real, then the output signal is real. If one or both input signals are complex, then the output signal is complex. All dimensions of the input ports for both input signals, except the first one, must have the same value.
Input signals and are zero if they are indexed outside their valid ranges.
| Data types |
|
| Complex numbers support |
Yes |
Output
#
OUT_1
—
Output signal
scalar | vector | the matrix | multidimensional array
Details
A convoluted signal specified as a scalar, vector, matrix, or multidimensional array.
If both input signals are real, then the output signal is real. If one or both input signals are complex, then the output signal is complex.
| Data types |
|
| Complex numbers support |
Yes |
Parameters
Main
#
Computation domain —
calculation area
Time
Details
Set the area of the convolution calculation:
Time — The unit computes in the time domain, which minimizes memory usage.
Fixed-point signals are supported only in the time domain. When entering fixed-point signals, make sure that for the parameter Computation domain the value is set Time.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
Additional Info
Selecting the appropriate convolution block
Details
| Question | Answer | Recommended block |
|---|---|---|
How many bundles are you going to complete |
There are many convolutions, one at each time step |
|
One convolution for the entire simulation period |
|
|
What is the length of the input sequences? |
Both sequences have a finite length. |
|
One sequence has an infinite (not predefined) length. |
|
|
How many inputs are scalar streams |
Not a single one |
|
One or both |
|
Convolution of two multidimensional arrays
Details
Block Convolution it always calculates the convolution of two multidimensional input arrays by the first dimension. When both input arrays are multidimensional arrays, the size of their first dimension may differ, but the sizes of all other dimensions must be the same. For example, if — an array of size on on , and — an array of size on on , then the output is an array of size on on .
If — the size matrix on , and — the size matrix on , then the result is there will be a matrix of size on , The -th column of which consists of the following elements:
Input signals and are equal to zero if they are indexed outside their ranges. If both input signals are real, then the output signal is real. If one or both input signals are complex, then the output is a complex vector.
Convolution of a column vector with a multidimensional array
Details
If one input signal is a column vector and the other is a multidimensional array, the block independently convolves the vector with the first dimension of the multidimensional array. For example, if — length column vector , and — the size matrix on , then the output is a matrix of size on , The -th column of which consists of the following elements: