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.DescriptionAuthorVersionDate
1Initial VersionSelva1.012-JUN-2015
2Updated per design rev. 1.2.0Rijvi2.013-Mar-2016
3Updated as per v1.3.0 of FDDKrishna3.029-Apr-16
4.Updated as per v2.3.0 of FDDKrishna4.015-Nov-2016

Table of Contents

1 Abbrevations And Acronyms 5

2 References 6

3 MotRefMdl & High-Level Description 7

4 Design details of software module 8

4.1 Graphical representation of MotRefMdl 8

4.2 Data Flow Diagram 8

4.2.1 Module level DFD 8

4.2.2 Sub-Module level DFD 8

4.3 COMPONENT FLOW DIAGRAM 8

5 Variable Data Dictionary 9

5.1 User defined typedef definition/declaration 9

5.2 Variable definition for enumerated types 9

6 Constant Data Dictionary 10

6.1 Program(fixed) Constants 10

6.1.1 Embedded Constants 10

6.1.1.1 Local 10

6.1.1.2 Global 10

6.1.2 Module specific Lookup Tables Constants 10

7 Software Module Implementation 11

7.1 Sub-Module Functions 11

7.2 Initialization Functions 11

7.2.1 Per: MotRefMdlINIT1 11

7.2.1.1 Design Rationale 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 PERIODIC FUNCTIONS 11

7.3.1 Per: MotRefMdlper1 11

7.3.1.1 Design Rationale 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.4 Non PERIODIC FUNCTIONS 11

7.5 Interrupt Functions 11

7.6 Serial Communication Functions 12

7.7 Local Function/Macro Definitions 12

7.8 GLObAL Function/Macro Definitions 12

7.9 TRANSIENT FUNCTIONS 12

8 Unit Test Considerations 13

9 Known Limitations With Design 14

10 Appendix 15

Abbrevations And Acronyms

AbbreviationDescription
DFDDesign functional diagram
MDDModule design Document

References

This section lists the title & version of all the documents that are referred for development of this document

Sr. No.TitleVersion
<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_DesignSee 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 NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

MotInterCalcnsRecRelncTqCoeff_Henry_f32Single Precision float3e-050.00041
MotREstimd_Ohm_f32Single Precision float0.0050.12565
ReacncDaxOverR_Uls_f32Single Precision float-14.4436+14.4436
ReacncQaxOverR_Uls_f32Single Precision float-14.4436+14.4436
EgOverR_Ampr_f32Single Precision float-200200
VltgOverR_Ampr_f32Single Precision float-200200
VovrRAllSqd_AmprSqd_f32Single Precision float040000
EgOverROverZ_Ampr_f32Single Precision float-200200
VovrRovrZ_Ampr_f32Single Precision float-200200
MotKeEstimd_VoltPerMotRadPerSec_f32Single Precision float.025.075

Variable definition for enumerated types

Enum NameElement NameValue
N/A<(Variable name qualified Refer[2])><Define the value >

Constant Data Dictionary

Program(fixed) Constants

Embedded Constants

Local

Constant NameResolutionUnitsValue
MOTVLTGDAXEFLOLIM_VOLT_F32Single precision floatVolt-26.5F
MOTVLTGDAXEFHILIM_VOLT_F32Single precision floatVolt26.5F
MOTVLTGQAXEFLOLIM_VOLT_F32Single precision floatVolt-26.5F
MOTVLTGQAXEFHILIM_VOLT_F32Single precision floatVolt26.5F
Refer constants from .m file

Global

Constant Name
Refer constants from .m file

Module specific Lookup Tables Constants

Constant NameResolutionValueSoftware 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 NameCalcCurrMagSqRefTypeMinMax
Arguments PassedCurrDaxRef_Ampr_T_f32float32-200200
CurrQaxRef_Ampr_T_f32float32-200200
Return ValueCurrMagSqRef_AmprSq_T_f32float32040000

Description

Refer FDD (F_CalcIqCommand)

Local Function #2 CalcIq

Function NameCalcIqTypeMinMax
Arguments PassedTqcmd_MotNwtMtr_T_f32float32-8.88.8
CurrDaxRef_Ampr_T_f32float32-200200
MotRefMdlInterCalcns_T_strstructRefer Struct Definition in Sec5.1Refer Struct Definition in Sec5.1
Return ValueCurrQaxRefTmp_Ampr_T_f32float32-200200

Description

Refer FDD (F_CalcIqCommand)

Local Function #3 CurrtoVoltTest

Function NameCalcIqTypeMinMax
Arguments PassedCurrQaxRef_Ampr_T_f32float32-8.88.8
CurrDaxRef_Ampr_T_f32float32-200200
MotRefMdlInterCalcns_T_strstructRefer Struct Definition in Sec5.1Refer Struct Definition in Sec5.1
Return ValueVdR_Ampr_T_f32float32-200200
VqR_Ampr_T_f32float32-200200
CurrQaxRefTmp_Ampr_T_f32float32-200200

Description

Refer FDD ( F_ItoV)

Local Function #4 CalcMinMotCurr

Function NameCalcMinMotCurrTypeMinMax
Arguments PassedMotTqCmd_MotNwtMtr_T_f32float32-8.88.8
MotRefMdlInterCalcns_T_strstructRefer Struct Definition in Sec5.1Refer Struct Definition in Sec5.1
Return ValueCurrQaxMin_Ampr_T_f32float32-200200
CurrDaxMin_Ampr_T_f32float32-200200
ImSqrMin_AmprSq_T_f32float32040000

Description

Refer FDD (Locate Reference)

Local Function #5 CalcTq

Function NameCalcTqTypeMinMax
Arguments PassedCosDelta_Cnt_T_f32float32-11
SinDelta_Cnt_T_f32float32-11
MotRefMdlInterCalcns_T_strstructRefer Struct Definition in Sec5.1Refer Struct Definition in Sec5.1
Return ValueTqCalc_MotNwtMtr_T_f32float32-8.88.8
CurrDaxMax_Ampr_T_f32float32-200200

Description

Refer FDD (CalculateTorque)

Local Function #6 CalcMaxTqPt

Function NameCalcMaxTqPtTypeMinMax
Arguments PassedMotTqCmd_MotNwtMtr_T_f32float32-8.88.8
MotRefMdlInterCalcns_T_strstructRefer Struct Definition in Sec5.1Refer Struct Definition in Sec5.1
Return ValueMotTqCmdLimd_MotNwtMtr_T_f32float32-8.88.8
CurrDaxMax_Ampr_T_f32float32-200200

Description

Refer FDD (LocateTorqueExtremes)

Local Function #7 PrbcIntrpn

Function NamePrbcIntrpnTypeMinMax
Arguments PassedIntrpnPts_T_f32float32Full rangeFull range
Return ValueParaIntpol_Uls_T_f32float32Full rangeFull 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

Last modified October 12, 2025: Initial commit (1fadfc4)