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
Last modified October 12, 2025: Initial commit (0347a62)