WhlImbRejctn_MDD

Module Design Document

For

WhlImbRejctn

Version: 7

Oct 13, 2016

Prepared For:

Software Engineering

Nexteer Automotive,

Saginaw, MI, USA

Prepared By:

Matt Leser,

Nexteer Automotive,

Saginaw, MI, USA
Change History

DescriptionAuthorVersionDate
Initial VersionSankardu Varadapureddi14-Mar-2016
Updated for FDD ver 1.2.0Sankardu Varadapureddi221-Mar-2016
Updated for FDD ver 1.6.0Matt Leser3 (Version 4 in Synergy)21-Sep-2016
Updated version number to match Synergy DatabaseMatt Leser628-Sep-2016
Updated for FDD ver 1.7.0Matt Leser713-Oct-2016


Table of Contents

1 Introduction 5

1.1 Purpose 5

1.2 Scope 5

2 WhlImbRejctn High-Level Description 6

3 Design details of software module 7

3.1 Graphical representation of WhlImbRejctn 7

3.2 Data Flow Diagram 7

3.2.1 Component level DFD 7

3.2.2 Function level DFD 8

4 Constant Data Dictionary 9

4.1 Program (fixed) Constants 9

4.1.1 Embedded Constants 9

5 Software Component Implementation 10

5.1 Sub-Module Functions 10

5.1.1 Init: WhlImbRejctnInit1 10

5.1.1.1 Design Rationale 10

5.1.1.2 Module Outputs 10

5.1.2 Per: WhlImbRejctnPer1 10

5.1.2.1 Design Rationale 10

5.1.2.2 Store Module Inputs to Local copies 10

5.1.2.3 (Processing of function)……… 10

5.1.2.4 Store Local copy of outputs into Module Outputs 10

5.1.3 Per: WhlImbRejctnPer2 10

5.1.3.1 Design Rationale 10

5.1.3.2 Store Module Inputs to Local copies 10

5.1.3.3 (Processing of function)……… 10

5.1.3.4 Store Local copy of outputs into Module Outputs 10

5.2 Server Runables 10

5.3 Interrupt Functions 10

5.4 Module Internal (Local) Functions 11

5.4.1 Local Function #1 11

5.4.1.1 Description 11

5.4.2 Local Function #2 11

5.4.2.1 Description 11

5.4.3 Local Function #3 12

5.4.3.1 Description 12

5.4.4 Local Function #4 12

5.4.4.1 Description 12

5.4.5 Local Function #5 12

5.4.5.1 Description 12

5.4.6 Local Function #6 13

5.4.6.1 Description 13

5.4.7 Local Function #7 13

5.4.7.1 Description 13

5.4.8 Local Function #8 13

5.4.8.1 Description 14

5.4.9 Local Function #9 14

5.4.9.1 Description 14

5.4.10 Local Function #10 14

5.4.10.1 Description 14

5.4.11 Local Function #11 14

5.4.11.1 Description 14

5.4.12 Local Function #12 14

5.4.12.1 Description 15

5.4.13 Local Function #13 15

5.4.13.1 Description 15

5.5 GLOBAL Function/Macro Definitions 15

6 Known Limitations with Design 16

7 UNIT TEST CONSIDERATION 17

Appendix A Abbreviations and Acronyms 18

Appendix B Glossary 19

Appendix C References 20

Introduction

Purpose

Scope

WhlImbRejctn High-Level Description

Refer to FDD

Design details of software module

Graphical representation of WhlImbRejctn

Data Flow Diagram

Refer FDD

Component level DFD

Function level DFD

Constant Data Dictionary

Program (fixed) Constants

Embedded Constants

Constant NameResolutionUnitsValue
MAXMGNMASK_CNT_U081Cnt1
QUALMASK_CNT_U081Cnt2
DCTRENDMASK_CNT_U081Cnt4
FREQDIAGCMASK_CNT_U081Cnt8
WHLSPDCORRLNMASK_CNT_U081Cnt16
MINSTOMILLISEC_ULS_F321Cnt60000

For other constants, refer .m file.

Local Constants

Software Component Implementation

Sub-Module Functions

Init: WhlImbRejctnInit1

Design Rationale

Refer FDD

Module Outputs

Refer FDD

Per: WhlImbRejctnPer1

Design Rationale

Refer FDD

Store Module Inputs to Local copies

Refer FDD

(Processing of function)………

Refer FDD

Store Local copy of outputs into Module Outputs

Refer FDD

Per: WhlImbRejctnPer2

Design Rationale

Refer FDD

Store Module Inputs to Local copies

Refer FDD

(Processing of function)………

Refer FDD

Store Local copy of outputs into Module Outputs

Refer FDD

Server Runables

None

Interrupt Functions

None

Module Internal (Local) Functions

Local Function #1

Function NameUGRFilOutpTypeMinMax
Arguments PassedY_Hz_T_f32float32-8.8376.991118
FreqEst_Hz_T_f32float320.00560
PoleMag_Uls_T_f32float3201
* Ugr1_MotRadPerSec_T_f32float320256
* Ugr2_MotRadPerSec_T_f32float320256
Return ValueYFild_Hz_T_f32float320127

Description

‘UGR’ filter implementation. ‘Ugr1_MotRadPerSec_T_f32’ and ‘Ugr2_MotRadPerSec_T_f32’ corresponds to PIMs used in internal calculations.

Local Function #2

Function NameDtrmnEnadAmntTypeMinMax
Arguments PassedFreqEstAvg_Hz_T_f32float320.00560
WhlSpdLFilt_MotRadPerSec_T_f32float32-100100
WhlSpdRFilt_MotRadPerSec_T_f32float32-100100
VehSpd_Kph_T_f32float320511
VehSpdVld_Cnt_T_loglbooleanFALSETRUE
WhlImbRejctnCustEna_Cnt_T_loglbooleanFALSETRUE
WhlImbRejctnDi_Cnt_T_loglbooleanFALSETRUE
SysSt_Cnt_T_enumSysSt1SYSST_DISYSST_WRMININ
*Enable_Uls_T_f32float3201
Return ValueWhlImbRejctnActv_Cnt_T_loglbooleanFALSETRUE

Description

"Determine Enabled Amt" block implementation. In determination of ‘DistbnMagEnadPrev’, ‘ScaleL’ and ‘ScaleR’ values, some if-else loops were combined in software for optimization.

*Enable_Uls_T_f32 is an output of this function.

Local Function #3

Function NameEnaRampTypeMinMax
Arguments PassedEnableFac_Uls_T_f32float3201
SysSt_Cnt_T_enumSysSt1SYSST_DISYSST_WRMININ
Return ValueRampEna_Uls_T_f32float3201

Description

"Enable Ramp" block implementation.

Local Function #4

Function NameDistMagTypeMinMax
Arguments PassedWhlSpd_MotRadPerSec_T_f32float32-100100
Freq_Hz_T_f32float320.00560
* PeakPrev_Uls_T_f32float320127
* CurrMag_Uls_T_f32float320127
*LpFilOut_Cnt_T_FilLpRec1FilLpRec1
Return ValueDistMag_Uls_T_f32float320127

Description

"DistMagL/DistMagR" block implementation. ‘PeakPrev_Uls_T_f32’ is a PIM used in the internal implementation.

‘LePeakPrev’ is output of this function.

Local Function #5

Function NameActvRejctnCmdTypeMinMax
Arguments PassedHwTq_HwNwtMtr_T_f32float32-1010
Enable_Uls_T_f32float3201
FreqEst_Hz_T_f32float320.00560
* WhlImbRejctnAmp_MtrNm_T_f32float3208.8
Return ValueWhlImbRejctnCmd_MotNwtMtr_T_f32float32-8.88.8

Description

"Active Rejection Command " block implementation. “WhlImbRejctnAmp_MtrNm_T_f32” is the output of this function.

PIMs ‘StordValLe’ and ‘StordValRi’ directly used in the software for signals ‘FiltWhlSpdLScld’ and ‘FiltWhlSpdRScld’ in the FDD.

Local Function #6

Function NameAdjSigFilTypeMinMax
Arguments PassedIn1_MotNwtMtr_T_f32float32-127127
Zm_Uls_T_f32float320.2447421.0
Pk_Uls_T_f32float320.2447421.0
B0_Uls_T_f32float320.2496834.005074
MagAtFreq_Uls_T_f32float320.4142135622.414213562
* Coeff1_Uls_T_f32float320127
* Coeff1_Uls_T_f32float320127
Return ValueOut_MotNwtMtr_T_f32float32-127127

Description

"Filter1 / Filter2 " block implementation.

Local Function #7

Function NameSetNTCBlkTypeMinMax
Arguments Passed
Return ValueNone

Description

'Set NTC Block' implementation.

Local Function #8

Function NameMaxMagDiagTypeMinMax
Arguments PassedCmdAmp_MotNwtMtr_T_f32float32-8.88.8
Return ValueFltStat_Cnt_T_lgcbooleanFALSETRUE

Description

"MaxMagDiag" block implementation.

Local Function #9

Function NameDcTrendDiagTypeMinMax
Arguments PassedWIRCmd_MtrNwtMtr_T_f32float32-8.88.8
Return ValueFltStat_Cnt_T_lgcbooleanFALSETRUE

Description

" DcTrendDiag" block implementation.

Local Function #10

Function NameFrequencyDiagTypeMinMax
Arguments PassedWIRCmd_MtrNwtMtr_T_f32float32-8.88.8
FreqEst_Hz_T_f32float320.00560
Enable_Uls_T_f32float3201
CmdAmp_MotNwtMtr_T_f32float32-8.88.8
Return ValueFltStat_Cnt_T_lgcbooleanFALSETRUE

Description

' FrequencyDiag ' block implementation.

Local Function #11

Function NameWhlSpdCorrDiagTypeMinMax
Arguments PassedWhlRiFrq_Hz_T_f32float320.0160
WhlLeFrq_Hz_T_f32float320.0160
Return ValueFltStat_Cnt_T_lgcbooleanFALSETRUE

Description

" WhlSpdCorrDiag" block implementation.

Local Function #12

Function NameElpdTiTypeMinMax
Arguments PassedFltStsTrue_Cnt_T_lgcbooleanFALSETRUE
PrevFltStsTrue_Cnt_T_lgcbooleanFALSETRUE
RefTi_Sec_T_u32uint32Full rangeFull range
Return ValueElpdTi_MilliSec_T_f32float32Full rangeFull range

Description

"Elapsed Timer" block implementation.

FltStsTrue_Cnt_T_lgc - Fault condition current status

PrevFltStsTrue_Cnt_T_lgc - Fault condition previous status (PIM)

RefTi_Sec_T_u32 - Reference Timer (PIM)

Local Function #13

Function NameFltRcvryTypeMinMax
Arguments PassedElpdTi_Sec_T_f32float32Full rangeFull range
FltRecDly_Mins_T_f32float320255
* FltRec_Uls_T_strPassFailCntrDiagcRec1Structure members –full rangeStructure members –full range
Return ValueNone

Description

"Flt Recovery" block implementation. Elapsed time is passed as argument

Local Function #14

Function NameChkCompPerscTypeMinMax
Arguments PassedActiveBand1Inp_Cnt_T_u32uint3204.294967294e+09
ActiveBand2Inp_Cnt_T_u32uint3204.294967294e+09
ActiveBand3Inp_Cnt_T_u32uint3204.294967294e+09
Return ValueFlt_Cnt_T_lgcbooleanFALSETRUE

Description

“CheckCompPersistence” block implementation.

GLOBAL Function/Macro Definitions

None

Known Limitations with Design

1. The Inter runnable variable 'IniCmpFlt' is written in Init1 and read in Per1. The DD dictionary has a discrepancy where it mentions written in Per2 and read in Per1. The implementation/code has already been updated to the current read write combination. The design needs to be updated for the same. Refer to CR EA4#7979.

2. Constant DURATIONDISABLE_CNT_U16 value needs to be changed to a value less than max of the data type.  Implementation is using 18500 to match the EA3 component based on agreement with FDD Owner. Refer to CR EA4#7979

3. The Inter runnable Variable ‘MaxMgnFlt’ is written in Per2 and Read in Per1. The DataDict.m has a discrepancy where it mentions written in Init1 and read in Per1. The implementation/code has already been updated to the current read write combination. The design needs to be updated for the same. Refer to CR EA4#7979.

UNIT TEST CONSIDERATION

None

Abbreviations and Acronyms

Abbreviation or AcronymDescription

Glossary

Note: Terms and definitions from the source “Nexteer Automotive” take precedence over all other definitions of the same term. Terms and definitions from the source “Nexteer Automotive” are formulated from multiple sources, including the following:

  • ISO 9000

  • ISO/IEC 12207

  • ISO/IEC 15504

  • Automotive SPICE® Process Reference Model (PRM)

  • Automotive SPICE® Process Assessment Model (PAM)

  • ISO/IEC 15288

  • ISO 26262

  • IEEE Standards

  • SWEBOK

  • PMBOK

  • Existing Nexteer Automotive documentation

TermDefinitionSource
MDDModule Design Document
DFDData Flow Diagram

References

Ref. #TitleVersion
1AUTOSAR Specification of Memory Mapping (Link:AUTOSAR_SWS_MemoryMapping.pdf)v1.3.0 R4.0 Rev 2
2MDD GuidelineEA4 01.00.01
3Software Naming Conventions.doc2.0
4Software Design and Coding Standards.doc2.1
5FDD : SF015A_WhlImbRejctn_DesignSee Synergy sub project version
Last modified October 12, 2025: Initial commit (1fadfc4)