Discrete Derivative
Calculates the discrete time derivative.
blockType: Discrete Derivative
Path in the library:
|
Description
Block Discrete Derivative calculates the discrete time derivative with an arbitrary coefficient using the formula:
,
where
-
and are input and output values of the block at the current time step, respectively;
-
- input values of the block at the previous time step;
-
- scaling factor set using the parameters Gain value;
-
- size of discrete modelling step, which should be fixed.
Do not use this block in subsystems with non-periodic starts, such as Function-Call subsystems. This configuration gives inaccurate results. |
Ports
Input
#
IN_1
—
input signal
scalar
| vector
| matrix
Details
An input signal specified as a scalar, vector or matrix.
Data types |
|
Complex numbers support |
Yes |
Output
#
OUT_1
—
scaled discrete-time derivative
scalar
| vector
| matrix
Details
A scaled derivative over discrete time in the form of a scalar, vector or matrix.
The output signal data type is specified by the parameters Output data type.
Data types |
|
Complex numbers support |
Yes |
Parameters
Main
#
Gain value —
scale factor
Scalar / array of real numbers
Details
The scale factor applied to the calculated derivative.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Initial condition for previous weighted input K*u/Ts —
the initial condition
Scalar / array of real and/or complex numbers
Details
The initial condition for the previous scaled input value.
Default value |
|
Program usage name |
|
Tunable |
Yes |
Evaluatable |
Yes |
Signal Attributes
#
Output data type —
type of output data
Inherit: auto
| Float64
| Float32
| Int8
| UInt8
| Int16
| UInt16
| Int32
| UInt32
| Int64
| UInt64
| Int128
| UInt128
| Fixed-point
Details
Specify the type of output data. You can ask:
-
Data type inheritance
Inherit: auto
. -
An embedded data type, for example,
Float32
. -
Fixed point data type
Fixed-point
.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Output fixed-point type —
fixed-point output type
Data type
Details
Specify the type of fixed-point output.
Dependencies
This parameter appears when for the parameter Output data type value selected Fixed-point
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Integer rounding mode —
rounding mode for fixed point operations
Ceiling
| Convergent
| Floor
| Nearest
| Round
| Zero
Details
Select the rounding mode for fixed-point operations. You can choose:
-
Floor
— rounds down both positive and negative numbers (towards negative infinity). -
Ceiling
— rounds up both positive and negative numbers (towards positive infinity). -
Convergent
— rounds the number to the nearest representable value. If the fractional part of the number ends in 5, the number is rounded to the nearest even integer. -
Nearest
— rounds the number to the nearest representable value. If the fractional part of the number ends in 5, the number is rounded up (towards positive infinity). -
Round
— rounds the number to the nearest integer.
-
Zero
— rounds the number towards zero.
The block parameters are always rounded to the nearest representable value.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Saturate to max or min when overflows occur —
method of action in case of overflow
Logical
Details
When this check box is selected, the value that goes beyond the type limits is reset to the maximum or minimum value that the selected data type can represent. Otherwise, overflow transfer occurs.
When this option is selected, saturation is applied to all internal operations in the block, not just to the output or result.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |