Giter Club home page Giter Club logo

femm-foc-simulation's Introduction

FEMM-FOC-Simulation

FEMM simulation of field oriented control for BLDC motors

FEMM is a free tool for doing magnetic simulations. In this project, BLDC motor control using field-oriented control is simulated using FEMM software. This is done by adjusting the phase current in accordance with the FOC computation using the rotor angle and measuring the torque produced on the rotor.

simulation gif
Animation gif

To run the simulation,

  • Download the resources folder
  • Open FEMM
  • Click file->Open lua script
  • Navigate to the resources folder and Select FOC_sim.lua

stator and rotor design

First step in simulating the motor is to design the stator with windings and rotor with magnets. The stator and rotor design can be saved as a DXF file and imported into FEMM. The DXF files are available in the resources folder.

Stator and rotor DXF
Stator and rotor DXF files used in the simulation

configure FEMM

FEMM will be used as the "Magnetics Problem" in this investigation. The winding pattern and magnet direction must be entered. It is necessary to choose appropriate materials for the magnets, winding, rotor, and stator. The toy motor's stack length is configured at 10mm. The information is already set up in the .fem file.

FEMM project
motor assembly used for simulation. Note that rotor d axis and phase A are initially aligned

Lua script

Lua scripts can automate FEMM analysis. The current in the windings is adjusted according to the rotor angle and the torque on the rotor is measured. The procedure is then repeated with the rotor slightly rotated to the next angle. The console receives the measured torques and rotor angles.

torque vs rotor angle
Plot of angle vs torque. Torque measurements and rotor angle are taken from the console after the simulation is complete

This great blog post served as the inspiration and source of ideas for this project.

femm-foc-simulation's People

Contributors

yoga-cycle avatar

Stargazers

 avatar

Watchers

 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.