Go Down

Topic: PID control of BLDC with heavy inertia load (Read 193 times) previous topic - next topic

mekanizumu

The PID output can be positive and negative, and all simple PID code i can find just uses the sign of the PID output to determine the motor direction like this:
If output >= 0
   dir = 1
else
   dir = -1

then set the direction of the motor.

But if the motor is spinning fast with heavy load, changing direction like this could damage the motor. So a possible solution is to apply electric braking to the motor till it slow down considerably, then apply the direction change.

However, this type of behavior is totally different from the standard PID control model, so it's like being out of tune with the PID theory, and I'm left in the dark to tune those parameters.

I can't find any resource talking about this issue. I wonder isn't this a big problem worth talking about?

PaulS

Quote
I wonder isn't this a big problem worth talking about?
Personally, I don't think so.

You have some undefined setpoint that you are trying to make some undefined system meet, using some undefined measurement to determine how close you are to the target.

Some specifics are really in order.

The only time you need to switch the direction is when the actual value has one sign and the setpoint has the other sign. The direction does NOT necessarily refer to the direction of rotation of the motor.

Suppose that the setpoint is 3000 RPM, and the measured value is 3020 RPM. The error value will be -20, but that does NOT mean spin the motor 20 RPM the other way. It means slowing the motor down a little bit. If the measured value is 2980 RPM, the error value will be +20, which means speeding the motor up a little bit.
The art of getting good answers lies in asking good questions.

mekanizumu

Thanks for your response.

My use case is robotic arm control.
I want to use position control on the joint angle.
So if the target is 45 degree, and the joint overshoots to 46 degree, then certainly the PID output would be negative and require an immediate direction change.

After some study, I learn that the I should tune the value of Kp so it doesn't overshoot in the first place.

Go Up