Discrete FIR Filter
FIR filter model.
Description
The Discrete FIR Filter block filters each channel of the input signal with a specified digital FIR filter. The block can implement static filters with fixed coefficients.
This block filters each channel of the input signal independently in time.
The output dimensions are the same as the input dimensions, unless you specify a filter matrix for the Coefficients parameter. In this case, the output dimensions depend on the number of filter sets specified.
Specifying initial states
The Discrete FIR Filter block by default initialises with zero the internal filter states responsible for the signal values in previous steps. This is equivalent to assuming that past inputs and outputs are zero. You can use the Initial states parameter to specify non-zero initial conditions for filter delays.
To determine the number of initial states to set and how to set them, see the table of acceptable initial states. The Initial states parameter can take one of the forms described in the following table.
Initial state | Description |
---|---|
Scalar |
The block initialises all delay elements in the filter with a scalar value |
Vector |
If the vector consists of a single value, all delay elements in the filter are initialised with this value in the same way as a scalar. Otherwise, the length of the vector must be equal to the number of delay elements in the filter. |
Matrix |
The number of rows of the matrix must be equal to the number of delay elements in the filter. If the matrix has one column, it applies to all channels of the input signal, otherwise each column must correspond to a different channel. |
Ports
Input
In - input signal
scalar
| vector
| matrix
| multidimensional array
An input signal specified as a scalar, vector, matrix or array with any number of dimensions.
The Discrete FIR Filter block accepts real and complex signals of any numeric data type supported by Engee.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Support for complex numbers: Yes
Output
Port_1 - filtered signal
scalar
| vector
| matrix
| multidimensional array
Filtered output signal.
The Discrete FIR Filter block outputs real and complex signals of any numeric data type supported by Engee.
When Sample time is set to -1
, the interval between steps of the output calculation is the same as the interval of the input signal In.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, Int128
, UInt8
, UInt16
, UInt32
, UInt64
, UInt128
, Bool
.
Parameters
Coefficients - filter coefficients
[0.5, 0.5] (by default)
| scalar
| vector
| matrix
Specify the vector of coefficients for the transfer function. The filter coefficients must be specified as a string vector. When a vector-string of filter coefficients is specified, the block applies a single filter to the input. To apply multiple filters to the same input, specify a coefficient matrix where each row represents a different set of filter coefficients.
Block parameter |
|
Values |
|
By default |
|
Initial states - initial states of the filter
0.0 (by default)
| scalar
| vector
| matrix
Initial filter states as a scalar, vector or matrix. See Specifying Initial States for details.
Block parameter |
|
Values |
|
By default |
|
Sample time (-1 for inherited) - interval between calculation steps
-1.0 (by default)
| scalar
.
Specify the interval between calculation steps as a non-negative number. To inherit the calculation step, set this parameter to -1
.
Block parameter |
|
Values |
|
By default |
|