2024-03-22 02:24 AM
Currently I am using FOC control on a PMSM.
How do I apply a holding torque to a motor so that I can lock the rotor.
Thanks
Solved! Go to Solution.
2024-03-27 01:24 AM
Hello RoyStevens,
Sorry for the misunderstanding, I will rephrase.
For such an application, the most straightforward and common way is to get in speed mode, and ask for a 0 speed. This works in most cases and the Speed gains must be modified in order to get a satisfactory behavior.
However, in your case, as you are using Hall sensors, the angle between steps is 30°, which is quite large and may explain the difficulty to reach max Torque. This is why I gave you some insights on how to eventually proceed next, though I've never done it and don't know if this will work. As I said, tinkering with gains is our go to.
Concerning STM32 ZeST, you need to contact your closest ST Sales Office in case you are interested. You can also try the HSO which is available for free in the MCSDK 6.2.1
2024-03-25 01:08 AM
Hello Roy Stevens,
If you want to block your motor, you can set speed at 0 and the motor will stop while still applying torque. Be aware that this will not work in classic sensorless implementation and requires either sensors or our STM32 ZeST algorithm.
2024-03-25 08:11 PM
Thanks for the reply @@Gael AA. I tried your suggestion and I do get some holding torque, but it is very minimal.
To summarize my application to help in answering my question I have the following.
28 Pole pair 40 V 20Amp PMSM motor with Halls. I have set proportional gain to 32767/64 and have no integral gain at this point. Max application Speed = 60rpm. I am using FOC
If I apply MC_ProgramSpeedRampMotor1(0,0) as you suggested stator current is about 0.4A which barely holds the rotor.
So, I thought this is where reference current can be used so I added the following
/* USER CODE BEGIN 0 */
qd_t Motor1qdCurrents ;
/* USER CODE END 0 */
/* USER CODE BEGIN 2 */
Motor1qdCurrents.q = 0;
Motor1qdCurrents.d = 3200; ( for about 2.0 Amp)
MC_SetCurrentReferenceMotor1(Motor1qdCurrents);
MC_ProgramSpeedRampMotor1(0,0);
/* USER CODE END 2 */
while (1)
{
MC_StartMotor1();
HAL_Delay(10000);
MC_StopMotor1();
HAL_Delay(10000);
}
There is no increase above the 0.4A in the stator current during the 10 sec on phase and I have also swapped the direct and quadrature currents and again there is no change. Either I am misinterpreting the use of the Current Reference function, or I am not applying it correctly. Your help on this is appreciated.
Roy
2024-03-26 03:03 AM
Hello,
For your idea to work you would need to switch to Open Loop Mode, otherwise the Iqdref gets overwritten by the Current Control Loop. However, the Open Loop Mode is not available for sensored configurations.
You can still increase your Torque Kp gain I guess, though I don't know if you will reach satisfying values doing that.
The thing is : between Hall sections your system doesn't really have a clue on where your rotor is located, so its hard to get a precise angle estimation and thus current in the right direction, this is why the system does not apply much torque : it doesn't realize someone is trying to force the rotor.
You could still write an application to apply full current on a position you believe to be the right one but this can't be done simply by using the mc_api we provide I think. On top of my head I would think of disabling the current control loop when reaching zero speed and then asking for an Iqdref to lock the motor. And then re-enabling the current control loop when the ref speed or the computed speed gets too high. Surely there's a better way to implement this, though it should work.
Have you considered our STM32 ZeST algorithm ? Because your feature is available with it.
2024-03-26 09:00 PM
Thanks for the detailed reply . I am surprised that Holding torque seems to be difficult for a sensored application.
I would have thought that many motor control applications would require this. On the STM website it states that "the ZeST algorithm is available for selected customers only". from that I assume it is not for general release.
Roy
2024-03-27 01:24 AM
Hello RoyStevens,
Sorry for the misunderstanding, I will rephrase.
For such an application, the most straightforward and common way is to get in speed mode, and ask for a 0 speed. This works in most cases and the Speed gains must be modified in order to get a satisfactory behavior.
However, in your case, as you are using Hall sensors, the angle between steps is 30°, which is quite large and may explain the difficulty to reach max Torque. This is why I gave you some insights on how to eventually proceed next, though I've never done it and don't know if this will work. As I said, tinkering with gains is our go to.
Concerning STM32 ZeST, you need to contact your closest ST Sales Office in case you are interested. You can also try the HSO which is available for free in the MCSDK 6.2.1