Battery
electrical.battery
Battery as an open circuit voltage that rises linearly with the state of charge, in series with a resistance R. Current into p charges it. 1 A.h is 3600 C.
Ports
| Name | Domain |
|---|---|
p | electrical |
n | electrical |
Parameters
| Name | Unit | Default | Range | Description |
|---|---|---|---|---|
Vempty | V | 3 | Open circuit voltage at state of charge 0 | |
Vfull | V | 4.2 | Open circuit voltage at state of charge 1 | |
R | Ohm | 0.05 | 0 to ∞ | Internal resistance |
Q | C | 7200 | 0 to ∞ | Capacity |
soc0 | 1 | 1 | 0 to 1 | State of charge at the start |
Variables
| Name | Unit | Start |
|---|---|---|
v | V | |
i | A | |
soc | 1 | soc0 |
Equations
v = p.v - n.v 0 = p.i + n.i i = p.i v = Vempty + (Vfull - Vempty) * soc + R * i Q * der(soc) = i