cancel
Showing results for 
Search instead for 
Did you mean: 

Sensorless FOC – Backward Motion on Startup (Need Help with IPD Integration)

Mani2
Associate II

Hello Everyone,

I’m using sensorless FOC to control a BLDC motor with 3-shunt current sensing for closed-loop control. At startup, the motor slightly moves backward before starting to rotate in the correct (forward) direction. I understand this is likely due to the lack of initial rotor position information. There are no position or speed sensors involved—everything is handled via FOC and current feedback.

I verified that 6-step control on the same hardware supports Initial Position Detection (IPD), although I haven’t tested it yet. That said, I am not switching to 6-step control. I want to stay with FOC and retain the 3-shunt topology for current sensing in closed-loop mode.

My questions:

  1. Is there a way to prevent this backward motion using FOC only?

  2. If IPD is the only viable solution, how can I integrate IPD into the FOC framework, using my current hardware setup (STM32F401RE + 3-shunt topology)?

  3. Can I reuse the 6-step IPD logic just for startup, and then transition into FOC with 3-shunt current sensing?

Any guidance, suggestions, or example implementations to help integrate IPD with FOC would be greatly appreciated.

Thank you!

Best Regards,
Manikanta

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Mani2,

As you mentioned in your attached snapshot: "HSO requires at least 2 ADCs to sense both currents and voltages".
In this same HSO Overview chapter, a figure "Three-shunt topology hardware architecture" shows the needed Phases Voltage ADC topology that is not available on IHM16 HW topology. Only Current via R shunt is available.
HSO is only available on STEVAL-PTOOL4A inverter and B-G473E-ZEST1S/STEVAL-LVLP01 for the moment.

Hardware IHM16 topologies are different for 6-step IPD and FOC. Generating projects for both modes you will have a list of hardware modifications to be done.

We do not plan to adapt this IPD feature for FOC. IPD description is available "Initial Position Detection" chapter of User Manual "six-step Firmware Algorithm" part.

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

View solution in original post

5 REPLIES 5
GMA
ST Employee

Hello @Mani2,

1. You can use an Encoder with absolute position Motor or HALL sensor motor.
2. You can also use HSO algorithm capable board (like STEVAL-PTOOL4A inverter or B-G473E-ZEST1S/STEVAL-LVLP01 combo) that provides PolPulse feature to detect initial motor position. Refer to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>"User manual" tab, "Speed & position feedback sensorless algorithms" link, "4. High Sensitivity Observer (HSO)" chapter.
3. It is not possible to swap dynamically from 6-Step to FOC Sensor less modes.

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

Hi @GMA,

Thank you for the response.

I’d like to clarify that I’m planning to go sensorless only, and I’m already committed to using the STM32F401RE MCU. I’ve checked that this hardware does not support HSO in the STM32 Motor Control Workbench, which is why I’m exploring other options.

Mani2_1-1752833705664.png

Specifically, I want to reuse or adapt the 6-step IPD logic just for startup, with necessary modifications to make it compatible with FOC. I’m not planning to switch between 6-step and FOC modes dynamically — the goal is to keep everything within the FOC framework, using the existing 3-shunt hardware setup.

If there's any guidance or example on how to implement IPD purely for startup before switching into FOC with this hardware, that would be very helpful.

Thank you.

Best Regards,
Manikanta

 

Hello @Mani2,

HSO is only available on mentioned boards.
6-Step IPD feature is based on HW topology (BEMF measurement / Single Shunt current measurement, refer to documentation available through "Workbench tool">About>Documentations>Documentation>"User manual" tab "Six-step Firmware Algorithm" link), that is not compatible with FOC Sensorless HW topology.

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

 

Hi @GMA,
Thank you for the clarification.

However, I’ve attached a screenshot from STM32 Motor Control Workbench, where the HSO speed sensing option is disabled for my STM32F401RE project. The tooltip mentions that HSO is only available when current sensing is done using two or three ADCs and when Phase Voltage Sensing is supported. Since STM32F401RE has only one ADC, and my setup doesn’t support Phase Voltage Sensing, HSO is not available with my hardware configuration.

Since STM32F401RE only has one ADC, and my setup doesn't support phase voltage sensing out of the box, HSO is not available with this MCU and board configuration.

Mani2_0-1752845102350.png

Mani2_1-1752845137294.pngMani2_2-1752845197123.png

That’s why I’m looking for alternative solutions.

I want to know if there is a way to prevent the backward motion using FOC only, without using HSO or switching to 6-step mode.

I am using 3-shunt current sensing and would like to stay completely within the sensorless FOC control path. I understand that 6-step IPD logic is based on single-shunt current sensing and BEMF measurement, which is not directly compatible with 3-shunt FOC. But I am wondering:

  • Can we adapt or reuse the IPD logic (used in 6-step) just for rotor alignment during startup?

  • Then transition directly into FOC using the 3-shunt current sensing I already have configured?

I'm not looking to dynamically switch between 6-step and FOC — just to embed IPD logic into the FOC startup sequence if possible.

Any examples, documentation references, or guidance on implementing IPD-like rotor position detection inside the FOC startup, I’d really appreciate guidance or reference to documentation or examples that can help me implement this.

Thanks again for your support!

Hello @Mani2,

As you mentioned in your attached snapshot: "HSO requires at least 2 ADCs to sense both currents and voltages".
In this same HSO Overview chapter, a figure "Three-shunt topology hardware architecture" shows the needed Phases Voltage ADC topology that is not available on IHM16 HW topology. Only Current via R shunt is available.
HSO is only available on STEVAL-PTOOL4A inverter and B-G473E-ZEST1S/STEVAL-LVLP01 for the moment.

Hardware IHM16 topologies are different for 6-step IPD and FOC. Generating projects for both modes you will have a list of hardware modifications to be done.

We do not plan to adapt this IPD feature for FOC. IPD description is available "Initial Position Detection" chapter of User Manual "six-step Firmware Algorithm" part.

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