2D Lookup Table - MapleSim Help

2D Lookup Table

Generate an output signal based on values in a two-dimensional look-up table

 Description The 2D Lookup Table (or Lookup Table 2 D) component computes an output signal by two-dimensional interpolation of a data table, using the input values $u$ and $v$. The first column of the table contains the values of $u$, the first row of table contains the values of $v$. If the table has only one element, the output is independent of the input signal, that is, the table value is returned as the output.

Data Source Options

The data source parameter selects the source for the data. It can be either file, attachment, or inline.

 • file: the data is saved in an Excel or a CSV file on the hard drive. Use the data parameter to browse to and select the data file.
 • attachment: the data set is attached to the MapleSim model. Use the data parameter to select the attachment that contains the data set.
 Note: In the Attachments pane, your data set file must be attached in the Data Sets category. For more information, see Attaching a File to a Model.
 – Attach a Microsoft® Excel® (.xls/.xlsx) or comma separated value (.csv) file containing the data values to the model.
 – Generate a data set in the Apps Manager tab using either the Data Generation app or Random Data Generation app. Data sets that you generate have the .csv file extension. For more information about MapleSim apps, see Opening MapleSim Apps and Templates.
 • inline: enter the data table in the table parameter as an m (rows) by n (columns) matrix.
 – To change the dimensions of table, right-click (Control-click for Mac®) the parameter field and select Edit Matrix Dimensions. In the Matrix Dimensions dialog, enter values for the number or rows and columns and then click OK.

For all data source options, elements $2$ though m of the first column in the data table correspond to the input $u$, and elements $2$ through n of the first row correspond to the input $v$.

The data table must have at least $2$ rows and at least $2$ columns. For a $2$ by $2$ data table, the output is constant and corresponds to the value in the second row and second column of the data table.

Connections

 Name Description Modelica ID $u$ Real input signal u $v$ Real input signal v $y$ Real output signal y

Parameters

 Name Default Units Description Modelica ID $\mathrm{data source}$ $\mathrm{inline}$ Data source datasourcemode $\mathrm{table}$ $\left[\begin{array}{ccc}0& 1& 2\\ 1& 1& 2\\ 2& 2& 4\end{array}\right]$ Data set table $\mathrm{file name}$ $\mathrm{DataFileName}$ The path to the external filename fileName $\mathrm{data}$ Attached data set data $\mathrm{smoothness}$ Linear interpolation Selects interpolation: linear, cubic spline, or none smoothness

 Modelica Standard Library The component described in this topic is from the Modelica Standard Library. To view the original documentation, which includes author and copyright information, click here.