Resilience of Motors using PID

Hi teams,

We’re thinking of using PID to hold our shooter angle using a PG71 gearmotor. Our shooter requires 6Nm of torque to be held up and the PG71 is capable of approximately 22Nm.

Using a PID loop, will the motor draw stall current as it’s holding an angle or will it only draw current required to move 6Nm? Is this a reliable way to run the motor?

If you are trying to use power to the motor to hold a position, you’ll have a cloud of smoke and no more motor. The best thing that I could think to do is to use the brake function on your motor controller to keep the motor from turning while it is stopped.

Good luck!

This is the kind of problem I wrote the motor calculator for.

See attached PDF. To hold 6Nm at zero RPM will take about 3.3 volts. The motor will be generating about 20 watts of waste heat at that operating point.

To get some idea of what this means, the motor is generating 21 watts of waste heat when it is running at 12 volts at maximum efficiency. Of course, at that operating point the motor’s internal fan is spinning quite fast and cooling the motor’s innards.

If you stall the PG71 at 12 volts, the waste heat is 264 watts. So your scenario is generating only 7.5% of that.

Bottom line, I don’t think it will smoke immediately. How long do you intend to hold it like that? Could you add some surgical tubing to relieve some of the load?
*
*

pg71.pdf (31.1 KB)


pg71.pdf (31.1 KB)

We’ll hold the position momentarily for shooting, but when we don’t need to hold an angle, the motor will rest on a hard stop.

Another thing you can do to reduce the waste heat in the motor is to make your software smarter.

The PG71 is a gearmotor, which means there’s a potentially usable amount of friction. You want that friction to help you hold the position. So if you could figure out a way to back off the motor command just a bit once you’re at the desired position, and let the friction take some of the load, you’d reduce the heat generated in the motor.
*
*

Of course, the brake function on the motor controller will have absolutely no effect upon a motor that is not moving. If you want to know why this is true, PM me.

Many teams will use some kind of mechanical brake or locking mechanism, or gear their motor down so that it won’t move unless the motor moves it. But having it stalled for 10 seconds every 30, for 3 minutes, shouldn’t smoke it. Have spares in case it does, though…

(I cannot speak for the KoP motors, but some window lifter motors have an internal thermal circuit breaker that will cut power to prevent overheating)

The rated torque for the PG71 gearmotor is 1.5Nm. Manufacturers’ rated figures are usually those that the motor can handle continuously, and are therefore much lower than the peak figures. They are what the motor could be run at all day long without overheating.

The 6Nm that you’ve calculated is needed to support this shooter is 4 times the rated torque, so the motor will definitely heat up:(. The question is how long will it take the motor to get to an unacceptable temperature. A clue to the answer is the relatively short thermal time constant that this motor will have - it is a small motor. The brush and armature assembly will also be small, and these are the parts that will heat up and fry. Small means they will heat up fast.

As others have said above, the motor is stationary in this application with no circulating air cooling, the rated torque under these conditions will be even lower than the manufacturer’s quoted figure of 1.5Nm.

The other thing to consider is the dynamic loading (as the robot bobs up and down and accelerates) that will be present and must be added to your calculated 6Nm figure. Plus there is friction in the gearbox and shooter pivot mechanism. Plus there is the reaction force from the ball being ejected from the shooter. All up, the motor could be seeing double the static torque.

My guess is that it will work, but only for a limited time, then it will fry and go open circuit.

Graham.

I was assuming that they would be applying a constant voltage to the motor to keep it at a constant position for a while. You know what assuming does, :rolleyes: From what I’ve been told, the brake function of a motor controller shorts out the leads of the motor to take advantage of the motor’s magnetism in order to hold the motor’s position.

A motor thats moving generates a current. In brake mode(you are correct) the controller shorts the leads of the motor, allowing the current generated by the motor to flow backwards back into that motor … driving it the opposite direction and slowing the motor.

A motor thats not turning generates no current, and thus cannot stop (or hold in place) the motor.

As usual, Ether is wise and full of knowy goodness. Achieving “neutral buoyancy” through the use of surgical tubing, springs, spring steel, or some other deformation is a great way to assist your motors so that they act more effectively, more efficiently, and more robustly.

The KoP Window Motors have locking pins, defeating the purpose of stalling it.

Original Poster: Building on what I said above, I would recommend replacing the PG71 with a window motor. The window motors have a similar power, RPM and torque output to the gear motor, along with locking pins, which essentially means that the shaft won’t spin unless electrons are applied to the window motor. That sounds like what you are looking for.

Since you will want to use the locking pins, you can’t use the motor with a Jaguar. Spike or Victor only.

Data from FRC motor data table "MotorInfo4.1.pdf" as of 1/18/2012 12:30pm

**am-0914 (PG71)** MotorInfo4.1.pdf [spec Option #3] @ 12.00 volts:


@ stall:
   oz-in      Nm     rpm    rpm%    amps   watts out    watts in    eff%
  **3101.0**  21.898       0     0.0    22.0         0.0       264.0     0.0

@ max power:
   oz-in      Nm     rpm    rpm%    amps   watts out    watts in    eff%
  1550.5  10.949      42    50.0    11.3        **48.2**       135.6    35.5



**DensoL 262100-3040** @ 12.00 volts:


@ stall:
   oz-in      Nm     rpm    rpm%    amps   watts out    watts in    eff%
  **1501.1**  10.600       0     0.0    21.0         0.0       252.0     0.0

@ max power:
   oz-in      Nm     rpm    rpm%    amps   watts out    watts in    eff%
   750.5   5.300      42    50.0    11.4        **23.3**       136.8    17.0

I tend to use the term similar lightly. A window motor should do the job though. Also, since there are left and right hand motors you could gang to of them together doubling the output. You may or may not have to account for the different power levels for left and right hands.

You need to be very careful ganging window motors if you leave the locking pins in.

You may want to consider using the Current Mode control of a CAN enabled Jaguar. This will create less waste heat in your motor, assuming you properly tune the PID parameters.

I’m using the parameters found here, please let me know if I’m looking at the wrong motor.

You should expect to use about 6 amps to develop 6 Nm with this motor. It uses 22 Amps to generate 22.5 Nm at stall, so a rough pass is 6 Nm * ((22 A) / (22.5Nm)) = ~6Amps. The no-load current (which is really just another word “the sum of the parasitic torques in the system”) is small enough that I’m willing to ignore it for the time being.

With a “perfect” motor controller, you will apply a perfectly flat 6 amps. The motor’s resistance is roughly half an ohm, so your best case is (6 A)^2 * .5 ohms = 18 Watts.

Any imperfections in the motor controller will cause that current to oscillate a bit and become less efficient. For example, lets take one that applies 12 Amps half the time, and 0 amps the other half. Then our heating becomes (12 A) ^2 * .5 ohms * .5 duty = 36 Watts.

Worst case scenario, we’d expect something approaching stall current: (22 A)^2 * .5 ohms * (6/22) duty cycle = 66 Watts. This is 3.6 times the heat output!

The “flatness” of the current is a function of the ratio of the time constants of the motor and the motor controller. The faster the controller is, with respect to the motor, the flatter the current waveform. The flatter the current waveform, the more efficient the use of that current.

I don’t know what the time constant of this particular motor is, so I can not calculate where victors and jaguars fall on the continuum. However, the Jaguar’s time constant is over a 100 times faster.

Note that for this, I’ve assumed that the mechanical time constants are WAY slower than all of the electrical time constants. As long as you don’t see any twitching, this is likely a safe assumption.

Ether helpfully pointed out that the first sentence of my previous post makes a few too many leaps. The remainder of the post supports only that higher frequency motor controllers produce less waste heat. This in turn is based on the premise that torque is proportional the algebraic mean of current, but power is proportional to the geometric mean.

The comment on using Current Mode was unsupported, so let me take a whack at that now. If a PID is not well tuned, it can oscillate. These oscillations can create efficiency losses just like having a low frequency motor controller can. A pathologically mis-tuned loop can have efficiency as bad as a Victor.

Using CAN allows the Jaguar to do the PID itself, and runs at 1kHz. Running the PID on the cRIO introduces some communication time, so the loop runs a bit slower.

Using current mode removes several variables from the equations, and makes the effective loop quicker: The loop isn’t waiting on anything mechanical, and can therefore respond on an electrical time line.

It is quite possible to achieve the same stability with other control modes, I just find it easier in current mode generally. For your application, CAN Position Mode might be easiest.

Fixed. And the last statement isn’t entirely accurate.

@ prgramerdude: Please elaborate.
*
*

The ideal motor equations don’t always hold up in the real world. Every motor in the FRC context has some internal friction that opposes rotation. Thus, while a non-spinning motor may be able to prevent another from moving in certain cases, it could also have enough friction, and thus torque, to prevent another motor from moving.

High gearing stages on said non-moving motor would amplify this effect (Have you ever tried spinning a CIM connected to a tough box via the tough box output shaft?). If the motor happens to be non-moving, like it was stated in the original post, then the static friction from such a motor could prevent movement. It also could easily slow down a running motor, even with open leads, although the how-much depends on context.

Although, I do agree with the original’s rough intent: the back-EMF from a motor shorting into itself DOES NOT apply to a non-moving motor (no EMF overall), and so brake/coast mode does not apply. The “motor”, though, isn’t just an electrical energy transducer.

*The context of the sentence to which you were responding was about motor-generated current, so it wasn’t clear you were referring to friction instead.

Ok, so let’s talk about friction.

Take a toughbox with CIM attached. With the motor leads unshorted, measure the breakaway torque with an appropriately-sized torque wrench. Now short the leads and repeat the same test.

If you see any difference, it’s probably due to cogging torque in the motor, not motor friction. The lion’s share of the friction is in the gearbox, not the motor.

Your conclusion is correct though. A motor with high cogging torque, connected to a high-ratio gearbox, may be capable of supporting a static load.
*
*