MotRefMdl_MDD
Module Design Document
For
MotRefMdl
VERSION: 4.0
DATE: 15-Nov-2016
Prepared By:
Krishna Anne,
Software Component Group
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
Sl. No. | Description | Author | Version | Date |
1 | Initial Version | Selva | 1.0 | 12-JUN-2015 |
2 | Updated per design rev. 1.2.0 | Rijvi | 2.0 | 13-Mar-2016 |
3 | Updated as per v1.3.0 of FDD | Krishna | 3.0 | 29-Apr-16 |
4. | Updated as per v2.3.0 of FDD | Krishna | 4.0 | 15-Nov-2016 |
Table of Contents
3 MotRefMdl & High-Level Description 7
4 Design details of software module 8
4.1 Graphical representation of MotRefMdl 8
5.1 User defined typedef definition/declaration 9
5.2 Variable definition for enumerated types 9
6.1 Program(fixed) Constants 10
6.1.2 Module specific Lookup Tables Constants 10
7 Software Module Implementation 11
7.2 Initialization Functions 11
7.2.1.2 Store Module Inputs to Local copies 11
7.2.1.3 (Processing of function)……… 11
7.2.1.4 Store Local copy of outputs into Module Outputs 11
7.3.1.2 Store Module Inputs to Local copies 11
7.3.1.3 (Processing of function)……… 11
7.3.1.4 Store Local copy of outputs into Module Outputs 11
7.6 Serial Communication Functions 12
7.7 Local Function/Macro Definitions 12
7.8 GLObAL Function/Macro Definitions 12
9 Known Limitations With Design 14
Abbrevations And Acronyms
Abbreviation | Description |
DFD | Design functional diagram |
MDD | Module design Document |
References
This section lists the title & version of all the documents that are referred for development of this document
Sr. No. | Title | Version |
<1> | <MDD Guidelines> | Process 04.02.01 |
<2> | <Software Naming Conventions> | Process 04.02.01 |
<3> | <Coding standards> | Process 04.02.01 |
<4> | FDD - SF103A_MotRefMdl_Design | See Synergy Subproject version |
<Add if more available> |
MotRefMdl & High-Level Description
Design details of software module
Graphical representation of MotRefMdl
Data Flow Diagram
Module level DFD
Sub-Module level DFD
COMPONENT FLOW DIAGRAM
Variable Data Dictionary
User defined typedef definition/declaration
Typedef Name | Element Name | User Defined Type | Legal Range (min) | Legal Range (max) |
MotInterCalcnsRec | RelncTqCoeff_Henry_f32 | Single Precision float | 3e-05 | 0.00041 |
MotREstimd_Ohm_f32 | Single Precision float | 0.005 | 0.12565 | |
ReacncDaxOverR_Uls_f32 | Single Precision float | -14.4436 | +14.4436 | |
ReacncQaxOverR_Uls_f32 | Single Precision float | -14.4436 | +14.4436 | |
EgOverR_Ampr_f32 | Single Precision float | -200 | 200 | |
VltgOverR_Ampr_f32 | Single Precision float | -200 | 200 | |
VovrRAllSqd_AmprSqd_f32 | Single Precision float | 0 | 40000 | |
EgOverROverZ_Ampr_f32 | Single Precision float | -200 | 200 | |
VovrRovrZ_Ampr_f32 | Single Precision float | -200 | 200 | |
MotKeEstimd_VoltPerMotRadPerSec_f32 | Single Precision float | .025 | .075 |
Variable definition for enumerated types
Enum Name | Element Name | Value |
N/A | <(Variable name qualified Refer[2])> | <Define the value > |
Constant Data Dictionary
Program(fixed) Constants
Embedded Constants
Local
Constant Name | Resolution | Units | Value |
MOTVLTGDAXEFLOLIM_VOLT_F32 | Single precision float | Volt | -26.5F |
MOTVLTGDAXEFHILIM_VOLT_F32 | Single precision float | Volt | 26.5F |
MOTVLTGQAXEFLOLIM_VOLT_F32 | Single precision float | Volt | -26.5F |
MOTVLTGQAXEFHILIM_VOLT_F32 | Single precision float | Volt | 26.5F |
Refer constants from .m file |
Global
Constant Name |
Refer constants from .m file |
Module specific Lookup Tables Constants
Constant Name | Resolution | Value | Software Segment |
Refer .m file |
Software Module Implementation
Sub-Module Functions
NONE
Initialization Functions
Per: MotRefMdlINIT1
Design Rationale
Refer to FDD
Store Module Inputs to Local copies
Refer to FDD
(Processing of function)………
Refer to FDD
Store Local copy of outputs into Module Outputs
Refer to FDD
PERIODIC FUNCTIONS
Per: MotRefMdlper1
Design Rationale
Store Module Inputs to Local copies
Refer to FDD
(Processing of function)………
Refer to FDD
Store Local copy of outputs into Module Outputs
Refer to FDD
Non PERIODIC FUNCTIONS
None
Interrupt Functions
None
Serial Communication Functions
None
Local Function/Macro Definitions
Local Function #1 CalcCurrMagSqRef
Function Name | CalcCurrMagSqRef | Type | Min | Max |
Arguments Passed | CurrDaxRef_Ampr_T_f32 | float32 | -200 | 200 |
CurrQaxRef_Ampr_T_f32 | float32 | -200 | 200 | |
Return Value | CurrMagSqRef_AmprSq_T_f32 | float32 | 0 | 40000 |
Description
Refer FDD (F_CalcIqCommand)
Local Function #2 CalcIq
Function Name | CalcIq | Type | Min | Max |
Arguments Passed | Tqcmd_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 |
CurrDaxRef_Ampr_T_f32 | float32 | -200 | 200 | |
MotRefMdlInterCalcns_T_str | struct | Refer Struct Definition in Sec5.1 | Refer Struct Definition in Sec5.1 | |
Return Value | CurrQaxRefTmp_Ampr_T_f32 | float32 | -200 | 200 |
Description
Refer FDD (F_CalcIqCommand)
Local Function #3 CurrtoVoltTest
Function Name | CalcIq | Type | Min | Max |
Arguments Passed | CurrQaxRef_Ampr_T_f32 | float32 | -8.8 | 8.8 |
CurrDaxRef_Ampr_T_f32 | float32 | -200 | 200 | |
MotRefMdlInterCalcns_T_str | struct | Refer Struct Definition in Sec5.1 | Refer Struct Definition in Sec5.1 | |
Return Value | VdR_Ampr_T_f32 | float32 | -200 | 200 |
VqR_Ampr_T_f32 | float32 | -200 | 200 | |
CurrQaxRefTmp_Ampr_T_f32 | float32 | -200 | 200 |
Description
Refer FDD ( F_ItoV)
Local Function #4 CalcMinMotCurr
Function Name | CalcMinMotCurr | Type | Min | Max |
Arguments Passed | MotTqCmd_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 |
MotRefMdlInterCalcns_T_str | struct | Refer Struct Definition in Sec5.1 | Refer Struct Definition in Sec5.1 | |
Return Value | CurrQaxMin_Ampr_T_f32 | float32 | -200 | 200 |
CurrDaxMin_Ampr_T_f32 | float32 | -200 | 200 | |
ImSqrMin_AmprSq_T_f32 | float32 | 0 | 40000 |
Description
Refer FDD (Locate Reference)
Local Function #5 CalcTq
Function Name | CalcTq | Type | Min | Max |
Arguments Passed | CosDelta_Cnt_T_f32 | float32 | -1 | 1 |
SinDelta_Cnt_T_f32 | float32 | -1 | 1 | |
MotRefMdlInterCalcns_T_str | struct | Refer Struct Definition in Sec5.1 | Refer Struct Definition in Sec5.1 | |
Return Value | TqCalc_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 |
CurrDaxMax_Ampr_T_f32 | float32 | -200 | 200 |
Description
Refer FDD (CalculateTorque)
Local Function #6 CalcMaxTqPt
Function Name | CalcMaxTqPt | Type | Min | Max |
Arguments Passed | MotTqCmd_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 |
MotRefMdlInterCalcns_T_str | struct | Refer Struct Definition in Sec5.1 | Refer Struct Definition in Sec5.1 | |
Return Value | MotTqCmdLimd_MotNwtMtr_T_f32 | float32 | -8.8 | 8.8 |
CurrDaxMax_Ampr_T_f32 | float32 | -200 | 200 |
Description
Refer FDD (LocateTorqueExtremes)
Local Function #7 PrbcIntrpn
Function Name | PrbcIntrpn | Type | Min | Max |
Arguments Passed | IntrpnPts_T_f32 | float32 | Full range | Full range |
Return Value | ParaIntpol_Uls_T_f32 | float32 | Full range | Full range |
Description
Refer FDD ( Parabolic Interpolations)
GLObAL Function/Macro Definitions
None
TRANSIENT FUNCTIONS
None
Unit Test Considerations
None
Known Limitations With Design
None
Appendix
None