LookupTable
This block approximates a non-linear function using interpolation on data provided as a "1D-table".
Library
LookupTables
Description
The LookupTable block approximates a non-linear function using interpolation on data provided as a "table". This is one dimensional and the table is then defined by specifying two vectors (X and Y) of size n, with x monotonic. Output of the block is the approximation of the block input using the selected interpolation method.
If Y is a matrix, then the input should be a scalar. In this case, Y and the output have the same row size.
If Y is a vector, then the input can be scalar, vector or matrix. In this case, input and the output have the same size.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
xx | X | X values. Vector of doubles of size n (same size as vector Y). The X data vector must be strictly monotonically increasing. It can be either row or column provided Y is the same size. | Vector | |
yy | Y | Y values. Vector of doubles of size n (same size as vector X). When X is a row vector, Y can be a matrix with the same number of columns. | Matrix | |
Method | Interpolation method | Interpolation method, to be selected amongst: ZeroOrder(Floor), ZeroOrder(Ceil), ZeroOrder(Nearest), Linear, Not a Knot, Natural, Clamped. | String | 'ZeroOrder(floor)' |
typ | Output datatype | String | 'double' | |
EventGen | Apply zero crossings | Scalar | 0 | |
externalActivation | External activation | This parameter defines if the block receives an external activation or inherits. When External Activation is used, a additional activation port is added to the block. default is OFF. | Number | 0 |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
Leftside | Behavior on the left-hand side of the X data span | String | 'Zero' | |
Rightside | Behavior on the right-hand side of the X data span | String | 'Zero' |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | output | 1 | |
Port 2 | explicit | input | 1 | |
Port 3 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |