field oriented control – Hackaday https://hackaday.com Fresh hacks every day Mon, 20 Oct 2025 16:47:29 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 156670177 High Performance Motor Control With FOC From the Ground Up https://hackaday.com/2025/10/20/high-performance-motor-control-with-foc-from-the-ground-up/ https://hackaday.com/2025/10/20/high-performance-motor-control-with-foc-from-the-ground-up/#comments Mon, 20 Oct 2025 23:00:32 +0000 https://hackaday.com/?p=866810 Vector Control, also known as Field Oriented Control or FOC is an AC motor control scheme that enables fine-grained control over a connected motor, through the precise control of its …read more]]>
Testing the FOC-based motor controller. (Credit: Excessive Overkill, YouTube)
Testing the FOC-based motor controller. (Credit: Excessive Overkill, YouTube)

Vector Control, also known as Field Oriented Control or FOC is an AC motor control scheme that enables fine-grained control over a connected motor, through the precise control of its phases. In a recent video [Excessive Overkill] goes through the basics and then the finer details of how FOC works, as well as how to implement it. These controllers generally uses a proportional integral (PI) loop, capable of measuring and integrating the position of the connected motor, thus allowing for precise adjustments of the applied vector.

If this controller looks familiar, it is because we featured it previously in the context of reviving old industrial robotic arms. Whether you are driving the big motors on an industrial robot, or a much smaller permanent magnet AC (PMAC) motor, FOV is very likely the control mechanism that you want to use for the best results. Of note is that most BLDC motors are actually also PMACs with ESC to provide a DC interface.

The actual driving is done with two MOSFETs per phase, forming a half-bridge, switching between the two rails to create the requisite PWM signal for each phase. Picking the right type of MOSFET was somewhat hard, especially due to the high switching currents and the high frequency at 25 kHz. The latter was picked to prevent audible noise while driving a robot. Ultimately SiC MOSFETs were picked, specially the GeneSiC G3R30MT12K. Of note here are the four legs, with a fourth Kelvin Source pin added. This is to deal with potential gate drive issues that are explained in the video.

With the hardware in place, whether following the [Excessive Overkill] GitHub projects or not, what makes all of it work is the software. This is where the microcontroller aspect is essential, as it has to do all the heavy lifting of calculating the new optimal vector and thus the current levels per phase. In this controller an STM32F413 is used, which generates the PWM signals to drive the half-bridges, while reading the measurements from the motors with its ADC.

As can be seen in the resulting use of this controller with old industrial robots, the FOC controller works quite well, with quiet and smooth operation. This performance is why we’re likely to see FOC and PMAC motors used in applications like 3D printers in the future, though the rule of ‘good enough’ makes the cost of an FOC controller still a tough upsell over a simple open loop stepper-based system.

]]>
https://hackaday.com/2025/10/20/high-performance-motor-control-with-foc-from-the-ground-up/feed/ 8 866810 vector_field_oriented_control_excessive_overkill_youtube Testing the FOC-based motor controller. (Credit: Excessive Overkill, YouTube)
Open Source High Power EV Motor Controller https://hackaday.com/2017/09/11/open-source-high-power-ev-motor-controller/ https://hackaday.com/2017/09/11/open-source-high-power-ev-motor-controller/#comments Mon, 11 Sep 2017 23:00:00 +0000 http://hackaday.com/?p=272334 For anyone with interest in electric vehicles, especially drives and control systems for EV’s, the Endless-Sphere forum is the place to frequent. It’s full of some amazing projects covering electric …read more]]>

For anyone with interest in electric vehicles, especially drives and control systems for EV’s, the Endless-Sphere forum is the place to frequent. It’s full of some amazing projects covering electric skateboards to cars and everything in between. [Marcos Chaparro] recently posted details of his controller project — the VESC-controller, an open source controller capable of driving motors up to 200 hp.

[Marcos]’s controller is a fork of the VESC by [Benjamin Vedder] who has an almost cult following among the forum for “creating something that all DIY electric skateboard builders have been longing for, an open source, highly programmable, high voltage, reliable speed controller to use in DIY eboard projects”. We’ve covered several VESC projects here at Hackaday.

While [Vedder]’s controller is aimed at low power applications such as skate board motors, [Marcos]’s version amps it up several notches. It uses 600 V 600 A IGBT modules and 460 A current sensors capable of powering BLDC motors up to 150 kW. Since the control logic is seperated from the gate drivers and IGBT’s, it’s possible to adapt it for high power applications. All design files are available on the Github repository. The feature list of this amazing build is so long, it’s best to head over to the forum to check out the nitty-gritty details. And [Marcos] is already thinking about removing all the analog sensing in favour of using voltage and current sensors with digital outputs for the next revision. He reckons using a FPGA plus flash memory can replace a big chunk of the analog parts from the bill of materials. This would eliminate tolerance, drift and noise issues associated with the analog parts.

[Marcos] is also working on refining a reference design for a power interface board that includes gate drivers, power mosfets, DC link and differential voltage/current sensing. Design files for this interface board are available from his GitHub repo too. According to [Marcos], with better sensors and a beefier power stage, the same control board should work for motors in excess of 500 hp. Check out the video after the break showing the VESC-controller being put through its paces for an initial trial.

]]>
https://hackaday.com/2017/09/11/open-source-high-power-ev-motor-controller/feed/ 34 272334 VESC_02