Electric_Power_Consumption_MDD

Module --

High-Level Description

This module estimates the instantaneous electric power at the input of the control module and the supply current.

Figures

Diagram – Component Diagram


Variable Data Dictionary

Module InputsModule Outputs
Vecu_Volt_f32ElectricPower_Watt_f32
MtrVoltDax_Volt_f32SupplyCurrent_Amp_f32
MtrVoltQax_Volt_f32
MtrCurrDax_Amp_f32
MtrCurrQax_Amp_f32

Module Internal Variables

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
ModInPower_Watt_D_f32Single Precision Floating Point-20002000ELEPWR_START_SEC_VAR_CLEARED _32
DropInPower_Watt_D_f32Single Precision Floating Point-200200ELEPWR_START_SEC_VAR_CLEARED _32

User defined typedef definition/declaration

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

None

Constant Data Dictionary

Calibration Constants

Constant Name
k_CntlrInResist_Ohm_f32
k_PstcPowerLoss_Watt_f32

Program(fixed) Constants

Embedded Constants

Local

Constant NameResolutionUnitsValue
D_SQRT3OVR2_ULS_F32Single precision FloatFloat320.866025403784

Global

Constant Name
D_ZERO_ULS_F32

Module specific Lookup Tables Constants

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,

Data Hiding Functions

None

Local Functions/Macros Used by this MDD only

None


Software Module Implementation

Initial Data Values

DataValue
Rte_InitValue_Vecu_Volt_f320.0
Rte_InitValue_MtrVoltDax_Volt_f320.0
Rte_InitValue_MtrVoltQax_Volt_f320.0
Rte_InitValue_MtrCurrDax_Amp_f320.0
Rte_InitValue_MtrCurrQax_Amp_f320.0
Rte_InitValue_ElectricPower_Watt_f320.0

Periodic Functions

Per: _Per1

Design Rationale

None

Program Flow Start

Rte_Call_ElePwr_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

Local CopyModule Input
Vecu_Volt_f32Rte_IRead_ElePwr_Per1_Vecu_Volt_f32()
MtrVoltDax_Volt_f32Rte_IRead_ElePwr_Per1_ MtrVoltDax_Volt_f32 ()
MtrVoltQax_Volt_f32Rte_IRead_ElePwr_Per1_ MtrVoltQax_Volt_f32 ()
MtrCurrDax_Amp_f32Rte_IRead_ElePwr_Per1_ MtrCurrDax_Amp_f32
MtrCurrQax_Amp_f32Rte_IRead_ElePwr_Per1_ MtrCurrQax_Amp_f32 ()

Calculate Modulator Input Power

Store Local copy of outputs into Module Outputs

Local CopyModule Output
ElecPower_Watt_T_f32Rte_IWrite_ElePwr_Per1_ ElectricPower_Watt_f32()
SupplyCurrent_Amp_T_f32Rte_IWrite_ElePwr_Per1_SupplyCurrent_Amp_f32 ()

Program Flow End

Rte_Call_ElePwr_Per1_CP1_CheckpointReached()

Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

None

Execution Requirements

Execution Rates for sub-modules called by the Scheduler

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

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
_Per1RTE_AP_ELEPWR_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. None


Revision Control Log

Rev #Change DescriptionDateAuthor Initials
1Initial AUTOSAR version (SF08 v001).1-Dec-12Selva
2Name changed from CmElecPwr to ElePwr10-Dec-12Selva
Last modified October 12, 2025: Initial commit (0347a62)