This project involves implementing a method to estimate the State-of-Charge (SOC) of a lithium-ion polymer battery used in a Formula Student electric race car. The method utilizes a battery equivalent circuit model and an Extended Kalman Filter (EKF) to provide accurate SOC estimations. The project will be implemented in two programming languages: Go and C.
The project is based on the amazing research paper called Battery Modeling and Kalman Filter-based State-of-Charge Estimation for a Race Car Application
Revolve NTNU, a student organization, designs and builds electric race cars for the Formula Student competition. The battery pack, consisting of lithium-polymer cells, is subjected to harsh conditions, requiring precise monitoring to avoid over-charging, over-discharging, and overheating. Estimating the SOC is crucial for efficient battery management and optimal performance during races.
The Extended Kalman Filter (EKF) is used to dynamically estimate the SOC based on a battery model. This project aims to implement the battery modeling and SOC estimation using Go and C languages.
battery-soc-estimation/
├── go/
│ ├── main.go
│ ├── battery.go
│ ├── kalman.go
│ ├── matrix.go
│ ├── ocv.go
│ ├── ocv_vs_soc.csv
│ └── README.md
└── c/
├── main.c
├── data.c
├── matrix.c
├── kalman.c
├── kalman.h
└── README.md
- Go 1.22 or higher
- GCC compiler for C
- Clone the repository:
git clone https://github.com/yourusername/battery-soc-estimation.git cd battery-soc-estimation
-
Navigate to the Go directory:
cd go
-
Run the Go program:
go run main.go
-
Navigate to the C directory:
cd c
-
Compile the C program:
gcc main.c battery_model.c ekf.c -o battery_soc_estimation
-
Run the C program:
./battery_soc_estimation
For both implementations, ensure you have test data and expected results to validate the SOC estimation accuracy. Unit tests should be written to cover various aspects of the battery model and EKF functionality.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.