Vehicle Data Preprocessing Formulas
Vehicle data preprocessing uses formulas to describe how vehicle signals (such as read on the CAN-bus) are combined and transformed in order to control Ansys Sound: ASDforEV sound functions.
Preprocessing formula syntax principle is similar to Polish notation: each operator is followed by its inputs (between brackets, and with "|" as an input separator). For example, in the Polish notation used here, "A + B" is written "+ ( A | B )".
Definitions
- Externals
-
A real-time parameter coming from either the Manual Mode sliders, Scenario Mode files, or CAN Mode external data. It is a preprocessing input.
In preprocessing formulas, externals are named in "snake case" (That is, each word is separated by the underscore character "_"), and always with an "_ext" suffix. As the formula is contextual, the sound function name or identifier (for example "Ambiance1") is not indicated in the name.
Examples:- Speed_ext
- Onoff_ext
- Silence_ext
- Custom6_ext
- Constant
-
An unchanging value that can be set by the user and that does not depend on incoming data (externals).
- Operation
-
A processing of 1 or 2 signals. Signals can be externals or results of other operations. Available operations, with possible inputs, are:
Table 1. List of available operations Operation description Input 1 possibilities Input 2 possibilities + Addition - External
- Operation
- External
- Operator
- Constant
- Subtraction - External
- Operation
- External
- Operator
- Constant
* Multiplication - External
- Operation
- External
- Operator
- Constant
/ Division - External
- Operation
- External
- Operator
- Constant
Mapper Conversion law (as a table, with linear interpolation). Note: Mapper data is not visible in the formula. - External
- Operation
None
Smooth Smoothing - External
- Operation
- Constant (smoothing time in ms)
Diff Differentiate (difference between current and previous values) - External
- Operation
None
Cumsum Cumulated sum - External
- Operation
None
Hold Delayed offsets - External
- Operation
Constant (holding time in ms) - Control
-
A control is a preprocessing output, which is then used in Ansys Sound: ASDforEV as a sound function control signal (For example Speed, HMI1 angle, etc.). It is the result of combinations of externals, constants, and operations.
Controls are named in "camel case" (that is, no space between words, each word’s first letter in upper case), with no suffix. Examples:
- Speed
- OnOff
- SilenceDuration
When using ASDforEV CAN reader, for each control of a given sound function, available externals are those that were selected for that particular function in the CAN reader, but also all "Other" and "Custom" parameters ("Other" and "Custom" tabs in the CAN reader). For example:
- For control Speed, available externals are:
- "Speed_ext", "RPM_ext", "Load_ext", "Acceleration_ext", "Torque_ext", "Brake_ext" ("Vehicle" tab parameters)
- "Steering_ext", "Traffic level_ext", etc. ("Other" tab parameters)
- "Custom1_ext", "Custom2_ext", etc. ("Custom" tab parameters)
- For control SpatializationAngle of sound function HMI1, available externals
are:
- "Onoff_ext", "Silence_ext", "Angle_ext" (of HMI1 function, although the names do not indicate it)
- "Steering_ext", "Traffic level_ext", etc. ("Other" tab parameters)
- "Custom1_ext", "Custom2_ext", etc., ("Custom" tab parameters)
Contextual external availability is summarized in Table 2. See also Ansys Sound: ASDforEV API Documentation.
Note: Although they are named differently than the corresponding keywords in the API, externals' values correspond exactly to the values received through the API.For example, the values of the external "Speed_ext" are those received through the API with the keyword "Speed", and are presumed to be different from those of the control "Speed" (unless a direct routing is used).
Table 2. External availability for each control (The terms between brackets are not included in the formulas.) Control Available externals to these Controls to all Controls Speed
RPM
Load
Acceleration
Torque
Brake
Speed_ext
RPM_ext
Load_ext
Acceleration_ext
Torque_ext
Brake_ext
Mode_ext
Steering_ext
Traffic_ext
Lighting_ext
Temperature_ext
Rain_ext
OutLight_ext
Wind_ext
Time_ext
Custom1_ext
Custom2_ext
Custom3_ext
Custom4_ext
Custom5_ext
Custom6_ext
Custom7_ext
Custom8_ext
Custom9_ext
Custom10_ext
PresetSelection
(Ambiance<i>)OnOff
(Ambiance<i>)SpatializationAngle
(Ambiance<i>_)Onoff_ext
(Ambiance<i>_)Angle_ext
(SAF)Activate
(SAF)SpatializationAngle
(SAF)SpatializationDiffuseness
(SAF Granulator<i>)Position
(SAF Granulator<i>)Width
(SAF Granulator<i>)GrainSize
(SAF Granulator<i>)Overlap
(SAF Granulator<i>)Pitch
(SAF Granulator<i>)Gain
SAF_Activate_ext
SAF_Angle_ext
SAF_Diffuseness_ext
(ICE-ASD)Activate
(ICE-ASD)RPM
(ICE-ASD)Speed
(ICE-ASD)Load
(ICE-ASD)Acceleration
ICEASD_Activate_ext
ICEASD_RPM_ext
ICEASD_Speed_ext
ICEASD_Load_ext
ICEASD_Acceleration_ext
(AVAS Granulator<i>)Position
(AVAS Granulator<i>)Width
(AVAS Granulator<i>)GrainSize
(AVAS Granulator<i>)Overlap
(AVAS Granulator<i>)Pitch
(AVAS Granulator<i>)Gain
(ADAS<i>)OnOff
(ADAS<i>)SilenceDuration
(ADAS<i>)SpatializationAngle
(ADAS<i>)Pitch
(ADAS<i>)Gain
(ADAS<i>_)Onoff_ext
(ADAS<i>_)Silence_ext
(ADAS<i>_)Angle_ext
(HMI<i>)OnOff
(HMI<i>)SilenceDuration
(HMI<i>)SpatializationAngle
(HMI<i>_)Onoff_ext
(HMI<i>_)Silence_ext
(HMI<i>_)Angle_ext
An example
would be written as the following formula:
Speed = Smooth ( Mapper ( + ( * ( Torque_ext | 0.3 ) | * ( Speed_ext | 1.2 ) ) ) | 300 )