This project implements various battery models to simulate and analyze battery behavior under different conditions. It includes implementations of State of Charge (SoC) and State of Health (SoH) calculations, as well as first-order and second-order RC (Resistor-Capacitor) equivalent circuit models.
- Python 3.x
- NumPy
- SciPy
- Matplotlib
The project consists of a single Python script containing all the implementations and visualizations.
This model simulates battery aging and calculates the State of Charge over multiple cycles, considering factors such as:
- Calendar aging
- Cycle aging
- Depth of Discharge (DoD)
- Temperature effects
A simple implementation of the RC equivalent circuit model for batteries.
An improved model that fits experimental data to a first-order RC equivalent circuit.
A more complex model that fits experimental data to a second-order RC equivalent circuit for increased accuracy.
To run the simulations and generate plots:
- Ensure all dependencies are installed.
- Run the Python script.
- The script will output various plots and parameter values for different models.
Implements the basic RC model equation.
Implements the second-order RC model equation.
Used to fit the experimental data to the RC models.
The script generates several plots:
- RC Equivalent Circuit Model voltage response
- Fitted First-Order RC Model vs. Experimental Data
- Fitted Second-Order RC Model vs. Experimental Data
- Residuals for both First-Order and Second-Order RC Models
Parameter values for the fitted models are printed to the console.
Contributions to improve the models or add new features are welcome. Please follow these steps:
- Fork the repository
- Create a new branch for your feature
- Commit your changes
- Push to the branch
- Create a new Pull Request
For any questions or issues, please open an issue in the project repository.