BAT

Battery

Physical Networks
运行在线示例 免费 · 无需注册 · 直接在浏览器中运行

Physical battery cell (Battery) modeling State-of-Charge (SOC) dynamics via Coulomb counting, an SOC-dependent open-circuit voltage Voc(SOC)V_{\text{oc}}(\text{SOC}), internal ohmic resistance R0R_0, and Joule heating exported to q_diss and the optional H thermal port.

数学模型

Voc(SOC)=Vempty+(Vfull−Vempty) SOC,V+−V−=Voc(SOC)−IoutR0,d(SOC)dt=−Iout3600⋅CAhV_{\text{oc}}(\text{SOC}) = V_{\text{empty}} + (V_{\text{full}} - V_{\text{empty}})\,\text{SOC}, \qquad V_+ - V_- = V_{\text{oc}}(\text{SOC}) - I_{\text{out}} R_0, \qquad \frac{d(\text{SOC})}{dt} = -\frac{I_{\text{out}}}{3600 \cdot C_{\text{Ah}}}

输入与输出

Direction ID Label 类型 Status
→ In p + number Required
→ In n - number Required
→ In H H number Optional
← Out soc SOC number Output
← Out q_diss Q_diss number Output

参数

参数 Label 类型 默认值 描述
nominalVoltage Nominal Voltage number 12 Nominal battery pack voltage [V]
capacityAh Capacity number 5 Ampere-hour charge capacity [Ah]
initialSoc Initial SOC number 0.8 Starting State of Charge (0..1)
internalResistance Internal Resistance (R0) number 0.05 Internal ohmic resistance [Ω]
emptyVoltage Empty Voltage (SOC=0) number 10.2 Open-circuit voltage at 0% SOC [V]
fullVoltage Full Voltage (SOC=1) number 13.8 Open-circuit voltage at 100% SOC [V]

使用示例

Example 1: Battery Discharging into Resistive Load

Connect Battery (capacityAh = 0.01) to a 10 Ω Resistor and Ground to observe terminal voltage sag and falling soc.

Example 2: EV / Drone Drivetrain

Power a DCMotor via a ControlledSwitch H-bridge directly from a Battery with H connected to a ThermalMass.

说明与最佳实践

  • Thermal Self-Heating: Connect H to a ThermalMass to model battery temperature rise Qdiss=I2R0Q_{\text{diss}} = I^2 R_0.
  • SOC Clamping: SOC is clamped smoothly to [0,1][0, 1] so the cell cannot over-discharge below 0% or over-charge above 100%.

相关模块