Smooth Arm Control

Hello

I am trying to find ways to smoothly control the arm of our robot. We are currently using the TalonSRX motion magic control mode, which works quite well for our elevator but only decently for the arm.

The problem is that our belts sometimes slip when we try to move the arm. We could just lower the motion magic acceleration, but the arm is already not moving that quickly.

Controlling the arm is quite bit more complicated than our elevator because the arm has a constant force gas spring on it (the elevator just has a constant force spring) and the torque changes depending on what angle it’s at and if a cube is in it. I was thinking some sort of custom position control that smoothly controls acceleration, from 0 to max Accel back to 0 then to -max Accel and back to 0, like a sine wave, so that velocity would look like a smooth cosine wave, like one big smooth bump.

Any other ideas? We could do a custom feedforward too, but I’m not sure how much time we will get to play around with it before our first competition. Does anyone who’s done a custom feedforward on an arm have any insights?

This sounds like a problem that might be easier to fix with hardware. If the belt is slipping, a larger pulley should probably be used on the arm. For software, you could map the output required to keep the arm stationary at each point along its motion and use that to create an equation that approximates the output for any given position. Then you can add that output to any input being applied to the arm. I should also note that the torque the motor applies to the arm is based on the current draw not the voltage/percent output. Limiting the max current draw programmatically might help.

Well if you want to try this, you’ll find all the equations you need plus Maxima script, console applet, and example plot here:

Win32 console applet
https://www.chiefdelphi.com/media/papers/download/4639

equations:
https://www.chiefdelphi.com/media/papers/download/4496

Example plot
https://www.chiefdelphi.com/media/papers/download/4296

Maxima script
https://www.chiefdelphi.com/media/papers/download/4297