MotoHawk:Blocks:Interpolation2D

From MotoHawk
Jump to navigationJump to search

Interpolation (2-D)

This MotoHawk™ block behaves similarly to the native Simulink Interpolation (2-D) using Prelookup block, with n=2.

Block ID

motohawk_interpolation_2d

Library

MotoHawk_lib/Lookup Tables

Description

Interpolation2D.PNG

This block performs a linear interpolation on an 2-D matrix, "Table Data," using precalculated indices and distance fractions provided by the Prelookup block. End values of Table Data is used for input outside of the Breakpoint Data. It is used with the MotoHawk Prelookup or MotoHawk Prelookup Reference block.

Block Parameters

Parameter Field Values Comments/Description
Name Alpha-numeric text, single-quote enclosed Name as displayed in block, MotoTune, for block. No special characters, such as spaces, dashes, commas (underscore allowed). The output is typically assigned a Display variable with this name, and the 2-D Calibration table has the suffix 'Map'.
Table Data Define data to be used Define the data -- a 2-D matrix of values to be accessed (or select type in Table Data Type), using valid MatLab expression. Note that the data type of the table data determines the output port data type.
Table Data Type Drop-down list Select a data type from list, or select "Inherit from 'Table Data'" to set type as inferred from entry in Table Data field. Be sure to select a data type if there is possible ambiguity.
Storage and Accessibility Select data storage option
NonAdaptive Values do not change at runtime, except via calibration.
Adaptive - Volatile Values can change at runtime (using Adapt Table block) - will not be saved over power-up cycles
Adaptive - NonVolatile Values can change at runtime (using Adapt Table block) - will be saved over power-up cycles
Read Access Level 1-4 Sets security level 1 lowest, 4 highest, for user access to read value
Write Access Level 1-4 Sets security level 1 lowest, 4 highest, for user access to write value
Use uploaded calibration values from MotoTune Checkbox enable Enable/disable to use or ignore uploaded values from MotoTune
Help Text Alpha-numeric text, single-quote enclosed Enter text to describe block usage per needs.
Table Units Alpha-numeric text, single-quote enclosed Enter text to describe or label units or data for clarification in MotoTune, as appropriate per application.
Minimum Value Numeric Value Sets lower end of allowable range for value. This can be used to prevent a user from entering an out of range number when calibrating.
Maximum Value Numeric Value Sets higher end of allowable range for value. This can be used to prevent a user from entering an out of bounds range when calibrating.
Precision Numeric value, single-quote enclosed Set the precision of the variable as displayed in MotoTune, by entering a value '1.x' where "x" is the number of decimal places requested. Default is two decimal places.
Gain* Numeric Value Multiplier applied (Default is 1) to the raw value used in calculation of the engineering value as observed in MotoTune
Offset* Numeric Value Constant added (Default is 0) to the raw value calculations to result in the engineering value as observed in MotoTune
Exponent* Numeric Value Exponent applied (Default is 1) to the (raw value*gain) product used in calculating the engineering value as observed in MotoTune
Row Prelookup Name (optional) Alpha-numeric text, single-quote enclosed Name for row useful for pre-lookup reference. No special characters, such as spaces, dashes, commas (underscore allowed). If the Prelookup block for the input cannot be directly routed to this block for any reason, explicitly entering the name of the Prelookup Row/Column names will allow the VarDec to be found. This is sometimes a problem when using a Data Store to pass the output of the Prelookup index to this block, for example. An empty string in this field will let the code-generator determine the name of the Prelookup row of map that is directly attached.
Column Prelookup Name (optional) Alpha-numeric text, single-quote enclosed Name for column useful for pre-lookup reference. No special characters, such as spaces, dashes, commas (underscore allowed). If the Prelookup block for the input cannot be directly routed to this block for any reason, explicitly entering the name of the Prelookup Row/Column names will allow the VarDec to be found. This is sometimes a problem when using a Data Store to pass the output of the Prelookup index to this block, for example. An empty string in this field will let the code-generator determine the name of the Prelookup column of map that is directly attached.
Output Name (optional) Alpha-numeric text, single-quote enclosed List name of block output for clarity. If left blank, a VarDec will be generated called Name. If non-empty, a downstream Probe must be provided called Output Name, which allows customization of the output VarDec. An error will result if the VarDec does not exist. No special characters, such as spaces, dashes, commas (underscore allowed).
MotoTune Group String Alpha-numeric text, single-quote enclosed Determines Folder name and hierarchy as displayed in MotoTune. Use "|" character between folder names to delineate subfolder structure.

*NOTE: Engineering Value = (Raw Module Value*Gain)^Exp)+Offset.