Skip to content

Releases: uLipe/espFoC

Release: Design improvements and some fixes!

18 Jun 00:10

Choose a tag to compare

This release brings internal design changes such as the split the foc core loop into multiple controllers they are: current mode sensored, current mode sensorless (still in WIP), and voltage mode, this allowed to gain some performance by the reduction of if chains. Also espFoC is now being placed entirely in IRAM to avoid problems when the ESP32 cache is disabled. The current mode control pipeline now uses the traditional FoC strategy, PWM interrupt triggers the ADC, on its completion, it performs the high speed loop.

What is new:

  • FoC core operation now split into separated controllers;
  • espFoC now is linked into the IRAM;
  • FoC processing now split into high speed that runs into ISR and low speed loop that runs into a high priority task;
  • Angle extrapolation algorithm added to allow usage of low resolution / slow rotor position sensors;
  • Current sensor driver interface now features callback registration when ADC samples are ready;

Fixes:

  • Calibration sensor not being done even when enabling torque controller;
  • Current sensor's ADC DIGI callback misses on high speed sample rate;
  • Current sensor's ADC DIGI auto flush not being done;

Release: New inverter driver and set of fixes

05 Mar 20:16

Choose a tag to compare

This release brings a new inverter driver option, the MCPWM based, is the default inverter driver, and it makes the espFoC effectively supported for ESP32P4 targets. The LEDC based driver will be kept as backward compatibility, please noticed that all examples are now moved to this new driver.

Also now the FoC Core Engine has been moved to the Inverter ISR, making it in sync to the PWM rate and simplifying the math as well lowering the jitter, as a result all the FoC operations are derived from the same sample rate base.

What is new:

  • 3-PWM Inverter driver based on MCPWM with center aligned support;
  • Port layer modifications to make espFoC supported on esp32p4 (still experimental);
  • FoC Core Engine moved to the Inverter Interrupt Service Routine;
  • AS5600 sensor has now its own thread making its API interrupt safe;
  • Alignment algorithm based on Voltage D application to the motor;
  • Open loop example now uses the Space Vector PWM recently corrected;

Fixes:

  • Open Loop rotor sensor numerical stability fixed;
  • Space Vector PWM modulation bias fixed;
  • Speed estimator negative delta time fixed;
  • Cleanup of the espFoC axis object removing now unused fields;
  • Build errors on the os_interface when building for esp32p4;

Release: More stabillity to the FoC core plus SVPWM modulation

26 Feb 05:37

Choose a tag to compare

This relase brings more stabillity to the FoC core, adding proper bias and voltage normalization.

What is new:

  • Fix Sine PWM modulation bias and voltage normalization
  • Introduce the Space Vector PWM modulation, disabled by default;
  • Selection of modulation type via KConfig (Disabling Sine PWM will enable SVPWM instead);
  • Added voltage limit checking to avoid saturation;
  • Validation current waveforms now being sine.

Release: Extra performance tune

25 Feb 15:42

Choose a tag to compare

This Release brings some extra performance tunning to take avantage of the esp32 chips, it also prepares the path for the debut of espFoC on ESP32P4.

What is new:

  • New sine and cosine based on table, which is super fast compared to approximation and c-library implementation;
  • Make the fpu enter/exit sections pair noop when compiling for non-Xtensa chips;
  • Add the isensor 3-phase current sensor driver using the adc-continuous;
  • Removes the need of angle normalization loop when using fast math from espFoC;

Release: Bug fixes and stabillity improvement

24 Feb 15:42

Choose a tag to compare

This release brings some important bugfixes and also integration to the ESP-IDF component infrastructure.

What is new:

  • CP0 (FPU) save and restore procedure fix to avoid potential crash when saving FPU registers for both cores;
  • Encoder task now runs independently and fast as possible to increase the rotor angle calculation robustness;
  • Added enable and disable functions to the inverter interface;
  • Saturate the arguments and clip them into 80% of maximum voltage link to avoid SVPWM degratation;
  • Updated all the samples.

Initial beta release

08 Mar 18:17

Choose a tag to compare

Features:

  • Added position control closed-loop
  • Added speed control closed-loop
  • Field weakening feature for higher speeds;
  • Sensor loop and control loop sync with PWM rate and cycle;

Limitations:

  • Only FP precision is supported;
  • No torque control loop;
  • No 6-pwm inverter driver yet;
  • FoC Engine rate limited to 20KHz.