I have a 3d physics simulation where I use a PID controller to reach a set orientation (orientation error drives a torque output). Which works well enough some cases, but in others it's not working as nicely as I would like - especially in the case of rapid rotation. I am still tuning however.
I'm not proficient in control theory, but I was thinking maybe perhaps that the controller is only ensuring the desired orientation is reached as a constraint, but not what the angular velocity should be when it gets there - ideally zero in most situations.
So I was wondering if it made sense to somehow combine a second PID controller that uses angular velocity rather than orientation mismatch as the error. I'm not sure if this makes sense, and if so if it should just output another torque that is summed with the torque of the other PID? Or if it's more complicated than that? Or if it would be duplicating the work of the first PID anyway?
I think I would want the angular velocity closer to zero, the more closer the orientation error is to zero - so I am not sure if any kind of scaling to do that makes sense? I can imagine that would then become a balancing act between the two PID's coefficients to determine how fast it can correct vs stability when stopping (But then that kind of sounds like what the first PID would be doing anyway!?).
Also in general I am not sure of the correct way to combine multiple PID controllers that are trying to balance concerns like that.