# Dynamics with error term

How do the dynamics of a system change when an error term is introduced? For instance, if I have a system (computed torque control - robot manipulator):

$$M\ddot{q} + C\dot{q} + G = u$$ and $$e = q-q_{ref}$$, where $$q_{ref}$$ is a time varying reference, how would this system be rewritten in terms of the error $$e$$?

I was thinking it would be:

$$M\ddot{e} + C\dot{e} + G = u$$

but then I would be missing terms $$-M\ddot{q_{ref}}$$ and $$-C\dot{q_{ref}}$$ correct?

I am confused on how tracking errors manifest in the system equation.

## 1 Answer

You are confusing the “robot + controller” with the robot itself. Every physical system has dynamic properties. As shown by your first equation, the dynamics are related to joint accelerations, velocities, and positions (embedded within the matrices). The desired state has nothing to do with how the physical system responds to its state variables. That is the job of the computed torque controller. The controller uses desired states, computes errors, and determines the torque/acceleration values to apply to the individual joints. But regardless of what the controller commands, the physical robot’s dynamics depend on its state and not on some computed, or desired, state.