AbsHwPosSCom_MDD

Module -- AbsHwPosScom

This module determines the handwheel position representing the angle of the output shaft without using a physical column position sensor.

The function uses the Motor Position to provide an estimate of the handwheel position. In addition this function also uses the absolute hw position transmitted on the serial communication interface to provide and estimate of the HwPos. value.

High-Level Description

(Description must be within 8-10 lines.)

Figures

Diagram – Function Data Sharing

Diagram – Function (Name)


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.

(Note: Full variable names required in table.)

(Note: All global variables including End Of Line data used should be shown here)

Module InputsModule Outputs
CRFCumMtrPos_Deg_f32HwPosAuthority_Uls_f32
CRFMtrTrqCmd_MtrNm_f32HwPos_HwDeg_f32
CRFMtrVel_MtrRadpS_f32
DiagStsHwPosDis_Cnt_lgc
HwTrq_HwNm_f32
SComInpHwAValid_Cnt_lgc
SComInpHwA_HwDeg_f32
VehicleSpeedValid_Cnt_lgc
VehicleSpeed_Kph_f32
KinIntDiagSrlComSvcDft_Cnt_lgc

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
HwPFilter1En_Cnt_M_lgcBOOLEANFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN
HwPFilter2En_Cnt_M_lgcBOOLEANFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN
VehDynTrgtAngle_HwDeg_M_f32Single precision floating point-1575164.81575164.8ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
VehDynTrgtAuth_Uls_M_f32Single precision floating point01ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPHighSpdAC_Cnt_M_lgcBOOLEANFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN
PinTrqFiltSV_HwNm_M_StrN/AN/AN/AABSHWPOSSCOM_START_SEC_VAR_CLEARED_UNPECIFIED
PinTrqFiltSV_HwNm_M_Str .K_Uls_f32Single precision floating point8.04215E-050.039414597
PinTrqFiltSV_HwNm_M_Str.SV_Uls_f32Single precision floating point-318318
HwPMtrVelT1Cal_MtrRadpS_M_f32Single precision floating point0700ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPVSpdT1Cal_Kph_M_f32Single precision floating point0255ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPPinTrqT1Cal_HwNm_M_f32Single precision floating point010ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPTimer1Max_ms_M_u161060000ABSHWPOSSCOM_START_SEC_VAR_CLEARED_16
HwPWindowCal_HwDeg_M_f32Single precision floating point0100ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPFilter1Kn_Hz_M_f32Single precision floating point0.00020.1ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPFilter2Kn_Hz_M_f32Single precision floating point0.00020.1ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
AutoCntrTrgtAuth_Uls_M_f32Single precision floating point01ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPTimer2Max_ms_M_u161060000ABSHWPOSSCOM_START_SEC_VAR_CLEARED_16
HwPAutoCenter_Cnt_M_lgcBOOLEANFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN
HwPFilter1Init_Cnt_M_lgcBOOLEANFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN
HwPFilter2Init_Cnt_M_lgcBOOLEANFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN
HwPFilter1Prev_HwDeg_M_f32Single Precision Floating point-787558.4787606.4ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPFilter1Out_HwDeg_M_f32Single Precision Floating point-787558.4787606.4ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPFilter1SV_HwDeg_M_StrN/AN/AN/AABSHWPOSSCOM_START_SEC_VAR_CLEARED_UNPECIFIED
HwPFilter1SV_HwDeg_M_Str.K_Uls_f32Single Precision Floating point8.04215E-050.039414597
HwPFilter1SV_HwDeg_M_Str.SV_Uls_f32Single Precision Floating point-787558.4787606.4
HwPFilter2Out_HwDeg_M_f32Single Precision Floating point-787558.4787606.4ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPFilter2SV_HwDeg_M_StrN/AN/AN/AABSHWPOSSCOM_START_SEC_VAR_CLEARED_UNPECIFIED
HwPFilter2SV_HwDeg_M_Str .K_Uls_f32Single Precision Floating point8.04215E-050.039414597
HwPFilter2SV_HwDeg_M_Str *SV_Uls_f32Single Precision Floating point-787558.4787606.4
HwPTimer1_ms_M_u321FULLFULLABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPTimer2_ms_M_u321FULLFULLABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
HwPTimer4_ms_M_u321FULLFULLABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
ScaledMtrPos_HwDeg_M_f32Float32-787558.4787606.4ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
MtrComplErr_HwDeg_M_f32Float32-1126.41126.4ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
TempHwPos_HwDeg_M_f32Float32-1575164.81575164.8ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
RelHwPos_HwDeg_M_f32Float32-787558.4787606.4ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
FiltPinionTrq_HwNm_M_f32single precision floating point-318318ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
FinHwPosLPFOp_HwDeg_M_f32single precision floating point-16201620ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
FinHwAuth_Uls_M_f32single precision floating point01ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
FinHwPosFiltSV_HwDeg_M_StrN/AN/AN/AABSHWPOSSCOM_START_SEC_VAR_CLEARED_UNPECIFIED
FinHwPosFiltSV_HwDeg_M_Str.K_Uls_f32single precision floating point00.999984637
FinHwPosFiltSV_HwDeg_M_Str.SV_Uls_f32single precision floating point-1575164.81575164.8
RelToSComOffset_HwDeg_M_f32Float32-789654789606.3ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
StabilitySyncTimer_mS_M_u32UINT32FULLFULLABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
NewScomInpHwA_HwDeg_M_f32Single precison floating point-1578812.81578812.738ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
ScomHwPosAuth_Uls_M_f32Single precison floating point01ABSHWPOSSCOM_START_SEC_VAR_CLEARED_32
VdynToScomErrorThy_HwDeg_M_f32Single precison floating point-16001600ABSHWPOSSCOM_START_SEC_VAR_SAVED_ZONEH_32
HwPosSrvSetToZero_Cnt_M_lgcn/aFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN
RelToScomOfstFound_Cnt_M_lgcn/aFALSETRUEABSHWPOSSCOM_START_SEC_VAR_CLEARED_BOOLEAN

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)

(Name given for the user defined typdef of type struct/union)

(Variable name qualified similar to all other variables)

(Variable name qualified similar to all other variables)as other variables
(Variable name qualified similar to all other variables)

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
k_AutoCtrMtrVelT1L_MtrRadpS_f32

k_AutoCtrVehSpdT1L_Kph_f32

k_AutoCtrPinTrqT1L_HwNm_f32

k_HwPTimer1MaxL_ms_u16

k_AutoCtrWindowL_HwDeg_f32

k_AutoCtrFiltOneCoeffkL_Hz_f32

k_AutoCtrFiltTwoCoeffkL_Hz_f32

k_VDAuthL_Uls_f32

k_AutoCtrTimer2LSpd_ms_u16

k_InvGearRatio_Uls_f32

k_AutoCtrPinTrqLPFCoeffK_Hz_f32

k_MtrVelTmr4H_MtrRadpS_f32

k_VehSpdTmr4H_kph_f32

k_PinTrqTmr4H_HwNm_f32

k_Tmr4CntrWindowH_HwDeg_f32

k_AutoCtrTimer4H_ms_u16

k_HwPMtrVelT1H_MtrRadpS_f32

k_HwPVehSpdT1H_Kph_f32

k_HwPPinionTrqT1H_HwNm_f32

k_HwPTimer1MaxH_ms_u16

k_HwPWindowCalH_HwDeg_f32

k_HwPFilter1KnH_Hz_f32

k_HwPFilter2KnH_Hz_f32

k_HiSpdAcAuth_Uls_f32

k_HwPTmr2MaxHiSpd_ms_u16

t_MtrPosComplTblX_MtrNm_u8p8[6]

t_MtrPosComplTblY_HwDegpMtrNm_u6p10[6]

k_RbstPosLPFKn_Hz_f32

k_KinmIntDiagMaxRackLmt_HwDeg_f32

k_HwPosOpLPFError_HwDeg_f32

k_HwPosAuthorityStep_Uls_f32

k_ScomHwPosAuth_Uls_f32
k_HwPosVehStabilityTime_mS_u16
k_HwPosVehStabilityTrqCmd_MtrNm_f32
k_HwPosVehStabilityHwTrq_HwNm_f32
k_HwPosVehStabilityMtrVel_MtrRadpS_f32
k_VdynToScomMaxErr_HwDeg_f32

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
D_ABSPOSLOLMT_HWDEG_F32Single precision floating pointHWDEG-1620
D_ABSPOSHILMT_HWDEG_F32Single precision floating pointHWDEG1620
D_10MS_SEC_F32Single precision floating pointSEC0.010

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_2MS_SEC_F32
D_ONE_ULS_F32

Module specific Lookup Tables Constants

(This is for lookup tables (arrays) with fixed values, same name as other tables)

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. LPF_SvUpdate_s16InFixKTrunc_m

  3. LPF_OpUpdate_s16InFixKTrunc_m

  4. Limit_m

  5. FPM_FixedToFloat_m

  6. Min_m

  7. Max_m

  8. LPF_SvInit_s16InFixKTrunc_m

Data Hiding Functions

  1. Rte_Call_NxtrDiagMgr_SetNTCStatus

Global Functions/Macros Defined by this Module

Global Function #1

Function Name(Exact name used)TypeMinMax
Arguments Passed(if none, write None)
(Insert more rows for additional passed arguments)
Return Value(if no value returned, write N/A)

Description

(Place flowchart/design for local function)

Local Functions/Macros Used by this MDD only

Local Function #1

Function NameHwPosSLFilter1TypeMinMax
Arguments PassedMtrPos_HwDeg_T_f32float32-787558.4787606.4
FilterEnbooleanFALSETRUE
Return Value(if no value returned, write N/A)

Description

(Place flowchart/design for local function)

Local Function #2

Function NameHwPosSLFilter2TypeMinMax
Arguments PassedMtrPos_HwDeg_T_f32float32-787558.4787606.4
FilterEnbooleanFALSETRUE
Return Value(if no value returned, write N/A)

Description

(Place flowchart/design for local function)

Local Function #3

Function NameFilter1EnableTypeMinMax
Arguments PassedCRFMtrVel_MtrRadpS_T_f32float32-11181118
VehSpd_Kph_T_f32float320512
VSpdValid _Cnt_T_lgcbooleanFALSETRUE
PinionTrq_HwNm_T_f32float32-318318
Return ValueHwPFilter1En_Cnt_T_lgcbooleanFALSETRUE

Description

(Place flowchart/design for local function)

Local Function #4

Function NameFilter2EnableTypeMinMax
Arguments PassedMtrPos_HwDeg_T_f32float32-787558.4787606.4
HwPFilter1En_Cnt_T_lgcbooleanFALSETRUE
Return ValueHwPFilter2En_Cnt_T_lgcbooleanFALSETRUE

Description

(Place flowchart/design for local function)

Local Function #5

Function NameCalSwitchTimerTypeMinMax
Arguments PassedCRFMtrVel_MtrRadpS_T_f32float32-11181118
VehSpd_Kph_T_f32float320512
VSpdValid _Cnt_T_lgcbooleanFALSETRUE
PinionTrq_HwNm_T_f32float32-318318
HwPFilter1En_Cnt_T_lgcbooleanFALSETRUE
HwPFilter2En_Cnt_T_lgcbooleanFALSETRUE
Return ValueNone

Description

(Place flowchart/design for local function)

Local Function #6

Function NameScomHwPosAuthTypeMinMax
Arguments PassedNone
Return ValueNone

Description

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
CRFCumMtrPos_Deg_f320
CRFMtrTrqCmd_MtrNm_f320
CRFMtrVel_MtrRadpS_f320
DiagStsHwPosDis_Cnt_lgcFALSE
HwTrq_HwNm_f320
SComInpHwAValid_Cnt_lgcFALSE
SComInpHwA_HwDeg_f320
VehicleSpeedValid_Cnt_lgcFALSE
VehicleSpeed_Kph_f320
KinIntDiagSrlComSvcDft_Cnt_lgcFALSE
HwPosAuthority_Uls_f320
HwPos_HwDeg_f320

Initialization Functions

(Note: For multiple init functions, insert new headers at the “Header 2” level – subset of “5.1 Initialization Functions” and follow the same sub-section design shown below)

Init: AbsHwPosScom_Init1

Design Rationale

(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)

Module Outputs

(Initialize all module outputs in this section)


Periodic Functions

Per: AbsHwPosScom_Per1

Design Rationale

Program Flow Start

Rte_Call_AbsHwPosScom_Per1_CP0_CheckpointReached()Store Module Inputs to Local copies

Processing

Store Local copy of outputs into Module Outputs

Program Flow End

Rte_Call_AbsHwPosScom_Per1_CP1_CheckpointReached()

Per: _Per2

Design Rationale

(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)

Program Flow Start

Rte_Call_AbsHwPosScom_Per2_CP0_CheckpointReached()Store Module Inputs to Local copies

Program Flow End

Rte_Call_AbsHwPosScom_Per2_CP1_CheckpointReached()

Per: _Per3

Design Rationale

(Add design rationale specifically related to this FUNCTION. If none required, place the text “None”)

Program Flow Start

Rte_Call_AbsHwPosScom_Per3_CP0_CheckpointReached()Store Module Inputs to Local copies

Program Flow End

Rte_Call_AbsHwPosScom_Per3_CP1_CheckpointReached()


Fault Recovery Functions

Shutdown Functions

Interrupt Functions

Serial Communication Functions

AbsHwPosScom_Scom_HwPosSrvSetToZero

Function Name

AbsHwPosScom_Scom_HwPosSrvSetToZero

TypeMinMax
Arguments PassedParBooleanFalseTrue
Return ValueNone

Design Rationale

Program Flow Start

Store Module Inputs to Local copies

N/A

Processing

HwPosSrvSetToZero_Cnt_M_lgc = Par

Store Local Copy Of Outputs into Module Outputs

N/A

Program Flow End

N/A

AbsHwPosScom_Scom_HwPosSrvRead

Function Name

AbsHwPosScom_Scom_ HwPosSrvRead

TypeMinMax
Arguments PassedParPtr to BooleanFalseTrue
Return ValueNone

Design Rationale

Program Flow Start

Store Module Inputs to Local copies

N/A

Processing

*Par = HwPosSrvSetToZero_Cnt_M_lgc

Store Local Copy Of Outputs into Module Outputs

N/A

Program Flow End

N/A

Execution Requirements

Execution Sequence of the Module

(Describe in words relevant details about the execution sequence of the different sub modules.)

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
AbsHwPosScom_Init1Once at startupColdInit
AbsHwPosScom_Per12msAll states except ColdInit
AbsHwPosScom_Per210msAll states except Cold Init
AbsHwPosScom_Per310msAll states except Cold Init

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
AbsHwPosScom_Scom_HwPosSrvRead
AbsHwPosScom_Scom_HwPosSrvSetToZero


Memory Map Definition Requirements

Sub Modules (Functions)

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

Name of Sub ModuleSoftware Segment
AbsHwPosScom_Init1RTE_AP_ABSHWPOSSCOM_APPL_CODE
AbsHwPosScom_Per1RTE_AP_ABSHWPOSSCOM_APPL_CODE
AbsHwPosScom_Per2RTE_AP_ABSHWPOSSCOM_APPL_CODE
AbsHwPosScom_Per3RTE_AP_ABSHWPOSSCOM_APPL_CODE

Local Functions

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

Name of Sub ModuleSoftware Segment
HwPosSLFilter1AP_ ABSHWPOSSCOM_CODE
HwPosSLFilter2AP_ ABSHWPOSSCOM_CODE
Filter1EnableAP_ ABSHWPOSSCOM_CODE
Filter2EnableAP_ ABSHWPOSSCOM_CODE
CalSwitchTimerAP_ ABSHWPOSSCOM_CODE


Known Issues / Limitations With Design

Note1: Deviation from FDD: Cal k_MtrToHw_Res_Conversion is not used for Scaled_MtrPos calculations in this software. Refer FDD- 05D section 5.1.2.2.(This cal was for a fixedtype implementation).
Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial AutoSAR Release24-April-12NRAR
22.0Text format changes25-April-12NRAR
33.0HandWheelPosition range is changed from +/-1440.11 to +/-1620HwDeg26-April-12NRAR
44.0Anom 3257 Fix4-May-12NRAR
55.0FDD 5D updates as per Ver00227-June-12NRAR
66.0FDD 5D updates as per ver 003,Ver002 and Anom 3382 is ignored as now s/w is implemented in floating type.05-July-12NRAR
66
  1. Version of thisMDD is still lshown as 6 to match up with Synergy version

  2. In per1, Typo fix for global inputs

19-July-12NRAR
77.0FDD 5D updates per Ver00610-Aug-12BWL
88.0Update per UTP review.5-Sept-12BWL
99.0Added checkpoints and memmap software segment is updated for static variables26-Sep-12Selva
1010.0Changed trigger rates for Per2 and Per3 to conform to new standard24-Oct-12BWL
Last modified October 12, 2025: Initial commit (0347a62)