DutyCycThermProtn_MDD
Module Design Document
For
DutyCycThermProtn
Apr 03, 2018
Prepared By:
Matthew Leser
Nexteer Automotive
Change History
| Description | Author | Version | Date |
| Initial Version | Sarika Natu(KPIT Technologies) | 1.0 | 02-Oct-2015 |
| Updated to version 2.0.0 of FDD | Krishna Anne | 2.0 | 07-Apr-2016 |
| Fix for anomaly EA4# 7558 | Krishna Anne | 3.0 | 29-Sep-2016 |
| Updated to FDD v3.0.0 | Shruthi Raghavan | 4.0 | 14-Dec-2016 |
| Updated as per FDD v4.0.0 | TATA | 5.0 | 25-Oct-2017 |
| Updated Local Function Input | Matthew Leser | 6.0 | 03-Apr-2018 |
Table of Contents
1 DutyCycThermProtn & High-Level Description 5
2 Design details of software module 6
2.1 Graphical representation of DutyCycThermProtn 6
3.1 Program (fixed) Constants 8
4 Software Component Implementation 9
4.1.1 Init: DutyCycThermProtn_Init1 9
4.1.2 Per: DutyCycThermProtn_Per1 9
4.1.2.2 Store Module Inputs to Local copies 9
4.1.2.3 (Processing of function)……… 9
4.1.2.4 Store Local copy of outputs into Module Outputs 9
4.4 Module Internal (Local) Functions 9
4.5 GLOBAL Function/Macro Definitions 12
5 Known Limitations with Design 13
Appendix A Abbreviations and Acronyms 15
DutyCycThermProtn & High-Level Description
The purpose of the Thermal Duty Cycle Protection is to limit and protect the system from excessive use, based on motor rotational velocity and system temperature. It also provides protection status information for use by other functions.
Design details of software module
Graphical representation of DutyCycThermProtn


Data Flow Diagram
See FDD
Component level DFD
See FDD
Function level DFD
See FDD
Constant Data Dictionary
Program (fixed) Constants
Embedded Constants
Local Constants
Refer .m file
| Constant Name | Value |
|---|---|
| THERMLOADLIMSIZE_CNT_U08 | 8U |
| MULTFILTERSIZE_CNT_U08 | 6U |
| BITMASK2_CNT_U08 | 2U |
| BITMASK4_CNT_U08 | 4U |
| IDX5_CNT_U08 | 5U |
| IDX8_CNT_U08 | 8U |
Software Component Implementation
Sub-Module Functions
Init: DutyCycThermProtn_Init1
Design Rationale
Refer FDD
Module Outputs
Refer FDD
Per: DutyCycThermProtn_Per1
Design Rationale
DutyCycThermProtn_Per1 function is divided into various functions to reduce the cyclomatic complexity.
The subsystems ‘Multiplier’ and ‘FilterPercMax’ are clubbed into ‘MultiFilterPercMax’ local function.
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 Name | FiltSVReinit | Type | Min | Max |
| Arguments Passed | IgnTiOff_Cnt_T_u32 | uint32 | 0 | 1720000 |
| VehTiVld_Cnt_T_Logl | Boolean | 0 | 1 | |
| Return Value | None |
Design Rationale
Name of local function matches with subsystem name from FDD
Processing
Local Function #2
| Function Name | TemperatureSelection | Type | Min | Max |
| Arguments Passed | DiagcStsLimdTPrfmnc_Cnt_T_Logl | boolean | 0 | 1 |
| EcuTFild_DegCgrd_T_f32 | float32 | -50 | 150 | |
| MotFetT_DegCgrd_T_f32 | float32 | -50 | 200 | |
| MotMagT_DegCgrd_T_f32 | float32 | -50 | 150 | |
| MotWidgT_DegCgrd_T_f32 | float32 | -50 | 300 | |
| *Mult12Temp_DegCgrd_T_ s15p0 | Sint16 | -50 | 200 | |
| *Mult36Temp_DegCgrd_T_s15p0 | Sint16 | -50 | 300 | |
| Return Value | SlcTemp_DegCgrd_T_s15p0 | sint16 | -50 | 300 |
Design Rationale
Name of local function matches with subsystem name from FDD
Note: The outputs of the function are Mult12Temp_DegCgrd_T_s15p0, Mult36Temp_DegCgrd_T_s15p0 and SlcTemp_DegCgrd_T_f32.
Processing
None
Local Function #3
| Function Name | TemperatureLimiting | Type | Min | Max |
| Arguments Passed | EcuTFild_DegCgrd_T_f32 | float32 | -50 | 150 |
| MotWidgT_DegCgrd_T_f32 | float32 | -50 | 300 | |
| Return Value | AbsTempLimitSlew_MotNwtMtr_T_f32 | float32 | 0 | 8.79 |
Design Rationale
Name of local function matches with subsystem name from FDD
Processing
None
Local Function #4
| Function Name | MultiFilterPercMax | Type | Min | Max |
| Arguments Passed | Mult12Temp_DegCgrd_T_s15p0 | sint16 | -50 | 200 |
| Mult36Temp_DegCgrd_T_s15p0 | sint16 | -50 | 300 | |
| DutyCycThermProtnDi_Cnt_T_Logl | boolean | 0 | 1 | |
| MotVelCrf_MotRadPerSec_T_f32 | float32 | -1350 | 1350 | |
| MotCurrPeakEstimd_AmprSqd_T_f32 | float32 | 0 | 62500 | |
| MotCurrPeakEstimdFild_AmprSqd_T_f32 | float32 | 0 | 62500 | |
| *MaxOut_Uls_T_u16p0 | uint16 | 0 | 200 | |
| Return Value | ThermLimSlowFilMax_Uls_T_f32 | float32 | 0 | 200 |
Design Rationale
The subsystems ‘Multiplier’ and ‘FilterPercMax’ are clubbed into ‘MultiFilterPercMax’ local function.
Note: The outputs of the function are MaxOut_Uls_T_u16p0 and ThermLimSlowFilMax_Uls_T_f32.
Processing
None
Local Function #5
| Function Name | ThermalLoadLimit | Type | Min | Max |
| Arguments Passed | MotVelCrf_MotRadPerSec_T_f32 | float32 | -1350 | 1350 |
| SlcTemp_DegCgrd_T_s15p0 | sint16 | -50 | 300 | |
| MaxOut_Uls_T_u16p0 | uint16 | 0 | 200 | |
| Return Value | ThermalLoadLmt_MotNwtMtr_T_f32 | float32 | 0 | 8.8 |
Design Rationale
Name of local function matches with subsystem name from FDD
Processing
None
Local Function #6
| Function Name | ThermalLimitStatus | Type | Min | Max |
| Arguments Passed | DutyCycThermProtnDi_Cnt_T_Logl | Boolean | 0 | 1 |
| MaxOut_Uls_T_u16p0 | uint16 | 0 | 200 | |
| ThermMotTqLim_MotNwtMtr_T_f32 | float32 | 0 | 8.8 | |
| IvtrLoaMtgtnEna_Cnt_T_logl | boolean | FALSE | TRUE | |
| DualEcuFltMtgtnEna_Cnt_T_logl | boolean | FALSE | TRUE | |
| Return Value | ThermRednFac_Uls_T_f32 | float32 | 0 | 1 |
Design Rationale
Name of local function matches with subsystem name from FDD. Initializing ThermRednFac_Uls_T_f32 to 0.0 helps to avoid writing another statement in the if-conditional (optimized compared to FDD)
Local Function #7
| Function Name | TherrmalLimitScaling | Type | Min | Max |
| Arguments Passed | DualEcuFltMtgtnEna_Cnt_T_logl | Boolean | 0 | 1 |
| IvtrLoaMtgtnEna_Cnt_T_logl | Boolean | 0 | 1 | |
| AbsTempLimitSlew_MotNwtMtr_T_f32 | float32 | 0 | 8.79 | |
| DutyCycThermProtnDi_Cnt_T_Logl | Boolean | 0 | 1 | |
| ThermalLoadLmt_MotNwtMtr_T_f32 | float32 | 0 | 8.8 | |
| * ThermLoadDptLim_MotNwtMtr_T_f32 | Float32 | 0 | 8.8 | |
| * ThermTempDptLim_MotNwtMtr_T_f32 | Float32 | 0 | 8.8 | |
| Return Value | ThermMotTqLim_MotNwtMtr_T_f32 | float32 | 0 | 8.8 |
Design Rationale
Name of local function matches with subsystem name from FDD
The if-action subsystem blocks for calculation of LoadDptLim and TempDptLim are clubbed together and optimized since the condition for the subsystem execution was same.
Local Function #8
| Function Name | UseInpLowr | Type | Min | Max |
| Arguments Passed | *TableX_Cnt_T_s16 | sint16 | FULL | FULL |
| *TableY_Cnt_T_u16 | uint16 | FULL | FULL | |
| Size_Cnt_T_u16 | uint16 | 1 | 20 | |
| Input_Cnt_T_s16 | sint16 | FULL | FULL | |
| Return Value | TableY_Cnt_T_u16[Idx_Cnt_T_u08] | uint16 | FULL | FULL |
Design Rationale
None.
Processing
None
Local Function #9
| Function Name | Decoder | Type | Min | Max |
| Arguments Passed | MotAndThermProtnLoaMod_Cnt_T_u08 | Uint8 | 0U | 255U |
| Return Value | IvtrLoaMtgtnEna_Cnt_T_logl | boolean | FALSE | TRUE |
Design Rationale
None.
Processing
Refer to the “Decoder” block of the Simulink model of the design.
GLOBAL Function/Macro Definitions
None
Known Limitations with Design
In Init function CurrMeasLoaMtgtnEna and FetLoaMtgtnEna are terminated. In Periodic1 CurrMeasLoaMtgtnEna is terminated. These flags need not be computed at all.
MotAndThermProtnLoaMod input readable to init runnable also. It is need to update in Data Dictionary.
UNIT TEST CONSIDERATION
Function UseInpLowr to be tested only as called by the component; input and output ranges will not be reached.
Function UseInpLowr’s TableX must have strictly increasing elements.
Abbreviations and Acronyms
| Abbreviation or Acronym | Description |
|---|---|
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
| Term | Definition | Source |
|---|---|---|
| MDD | Module Design Document | |
| DFD | Data Flow Diagram |
References
| Ref. # | Title | Version |
|---|---|---|
| 1 | AUTOSAR Specification of Memory Mapping (Link:AUTOSAR_SWS_MemoryMapping.pdf) | v1.3.0 R4.0 Rev 2 |
| 2 | MDD Guideline | EA4 02.00.00 |
| 3 | Software Naming Conventions.doc | 1.0 |
| 4 | Software Design and Coding Standards.doc | 2.1 |
| 5 | FDD – SF009A_DutyCycThermProtn_Design | See Synergy sub project version |