2D look-up table

Description of the two-dimensional look-up table component, which generates an output signal by interpolating based on a given data set and two input values.

Component Icon

Figure 1. Two dimensional look-up table icon

Description

Two-dimensional Lookup table generates an output signal by interpolating based on a given data set and two input values: input values x and input values y. The Input values x and the Input values y properties must be strictly increasing or decreasing arrays.

It supports equidistant and non-equidistant distribution of table indexes (Input values x and Input values y):
  • An example of equidistant distribution of input values would be: in_vec_x = [-2, -1, 0, 1, 2];
  • An example of non-equidistant distribution of input values would be: in_vec_x = [-4, 0, 2, 3, 10]

The table output can be calculated using equidistant space method or non-equidistant (binary search) implementation method.

When the input vectors (Input values x and/or Input values y) have non-equidistant distribution and equidistant space method is selected, internal conversion from non-equidistant to equidistant distribution will be done. In this case, a warning will be displayed during compilation.

Extrapolation can be done by clipping the output, using f(x,y) matrix boundary values, or by a linear method, using f(x,y) matrix boundary slopes.
  • If the extrapolation method is linear, a line between the first or last values of the output vector f(x,y) is traced, depending on whether the input values are less than the first or greater than the last values of the output vector. The linear extrapolation method returns the value of the generated line corresponding to the inputs.
The example shown in the documentation for the one-dimensional look-up table demonstrates how these implementation and extrapolation methods work.

Ports

  • In x (in)
    • Input signal x according to which the component will output a corresponding value taking into consideration the table indexes.
      • Supported types: uint, int, and real.
      • Vector support: no.
  • In y (in)
    • Input signal y according to which the component will output a corresponding value taking into consideration the table indexes.
      • Supported types: uint, int, and real.
      • Vector support: no.
  • Output (out)
    • Output signal related to the input values and the lookup table.
      • Supported types: real.
      • Vector support: no

Properties

  • Input values x
    • Type in the array of input values x used to calculate the output of the lookup table
  • Input values y
    • Type in the array of input values y used to calculate the output of the lookup table
  • Output values f(x, y)
    • Type in the array of output values according to the related input values used to calculate the output of the lookup table.
  • Implementation method
    • Choose the interpolation method used to calculate the output values when the input value is within the input array range.
  • Extrapolation method
    • Choose the extrapolation method used to calculate output values when the input value is outside of the input array range.
  • Execution rate
    • Type in the desired signal processing execution rate. This value must be compatible with other signal processing components of the same circuit: the value must be a multiple of the fastest execution rate in the circuit. There can be up to four different execution rates, but they must all be multiple of the basic simulation timestep. To specify the execution rate, you can use either decimal (e.g. 0.001) or exponential values (e.g. 1e-3) in seconds. Alternatively, you can type in ‘inherit’ in which case the component will be assigned execution rate based on the execution rate of the components it is receiving input from.