Main Content

Model Nonlinearity Using Lookup Tables

R2026b
Model nonlinearity using lookup tables through input-output mapping with interpolation between defined points

When solving science and engineering problems, you often need to model nonlinearities where changes in input do not produce proportional changes in output, resulting in varying stability and equilibrium conditions. Simulink® provides a comprehensive set of lookup table blocks, objects, and tools that you can use to efficiently model nonlinearities. Lookup tables map input values of a system to its output values and store the mapped data in a table. During real-time computations, the lookup tables use the stored data to look up outputs that correspond to different inputs of a system.

You can use these lookup table blocks, objects and tools to:

  • Model stateless nonlinear systems by approximating mathematical functions or experimental data using lookup tables.

  • Simulate, analyze, and tune lookup tables within a Model-Based Design workflow.

  • Optimize lookup tables to balance memory usage, execution performance, and numerical accuracy.

  • Generate production-ready code for supported target languages with industry-standard interfaces.

For more information, see Lookup Table Overview.

Input-output mapping using 1-D Lookup Table block that uses interpolation.

Blocks

1-D Lookup Table block1-D Lookup TableApproximate one-dimensional function
2-D Lookup Table block2-D Lookup TableApproximate two-dimensional function
n-D Lookup Table blockn-D Lookup TableApproximate n-dimensional function
Direct Lookup Table (n-D) blockDirect Lookup Table (n-D)Index into n-dimensional table to retrieve element, vector, or 2-D matrix
Interpolation Using Prelookup blockInterpolation Using PrelookupUse precalculated index and fraction values to accelerate approximation of N-dimensional function
Prelookup blockPrelookupCompute index and fraction for Interpolation Using Prelookup block
Sine blockSine, CosineImplement fixed-point sine or cosine wave using lookup table approach that exploits quarter wave symmetry

Objects

Simulink.LookupTableStore and share lookup table and breakpoint data, and configure data for ASAP2 and AUTOSAR code generation
Simulink.BreakpointStore and share data for breakpoint set, and configure the data for ASAP2 and AUTOSAR code generation
Simulink.lookuptable.EvenspacingConfigure evenly spaced breakpoint set for lookup table object
Simulink.lookuptable.TableConfigure table data for lookup table object
Simulink.lookuptable.BreakpointConfigure breakpoint set data for lookup table object
Simulink.lookuptable.StructTypeInfoConfigure settings for structure type that lookup table object uses in generated code

Tools

Lookup Table EditorCreate, edit, and manage lookup tables in models (Since R2022a)

Topics

Understand Lookup Tables

Use Lookup Tables to Approximate Nonlinear Systems

Edit and Visualize Lookup Tables

Update Lookup Tables from Previous Releases

Featured Examples