2-d map look-up and interpolation.
None (Main library). (See Section 2.3, “Licensed Features”.)
Looks up the input x and y in the X-axis Data and Y-axis Data parameters then interpolates between the corresponding Z Data parameter elements, giving a corresponding z(x,y) as output.
Some calibration tools provide a feature which shows the map in graphical or tabular
form together with the active interpolation point. OpenECU supports this feature by populating
the ASAP2 file with the signal names which correspond to the x and y inports.
To make this feature work, the x and y signals must be named DD entities with their
properties set to ExportedGlobal
.
The name of the map's x axis
(e.g. vftm_mymap_x
, see Section "Naming rules"). There
must be two or more elements in this parameter and that must be the same as the
number of elements as columns in parameter Z Data. The values of X-axis Data
must increase monotonically but adjacent values may be the same.
Value type: | Real | ||
Calibratable: | Yes, offline and online |
The name of the map's y axis
(e.g. vftm_mymap_y
, see Section "Naming rules"). There
must be two or more elements in this parameter and that must be the same as the
number of elements as rows in parameter Z Data. The values of Y-axis Data must
increase monotonically but adjacent values may be the same.
Value type: | Real | ||
Calibratable: | Yes, offline and online |
The name of the map's z matrix
(e.g. vftm_mymap_z
, see Section "Naming rules").
There must be the same number of rows as elements in parameter Y-axis Data
and number of columns as elements in parameter X-axis Data.
Value type: | Real | ||
Calibratable: | Yes, offline and online |
The periodicity of the block execution.
Range: [0.001, 3600] seconds
Value type: | Real | ||
Calibratable: | No |
The Simulink look-up and pre-index blocks can be used instead of the put_Calmap2d block. If a model uses the OpenECU data dictionary, then the axes and look-up data dictionary items must adhere to the naming convention and cannot be shared between look-up blocks. If a model uses the Simulink data dictionary, then the naming convention is not required, and axes and look-up DDEs can be reused between look-up blocks.
– Note that other combinations are possible, see Section 4.2.2.2, “Data dictionary files” for details.
– Note that in some cases, the Simulink look-up block can be slower to run than the put_Calmap2d block.
– Note that when using Simulink look-up blocks with the Diab compiler, the following warning message is emitted during model builds. The warning can be ignored.
'[model].c', line [line]: warning (dcc:1792): trying to assign 'ptr to volatile' to 'ptr'
The look-up and interpolation work as follows:
If the value of inport x lies outside the range defined by the smallest and largest values of parameter X-axis Data, it is altered until it meets that range (i.e. it is made equal to the nearest x value which does occur in parameter X-axis Data). Similarly the value of inport y is made to meet the range defined by the smallest and largest values in parameter Y-axis Data.
This effectively clips the output value as if it were looked up at the nearest defined break-point, which differs from the behaviour of the standard Simulink look-up block in older versions (e.g., Simulink R12).
If the point (x, y) is coincident with one of the intersections of the X-axis Data and Y-axis Data breakpoints (i.e. the value of inport x equals one of the values in parameter X-axis Data and the value of inport y equals one of the values in parameter Y-axis Data), the block outputs the corresponding element value of parameter Z Data with no interpolation. This includes the outer boundary (and corners) of the area defined by the x and y axes. If more than one point in either axis parameter equals the value of one of the inports, such that a discontinuity is defined in the surface, the lowest-indexed parameter element is selected.
If the point (x, y) is coincident with a X-axis Data element but lies between Y-axis Data elements, then the value output is linearly interpolated between the bounding points in the y direction referenced to the x axis. If two or more values in parameter X-axis Data equal the value of inport x, the lowest-indexed entry is used.
If the point (x, y) is coincident with a Y-axis Data element but lies between X-axis Data elements, then the value output is linearly interpolated between the bounding points in the x direction referenced to the y axis. If two or more values in Y-axis Data equal to the value of inport y, the lowest-indexed entry is used.
If the point (x, y) is not coincident with any X-axis Data or Y-axis Data elements, the outport z(x,y) is obtained by bi-linearly interpolating between the bounding points in the x and y axes defined by the lower-indexed x and y elements.