Search code examples
databasematlabsimulinklookup-tablesaero

Preparing simulink look-up table for unconventional data


I have following question:

I have following kind of data for which a look-up table is to be made:

A table for which the look-up table is to be made in simulink

In this table, the very first row of .11 .22.... have corresponding 3 columns underneath of every number.

In simulink If I will give enquiry of any number from first row (lets say .22) and a PR value (lets say 1), I need the corresponding output as .098 and .675.

In case If I want to interpolate from first row (let say X in between .22 and .33) then also the lookup table should produce 3 vectors underneath X to do the interpolation.

Plz suggest the method.


Solution

  • I suggest you to use n-D lookup table.

    enter image description here

    In the menu, set number of dimensions to 3 and object selection to Column.

    enter image description here

    Then, convert your initial table into 2x10x10 array in Matlab. The first dimension would represent fuel_flow and eff. The second dimension would be PR, the third dimension is whatever first row represents. Name this variable and pass it as table data for the block.

    The first input would have to be 0.11, 0.22 etc. and the second input would have to be PR value. The output of the block would be 2x1 vector with fuel_flow and eff. values

    Hope that helps