cancel
Showing results for 
Search instead for 
Did you mean: 

Sensorless FOC control via MC Workbench

ccut93
Associate II

I recently purchased the FOC motor development kit, and am learning to use it to control BLDC motors.  Disclaimer: I am totally new to STM32 hardware, but I have experience developing with both Arduino and esp32 in C/C++.  Any good sources for getting started with this hardware to run BLDC motors would be much appreciated.

MCSDK 6.2.1

Control Board: B-G473E-ZEST1S

Power Board: STEval-LVLP01

Motor: MOONS BLDC R57BLB50L2

Problem: I am able to run my motor in Hall Sensor Speed sense mode, but am unable to run in any sensorless mode.  I am able to generate code with Workbench, compile and upload with cubeIDE.  I am able to connect with ST Motor Pilot using the MC_FOC_SDK GUI.  Hitting start/stop changes status from IDLE to RUN, but I get no motion from the motor.

I am thinking the problem may be in the current feedback.  I get erratic speed feedback (in the ranges of +-20k rpm).  I have tried selecting both the internal and external op-amps in MC Workbench with same results.

1 ACCEPTED SOLUTION

Accepted Solutions
ccut93
Associate II

OK, I've made some progress.  I found the HSO Startup guide, and tried working though that.  It helped me better understand how the control GUI is supposed to work.  In case others read this in the future, I use the MC_FOC_ZEST gui.  When you enable, it starts in observer mode, which is just monitoring speed.  To get something to spin, you have to enter one of the other modes, eg. profiler or closed loop speed.

I was still having major issues with it.  I was able to get the profiler to complete a profile, but the numbers are way off what I expect.  The spec sheet suggests Rs should be 0.66 Ohm, but the profiler comes out with a number close to 170 Ohms.  I check with a multimeter, it is clearly much closer to 1 Ohm.

After the profiling, I manually adjust Rs and Ls back to motor specs, and bring the Current Control Kp down from 2000's to 20.

After trial and error, I found settings that allow the motor to spin at low speed (<100 Hz) under sensor-less HSO.  I notice that under Closed Loop Speed Control, D-current and Q-current are barely registering (<0.02A), while the speed is maintaining 50 RPM with a significant load.

I was thinking there is an issue with the current detection.  I used an oscilloscope on TP11 on STEVAL-LVLP01 and measured 1v peak to peak. I believe this corresponds to a current of around 3 amps, which seems high for a no-load condition.  The motor also gets warm.

I modified the MC Workbench setup to use internal op-amps instead of external, and now I am getting current values close to what I expect.  The profiler now gives much closer to the spec sheet, and I am able to spin a motor.  Anyone have any idea why the external op-amps doesn't produce an accurate current measure?

I was then having issues starting from 0 speed.  I switched from RsDC Est (which did not work) to Polarizing Pulse, and it started up no issue.  I am unsure why RsDC didn't work, and may investigate this further.

View solution in original post

2 REPLIES 2
Gael A
ST Employee

Hello ccut93,

When running in sensorless, could you tell me if the MotorPilot returns any error ?
Also know that the High Speed Observer has a different GUI than the two others sensorless modes, you can find the start-up guide in the release note. Concerning classic FOC, you can take a look at the wiki.

Have you checked this post ? Maybe the solution lies there.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.
ccut93
Associate II

OK, I've made some progress.  I found the HSO Startup guide, and tried working though that.  It helped me better understand how the control GUI is supposed to work.  In case others read this in the future, I use the MC_FOC_ZEST gui.  When you enable, it starts in observer mode, which is just monitoring speed.  To get something to spin, you have to enter one of the other modes, eg. profiler or closed loop speed.

I was still having major issues with it.  I was able to get the profiler to complete a profile, but the numbers are way off what I expect.  The spec sheet suggests Rs should be 0.66 Ohm, but the profiler comes out with a number close to 170 Ohms.  I check with a multimeter, it is clearly much closer to 1 Ohm.

After the profiling, I manually adjust Rs and Ls back to motor specs, and bring the Current Control Kp down from 2000's to 20.

After trial and error, I found settings that allow the motor to spin at low speed (<100 Hz) under sensor-less HSO.  I notice that under Closed Loop Speed Control, D-current and Q-current are barely registering (<0.02A), while the speed is maintaining 50 RPM with a significant load.

I was thinking there is an issue with the current detection.  I used an oscilloscope on TP11 on STEVAL-LVLP01 and measured 1v peak to peak. I believe this corresponds to a current of around 3 amps, which seems high for a no-load condition.  The motor also gets warm.

I modified the MC Workbench setup to use internal op-amps instead of external, and now I am getting current values close to what I expect.  The profiler now gives much closer to the spec sheet, and I am able to spin a motor.  Anyone have any idea why the external op-amps doesn't produce an accurate current measure?

I was then having issues starting from 0 speed.  I switched from RsDC Est (which did not work) to Polarizing Pulse, and it started up no issue.  I am unsure why RsDC didn't work, and may investigate this further.