2-D Lookup Table
MathThe 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.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in1 |
x | number | Required |
| → In | in2 |
y | number | Required |
| ← Out | out |
Out | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
xBreakpoints |
X Breakpoints | text | 0 1 |
|
yBreakpoints |
Y Breakpoints | hidden | 0 1 |
|
tableData |
Table Data (row-major) | hidden | 0 1 1 2 |
|
interpolation |
Interpolation | select | linear |
|
extrapolation |
Extrapolation | select | linear |
Usage Examples
Efficiency Map
Mapping speed (x) and torque (y) to determine motor efficiency (z).
Remarks & Best Practices
- Both
xBreakpointsandyBreakpointsmust be strictly increasing. - Providing mismatched dimensions between breakpoints and
tableDatawill result in configuration errors or NaN outputs. - Interpolation within the table bounds is always bilinear.
Related Components
- LookupTable: For 1-dimensional mappings.
- MathFunction: For standard analytic mathematical nonlinearities.