Showing results for 
Search instead for 
Did you mean: 

motor open loop/closed loop control


hello everybody:

    l'm currently debugging the FOC motor with MC Workbench.the development board model used is NUCLEO-G431RB and X-NUCLEO-IHM16M1.Now l have achieved closed-loop control of the motor through the encoder.

Now l need to test the open-loop control motor,l have the following questions to consult:

1、l opened the open loop control,but after comparing the project found that there is no open loop control part of the code,l want to ask whether the open loop function is supported.If so,how do l configure it.

2、When l set the main sensor to observer+PLL and the auxiliary sensor to none,can l use it as an open loop by setting the sensorless start-up parameters?My target speed is 600rpm.

3、Can the main sensor be set to observer+PLL and the auxiliary sensor be set to encoder to do open-loop control before the encoder closes the loop.



Gael A
ST Employee

Hello leo5,

It seems like you are mixing two things.

When starting a motor in sensorless, the start-up will always be done using an open-loop ramp-up, which you can tune in the window you showed in the second picture. This is done whether OpenLoop is checked or not.

The Open Loop checkbox in the Debug Settings allows you to control your motor using only your reference voltage or reference current, it's functional description can be found here : Open Workbench -> Click on About -> Documentations -> Documentation -> In the newly opened window, click User Manual -> Open loop description and usage.
It is useful for debugging and checking if your returned values are correct.

Unfortunately, despite being available via WorkBench, Open Loop + Sensor configurations are not supported by the MCSDK. This will be fixed in a future MCSDK version.

Concerning your last question, there will indeed be an open loop start-up, but when switching on closed loop, the encoder won't take over the sensorless, and will stay as a comparing value for STOPLL / Cordic.

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

Hope this will help,
Gaël A.

hello Gael A:

    thank you very much for your reply.Here's what l need:the user sets the target speed controlled by the open loop through the upper computer.communicates through the serial port.For open loop control this function,l have a few questions.

1、I'v looked up open loop control through documentations.How to achieve open loop control in V/F mode,by the OL Calc() function? If there is a use case for open-loop control,can you provide them.

2、If l want to do the open loop / closed loop switching function.I wonder if l can do that:the closed-loop control program with encoder is generated by MC Workbench,and the the open-loop control program is added by myself,and two modes are switched by the instructions of the upper computer.