Engee documentation

2-D Lookup Table

Two-dimensional approximation function.

2 d lookup table

Description

Block 2-D Lookup Table calculates the approximate value of the function from the known values of the function at the reference points, given the data points , , . The points are identical to and .

The data vectors and must be strictly increasing. The size of the array of tabulated function values must match the dimensionality of the interpolation grid. That is, if the inputs are a vector of 1 at and a vector of 1 at , that is, if the reference points are specified as a vector of dimension at .

The block calculates the output value based on usage of the lookup table and the selected interpolation and extrapolation methods.

You can read more about interpolation and extrapolation methods here: Methods of approximation of function values

The block icon 2-D Lookup Table displays the graph of the function defined in the block.

Ports

Output

# OUT_1 — output signal calculated by searching or interpolating from the table of values
scalar | vector | matrix

Details

An output signal calculated by searching or interpolating from a table of values.

Data types

Float64.

Complex numbers support

Yes

Input

# u1 — function argument on the first dimension (rows)
scalar | vector | matrix

Details

An input signal , matched to an output value by searching or interpolating from a table of values.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Complex numbers support

Yes

# u2 — function argument on the second dimension (columns)
scalar | vector | matrix

Details

An input signal , matched to an output value by searching or interpolating from a table of values.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Complex numbers support

Yes

# T — output table
`value matrix with dimension corresponding to the number of table dimensions and the number of reference points for each table dimension'

Details

Define an output value table with a runtime configurable signal.

During simulation, the size of the matrix must match the number of reference points for each dimension of the table. However, during block diagram editing, you can enter an empty matrix or an undefined workspace variable. This technique allows you to postpone specifying a matrix with the correct dimensions for the table data and continue editing the flowchart.

Dependencies

To use this port, set the parameters to Table data source value Input port.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool .

Complex numbers support

Yes

# bp — datums
`Vector of monotonically increasing values of 1 by n or n by 1'

Details

Specify the values of the reference points based on the signal adjusted at runtime.

Dependencies

To use this port, set the parameters to Breakpoints 1 source value Input port.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool .

Complex numbers support

Yes

Parameters

Основные

# Table data — output value table
Matrix of real and/or complex numbers

Details

Table of output values.

Default value

[4 5 6; 16 19 20; 10 18 23]

Program usage name

Table

Tunable

Yes

Evaluatable

Yes

# Table data source — table data source
Dialog | Input port

Details

The data source for the table specified as:

  • Dialog - table data specified in parameters Table data.

  • Input port - table data will be received through the corresponding input port.

Values

Dialog | Input port

Default value

Dialog

Program usage name

TableSource

Tunable

No

Evaluatable

No

# Breakpoints 1 — reference point values for the first measurement (rows)
Array of real numbers

Details

Reference points for the first dimension (rows). Data set presented as a table where values are represented in cells with coordinates (row, column).

The first dimension (rows) anchor points to the values of the rows in this table.

Dependencies

To use this parameter, set parameter Breakpoints 1 source value Dialog.

Default value

[1, 2, 3]

Program usage name

BreakpointsForDimension1

Tunable

Yes

Evaluatable

Yes

# Breakpoints 1 source — data source for datum points from the first measurement
Dialog | Input port

Details

The data source for the first dimension datums (rows) specified as:

  • Dialog - datum data for datum points specified in parameters Breakpoints 1.

  • Input port - The reference point data will be received via the corresponding input port.

Values

Dialog | Input port

Default value

Dialog

Program usage name

BreakpointsForDimension1Source

Tunable

No

Evaluatable

No

# Breakpoints 2 — reference point values for the second dimension (columns)
Array of real numbers

Details

Second dimension datum points (columns). A data set presented as a table where values are represented in cells with coordinates (row, column).

Second dimension anchor points (columns) point to the values of the columns in this table.

Dependencies

To use this parameter, set parameter Breakpoints 2 source value Dialog.

Default value

[1, 2, 3]

Program usage name

BreakpointsForDimension2

Tunable

Yes

Evaluatable

Yes

# Breakpoints 2 source — data source for datums in the second dimension
Dialog | Input port

Details

The data source for the reference points in the second dimension, specified as:

  • Dialog - Breakpoints 2 reference point data is specified in the Breakpoints 2 parameters.

  • Input port - The reference point data will be received via the corresponding input port.

Values

Dialog | Input port

Default value

Dialog

Program usage name

BreakpointsForDimension2Source

Tunable

No

Evaluatable

No

Методы аппроксимации

# Interpolation method — method of interpolation between the values of reference points
Flat | Nearest | Linear point-slope | Linear Lagrange | Cubic spline

Details

When the input signal falls between the reference point values, the unit interpolates the output value using the neighbouring points.

Read more about interpolation methods here: Methods of approximation of function values

Dependencies

If you select `Cubic spline`then the block will only support scalar signals. Other interpolation methods support non-scalar signals.

Values

Flat | Nearest | Linear point-slope | Linear Lagrange | Cubic spline

Default value

Linear point-slope

Program usage name

InterpMethod

Tunable

No

Evaluatable

No

# Extrapolation method — a method of processing input values that are outside the range of the dataset of reference points
Clip | Linear | Cubic spline

Details

Choice of extrapolation method.

Read more about extrapolation methods here: Methods of approximation of function values

Dependencies

To choose Cubic spline for Extrapolation method, you must also select Cubic spline for Interpolation method.

Values

Clip | Linear | Cubic spline

Default value

Linear

Program usage name

ExtrapMethod

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes