Math

LookupTable2D Block

2-D lookup table with bilinear interpolation. Maps two input values (x, y) to an output value using breakpoints and table data.

Open LookupTable2D in BlockWerk →

# 2-D Lookup Table Block

Description

The 2-D Lookup Table block maps two input values (x, y) to an output value using bilinear interpolation within a predefined grid of data points. It is commonly used for complex nonlinear relationships that depend on two variables, such as motor efficiency maps, aerodynamic drag coefficients, or complex sensor calibrations.

Parameters

X Breakpoints (xBreakpoints)

A space-separated list of strictly monotonically increasing values representing the x-axis grid coordinates. Example: 0 1 2 3

Y Breakpoints (yBreakpoints)

A space-separated list of strictly monotonically increasing values representing the y-axis grid coordinates. Example: 0 10 20

Table Data (tableData)

A space-separated list of output values (z). The data must be provided in row-major order (iterating through all x columns for the first y row, then the second y row, etc.). The total number of elements must equal length(xBreakpoints) * length(yBreakpoints).

Extrapolation

Behavior when inputs fall outside the defined breakpoint ranges:

xBreakpoints

Type: text (Default: "0 1")

X Breakpoints parameter description placeholder.

yBreakpoints

Type: text (Default: "0 1")

Y Breakpoints parameter description placeholder.

tableData

Type: text (Default: "0 1 1 2")

Table Data (row-major) parameter description placeholder.

extrapolation

Type: select (Default: "linear")

How to handle input values outside the bounds of the X/Y breakpoints. Linear extrapolates the plane of the last cell; Clip limits to the boundary value.

interpolation

Type: select (Default: "linear")

Interpolation method to use. Options: Linear, Spline.

Examples

Efficiency Map

Mapping speed (x) and torque (y) to determine motor efficiency (z).

Remarks

See Also