2022-05-09 02:45 AM
Hello,
In Motor Pilot, I can run my motor at e.g. 100 rpm, my speed PID is tuned with a non-null integral term.
If I block the motor by hand, I can feel and see the torque reference increases to counter my blocking. Ok. But the torque reference never goes above 13887 s16A, and so the torque never increases enough to fully counter my blocking and move the motor again. The current drawn by my supply is then around 1.5A.
My motor is a 24V BLDC motor, 13.5A nominal current, with a 1024 PPR encoder as main sensor, I set the value 13.5A as nominal current in Motor Control Workbench GUI (5.Y.4). I use a IHM08M1 3-Sh control board with a Nucleo F401RE.
What is saturating the torque reference and how to rise this limit ?
2022-05-09 02:57 AM
Looking in the code generated by Motor Control Workbench I got to this in drive_parameter.h:
PID_Handle_t PIDSpeedHandle_M1 =
{
...
.hUpperOutputLimit = (int16_t)IQMAX, // <- This is 13887
.hLowerOutputLimit = -(int16_t)IQMAX,
...
};
What option in the GUI can tune this IQMAX ?
2022-05-09 03:15 AM
After experimenting, it seems that IQMAX is (approximately) proportional to the nominal current set in Motor Control Workbench.
However when I block the motor, the current drawn from my supply (1.5A) is much less than the nominal current I specified (13.5A)
If think there is a confusion in the GUI or in the code between the maximum current (that is not asked anywhere in the GUI) and the nominal current.
I'm unsure that setting the max current for the nominal current in the GUI is a good idea, I fear to burn my motor...
Or could the current measured be wrong ?
2022-05-09 06:28 AM
So make sure that the current measurement is working, try to verify with a DMM and a low-R resistor if necessary.
If the current is okay, you could just set the variables .hxxxOutputLimit as you see fit, though I would start increasing them with factor 1.5 max. each time.
2022-06-03 11:54 AM
From what I've determined, max_current in the gui (main page under MC Configuration) means absolutely nothing. Its not used anywhere else other than that display. It's more informational (see mc_configuration_registers.c:M1_ApplicationConfig_reg).
MAX_CURRENT is used in STO_PLL_M1 (mc_config.c) and that's based on your RSHUNT, AMPLIFICATION_GAIN and ADC_REFERENCE_VOLTAGE. Not use why IQMAX isn't taken from other parameters as it seems to be 2x my nominal motor current.
2022-06-14 12:42 AM
It seems that the MCSDK 5.Y.4 uses the "nominal current" as the max current (this make sense regarding safety)
The solution I implemented is to set the nominal current close to the max current supported by my motor (only drawn at start and for short-time duties) and monitor it so that the time spent at max current does not exceed the time specified by the manufacturer...