Showing results for 
Search instead for 
Did you mean: 

Sensorless FOC speed feedback error and extremely poor starting torque



I've attempted to follow the suggested post template:

[VERSION]: 6.3.0
[TOOL]: Firmware / MC WB
[DETAILS]: FOC failed startup with speed feedback error / extremely poor starting torque
[EXPECTED BEHAVIOR]: Motor starts with reduced torque due to sensorless startup, but some at least
[HOW TO REPRODUCE]: Profile motor with Motor Profiler, generate basic FOC firmware, attempt to start motor with Motor Pilot.

I've been prototyping with a b-g431b-esc1 and a large hobbyist BLDC motor (Kontronik PYRO-380 -, as requested by my customer).

I've a reasonable amount of experience using ST software tools. I primarily write automotive communications and data logging software....although motor control isn't my day-to-day.

Have profiled the motor with motor profiler, which went well. Saved the profile, generated a FOC project and flashed the controller without issue.

The parameters generated by motor profiler don't entirely match what I've measured / been able to take from the datasheet. Have tried both the motor profiler measured parameters and my manually measured ones without success.

Attempted to follow the ST youtube video series.

Checked the current controller tuning as best I could. I don't have access to a current probe, so trusted the high frequency async plot of I_Q_MEAS, which appeared to track the request well and responded to me changing the PI parameters. The auto-generated constants appeared to produce sharp edges. The b-g431b-esc1 doesn't have a DAC output available, although it looks like one may be reachable by desoldering a resistor or two from the BEMF input.

Have looked at the Observer PLL signals as described next in the video series, which appear as nice clean sine waves when the motor is running.

So far the auto-generated parameters appear to be working well.

Getting the motor running has been my main challenge. I started with an initial 2000ms alignment phase as suggested by the youtube video series. Followed by a 1000ms rev up to 500rpm using 50% and later 100% of the current I believe will be typical. My customer's been experimenting with an open-source controller which typically uses 8A. Although I believe this was measured from their bench supply, which I'm lead to believe will be lower than the phase current.

If/when I can get it to start torque control mode appears to work well. I'm able to apply a load to the motor....via a thumb based fiction brake.

Speed control mode however, when given a reasonable set point of say 2000rpm, accelerates the motor rapidly until a speed feedback error is generated and it's shutdown. I'm expecting that the speed PI parameters may need some manual adjustment. I managed to manually tune them at one point to have the motor extremely responsive while running without a load. However upon startup it would still behave the same, accelerating until it triggers a speed feedback error.

I've tried increasing / decreasing the "start-up speed threshold", as well as "consecutive correct measures". I've tried longer / shorter rev-up ramps. With high and low currents. I've also tried widening the speed band tolerance values without success. Everything I've seen suggested by motor pilot / the youtube series / other posts on the forum / the limited documentation.

When the motor does start, it has to be completely undisturbed. Even resting a thumb on it during rev-up will cause it to fail. It appears to be starting with virtually no torque available. It's destined to drive a pump, so will need to start under some but not full load.

From what I read, the 28mOhm winding resistance and approx 4uH (as measured by me with a signal generator and oscilloscope) will act as a near dead short at startup, leading the current limit being reached extremely quickly and no real power being delivered to the motor. I'm not sure if 4uH is a reasonable inductance for the 800w rated motor, but it's in the ballpark of measurements I've found for other drone motors.

I've attempted to increase the current, all the way to the board limit of 40A with no real change in startup performance.

A typical startup is the alignment phase, followed by a few rotations, taking far less time than set in rev-up table, followed by a speed feedback error.

We've got hardware laid out and on order based on the ESC design, but at present I'm all out of ideas of how to get the software side of things working (I hope I haven't put too much faith in the auto-generated code).

I've attached my motor bench project for reference (with an added .txt extension for anti-virus purposes).

I'd appreciate any advice on what I might change / where I might look / what I might try next.