A public repository for BMS algorithms for a NUCLEO BOARD.
Hi Everyone!
Welcome to this repository from Howey's Research Group at the University of Oxford.
The code published here incorporates BMS algorithms for diagnosis functions such as SOC, SOH and Power estimation on a Kokam 53Ah Li-ion battery. This code was designed to work with a NUCLEO F401-RE board and to be tested with a dSPACE HIL Simulator. A short guide on how the set up works is available at https://bitbucket.org/ff95/bms .
The code is made up of three key parts. "Headers" and "Source" folders and the "main.cpp" file. As the code was generated by converting a Simulink model ( available on the BitBucket page), the headers and source code files generated by the conversion are in the corresponding "Headers" and "Source" folders. The "main.cpp" file sets up the ADC, the USB data transmission and starts the estimation (once a character "y" has been received by the computer it is connected to). It also transmits the data from the estimation via USB. Explanation on how to set up the communication with the board is available at BitBucket webpage, from where a MATLAB file can be downloaded which allows real time communication.
For any questions you can contact the author at federicomariaferrari@gmail.com .
The Simulink and Matlab files, together with a short guide, are all available at: https://bitbucket.org/ff95/bms.
Thanks for trying this out!
Federico
headers/Simulink/EKF_private.h@9:17c258c67c33, 2016-12-09 (annotated)
- Committer:
- fmferrari
- Date:
- Fri Dec 09 17:23:26 2016 +0000
- Revision:
- 9:17c258c67c33
- Parent:
- 8:339dd9885af3
- Child:
- 13:831eab218c33
A (what seems) working version. It prints SOC, V and Current
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fmferrari | 6:cb71171a7108 | 1 | // |
fmferrari | 6:cb71171a7108 | 2 | // Academic License - for use in teaching, academic research, and meeting |
fmferrari | 6:cb71171a7108 | 3 | // course requirements at degree granting institutions only. Not for |
fmferrari | 6:cb71171a7108 | 4 | // government, commercial, or other organizational use. |
fmferrari | 6:cb71171a7108 | 5 | // |
fmferrari | 6:cb71171a7108 | 6 | // File: EKF_private.h |
fmferrari | 6:cb71171a7108 | 7 | // |
fmferrari | 6:cb71171a7108 | 8 | // Code generated for Simulink model 'EKF'. |
fmferrari | 6:cb71171a7108 | 9 | // |
fmferrari | 9:17c258c67c33 | 10 | // Model version : 1.10 |
fmferrari | 6:cb71171a7108 | 11 | // Simulink Coder version : 8.11 (R2016b) 25-Aug-2016 |
fmferrari | 9:17c258c67c33 | 12 | // C/C++ source code generated on : Fri Dec 9 17:15:30 2016 |
fmferrari | 6:cb71171a7108 | 13 | // |
fmferrari | 6:cb71171a7108 | 14 | // Target selection: ert.tlc |
fmferrari | 7:e0be546a9112 | 15 | // Embedded hardware selection: STMicroelectronics->ST10/Super10 |
fmferrari | 6:cb71171a7108 | 16 | // Code generation objectives: Unspecified |
fmferrari | 6:cb71171a7108 | 17 | // Validation result: Not run |
fmferrari | 6:cb71171a7108 | 18 | // |
fmferrari | 6:cb71171a7108 | 19 | #ifndef RTW_HEADER_EKF_private_h_ |
fmferrari | 6:cb71171a7108 | 20 | #define RTW_HEADER_EKF_private_h_ |
fmferrari | 6:cb71171a7108 | 21 | #include "rtwtypes.h" |
fmferrari | 8:339dd9885af3 | 22 | |
fmferrari | 8:339dd9885af3 | 23 | extern real_T rt_hypotd_snf(real_T u0, real_T u1); |
fmferrari | 8:339dd9885af3 | 24 | |
fmferrari | 6:cb71171a7108 | 25 | #endif // RTW_HEADER_EKF_private_h_ |
fmferrari | 6:cb71171a7108 | 26 | |
fmferrari | 6:cb71171a7108 | 27 | // |
fmferrari | 6:cb71171a7108 | 28 | // File trailer for generated code. |
fmferrari | 6:cb71171a7108 | 29 | // |
fmferrari | 6:cb71171a7108 | 30 | // [EOF] |
fmferrari | 6:cb71171a7108 | 31 | // |