Updates on BLDC controller

- added possbility to switch the Control mode while motor is spinning
- added support for Cruise control: activated by b_cruiseCtrlEna, where the target to set is n_cruiseMotTgt. (Needs small aditional handling on the application firmware to set the n_cruiseMotTgt properly to the current operation speed, immediately after activation via b_cruiseCtrlEna).
- extended Phase current measurements z_selPhaCurMeasABC : {iA,iB} = 0; {iB,iC} = 1; {iA,iC} = 2
- added interface for external motor angle measurement from as sensor, e.g., encoder. The selection can be done via b_angleMeasEna.
This commit is contained in:
EmanuelFeru
2020-10-11 20:58:03 +02:00
parent bb38ef1790
commit 3c8a035b2e
360 changed files with 151736 additions and 130057 deletions

View File

@@ -2,7 +2,8 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=CU2SWN2XV9SCY&currency_code=EUR&source=url)
This repository implements Field Oriented Control (FOC) for BLDC motors in Matlab/Simulink. The controller was deployed and tested on a real-time hoverboard embedded platform (see [hoverboard-firmware-hack-FOC](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC)).
This repository implements Field Oriented Control (FOC) for BLDC motors in Matlab/Simulink. The controller was deployed and tested on a real-time hoverboard embedded platform:
- [hoverboard-firmware-hack-FOC](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC)
---
## FOC Architecture
@@ -34,6 +35,12 @@ The C code for the controller is capable for auto-code generated using [Matlab/S
To explore the controller without a Matlab/Simulink installation a [webview](/BLDC_controller_ert_rtw/html/webview) was created. The webview allows to visualize the controller with browsers like: Microsoft Internet Explorer or Microsoft Edgeview.
### Parameters
The controller parameters are given in the following table:
![Parameters table](/02_Figures/paramTable.png)
---
## Contributions