PID output on unmoving axis causes motor overheat

More
14 Jun 2014 17:09 #47965 by kostas
On a friend's mill that I made the hal configuration I see something I don't understand and we have motor overheat on W axis. This axis is the mill's table up/down movement and moves only for tool changes.

This is the output for the pins of W axis pid which has the problem, as well as Y axis which does not. On all other axes except W, the motors are cold. LinuxCNC is version 2.5.4
root@emc2:/home/george/linuxcnc/configs/5i22# halcmd show pin pid_Y
Component Pins:
Owner   Type  Dir         Value  Name
    13  float I/O             2  pid_Y.Dgain
    13  float I/O             0  pid_Y.FF0
    13  float I/O             0  pid_Y.FF1
    13  float I/O             0  pid_Y.FF2
    13  float I/O             2000  pid_Y.Igain
    13  float I/O             200  pid_Y.Pgain
    13  float I/O             0  pid_Y.bias
    13  float IN       -164.415  pid_Y.command <== Ypos
    13  float IN              0  pid_Y.command-deriv
    13  float I/O        0.0025  pid_Y.deadband
    13  bit   IN           TRUE  pid_Y.enable <== Yenable
    13  float OUT  -2.684064e-08  pid_Y.error
    13  bit   IN          FALSE  pid_Y.error-previous-target
    13  float IN       -164.415  pid_Y.feedback <== Ypos-fb
    13  float IN              0  pid_Y.feedback-deriv
    13  bit   IN          FALSE  pid_Y.index-enable
    13  float I/O             0  pid_Y.maxcmdD
    13  float I/O             0  pid_Y.maxcmdDD
    13  float I/O             0  pid_Y.maxerror
    13  float I/O             0  pid_Y.maxerrorD
    13  float I/O             0  pid_Y.maxerrorI
    13  float I/O            98  pid_Y.maxoutput
    13  float OUT     -5.258017  pid_Y.output ==> Yvel-cmd
    13  bit   OUT         FALSE  pid_Y.saturated
    13  s32   OUT             0  pid_Y.saturated-count
    13  float OUT             0  pid_Y.saturated-s

root@emc2:/home/george/linuxcnc/configs/5i22# halcmd show pin pid_W
Component Pins:
Owner   Type  Dir         Value  Name
    13  float I/O             1  pid_W.Dgain
    13  float I/O             0  pid_W.FF0
    13  float I/O             0  pid_W.FF1
    13  float I/O             0  pid_W.FF2
    13  float I/O          2000  pid_W.Igain
    13  float I/O           200  pid_W.Pgain
    13  float I/O             0  pid_W.bias
    13  float IN         166.75  pid_W.command <== Wpos
    13  float IN              0  pid_W.command-deriv
    13  float I/O         0.005  pid_W.deadband
    13  bit   IN           TRUE  pid_W.enable <== Wenable
    13  float OUT  -3.815899e-10  pid_W.error
    13  bit   IN          FALSE  pid_W.error-previous-target
    13  float IN         166.75  pid_W.feedback <== Wpos-fb
    13  float IN              0  pid_W.feedback-deriv
    13  bit   IN          FALSE  pid_W.index-enable
    13  float I/O             0  pid_W.maxcmdD
    13  float I/O             0  pid_W.maxcmdDD
    13  float I/O             0  pid_W.maxerror
    13  float I/O             0  pid_W.maxerrorD
    13  float I/O             0  pid_W.maxerrorI
    13  float I/O            98  pid_W.maxoutput
    13  float OUT     -12.86483  pid_W.output ==> Wvel-cmd
    13  bit   OUT         FALSE  pid_W.saturated
    13  s32   OUT             0  pid_W.saturated-count
    13  float OUT              0  pid_W.saturated-s

These values are with both axes on standstill. Till now I thought that the output of pid would be zero if the error was inside the deadband area.

Can someone explain why pid outputs a non-zero value with such a small error, as well as why the W's output is so great?

Please Log in or Create an account to join the conversation.

More
14 Jun 2014 21:11 #47966 by PCW
Thats strange unless its oscillating
(so perhaps large D or I terms)
can you plot the PID output?

Please Log in or Create an account to join the conversation.

More
14 Jun 2014 23:19 #47967 by kostas
Here are the screenshots. The first is after a small W motion and the second after some seconds where I can see no observable activity.
Attachments:

Please Log in or Create an account to join the conversation.

More
15 Jun 2014 00:02 #47968 by PCW
Is there a static load on the W axis?

Your tuning make its seem that these are torque mode drives so a fairly large torque
output when idle is possible.


What it looks like is happening is this:

Integral term builds up to a large enough torque to overcome static friction
and pull the motor to within the deadband. Once in the deadband, the integral term is frozen
so the PID output stays at the last torque setting, which is not enough to actually move the motor
but enough to cause an eventual overheat. This may be related to high static friction or a static load on W


Also your PID output of 12/98 is only about 1/8 full torque so I would not expect this to cause
overheating, this shoud probably be looked into also

Please Log in or Create an account to join the conversation.

More
15 Jun 2014 00:32 #47969 by kostas
Yes, this is the mill's table so it has a constant load which is the table.
These are DC motors driven with pwm by a 7i29.

So, the non-zero pid output value inside the deadband is normal, as I can see with my own small cnc router. Any way we can overcome this? What's the reason that the pid component keeps the last output setting?

We could change the motor with one of the other axis to see if the overheat is some electrical issue with the motor.

Please Log in or Create an account to join the conversation.

More
15 Jun 2014 01:07 #47970 by PCW
OK so this is a bare HBridge (7I29) which is somewhere between a torque mode and velocity mode
so the motor current may be more that 1/8 max (the motor voltage is 1/8 of full scale)

Integral term is tricky to deal with since if you simply clear it when static you will cause relaxation
oscillations if there is a static load.

I guess the first thing I would try is reducing the deadzone and adding FF1 so the you
dont built up a large integral term when moving

Please Log in or Create an account to join the conversation.

More
15 Jun 2014 02:28 #47971 by Todd Zuercher
You might want (need) to add some kind of counterbalance to lessen the static load on the motor.

Please Log in or Create an account to join the conversation.

More
15 Jun 2014 18:35 #47986 by kostas
I tried the deadzone reduction and the FF1 addition, as well as increasing P and reducing I. Nothing changes. Deadzone reduction was not much, since the linear scale is 0.005mm so in smaller values pid hunts the position. But for better tuning I have to be near the machine which is not the case now. I'm using ssh to change values with the operator on guard to stop the machine if anything starts oscillating :)

But we also tried using the motor's encoders instead of the linear encoder and this had a big influence on the pid's static output, with values in the range of 1 to 2 or something. We left it with this configuration till we have more ideas. This has also influenced the machine's precision obviously, which is bad. This is strange though, because nothing changed in the static load which seams to be the problem.

The machine's owner was already thinking of adding counterbalance, as Todd suggests. He's already searching for cheap metal to do it, since the machine's table must be something about 200-250Kg. Not the most economic addition to the machine!

Please Log in or Create an account to join the conversation.

More
15 Jun 2014 20:29 #47989 by PCW
As far as precision goes you might consider a dual feedback system with the motor encoder is used for proportional and derivative terms and the scale used for the integral term.

FF1 should be tuned (with I=0) for minimal following error during a constant medium speed move.

Too much FF1 will cause the actual position to lead the commanded position, too little FF1 will cause the actual position to lag the commanded position.

After FF1 is tuned you can tune I (use about 1/2 the amount where oscillations start)

Is there possibly a lubrication issue on W? This behavior does sound a bit like fairly severe stiction

Please Log in or Create an account to join the conversation.

More
16 Jun 2014 03:34 #47992 by kostas
I've never heard of this kind of dual feeback before. Can you give an example? These will be two pid outputs added together?

I will try again to tune with this method you describe and see what I can do. I will also tell my friend to look for lubrication issues.

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum