This is the multi-page printable view of this section. Click here to print.
Electrical Power
1 - Data Dictionary
Overview
Change LogVariable Dictionary
Calibration Dictionary
Global Constants
Template
Help
Sheet 1: Change Log
Electric Power Consumption - Rev 1 | <- Global Program / Module Name | ||||||
Revision | Author | Date | Change Description | Data Dictionary Type: | Component | ||
1 | Selva | 2-Dec-12 | Initial Release | ||||
Sheet 2: Variable Dictionary
Sheet 3: Calibration Dictionary
Sheet 4: Global Constants
Electric Power Consumption - Rev 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Variable Information (Global Variables Only) | Achieved in Software Design | Used in Module List | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Layer 2 | Layer 3 | Layer 4 | Layer 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Constant Name | Description | Uints | Type | Engineering Value | ADC | ADC Diagnostics | Data Memory Verification | DC Link Power Control | DSP Computational Integrity | DSP SPI driver | Event Manager Driver | External Memory Driver | Flash Programming Exec | GPIO | Illegal OpCode Handler | Interrupt Handler | Motor Current Driver | Motor Driver Diagnostics | Motor Position Driver | Phase Feedback Capture | Powerdown Control | Primary Shutdown Control | Program Flow | Program Memory Diagnostic | PWM Duty Cycle | Redundant Memory Check | Redundant Rapid Shutdown | Scheduler | Stack Monitor | State Dependent Task List | System Boot & Startup | System Control | Temperature Sensor Diagnostic | Unused Interrupt Handler | Utilization Monitor | Watchdog Dirver | Smith | Battery Voltage | Battery Voltage Diagnostics | Diagnostic CTC Manager | Diagnostic Manager | Diagnostics Application Services | EOL TorqueTest | Flash Boot Loader | Flight Recorder | Handwheel Position | Handwheel Torque | Motor Control Output Conversion | Motor Position Diagnostics | Motor Position Initialization | Motor Velocity | Motor Velocity Tachometer | Serial Communications I/O | Serial Communications Services | States and Modes | Tuning Select | Vehicle Power Mode | Vehicle Speed | Controller Polarity | Current Estimation | Handwheel Velocity | Inverse Motor Model | Motor Temperature Estimation | Motor Torque Limit | Output Reasonableness Dianostic | Parameter Estimation | Quadrant and rate Detection | Active Pull Compensation | Assist | Damping | Duty Cycle | Kinematic Integrity Diagnostic | Long Term Vehicle Speed Diagnostic | Max Assist Limit | Return | State Output Control | Torque Output |
Sheet 5: Template
2.2a | Data 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: | N | Index 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: | Y | Index 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: | P | Index 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 cut | Macro | Sescription |
Ctrl-q | ClearDataDictFilter | Will clear all autofilters on the Global Data Dictionary |
DFD_Create | Creates 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_Delete | Will clear all Data Flow Diagram pages from the Data Dictionary. This will make the file smaller for archiving. | |
DFD_Print | Formate and prepares to print the Data Flow Worksheet pages. |
2 - 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 Inputs | Module Outputs |
---|---|
Vecu_Volt_f32 | ElectricPower_Watt_f32 |
MtrVoltDax_Volt_f32 | SupplyCurrent_Amp_f32 |
MtrVoltQax_Volt_f32 | |
MtrCurrDax_Amp_f32 | |
MtrCurrQax_Amp_f32 |
Module Internal Variables
Variable Name | Resolution | Legal Range (min) | Legal Range (max) | Software Segment |
---|---|---|---|---|
ModInPower_Watt_D_f32 | Single Precision Floating Point | -2000 | 2000 | ELEPWR_START_SEC_VAR_CLEARED _32 |
DropInPower_Watt_D_f32 | Single Precision Floating Point | -200 | 200 | ELEPWR_START_SEC_VAR_CLEARED _32 |
User defined typedef definition/declaration
Typedef Name | Element Name | User 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 Name | Resolution | Units | Value |
---|---|---|---|
D_SQRT3OVR2_ULS_F32 | Single precision Float | Float32 | 0.866025403784 |
Global
Constant Name |
---|
D_ZERO_ULS_F32 |
Module specific Lookup Tables Constants
Constant Name | Resolution | Value | Software 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
Data | Value |
---|---|
Rte_InitValue_Vecu_Volt_f32 | 0.0 |
Rte_InitValue_MtrVoltDax_Volt_f32 | 0.0 |
Rte_InitValue_MtrVoltQax_Volt_f32 | 0.0 |
Rte_InitValue_MtrCurrDax_Amp_f32 | 0.0 |
Rte_InitValue_MtrCurrQax_Amp_f32 | 0.0 |
Rte_InitValue_ElectricPower_Watt_f32 | 0.0 |
Periodic Functions
Per: _Per1
Design Rationale
None
Program Flow Start
Rte_Call_ElePwr_Per1_CP0_CheckpointReached()
Store Module Inputs to Local copies
Local Copy | Module Input |
---|---|
Vecu_Volt_f32 | Rte_IRead_ElePwr_Per1_Vecu_Volt_f32() |
MtrVoltDax_Volt_f32 | Rte_IRead_ElePwr_Per1_ MtrVoltDax_Volt_f32 () |
MtrVoltQax_Volt_f32 | Rte_IRead_ElePwr_Per1_ MtrVoltQax_Volt_f32 () |
MtrCurrDax_Amp_f32 | Rte_IRead_ElePwr_Per1_ MtrCurrDax_Amp_f32 |
MtrCurrQax_Amp_f32 | Rte_IRead_ElePwr_Per1_ MtrCurrQax_Amp_f32 () |
Calculate Modulator Input Power
Store Local copy of outputs into Module Outputs
Local Copy | Module Output |
---|---|
ElecPower_Watt_T_f32 | Rte_IWrite_ElePwr_Per1_ ElectricPower_Watt_f32() |
SupplyCurrent_Amp_T_f32 | Rte_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 Name | Calling Frequency | System State(s) in which the function is called |
---|---|---|
_Per1 | 10 ms | All |
Execution Requirements for Serial Communication Functions
Function Name | Sub-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 Module | Software Segment |
---|---|
_Per1 | RTE_AP_ELEPWR_APPL_CODE |
Local Functions
This table identifies the software segments for local functions identified in this module.
Name of Sub Module | Software Segment |
---|---|
None |
Known Issues / Limitations With Design
None
Revision Control Log
Rev # | Change Description | Date | Author Initials |
---|---|---|---|
1 | Initial AUTOSAR version (SF08 v001). | 1-Dec-12 | Selva |
2 | Name changed from CmElecPwr to ElePwr | 10-Dec-12 | Selva |
3 - ElePwr_UnitTestResults
Overview
Unit Test InformationModule Definitions
Variable Range
ElePwr_Per1
ElePwr_Per1() b
Sheet 1: Unit Test Information
1.0a | |||||
Nexteer EPS Unit Test Tool | |||||
Rev:2.7b | |||||
Name of Tester: | Padmalatha Gudipally | ||||
Code File(s) Under Test: | Ap_ElePwr.c | ||||
Code File(s) Version: | 1 | ||||
Module Design Document: | Electric_Power_Consumption_MDD.docx | ||||
Module Design Document Version: | 2 | ||||
Unit Test Plan Version: | 1 | ||||
Optimization Level: | Level 2 | ||||
Compiler (CodeGen) Version: | TMS470_4.9.5 | ||||
Model Type: | Excel Macro | ||||
Model Version: | Nexteer EPS Unit Test Tool 2.7b/EPS Library 1.28 | ||||
Special Test Requirements: | |||||
Test Date: | 6/6/2013 | ||||
Comments: | |||||
Index of Tests: | |||||
Test Set up | Test Worksheets | Test Status | Run TS | ||
ElePwr_Per1 | ElePwr_Per1() b | -- | -- | 29 | |

Sheet 2: Module Definitions
![]() | |||||||||||
Nexteer EPS Unit Test Tool | |||||||||||
Rev:2.7b | |||||||||||
Module Definitions | |||||||||||
Module Test Functions | Module Set/Read Variables | Module Function Stubs | |||||||||
Return Type | Name | Parameter Prototype | Scope | Type | Name | Default Value | Return Type | Name | Parameter Prototype | ||
void | ElePwr_Per1 | (void) | G | float | Vecu_Volt_f32 | void | Rte_Call_ElePwr_Per1_CP0_CheckpointReached | (void) | |||
G | float | MtrVoltDax_Volt_f32 | void | Rte_Call_ElePwr_Per1_CP1_CheckpointReached | (void) | ||||||
G | float | MtrVoltQax_Volt_f32 | |||||||||
G | float | MtrCurrDax_Amp_f32 | |||||||||
G | float | MtrCurrQax_Amp_f32 | |||||||||
G | float | ElectricPower_Watt_f32 | |||||||||
G | float | SupplyCurrent_Amp_f32 | |||||||||
G | float | ModInPower_Watt_D_f32 | |||||||||
G | float | DropInPower_Watt_D_f32 | |||||||||
G | float | k_CntlrInResist_Ohm_f32 | |||||||||
G | float | k_PstcPowerLoss_Watt_f32 |
Sheet 3: Variable Range
![]() | |||||||||||
Nexteer EPS Unit Test Tool | |||||||||||
Rev:2.7b | |||||||||||
Variable Range Definitions | |||||||||||
Variable Name | Max Value | Min Value | |||||||||
Vecu_Volt_f32 | |||||||||||
MtrVoltDax_Volt_f32 | |||||||||||
MtrVoltQax_Volt_f32 | |||||||||||
MtrCurrDax_Amp_f32 | |||||||||||
MtrCurrQax_Amp_f32 | |||||||||||
ElectricPower_Watt_f32 | |||||||||||
SupplyCurrent_Amp_f32 | |||||||||||
ModInPower_Watt_D_f32 | |||||||||||
DropInPower_Watt_D_f32 | |||||||||||
k_CntlrInResist_Ohm_f32 | |||||||||||
k_PstcPowerLoss_Watt_f32 |
Sheet 4: ElePwr_Per1
![]() | |||||
Nexteer EPS Unit Test Tool | |||||
Rev:2.7b | |||||
Test Setup | |||||
Number Of Calibrations | 0 | ||||
Number Of Calibration Sets | 0 | ||||
Calibration Sheet | |||||
Function(s) Under Test | Variables | Function Stubs | |||
Function Name | TestType | Test Vectors | Set | Read | Function Name |
ElePwr_Per1 | b | 29 | Vecu_Volt_f32 | ElectricPower_Watt_f32 | Rte_Call_ElePwr_Per1_CP0_CheckpointReached |
MtrCurrDax_Amp_f32 | SupplyCurrent_Amp_f32 | Rte_Call_ElePwr_Per1_CP1_CheckpointReached | |||
MtrCurrQax_Amp_f32 | |||||
MtrVoltDax_Volt_f32 | |||||
MtrVoltQax_Volt_f32 | |||||
k_CntlrInResist_Ohm_f32 | |||||
k_PstcPowerLoss_Watt_f32 |
Sheet 5: ElePwr_Per1() b
ElePwr_Per1 | TS | -- | |||||||||||||||||
b | I/P | I/P | I/P | I/P | I/P | I/P | I/P | O/P | O/P | Func Stub Counter | Func Stub Counter | Expected O/P | Expected O/P | Expected Stub Cnt | Expected Stub Cnt | Test Status | Perf. Metrics | Comments | |
Vector Number | Vector Description | Vecu_Volt_f32 | MtrCurrDax_Amp_f32 | MtrCurrQax_Amp_f32 | MtrVoltDax_Volt_f32 | MtrVoltQax_Volt_f32 | k_CntlrInResist_Ohm_f32 | k_PstcPowerLoss_Watt_f32 | ElectricPower_Watt_f32 | SupplyCurrent_Amp_f32 | Rte_Call_ElePwr_Per1_CP0_CheckpointReached | Rte_Call_ElePwr_Per1_CP1_CheckpointReached | ElectricPower_Watt_f32 | SupplyCurrent_Amp_f32 | Rte_Call_ElePwr_Per1_CP0_CheckpointReached | Rte_Call_ElePwr_Per1_CP1_CheckpointReached | P/F | CPU Cycles | |
1 | All Min | 5 | 0 | -220 | -20 | -20 | 0 | 0 | -- | -- | -- | -- | 3810.5117766496 | 762.10235532992 | 1 | 1 | -- | ||
2 | All Max | 31 | 220 | 220 | 20 | 20 | 0.02 | 25 | -- | -- | -- | -- | 8854.76444819912 | 285.637562845133 | 1 | 1 | -- | ||
3 | Vecu_Volt_f32=Min | 5 | 25 | 25 | -2 | 1 | 0.001 | 2 | -- | -- | -- | -- | -19.6318850946 | -3.92637701892 | 1 | 1 | -- | ||
4 | Vecu_Volt_f32=Max | 31 | 65 | 50 | -4 | 3 | 0.002 | 4 | -- | -- | -- | -- | -91.2439078397572 | -2.94335186579862 | 1 | 1 | -- | ||
5 | Vecu_Volt_f32=Pos | 25 | 85 | 75 | -6 | 5 | 0.003 | 6 | -- | -- | -- | -- | -110.84781951084 | -4.4339127804336 | 1 | 1 | -- | ||
6 | MtrCurrDax_Amp_f32=Min | 6 | 0 | 100 | -8 | 7 | 0.004 | 8 | -- | -- | -- | -- | 655.051115982092 | 109.175185997015 | 1 | 1 | -- | ||
7 | MtrCurrDax_Amp_f32=Max | 8 | 220 | 125 | -10 | 9 | 0.005 | 10 | -- | -- | -- | -- | -853.264906724119 | -106.658113340515 | 1 | 1 | -- | ||
8 | MtrCurrDax_Amp_f32=Pos | 10 | 125 | 150 | -12 | 11 | 0.006 | 12 | -- | -- | -- | -- | 142.916310567599 | 14.2916310567599 | 1 | 1 | -- | ||
9 | MtrCurrQax_Amp_f32=Min | 12 | 10 | -220 | -14 | 13 | 0.007 | 14 | -- | -- | -- | -- | -2255.95121135233 | -187.995934279361 | 1 | 1 | -- | ||
10 | MtrCurrQax_Amp_f32=Max | 14 | 30 | 220 | -16 | 15 | 0.008 | 16 | -- | -- | -- | -- | 2701.63245499716 | 192.973746785512 | 1 | 1 | -- | ||
11 | MtrCurrQax_Amp_f32=Max | 16 | 50 | 0 | -18 | 17 | 0.009 | 18 | -- | -- | -- | -- | -740.065441530622 | -46.2540900956638 | 1 | 1 | -- | ||
12 | MtrCurrQax_Amp_f32=Neg | 18 | 70 | -50 | -3 | 19 | 0.01 | 20 | -- | -- | -- | -- | -953.441320241323 | -52.9689622356291 | 1 | 1 | -- | ||
13 | MtrCurrQax_Amp_f32=Pos | 20 | 90 | 50 | -5 | -1 | 0.011 | 22 | -- | -- | -- | -- | -405.856451892005 | -20.2928225946003 | 1 | 1 | -- | ||
14 | MtrVoltDax_Volt_f32=Min | 22 | 110 | -25 | -20 | -3 | 0.012 | 24 | -- | -- | -- | -- | -1732.33574957001 | -78.7425340713641 | 1 | 1 | -- | ||
15 | MtrVoltDax_Volt_f32=Max | 24 | 130 | -50 | 20 | -5 | 0.013 | 1 | -- | -- | -- | -- | 2606.66263515926 | 108.610943131636 | 1 | 1 | -- | ||
16 | MtrVoltDax_Volt_f32=Zero | 26 | 150 | -75 | 0 | -7 | 0.014 | 3 | -- | -- | -- | -- | 461.944494530974 | 17.767095943499 | 1 | 1 | -- | ||
17 | MtrVoltDax_Volt_f32=Neg | 28 | 170 | -100 | -10 | -9 | 0.015 | 5 | -- | -- | -- | -- | -678.636649557821 | -24.2370231984936 | 1 | 1 | -- | ||
18 | MtrVoltDax_Volt_f32=Pos | 30 | 190 | -125 | 10 | -11 | 0.016 | 7 | -- | -- | -- | -- | 2986.24153072579 | 99.5413843575263 | 1 | 1 | -- | ||
19 | MtrVoltQax_Volt_f32=Min | 7 | 210 | -150 | 2 | -20 | 0.017 | 9 | -- | -- | -- | -- | 6014.25790134636 | 859.179700192337 | 1 | 1 | -- | ||
20 | MtrVoltQax_Volt_f32=Max | 9 | 20 | -175 | 4 | 20 | 0.018 | 11 | -- | -- | -- | -- | -1001.40688094325 | -111.267431215917 | 1 | 1 | -- | ||
21 | MtrVoltQax_Volt_f32=Zero | 11 | 40 | -200 | 6 | 0 | 0.019 | 13 | -- | -- | -- | -- | 227.629567982533 | 20.6935970893212 | 1 | 1 | -- | ||
22 | MtrVoltQax_Volt_f32=Neg | 13 | 60 | 11 | 8 | -15 | 0.005 | 15 | -- | -- | -- | -- | 289.999740357638 | 22.3076723352029 | 1 | 1 | -- | ||
23 | MtrVoltQax_Volt_f32=Pos | 15 | 80 | 22 | 10 | 15 | 0.01 | 17 | -- | -- | -- | -- | 1038.17203960921 | 69.2114693072807 | 1 | 1 | -- | ||
24 | k_CntlrInResist_Ohm_f32=Min | 17 | 100 | 33 | 12 | -13 | 0 | 19 | -- | -- | -- | -- | 686.705586317464 | 40.3944462539685 | 1 | 1 | -- | ||
25 | k_CntlrInResist_Ohm_f32=Max | 19 | 120 | 44 | 14 | -15 | 0.02 | 21 | -- | -- | -- | -- | 947.575828757143 | 49.8724120398496 | 1 | 1 | -- | ||
26 | k_CntlrInResist_Ohm_f32=Pos | 21 | 140 | -11 | 16 | -17 | 0.01 | 23 | -- | -- | -- | -- | 2225.01931824897 | 105.953300868999 | 1 | 1 | -- | ||
27 | k_PstcPowerLoss_Watt_f32=Min | 23 | 160 | -22 | 18 | -19 | 0.012 | 0 | -- | -- | -- | -- | 3041.20137714258 | 132.226146832286 | 1 | 1 | -- | ||
28 | k_PstcPowerLoss_Watt_f32=Max | 25 | 180 | -33 | 3 | 2 | 0.014 | 25 | -- | -- | -- | -- | 439.270598193612 | 17.5708239277445 | 1 | 1 | -- | ||
29 | k_PstcPowerLoss_Watt_f32=Pos | 27 | 200 | -44 | 5 | 4 | 0.016 | 15 | -- | -- | -- | -- | 739.781492388786 | 27.399314532918 | 1 | 1 | -- | ||