1 - CurrCmd_MDD

Module -- CurrCmd

High-Level Description

This Module generates the current command and the voltage reference for the current control.

Diagram – Function Data Sharing

Diagram – Function (Name)

Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
MRFTrqCmdScl_MtrNm_f32DaxIntegralGain_Uls_f32
MRFMtrVel_MtrRadpS_f32DaxPropotionalGain_Uls_f32
EstKe_VpRadpS_f32QaxIntegralGain_Uls_f32
EstR_Ohm_f32QaxPropotionalGain_Uls_f32
EstLd_Henry_f32MtrCurrDaxRef_Amp_f32
EstLq_Henry_f32MtrCurrQaxRef_Amp_f32
VehSpd_Kph_f32MtrVoltDaxFF_Volt_f32
MtrQuad_Cnt_u08MtrVoltQaxFF_Volt_f32
FastDataAccessBufIndex_Cnt_M_u16MtrCurrAngle_Rev_f32
CurrentGainSvc_Cnt_lgcMtrTrqCmdSign_Cnt_s16
MtrPosComputationDelay_Rad_f32

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
MtrVelFiltFFSV_MtrRadpS_M_s11p200.00000095367431640625-11181118CURRCMD_START_SEC_VAR_CLEARED_32
MtrVelFiltPISV_MtrRadpS_M_s11p200.00000095367431640625-11181118CURRCMD_START_SEC_VAR_CLEARED_32
MtrVelFilt_RadpSec_D_f32Single Precision Float-11181118CURRCMD_START_SEC_VAR_CLEARED_32
MtrMaxCurrDaxRef_Amps_D_f32Single Precision Float0200CURRCMD_START_SEC_VAR_CLEARED_32
MtrCurrQaxRef_Amp_D_f32Single Precision Float-220220CURRCMD_START_SEC_VAR_CLEARED_32
MtrCurrDaxRef_Amp_D_f32Single Precision Float-220220CURRCMD_START_SEC_VAR_CLEARED_32
PeakTorque_MtrNm_D_f32Single Precision Float-8.88.8CURRCMD_START_SEC_VAR_CLEARED_32
MRFMtrVelFiltPI_MtrRadpS_D_f32Single Precision Float-11181118CURRCMD_START_SEC_VAR_CLEARED_32
ElecPosDelayComp_Rad_D_f32Single Precision Float-2*pi2*piCURRCMD_START_SEC_VAR_CLEARED_32
KpqGain_Uls_D_f32Single Precision Float0100CURRCMD_START_SEC_VAR_CLEARED_32
KiqGain_Uls_D_f32Single Precision Float0100CURRCMD_START_SEC_VAR_CLEARED_32
KpdGain_Uls_D_f32Single Precision Float0100CURRCMD_START_SEC_VAR_CLEARED_32
KidGain_Uls_D_f32Single Precision Float0100CURRCMD_START_SEC_VAR_CLEARED_32
IdMin_Amp_D_f32Single Precision Float-220220CURRCMD_START_SEC_VAR_CLEARED_32
IqMin_Amp_D_f32Single Precision Float-220220CURRCMD_START_SEC_VAR_CLEARED_32
IqMax_Amp_D_f32Single Precision Float-220220CURRCMD_START_SEC_VAR_CLEARED_32
IdMax_Amp_D_f32Single Precision Float-220220CURRCMD_START_SEC_VAR_CLEARED_32
ImSqMin_AmpSq_D_f32Single Precision Float0\96800CURRCMD_START_SEC_VAR_CLEARED_32
LimitedMRFMtrTrqCmd_MtrNm_D_f32Single Precision Float-8.88.8CURRCMD_START_SEC_VAR_CLEARED_32
PhsAdvPeak_Rad_D_f32Single Precision Float-2*pi2*piCURRCMD_START_SEC_VAR_CLEARED_32
CosDelta_Cnt_M_f32Single Precision Float-11CURRCMD_START_SEC_VAR_CLEARED_32
SinDelta_Cnt_M_f32Single Precision Float-11CURRCMD_START_SEC_VAR_CLEARED_32
EstKe_VpRadpS_M_f32Single Precision Float0.0250.075CURRCMD_START_SEC_VAR_CLEARED_32
TermXq_Uls_M_f32Single Precision Float-9090CURRCMD_START_SEC_VAR_CLEARED_32
TermXd_Uls_M_f32Single Precision Float-6060CURRCMD_START_SEC_VAR_CLEARED_32
TermEgR_Amp_M_f32Single Precision Float-40504050CURRCMD_START_SEC_VAR_CLEARED_32
TermVR2_AmpSq_M_f32Single Precision Float14400810000CURRCMD_START_SEC_VAR_CLEARED_32
TermEgRZ_Amp_M_f32Single Precision Float-55CURRCMD_START_SEC_VAR_CLEARED_32
TermVRZ_Amp_M_f32Single Precision Float0.02900CURRCMD_START_SEC_VAR_CLEARED_32
TermVR_Amp_M_f32Single Precision Float120900CURRCMD_START_SEC_VAR_CLEARED_32
Reluctance_Henry_M_f32Single Precision Float0.00020.0005CURRCMD_START_SEC_VAR_CLEARED_32
LocateMinImNIter_Cnt_D_u16105CURRCMD_START_SEC_VAR_CLEARED_16
LocateTrqExNIter_Cnt_D_u16105CURRCMD_START_SEC_VAR_CLEARED_16
CurrCmd_IdBoostAmount_Amp_D_f32Single Precision FloatSee Data DictionarySee Data DictionaryCURRCMD_START_SEC_VAR_CLEARED_32

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

None

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
k_a0IdSlope_Uls_f32
k_a1IdSlope_Uls_f32
k_a2IdSlope_Uls_f32
k_MtrVelFiltFFKn_Cnt_u16
k_MtrVelFiltPIKn_Cnt_u16
k_MtrMaxCurr_AmpsSq_f32
k_IdrefMtrVelOffset_RadpSec_f32
k_K2Slope_RadpSecpNm_f32
k_K3VelIntercep_RadpSec_f32
k_NoofPoles_Uls_f32
k_PIGainVspdCutoff_kph_f32
t_KpqGainX_MtrRadpSec_u12p4[8]
t_KpqGainY_Uls_u6p10[8]
t_KiqGainX_MtrRadpSec_u12p4[8]
t_KpdGainX_MtrRadpSec_u12p4[8]
t_KpdGainY_Uls_u6p10[8]
t_KidGainX_MtrRadpSec_u12p4[8]
t_KidGainY_Uls_u10p6[8]
t_RefDeltaPoints_Rad_f32[8]
t_Q13VltgSchedXTbl_MtrRadpS_u12p4[10]
t_Q13VltgSchedYTbl_Volt_u5p11[10]
t_Q24VltgSchedXTbl_MtrRadpS_u12p4[10]
t_Q24VltgSchedYTbl_Volt_u5p11[10]
k_IdqRefTrqTol_Rad_f32
k_IdqRefTrqNIter_Cnt_u16
k_IdqRefIminTol_Amp_f32
k_IdqRefLocateRefNIter_Cnt_u16
k_deadtimeVScale_Uls_f32
k_IdBoostGain_Uls_f32
k_IdBoostVRThreshScl_Uls_f32
t_IdBoostTrqCmdX_MtrNm_u4p12
t_IdBoostTrqCharSclY_Uls_u1p15

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
D_SQRT3OVR2_ULS_F32Single Precision FloatUls0.866025403784
D_MTRPOLESDIV2_CNT_F32Single Precision FloatCnt3.0
D_2OVRSQRT3_ULS_F32Single Precision FloatUls1.15470053837925
D_NEG2OVRSQRT3_ULS_F32Single Precision FloatUls-1.15470053837925F
D_ROUND_ULS_F32Single Precision FloatUls0.5
D_NEGROUND_ULS_F32Single Precision FloatUls-0.5
D_NEG_ULS_F32Single Precision FloatUls- 1
D_MAXCURRENT_AMP_F32Single Precision FloatAmp220
D_SIZERDLTAPOINTS_CNT_U161CntTableSize_m(t_RefDeltaPoints_Rad_f32)
D_MAXDELTAPOINTSSIZE_CNT_U161CntD_SIZERDLTAPOINTS_CNT_U16 – 1U)
D_PIPLUSPIOVER4_ULS_F32Single Precision FloatULSD_PI_ULS_F32+( D_2PI_ULS_F32/4)
D_VECUMAX_VOLTS_F32Single Precision FloatVolts31.0F

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_ZERO_ULS_F32
D_180OVRPI_ULS_F32
D_ONE_ULS_F32
D_QUADRANT3_CNT_U8
D_QUADRANT1_CNT_U8
D_2PI_ULS_F32
D_ZERO_CNT_U16
D_VECUMIN_VOLTS_F32

Module specific Lookup Tables Constants

(This is for lookup tables (arrays) with fixed values, same name as other tables)

Constant NameResolutionValueSoftware Segment
None

Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. FPM_FloatToFixed_m

  2. LPF_SvUpdate_s16InFixKTrunc_m

  3. LPF_OpUpdate_s16InFixKTrunc_m

  4. FPM_FixedToFloat_m

  5. Sqrtf

  6. Abs_f32_m

  7. atan2f

  8. IntplVarXY_u16_u16Xu16Y_Cnt

  9. Sinf

  10. Cosf

Data Hiding Functions

Global Functions/Macros Defined by this Module

None

Local Functions/Macros Used by this MDD only

Local Function #1

Function NameParabolicInterpolationTypeMinMaxUTP Tol.
Arguments PassedIntpolPoints_Uls_T_f32[6]Float32--
Return ValueParaIntpol_Uls_T_f32Float32N/AN/A

Description

Local Function #2

Function NameCalculateImVSIdqTypeMinMaxUTP Tol.
Arguments PassedIdRef_Amp_T_f32Float32-220+220-
IqRef_Amp_T_f32Float32-220+220-
Return ValueImVSIdq_AmpSq_T_f32Float32096800

Description

Local Function #3

Function NameCalculateIqTypeMinMaxUTP Tol.
Arguments PassedTorquecmd_MtrNm_T_f32Float32-8.88.8
IdRef_Amp_T_f32Float32-220220
Return ValueIqRefTmp_Amp_T_f32Float32-220220

Description

Local Function #4

Function NameCurrtoVoltTestTypeMinMaxUTP Tol.
Arguments PassedIqRef_Amp_T_f32Float32-220220
IdRef_Amp_T_f32Float32-220220
*VqR_Amp_T_f32Float32-220220
*VdR_Amp_T_f32Float32-220220
Return ValueVoltTest_Uls_T_lgcBooleanFalseTrue

Description

Local Function #5

Function NameCalcTorqueTypeMinMaxUTP Tol.
Arguments PassedCosDelta_Cnt_T_f32Float3201
SinDelta_Cnt_T_f32Float3201
*IdMax_Amp_T_f32Float32-220220
Return ValueTorqueCalc_MtrNm_T_f32Float32-8.88.8

Description

Local Function #6

Function NameLocateTrqExtremeseTypeMinMaxUTP Tol.
Arguments PassedMtrTrqCmd_MtrNm_T_f32Float32-8.88.8
*IdMax_Amp_T_f32Float32-220220
*PhsAdvPeak_Rad_T_f32Float32-2*pi+2*pi
Return ValueTorqueState_MtrNm_T_f32Float32-8.88.8

Description

Local Function #7

Function NameLocateMinimumImTypeMinMaxUTP Tol.
Arguments PassedMtrTrqCmd_MtrNm_T_f32Float32-8.88.8
* IdMin_Amp_T_f32Float32-220220
* IqMin_Amp_T_f32Float32-220220
Return ValueImSqrMin_AmpSq_T_f32Float32096800

Description

Software Module Implementation

Runtime Environment (RTE) Initial Values

This section lists the initial values of data written by this module but controlled by the RTE. After RTE initialization, the data in this table will contain these values.

DataValue
Rte_InitValue_DaxIntegralGain_Uls_f320
Rte_InitValue_DaxPropotionalGain_Uls_f320
Rte_InitValue_EstKe_VpRadpS_f320
Rte_InitValue_EstLd_Henry_f320
Rte_InitValue_EstLq_Henry_f320
Rte_InitValue_EstR_Ohm_f320
Rte_InitValue_MRFMtrVel_MtrRadpS_f320
Rte_InitValue_MRFTrqCmdScl_MtrNm_f320
Rte_InitValue_MtrCurrAngle_Rev_f320
Rte_InitValue_MtrCurrDaxRef_Amp_f320
Rte_InitValue_MtrCurrQaxRef_Amp_f320
Rte_InitValue_MtrPosComputationDelay_Deg_f320
Rte_InitValue_MtrTrqCmdSign_Cnt_s160
Rte_InitValue_MtrVoltDaxFF_Volt_f320
Rte_InitValue_MtrVoltQaxFF_Volt_f320
Rte_InitValue_QaxIntegralGain_Uls_f320
Rte_InitValue_QaxPropotionalGain_Uls_f320
Rte_InitValue_VehSpd_Kph_f320
FastDataAccessBufIndex0

Initialization Functions

CurrCmd_Init

Program Flow Start

Rte_Call_CurrCmd_Per1_CP0_CheckpointReached()

Processing


Periodic Functions

Per: CurrCmd_Per1

Design Rationale

None

Program Flow Start

Rte_Call_CurrCmd_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

WriteAccessBufIndex_Cnt_T_u16= (FastDataAccessBufIndex_Cnt_M_u16&1)^1;

MRFMtrTrqCmd_MtrNm_T_f32=Rte_Iread_CurrCmd_Per1_MRFTrqCmdScl_MtrNm_f32

MRFMtrVel_MtrRadpS_T_f32=Rte_Iread_CurrCmd_Per1_MRFMtrVel_MtrRadpS_f32

EstKe_VpRadpS_T_f32=Rte_Iread_CurrCmd_Per1_EstKe_VpRadpS_f32

EstR_Ohm_T_f32=Rte_Iread_CurrCmd_Per1_EstR_Ohm_f32

EstLd_Henry_T_f32=Rte_Iread_CurrCmd_Per1_EstLd_Henry_f32

EstLq_Henry_T_f32=Rte_Iread_CurrCmd_Per1_EstLq_Henry_f32

VehSpd_Kph_T_f32=Rte_Iread_CurrCmd_Per1_VehSpd_Kph_f32

MtrQuad_Cnt_T_u8 = Rte_Iread_CurrCmd_Per1_MtrQuad_Cnt_u08

CurrentGainSvc_Cnt_T_lgc = Rte_IRead_CurrCmd_Per1_CurrentGainSvc_Cnt_lgc()

Vecu_Volt_T_f32 = Limit_m(Vecu_Volt_T_f32, D_VECUMIN_VOLTS_F32, D_VECUMAX_VOLTS_F32)

Store Local copy of outputs into Module Outputs

MtrDaxIntegralGain_Uls_M_f32[WriteAccessBufIndex_Cnt_T_u16] = KidGain_Uls_T_f32

MtrDaxPropotionalGain_Uls_M_f32[WriteAccessBufIndex_Cnt_T_u16] = KpdGain_Uls_T_f32

MtrQaxIntegralGain_Uls_M_f32[WriteAccessBufIndex_Cnt_T_u16] = KiqGain_Uls_T_f32

MtrQaxPropotionalGain_Uls_M_f32[WriteAccessBufIndex_Cnt_T_u16] = KpqGain_Uls_T_f32

MtrCurrQaxRef_Amp_M_f32[WriteAccessBufIndex_Cnt_T_u16] = MtrCurrQaxRef_Amp_T_f32

MtrCurrDaxRef_Amp_M_f32[WriteAccessBufIndex_Cnt_T_u16] = MtrCurrDaxRef_Amp_T_f32

Rte_Iwrite_CurrCmd_Per1_MtrCurrDaxRef_Amp_f32(MtrCurrDaxRef_Amp_T_f32)

Rte_Iwrite_CurrCmd_Per1_MtrCurrQaxRef_Amp_f32(MtrCurrQaxRef_Amp_T_f32)

MtrVoltDaxFF_Volt_M_f32[WriteAccessBufIndex_Cnt_T_u16]=MtrVoltDaxFF_Volt_T_f32

MtrVoltQaxFF_Volt_M_f32[WriteAccessBufIndex_Cnt_T_u16]=MtrVoltQaxFF_Volt_T_f32

Rte_Iwrite_CurrCmd_Per1_MtrVoltDaxFF_Volt_f32(MtrVoltDaxFF_Volt_T_f32)

Rte_Iwrite_CurrCmd_Per1_MtrVoltQaxFF_Volt_f32(MtrVoltQaxFF_Volt_T_f32)

Rte_Iwrite_CurrCmd_Per1_MtrCurrAngle_Rev_f32(MtrCurrElecAngle_Rev_T_f32)

Rte_Iwrite_CurrCmd_Per1_MtrTrqCmdSign_Cnt_s16(Sign_f32_m(MRFMtrTrqCmd_MtrNm_T_f32))

MtrPosComputationDelay_Rad_M_f32[WriteAccessBufIndex_Cnt_T_u16] = ElecPosDelayComp_Rad_T_f32

Program Flow End

Rte_Call_CurrCmd_Per1_CP1_CheckpointReached()

Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

None

Execution Requirements

Execution Sequence of the Module

(Describe in words relevant details about the execution sequence of the different sub modules.)

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
CurrCmd_Per12msALL
CurrCmd_InitAt initALL

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
None


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
CurrCmd_Per1RTE_START_SEC_AP_CURRCMD_APPL_CODE
CurrCmd_InitRTE_START_SEC_AP_CURRCMD_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment
ParabolicInterpolationRTE_START_SEC_AP_CURRCMD_APPL_CODE
CalculateIqRTE_START_SEC_AP_CURRCMD_APPL_CODE
CalculateImVSIdqRTE_START_SEC_AP_CURRCMD_APPL_CODE
CurrtoVoltTestRTE_START_SEC_AP_CURRCMD_APPL_CODE
CalcTorqueRTE_START_SEC_AP_CURRCMD_APPL_CODE
LocateTrqExtremesRTE_START_SEC_AP_CURRCMD_APPL_CODE
LocateMinimumImRTE_START_SEC_AP_CURRCMD_APPL_CODE

Known Issues / Limitations With Design

  1. Global Macro’s are not unit tested.

Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial version15th-May-12KPIT-RT
22.0Partial implementation of SF-99B v00420-Sep-12OT
33.0Checkpoints and memmap statements added20-Nov-12Selva
44.0,5.0Implementation of SF99 v8

23-Mar-13

19-Apr-13

Selva
66.0Corrected for A5883. Corrected LocateMinimumIm21-Oct-13Selva
77.0Updated for v11 FDD99B6-Nov-13Selva
88,0Corrected for NewDelta calculation / Updated for v11 FDD99B UTP fixes8-Nov-13Selva
99.0Updated for V12 of FDD SF9926-Nov-13Selva

2 - CurrParamComp_MDD

Module -- Parameter Compensation

High-Level Description

Figures

Diagram – Function Data Sharing

None

Diagram – Function (Name)

None


Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
MtrCurrDaxRef _Amp_f32EstKe_VpRadpS_f32
MtrCurrQaxRef_ Amp_f32EstR_Ohm_f32
CuTempEst_DegC_f32EstLq_Henry_f32
MagTempEst_DegC_f32EstLd_Henry_f32
SiTempEst_DegC_f32
FastDataAccessBufIndex_Cnt_M_u16

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
EstKeFF_VpRadpS_M_f32single precision float0.0250.075CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
EstRFF_Ohm_M_f32single precision float0.0050.12565CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
KeSatSclFac_Uls_D_f32single precision float01CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
LqSatSclFac_Uls_D_f32single precision float02CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
LdSatSclFac_Uls_D_f32single precision float02CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
EstRfetFF_Ohm_D_f32single precision float0.0050.12565CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
EstRmtrFF_Ohm_D_f32single precision float0.0050.12565CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
PreLmtEstKe_VpRadpS_D_f32single precision float0.250.075CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
PreLmtEstLq_Henry_D_f32single precision float0.000030.00041CURRPARAMCOMP_START_SEC_VAR_CLEARED_32
PreLmtEstLd_Henry_D_f32single precision float0.000030.00041CURRPARAMCOMP_START_SEC_VAR_CLEARED_32

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
t_KeSatTblX_Amp_u9p7
t_KeSatTblY_Uls_u2p14
t_KeSatTblX_Amp_u12p4
t_CurrParamCompDaxRef_Amp_u9p7
t_CurrParamCompQaxRef_Amp_u9p7
t_CurrParamLqSatSclFac_Uls_u2p14
k_MinKeRngLmt_VpRadpS_f32
k_MaxKeRngLmt_VpRadpS_f32
k_MinRRngLmt_Ohm_f32
k_MaxRRngLmt_Ohm_f32
k_MinLqRngLmt_Henry_f32
k_MaxLqRngLmt_Henry_f32
k_MinLdRngLmt_Henry_f32
k_MaxLdRngLmt_Henry_f32
k_NomTemp_DegC_f32
k_MagThrC_VpRadpSpDegC_f32
k_SiThermCoeff_OhmpDegC_f32
k_NomRfet_Ohm_f32
k_CuThermCoeff_OhmpDegC_f32
k_NomLq_Henry_f32
k_NomLd_Henry_f32

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
D_SQRT3OVR2_ULS_F32single precision floatUnitless0.866025403784
D_MINRRANGE_OHM_F32single precision floatOhm0.005f
D_MAXRRANGE_OHM_F32single precision floatOhm0.12565f
D_MINKERANGE_VPRADPS_F32single precision floatVpRadpS0.025f
D_MAXKERANGE_VPRADPS_F32single precision floatVpRadpS0.075f
D_CUTEMPESTLOLMT_DEGC_F32single precision floatDegC(-50.0f)
D_CUTEMPESTHILMT_DEGC_F32single precision floatDegC300.0f
D_MAGTEMPESTLOLMT_DEGC_F32single precision floatDegC(-50.0f)
D_MAGTEMPESTHILMT_DEGC_F32single precision floatDegC200.0f
D_SITEMPESTLOLMT_DEGC_F32single precision floatDegC(-50.0f)
D_SITEMPESTHILMT_DEGC_F32single precision floatDegC150.0f

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name

Module specific Lookup Tables Constants

(This is for lookup tables (arrays) with fixed values, same name as other tables)

Constant NameResolutionValueSoftware Segment
None


Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. FPM_InitFixedPoint_m

  2. Abs_f32_m

  3. Limit_m

  4. FPM_FloatToFixed_m

  5. TableSize_m

  6. FPM_FixedToFloat_m

  7. IntplVarXY_u16_u16Xu16Y_Cnt

  8. BilinearXYM_u16_u16Xu16YM_Cnt

Data Hiding Functions

  1. <None>

Global Functions/Macros Defined by this Module

None

Local Functions/Macros Used by this MDD only

Local Function #1

Function NameNoneTypeMinMaxUTP Tol.
Arguments Passed
Return Value

Description

Software Module Implementation

Runtime Environment (RTE) Initial Values

This section lists the initial values of data written by this module but controlled by the RTE. After RTE initialization, the data in this table will contain these values.

DataValue
Rte_IWrite_CurrParamComp_Init_EstR_Ohm_f32Rte_Pim_EOLNomMtrParam()->NomRmtr_Ohm_f32
Rte_IWrite_CurrParamComp_Init_EstLd_Henry_f32k_NomLd_Henry_f32
Rte_IWrite_CurrParamComp_Init_EstLq_Henry_f32k_NomLq_Henry_f32
Rte_IWrite_CurrParamComp_Init_EstKe_VpRadpS_f32Rte_Pim_EOLNomMtrParam()->NomKe_VpRadpS_f32

Initialization Functions

Init: ParamComp_Init1

Design Rationale

Module Outputs

Rte_IWrite_CurrParamComp_Init_EstR_Ohm_f32(NomRmtr_Ohm_T_f32)

Rte_IWrite_CurrParamComp_Init_EstLd_Henry_f32(k_NomLd_Henry_f32)

Rte_IWrite_CurrParamComp_Init_EstLq_Henry_f32(k_NomLq_Henry_f32)

Rte_IWrite_CurrParamComp_Init_EstKe_VpRadpS_f32(NomKe_VpRadpS_T_f32) MtrEstKe_VpRadpS_M_f32[0] = NomKe_VpRadpS_T_f32

MtrEstKe_VpRadpS_M_f32[1] = NomKe_VpRadpS_T_f32

Module Internal


Periodic Functions

Per: ParamComp_Per1

Design Rationale

FastDataAccessBufIndex allows the buffer synchronization between data calculated on slower periodic loop time(2 milli seconds) and are read by faster periodic run time (ie 0.125ms)

Program Flow Start

Rte_Call_CurrParamComp_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

IqRef_Amp_T_f32=Rte_IRead_CurrParamComp_Per1_MtrCurrQaxRef_Amp_f32()

IdRef_Amp_T_f32=Rte_IRead_CurrParamComp_Per1_MtrCurrDaxRef_Amp_f32()

Processing

Store Local copy of outputs into Module Outputs

MtrEstKe_VpRadpS_M_f32[(ActFaseDataAccBufIndex_Cnt_M_u16&1)^1]=EstKe_VpRadpS_T_f32

ActFaseDataAccBufIndex_Cnt_M_u16= (ActFaseDataAccBufIndex_Cnt_M_u16& 1)^1

Rte_IWrite_CurrParamComp_Per1_EstKe_VpRadpS_f32(EstKe_VpRadpS_T_f32)

Rte_IWrite_CurrParamComp_Per1_EstR_Ohm_f32(EstR_Ohm_T_f32)

Rte_IWrite_CurrParamComp_Per1_EstLq_Henry_f32(EstLq_Henry_T_f32)

Rte_IWrite_CurrParamComp_Per1_EstLd_Henry_f32(EstLd_Henry_T_f32)

Program Flow End

Rte_Call_CurrParamComp_Per1_CP1_CheckpointReached()

Per: ParamComp_Per2

Design Rationale

None

Program Flow Start

Rte_Call_CurrParamComp_Per2_CP0_CheckpointReached()

Store Module Inputs to Local copies

NomKe_VpRadpS_T_f32 = Rte_Pim_EOLNomMtrParam()->NomKe_VpRadpS_f32

NomRmtr_Ohm_T_f32 = Rte_Pim_EOLNomMtrParam()->NomRmtr_Ohm_f32

CuTempEst_DegC_T_f32 = Rte_IRead_CurrParamComp_Per2_CuTempEst_DegC_f32()

MagTempEst_DegC_T_f32 = Rte_IRead_CurrParamComp_Per2_MagTempEst_DegC_f32()

SiTempEst_DegC_T_f32 = Rte_IRead_CurrParamComp_Per2_SiTempEst_DegC_f32()

NomRmtr_Ohm_T_f32 = Limit_m( NomRmtr_Ohm_T_f32, D_MINRRANGE_OHM_F32, D_MAXRRANGE_OHM_F32)

NomKe_VpRadpS_T_f32 = Limit_m(NomKe_VpRadpS_T_f32,D_MINKERANGE_VPRADPS_F32,D_MAXKERANGE_VPRADPS_F32)

CuTempEst_DegC_T_f32 = Limit_m(CuTempEst_DegC_T_f32,D_CUTEMPESTLOLMT_DEGC_F32, D_CUTEMPESTHILMT_DEGC_F32)

MagTempEst_DegC_T_f32 = Limit_m(MagTempEst_DegC_T_f32, D_MAGTEMPESTLOLMT_DEGC_F32, D_MAGTEMPESTHILMT_DEGC_F32 )

SiTempEst_DegC_T_f32 = Limit_m(SiTempEst_DegC_T_f32, D_SITEMPESTLOLMT_DEGC_F32, D_SITEMPESTHILMT_DEGC_F32)

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

Rte_Call_CurrParamComp_Per2_CP1_CheckpointReached()

Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

SComm: SCom_EOLNomMtrParam_Get

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

SComm: SCom_EOLNomMtrParam_Set

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None


Execution Requirements

Execution Sequence of the Module

(Describe in words relevant details about the execution sequence of the different sub modules.)

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
ParamComp_Per12 msALL
ParamComp_Per2100 msALL

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
SCom_EOLNomMtrParam_GetEPS_DiagSrvc
SCom_EOLNomMtrParam_SetEPS_DiagSrvc


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
ParamComp_Per1RTE_AP_CURRPARAMCOMP_APPL_CODE
ParamComp_Per2RTE_AP_CURRPARAMCOMP_APPL_CODE
SCom_EOLNomMtrParam_GetRTE_AP_CURRPARAMCOMP_APPL_CODE
SCom_EOLNomMtrParam_SetRTE_AP_CURRPARAMCOMP_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment


Known Issues / Limitations With Design

  1. (Item #1)


Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial Version25-May-12SK
22.0Added checkpoints and memmap statements20-Nov-12Selva
33.0
Update the input value to the interpolations by using the following:
IqRef_Amp_T_u9p7= FPM_FloatToFixed_m(Abs_f32_m(IqRef_Amp_T_f32,u9p7_T));
11-Jan-13Selva
44.0Updated to version 8 of the Sf99 Mtrlcntrl21-Mar-13Selva
55.0Updated to version 10 FDD SF99 B. Divide by zero fixed21-Oct-13Selva
66.0Updated to version 11 FDD SF99 B. Limiting EEPROM Read7-Nov-13Selva

3 - Data Dictionary


Overview

Change Log
Variable Dictionary
Calibration Dictionary
Global Constants
Template
Help


Sheet 1: Change Log

MotorControl_CM - Rev 8<- Global Program / Module Name


RevisionAuthorDateChange Description

Data Dictionary Type:Component
1.0Selva15-Nov-12Initial template for Motor control Current mode



2.0Selva24-Feb-13Updated for SF99 B torque reasonable portion



3.0Selva20-Mar-13Updated for SF99 B v 008



4.0Selva20-Apr-13Corrected for SF99 B v 008



5.0Selva3-Jun-13Updated for SF99 B v 009



6.0Selva21-Oct-13Updated for SF99 B v 010



7Selva7-Nov-13Updated for SF99 B v 011



8Selva26-Nov-13Updated for SF99 B v 012




































































































































































































































































































Sheet 2: Variable Dictionary

MotorControl_CM - Rev 8

IOMDN
Variable Information

YN










Range











Software Variable NameStandard Reference NameFDD ReferenceDescription[I]nput [O]uput [M]oduleInternal [D]isplay [N]onVolatileMemory UsageOEM1X, 1Y, 1Z, 1I, 1BS 2X, 2Y, 2Z, 2I, 2BS etc Graph SettingsInitalization ValueMinMaxResolutionUnit Test Tolerance (+/-)UnitsTypeMemory Segment






Variables




















MRFMtrTrqCmd_MtrNm_f32TCMDSF99B MotorControlMotor referance frame torque commandIN
0-8.88.8Single Precision Float
MtrNmfloat32







TorqueCmdSF_Uls_f32TSCL_EOLSF99 MotorControlEOL torque command scale factorNN
10.91.1Single Precision Floatn/aUlsfloat32







MRFMtrTrqCmdScl_MtrNm_f32TCMD_SCLSF99 MotorControlScaled torque commandON
0-7.929.68Single Precision Float6.25E-02MtrNmfloat32







EstKe_VpRadpS_f32Ke_EstimateSF99B MotorControl
IN
00.0250.075Single Precision Float
VpRadpSfloat32







EstR_Ohm_f32EstR_OhmsSF99B MotorControl
IN
00.0050.12565Single Precision Float
Ohmfloat32







MRFMtrTrqCmd_MtrNm_f32Torque_Cmd_MRFSF99B MotorControl
IN
0-8.88.8Single Precision Float
MtrNmfloat32







EstL_Henry_f32EstL_HenriesSF99B MotorControl
IN
00.000030.00041Single Precision Float
Henryfloat32







MRFMtrVel_MtrRadpS_f32Motor_Vel_MRFSF99B MotorControl
IN
0-11181118Single Precision Float
MtrRadpSfloat32







Vecu_Volt_f32VecuSF99B MotorControl
IN
0531Single Precision Float
Voltfloat32







VehSpd_Kph_f32Vehicle_SpeedSF99B MotorControl
IN
00512Single Precision Float
Kphfloat32







MtrCurrQaxRef_Amps_f32QaxRef_AmpsSF99B MotorControl
ON
0-220220Single Precision Float7.81E-03Ampfloat32







MtrCurrDaxRef_Amps_f32DaxRef_AmpsSF99B MotorControl
ON
0-220220Single Precision Float7.81E-03Ampfloat32







MtrVoltQaxFF_Volt_f32VqRefFF_VoltsSF99B MotorControl
ON
0-3131Single Precision Float4.88E-04Voltsfloat32







MtrVoltDaxFF_Volt_f32VdRefFF_VoltsSF99B MotorControl
ON
0-3131Single Precision Float4.88E-04Voltsfloat32







MtrCurrAngle_Rev_f32AlphaSF99B MotorControl
ON
001Single Precision Float3.05E-05Revfloat32







KpqGain_Uls_f32KpqSF99B MotorControl
ON
002Single Precision Float6.10E-05Ulsfloat32







KiqGain_Uls_f32KiqSF99B MotorControl
ON
001024Single Precision Float3.13E-02Ulsfloat32







KpdGain_Uls_f32KpdSF99B MotorControl
ON
002Single Precision Float6.10E-05Ulsfloat32







KidGain_Uls_f32KidSF99B MotorControl
ON
001024Single Precision Float3.13E-02Ulsfloat32







MtrPosComputationDelay_Deg_f32Position DelaySF99B MotorControl
ON
0-180180Single Precision Float7.81E-03degfloat32







MtrVelFiltFFSV_MtrRadpS_M_s11p20
SF99B MotorControl
MN
0-111811189.5367431640625E-076.25E-02MtrRadpSs11p20_T







MtrVelFiltPISV_MtrRadpS_M_s11p20
SF99B MotorControl
MN
0-111811189.5367431640625E-076.25E-02MtrRadpSs11p20_T







IdSlopeParamK1_AmppRadpS_D_f32K1SF99B MotorControl
DN
0020Single Precision Float4.88E-04Amp/Rad/Secfloat32







MtrMaxCurrDaxRef_Amps_D_f32MtrMaxCurrDax_RefSF99B MotorControl
DN
00200Single Precision Float7.81E-03Ampsfloat32







MtrVelFilt_MtrRadpS_D_f32Motor_Vel_filtSF99B MotorControl
DN
0-11181118Single Precision Float6.25E-02MtrRadpSfloat32







MtrCurrQaxRef_Amps_f32MtrCurrQaxRef_Amp_f32SF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







CuTempEst_DegC_f32CuTempEst_DegC_f32SF99B MotorControl
IN
0-50150Single Precision Float
DegCfloat32







MagTempEst_DegC_f32MagTempEst_DegC_f32SF99B MotorControl
IN
0-50150Single Precision Float
DegCfloat32







SiTempEst_DegC_f32SiTempEst_DegC_f32SF99B MotorControl
IN
0-50150Single Precision Float
DegCfloat32







EstLd_Henry_f32EstL_Henry_f32SF99B MotorControl
ON
00.000030.00041Single Precision Float3.20E-08Henryfloat32







EstLq_Henry_f32EstL_Henry_f32SF99B MotorControl
ON
00.000030.00041Single Precision Float3.20E-08Henryfloat32







EstR_Ohm_f32EstR_Ohm_f32SF99B MotorControl
ON
00.0050.12565Single Precision Float9.54E-07Ohmfloat32







EstKe_VpRadpS_f32EstKe_VpRadpS_f32SF99B MotorControl
ON
00.0250.075Single Precision Float1.00E+00V/Rad/Secfloat32







PreLmtEstKe_VpRadpS_D_f32Ke Feedforward EstimateSF99B MotorControl
DN
00.0250.075Single Precision Float7.43E-06V/Rad/Secfloat32







PreLmtEstR_Ohm_D_f32Resistance Feedforward EstimateSF99B MotorControl
DN
00.0050.12565Single Precision Float9.54E-07Ohmfloat32







PreLmtEstLd_Henry_D_f32Ld_FeedForwardEstimateSF99B MotorControl
DN
00.000030.00041Single Precision Float3.20E-08Henryfloat32







PreLmtEstLq_Henry_D_f32Lq_FeedForwardEstimateSF99B MotorControl
DN
00.000030.00041Single Precision Float3.20E-08Henryfloat32







KeSatSclFac_Uls_D_f32Ke Saturation Scale FactorSF99B MotorControl
DN
001Single Precision Float1.00E-04Unitlessfloat32







LSatSclFac_Uls_D_f32L Saturation Scale FactorSF99B MotorControl
DN
002Single Precision Float2.50E-03Unitlessfloat32







EstRfetFF_Ohm_D_f32FET (Silicon) Resistance Feedforward EstimateSF99B MotorControl
DN
00.0050.12565Single Precision Float9.54E-07Ohmfloat32







EstRmtrFF_Ohm_D_f32Motor Copper Resistance Feedforward EstimateSF99B MotorControl
DN
00.0050.12565Single Precision Float9.54E-07Ohmfloat32







Vecu_Volt_f32Vecu_Volt_f32SF99B MotorControl
IN
0531Single Precision Float
Voltfloat32







MtrCurrQaxRef_Amp_f32MtrCurrQaxRef_Amps_f32SF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrCurrDaxRef_Amp_f32MtrCurrDaxRef_Amps_f32SF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrVoltQaxFF_Volt_f32MtrVoltQaxFF_Volt_f32SF99B MotorControl
IN
0-3131Single Precision Float
Voltfloat32







MtrVoltDaxFF_Volt_f32MtrVoltQaxFF_Volt_f32SF99B MotorControl
IN
0-3131Single Precision Float
Voltfloat32







PIDaxIntegralGain_Uls_f32Iq_PropotionalGainSF99B MotorControl
IN
002Single Precision Float
Ulsfloat32







PIDaxPropotionalGain_Uls_f32Iq_IntegralGainSF99B MotorControl
IN
001024Single Precision Float
Ulsfloat32







PIQaxIntegralGain_Uls_f32Id_PropotionalGainSF99B MotorControl
IN
002Single Precision Float
Ulsfloat32







PIQaxPropotionalGain_Uls_f32Id_IntegralGainSF99B MotorControl
IN
001024Single Precision Float
Ulsfloat32







MtrCurrQax_Amp_f32MtrCurrQax_AmpsSF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrCurrDax_Amp_f32MtrCurrDax_AmpsSF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







ElecPosDelayComp_Rad_f32Pos_Delay_CompSF99B MotorControl
IN
0-3.141592653589793.14159265358979Single Precision Float
Radfloat32







ModIdx_Uls_T_f32Modulation_IndexSF99B MotorControl
ON
001Single Precision Float
Ulsfloat32







PhaseAdv_Rev_T_u0p16Phase AdvanceSF99B MotorControl
ON
000.99998470.0000152587890625
Revu0p16_T







MtrVoltDax_Volt_f32MtrVoltDax_VoltSF99B MotorControl
ON
0-3131Single Precision Float
Voltfloat32







MtrVoltQax_Volt_f32MtrVoltQax_VoltSF99B MotorControl
ON
0-3131Single Precision Float
Voltfloat32







MtrCurrQaxError_Amp_D_f32MtrCurrQax_ErrorSF99B MotorControl
DN
0-220220Single Precision Float
Ampfloat32







MtrCurrDaxError_Amp_D_f32MtrCurrDax_ErrorSF99B MotorControl
DN
0-220220Single Precision Float
Ampfloat32







MtrVoltQaxFinal_Volt_D_f32MtrVoltQax_FinalSF99B MotorControl
DN
0-3131Single Precision Float
Voltfloat32







MtrVoltQaxFinalLimit_Volt_D_f32MtrVoltQax_Final_LimSF99B MotorControl
DN
0-3131Single Precision Float
Voltfloat32







MtrVoltDaxFinal_Volt_D_f32MtrVoltDax_FinalSF99B MotorControl
DN
0-3131Single Precision Float
Voltfloat32







MtrVoltQaxProp_Volt_D_f32MtrVoltQax_PropSF99B MotorControl
DN
0-3131Single Precision Float
Voltfloat32







MtrVoltDaxProp_Volt_D_f32MtrVoltDax_PropSF99B MotorControl
DN
0-3131Single Precision Float
Voltfloat32







MtrVoltQaxInt_Volt_D_f32MtrVoltQax_IntSF99B MotorControl
DN
0-3131Single Precision Float
Voltfloat32







MtrVoltDaxInt_Volt_D_f32MtrVoltDax_IntSF99B MotorControl
DN
0-3131Single Precision Float
Voltfloat32







MtrCurrQax_Amp_f32MtrCurrQax_AmpSF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrCurrDax_Amp_f32MtrCurrDax_AmpSF99B MotorControl
IN
0220220Single Precision Float
Ampfloat32







EstPkCurr_AmpSq_f32Mtr_PkCurr_AmpsSqSF99B MotorControl
ON
0048400Single Precision Float
AmpSqfloat32







FiltEstPkCurr_AmpSq_f32Filtered Peak CurrentSF99B MotorControl
ON
0048400Single Precision Float
AmpSqfloat32







FiltMtrCurEst_Iq_Amp_D_f32Iq_est_filteredSF99B MotorControl
DN
0-220220Single Precision FloatN/AAmpfloat32







FiltMtrCurEst_Id_Amp_D_f32Id_est_filteredSF99B MotorControl
DN
0-220220Single Precision FloatN/AAmpfloat32







MtrCurEst_Iq_AmpSq_D_f32Iq_est_squaredSF99B MotorControl
DN
0048400Single Precision FloatN/AAmpSqfloat32







MtrCurEst_Id_AmpSq_D_f32Id_est_squaredSF99B MotorControl
DN
0048400Single Precision FloatN/AAmpSqfloat32







EstKe_VpRadpS_f32Ke_EstimateSF99B MotorControl
IN
00.0250.075Single Precision Float
VpRadpSfloat32







EstR_Ohm_f32EstR_OhmsSF99B MotorControl
IN
00.0050.12565Single Precision Float
Ohmfloat32







MRFMtrTrqCmd_MtrNm_f32Torque_Cmd_MRFSF99B MotorControl
IN
0-8.88.8Single Precision Float
MtrNmfloat32







EstLd_Henry_f32EstLd_HenriesSF99B MotorControl
IN
00.000030.00041Single Precision Float
Henryfloat32







EstLq_Henry_f32EstLq_HenriesSF99B MotorControl
IN
00.000030.00041Single Precision Float
Henryfloat32







MRFMtrVel_MtrRadpS_f32Motor_Vel_MRFSF99B MotorControl
IN
0-11181118Single Precision Float
MtrRadpSfloat32







Vecu_Volt_f32VecuSF99B MotorControl
IN
0531Single Precision Float
Voltfloat32







VehSpd_Kph_f32Vehicle_SpeedSF99B MotorControl
IN
00512Single Precision Float
Kphfloat32







MtrCurrQaxRef_Amp_f32QaxRef_AmpsSF99B MotorControl
ON
0-220220Single Precision Float7.81E-03Ampfloat32







MtrCurrDaxRef_Amp_f32DaxRef_AmpsSF99B MotorControl
ON
0-220220Single Precision Float7.81E-03Ampfloat32







MtrVoltQaxFF_Volt_f32VqRefFF_VoltsSF99B MotorControl
ON
0-3131Single Precision Float4.88E-04Voltsfloat32







MtrVoltDaxFF_Volt_f32VdRefFF_VoltsSF99B MotorControl
ON
0-3131Single Precision Float4.88E-04Voltsfloat32







MtrCurrAngle_Rev_f32AlphaSF99B MotorControl
ON
001Single Precision Float3.05E-05Revfloat32







KpqGain_Uls_f32KpqSF99B MotorControl
ON
002Single Precision Float6.10E-05Ulsfloat32







KiqGain_Uls_f32KiqSF99B MotorControl
ON
001024Single Precision Float1.56E-02Ulsfloat32







KpdGain_Uls_f32KpdSF99B MotorControl
ON
002Single Precision Float6.10E-05Ulsfloat32







KidGain_Uls_f32KidSF99B MotorControl
ON
001024Single Precision Float1.56E-02Ulsfloat32







MtrPosComputationDelay_Deg_f32Position DelaySF99B MotorControl
ON
0-180180Single Precision Float7.81E-03degfloat32







MtrVelFiltFFSV_MtrRadpS_M_s11p20
SF99B MotorControl
MN
0-111811189.5367431640625E-076.25E-02MtrRadpSs11p20_T







MtrVelFiltPISV_MtrRadpS_M_s11p20
SF99B MotorControl
MN
0-111811189.5367431640625E-076.25E-02MtrRadpSs11p20_T







EstKe_VpRadpS_f32Ke_EstimateSF99B MotorControl
IN
00.0250.075Single Precision Float
VpRadpSfloat32







MRFMtrVel_MtrRadpS_f32Motor_Vel_MRFSF99B MotorControl
IN
0-11181118Single Precision Float
MtrRadpSfloat32







MtrCurrQaxRef_Amp_f32QaxRef_AmpsSF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrCurrDaxRef_Amp_f32DaxRef_AmpsSF99B MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrCurrQax12Mag_Amp_M_f32MtrCurrQax12Mag_AmpSF99B MotorControl
MN
0-220220Single Precision Float7.81E-03Ampfloat32







MtrCurrQax6Mag_Amp_M_f32MtrCurrQax6Mag_AmpSF99B MotorControl
MN
0-220220Single Precision Float7.81E-03Ampfloat32







MtrCurrQax12Ph_Rad_M_f32MtrCurrQax12Ph_RadSF99B MotorControl
MN
0-6.296.29Single Precision Float7.81E-03Ampfloat32







MtrCurrQax6Ph_Rad_M_f32MtrCurrQax6Ph_RadSF99B MotorControl
MN
0-6.296.29Single Precision Float7.81E-03Ampfloat32







MRFMtrTrqCmdScl_MtrNm_f32Tcmd_scl
Motor Torque CommandIN
0-8.88.80.00390625
MtrNmfloat32







MRFCumMtrPos_Deg_f32Cum_Mtr_Pos_MRF
Cumulative Motor PositionIN
0-1179720011797200Single Precision Float
Degreesfloat32







InstMtrDir_Cnt_s08Instantaneous Motor DirectionSF99 MotorControlInstantaneous Motor DirectionON
0-1110.00E+00Countsint8







MtrQuad_Cnt_u08Motor_QuadrantSF99 MotorControlMotor QuadrantON
11410.00E+00Countuint8







MtrTrqCmdSign_Cnt_D_s08Instantaneous Motor Torque Command SignSF99 MotorControlInstantaneous Motor Torque Command SignDN
0-1110.00E+00Countsint8







PrevCumMtrPos_Deg_M_f32Previous Cum_Mtr_Pos_MRFSF99 MotorControlPrevious Cumulative Motor PositionMN
0-1179448011797200Single Precision FloatN/ADegreesfloat32







PrevInstMtrDir_Cnt_M_s08Previous Instantaneous Motor DirectionSF99 MotorControlPrevious Instantaneous Motor DirectionMN
0-1110Countsint8







MtrVoltFinalVChk_Volt_T_f32MtrVoltFinalVChk_VoltSF99 MotorControl
ON
0-3131Single Precision FloatN/AVoltfloat32







MtrVoltInt_Volt_T_f32MtrVoltInt_VoltSF99 MotorControl
ON
0031Single Precision FloatN/AVoltfloat32







MtrCurrQaxRpl_Amp_f32MtrCurrQaxRpl_AmpSF99 MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrVoltDaxInt_Volt_f32MtrVoltDaxInt_VoltSF99 MotorControl
IN
0-3131Single Precision Float
Voltfloat32







MtrVoltQaxInt_Volt_f32MtrVoltQaxInt_VoltSF99 MotorControl
IN
0-3131Single Precision Float
Voltfloat32







MtrVolt_Volt_f32MtrVolt_VoltSF99 MotorControl
IN
0-3131Single Precision Float
Voltfloat32







PeakTorque_MtrNm_D_f32PeakTorque_MtrNmSF99 MotorControl
DN
0-8.88.8Single Precision Float6.25E-02MtrNmfloat32







MRFMtrVelFiltPI_MtrRadpS_D_f32MRFMtrVelFiltPI_MtrRadpSSF99 MotorControl
DN
0-11181118Single Precision Float6.25E-02MtrRadpSfloat32







KpqGain_Uls_D_f32KpqGain_UlsSF99 MotorControl
DN
00100Single Precision Float6.25E-02Ulsfloat32







KiqGain_Uls_D_f32KiqGain_UlsSF99 MotorControl
DN
00100Single Precision Float6.25E-02Ulsfloat32







KpdGain_Uls_D_f32KpdGain_UlsSF99 MotorControl
DN
00100Single Precision Float6.25E-02Ulsfloat32







KidGain_Uls_D_f32KidGain_UlsSF99 MotorControl
DN
00100Single Precision Float6.25E-02Ulsfloat32







IdMin_Amp_D_f32IdMin_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







IqMin_Amp_D_f32IqMin_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







IqMax_Amp_D_f32IqMax_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







IdMax_Amp_D_f32IdMax_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







ImSqMin_AmpSq_D_f32ImSqMin_AmpSqSF99 MotorControl
DN
0096800Single Precision Float6.25E-02AmpSqfloat32







LimitedMRFMtrTrqCmd_MtrNm_D_f32LimitedMRFMtrTrqCmd_MtrNmSF99 MotorControl
DN
0-8.88.8Single Precision Float6.25E-02MtrNmfloat32







PhsAdvPeak_Rad_D_f32PhsAdvPeak_RadSF99 MotorControl
DN
0-6.296.29Single Precision Float6.25E-02Radfloat32







CosDelta_Cnt_M_f32CosDelta_CntSF99 MotorControl
MN
0-11Single Precision Float6.25E-02Cntfloat32







SinDelta_Cnt_M_f32SinDelta_CntSF99 MotorControl
MN
0-11Single Precision Float6.25E-02Cntfloat32







EstKe_VpRadpS_M_f32EstKe_VpRadpSSF99 MotorControl
MN
00.0250.075Single Precision Float6.25E-02VpRadpSfloat32







TermXq_Uls_M_f32TermXq_UlsSF99 MotorControl
MN
0-9090Single Precision Float6.25E-02Ulsfloat32







TermXd_Uls_M_f32TermXd_UlsSF99 MotorControl
MN
0-6060Single Precision Float6.25E-02Ulsfloat32







TermEgR_Amp_M_f32TermEgR_AmpSF99 MotorControl
MN
0-40504050Single Precision Float6.25E-02Ampfloat32







TermVR2_AmpSq_M_f32TermVR2_AmpSqSF99 MotorControl
MN
014400810000Single Precision Float6.25E-02AmpSqfloat32







TermEgRZ_Amp_M_f32TermEgRZ_AmpSF99 MotorControl
MN
0-55Single Precision Float6.25E-02Ampfloat32







TermVRZ_Amp_M_f32TermVRZ_AmpSF99 MotorControl
MN
00.02900Single Precision Float6.25E-02Ampfloat32







TermVR_Amp_M_f32TermVR_AmpSF99 MotorControl
MN
0120900Single Precision Float6.25E-02Ampfloat32







Reluctance_Henry_M_f32Reluctance_HenrySF99 MotorControl
MN
00.00020.0005Single Precision Float6.25E-02Henryfloat32







LocateMinImNIter_Cnt_D_u16LocateMinImNIter_CntSF99 MotorControl
DN
00511.00E+00Cntuint16







LocateTrqExNIter_Cnt_D_u16LocateTrqExNIter_CntSF99 MotorControl
DN
00511.00E+00Cntuint16







MtrQuad_Cnt_u08MtrQuad_CntSF99 MotorControl
IN
1141
Cntuint8







MtrTrqRip12thPhs_Rad_D_f32MtrTrqRip12thPhs_RadSF99 MotorControl
DN
0-6.296.29Single Precision Float0.000244140625Radfloat32







MtrTrqRip6thPhs_Rad_D_f32MtrTrqRip6thPhs_RadSF99 MotorControl
DN
0-6.296.29Single Precision Float0.000244140625Radfloat32







CoggingTrqCanc_MtrNm_D_f32CoggingTrqCanc_MtrNmSF99 MotorControl
DN
0-8.88.8Single Precision Float0.000244140625MtrNmfloat32







MtrCurrQax6thMag_Amp_D_f32MtrCurrQax6thMag_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







MtrCurrQax12thMag_Amp_D_f32MtrCurrQax12thMag_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







MtrCurrQax6thMagFinal_Amp_D_f32MtrCurrQax6thMagFinal_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







MtrTrqRip6thPhsFinal_Rad_D_f32MtrTrqRip6thPhsFinal_RadSF99 MotorControl
DN
0-6.296.29Single Precision Float6.25E-02Radfloat32







MtrCurrQax12thMagFinal_Amp_D_f32MtrCurrQax12thMagFinal_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







MtrTrqRip12thPhsFinal_Rad_D_f32MtrTrqRip12thPhsFinal_RadSF99 MotorControl
DN
0-6.296.29Single Precision Float6.25E-02Radfloat32







CoggingTrqMtrPosElec_Rev_D_f32CoggingTrqMtrPosElec_RevSF99 MotorControl
DN
001Single Precision Float6.25E-02Revfloat32







CogginTrqCancIndex_Cnt_D_u16CogginTrqCancIndex_CntSF99 MotorControl
DN
0025610.00E+00Cntuint16







ModIdxSrlComSvcDft_Cnt_lgc
SF99 MotorControl
IN
010N/A
CntBoolean







SysState_Cnt_Enum
SF99 MotorControl
IN
N/AN/AN/AN/A










MtrCurrOffComOffset_Cnt_u16MtrCurrOffComOffset_CntSF99 MotorControl
IN
00655351
Cntuint16







MtrCurrQaxRpl_Amp_M_f32MtrCurrQaxRpl_AmpSF99 MotorControl
IN
0-220220Single Precision Float
Ampfloat32







MtrCurrQaxCog_Amp_M_f32MtrCurrQaxCog_AmpSF99 MotorControl
IN
0-220220Single Precision Float
Ampfloat32







SlowAccessBufIndex_Cnt_M_u16
SF99 MotorControl
MN
00110.00E+00Cntuint16







FastAccessBufIndex_Cnt_M_u16
SF99 MotorControl
MN
00110.00E+00Cntuint16







MtrCurrQax18thMagFinal_Amp_D_f32MtrCurrQax18thMagFinal_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







MtrTrqRip18thPhsFinal_Rad_D_f32MtrTrqRip18thPhsFinal_RadSF99 MotorControl
DN
0-6.296.29Single Precision Float6.25E-02Radfloat32







MtrCurrQax18thMag_Amp_D_f32MtrCurrQax18thMag_AmpSF99 MotorControl
DN
0-220220Single Precision Float6.25E-02Ampfloat32







MtrTrqRip18thPhs_Rad_D_f32MtrTrqRip18thPhs_RadSF99 MotorControl
DN
0-6.296.29Single Precision Float0.000244140625Radfloat32







MtrCurrQax18Mag_Amp_M_f32MtrCurrQax18Mag_AmpSF99B MotorControl
MN
0-220220Single Precision Float7.81E-03Ampfloat32







MtrCurrQax18Ph_Rad_M_f32MtrCurrQax18Ph_RadSF99B MotorControl
MN
0-6.296.29Single Precision Float7.81E-03Ampfloat32







PICurrCntrl_MtrCurrQax_Amp_D_f32MtrCurrQax_Amp_D_f32SF99B MotorControl
DN
0-220220Single Precision Float0.0078125Ampfloat32







PICurrCntrl_MtrCurrDax_Amp_D_f32MtrCurrDax_Amp_D_f32SF99B MotorControl
DN
0-220220Single Precision Float0.0078125Ampfloat32







TrqCanc_MtrCurrQaxRpl6X_Amp_M_s6p9[6][7]MtrCurrQaxRpl6X_AmpSF99B MotorControl
MN
0FULLFULL0.0019531250Amps6p9_T







TrqCanc_MtrCurrQaxRpl6Y_Amp_M_s6p9[6][7]MtrCurrQaxRpl6Y_AmpSF99B MotorControl
MN
0FULLFULL0.0019531250Amps6p9_T







TrqCanc_MtrCurrQaxRpl12X_Amp_M_s6p9[6][7]MtrCurrQaxRpl12X_AmpSF99B MotorControl
MN
0FULLFULL0.0019531250Amps6p9_T







TrqCanc_MtrCurrQaxRpl12Y_Amp_M_s6p9[6][7]MtrCurrQaxRpl12Y_AmpSF99B MotorControl
MN
0FULLFULL0.0019531250Amps6p9_T







TrqCanc_MtrCurrQaxRpl18X_Amp_M_s6p9[6][7]MtrCurrQaxRpl18X_AmpSF99B MotorControl
MN
0FULLFULL0.0019531250Amps6p9_T







TrqCanc_MtrCurrQaxRpl18Y_Amp_M_s6p9[6][7]MtrCurrQaxRpl18Y_AmpSF99B MotorControl
MN
0FULLFULL0.0019531250Amps6p9_T







TrqCanc_CorrecNomKe_VpRadpS_M_f32
SF99B MotorControl
MN
00.0250.075Single Precision Float0.000007428V/Rad/Secfloat32







CurrentGainSvc_Cnt_lgcCurrentGainSvc_CntSF99B MotorControl
MN
001Single Precision Float1CntBoolean







MtrVoltDax_Volt_M_f32[2]MtrVoltDax_VoltSF99B MotorControl
MN
0-3131Single Precision Float4.88E-04Voltfloat32







MtrVoltQax_Volt_M_f32[2]MtrVoltQax_VoltSF99B MotorControl
MN
0-3131Single Precision Float4.88E-04Voltfloat32







MtrCurrQaxFinalRef_Amp_M_f32[2]MtrCurrQaxFinalRef_AmpSF99B MotorControl
MN
0-220220Single Precision Float7.81E-03Ampfloat32







PICurrCntrl_DervLambdaQax_Volt_D_f32DervLambdaQax_VoltSF99B MotorControl
MN
0-3131Single Precision Float4.88E-04Voltfloat32







PICurrCntrl_DervLambdaDax_Volt_D_f32DervLambdaDax_VoltSF99B MotorControl
MN
0-3131Single Precision Float4.88E-04Voltfloat32







CorrMtrPosElec_Rev_f32CorrMtrPosElec_RevSF99B MotorControl
MN
000.999984741210938Single Precision Float1.53E-05Revfloat32







DervLambdaAlphaDiag_Volt_f32DervLambdaAlphaDiag_VoltSF99B MotorControl
MN
0-3131Single Precision Float4.88E-04Voltfloat32







DervLambdaBetaDiag_Volt_f32DervLambdaBetaDiag_VoltSF99B MotorControl
MN
0-3131Single Precision Float4.88E-04Voltfloat32







CurrCmd_IdBoostAmount_Amp_D_f32IdBoostAmount_AmpSF99B MotorControl
MN
0-220220Single Precision Float7.81E-03Ampfloat32










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Sheet 3: Calibration Dictionary

MotorControl_CM - Rev 8


N
Calibration InformationAchieved in Software Design



Y








Range





P
Software Calibration NameStandard Reference NameFDD ReferenceDescriptionTuning SetOEM1X, 1Y, 1Z, 1I, 1BS 2X, 2Y, 2Z, 2I, 2BS etc Graph SettingsDefault ValueMinMaxUnitsTypeMemory Segment



Calibrations















k_MinTrqCmdScl_Uls_f32Minimum Allowable Torque Command EOL Scale FactorSF99 MotorControlCalibration to enforce a minimum limit on the Torque Command EOL Scale FactorNN
0.90.91.1Ulsfloat32




k_MaxTrqCmdScl_Uls_f32Maximum Allowable Torque Command EOL Scale FactorSF99 MotorControlCalibration to enforce a maximum limit on the Torque Command EOL Scale FactorNN
1.10.91.1Ulsfloat32




k_NoofPoles_Uls_f32k_PSF99B MotorControlNo of Poles in a motorNN
626Unitlessfloat32




k_PIGainVspdCutoff_kph_f32k_PIGainVspdCutoff_kphSF99B MotorControlValue Respresenting the maximum motor Current SquaredNN
30255kphfloat32




t_KpqGainX_MtrRadpSec_u12p4[8]t_Kpq_XSF99B MotorControlMotorVelocity xais tabel for calculating the Qaxis propotional GainNN
{0,5,50,100,200,300,400,500}01118MtrRadpSecu12p4_T




t_KpqGainY_Uls_u6p10[8]t_Kpq_YSF99B MotorControlPropotional Gain yaxis tabel for calculating the Qaxis propotional GainNN
{0.015,0.03,0.03,0.05,0.05,0.05,0.05,0.05}02Unitlessu6p10_T




t_KiqGainX_MtrRadpSec_u12p4[8]t_Kiq_XSF99B MotorControlMotorVelocity xais tabel for calculating the Qaxis Integral GainNN
{0,5,50,100,200,300,400,500}01118MtrRadpSecu12p4_T




t_KiqGainY_Uls_u10p6[8]t_Kiq_YSF99B MotorControlIntegral Gain yaxis tabel for calculating the Qaxis Integral GainNN
{16,50,100,100,100,100,100,100}01023.984Unitlessu10p6_T




t_KpdGainX_MtrRadpSec_u12p4[8]t_Kpd_XSF99B MotorControlMotorVelocity xais tabel for calculating the Daxis propotional GainNN
{0,5,50,100,200,300,400,500}01118MtrRadpSecu12p4_T




t_KpdGainY_Uls_u6p10[8]t_Kpd_YSF99B MotorControlPropotional Gain yaxis tabel for calculating the Daxis propotional GainNN
{0.015,0.03,0.03,0.05,0.05,0.05,0.05,0.05}02Unitlessu6p10_T




t_KidGainX_MtrRadpSec_u12p4[8]t_Kid_XSF99B MotorControlMotorVelocity xais tabel for calculating the Daxis Integral GainNN
{0,5,50,100,200,300,400,500}01118MtrRadpSecu12p4_T




t_KidGainY_Uls_u10p6[8]t_Kid_YSF99B MotorControlIntegral Gain yaxis tabel for calculating the Daxis Integral GainNN
{16,50,100,100,100,100,100,100}01023.984Unitlessu10p6_T




k_MtrPosComputationDelay_Sec_f32k_MtrPosComputationDelay_SecSF99B MotorControlComputationDelayNN
0.0000937500.0002Secfloat32




k_MinKeRngLmt_VpRadpS_f32Minimum Ke Range LimitSF99B MotorControl
NN
0.0260.0250.075V/Rad/Secfloat32




k_MaxKeRngLmt_VpRadpS_f32Maximum Ke Range LimitSF99B MotorControl
NN
0.060.0250.075V/Rad/Secfloat32




k_MinRRngLmt_Ohm_f32Minimum Resistance Range LimitSF99B MotorControl
NN
0.010.0050.12565Ohmfloat32




k_MaxRRngLmt_Ohm_f32Maximum Resistance Range LimitSF99B MotorControl
NN
0.060.0050.12565Ohmfloat32




k_MinLqRngLmt_Henry_f32Minimum Lq Range LimitSF99B MotorControl
NN
0.00010.000030.00041Henryfloat32




k_MaxLqRngLmt_Henry_f32Maximum Lq Range LimitSF99B MotorControl
NN
0.00020.000030.00041Henryfloat32




k_MinLdRngLmt_Henry_f32Minimum Ld Range LimitSF99B MotorControl
NN
0.00010.000030.00041Henryfloat32




k_MaxLdRngLmt_Henry_f32Maximum Ld Range LimitSF99B MotorControl
NN
0.00020.000030.00041Henryfloat32




k_NomTemp_DegC_f32Nominal Temperature TnomSF99B MotorControl
NN
25-40150DegCfloat32




k_MagThrC_VpRadpSpDegC_f32Thermal Coefficient MagnetSF99B MotorControl
NN
-0.001-0.00150.0015V/Rad/Sec/DegCfloat32




k_NomRfet_Ohm_f32Nominal Rfet ValueSF99B MotorControl
NN
0.0062500.12565Ohmfloat32




k_SiThermCoeff_OhmpDegC_f32Thermal Coefficient SiliconSF99B MotorControl
NN
0.00500.006Ohm/DegCfloat32




k_CuThermCoeff_OhmpDegC_f32Thermal Coefficient CopperSF99B MotorControl
NN
0.0039300.0045Ohm/DegCfloat32




t_KeSatTblX_Amp_u9p7[16]Ke Saturation Characteristic (X)SF99B MotorControl
NN
0, 10, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 1500220Ampu9p7_T




t_KeSatTblY_Uls_u2p14[16]Ke Saturation Characteristic (Y)SF99B MotorControl
NN
1, 1, 1, 0.998046875, 0.998046875, 0.994140625, 0.9921875, 0.98828125, 0.982421875, 0.974609375, 0.966796875, 0.95703125, 0.9453125, 0.931640625, 0.916015625, 0.9062502Unitlessu2p14_T




t_CurrParamCompDaxRef_Amp_u9p7[6]LdqSaturation Characteristic_Daxis (Z)SF99B MotorControl
NN
0,25,50,75,100,1250220Ampu9p7_T




t_CurrParamCompQaxRef_Amp_u9p7[7]LdqSaturation Characteristic_Qaxis (X)SF99B MotorControl
NN
0,25,50,75,100,125,1500220Ampu9p7_T




t2_CurrParamLdSatSclFac_Uls_u2p14[6][7]LdSaturation Characteristic (Y)SF99B MotorControl
NN
{{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063}}02ulsu2p14_T




t2_CurrParamLqSatSclFac_Uls_u2p14[6][7]LqSaturation Characteristic (Y)SF99B MotorControl
NN
{{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063},{1.0,1.0,0.9961,0.9883,0.9707,0.9453,0.9063}}02Ulsu2p14_T




k_PiSamplingTs_Sec_f32k_TsSF99B MotorControlPI sampling TimeNN
0.00012500.001secfloat32




t_CommOffsetTblX_Uls_u3p13[2]t_ComOffsetXFDD15D SineVoltageGenerationDriveMIOffsetXtableNN
{0.6,0.95}01Ulsu3p13_T




t_CommOffsetTblY_Cnt_u16[2]t_CommOffsetTblYFDD15D SineVoltageGenerationDriveMIOffsetXtableNN
{63,0}02000Cntuint16




k_EstPkCurr2msLPFKn_Uls_u16EstPkCurr_AAFilt_2ms_freqSF99B MotorControlCalibration to set the cutoff frequency for the two anti-alias filters applied to Id & Iq estimates in the 2 msec loopNN
6268827739Ulsuint16




k_EstPkCurrSlowLoopLPFKn_Uls_u16EstPkCurr_AAFilt_slowloop_freqSF99B MotorControlCalibration to set the cutoff frequency for the anti-alias filter applied to Ipeak2 in the slower loopNN
12245004836Ulsuint16




t_KiqGainX_MtrRadpSec_u12p4[8]t_Kiq_XSF99B MotorControlMotorVelocity xais tabel for calculating the Qaxis Integral GainNN1X{0,5,50,100,200,300,400,500}01118MtrRadpSecu12p4_T




t_KiqGainY_Uls_u10p6[8]t_Kiq_YSF99B MotorControlIntegral Gain yaxis tabel for calculating the Qaxis Integral GainNN1Y{16,50,100,100,100,100,100,100}01023.984Unitlessu10p6_T




t_KpdGainX_MtrRadpSec_u12p4[8]t_Kpd_XSF99B MotorControlMotorVelocity xais tabel for calculating the Daxis propotional GainNN2X{0,5,50,100,200,300,400,500}01118MtrRadpSecu12p4_T




t_KpdGainY_Uls_u6p10[8]t_Kpd_YSF99B MotorControlPropotional Gain yaxis tabel for calculating the Daxis propotional GainNN2Y{0.015,0.03,0.03,0.05,0.05,0.05,0.05,0.05}02Unitlessu6p10_T




t_KidGainX_MtrRadpSec_u12p4[8]t_Kid_XSF99B MotorControlMotorVelocity xais tabel for calculating the Daxis Integral GainNN3X{0,5,50,100,200,300,400,500}01118MtrRadpSecu12p4_T




t_KidGainY_Uls_u10p6[8]t_Kid_YSF99B MotorControlIntegral Gain yaxis tabel for calculating the Daxis Integral GainNN3Y{16,50,100,100,100,100,100,100}01023.984Unitlessu10p6_T




k_MtrVelFiltFFKn_Cnt_u16k_MtrVelFiltFFFreqSF99B MotorControlCalibration for LP filterNN
773981846884Cntuint16




k_MtrVelFiltPIKn_Cnt_u16k_MtrVelFiltPIFreqSF99B MotorControlCalibration for LP filterNN
773981846884Cntuint16




k_MtrPosComputationDelay_Sec_f32k_MtrPosComputationDelay_SecSF99B MotorControlComputationDelayNN
0.0000937500.0002Secfloat32




k_NoofPoles_Uls_f32k_PSF99B MotorControlNo of Poles in a motorNN
6212Unitlessfloat32




t_MtrTrqCog_MtrNm_s5p10[512]kt_MtrTrqCog_MtrNmSF99B MotorControlCogging Trq Cancellation TableNN
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}-11MtrNms5p10_T




k_Harmonic6thElec_Uls_f32k_HarmonicElec_6thSF99B MotorControl6th HarmonicNN
6118Unitlessfloat32




k_Harmonic12thElec_Uls_f32k_Harmonic12thElecSF99B MotorControl12th HarmonicNN
12118Unitlessfloat32




k_Harmonic18thElec_Uls_f32k_Harmonic18thElecSF99B MotorControl18th HarmonicNN
18118Unitlessfloat32




t_MtrCurrQaxRpl_Amp_u9p7[7]t_MtrTrqRipQax_AmpSF99B MotorControlQaxTbl_ZaxisNN
{0,25,50,75,100,125,135}0220Ampu9p7_T




t_MtrCurrDaxRpl_Amp_u9p7[6]t_MtrTrqRipDax_AmpSF99B MotorControlDaxTbl_XaxisNN
{0,25,50,75,100,125}0220Ampu9p7_T




t2_MtrCurrQaxRpl6X_Amp_s6p9[6][7]t_MtrCurrQax_Rpl_6XSF99B MotorControlLookup table representing the change in q-axis current ripple compensationNN
{{0,0,0,0,0,0,0}, {0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}-6463.998046875Amps6p9_T




t2_MtrCurrQaxRpl6Y_Amp_s6p9[6][7]t_MtrCurrQax_Rpl_6YSF99B MotorControlLookup table representing the change in q-axis current ripple compensationNN
{{0,0,0,0,0,0,0}, {0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}-6463.998046875Amps6p9_T




t2_MtrCurrQaxRpl18X_Amp_s6p9[6][7]t_MtrCurrQax_Rpl_6XSF99B MotorControlLookup table representing the change in q-axis current ripple compensationNN
{{0,0,0,0,0,0,0}, {0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}-6463.998046875Amps6p9_T




t2_MtrCurrQaxRpl18Y_Amp_s6p9[6][7]t_MtrCurrQax_Rpl_6YSF99B MotorControlLookup table representing the change in q-axis current ripple compensationNN
{{0,0,0,0,0,0,0}, {0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}-6463.998046875Amps6p9_T




t2_MtrCurrQaxRpl12X_Amp_s6p9[6][7]t_MtrCurrQax_Rpl_12XSF99B MotorControlLookup table representing the change in q-axis current ripple compensationNN
{{0,0,0,0,0,0,0}, {0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}-6463.998046875Amps6p9_T




t2_MtrCurrQaxRpl12Y_Amp_s6p9[6][7]t_MtrCurrQax_Rpl_12YSF99B MotorControlLookup table representing the change in q-axis current ripple compensationNN
{{0,0,0,0,0,0,0}, {0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}-6463.998046875Amps6p9_T




t_MtrCurrQaxRplPIY_Amp_u9p7[7]t_MtrCurrQaxRplPIY_AmpSF99B MotorControlQaxTbl_ZaxisNN
{0,25,50,75,100,125,135}0220Ampu9p7_T




t_MtrVelX_MtrRadpS_T_u16[10]t_MtrVelX_MtrRadpSSF99B MotorControlVelocity table for Mag_PINN
{0,100,114,303,800,1200,2620,3200,8492,11100}012000MtrRadpSecuint16




t2_MtrTrqCancPIMagRP_Uls_u6p10[10][7]t2_MtrTrqCancPIMagRP_UlsSF99B MotorControlValue Respresenting the maximum motor Current SquaredNN
{{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}010Ulsu6p10_T




t2_MtrTrqCancPIPhRP_Rev_u0p16[10][7]t2_MtrTrqCancPIPhRP_RevSF99B MotorControlMotorVelocity xais tabel for calculating the Qaxis propotional GainNN
{{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0},{0,0,0,0,0,0,0}}00.999984741210938Revu0p16_T




k_InstMtrDirHyst_Deg_f32InstMtrDir_HystSF99B MotorControlMotor position degrees that must be detected in the opposite direction before changing the state of the instantaneous motor directionNN
2.506.25MtrDegfloat32




k_NomLq_Henry_f32MtrCtrl_k_LqNom_HenrySF99B MotorControlNominal Lq Value: q-axisNN
0.000118890.000030.00041Henryfloat32




k_NomLd_Henry_f32MtrCtrl_k_LdNom_HenrySF99B MotorControlNominal Ld Value: d-axisNN
0.000118890.000030.00041Henryfloat32




t_RefDeltaPoints_Rad_f32[8]MtrCtrl_t_IdqRefDeltaPoints_RadSF99B MotorControlMotor Voltage Phase Angle (delta) table for setting up Bracket ArrayNN
{-3.1415926535897931,-2.3561944901923448,-1.5707963267948966, -0.78539816339744828, 0,0.78539816339744828, 1.5707963267948966, 2.3561944901923448}-3.141592653589793.14159265358979Radfloat32




t_Q13VltgSchedXTbl_MtrRadpS_u12p4[10]MtrCtrl_t_Q13VltgSchedXTbl_MtrRadpSSF99B MotorControlQ1,3 Available Voltage AdjustmentNN
{0,100,200,300,500,600,700,800,900,1100}01118MtrRadpSecu12p4_T




t_Q13VltgSchedYTbl_Volt_u5p11[10]MtrCtrl_t_Q13VltgSchedYTbl_VoltSF99B MotorControlQ1,3 Available Voltage AdjustmentNN
{0,0,0,0,0,0,0,0,0,0}05Voltu5p11_T




t_Q24VltgSchedXTbl_MtrRadpS_u12p4[10]MtrCtrl_t_Q24VltgSchedXTbl_MtrRadpSSF99B MotorControlQ2,4 Available Voltage AdjustmentNN
{0,100,200,300,500,600,700,800,900,1100}01118MtrRadpSecu12p4_T




t_Q24VltgSchedYTbl_Volt_u5p11[10]MtrCtrl_t_Q24VltgSchedYTbl_VoltSF99B MotorControlQ2,4 Available Voltage AdjustmentNN
{0,0,0,0,0,0,0,0,0,0}05Voltu5p11_T




k_IdqRefTrqTol_Rad_f32MtrCtrl_k_IdqRefTrqTol_UlsSF99B MotorControlInterpolate Peak Torque Solver ToleranceNN
0.0150.0010.1Radfloat32




k_IdqRefTrqNIter_Cnt_u16MtrCtrl_k_IdqRefTrqNIter_UlsSF99B MotorControlLocate Peak Torque Solver Number of IterationsNN
315Cntuint16




k_IdqRefIminTol_Amp_f32MtrCtrl_k_IdqRefIminTol_UlsSF99B MotorControlMinimum Current Solver Number of IterationsNN
0.10.0120Ampfloat32




k_IdqRefIminNIter_Cnt_u16MtrCtrl_k_KdqRefIminNIter_UlsSF99B MotorControlMinimum Current Solver ToleranceNN
315Cntuint16




k_IdqRefLocateRefNIter_Cnt_u16MtrCtrl_k_IdqRefLocateRefNIter_UlsSF99B MotorControlLocate Reference Solver Number of IterationsNN
10120Cntuint16




k_deadtimeVScale_Uls_f32MtrCtrl_k_DeadTimeSec_UlsSF99B MotorControlRatio of Available DC Link Voltage
% at Inverter (Deadtime Compensation Loss)
NN
10.951Ulsfloat32




k_IdBoostGain_Uls_f32MtrCtrl_k_IdBoostGain_UlsSF99B MotorControl
NN
001Ulsfloat32




k_IdBoostVRThreshScl_Uls_f32MtrCtrl_k_IdBoostVRThreshScl_UlsSF99B MotorControl
NN
0.2501Ulsfloat32




t_IdBoostTrqCmdX_MtrNm_u4p12[11]MtrCtrl_t_IdBoostTrqCmdX_MtrNmSF99B MotorControl
NN
{0,1.5,1.75,2,2.25,2.5,3,3.5,4,4.5,5}08.8MtrNmu4p12_T




t_IdBoostTrqCharSclY_Uls_u1p15[11]MtrCtrl_t_IdBoostTrqCharSclY_UlsSF99B MotorControl
NN
{0,0.5,0.6,0.7,0.725,0.775,0.825,0.85,0.9,0.95,1}01Ulsu1p15_T

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Sheet 4: Global Constants

MotorControl_CM - Rev 8








































































Variable Information (Global Variables Only)

Achieved in Software DesignUsed in Module List





Layer 2Layer 3Layer 4Layer 5
Constant NameDescriptionUintsTypeEngineering ValueADCADC DiagnosticsData Memory VerificationDC Link Power ControlDSP Computational IntegrityDSP SPI driverEvent Manager DriverExternal Memory DriverFlash Programming ExecGPIOIllegal OpCode HandlerInterrupt HandlerMotor Current DriverMotor Driver DiagnosticsMotor Position DriverPhase Feedback CapturePowerdown ControlPrimary Shutdown ControlProgram FlowProgram Memory DiagnosticPWM Duty CycleRedundant Memory CheckRedundant Rapid ShutdownSchedulerStack MonitorState Dependent Task ListSystem Boot & StartupSystem ControlTemperature Sensor DiagnosticUnused Interrupt HandlerUtilization MonitorWatchdog DirverSmithBattery VoltageBattery Voltage DiagnosticsDiagnostic CTC ManagerDiagnostic ManagerDiagnostics Application ServicesEOL TorqueTestFlash Boot LoaderFlight RecorderHandwheel PositionHandwheel TorqueMotor Control Output ConversionMotor Position DiagnosticsMotor Position InitializationMotor VelocityMotor Velocity TachometerSerial Communications I/OSerial Communications ServicesStates and ModesTuning SelectVehicle Power ModeVehicle SpeedController PolarityCurrent EstimationHandwheel VelocityInverse Motor ModelMotor Temperature EstimationMotor Torque LimitOutput Reasonableness DianosticParameter EstimationQuadrant and rate DetectionActive Pull CompensationAssistDampingDuty CycleKinematic Integrity DiagnosticLong Term Vehicle Speed DiagnosticMax Assist LimitReturnState Output ControlTorque Output























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Sheet 5: Template

2.2aData File:












Header:extern <TYPE><TAB><NAME>;









Source:#pragma DATA_SECTION(<ROOTNAME>, "<SEGMENT>");
<TYPE> <NAME>;










EOL Constants:












Header:extern <TYPE><TAB><NAME>;









Source:#pragma DATA_SECTION(<ROOTNAME>, "<SEGMENT>");
<TYPE> <NAME>;










Global (Embedded) Constants:












Header:#define <NAME><COL40><VALUE>









A2L Name












Measurement:rte_<SWC>_<NAME>









Calibration Constants:












Tuning ID:



















Tuning:NIndex Range:










Header:extern CONST(<AUTOSAR_TYPE>, CAL_CONST) <NAME>;









Source:#pragma DATA_SECTION(<ROOTNAME>, ".<SEGMENT>");
CONST(<AUTOSAR_TYPE>, CAL_CONST) <NAME> = <VALUE>;










eCal:<NAME>























Tuning:YIndex Range:










Header:<NONCRITICAL>
#define <ROOTNAME><TAB>k_N_CalNC_Cnt_Str.<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
#define <ROOTNAME><TAB>k_S_CalSC_Cnt_Str.<ROOTNAME>
<SAFETYCRITICAL>










Source:










eCal:<NONCRITICAL>
k_N_CalNC_Cnt_Str.<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
k_S_CalSC_Cnt_Str.<ROOTNAME>
<SAFETYCRITICAL>
























Tuning:PIndex Range:










Header:<NONCRITICAL>
#define <ROOTNAME><TAB>k_N_CalNC_Cnt_Str.Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
#define <ROOTNAME><TAB>k_S_CalSC_Cnt_Str.SC_Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<SAFETYCRITICAL>










Source:










eCal:<NONCRITICAL>
k_N_CalNC_Cnt_Str.Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
k_S_CalSC_Cnt_Str.SC_Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<SAFETYCRITICAL>

















Sheet 6: Help

Short cutMacroSescription
Ctrl-qClearDataDictFilterWill clear all autofilters on the Global Data Dictionary




DFD_CreateCreates a Series of Data Flow Worksheet Pages from the information in the data dictionary. If Data Flow Worksheet pages already exist, they will be deleted first.

DFD_DeleteWill clear all Data Flow Diagram pages from the Data Dictionary. This will make the file smaller for archiving.

DFD_PrintFormate and prepares to print the Data Flow Worksheet pages.

4 - Design Review_MtrCtrl_CM


Overview

Summary Sheet
Davinci Files
Source Code _PICurrCntrl
Source Code_CurrCmd
MDD_PICurrCntrl
MDD_CurrCmd
Data Dictionary
QAC_PICurrCntrl
QAC_CurrCmd


Sheet 1: Summary Sheet
























Rev 2.026-Aug-13

Peer Review Summary Sheet



























Component Name:


kzshz2: Intended Use: Identify which component is being reviewed. This should be the Module Short Name from Synergy Rationale: Required for traceability. It will help to ensure this form is not attaced to the the wrong change request. MtrCntrl_CM
Component Revision:


kzshz2: Intended Use: Identify which Synergy revision of this component is being reviewed Rationale: Required for traceability. It will help to ensure this form is not attaced to the the wrong change request. 12





























Change Owner:


kzshz2: Intended Use: Identify the developer who made the change(s) Rationale: A change request may have more than one resolver, this will help identify who made what change. Change owner identification may be required by indusrty standards. Selva Sengottaiyan
Change Request ID:


10950





























kzshz2: Intended Use: Intended to identify at a high level to the reviewers which areas of the component have been changed. Rationale: This will be good information to know when ensuring appropriate reviews have been completed. Modified File Types:
















































































































































kzshz2: Intended Use: Identify who where the reviewers, what they reviewed, and if the reviewed changes have been approved to release the code for testing. Comments here should be at a highlevel, the specific comments should be present on the specific review form sheet. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. ADD DR Level Move reviewer and approval to individual checklist form Review Checklist Summary:






















































Reviewed:































XMDD


XSource Code



XData Dictionary


XQAC



































XIntegration Manual


XDavinci Files








































































Comments:






























































































General Guidelines:
- The reviews should be performed over the portions of the component that were modified as a result of the Change Request. (Note: If this peer review form was not
completed for pervious versions of this component, the Change Owner should review the entire component and complete the checklist in its entirety prior and check
the form into Syngery. This should be done prior to reviewing the modifications for this Change Result)
- The Change Owner is responsible for completing the entire checklist (Pre and Group review items) prior holding the initial group review.
- New components should include FDD Owner and Intergator as apart of the Group Review Board (Source Code, Integration Manual, and Davinci Files)
- Select "Yes" and add "N/A" to the comments for checklist items that are not applicable for this change















Sheet 2: Davinci Files






















Rev 2.026-Aug-13
Peer Review Meeting Log (Davinci Review)


























Quality Check Items:

































YesNo
Rationale is required for all answers of No









Pre-review checklist for change ownersDCF: Latest StdDef imported








X
Comments:










































DCF: Only StdDef Port types are used (if not








X
Comments:




add justification)




































DCF: All unused definitions removed








X
Comments:










































*Cfg.arxml.TT: Verfied Davinci Configurator imported the








X
Comments:










change correctly
kzshz2: Either a generic sandbox or a baselined integration project can be used to verify












































*Cfg.h.TT: Verfied Davinci Configurator generates








X
Comments:










the configuration header(s) file correctly




kzshz2: Either a generic sandbox or a baselined integration project can be used to verify









































Group-review for review boardAll changed files have been compared against previous








X
Comments:




versions (If available)

kzshz2: Intended Use: Identify if previous version was compared and only the expected change(s) was present. This is for text files only, not binary or GUIs Rationale: This is helpful in identifying unapproved (intended or mistaken) changes.


































DCF:Automated validation check is performed








X
Comments:

























































DCF: Inputs/Outputs match names from requirements








X
Comments:

























































DCF: Inputs/Outputs configuration paremeters








X
Comments:










reviewedkzshz2: Intended Use: All changed inputs have been reviewed to ensure configuration parameters (i.e. Buffered vs Direct read/writes) are correct. This includes signal grouping when signal consistency is required by the FDD













































DCF: Sender/Reciever Ports type and default values








X
Comments:










macth their corresponding ports (internal/external)






kzshz2: Intended Use: Identify if all the Sender/Reciever ports are compatibale with there connecting ports. Rationale: This will help to avoid errors when this component is being integrated into a project.






































DCF: Ports prototype and default values








X
Comments:










macth their corresponding ports (internal/external)






kzshz2: Intended Use: Identify if all the Server/Client ports are compatibale with there connecting ports. Rationale: This will help to avoid errors when this component is being integrated into a project.






































DCF: Server runnable variables are using direct








X
Comments:

No Change







read/writes













































DCF: Runnable calling frequencies match requirements








X
Comments:

No change
























































General Notes / Comments:



























































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod






































































Sheet 3: Source Code _PICurrCntrl






















Rev 2.026-Aug-13
Peer Review Meeting Log (Source Code Review)

























Source File Name:




kzshz2: Intended Use: Identify which .asm, .c, or .h file is being reviewed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. Ap_PICurrcntrl.c
Source File Revision:


kzshz2: Intended Use: Identify which version of the source file is being review. Rationale: Required for traceability between source code and review. Auditors will likely require this. 12

























Module Design Document Name:




kzshz2: Intended Use: Identify which version of the MDD this source file was written against. Rationale: Needed for traceability between source code and MDD PICurrcntrl_MDD
MDD Revision:


kzshz2: Intended Use: Identify which version of the MDD this source file was written against. Rationale: Needed for traceability between source code and MDD 7

































Data Dictionary Revision:



kzshz2: Intended Use: Identify which version of the Data Dictionary was referenced for ranges during the source file review. Rationale: Needed for traceability between source code and DD 8

































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Pre-review checklist
(change owners only)
Analysis performed for divide by zero




kzshz2: Intended Use: To confirm this defensive coding strategy has been taken into consideration Rationale: Necessary since currently there is no place this is documented



X

Comments:

CR10557 will check this







































Software Design and Coding Standard followed
X

Comments:

CR10557 will check this







































Software Naming Convention followed


X

Comments:

CR10557 will check this







































All buffered outputs are written in every path








X

Comments:











































Group-review Checklist (review board)Telelogic Synergy version matches header





kzshz2: Intended Use: Indicate that the the versioning was confirmed by the peer reviewer(s). Rationale: There have been many occassions where versions were not updated in files and as a result Unit Test were referencing wrong versions. This often time leads to the need to re-run of batch tests.


X
Comments:










































Change log contains detailed description of changes








X
Comments:










































Code compared vs requirements (Document or Model)







kzshz2: Intended Use: Identify if previous version was compared and only the expected change(s) was present. Rationale: This is helpful in identifying unapproved (intended or mistaken) changes.
X
Comments:

Only for the changes







































Global Outputs (RTE/Non-RTE) Initialized








X
Comments:
















































Global Outputs are limited to the legal range defined








X
Comments:

Not limited







in the FDD Data dictionary










CR10557 will check this
























No Compiler Errors verified


kzshz2: Intended Use: To confirm the appropriate variable name formats have been used. Rationale: This is needed to ensure there will be no errors discovered at the time of integration. A Sandox project may be required to confirm there are no errors until the QAC tool has been evaultated to determine if it can automate this check.





X
Comments:
















































Type Casting and Fix Point Macros use reviewed








X
Comments:

N/A













































Function prototype and passed parameters are








X
Comments:

N/A







consistent






































General Notes / Comments:


























Use MtrVolt instead of MtrCurr































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod






































































Sheet 4: Source Code_CurrCmd






















Rev 2.026-Aug-13
Peer Review Meeting Log (Source Code Review)

























Source File Name:




kzshz2: Intended Use: Identify which .asm, .c, or .h file is being reviewed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. Ap_CurrCmd.c
Source File Revision:


kzshz2: Intended Use: Identify which version of the source file is being review. Rationale: Required for traceability between source code and review. Auditors will likely require this. 12

























Module Design Document Name:




kzshz2: Intended Use: Identify which version of the MDD this source file was written against. Rationale: Needed for traceability between source code and MDD CurrCmd_MDD
MDD Revision:


kzshz2: Intended Use: Identify which version of the MDD this source file was written against. Rationale: Needed for traceability between source code and MDD 9

































Data Dictionary Revision:



kzshz2: Intended Use: Identify which version of the Data Dictionary was referenced for ranges during the source file review. Rationale: Needed for traceability between source code and DD 8

































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Pre-review checklist
(change owners only)
Analysis performed for divide by zero




kzshz2: Intended Use: To confirm this defensive coding strategy has been taken into consideration Rationale: Necessary since currently there is no place this is documented



X

Comments:

CR10557 will check this







































Software Design and Coding Standard followed


Comments:

CR10557 will check this







































Software Naming Convention followed





Comments:

CR10557 will check this







































All buffered outputs are written in every path








X

Comments:











































Group-review Checklist (review board)Telelogic Synergy version matches header





kzshz2: Intended Use: Indicate that the the versioning was confirmed by the peer reviewer(s). Rationale: There have been many occassions where versions were not updated in files and as a result Unit Test were referencing wrong versions. This often time leads to the need to re-run of batch tests.


X
Comments:










































Change log contains detailed description of changes








X
Comments:










































Code compared vs requirements (Document or Model)







kzshz2: Intended Use: Identify if previous version was compared and only the expected change(s) was present. Rationale: This is helpful in identifying unapproved (intended or mistaken) changes.
X
Comments:

Only for the changes







































Global Outputs (RTE/Non-RTE) Initialized








X
Comments:
















































Global Outputs are limited to the legal range defined








X
Comments:

Not limited







in the FDD Data dictionary










CR10557 will check this
























No Compiler Errors verified


kzshz2: Intended Use: To confirm the appropriate variable name formats have been used. Rationale: This is needed to ensure there will be no errors discovered at the time of integration. A Sandox project may be required to confirm there are no errors until the QAC tool has been evaultated to determine if it can automate this check.





X
Comments:
















































Type Casting and Fix Point Macros use reviewed








X
Comments:

Only for the changes













































Function prototype and passed parameters are








X
Comments:

Only for the changes







consistent






































General Notes / Comments:



























































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod






































































Sheet 5: MDD_PICurrCntrl






















Rev 2.026-Aug-13
Peer Review Meeting Log (MDD Review)






























Module Name:

kzshz2: Intended Use: Identify which file is has been reviewed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. PICurrCntrl


Modulekzshz2: Intended Use: Identify how many source files are being reviewed and trace it to the appropriate MDD. Rationale: Required for traceability between source code and MDD
4of4





























MDD Revision:

kzshz2: Intended Use: Identify which version of the MDD has been reviewed. Rationale: Required for traceability between the MDD and review. Auditors will likely require this. 7


Source File Revision:


kzshz2: Intended Use: Identify which version of the source file was this MDD written for. Rationale: Needed for traceability between source code and MDD 12

Data Dictionary Revision:



kzshz2: Intended Use: Identify which version of the Data Dictionary was referenced for ranges during the review. Rationale: Needed for traceability between source code and DD. Note: Maybe this should be moved to the Summary sheet since there is only one Data Dictionary Version for all changes 8



















































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Group-review Checklist (review board)Telelogic Synergy version matches header








X
Comments:










































Change log contains detailed description of changes








X
Comments:










































Changes Highlighted (for Unit Tester)








X
Comments:










































High-level Diagrams have been reviewed (Section 2)








X
Comments:
















































All Design Exceptions and Limitations are listed








X
Comments:

Only for the changes













































Design Rationale understood captured appropriately








X
Comments:

Only for the changes














































General Notes / Comments:



























































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod






































































Sheet 6: MDD_CurrCmd






















Rev 2.026-Aug-13
Peer Review Meeting Log (MDD Review)






























Module Name:

kzshz2: Intended Use: Identify which file is has been reviewed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. CurrCmd


Modulekzshz2: Intended Use: Identify how many source files are being reviewed and trace it to the appropriate MDD. Rationale: Required for traceability between source code and MDD
2of4





























MDD Revision:

kzshz2: Intended Use: Identify which version of the MDD has been reviewed. Rationale: Required for traceability between the MDD and review. Auditors will likely require this. 9


Source File Revision:


kzshz2: Intended Use: Identify which version of the source file was this MDD written for. Rationale: Needed for traceability between source code and MDD 12

Data Dictionary Revision:



kzshz2: Intended Use: Identify which version of the Data Dictionary was referenced for ranges during the review. Rationale: Needed for traceability between source code and DD. Note: Maybe this should be moved to the Summary sheet since there is only one Data Dictionary Version for all changes 8



















































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Group-review Checklist (review board)Telelogic Synergy version matches header








X
Comments:










































Change log contains detailed description of changes








X
Comments:










































Changes Highlighted (for Unit Tester)








X
Comments:










































High-level Diagrams have been reviewed (Section 2)








X
Comments:
















































All Design Exceptions and Limitations are listed








X
Comments:

Only for the changes













































Design Rationale understood captured appropriately








X
Comments:

Only for the changes














































General Notes / Comments:



























































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod






































































Sheet 7: Data Dictionary






















Rev 2.026-Aug-13
Peer Review Meeting Log (Data Dictionary Review)


























Data Dictionary Revision:



kzshz2: Intended Use: Identify which version of the file is being reviewed Rationale: Required for traceability. 8









































kzshz2: Intended Use: Indicate to the reviewers the type of variable changes. This should be filled out prior to the review by the change owner. Rationale: This will be good information to know to both reviewers and post reviewers of the change. Variables:



























XNewly Added


Name Changes


Range Changes


XDeleted
































NVM Changes


Other:


































































kzshz2: Intended Use: Indicate to the reviewers the type of calibration changes. This should be filled out prior to the review by the change owner. Rationale: This will be good information to know to both reviewers and post reviewers of the change. Calibrations:



























Newly Added



Name Changes



Range Changes


Default Value Changes

































Deleted


Other:


































































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Group-review Checklist (review board)Telelogic Synergy version matches header








X
Comments:










































Change log contains detailed description of changes








X
Comments:










































All Changes Identified (for Unit Tester)








X
Comments:










































Calibration and NVM names, ranges, and default values









X
Comments:

CR10557 will check this

compared against FDD




































Global variables names, ranges, and default values








X
Comments:




compared against FDD Data Dictionary






























































General Notes / Comments:























Rename the Mtrcurr to Mtrvolt


































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod






































































Sheet 8: QAC_PICurrCntrl






















Rev 2.026-Aug-13
Peer Review Meeting Log (QAC Review)


























Module Name:

kzshz2: Intended Use: Identify which .c file is being analyzed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. Ap_PICurrCntrl

Source File Revision:


12

Module
4of4


























Compliance Document Version:




unreleased









































kzshz2: Intended Use: Identify specific changes in results (new violation present, previous violation corrected, etc.). Changes to the version of the tool or the way the results were gathered should be described here also. This should be filled out prior to the review by the change owner. Rationale: Gives reviewers an what needs to be focused on. Forces the change owner to compare with previous results to catch any differences that may otherwise go unoticed Brief Summary of Changes (In Results or Tool):


































































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Pre-review
checklist for change owners
QAC version is correct and did not change (List version)







kzshz2: Intended Use: Identify which version of the QAC Subproject was used and if any of the personalities may have changed. Rationale: Will help ensure this is factored into evaluating the results
X
Comments:










































Contract Folder's header files are appropriate





kzshz2: Intended Use: Identify that the contract folder contains only the information required for this component. All other variables, constants, function prototypes, etc. should be removed. Rationale: This will help avoid unit testers having to considers object not used. It will also avoid having other files required for QAC.


X
Comments:












































G Group-review Checklist (review board)100% Compliance to the MISRA Compliance DocumentX
Comments:













































General Notes / Comments:



























































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod






































































Sheet 9: QAC_CurrCmd






















Rev 2.026-Aug-13
Peer Review Meeting Log (QAC Review)


























Module Name:

kzshz2: Intended Use: Identify which .c file is being analyzed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. Ap_CurrCmd

Source File Revision:


12

Module
2of4


























Compliance Document Version:




unreleased









































kzshz2: Intended Use: Identify specific changes in results (new violation present, previous violation corrected, etc.). Changes to the version of the tool or the way the results were gathered should be described here also. This should be filled out prior to the review by the change owner. Rationale: Gives reviewers an what needs to be focused on. Forces the change owner to compare with previous results to catch any differences that may otherwise go unoticed Brief Summary of Changes (In Results or Tool):


































































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Pre-review
checklist for change owners
QAC version is correct and did not change (List version)







kzshz2: Intended Use: Identify which version of the QAC Subproject was used and if any of the personalities may have changed. Rationale: Will help ensure this is factored into evaluating the results
X
Comments:










































Contract Folder's header files are appropriate





kzshz2: Intended Use: Identify that the contract folder contains only the information required for this component. All other variables, constants, function prototypes, etc. should be removed. Rationale: This will help avoid unit testers having to considers object not used. It will also avoid having other files required for QAC.


X
Comments:












































G Group-review Checklist (review board)100% Compliance to the MISRA Compliance DocumentX

Comments:













































General Notes / Comments:



























































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Selva Sengottaiyan
Review Date :

11/27/13
Group Review Level:


DR4



























Lead Peer Reviewer:


Jared Julian

Approved by Reviewer(s):



Yes































Other Reviewer(s):


Prerit Pramod





































































5 - MtrCntrl_Integration_Manual

1 Dependencies 2

1.1 SWCs 2

1.2 Configuration Files to be provided by Integration Project 2

1.3 Functions to be provided by Integration Project 2

2 Configuration 3

2.1 Build Time Config 3

2.2 Generator Config 3

3 Integration 4

3.1 Global Data 4

3.2 Component Conflicts 4

3.3 Include Path 4

3.4 ADC2 Changes 4

3.5 Configurator Changes 4

3.5.1 DIO 4

3.5.2 Port 5

4 Runnable Scheduling 6

5 Memory Mapping 7

5.1 Mapping 7

5.2 Usage 7

6 Revision Control Log 8

Dependencies

SWCs

ModuleRequired Feature

Configuration Files to be provided by Integration Project

MtrCtrl_Cfg.h

Functions to be provided to Integration Project

PICurrCntrl_Per1()

TrqCogCancRefPer1()

Configuration

Build Time Config

ModulesNotes

PICurrentCntrl

TrqCanc

Optimization level greater than 3

Generator Config

ConstantNotesSWC
None

Integration

Global Data

The global symbols mapping done in MtrCtrl_Cfg.h.

Component Conflicts

None

Include Path

The “include” directory of this SWC needs to be included in the integration project include search path.

.

Configurator Changes

None

Runnable Scheduling

This section specifies the required runnable scheduling.

RunnableScheduling RequirementsTrigger
TrqCogCancRefPer1()Must be placed in the motor control ISR, after MtrPosCyclic (ISR)
PICurrCntrl_Per1()Must be placed in the motor control ISR after TrqCogCancRefPer1()Cyclic (ISR)
RunnableScheduling RequirementsTrigger
CurrParamComp_Init()RTE (init)
TrqCanc_InitMust be placed after CurrParamComp_InitRTE (init)
QuadDet_Per1Must run after TrqReasonable DiagnosticsRTE (2ms)
CurrCmd_Per1Must run after QuadDetRTE (2ms)
TrqCanc_Per1Must run after CurrCmd_Per1RTE (2ms)
PICurrCntrl_Per2()Must be placed after TrqCanc_Per1RTE (2ms)
CurrParamComp_Per1()Must be placed after PICurrCntrl_Per2RTE (2ms)
PeakCurrEst_Per1()Must be placed after PICurrCntrl_Per2RTE (2ms)

*Note: In motor control ISR include Ap_MtrCtrl.h instead of CDD_Func.h

Proper Initialization of input signals should occur before running each function for the first time. (CurrParamComp_Init).

Memory Mapping

Mapping

Memory SectionContentsNotes
RTE Memory mapping

* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.

Usage

FeatureRAMROM
Full driver

Table 1: ARM Cortex R4 Memory Usage

RTE NvM Blocks

Block Name Size
Rte_Pim_CogTrqCal 512
Rte_Pim_CogTrqRplComp 9

Note : Size of the NVM block is changed.

Revision Control Log

Rev #Change DescriptionDateAuthor
1Initial version25-Mar-13Selva
2Updated TrqCanc_Init in RTE Runnables and size of the NVM block CogTrqCal is changed from 512 to 52121-Oct-13Selva
3Added new NVM block “Rte_Pim_CogTrqRplComp”23-Oct-13Selva

6 - PeakCurrEst_MDD

Module – PeakCurrEst

High-Level Description

Figures

Component Diagram


Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
MtrCurrQax_Amp_f32EstPkCurr_AmpSq_f32
MtrCurrDax_Amp_f32FiltEstPkCurr_AmpSq_f32

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
QaxCurrFiltSV_Amp_M_u12p20Single Precision Float-220220PEAKCURREST_START_SEC_VAR_CLEARED_32
DaxCurrFiltSV_Amp_M_s11p20Single Precision Float-220220PEAKCURREST_START_SEC_VAR_CLEARED_32
EstPkCurr_AmpSq_M_f32Single Precision Float048400PEAKCURREST_START_SEC_VAR_CLEARED_32
EstPkCurrFiltSV_AmpSq_M_u16p16Single Precision Float048400PEAKCURREST_START_SEC_VAR_CLEARED_32
FiltMtrCurEst_Id_Amp_D_f32Single Precision Float-220220PEAKCURREST_START_SEC_VAR_CLEARED_32
MtrCurEst_Iq_AmpSq_D_f32Single Precision Float-220220PEAKCURREST_START_SEC_VAR_CLEARED_32
MtrCurEst_Id_AmpSq_D_f32Single Precision Float048400PEAKCURREST_START_SEC_VAR_CLEARED_32
FiltMtrCurEst_Iq_Amp_D_f32Single Precision Float048400PEAKCURREST_START_SEC_VAR_CLEARED_32

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

None

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
k_EstPkCurr2msLPFKn_Uls_u16
k_EstPkCurrSlowLoopLPFKn_Uls_u16

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
None

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_ESTPKCURRLOLMT_AMPSQ_F32
D_ESTPKCURRHILMT_AMPSQ_F32

Module specific Lookup Tables Constants

Constant NameResolutionValueSoftware Segment
None


Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. LPF_SvUpdate_u16InFixKTrunc_m

  2. LPF_OpUpdate_u16InFixKTrunc_m

  3. LPF_SvUpdate_s16InFixKTrunc_m

  4. LPF_OpUpdate_s16InFixKTrunc_m

  5. FPM_FloatToFixed_m

  6. FPM_FixedToFloat_m

  7. Limit_m

Data Hiding Functions

  1. None

Global Functions/Macros Defined by this Module

None

Local Functions/Macros Used by this MDD only

None

Software Module Implementation

Runtime Environment (RTE) Initial Values

None

Initialization Functions

None


Periodic Functions

Per: PeakCurrEst_Per1

Design Rationale

None

Program Flow Start

Rte_Call_PeakCurrEst_Per1_CP0_CheckpointReached

Store Module Inputs to Local copies

EstMtrCurrQax_Amp_T_f32=Rte_IRead_PeakCurrEst_Per1_MtrCurrQax_Amp_f32()

EstMtrCurrDax_Amp_T_f32=Rte_IRead_PeakCurrEst_Per1_MtrCurrDax_Amp_f32()

Module Design

Store Local copy of outputs into Module Outputs

Rte_IWrite_PeakCurrEst_Per1_EstPkCurr_AmpSq_f32(EstPkCurr_AmpSq_T_f32)

Program Flow End

Rte_Call_PeakCurrEst_Per1_CP1_CheckpointReached

Per: PeakCurrEst_Per2

Design Rationale

Program Flow Start

Rte_Call_PeakCurrEst_Per2_CP0_CheckpointReached()

Module Design

Store Local copy of outputs into Module Outputs

Rte_IWrite_PeakCurrEst_Per2_FiltEstPkCurr_AmpSq_f32(FiltEstPkCurr_AmpSq_T_f32)

Program Flow End

Rte_Call_PeakCurrEst_Per2_CP1_CheckpointReached()


Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

None


Execution Requirements

Execution Sequence of the Module

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
PeakCurrEst_Per12msOFF,DISABLE,OPERATE
PeakCurrEst_Per2100msOFF,DISABLE,OPERATE

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
PeakCurrEst_Per1RTE_AP_PEAKCURREST_APPL_CODE
PeakCurrEst_Per2RTE_AP_PEAKCURREST_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment


Known Issues / Limitations With Design

  1. INLINE functions defined in GlobalMacro.h are not unit tested.


Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial Version5/15/2012KPIT-RD
22.0Addition of checkpoints and memmap statements20-Nov-12Selva
33.0Updated to version 8 FDD SF99 B20-Mar-12Selva

7 - PICurrentContrl

Module -- PICurrCntrl

High-Level Description

Non-AUTOSAR PI driver required to perform EPS motor control PWM profiles.

Figures

Diagram – Function Data Sharing

This diagram shows all data that is shared between functions within the module.

Module Inputs and Outputs

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

(Note: Full variable names required in table.)

(Note: All global variables including End Of Line data used should be shown here)

Module Inputs (Global Variable Name)Module Outputs (Global Variable Name)
MtrCurrQax_Amp_f32EstKe_VpRadpS_f32
MtrCurrDax_Amp_f32MtrCurrQaxFinalRef_Amp_f32
MtrCurrQaxRef_Amp_f32MtrDaxVoltage_Volt_f32
MtrCurrDaxRef_Amp_f32MtrQaxVoltage_Volt_f32
PIDaxIntegralGain_Uls_f32ModIdx_Uls_u16p16
PIDaxPropotionalGain_Uls_f32PhaseAdvanceFinal_Rev_u0p16
PIQaxIntegralGain_Uls_f32CommOffset_Cnt_u16
PIQaxPropotionalGain_Uls_f32MtrVolt_Volt_f32
ElecPosDelayComp_Rad_f32MtrCurrDaxIntg_Volt_f32
MtrVoltDaxFF_Volt_f32MtrCurrQaxIntg_Volt_f32
MtrVoltQaxFF_Volt_f32DervLambdaAlphaDiag_Volt_T_f32
Vecu_Volt_f32DervLambdaBetaDiag_Volt_T_f32
ModIdxSrlComSvcDft_Cnt_lgcSlowDataAccessBufIndex_Cnt_M_u16
SysState_Cnt_Enum
MtrCurrOffComOffset_Cnt_u16
MtrCurrQaxRpl_Amp_M_f32
MtrCurrQaxCog_Amp_M_f32
MRFMtrVel_MtrRadpS_f32
MtrVoltDaxFF_Volt_f32
MtrVoltQaxFF_Volt_f32
MtrCurrQaxRpl_Amp_f32
FastDataAccessBufIndex_Cnt_M_u16
EstKe_VpRadpS_f32
CorrMtrPosElec_Rev_f32
EstR_Ohm_f32

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

(Note: If no module specific variables are used by the design, place the text “None” in the first Variable Name cell in the table)

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
MtrCurrQaxPrevIntg_Volt_M_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrCurrDaxPrevIntg_Volt_M_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltQaxPrevFinalLimit_Volt_M_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltPrevDaxFinal_Volt_M_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrCurrQaxError_Amp_D_f32single precision float-220220PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrCurrDaxError_Amp_D_f32single precision float-220220PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltQaxFinal_Volt_D_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltQaxFinalLimit_Volt_D_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltDaxFinal_Volt_D_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltQaxProp_Volt_D_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltDaxProp_Volt_D_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltQaxInt_Volt_D_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltDaxInt_Volt_D_f32single precision float-3131PICURRCNTRL_START_SEC_VAR_CLEARED_32
PICurrCntrl_MtrCurrQax_Amp_D_f32single precision floatFULLFULLPICURRCNTRL_START_SEC_VAR_CLEARED_32
PICurrCntrl_MtrCurrDax_Amp_D_f32single precision floatFULLFULLPICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltDax_Volt_M_f32[2]single precision floatSee data DictionarySee data DictionaryPICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrVoltQax_Volt_M_f32[2]single precision floatSee data DictionarySee data DictionaryPICURRCNTRL_START_SEC_VAR_CLEARED_32
MtrCurrQaxFinalRef_Amp_M_f32[2]single precision floatSee data DictionarySee data DictionaryPICURRCNTRL_START_SEC_VAR_CLEARED_32
PICurrCntrl_DervLambdaQax_Volt_D_f32single precision floatSee data DictionarySee data DictionaryPICURRCNTRL_START_SEC_VAR_CLEARED_32
PICurrCntrl_DervLambdaDax_Volt_D_f32single precision floatSee data DictionarySee data DictionaryPICURRCNTRL_START_SEC_VAR_CLEARED_32

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Variable NameTypedef NameStorage TypeSafety Critical Classification
None

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

(Note: If no calibrations are used by the design, place the text “None” in the first location in the table)

Constant Name
k_PiSamplingTs_Sec_f32
t_CommOffsetTblX_Uls_u3p13[2]
t_CommOffsetTblY_Cnt_u16[2]
k_NoofPoles_Uls_f32

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
D_SCALERADTOCNTS_ULS_F32Single Precision FloatUnitless10430.3783505F
D_REVWITHROUND_ULS_F32Single Precision FloatUnitless65536.5F
D_ROUND_ULS_F32Single Precision FloatUnitless0.5F
D_DEG2RAD_ULS_F32Single Precision FloatUnitless0.0174532925199F
D_GAIN_ULS_F32Single Precision FloatUnitless0.5
D_VECUMAX_VOLTS_F32Single Precision FloatVolts31
D_SQRT3OVR2_ULS_F32Single Precision FloatUnitless0.866025403784

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_ZERO_ULS_F32
D_VECUMIN_VOLTS_F32

Module specific Lookup Tables Constants

(This is for lookup tables (arrays) with fixed values, same name as other tables)

Constant NameResolutionValueSoftware Segment
None

Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library functions / Macros that are called by the various sub modules are identified below,

  1. IntplVarXY_u16_u16Xu16Y_Cnt_m()

  2. FPM_FloatToFixed_m

  3. Sign_f32_m

  4. Sqrtf

  5. Sinf

  6. Cosf

Data Hiding Functions

The data hiding functions / macros used in this module are identified below,

Rte_ModeType_StaMd_Mode

MtrCntrl_Read_MtrCurrQax_Amp_f32

MtrCntrl_Read_MtrCurrDax_Amp_f32

MtrCntrl_Read_Vecu_Volt_f32

MtrCntrl_Read_ModIdxSrlComSvcDft_Cnt_lgc

MtrCntrl_Read_SysState_Cnt_Enum

MtrCntrl_Read_MtrCurrOffComOffset_Cnt_u16

MtrCntrl_Read_MtrElecPol_Cnt_s8

MtrCntrl_Read_MtrPosElec_Rev_u0p16

MtrCntrl_Write_MtrCurrQaxFinalRef_Amp_f32

MtrCntrl_Write_MtrDaxVoltage_Volt_f32

MtrCntrl_Write_MtrQaxVoltage_Volt_f32

MtrCntrl_Write_ModIdx_Uls_u16p16

MtrCntrl_Write_PhaseAdvanceFinal_Rev_u0p16

MtrCntrl_Write_CommOffset_Cnt_u16

Local Functions/Macros Used by this MDD only

Header file: Ap_MtrCntrl_Cfg.h

Software Module Implementation

Initialization Functions

None.

Periodic Functions

Per: PICurrCntrl_Per1

Design Rationale

This function is responsible for calculating the amount of current to be supplied to the motor. To control the PWM profiles generated for the motor. FastDataAccessBufIndex allows the buffer synchronization between data calculated on slower periodic loop time(2 milli seconds) and are read by faster periodic run time (ie 0.125ms)

Store Module Inputs to Local copies

MtrCntrl_Read_MtrCurrQax_Amp_f32(&MtrCurrQax_Amp_T_f32);

MtrCntrl_Read_MtrCurrDax_Amp_f32(&MtrCurrDax_Amp_T_f32);

MtrCntrl_Read_Vecu_Volt_f32(&Vecu_Volt_T_f32);

MtrCntrl_Read_ModIdxSrlComSvcDft_Cnt_lgc(&ModIdxSrlComSvcDft_Cnt_T_lgc);

MtrCntrl_Read_SysState_Cnt_Enum(&SysState_Cnt_T_Enum);

FwdDataAcessBuffer_Cnt_T_u16= (ActWriteAccBufIndex_Cnt_T_u16)

MtrCurrQaxRef_Amp_T_f32=MtrCurrQaxRef_Amp_M_f32[FwdDataAcessBuffer_Cnt_T_u16];

MtrCurrDaxRef_Amp_T_f32=MtrCurrDaxRef_Amp_M_f32[FwdDataAcessBuffer_Cnt_T_u16];

PIDaxIntegralGain_Uls_T_f32=MtrDaxIntegralGain_Uls_M_f32[FwdDataAcessBuffer_Cnt_T_u16];

PIDaxPropotionalGain_Uls_T_f32=MtrDaxPropotionalGain_Uls_M_f32[FwdDataAcessBuffer_Cnt_T_u16]

PIQaxIntegralGain_Uls_T_f32=MtrQaxIntegralGain_Uls_M_f32[FwdDataAcessBuffer_Cnt_T_u16];

PIQaxPropotionalGain_Uls_T_f32=MtrQaxPropotionalGain_Uls_M_f32[FwdDataAcessBuffer_Cnt_T_u16]

ElecPosDelayComp_Rad_T_f32=MtrPosComputationDelay_Rad_M_f32[FwdDataAcessBuffer_Cnt_T_u16]

MtrVoltDaxFF_Volt_T_f32=MtrVoltDaxFF_Volt_M_f32[FwdDataAcessBuffer_Cnt_T_u16]MtrVoltQaxFF_Volt_T_f32=MtrVoltQaxFF_Volt_M_f32[FwdDataAcessBuffer_Cnt_T_u16];

Vecu_Volt_T_f32 = Limit_m(Vecu_Volt_T_f32, D_VECUMIN_VOLTS_F32, D_VECUMAX_VOLTS_F32)

Program Flow Start

Store Local copy of outputs into Module Outputs

MtrCntrl_Write_MtrCurrQaxFinalRef_Amp_f32(MtrCurrQaxFinalRef_Amp_T_f32)

MtrCntrl_Write_MtrDaxVoltage_Volt_f32(MtrDaxVoltage_Volt_T_f32)

MtrCntrl_Write_MtrQaxVoltage_Volt_f32(MtrQaxVoltage_Volt_T_f32)

MtrCntrl_Write_ModIdx_Uls_u16p16(FPM_FloatToFixed_m(ModIdx_Uls_T_u16p16))

MtrCntrl_Write_PhaseAdvanceFinal_Rev_u0p16(PhaseAdvanceFinal_Rev_T_u0p16)

MtrCntrl_Write_CommOffset_Cnt_u16(CommOffset_Cnt_T_u16)

MtrCntrl_Write_MtrVolt_Volt_f32(MtrVoltCmdFinal_Volt_T_f32)

MtrCntrl_Write_MtrCurrDaxIntg_Volt_f32(MtrCurrDaxIntg_Volt_T_f32)

MtrCntrl_Write_MtrCurrQaxIntg_Volt_f32(MtrCurrQaxIntg_Volt_T_f32)

MtrCurrQaxFinalRef_Amp_M_f32[SlowDataAccessBufIndex_Cnt_M_u16]= MtrCurrQaxFinalRef_Amp_T_f32;

MtrVoltDax_Volt_M_f32[SlowDataAccessBufIndex_Cnt_M_u16] = MtrDaxVoltage_Volt_T_f32;

MtrVoltQax_Volt_M_f32[SlowDataAccessBufIndex_Cnt_M_u16] = MtrQaxVoltage_Volt_T_f32

Program Flow End

N/A

Periodic Functions

Per: PICurrCntrl_Per2

Design Rationale

This function is responsible for calculating the amount of current to be supplied to the motor. To control the PWM profiles generated for the motor.

SlowDataAccessBufIndex allows the buffer synchronization between data calculated on faster periodic loop time(125 micro seconds) and are read by slower periodic run time (ie 2ms)

Store Module Inputs to Local copies

ReadBuffer_Cnt_T_u16 = SlowDataAccessBufIndex_Cnt_M_u16

WriteBuffer_Cnt_T_u16 = (ReadBuffer_Cnt_T_u16 & 1U) ^ 1U

SlowDataAccessBufIndex_Cnt_M_u16 = WriteBuffer_Cnt_T_u16

EstKe_VpRadpS_T_f32= Rte_IRead_PICurrCntrl_Per2_EstKe_VpRadpS_f32();

EstR_Ohm_T_f32 = Rte_IRead_PICurrCntrl_Per2_EstR_Ohm_f32();

MRFMtrVel_MtrRadpS_T_f32 = Rte_IRead_PICurrCntrl_Per2_MRFMtrVel_MtrRadpS_f32();

CorrMtrPosElec_Rev_T_f32 = Rte_IRead_PICurrCntrl_Per2_CorrMtrPosElec_Rev_f32();

MtrCurrDaxRef_Amp_T_f32 = Rte_IRead_PICurrCntrl_Per2_MtrCurrDaxRef_Amp_f32();

MtrVoltDax_Volt_T_f32 = MtrVoltDax_Volt_M_f32[ReadBuffer_Cnt_T_u16];

MtrVoltQax_Volt_T_f32 = MtrVoltQax_Volt_M_f32[ReadBuffer_Cnt_T_u16];

MtrCurrQaxFinalRef_Amp_T_f32 = MtrCurrQaxFinalRef_Amp_M_f32[ReadBuffer_Cnt_T_u16]; Program Flow Start

Rte_Call_PICurrCntrl_Per2_CP0_CheckpointReached()

Processing

Store Local copy of outputs into Module Outputs

Rte_IWrite_PICurrCntrl_Per2_DervLambdaAlphaDiag_Volt_f32(DervLambdaAlphaDiag_Volt_T_f32);

Rte_IWrite_PICurrCntrl_Per2_DervLambdaBetaDiag_Volt_f32(DervLambdaBetaDiag_Volt_T_f32);

Program Flow End

Rte_Call_PICurrCntrl_Per2_CP1_CheckpointReached()

Execution Requirements

Execution Sequence of the Module

N/A

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called

PICurrCntrl_Per1

0.125msAll

PICurrCntrl_Per2

2msAll

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
N/A


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
PICurrCntrl_Per1PICurrCntrl_CODE
PICurrCntrl_Per2RTE_START_SEC_AP_PICURRCNTRL_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

  1. - Denotes functions that are vector call-backs only included to avoid compiler errors.

Name of Sub ModuleSoftware Segment
N/A


Known Issues / Limitations With Design

The computation of commoffset and ModIndex service defeat part of FDD15D is implemented in this component inaddition to 99B requirements

The reason for the implementation is to keep the sine voltage driver common across components

Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial release with changes for IPM6/12/2012AD/KPIT
21.0Changes for memap statements added11/20/2012Selva
32.0

Updated for SF99B –v8 with only changes needed for voltage command

integrity check for torque reasonableness

02/24/2013Selva
43.0,Updated for SF99B –v803/21/2013Selva
54.0Corrected for SF99B –v804/19/2013Selva
65.0Updated for SF99B –v1021-Oct-13Selva
76.0Updated for SF99B –v107-Nov-13Selva
87.0Updated for V12 of FDD SF9927-Nov-13Selva

8 - Quadrant_Detection_MDD

Module --

High-Level Description

This module takes the cumulative motor position and determines the motor direction (using a previously saved state variable and a calibration constant for hysteresis). It then computes the torque command sign from the scaled torque command and uses both of these values to determine the motor quadrant.

Figures

Component Diagram

Diagram – Function QuadDet_Per1


Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
MRFMtrTrqCmdScl_MtrNm_f32InstMtrDir_Cnt_s08
MRFCumMtrPos_Deg_f32MtrQuad_Cnt_u08

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
MtrTrqCmdSign_Cnt_D_s081-1, 1AP_QUADRANTDETECT_VAR_NOINIT
PrevCumMtrPos_Deg_M_f32Single Precision Float-11AP_QUADRANTDETECT_VAR_INIT
PrevInstMtrDir_Cnt_M_s081-11AP_QUADRANTDETECT_VAR_INIT

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

None

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
k_InstMtrDirHyst_Deg_f32

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
D_CUMMTRPOSLOLMT_DEG_F32Single Precision FloatDegreesmin value of MRFCumMtrPos_Deg_f32
D_CUMMTRPOSHILMT_DEG_F32Single Precision FloatDegreesmax value of MRFCumMtrPos_Deg_f32
D_MTRTRQCMDTOL_MTRNM_F32Single Precision FloatMtrNm0.00390625

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_QUADRANT1_CNT_U8
D_QUADRANT2_CNT_U8
D_QUADRANT3_CNT_U8
D_QUADRANT4_CNT_U8

Module specific Lookup Tables Constants

Constant NameResolutionValueSoftware Segment
None


Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. Abs_f32_m()

  2. Sign_f32_m()

Data Hiding Functions

None

Global Functions/Macros Defined by this Module

None

Software Module Implementation

Runtime Environment (RTE) Initial Values

This section lists the initial values of data written by this module but controlled by the RTE. After RTE initialization, the data in this table will contain these values.

DataValue
Rte_InitValue_InstMtrDir_Cnt_s080
Rte_InitValue_MRFCumMtrPos_Deg_f320
Rte_InitValue_MRFMtrTrqCmdScl_MtrNm_f320
Rte_InitValue_MtrQuad_Cnt_u081

Initialization Functions

None


Periodic Functions

Per: _Per1

Design Rationale

None

Program Flow Start

N/A

Store Module Inputs to Local copies

MtrTrqCmdScl_MtrNm_T_f32 = Rte_IRead_QuadDet_Per1_MRFMtrTrqCmdScl_MtrNm_f32();

CumMtrPos_Deg_T_f32 = Rte_IRead_QuadDet_Per1_MRFCumMtrPos_Deg_f32();

Determine Motor Direction

Determine Instantaneous Torque Command Sign

Determine Motor Quadrant

Store Local copy of outputs into Module Outputs

Rte_IWrite_QuadDet_Per1_InstMtrDir_Cnt_s08(PrevInstMtrDir_Cnt_M_s08);

Rte_IWrite_QuadDet_Per1_MtrQuad_Cnt_u08(MtrQuad_Cnt_T_u08);

Program Flow End

N/A


Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

None


Execution Requirements

Execution Sequence of the Module

QuadDet_Per1 executes every 2 milliseconds.

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
QuadDet_Per12 msWARM INIT, OPERATE, DISABLE, OFF

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
<None>


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
QuadDet_Per1RTE_START_SEC_AP_QUADDET_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment
None


Known Issues / Limitations With Design

  1. INLINE functions defined in globalmacro.h are not unit tested
    Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11Initial MDD for component based design23-Dec-11O.T.
22.0Fixed Inconsistencies, UTP issues25-Jan-12OT

9 - TorqueCmdScaling_MDD

Module -- Torque Command Scaling4.04.0

High-Level Description

The Torque Command Scale module multiplies the Torque_Command_MRF input signal by a calibration which is set during a manufacturing EOL calibration process. This calibration is provided to reduce overall system output torque variation. This scaled version of the torque command is used by all other sub functions within motor control which have a torque dependent component.

Figures

Diagram – Function Data Sharing

This diagram shows all data that is shared between functions within the module.

Diagram – Function (Name)

This diagram describes the functional characteristics and data flow of a given function.

(Note – This is not mandatory, only used where a graphical representation helps explain the function. It is left to the author’s discretion. New headers of this level (Level 3) should be created for each function.

Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

(Note: Full variable names required in table.)

(Note: All global variables including End Of Line data used should be shown here)

Module Inputs (Global Variable Name)Module Outputs (Global Variable Name)
MRFMtrTrqCmd_MtrNm_f32MRFMtrTrqCmdScl_MtrNm_f32

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
None

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

None

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
k_MinTrqCmdScl_Uls_f32
k_MaxTrqCmdScl_Uls_f32
TorqueCmdSF_Uls_f32 (NVM)

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionValue
None

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
None

Module specific Lookup Tables Constants

(This is for lookup tables (arrays) with fixed values, same name as other tables)

Constant NameResolutionValueSoftware Segment
None

Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library functions / Macros that are called by the various sub modules are identified below,

  1. Limit_m()

Data Hiding Functions

The data hiding functions / macros used in this module are identified below,

  1. Rte_Call_TrqCmdScl_WriteBlock()

  2. Rte_Pim_TorqueCmdSF_Uls_f32()

Local Functions/Macros Used by this MDD only

(Note if they are defined in another source file, then reference the appropriate header file)

The local functions/macros in this module are identified below,

Software Module Implementation

Periodic Functions

Per: TrqCmdScl_Per1

Design Rationale

None

Program Flow Start

Rte_Call_TrqCmdScl_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

MRFMtrTrqCmd_MtrNm_T_f32 = Rte_IRead_TrqCmdScl_Per1_MRFMtrTrqCmd_MtrNm_f32()

TorqueCmdSF_Uls_T_f32 = *Rte_Pim_TorqueCmdSF_Uls_f32()

Apply Torque Command Scaling

Store Local copy of outputs into Module Outputs

Rte_IWrite_TrqCmdScl_Per1_MRFMtrTrqCmdScl_MtrNm_f32(MRFMtrTrqCmdScl_MtrNm_T_f32)

Program Flow End

Rte_Call_TrqCmdScl_Per1_CP1_CheckpointReached()

Flow End

N/A

Scomm: TrqCmdScl_SCom_Get

Design Rationale

None

Program Flow Start

N/A

Store Module Inputs to Local copies

None

Get Torque Command Scaling

Store Local copy of outputs into Module Outputs

None

Program Flow End

N/A


Scomm: TrqCmdScl_SCom_Set

Design Rationale

None

Program Flow Start

N/A

Store Module Inputs to Local copies

None

Set Torque Command Scaling

Store Local copy of outputs into Module Outputs

None

Program Flow End

N/A

Local Function/Macro Definitions

If these are numerous and defined in a separate source file then reference the source file only.

Function

Function NameTypeMinMaxUTP Tol.
Arguments Passed
Return Value

Execution Requirements

Execution Sequence of the Module

TrqCmdScl_Per1 must be executed in the forward path before quadrant detection, the voltage command numerator, phase advance, voltage command denominator, and Modulation Index.

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s)
TrqCmdScl_Per12msALL

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
TrqCmdScl_Scom_Get()
TrqCmdScl_Scom_Set()


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
TrqCmdScl_Per1

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment
None


Known Issues / Limitations With Design

  1. None

Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Document creation and initial release for the component29NOV11VK
21.1Corrections to assign EOL scaling factor to temporary variable02DEC11VK
33Added checkpoints and memmap software segment is updated for static variables26Sep12Selva
44Heading and format corrected21Nov12Selva

10 - TrqCanc_MDD

Module -- TrqCanc

High-Level Description

Figures

Component Diagram

Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
EstKe_VpRadpS_f32
MRFMtrVel_MtrRadpS_f32
MtrCurrDaxRef_Amp_f32
MtrCurrQaxRef_Amp_f32
ElecPosDelayComp_Rad_f32MtrCurrQaxRpl_Amp_T_f32
MtrElecPol_Cnt_s8MtrCurrQaxCog_Amp_f32
MtrPosElec_Rev_u0p16
EstKe_VpRadpS_f32
MtrCurrQax12Mag_Amp_f32
MtrCurrQax6Mag_Amp_f32
MtrCurrQax12Ph_Rad_f32
MtrCurrQax6Ph_Rad_f32
MtrCurrQax18Ph_Rad_f32
MtrCurrQax18Mag_Amp_f32
ActWriteAccBufIndex_Cnt_T_u16
ReadBuffer_Cnt_M_u16

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
CogginTrqCancIndex_D_Cnt_u1610511TRQCANC_VAR_CLEARED_16
CoggingTrqCanc_MtrNm_D_f32Single precision float-11TRQCANC_VAR_CLEARED_32
MtrCurrQax6thMag_Amp_D_f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrTrqRip6thPhs_Rad_D_f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
MtrCurrQax18thMag_Amp_D_f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrTrqRip18thPhs_Rad_D_f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
MtrCurrQax12thMag_Amp_D_f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrTrqRip12thPhs_Rad_D_f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
MtrCurrQax6thMagFinal_Amp_D_f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrTrqRip6thPhsFinal_Rev_D_f32Single precision float01TRQCANC_VAR_CLEARED_32
MtrCurrQax18thMagFinal_Amp_D_f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrTrqRip18thPhsFinal_Rev_D_f32Single precision float01TRQCANC_VAR_CLEARED_32
MtrCurrQax12thMagFinal_Amp_D_f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrTrqRip12thPhsFinal_Rad_D_f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
CoggingTrqMtrPosElec_Rad_D_f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
MtrCurrQax12Mag_Amp_M_ f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrCurrQax12Ph_Rad _M_ f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
MtrCurrQax6Mag_Amp_ M_ f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrCurrQax6Ph_Rad_ M_ f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
MtrCurrQax18Mag_Amp_ M_ f32Single precision float-220220TRQCANC_VAR_CLEARED_32
MtrCurrQax18Ph_Rad_ M_ f32Single precision float-2*pi2*piTRQCANC_VAR_CLEARED_32
TrqCanc_MtrCurrQaxRpl6X_Amp_M_s6p9[][]2^-9FULLFULLTRQCANC_VAR_CLEARED_16
TrqCanc_MtrCurrQaxRpl6Y_Amp_M_s6p9[][]2^-9FULLFULLTRQCANC_VAR_CLEARED_16
TrqCanc_MtrCurrQaxRpl12X_Amp_M_s6p9[][]2^-9FULLFULLTRQCANC_VAR_CLEARED_16
TrqCanc_MtrCurrQaxRpl12Y_Amp_M_s6p9[][]2^-9FULLFULLTRQCANC_VAR_CLEARED_16
TrqCanc_MtrCurrQaxRpl18X_Amp_M_s6p9[][]2^-9FULLFULLTRQCANC_VAR_CLEARED_16
TrqCanc_MtrCurrQaxRpl18Y_Amp_M_s6p9[][]2^-9FULLFULLTRQCANC_VAR_CLEARED_16
TrqCanc_CorrecNomKe_VpRadpS_M_f32Single precision float.0250.075TRQCANC_VAR_CLEARED_32

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

CoggingM_Amp_StrCoggingMX_Amp_s6p9sint16FULLFULL
CoggingMY_Amp_s6p9sint16FULLFULL
CogTrqCalPtr Rte_Pim_CogTrqCal()[512]Uint16-11
CogTrqCalRplCompPtrRte_Pim_CogTrqRplComp()[9]Uint16-11

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
k_Harmonic6thElec_Uls_f32
k_Harmonic12thElec_Uls_f32
k_Harmonic18thElec_Uls_f32
t_MtrCurrQaxRpl_Amp_u9p7[]
t_MtrCurrDaxRpl_Amp_u9p7[]
t2_MtrCurrQaxRpl6X_Amp_s6p9[]
t2_MtrCurrQaxRpl6Y_Amp_s6p9[]
t2_MtrCurrQaxRpl12X_Amp_s6p9[]
t2_MtrCurrQaxRpl12Y_Amp_s6p9[]
t2_MtrCurrQaxRpl18X_Amp_s6p9[]
t2_MtrCurrQaxRpl18Y_Amp_s6p9[]
t_MtrVelX_MtrRadpS_T_u14p2[10]
t_MtrTrqCancPIMagRP_Uls_u6p10[10]
t_MtrTrqCancPIPhRP_Rev_u0p16[10]
t_MtrCurrQaxRplPIY_Amp_u9p7[]
t2_MtrTrqCancPIMagRP_Uls_u6p10[]
t2_MtrTrqCancPIPhRP_Rev_u0p16[]

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
D_SQRT3OVR2_ULS_F32Single precision floatUnit less0.866025403784
D_6HARMONICNO_F32Single precision floatUnit less6
D_12HARMONICNO_F32Single precision floatUnit less12
D_COGGINGTBLRES_F32Single precision floatCounts81.48733
D_MAXTBLVALUE_CNT_u161Counts511
D_SCALERADTOCNTS_ULS_F32Single precision floatUnit less10430.3783505
D_30DEGREES_CNT_U161Counts5461
D_DEG2RAD_ULS_F32Singles precision floatUnit less0.0174532925199
D_REVWITHROUND_ULS_F32Singles precision floatUnit less65536.5
D_ONEHALF_ULS_F32Singles precision floatUnit less0.5
D_POSITIVEONE_CNT_S81Counts1
D_COGTRQ_LOOPLMT1Unit less128
D_DAXRPLTBLSZ_CNT_U81CountsTableSize_m(t_MtrCurrDaxRpl_Amp_u9p7)
D_QAXRPLTBLSZ_CNT_U81CountsTableSize_m(t_MtrCurrQaxRpl_Amp_u9p7)
D_COGTRQRPL_LOOPLMT1Counts3U
D_NOOFHARMONIC_CNT_U81Counts9U
D_MINCOGRANGE_NM_S5P10S5P10_TNm-0.1
D_MINCOGRANGE_NM_S5P10S5P10_TNm0.1

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_2PI_ULS_F32
D_ONE_ULS_F32
D_ZERO_ULS_F32

Module specific Lookup Tables Constants

(This is for lookup tables (arrays) with fixed values, same name as other tables)

Constant NameResolutionValueSoftware Segment
t_SinTbl_Cnt_u16Uint16TRQCANC_START_SEC_CONST_16


Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. Abs_s16_m

  2. FPM_FloatToFixed_m

  3. TableSize_m

  4. FPM_FixedToFloat_m

  5. IntplVarXY_u16_u16Xu16Y_Cnt

  6. BilinearXYM_s16_u16Xs16YM_Cnt

  7. sqrtf

  8. atan2f

  9. sinf

  10. Rte_Pim_CogTrqCal

  11. Rte_Pim_CogTrqRplComp

Data Hiding Functions

MtrCntrl_Read_MtrElecPol_Cnt_s8

MtrCntrl_Read_MtrPosElec_Rev_u0p16

MtrCntrl_Read_ReadFwdPthAccessBfr_Cnt_u16

Global Functions/Macros Defined by this Module

None

Local Functions/Macros Used by this MDD only


Software Module Implementation

Runtime Environment (RTE) Initial Values

This section lists the initial values of data written by this module but controlled by the RTE. After RTE initialization, the data in this table will contain these values.

DataValue
EstKe_VpRadpS_f32Rte_IRead_TrqCanc_Init_EstKe_VpRadpS_f32

Initialization Functions

Per: TrqCanc_Init

Design Rationale

Update the lookup table for ripple’s

Processing

Periodic Functions

Per: TrqCanc_Per1

Design Rationale

FastDataAccessBufIndex allows the buffer synchronization between data calculated on slower periodic loop time(2 milli seconds) and are read by faster periodic run time (ie 0.125ms)

Program Flow Start

Rte_Call_TrqCanc_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

MRFMtrVel_MtrRadpS_T_f32=Rte_IRead_TrqCanc_Per1_MRFMtrVel_MtrRadpS_f32

DaxRef_Amp_T_f32=Rte_IRead_TrqCanc_Per1_MtrCurrDaxRef_Amp_f32

QaxRef_Amp_T_f32 =Rte_IRead_TrqCanc_Per1_MtrCurrQaxRef_Amp_f32

WriteAccessBufIndex_Cnt_T_u16= (FastDataAccessBufIndex_Cnt_M_u16&1)^1;


Store Local copy of outputs into Module Outputs

Program Flow End

Rte_Call_TrqCanc_Per1_CP1_CheckpointReached()

Periodic Functions

Per: TrqCogCancRefPer1

Design Rationale

FastDataAccessBufIndex allows the buffer synchronization between data calculated on slower periodic loop time(2 milli seconds) and are read by faster periodic run time. SlowDataAccessBufIndex allows the buffer synchronization between data calculated on faster periodic loop time(125 micro seconds) and are read by slower periodic run time (ie 2ms)

Program Flow Start

N/A

Store Module Inputs to Local copies

DataAccessBfr_Cnt_T_u16 =FastDataAccessBufIndex_Cnt_M_u16

MtrCntrl_Read_MtrElecPol_Cnt_s8(&MtrElecPol_Cnt_T_s8)

MtrCntrl_Read_MtrPosElec_Rev_u0p16(&MtrPosElec_Rev_T_u0p16)

MtrPosComputDelay_Rad_T_f32=MtrPosComputationDelay_Rad_M_f32[DataAccessBfr_Cnt_T_u16]

EstKe_VpRadpS_T_f32= MtrEstKe_VpRadpS_M_f32[DataAccessBfr_Cnt_T_u16]

MtrCurrQax6Mag_Amp_T_f32 =MtrCurrQax6Mag_Amp_M_f32[DataAccessBfr_Cnt_T_u16] MtrCurrQax12Mag_Amp_T_f32=MtrCurrQax12Mag_Amp_M_f32[DataAccessBfr_Cnt_T_u16] MtrCurrQax6Ph_Rad_T_f32 =MtrCurrQax6Ph_Rad_M_f32[DataAccessBfr_Cnt_T_u16] MtrCurrQax12Ph_Rad_T_f32 =MtrCurrQax12Ph_Rad_M_f32[DataAccessBfr_Cnt_T_u16]

MtrCurrQax18Mag_Amp_T_f32=MtrCurrQax18Mag_Amp_M_f32[DataAccessBfr_Cnt_T_u16] MtrCurrQax18Ph_Rad_T_f32 =MtrCurrQax18Ph_Rad_M_f32[DataAccessBfr_Cnt_T_u16]

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

SComm: TrqCanc_Scom_ReadCogTrqCal

Design Rationale

#ifdef RTE_PTR2ARRAYBASETYPE_PASSING

FUNC(void, RTE_AP_TRQCANC_APPL_CODE) TrqCanc_Scom_ReadCogTrqCal(P2VAR(UInt16, AUTOMATIC, RTE_AP_TRQCANC_APPL_VAR) CogTrqCalPtr, UInt16 ID)

#else

FUNC(void, RTE_AP_TRQCANC_APPL_CODE) TrqCanc_Scom_ReadCogTrqCal(P2VAR(CoggingCancTrq, AUTOMATIC, RTE_AP_TRQCANC_APPL_VAR) CogTrqCalPtr, UInt16 ID)

#endif

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

SComm: TrqCanc_Scom_SetCogTrqCal

Design Rationale

Function NameCoggingTrqTableUpdateTypeMinMaxUTP Tol.
Arguments Passed*CogTrqCalPtrSint16-11
IDUnit1604
Return ValueNone

#ifdef RTE_PTR2ARRAYBASETYPE_PASSING

FUNC(void, RTE_AP_TRQCANC_APPL_CODE) TrqCanc_Scom_SetCogTrqCal(P2CONST(UInt16, AUTOMATIC, RTE_AP_TRQCANC_APPL_DATA) CogTrqCalPtr, UInt16 ID)

#else

FUNC(void, RTE_AP_TRQCANC_APPL_CODE) TrqCanc_Scom_SetCogTrqCal(P2CONST(CoggingCancTrq, AUTOMATIC, RTE_AP_TRQCANC_APPL_DATA) CogTrqCalPtr, UInt16 ID)

#endif

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

Local Function/Macro Definitions

CoggingTrqTableUpdate#1

Function NameCoggingTrqTableUpdateTypeMinMaxUTP Tol.
Arguments PassedN/AN/A--
Return ValueN/AN/AN/AN/A

Description

SinLookup #2

Function NameSinLookupTypeMinMaxUTP Tol.
Arguments PassedTheta_Rad_T_f32Float32--2*pi2*pi
Return ValueResult_Uls_T_f32Float32-11

Description

Execution Requirements

Execution Sequence of the Module

(Describe in words relevant details about the execution sequence of the different sub modules.)

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
TrqCanc_Per12msALL
TrqCogCancRefPer1125usALL
TrqCanc_InitInitAt Startup

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
TrqCanc_Scom_ReadCogTrqCalEPS_DiagSrvc
TrqCanc_Scom_SetCogTrqCalEPS_DiagSrvc


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
TrqCanc_Per1RTE_START_SEC_AP_TRQCANC_APPL_CODE
TrqCanc_InitRTE_START_SEC_AP_TRQCANC_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment
CoggingTrqTableUpdateRTE_START_SEC_AP_TRQCANC_APPL_CODE
SinLookupRTE_START_SEC_AP_TRQCANC_APPL_CODE

Known Issues / Limitations With Design

Note for UNIT TEST:

  1. Rte_Pim_CogTrqCal and CogTrqRplComp is declared as unit16 with size of 521 with 512 values are used in the look up and 9 values are used in the harmonic table compensation.

Eventhough the values are read as uint16 it will be used as sint16 ( s5p10 preciously) with the range of -1 to 1 .

Revision Control Log

Rev #Change DescriptionDateAuthor Initials
1.0Initial version (v8 FDD SF99B)23-Mar-13Selva
2Updated to version 9 FDD SF99B5-June-13Selva
3Updated to version 10 FDD SF99B21-Oct-13Selva
4Updated to version 10 FDD SF99B23-Oct-13Selva
5Updated to version 11 FDD SF99B7-Nov-13Selva