Current Management
Develop algorithms for charging and discharging a battery and to set the charging and discharging limits.
Blocks
Battery CC-CV | Constant current constant voltage charging algorithm (Since R2022b) |
Battery Charging Current Limit | Maximum battery charging current (Since R2022b) |
Battery Discharging Current Limit | Maximum battery discharging current (Since R2022b) |
Featured Examples
Balance Battery Cells with Switched Capacitor Method
Balance a battery with two cells connected in series by using the switched-capacitor (SC) strategy for active cell balancing. For shuttling the energy between the battery cells, this method uses capacitors as external energy storage elements. To balance N cells, the SC method requires N-1 capacitors and 2*N bidirectional switches. The control strategy has two states only and can work in charging and discharging modes. The initial state of charge (SOC) is 0.7 for one cell and 0.75 for the other. To generate more detailed battery packs, use the objects and functions in the Battery Pack Model Builder.
- Since R2023b
- Open Model
Battery Charging and Discharging
Use a constant current and constant voltage algorithm to charge and discharge a battery. The Battery CC-CV block is charging and discharging the battery for 10 hours. The initial state of charge (SOC) is equal to 0.3. When the battery is charging, the current is constant until the battery reaches the maximum voltage and the current decreases to 0. When the battery is discharging, the model uses a constant current.
Charge Battery Module with Charger Block
Charge a battery module using a constant-current step followed by a constant-voltage step. This is a CC-CV profile. The battery simulation utilizes a Simscape™ Battery™ Charger block. At the start of the simulation, the battery module has a state of charge (SOC) of 10%. The Charger block performs a constant-current (CC) charging until it reaches the predefined module voltage limit of 4.1 V. The block then switches to a constant-voltage (CV) control step where the current gradually decreases until it reaches a threshold of 0.5 A, specified in the Current Threshold parameter. The charging procedure stops once the current reaches the designated threshold.
- Since R2024a
- Open Live Script
Charge and Discharge Battery Module with Passive Balancing
Perform a cyclic charge and discharge cycle on a battery module while balancing the voltages of the module parallel assemblies.
- Since R2024a
- Open Live Script
Charge and Discharge Module Assembly with Coolant Control
Perform a charging and discharging cycle on a battery module assembly while monitoring the cell temperature and enabling cooling.
- Since R2024a
- Open Live Script
Charge and Discharge Battery Module with State of Charge Estimator
Cyclically charge and discharge a battery module while estimating the state of charge (SOC) of the three parallel assemblies of the module over time. This example uses the SOC estimation to switch between the charging and discharging profiles. For the estimation, the Kalman filter uses an initial SOC estimation and the voltage, current, and temperature of the parallel assemblies. The model estimates the temperature of the parallel assemblies from the average of the cell temperatures of each parallel assembly.
- Since R2024a
- Open Live Script
Perform Controlled Charging and Discharging on Battery Module
Perform a cyclic charge and discharge profile on a battery module by using the Battery CC-CV block. At the start of the simulation, the battery module has a state of charge (SOC) of 10%. The Battery CC-CV block performs a constant-current (CC) charging until it reaches the limit cell voltage of 4.1 V specified in the Maximum cell voltage (V) parameter. The block then charges the battery with a constant-voltage (CV) profile until the module SOC reaches 90%. Finally, the block starts a CC discharging procedure and discharges the module until the SOC reaches the initial value of 10%. The charge and discharge cycle then restarts.
- Since R2024a
- Open Live Script
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)