Recently one team approached me with a question along the lines of "How can we program our robot arm to better fight gravity?" The reason was, the drivers were having a difficult time controlling their arm with a joystick since it would go down very quickly and then take a long time to come back up.
To account for gravity all you have to do is set different motor speeds depending on the direction. Another simple thing to try is to add a velocity bias to your motor to hold the arm in place an compensate for the force of gravity. If you were writing code it would be a series of logical statements along the following lines:
// Arm moving down
if (joystickInput < 0)
// Arm moving up
else if (joystickInput > 0)
// Adding bias to fight gravity and hold the position
You can tune all these numbers depending on your robot and also try controls with and without the bias and this should be of great help to the drivers. You can also use this same method to have separate speeds to move up and down the current.
If you use Simulink, you could write this as MATLAB code or use saturation blocks to split the two different signal paths. I have attached a model that shows how to do this and you can also see the image below.
Hope this helps and best of luck on all events!
MATLAB and Simulink PASS Competitions Hub