High_Frequency_Assist_MDD

Module –

High-Level Description

This module compensates for system inertia and road feedback. It puts handwheel torque through a high-pass filter and multiplies it by a tunable gain parameter to compensate for these factors.

Figures

Component Diagram


Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
VehicleSpeed_Kph_f32HighFreqAssist_MtrNm_f32
HwTorque_HwNm_f32
WIRCmdAmpBlnd_MtrNm_f32

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
HwTorqueHPFKSV_Cnt_M_strSingle Precision Float-1010HYSTADD_START_SEC_VAR_CLEARED_UNSPECIFIED
GainBlend_Uls_D_f32Single Precision Float01HIGHFREQASSIST_START_SEC_VAR_CLEARED_32
GainWIRZero_MtrNmpHwNm_D_f32Single Precision Float010HIGHFREQASSIST_START_SEC_VAR_CLEARED_32
GainVal_MtrNmpHwNm_D_f32Single Precision Float010HIGHFREQASSIST_START_SEC_VAR_CLEARED_32

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

None

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
t_LPFKnY_Hz_u7p9[12]
t_CmnVehSpd_Kph_u9p7[12]
t2_TorqX0_HwNm_u5p11[12][13]
t2_TorqX1_HwNm_u5p11[12][13]
t2_GainY0_MtrNmpHwNm_u3p13[12][13]
t2_GainY1_MtrNmpHwNm_u3p13[12][13]
t2_WIRBlendX_MtrNm_u4p12[12][5]
t2_WIRBlendY_Uls_u1p15[12][5]

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
<None>

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_ZERO_ULS_F32
D_2MS_SEC_F32

Module specific Lookup Tables Constants

Constant NameResolutionValueSoftware Segment
None


Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. FPM_FloatToFixed_m

  2. FPM_FixedToFloat_m

  3. Abs_s16_m

  4. IntplVarXY_u16_u16Xu16Y_Cnt

  5. BilinearXMYM_u16_u16XMu16YM_Cnt

  6. TableSize_m

  7. Blend_f32

  8. HPF_KUpdate_f32_m

  9. HPF_OpUpdate_f32_m

Data Hiding Functions

  1. <None>

Global Functions/Macros Defined by this Module

None

Local Functions/Macros Used by this MDD only

None

Software Module Implementation

Runtime Environment (RTE) Initial Values

This section lists the initial values of data written by this module but controlled by the RTE. After RTE initialization, the data in this table will contain these values.

DataValue
Rte_InitValue_HighFreqAssist_MtrNm_f320
Rte_InitValue_HwTorque_HwNm_f320
Rte_InitValue_VehicleSpeed_Kph_f320
Rte_InitValue_WIRCmdAmpBlnd_MtrNm_f320

Initialization Functions

None


Periodic Functions

Per: _Per1

Design Rationale

None

Program Flow Start

Rte_Call_HighFreqAssist_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

HwTorque_HwNm_T_f32 = Rte_IRead_HighFreqAssist_Per1_HwTorque_HwNm_f32()

VehicleSpeed_Kph_T_f32 = Rte_IRead_HighFreqAssist_Per1_VehicleSpeed_Kph_f32()

WIRCmdAmpBlnd_MtrNm_T_f32 = Rte_IRead_HighFreqAssist_Per1_WIRCmdAmpBlnd_MtrNm_f32()

HwTorque_HwNm_T_s4p11 = FPM_FloatToFixed_m(HwTorque_HwNm_T_f32, s4p11_T)

AbsHwTorque_HwNm_T_u5p11 = Abs_s16_m(HwTorque_HwNm_T_s4p11)

VehicleSpeed_Kph_T_u9p7 = FPM_FloatToFixed_m(VehicleSpeed_Kph_T_f32, u9p7_T)

WIRCmdAmpBlnd_MtrNm_T_u4p12 = FPM_FloatToFixed_m(WIRCmdAmpBlnd_MtrNm_T_f32, u4p12_T)

Determine Filter Frequency

Determine Gain

Filter and Output

Store Local copy of outputs into Module Outputs

GainBlend_Uls_D_f32 = GainBlend_Uls_T_f32

GainWIRZero_MtrNmpHwNm_D_f32 = GainWIRZero_MtrNmpHwNm_T_f32

GainVal_MtrNmpHwNm_D_f32 = GainVal_MtrNmpHwNm_T_f32

Rte_IWrite_HighFreqAssist_Per1_HighFreqAssist_MtrNm_f32(HighFreqAssist_MtrNm_T_f32);

Program Flow End

Rte_Call_HighFreqAssist_Per1_CP1_CheckpointReached()


Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

None


Execution Requirements

Execution Sequence of the Module

The periodic function is called at a rate of 2ms in all states.

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
HighFreqAssist_Per12 msALL

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
<None>


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
HighFreqAssist_Per1RTE_START_SEC_AP_HIGHFREQASSIST_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment
None


Known Issues / Limitations With Design

  1. INLINE functions in GlobalMacro.h are not unit tested


Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial Version05-Apr-12OT
22.0Check points added for the runnable executables21-Sep-12SSK
33.0Updated to FDD ver 0022-May-13Jared
Last modified October 12, 2025: Initial commit (0347a62)