2025-09-22 12:33 AM - last edited on 2025-09-22 2:21 AM by Andrew Neil
Hello everyone,
I'm working on an application using a motor with a nominal speed of 1850 rpm and a nominal current of 4.1 A. The motor operates within a speed range of 300 to 800 rpm, and I'm looking to implement stable and efficient speed regulation.
I have already imported my project into MC Workbench and configured the following parameters:
Iq (Torque) Regulator:
Id (Flux) Regulator:
Thanks in advance for your feedback and suggestions!
2025-09-22 1:08 AM
My advice would be as a first step you should start running the motor in no load condition and reach the expected maximum speed.
For tuning of parameters, you can use the motor profiler. So, flashing the software and running the motor without any issues and check for proper sinusoidal currents will be first step.
2025-09-22 1:49 AM
Hello and thank you all for your help and feedback.
I’ve already profiled my motor using the Motor Profiler tool, and I’m able to run it in my application, currently without load. The motor operates within a speed range of 300 to 800 rpm.
I still need to make some adjustments to improve its responsiveness, especially during startup where I’m seeing position errors.
I plan to test the motor under load soon, but before that, I’d like to fully understand the configuration to ensure the motor reacts properly.
I’m considering increasing the maximum number of speed errors allowed before triggering a fault (currently set to 3) — could this be related to the startup issues I’m experiencing?
I’d also like to better understand the purpose of the following parameters in the Speed Regulator section of MC Workbench:
My questions:
Thanks in advance for your insights!
2025-09-22 2:18 AM
@Christophe65 wrote:I’m considering increasing the maximum number of speed errors allowed before triggering a fault (currently set to 3) — could this be related to the startup issues I’m experiencing?
Do not increase this, even if you increase there will not be much impact. If you are using your own custom board check for the Hall signals.
Yes this is the frequency at which speed loop is executed.
It is a default value the program considers before the actual speed value given by the speedrampmotor1
.MecSpeedRefUnitDefault = (int16_t)(DEFAULT_TARGET_SPEED_UNIT),
__weak void MC_ProgramSpeedRampMotor1(int16_t hFinalSpeed, uint16_t hDurationms)
{
MCI_ExecSpeedRamp(pMCI[M1], hFinalSpeed, hDurationms);
}
How to provide the Kp,Ki values is given in MCSDK documentation. The above is based on my knowledge.
2025-09-22 3:45 AM
Hello,
Thank you for your support so far. My system is starting to be stable when running without load, which is encouraging.
During my tests, I noticed that when I mechanically force the motor (for example, by braking or slightly blocking it), and then release it suddenly, a speed error is systematically triggered.
To investigate, I temporarily increased the number of allowed speed errors before triggering a fault to 100, but this had no effect on the behavior. I will lower this value back to 15, but I think the problem comes from somewhere else.
I would like to understand:
My motor is equipped with a magnetic brake that is active in only one direction. In the future, if the system works correctly to regulate and maintain a stable speed of the door when descending, we plan to remove this brake.
For now, I am continuing my tests, but I have the impression that the system behaves differently depending on the direction of rotation, even though the PID values are identical for opening and closing.
I would like to know:
Thank you in advance for your insights!
2025-09-22 3:59 AM
Try to plot the below variable in cube monitor and verify if it is going in opposite direction of the expected direction
hAvrMecSpeedUnit
For example, if it is in general +Ve but suddenly it goes -Ve during the fault condition, this i have observed in my setup, so check that is condition, i am not sure what you are getting is the same scenario.