Coder Social home page Coder Social logo

musaho / battery-management Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meltinglab/battery-management

0.0 0.0 0.0 39.59 MB

License: MIT License

JavaScript 0.03% C 87.79% Assembly 1.63% MATLAB 0.04% M 0.24% LSL 1.94% Makefile 0.53% HTML 7.78% Batchfile 0.01%

battery-management's Introduction

Contributors Forks Stargazers Issues MIT License


Logo

Battery Management System

Matlab implementation of a Battery Management System.
Explore the docs »

View Demo UI · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Hardware Implementation
  5. Roadmap
  6. Contributing
  7. License
  8. Contact

About The Project

The purpose of the project is to build from scratch a Battery Management System (BMS) by using a Model Based Design approach. Starting from the plant definition (customizable), we proceeded with the design of the control strategies both for the cell balancing as well as for the pre-charge, post-discharge resistors and contactors management. A complete simulation enviroment has been developed in order to test and appreciate all the functionalities.

Built With

Documentation

The complete documentation of the project is reported in Final_Report.pdf file under:

battery-management\Docs\

Getting Started

To get a local copy up and running just follow these simple steps:

Prerequisites

Software:

  • Matlab v2021a
  • Simulink v10.3

Toolbox:

  • optimization_toolbox
  • power_system_blocks
  • simscape
  • simulink_control_design
  • simulink_design_optim
  • stateflow

N.B: In order to get the list of in-use toolbox in a project use the following command (after run) :

license('inuse')

Installation

  1. Clone the repo
    git clone https://github.com/meltinglab/battery-management.git
  2. Open the simulationUI.slx file under:
    battery-management\workspace\Simulation\MIL\

Usage

In order to test the whole system (plant+controller), just follow these steps:

  1. Compile & Run by clicking on the "Play" button
  2. Adjust the control parameters and evaluate the behavoiur at run-time

UI

For more examples or a detailed description of all the blocks, please refer to the Documentation

Hardware Implementation

In order to be used in an embedded device, the controller code has been ported to an STM32F4-Discovery board.

f4-disc

The whole porting process has been carried out by using the Embedded Coder and, in particular, the support package for STMicroelectronics Discovery board.

Additional prerequisites:

Hardware:

Any other compatible board with the embedded coder can be used but some additional work may be needed.

Toolbox:

  • embedded_coder
  • stm32_discovery_support_package

Setup

FW package folder:

  1. Open the testF4.slx file under:
    battery-management\workspace\Simulation\SIL-PIL\
  2. Double-click on the bms_f4 model
  3. Click on the apps pane
  4. Under Get Add-Ons click on Manage Add-Ons
  5. Click on the the "Setup Gear" on the right of the "Embedded Coder support package for STMicroelectronics Discovery boards"
  6. Follow the setup instructions and make sure to specify the right firmware package folder:
    battery-management\workspace\STM32F4-Discovery_FW_V1.1.0\

Discovery COM port

  1. Assuming that you have already opened the testF4.slx file
  2. Click on the Hardware pane
  3. Click on Hardware settings, then open the hardware implementation pane
  4. Under Target hardware resources > PIL make sure to select Serial (USART2) and then insert the right COM port of your USB-Serial converter

N.B. A detailed description on how to setup the communication interface for PIL execution can be found here

Usage

  1. Open the testF4.slx file under:
    battery-management\workspace\Simulation\SIL-PIL\
  2. By clicking on the "Play" button the system will Compile & Deploy two controller models: the first will run on the discovery board, the other directly on your PC.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Anna Delli Noci - @Danidotwav - [email protected]

Michele Gazzarri - @dinamitemic - [email protected]

Carlo Edoardo Malaspina - @CarloEdoardoMalaspina - [email protected]

Mirko Shtylla - @mirkoshtylla - [email protected]

Project Link: https://github.com/meltinglab/battery-management

battery-management's People

Contributors

dinamitemic avatar carloedoardomalaspina avatar mirkoshtylla avatar danidotwav avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.