/MasterFOC

This library is designed for Dual Motor Field-Orientied Control of PMSM/BLDC based on STM32, this is part of my undergraduate's individual Final Year Project

Primary LanguageCMIT LicenseMIT

MasterFOC-Brief

This project contains:

  1. The simulation of FOC algorithm using MATLAB, which includes,
  • The basic Clarke, Park transformation module
  • The SVPWM generation module
  • The FOC Current Loop Simulink Model
  • The FOC Speed Loop Simulink Model
  • The FOC Position Loop Simulink Model
  1. Dual Motor driver library that suitable for STM32 microcontroller
  1. STM32 Dual motor control board PCB file

实物仿真图222

  • The control board used a four-layer structure, the size was minimized to only 10 cm * 7.3 cm. It used an STM32F405RGT6 as the main controller, two DRV8302 as the gate driver and the detailed capability and features were:
  • Power:
    • 24 V 4.6 A theoretical dual-channel Motor driving ability.
  • Control:
    • Double channel BLDC FOC control (both sensored and sensorless).
    • The potential of servo motor control
  • Measurement:
    • ADC phase current and phase voltage sensing.
    • Support double-channel PWM and I2C encoder.
  • Communication:
    • UART to USB serial communication port.
    • USB OTG port.
    • CAN port.
    • Serial Wire debug port.
  • Safety:
    • Temperature sensing, with the ability of over-temperature protection.
    • Supply voltage sensing to provide under-voltage protection.
  1. Test result for this library

    For detailed result for both MATLAB simulation and STM32 Driver library, please see the reprot in the test folder. Simplest version of mode tests video were given below:

  • Speed test:
Untitled.video.-.Made.with.Clipchamp.3.mp4
  • Angle test:
Untitled.video.-.Made.with.Clipchamp.1.mp4
  • Drag mode, Force feedback mode, and multiple-stage switch mode test:
Untitled.video.-.Made.with.Clipchamp.5.mp4