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 Inputs | Module Outputs | |
---|---|---|
VehicleSpeed_Kph_f32 | HighFreqAssist_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 Name | Resolution | Legal Range (min) | Legal Range (max) | Software Segment |
---|---|---|---|---|
HwTorqueHPFKSV_Cnt_M_str | Single Precision Float | -10 | 10 | HYSTADD_START_SEC_VAR_CLEARED_UNSPECIFIED |
GainBlend_Uls_D_f32 | Single Precision Float | 0 | 1 | HIGHFREQASSIST_START_SEC_VAR_CLEARED_32 |
GainWIRZero_MtrNmpHwNm_D_f32 | Single Precision Float | 0 | 10 | HIGHFREQASSIST_START_SEC_VAR_CLEARED_32 |
GainVal_MtrNmpHwNm_D_f32 | Single Precision Float | 0 | 10 | HIGHFREQASSIST_START_SEC_VAR_CLEARED_32 |
User defined typedef definition/declaration
This section documents any user types uniquely used for the module.
Typedef Name | Element Name | User 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 Name | Resolution | Units | Value |
---|---|---|---|
<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 Name | Resolution | Value | Software 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,
FPM_FloatToFixed_m
FPM_FixedToFloat_m
Abs_s16_m
IntplVarXY_u16_u16Xu16Y_Cnt
BilinearXMYM_u16_u16XMu16YM_Cnt
TableSize_m
Blend_f32
HPF_KUpdate_f32_m
HPF_OpUpdate_f32_m
Data Hiding Functions
<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.
Data | Value |
---|---|
Rte_InitValue_HighFreqAssist_MtrNm_f32 | 0 |
Rte_InitValue_HwTorque_HwNm_f32 | 0 |
Rte_InitValue_VehicleSpeed_Kph_f32 | 0 |
Rte_InitValue_WIRCmdAmpBlnd_MtrNm_f32 | 0 |
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 Name | Calling Frequency | System State(s) in which the function is called |
---|---|---|
HighFreqAssist_Per1 | 2 ms | ALL |
Execution Requirements for Serial Communication Functions
Function Name | Sub-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 Module | Software Segment |
---|---|
HighFreqAssist_Per1 | RTE_START_SEC_AP_HIGHFREQASSIST_APPL_CODE |
Local Functions
This table identifies the software segments for local functions identified in this module.
Name of Sub Module | Software Segment |
---|---|
None |
Known Issues / Limitations With Design
INLINE functions in GlobalMacro.h are not unit tested
Revision Control Log
Item # | Rev # | Change Description | Date | Author Initials |
---|---|---|---|---|
1 | 1.0 | Initial Version | 05-Apr-12 | OT |
2 | 2.0 | Check points added for the runnable executables | 21-Sep-12 | SSK |
3 | 3.0 | Updated to FDD ver 002 | 2-May-13 | Jared |