# Battery Sizing and Automotive Electrical System Analysis

### Overview

Model a typical automotive electrical system as an architectural model and run a primitive analysis. The elements in the model can be broadly grouped as either a source or a load. Various properties of the sources and loads are set as part of the stereotype. This example uses the iterate method of the specification API to iterate through each element of the model and run analysis using the stereotype properties.

### Structure of Model

The generator charges the battery while the engine is running. The battery and the generator support the electrical loads in the vehicle, like ECU, radio, and body control. The inductive loads like motors and other coils have the InRushCurrent stereotype property defined. Based on the properties set on each component, the following analyses are performed:

• Number of days required for KeyOffLoad to discharge 30% of the battery.

• Total CrankingInRush current.

• Total Cranking current.

• Ability of the battery to start the vehicle at 0°F based on the battery cold cranking amps (CCA). The discharge time is computed based on Puekert coefficient (k), which describes the relationship between the rate of discharge and the available capacity of the battery.

### Load Model and Run Analysis

Instantiate battery sizing class used by the analysis function to store analysis results.

objcomputeBatterySizing = computeBatterySizing;

Run the analysis using the iterator.

Display analysis results.

objcomputeBatterySizing.displayResults
Number of days required for KeyOffLoad to discharge 30% of battery: 55.789.
Total CrankingInRush current: 70 A
Total Cranking current: 104 A
CCA of the specified battery is sufficient to start the car at 0 F.
ans =
computeBatterySizing with properties:

totalCrankingInrushCurrent: 70
totalCrankingCurrent: 104
totalAccesoriesCurrent: 71.6667