Holding an arm at any position

We are now writing a program to hold our arm at a certain position. However, use setpoint and error control in pid will make it remedy the position too fast, which lead to a direct damage in our Aluminum arm.
We are now coming to a solution which is to limit the lifting speed of the arm and add a plastic spring to release burden on the motor.
While repairing the arm, I’d like to know if this will work. Sincere thanks.
(Actually we are now facing big problems as there’re only 4 days before departure and our most important feature is still in progress. )

Have you considered using the PID control with a clamp so that it won’t apply too much voltage?
Something like:
m_motor.set(MathUtil.clamp(m_pid.calculate(m_encoder.getPosition(), m_setpoint), -0.2, 0.2)

Consider using a profiled pid controller. You can supply an acceleration and max velocity constraint which should help you avoid moving the arm too fast.

It sounds useful, I would try it today. Thx