cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with Tuning FOC in StevalESC001

Prof_McGonagall
Associate III

Hi, 
I am using StevalESC001 board and MCSDK latest version to implement FOC on a custom motor.  

I am facing a few issues while testing it with load. I am unaware of what might be the cause of these issues if anyone could direct me towards what might be happening it would be helpful. 

First of all, during the startup motor sometimes starts spinning in anticlockwise direction that too at a very high speed. This behavior is random, I haven't yet identified any pattern into it, and it becomes more frequent when testing with load. I also noticed that sometimes Iq value shown in motor pilot is -10A initial which seems wrong, shouldn't it be 0 initially?

Another issue is with the Actual RPM and the RPM shown in motor pilot, the RPM shown by motor pilot is 300 to 500 more as compared to actual RPM the motor is spinning at. The difference increases as we increase the throttle. Also, motor seems to reach its capacity at only half throttle. It is producing only 600 g of thrust when expected at full throttle is 1kg. It seems to saturate at a 50% throttle and above that there is no change in speed, torque or thrust. Iq fluctuations also increase a lot, and it constantly makes correction, so the motor spins also fluctuate. Overall behavior is very unstable after 500g of thrust and 50% throttle, even the motor pilot starts twitching. All these testing errors are happening when load is applied, otherwise the motor works fine. 
Also, after changing the throttle it is reflected pretty late in the motor. There is noticeable lag into execution. 
I have a hypothesis that there is some issue in Iq and Id calculations due to FOC parameters not being tuned but I am not sure how to tune them. Can someone help me with this?

12 REPLIES 12

Hello @GMA,

I think there was some misunderstanding regarding the speed range. What I meant to say was there was a constant speed difference between actual RPM of motor measured through an external device and the one shown by motor pilot.
for example - When the actual speed of motor was 950 rpm, motor pilot was showing it to be 1090 rpm. 

At 50% throttle motor reaches around 3000 rpm with 600 g of thrust. After that when we increase the throttle, rpm of motor and thrust stays the same. At this point when actual speed is around 3000 rpm, motor pilot shows it to be around 3700 rpm.

PS - These measurements are when motor was tested with load. Without load also there is some misalignment, but the speed difference is less maybe 50 to 100 rpm.

Hello @Prof_McGonagall,

A test performed using MCSDK 6.4.1, a modified STEVAL-ESC001V1 evaluation board (Rshunt changed from 0.01 Ω to 0.1 Ω to match the 1.6 A maximum current of the motor), and the Shinano motor available in Motor Control Workbench.
For a "speed reference" of 996 RPM, the average reported speed was 990 RPM, and the measured speed using a tachometer was 1001 RPM.
In your use case, what is the difference between the "speed reference" available on the pilot interface and the measured value?
Using the open-loop drive type (see the Open loop description and usage chapter in the MCSDK User manual documentation), verify that the tachymeter measurement aligns with the given speed.
You can tune the speed PI regulator, which is accessible dynamically from the Motor Pilot tool in the Advanced configuration section, Currents_Speed tab (see attachment).

 

 

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
Prof_McGonagall
Associate III

Hello @GMA,

Thank you for the clarification and for suggesting the comparison between speed reference, estimated speed, and measured speed.

Based on further observations on my setup, I noticed that the speed reference set in Motor Pilot and the estimated speed reported by Motor Pilot are closely aligned over a wide range. For example: 1572 RPM reference → ~1560 RPM estimated

Previously, I was comparing against an external RPM sensor which I now believe may not be sufficiently reliable, so I am arranging a proper tachometer for more accurate mechanical speed measurements. For the moment, it appears that from the controller’s perspective, speed reference tracking is reasonably consistent.

However, even with this apparent alignment, several issues persist when testing under load:

  1. Motor Pilot instability at higher RPMs
    At higher speeds, Motor Pilot begins to glitch (UI flickering / abnormal behavior), and in one instance it switched to an unexpected interface state. I am attaching a video to illustrate this behavior. It is unclear whether this is purely a UI issue or a symptom of instability in the control loop at higher speeds.

  2. Low thrust and poor efficiency
    The motor produces significantly less thrust than expected for the electrical power consumed. For example, I was expecting approximately 1 kg of thrust around ~150 W based on comparable setups, but in my case the system requires ~250–260 W to reach much lower thrust. The motor also heats up rapidly at higher RPMs, suggesting poor efficiency or sub-optimal torque production.

  3. Poor responsiveness to throttle changes
    The speed response to throttle commands is quite slow. When increasing or decreasing the throttle, the motor speed ramps up or down gradually with a noticeable delay, whereas the application requires a much faster response.

  4. Occasional reverse rotation at startup
    As mentioned in my original post, the motor sometimes starts spinning in the opposite (anticlockwise) direction at high speed during startup. This behavior is non-reproducible and occurs more frequently when load is applied.

I attempted adjusting PLL and speed regulator parameters, but this generally led to increased instability (for example, sudden speed drops at higher RPM) without noticeable improvement in thrust or efficiency.

I would appreciate any guidance, suggestions, or references you may have that could help address these behaviors or point me in the right direction for further investigation.

Thank you for your time and guidance.