Appearance
Battery
Battery pack: strings of cells, each an open-circuit voltage that follows the state of charge (a table), a series resistance R0 and one RC branch for the slow polarisation voltage. The state of charge integrates the current against the pack capacity. Discharge stops at SOC min and charging at SOC max, and optional current limits cap the discharge and charge currents: the pack then delivers no more than allowed, and a load that insists on more pulls the terminal voltage down. Wired output: the state of charge in pu. Monitors the current (A / kA), terminal voltage (V / kV) and SOC (% / pu). Use it as the DC source of a battery energy-storage system, an electric vehicle or a UPS. Takes no part in the load flow.
Category: Single-Phase / Sources
How it works
The pack is
with the pack resistances
with
sets the instant voltage step when the current changes. - The RC branch is the slow polarisation: under a steady load the voltage keeps sagging by
over a few . When the load stops, it relaxes back towards the open-circuit voltage with the same time constant.
Limits
- SOC bounds. At or below SOC min the pack stops discharging, and at or above SOC max it stops charging. Current in the other direction is always allowed, so a charger can lift an empty pack off its lower bound.
- Current limits. I max discharge and I max charge cap the pack current; 0 means no limit.
When the current passes a limit, the pack holds it at the allowed value from the next time step on, like a battery management system limiting its contactor current. It returns to normal once the circuit draws less. The terminal voltage then goes wherever the external circuit takes it, so a load that insists on more current pulls the DC bus down, and at an SOC bound the pack behaves as an open circuit in the blocked direction.
Notes
- The wired
socoutput is the state of charge in pu (0–1), for dispatch logic or a battery management system built from control blocks. - Real packs hold minutes to hours of energy, far longer than a typical EMT run. To see the state of charge move within a short run, scale the capacity down.
- The model has no temperature dependence, no ageing and no hysteresis between charge and discharge.
Ports
| Port | Kind | Signal | Notes |
|---|---|---|---|
p | Electrical terminal | — | |
n | Electrical terminal | — | |
soc | Control output | Real |
Parameters
Config
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Cells in series | Number | 200 | — | Number of cells in series in each string. Scales the open-circuit voltage and the resistances. | n_series |
| Strings in parallel | Number | 1 | — | Number of parallel strings. Scales the capacity and divides the resistances. | n_parallel |
| Cell capacity | Number | 50 | Ah (also mAh) | Capacity of one cell. The pack holds this times the number of parallel strings. | capacity |
| SOC(0) | Number | 50 | % (also pu) | State of charge at t = 0. | soc_init |
| Measure current | Choice: Off / On | Off | — | Emit the pack current out of the + terminal (positive = discharging) as an observable. The signal name and unit are on this row. | measure_current |
| Positive direction | Choice: +ve in / +ve out | +ve out | — | Sign convention for this current. '+ve out' (default) is positive when current flows out of the + terminal (discharging). '+ve in' flips the sign. | current_dir |
| Measure voltage | Choice: Off / On | Off | — | Emit the terminal voltage V(+) - V(-) as an observable. The signal name and unit are on this row. | measure_voltage |
| Measure SOC | Choice: Off / On | Off | — | Emit the state of charge as an observable. The signal name and unit are on this row. The wired `soc` output is always available, in pu. | measure_soc |
Cell
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Cell OCV(SOC) | Table | 8 rows (SOC (pu), OCV (V)) | — | Open-circuit voltage of one cell against its state of charge, linearly interpolated and held flat outside the table. SOC in pu (0 = empty, 1 = full), voltage in volts per cell. The default is a typical nickel-manganese-cobalt (NMC) cell. | ocv_table |
| R0 | Number | 0.5 | mΩ (also Ω) | Series (ohmic) resistance of one cell: the instant voltage step when the current changes. | r0 |
| R1 | Number | 0.25 | mΩ (also Ω) | Resistance of the cell's RC branch: the polarisation voltage that builds up under load and relaxes when it stops. 0 = no RC branch. | r1 |
| τ1 | Number | 10 | s (also ms, min) | Time constant R1·C1 of the RC branch. 0 = no RC branch. | tau1 |
Limits
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| SOC min | Number | 10 | % (also pu) | Discharge stops at or below this state of charge; charging is still allowed. | soc_min |
| SOC max | Number | 95 | % (also pu) | Charging stops at or above this state of charge; discharging is still allowed. | soc_max |
| I max discharge | Number | 0 | A (also kA) | Largest pack discharge current. 0 = no limit. | i_max_discharge |
| I max charge | Number | 0 | A (also kA) | Largest pack charge current. 0 = no limit. | i_max_charge |
Signal Names
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Current name | Text | I_bat | A (also kA) | Signal name for the pack current out of the + terminal (positive = discharging). Blank = skip. | current_name |
| Voltage name | Text | V_bat | V (also kV) | Signal name for the terminal voltage. Blank = skip. | voltage_name |
| SOC name | Text | SOC | % (also pu) | Signal name for the state of charge. Blank = skip. | soc_name |
Observables
| Default name | Kind | Recorded when | Description | ID |
|---|---|---|---|---|
| set by Current name | Signal | Measure current is on | Pack current out of the + terminal, positive when discharging, scaled to the chosen unit (A / kA). The direction switch keeps this sign by default and flips it the other way. | branchCurrent |
| set by Voltage name | Signal | Measure voltage is on | Terminal voltage V(+) - V(-), scaled to the chosen unit (V / kV). | terminalVoltage |
| set by SOC name | Signal | Measure SOC is on | State of charge, in % or pu. | soc_level |