MATLAB: How exactly does Simulink perform 2-D interpolation when using the 2-D lookup table block

2-d2dinterpolateinterpolationlinearlooklookupn-dndpointsimulinkslopetableup

In my model, I use a 2-D lookup table block with the interpolation method set to “linear”. In the documentation, this method is described as:
“Fits a line between the adjacent breakpoints, and returns the point on that line corresponding to the input.”
This is easy to visualize for 1-D interpolation. How exactly would this method apply to 2-D or n-D interpolation? 

Best Answer

The linear interpolation method used by all the look-up tables in Simulink is an algorithm called “Linear Point Slope”. This algorithm gets the values with regards to each dimension, finds the in-between point, and then repeats for the next dimension. The diagram below demonstrates this with real numbers for the case of a 2-D lookup table. The values U_1 and U_2 are the input signals routed to the look-up table block.
The following equations could then be used to calculate x_12, y_12, and the final output.
This methodology could then be extended to an n-D lookup table.