bldc-motor-control-FOC-master

所属分类:其他
开发工具:C/C++
文件大小:12926KB
下载次数:0
上传日期:2020-11-19 14:27:35
上 传 者svspars
说明:  c code for brushless driver

文件列表:
01_Libraries (0, 2020-11-13)
01_Libraries\01_Controller (0, 2020-11-13)
01_Libraries\01_Controller\BLDC_controller_Lib.slx (55618, 2020-11-13)
01_Libraries\02_Plant (0, 2020-11-13)
01_Libraries\02_Plant\BLDC_model_sf.mexw64 (54272, 2020-11-13)
01_Libraries\02_Plant\BLDCmotorControl_data.mat (1841159, 2020-11-13)
01_Libraries\02_Plant\PWM_generator_sf.mexw64 (55808, 2020-11-13)
02_Figures (0, 2020-11-13)
02_Figures\FOC_algorithm.png (34628, 2020-11-13)
02_Figures\FW_architecture.png (35614, 2020-11-13)
02_Figures\control_methods.png (193260, 2020-11-13)
02_Figures\firmware_architecture.pptx (51734, 2020-11-13)
02_Figures\paramTable.png (68023, 2020-11-13)
03_CreateParamTable (0, 2020-11-13)
03_CreateParamTable\create_tableParamType.m (3552, 2020-11-13)
03_CreateParamTable\setBlockSetting.m (1031, 2020-11-13)
03_CreateParamTable\tableParamType.xlsx (13383, 2020-11-13)
04_Literature (0, 2020-11-13)
04_Literature\[1] 8-Microchip AN1078 - Sensorless Field Oriented Control of a PMSM.pdf (486300, 2020-11-13)
04_Literature\[2] 8-Sensorless PMSM Field-Oriented Control.pdf (1401113, 2020-11-13)
04_Literature\[3] Texas_intrs - FOC introduction.pdf (98658, 2020-11-13)
04_Literature\[4] Texas_intrs - Clarke and Park.pdf (129925, 2020-11-13)
04_Literature\[5] FOC - Optimised space vector modulation for variable speed.pdf (6612374, 2020-11-13)
04_Literature\[6] Sensorless-FOCWithFlux-Weakening.pdf (685566, 2020-11-13)
04_Literature\[7] Practical Field Weakening Current Vector Control.pdf (368770, 2020-11-13)
99_RecycleBin (0, 2020-11-13)
99_RecycleBin\BLDC_controller_Lib_AccelerationBased.slx (60658, 2020-11-13)
99_RecycleBin\BLDC_controller_Lib_CounterBased.slx (61629, 2020-11-13)
99_RecycleBin\BLDCmotorControl_FOC_R2017b.slx (165189, 2020-11-13)
99_RecycleBin\BLDCmotorControl_FOC_R2017b_fixdt_Ffwd.slx (185751, 2020-11-13)
99_RecycleBin\BLDCmotorControl_FOC_R2017b_fixdt_speedDeriv.slx (184090, 2020-11-13)
99_RecycleBin\Filter_fixdt (0, 2020-11-13)
99_RecycleBin\Filter_fixdt\filtLowPass_ert_rtw_sFix32En16 (0, 2020-11-13)
99_RecycleBin\Filter_fixdt\filtLowPass_ert_rtw_sFix32En16\filtLowPass.c (6191, 2020-11-13)
99_RecycleBin\Filter_fixdt\filtLowPass_ert_rtw_sFix32En16\filtLowPass.h (3191, 2020-11-13)
99_RecycleBin\Mixer_fixdt (0, 2020-11-13)
99_RecycleBin\Mixer_fixdt\mixer.c (6577, 2020-11-13)
... ...

# bldc-motor-control-FOC [![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¤cy_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: - [hoverboard-firmware-hack-FOC](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC) --- ## FOC Architecture The FOC architecture includes: - **Estimations**: estimates the rotor position, angle and motor speed based on Hall sensors signal - **Diagnostics**: implements error detection such as unconnected Hall sensor, motor blocked, MOSFET defective - **Control Manager**: manages the transitions between control modes (Voltage, Speed, Torque) - **FOC Algorithm**: implements the FOC strategy - **Control Type Manager**: Manages the transition between Commutation, Sinusoidal, and FOC control type ![FOC architecture](/02_Figures/FW_architecture.png) The FOC algorithm architecture is illustrated in the figure below: ![FOC algorithm](/02_Figures/FOC_algorithm.png) In this implementation 3 control types are available: - Commutation - SIN (Sinusoidal) - FOC (Field Oriented Control) with the following 3 control modes: - **VOLTAGE MODE**: in this mode the controller applies a constant Voltage to the motors. - **SPEED MODE**: in this mode a closed-loop controller realizes the input speed target by rejecting any of the disturbance (resistive load) applied to the motor. - **TORQUE MODE**: in this mode the input torque target is realized. This mode enables motor "freewheeling" when the torque target is `0`. ![Schematic representation of the available control methods](/02_Figures/control_methods.png) The C code for the controller is capable for auto-code generated using [Matlab/Simulink](https://nl.mathworks.com/solutions/embedded-code-generation.html). The controller is designed for [stock hoverboard motors](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/docs/pictures/motor_inside.jpg) with the motor windings construction as shown [here](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/docs/pictures/motor_winding.png). However, with slight modifications, the controller can be adapted to other available BLDC motors. 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 Every contribution to this repository is highly appreciated! Feel free to create pull requests to improve this repository as ultimately you are going to help everyone. If you want to donate to keep this repository updated, please use the link below: [![paypal](https://www.paypalobjects.com/en_US/NL/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=CU2SWN2XV9SCY¤cy_code=EUR&source=url) ---

近期下载者

相关文件


收藏者