This is the multi-page printable view of this section. Click here to print.
Component Implementation
1 - MotRefMdl_IntegrationManual
Integration Manual
For
MotRefMdl
VERSION: 1.0
DATE: 16-JUN-2015
Prepared By:
Selva Sengottaiyan
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 Sengottaiyan | 1.0 | 16-Jun-2015 | 
Table of Contents
3.2 Global Functions(Non RTE) to be provided to Integration Project 6
4 Configuration REQUIREMeNTS 7
4.2 Configuration Files to be provided by Integration Project 7
4.3 Da Vinci Parameter Configuration Changes 7
4.4 DaVinci Interrupt Configuration Changes 7
4.5 Manual Configuration Changes 7
5 Integration DATAFLOW REQUIREMENTS 8
5.1 Required Global Data Inputs 8
5.2 Required Global Data Outputs 8
5.3 Specific Include Path present 8
Abbrevations And Acronyms
| Abbreviation | Description | 
| DFD | Design functional diagram | 
| MDD | Module design Document | 
| <ADD more to the table if applicable> | |
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 4.00.00 | 
| <2> | <Software Naming Conventions> | Process 4.00.00 | 
| <3> | <Coding standards> | Process 4.00.00 | 
| <4> | FDD – SF103A_MotRefMdl_Design | See Synergy Subproject version | 
| <Add if more available> | 
Dependencies
SWCs
| Module | Required Feature | 
| None | N/A | 
Note : Referencing the external components should be avoided in most cases. Only in unavoidable circumstance external components should be referred. Developer should track the references.
Global Functions(Non RTE) to be provided to Integration Project
None
Configuration REQUIREMeNTS
Build Time Config
| Constants | Notes | |
| None | 
Configuration Files to be provided by Integration Project
<Configuration file that will generated from this components that will require Da Vinci Config generation or manual generation. Describe each parameter >
Da Vinci Parameter Configuration Changes
| Parameter | Notes | SWC | 
| N/A | 
DaVinci Interrupt Configuration Changes
| ISR Name | VIM # | Priority Dependency | Notes | 
| N/A | 
Manual Configuration Changes
| Constant | Notes | SWC | 
| N/A | 
Integration DATAFLOW REQUIREMENTS
Required Global Data Inputs
Refer DataDict.m file
Required Global Data Outputs
Refer DataDict.m file
Specific Include Path present
Yes
Runnable Scheduling
This section specifies the required runnable scheduling.
| Init | Scheduling Requirements | Trigger | 
| MotRefMdlInit1 | None | RTE | 
| Runnable | Scheduling Requirements | Trigger | 
| MotRefMdlPer1 | None | RTE(2ms) | 
.
Memory Map REQUIREMENTS
Mapping
| Memory Section | Contents | Notes | 
| None | ||
* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.
Usage
| Feature | RAM | ROM | 
| None | 
Table 1: ARM Cortex R4 Memory Usage
NvM Blocks
None
Compiler Settings
Preprocessor MACRO
None
Optimization Settings
None
Appendix
None
2 - MotRefMdl_MDD
Module Design Document
For
MotRefMdl
VERSION: 6.0
DATE: 15-Nov-2017
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 | 
| 5. | Updated as per v4.0.0 of FDD | TATA | 5.0 | 25-Sep-2017 | 
| 6. | Fixed Design vs Implementation Mismatch | Krishna | 6.0 | 15-Nov-2017 | 
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.7.1 Local Function #1 CalcCurrMagSqRef 12
7.7.2 Local Function #2 CalcIq 12
7.7.3 Local Function #3 CurrtoVoltTest 12
7.7.4 Local Function #4 CalcMinMotCurr 12
7.7.5 Local Function #5 CalcTq 13
7.7.6 Local Function #6 CalcMaxTqPt 13
7.7.7 Local Function #7 PrbcIntrpn 13
7.7.8 Local Function #7 PrbcIntrpn 13
7.8 GLObAL Function/Macro Definitions 14
9 Known Limitations With Design 16
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 | 
| BITMASK1_CNT_U08 | 1 | Cnt | 1U | 
| BITMASK2_CNT_U08 | 1 | Cnt | 2U | 
| BITMASK4_CNT_U08 | 1 | Cnt | 4U | 
| 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)
Local Function #8 Decoder
| Function Name | Decoder | Type | Min | Max | 
| Arguments Passed | MotAndThermProtnLoaMod_Cnt_T_u08 | Uin8 | 0 | 255 | 
| Return Value | CurrMeasLoaMtgtnEna_Cnt_T_logl | Boolean | FALSE | TRUE | 
| IvtrLoaMtgtnEna_Cnt_T_logl | Boolean | FALSE | TRUE | |
| FetLoaMtgtnEna_Cnt_T_logl | Boolean | FALSE | TRUE | 
Description
Refer FDD ( Decoder)
Local Function #9 VltgSdlCalc
| Function Name | VltgSdlCalc | Type | Min | Max | 
| Arguments Passed | MotQuad_Cnt_T_enum | MotQuad1 | 1U | 4U | 
| AbsltMotVelFiltLp_MotRadPerSec_T_u11p5 | uint16 | 0U | 1350U | |
| Return Value | VltgSdl_Volt_T_f32 | Boolean | 0.0F | 40.0F | 
Description
This function is split from Per1 to reduce the path count to less than 300.
GLObAL Function/Macro Definitions
None
TRANSIENT FUNCTIONS
None
Unit Test Considerations
None
Known Limitations With Design
None
Appendix
None
3 - MotRefMdl_Peer_Review
Overview
Summary SheetDavinci Files
Source Code
PolySpace
Synergy Project
Sheet 1: Summary Sheet

Sheet 2: Davinci Files
Sheet 3: Source Code
Sheet 4: PolySpace
Sheet 5: Synergy Project
| Rev 2.00 | 29-Nov-17 | |||||||||||||||||||||||
| Peer Review Meeting Log (Component Synergy Project Review) | ||||||||||||||||||||||||
| Quality Check Items: | ||||||||||||||||||||||||
| Rationale is required for all answers of No | ||||||||||||||||||||||||
| New baseline version name from Summary Sheet follows | Yes | Comments: | ||||||||||||||||||||||
| naming convention | ||||||||||||||||||||||||
| Project contains necessary subprojects | Yes | Comments: | ||||||||||||||||||||||
| Project contains the correct version of subprojects | Yes | Comments: | ||||||||||||||||||||||
| Design subproject is correct version | Yes | Comments: | ||||||||||||||||||||||
| .gpj file in tools folder matches .gpj generated by TL109 script | Yes | Comments: | ||||||||||||||||||||||
| File/folder structure is correct per documentation in | Yes | Comments: | ||||||||||||||||||||||
| TL109A_SwcSuprt | ||||||||||||||||||||||||
| General Notes / Comments: | ||||||||||||||||||||||||
| Review Board: | ||||||||||||||||||||||||
| Change Owner: | Shawn Penning | Review Date : | 01/03/18 | |||||||||||||||||||||
| Lead Peer Reviewer: | Brendon Binder | Approved by Reviewer(s): | Yes | |||||||||||||||||||||
| Other Reviewer(s): | ||||||||||||||||||||||||
| Rationale/justification for items marked "No" approved by: | ||||||||||||||||||||||||


