Skip to content

Battery Modeling and Kalman Filter-based State-of-Charge Estimation for a Race Car Application

Notifications You must be signed in to change notification settings

AhmadAbdelrazik/battery-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Battery Modeling and Kalman Filter-based State-of-Charge Estimation for a Race Car Application

Overview

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

Table of Contents

Introduction

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.

Project Structure

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

Getting Started

Prerequisites

  • Go 1.22 or higher
  • GCC compiler for C

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/battery-soc-estimation.git
    cd battery-soc-estimation

Usage

Running the Go Implementation

  1. Navigate to the Go directory:

    cd go
  2. Run the Go program:

    go run main.go

Running the C Implementation

  1. Navigate to the C directory:

    cd c
  2. Compile the C program:

    gcc main.c battery_model.c ekf.c -o battery_soc_estimation
  3. Run the C program:

    ./battery_soc_estimation

Testing

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.

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Battery Modeling and Kalman Filter-based State-of-Charge Estimation for a Race Car Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published