Giter VIP home page Giter VIP logo

bldc-motor-control-foc's Introduction

bldc-motor-control-FOC

License: GPL v3 paypal

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:


Table of Contents


FOC Webview

To explore the controller without a Matlab/Simulink installation click on the link below:

https://eferu.github.io/bldc-motor-control-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

The FOC algorithm architecture is illustrated in the figure below:

FOC algorithm

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

The C code for the controller is capable for auto-code generated using Matlab/Simulink. The controller is designed for stock hoverboard motors with the motor windings construction as shown here. However, with slight modifications, the controller can be adapted to other available BLDC motors.


Parameters

The controller parameters are given in the following table:

Parameters table


Diagnostics

The motor is constantly monitored for errors. These errors are:

  • Error 001: Hall sensor not connected
  • Error 002: Hall sensor short circuit
  • Error 004: Motor NOT able to spin (Possible causes: motor phase disconnected, MOSFET defective, operational Amplifier defective, motor blocked)

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


bldc-motor-control-foc's People

Contributors

eferu avatar

Stargazers

Aled 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.