[Robotics] Robot Motion Control
1. Introduction
Robot manipulators are intrinsically nonlinear, multivariable, and strongly coupled mechanical systems. Once a desired joint motion has been planned, the role of the motion controller is to determine the actuator commands — typically joint torques \(\boldsymbol{\tau} \in \mathbb{R}^n\) — that drive the actual joint configuration \(\mathbf{q}(t) \in \mathbb{R}^n\) toward the desired one \(\mathbf{q}_d(t)\) in spite of unmodeled dynamics, payload variations, friction, and sensor noise.
This post focuses on motion control in free space, i.e., when the manipulator is not in contact with the environment. The companion problem of regulating interaction forces will be treated in the next post on force and impedance control. We assume the rigid-body joint-space dynamic model derived in earlier posts on Lagrangian and Newton–Euler dynamics:
\[\mathbf{M}(\mathbf{q}) \, \ddot{\mathbf{q}} \;+\; \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \, \dot{\mathbf{q}} \;+\; \mathbf{F}_v \, \dot{\mathbf{q}} \;+\; \mathbf{g}(\mathbf{q}) \;=\; \boldsymbol{\tau},\]where \(\mathbf{M}(\mathbf{q}) \in \mathbb{R}^{n \times n}\) is the symmetric positive-definite inertia matrix, \(\mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \, \dot{\mathbf{q}}\) collects the Coriolis and centrifugal terms, \(\mathbf{F}_v \, \dot{\mathbf{q}}\) is a viscous friction term, and \(\mathbf{g}(\mathbf{q})\) is the gravity torque vector. Throughout this post we shall make extensive use of two well-known structural properties:
With the natural factorization of the Coriolis matrix obtained from the Christoffel symbols of the inertia matrix, the matrix $$ \mathbf{N}(\mathbf{q}, \dot{\mathbf{q}}) \;\triangleq\; \dot{\mathbf{M}}(\mathbf{q}) - 2 \, \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) $$ is **skew-symmetric**. Equivalently, $$\mathbf{x}^\top \mathbf{N}(\mathbf{q}, \dot{\mathbf{q}}) \, \mathbf{x} = 0$$ for every $$\mathbf{x} \in \mathbb{R}^n$$. This identity is a manifestation of the passivity of the rigid-body manipulator and is the cornerstone of nearly every Lyapunov-based control proof in robotics.
The dynamic model can be written as a linear function of a vector of **constant** dynamic parameters $$\boldsymbol{\pi} \in \mathbb{R}^p$$ (link masses, inertia tensor entries, friction coefficients, etc.): $$ \mathbf{M}(\mathbf{q}) \, \ddot{\mathbf{q}} + \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \, \dot{\mathbf{q}} + \mathbf{F}_v \, \dot{\mathbf{q}} + \mathbf{g}(\mathbf{q}) \;=\; \mathbf{Y}(\mathbf{q}, \dot{\mathbf{q}}, \ddot{\mathbf{q}}) \, \boldsymbol{\pi}, $$ where $$\mathbf{Y}(\cdot) \in \mathbb{R}^{n \times p}$$ is the **regressor matrix**. Linearity in the parameters is what enables adaptive control.
2. The Control Problem
It is customary to distinguish two control tasks.
Given a constant desired configuration $$\mathbf{q}_d \in \mathbb{R}^n$$, design $$\boldsymbol{\tau}(t)$$ such that $$ \lim_{t \to \infty} \mathbf{q}(t) \;=\; \mathbf{q}_d, \qquad \lim_{t \to \infty} \dot{\mathbf{q}}(t) \;=\; \mathbf{0}. $$
Given a sufficiently smooth time-varying reference $$(\mathbf{q}_d(t), \dot{\mathbf{q}}_d(t), \ddot{\mathbf{q}}_d(t))$$, design $$\boldsymbol{\tau}(t)$$ such that the **tracking error** $$ \mathbf{e}(t) \;\triangleq\; \mathbf{q}_d(t) - \mathbf{q}(t) $$ converges to zero (asymptotically or exponentially), preferably with prescribed transient performance.
Two complementary architectures will be discussed:
- A decentralized (joint-by-joint) controller that treats every joint as an isolated single-input/single-output system and absorbs coupling effects as a disturbance. This is the workhorse of industrial manipulators driven through high-ratio reduction gears.
- A centralized (multivariable) controller that uses the full dynamic model to actively cancel nonlinearities. This is the foundation of computed-torque, robust, and adaptive schemes used in direct-drive and high-performance manipulators.
3. Independent Joint Control
3.1. Why Decoupling is (Approximately) Justified
Consider a single joint driven by a DC motor coupled to the link through a reduction gear of ratio \(k_r \gg 1\). Let \(q_m\) denote the motor angle, related to the link angle through \(q_m = k_r q\), and let \(\tau_m = \tau / k_r\) be the corresponding motor torque. Writing the rigid-body model in terms of motor-side coordinates and decomposing the inertia matrix as
\[\mathbf{M}(\mathbf{q}) \;=\; \bar{\mathbf{M}} \;+\; \Delta \mathbf{M}(\mathbf{q}),\]where \(\bar{\mathbf{M}}\) is the diagonal matrix of average inertias reflected at the motor axes, one obtains for the \(i\)-th joint
\[\bar{M}_{ii} \, \ddot{q}_{m,i} / k_{r,i}^2 \;+\; F_{m,ii} \, \dot{q}_{m,i} \;=\; \tau_{m,i} \;-\; d_i,\]with the lumped disturbance
\[d_i \;=\; \frac{1}{k_{r,i}} \Big[ \, \big(\Delta \mathbf{M}(\mathbf{q}) \, \ddot{\mathbf{q}}\big)_i \;+\; \big(\mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \, \dot{\mathbf{q}}\big)_i \;+\; g_i(\mathbf{q}) \, \Big].\]The magnitude of \(d_i\) is attenuated by the gear ratio, so when \(k_r\) is sufficiently large the off-diagonal inertia coupling, Coriolis/centrifugal terms, and gravity all appear as a small disturbance at the motor side. This justifies treating each joint as a linear, decoupled second-order system and tuning a SISO compensator around it.
3.2. Cascaded PID with Inner Velocity Loop
The classical industrial architecture nests three linear compensators around the motor:
\[\boxed{\;\; C_P(s) = K_P \, \dfrac{1 + s T_P}{s}, \qquad C_V(s) = K_V \, \dfrac{1 + s T_V}{s}, \qquad C_A(s) = K_A \, \dfrac{1 + s T_A}{s}. \;\;}\]- \(C_P\) is the outermost position loop (PI action recovers zero steady-state error against gravity, which appears as a constant disturbance at a fixed posture).
- \(C_V\) is the velocity loop and provides the dominant damping. With analog tachometer feedback it can run at a higher bandwidth than the position loop.
- \(C_A\) (optional) is an acceleration loop. Acceleration is rarely measured directly; it is reconstructed by a first-order filter applied to the velocity signal.
A key design quantity is the disturbance-rejection factor \(X_R\), which for the three-loop scheme is \(X_R = K_P k_{TP} K_V K_A\). Large \(X_R\) implies small steady-state sensitivity to the lumped disturbance \(d_i\). Increasing \(K_P\) alone, however, eventually drives the dominant closed-loop poles toward instability or excessive oscillation, which is why nested velocity (and sometimes acceleration) loops are preferable to a single high-gain proportional controller.
3.3. Feedforward Compensation
When the reference \(q_{m,d}(t)\) is differentiable in real time, one can feedforward the desired velocity and acceleration:
\[v_c(t) \;=\; \underbrace{C_R(s)\big[q_{m,d}(t) - q_m(t)\big]}_{\text{feedback}} \;+\; \underbrace{\frac{1}{k_t}\Big(I_m \, \ddot{q}_{m,d}(t) + F_m \, \dot{q}_{m,d}(t)\Big)}_{\text{torque feedforward}}.\]Feedforward does not change the disturbance-rejection properties of the closed loop but greatly reduces the tracking error along the planned trajectory, because the feedback loop is now asked only to react to modelling errors rather than to drive the entire motion.
3.4. A Note on Anti-Windup
The integrator in the PI position loop introduces the familiar integrator windup when the actuator saturates: the integrator keeps accumulating an error that the saturated motor cannot reduce, leading to large overshoots and slow recovery. Standard remedies are back-calculation (subtracting the saturation excess from the integrator input), clamping (freezing the integrator while the input saturates), or replacing the PI with a conditional-integration scheme. Saturations are explicitly placed on velocity, acceleration, and torque commands to enforce physical limits and to facilitate time-optimal point-to-point motions.
4. PD Control with Gravity Compensation
We now turn to centralized controllers that exploit the full model. The simplest yet remarkably elegant scheme treats the regulation problem.
4.1. The Control Law
For a constant set-point \(\mathbf{q}_d\), define the position error
\[\tilde{\mathbf{q}}(t) \;\triangleq\; \mathbf{q}_d - \mathbf{q}(t).\]Choose the control law
\[\boxed{\;\; \boldsymbol{\tau} \;=\; \mathbf{g}(\mathbf{q}) \;+\; \mathbf{K}_P \, \tilde{\mathbf{q}} \;-\; \mathbf{K}_D \, \dot{\mathbf{q}}, \;\;}\]with \(\mathbf{K}_P, \mathbf{K}_D \in \mathbb{R}^{n \times n}\) symmetric and positive definite (typically diagonal). The first term cancels gravity at the current configuration; the remaining two terms are a linear proportional–derivative action on the joint error.
4.2. Global Asymptotic Stability — Lyapunov Proof
Under the PD + gravity-compensation law above, the closed-loop equilibrium $$\tilde{\mathbf{q}} = \mathbf{0}, \, \dot{\mathbf{q}} = \mathbf{0}$$ is **globally asymptotically stable** for any choice of symmetric positive-definite $$\mathbf{K}_P$$ and $$\mathbf{K}_D$$.
Proof sketch. Consider the Lyapunov function candidate
\[V(\mathbf{q}, \dot{\mathbf{q}}) \;=\; \tfrac{1}{2} \, \dot{\mathbf{q}}^\top \mathbf{M}(\mathbf{q}) \, \dot{\mathbf{q}} \;+\; \tfrac{1}{2} \, \tilde{\mathbf{q}}^\top \mathbf{K}_P \, \tilde{\mathbf{q}}.\]It is positive definite because \(\mathbf{M}(\mathbf{q}) \succ 0\) and \(\mathbf{K}_P \succ 0\), and it vanishes only at the equilibrium. The first term has a clear energetic interpretation as kinetic energy, while the second represents the potential energy stored in the \(n\) virtual position springs of stiffness \(\mathbf{K}_P\) supplied by the proportional feedback.
Differentiating along the closed-loop trajectories and using \(\dot{\mathbf{q}}_d \equiv \mathbf{0}\),
\[\dot{V} \;=\; \dot{\mathbf{q}}^\top \mathbf{M}(\mathbf{q}) \, \ddot{\mathbf{q}} \;+\; \tfrac{1}{2} \dot{\mathbf{q}}^\top \dot{\mathbf{M}}(\mathbf{q}) \, \dot{\mathbf{q}} \;-\; \dot{\mathbf{q}}^\top \mathbf{K}_P \, \tilde{\mathbf{q}}.\]Substituting \(\mathbf{M}(\mathbf{q}) \, \ddot{\mathbf{q}} = \boldsymbol{\tau} - \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \, \dot{\mathbf{q}} - \mathbf{F}_v \, \dot{\mathbf{q}} - \mathbf{g}(\mathbf{q})\) from the dynamic equation and using the PD + gravity-compensation control law,
\[\dot{V} \;=\; \tfrac{1}{2} \, \dot{\mathbf{q}}^\top \big[\dot{\mathbf{M}}(\mathbf{q}) - 2 \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}})\big] \, \dot{\mathbf{q}} \;-\; \dot{\mathbf{q}}^\top \big(\mathbf{F}_v + \mathbf{K}_D\big) \, \dot{\mathbf{q}}.\]By the skew-symmetry property of \(\dot{\mathbf{M}} - 2 \mathbf{C}\), the first term vanishes identically, yielding
\[\boxed{\;\; \dot{V} \;=\; -\, \dot{\mathbf{q}}^\top \big(\mathbf{F}_v + \mathbf{K}_D\big) \, \dot{\mathbf{q}} \;\leq\; 0. \;\;}\]\(\dot V\) is negative semi-definite (it vanishes for any \(\dot{\mathbf{q}} = \mathbf{0}\), not only at the equilibrium). A direct application of LaSalle’s invariance principle completes the argument: on the set \(\{\dot{\mathbf{q}} = \mathbf{0}\}\) the dynamics reduce to \(\mathbf{K}_P \, \tilde{\mathbf{q}} = \mathbf{0}\), hence \(\tilde{\mathbf{q}} = \mathbf{0}\) is the only invariant point. \(\square\)
4.3. Remarks
- The result requires only knowledge of \(\mathbf{g}(\mathbf{q})\), not of the full dynamic model. This is computationally attractive: the gravity vector for industrial 6-DOF arms is often a closed-form expression with only a few trigonometric terms.
- Stability holds for arbitrary positive-definite gains, so there is no minimum stiffness requirement, in contrast with PID linear designs which can be destabilized by high-frequency unmodeled dynamics.
- For direct-drive manipulators (\(\mathbf{K}_r = \mathbf{I}\), no gear reduction) the natural mechanical damping \(\mathbf{F}_v\) is negligible, so the artificial damping \(\mathbf{K}_D\) is essential.
- If gravity is mis-compensated by \(\hat{\mathbf{g}}(\mathbf{q}) \neq \mathbf{g}(\mathbf{q})\), the equilibrium shifts to a configuration where \(\mathbf{K}_P \tilde{\mathbf{q}} = \mathbf{g}(\mathbf{q}) - \hat{\mathbf{g}}(\mathbf{q})\); large \(\mathbf{K}_P\) keeps the residual error small. This is the “robust” view of PD + gravity compensation.
4.4. Adding Integral Action
A pure PD action with gravity compensation already guarantees zero steady-state error if \(\mathbf{g}(\mathbf{q})\) is known exactly. To compensate for unmodeled constant disturbances (e.g., an unknown payload), an integral term is added, yielding a PID law:
\[\boldsymbol{\tau} \;=\; \mathbf{K}_P \, \tilde{\mathbf{q}} \;+\; \mathbf{K}_I \int_0^t \tilde{\mathbf{q}}(\sigma) \, d\sigma \;-\; \mathbf{K}_D \, \dot{\mathbf{q}}.\]Global asymptotic stability of joint-space PID without gravity compensation can be proved for sufficiently small \(\mathbf{K}_I\) (see Arimoto and Miyazaki, 1984). The same windup precautions discussed in §3.4 must be applied at the multivariable level.
5. Inverse Dynamics (Computed-Torque) Control
5.1. The Idea: Exact Feedback Linearization
For trajectory tracking we need a controller that not only stabilizes the equilibrium but also forces the error dynamics to be linear and decoupled. The inverse-dynamics approach exploits the fact that the rigid-body model is affine in the control with an invertible input matrix \(\mathbf{M}(\mathbf{q})\). Writing the model compactly as
\[\mathbf{M}(\mathbf{q}) \, \ddot{\mathbf{q}} \;+\; \mathbf{n}(\mathbf{q}, \dot{\mathbf{q}}) \;=\; \boldsymbol{\tau}, \qquad \mathbf{n}(\mathbf{q}, \dot{\mathbf{q}}) \;\triangleq\; \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \dot{\mathbf{q}} + \mathbf{F}_v \dot{\mathbf{q}} + \mathbf{g}(\mathbf{q}),\]choose the inner-loop control
\[\boldsymbol{\tau} \;=\; \mathbf{M}(\mathbf{q}) \, \mathbf{y} \;+\; \mathbf{n}(\mathbf{q}, \dot{\mathbf{q}}),\]which yields the linear, decoupled, time-invariant system
\[\ddot{\mathbf{q}} \;=\; \mathbf{y}.\]The system has been transformed into \(n\) independent double integrators, and any linear stabilizer can now be designed on the auxiliary input \(\mathbf{y}\).
5.2. The Outer Loop and Error Dynamics
Given a smooth desired trajectory \((\mathbf{q}_d, \dot{\mathbf{q}}_d, \ddot{\mathbf{q}}_d)\), set the outer loop to
\[\boxed{\;\; \mathbf{y} \;=\; \ddot{\mathbf{q}}_d \;+\; \mathbf{K}_D \, \dot{\tilde{\mathbf{q}}} \;+\; \mathbf{K}_P \, \tilde{\mathbf{q}}, \;\;}\]with \(\mathbf{K}_P = \mathrm{diag}(\omega_{n,1}^2, \ldots, \omega_{n,n}^2)\) and \(\mathbf{K}_D = \mathrm{diag}(2 \zeta_1 \omega_{n,1}, \ldots, 2 \zeta_n \omega_{n,n})\). Substituting in \(\ddot{\mathbf{q}} = \mathbf{y}\) and recalling that \(\ddot{\tilde{\mathbf{q}}} = \ddot{\mathbf{q}}_d - \ddot{\mathbf{q}}\) gives the closed-loop error dynamics
\[\boxed{\;\; \ddot{\tilde{\mathbf{q}}} \;+\; \mathbf{K}_D \, \dot{\tilde{\mathbf{q}}} \;+\; \mathbf{K}_P \, \tilde{\mathbf{q}} \;=\; \mathbf{0}, \;\;}\]i.e., \(n\) decoupled second-order linear systems whose natural frequency and damping ratio are independently assigned through the diagonal entries of \(\mathbf{K}_P\) and \(\mathbf{K}_D\). The tracking error decays exponentially to zero for any positive-definite choice of the gains.
5.3. Computational Issues
Inverse-dynamics control is conceptually optimal but computationally demanding:
- The full inertia matrix \(\mathbf{M}(\mathbf{q})\), Coriolis matrix \(\mathbf{C}(\mathbf{q}, \dot{\mathbf{q}})\), and gravity vector \(\mathbf{g}(\mathbf{q})\) must be evaluated online at every control sample (typically every \(0.5\)–\(2 \text{ ms}\)).
- The auxiliary input passes through \(\mathbf{M}(\mathbf{q})\), so the controller depends on the current joint state, not only on the planned reference. Therefore, unlike feedforward-only schemes, \(\mathbf{M}(\mathbf{q})\mathbf{y}\) cannot be precomputed off-line.
- Joint accelerations must be commanded (not measured), which constrains the actuators to have a torque-control interface with sufficient bandwidth.
The Recursive Newton–Euler algorithm computes the right-hand side of the inverse-dynamics equation with \(O(n)\) complexity, making real-time implementation feasible for \(n \leq 7\) on conventional hardware.
5.4. Partial and Feedforward Computed-Torque
When the full algorithm is too expensive, two simplifications are common.
Partial computed-torque. Cancel only the dominant nonlinearity, typically gravity, and treat the rest as a disturbance:
\[\boldsymbol{\tau} \;=\; \bar{\mathbf{M}} \, \mathbf{y} \;+\; \mathbf{g}(\mathbf{q}),\]with \(\bar{\mathbf{M}}\) the diagonal average-inertia matrix. This degrades to a tuned PD + gravity compensator at low speeds but preserves much of its simplicity.
Feedforward computed-torque. Compute the inverse-dynamics term along the desired trajectory rather than the actual one:
\[\boldsymbol{\tau} \;=\; \mathbf{M}(\mathbf{q}_d) \, \ddot{\mathbf{q}}_d \;+\; \mathbf{C}(\mathbf{q}_d, \dot{\mathbf{q}}_d) \, \dot{\mathbf{q}}_d \;+\; \mathbf{g}(\mathbf{q}_d) \;+\; \mathbf{K}_P \, \tilde{\mathbf{q}} \;+\; \mathbf{K}_D \, \dot{\tilde{\mathbf{q}}}.\]The model-based term can be evaluated off-line and stored as a time-indexed table; only the PD feedback runs at the high control rate. Closed-loop stability requires that the linear PD action dominate the residual nonlinearity, which is acceptable for moderate-speed motions and high-quality models.
6. Robust Control
Inverse dynamics is an exact-cancellation technique: any uncertainty in \(\mathbf{M}, \mathbf{C}, \mathbf{g}\) leaves uncompensated terms in the loop and ruins the linear error dynamics. Robust controllers acknowledge this and add a term whose role is to dominate the worst-case residual.
6.1. The Residual Dynamics
Let \(\hat{\mathbf{M}}, \hat{\mathbf{n}}\) denote the estimated model. Apply the imperfect inverse-dynamics law
\[\boldsymbol{\tau} \;=\; \hat{\mathbf{M}}(\mathbf{q}) \, \mathbf{y} \;+\; \hat{\mathbf{n}}(\mathbf{q}, \dot{\mathbf{q}}).\]After algebra one obtains
\[\ddot{\mathbf{q}} \;=\; \mathbf{y} \;+\; \boldsymbol{\eta}(\mathbf{q}, \dot{\mathbf{q}}, \mathbf{y}), \qquad \boldsymbol{\eta} \;\triangleq\; (\mathbf{M}^{-1} \hat{\mathbf{M}} - \mathbf{I}) \mathbf{y} \;-\; \mathbf{M}^{-1} \tilde{\mathbf{n}},\]where \(\tilde{\mathbf{n}} = \hat{\mathbf{n}} - \mathbf{n}\) is the modelling error. Choosing \(\mathbf{y} = \ddot{\mathbf{q}}_d + \mathbf{K}_D \dot{\tilde{\mathbf{q}}} + \mathbf{K}_P \tilde{\mathbf{q}} + \mathbf{w}\) — i.e., a PD feedforward outer loop plus a corrective term \(\mathbf{w}\) — leads to the state-space error system
\[\dot{\boldsymbol{\xi}} \;=\; \tilde{\mathbf{H}} \, \boldsymbol{\xi} \;+\; \mathbf{D} \, (\boldsymbol{\eta} - \mathbf{w}), \qquad \boldsymbol{\xi} = \begin{bmatrix} \tilde{\mathbf{q}} \\ \dot{\tilde{\mathbf{q}}} \end{bmatrix},\]where \(\tilde{\mathbf{H}}\) is Hurwitz by construction (its block structure is \(\begin{bmatrix} \mathbf{0} & \mathbf{I} \\ -\mathbf{K}_P & -\mathbf{K}_D \end{bmatrix}\)). The objective is to choose \(\mathbf{w}\) so that the closed loop remains stable for every admissible \(\boldsymbol{\eta}\).
6.2. Sliding-Mode / Variable-Structure Law
Assume one can find a positive scalar function \(\rho(\mathbf{q}, \dot{\mathbf{q}}, \ddot{\mathbf{q}}_d)\) that bounds the uncertainty,
\[\|\boldsymbol{\eta}\| \;\leq\; \rho(\mathbf{q}, \dot{\mathbf{q}}, \ddot{\mathbf{q}}_d).\]Let \(\mathbf{P}\) solve the Lyapunov equation \(\tilde{\mathbf{H}}^\top \mathbf{Q} + \mathbf{Q} \tilde{\mathbf{H}} = -\mathbf{P}\) for some symmetric positive-definite \(\mathbf{P}\), and define \(\mathbf{z} \triangleq \mathbf{D}^\top \mathbf{Q} \, \boldsymbol{\xi}\). The unit-vector law
\[\boxed{\;\; \mathbf{w} \;=\; \rho \, \frac{\mathbf{z}}{\|\mathbf{z}\|}, \qquad \|\mathbf{z}\| \neq 0, \;\;}\]yields \(\dot{V} = -\boldsymbol{\xi}^\top \mathbf{P} \boldsymbol{\xi} + 2 \mathbf{z}^\top(\boldsymbol{\eta} - \mathbf{w}) < 0\), hence asymptotic convergence of \(\boldsymbol{\xi}\) to zero. The closed-loop trajectories are forced onto the sliding subspace \(\{\mathbf{z} = \mathbf{0}\}\), on which the linear part of the error dynamics dominates.
6.3. Boundary-Layer Smoothing (Spong–Vidyasagar)
The unit-vector law is discontinuous on \(\mathbf{z} = \mathbf{0}\). In practice the finite sampling rate of the controller and the bandwidth of the actuators turn this into chattering — a high-frequency oscillation that excites unmodeled dynamics and wears mechanical components. The standard cure is to smooth the law within a thin boundary layer of thickness \(\epsilon > 0\):
\[\mathbf{w} \;=\; \begin{cases} \rho \, \dfrac{\mathbf{z}}{\|\mathbf{z}\|} & \|\mathbf{z}\| \geq \epsilon, \\[6pt] \rho \, \dfrac{\mathbf{z}}{\epsilon} & \|\mathbf{z}\| < \epsilon. \end{cases}\]Inside the layer the control is a continuous high-gain proportional action; outside, it switches with finite-amplitude. Asymptotic convergence is traded for uniform ultimate boundedness of \(\|\boldsymbol{\xi}\|\), with a residual ball whose radius vanishes as \(\epsilon \to 0\).
7. Adaptive Control
Robust controllers handle uncertainty by over-bounding it; adaptive controllers handle it by estimating it on-line. Both make essential use of the dynamic-model structure but in different ways: robust control relies on the magnitude bound \(\rho\), adaptive control relies on the linearity in the parameters \(\mathbf{Y}(\cdot) \boldsymbol{\pi}\).
7.1. The Slotine–Li Controller
Define the reference velocity and filtered tracking error
\[\dot{\mathbf{q}}_r \;\triangleq\; \dot{\mathbf{q}}_d + \boldsymbol{\Lambda} \, \tilde{\mathbf{q}}, \qquad \mathbf{s} \;\triangleq\; \dot{\mathbf{q}}_r - \dot{\mathbf{q}} \;=\; \dot{\tilde{\mathbf{q}}} + \boldsymbol{\Lambda} \, \tilde{\mathbf{q}},\]with \(\boldsymbol{\Lambda} \succ 0\) (usually diagonal). The variable \(\mathbf{s}\) resembles a sliding surface but is used here only as a convenient compound error: \(\mathbf{s} \to \mathbf{0}\) implies both \(\tilde{\mathbf{q}} \to \mathbf{0}\) and \(\dot{\tilde{\mathbf{q}}} \to \mathbf{0}\).
The Slotine–Li adaptive controller (1987) is
\[\boxed{\;\; \boldsymbol{\tau} \;=\; \hat{\mathbf{M}}(\mathbf{q}) \ddot{\mathbf{q}}_r \;+\; \hat{\mathbf{C}}(\mathbf{q}, \dot{\mathbf{q}}) \dot{\mathbf{q}}_r \;+\; \hat{\mathbf{F}}_v \, \dot{\mathbf{q}}_r \;+\; \hat{\mathbf{g}}(\mathbf{q}) \;+\; \mathbf{K}_D \, \mathbf{s} \;=\; \mathbf{Y}(\mathbf{q}, \dot{\mathbf{q}}, \dot{\mathbf{q}}_r, \ddot{\mathbf{q}}_r) \, \hat{\boldsymbol{\pi}} \;+\; \mathbf{K}_D \, \mathbf{s}, \;\;}\]with the parameter adaptation law
\[\boxed{\;\; \dot{\hat{\boldsymbol{\pi}}} \;=\; \mathbf{K}_\pi^{-1} \, \mathbf{Y}^\top(\mathbf{q}, \dot{\mathbf{q}}, \dot{\mathbf{q}}_r, \ddot{\mathbf{q}}_r) \, \mathbf{s}, \qquad \mathbf{K}_\pi \succ 0. \;\;}\]Two design conveniences are worth emphasizing. First, \(\mathbf{Y}(\cdot)\) uses the desired acceleration \(\ddot{\mathbf{q}}_r\) (a function of \(\ddot{\mathbf{q}}_d\) and \(\dot{\tilde{\mathbf{q}}}\)) rather than the measured \(\ddot{\mathbf{q}}\), so no acceleration sensor is required. Second, the gain \(\mathbf{K}_\pi\) plays the role of an inverse adaptation rate.
7.2. Lyapunov Analysis
Define the augmented Lyapunov function
\[V(\mathbf{s}, \tilde{\mathbf{q}}, \tilde{\boldsymbol{\pi}}) \;=\; \tfrac{1}{2} \, \mathbf{s}^\top \mathbf{M}(\mathbf{q}) \, \mathbf{s} \;+\; \tilde{\mathbf{q}}^\top \boldsymbol{\Lambda} \mathbf{K}_D \, \tilde{\mathbf{q}} \;+\; \tfrac{1}{2} \, \tilde{\boldsymbol{\pi}}^\top \mathbf{K}_\pi \, \tilde{\boldsymbol{\pi}},\]with \(\tilde{\boldsymbol{\pi}} = \hat{\boldsymbol{\pi}} - \boldsymbol{\pi}\). Substituting the control law into the dynamics gives the error equation
\[\mathbf{M}(\mathbf{q}) \, \dot{\mathbf{s}} \;+\; \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}}) \, \mathbf{s} \;+\; (\mathbf{F}_v + \mathbf{K}_D) \mathbf{s} \;=\; \mathbf{Y}(\mathbf{q}, \dot{\mathbf{q}}, \dot{\mathbf{q}}_r, \ddot{\mathbf{q}}_r) \, \tilde{\boldsymbol{\pi}}.\]Differentiating \(V\) and again using skew-symmetry of \(\dot{\mathbf{M}} - 2 \mathbf{C}\), the cross-terms cancel and one obtains
\[\dot{V} \;=\; -\, \mathbf{s}^\top (\mathbf{F}_v + \mathbf{K}_D) \, \mathbf{s} \;-\; \tilde{\mathbf{q}}^\top \boldsymbol{\Lambda} \mathbf{K}_D \boldsymbol{\Lambda} \, \tilde{\mathbf{q}} \;\leq\; 0.\]Hence \(\mathbf{s}, \tilde{\mathbf{q}} \to \mathbf{0}\) asymptotically and \(\hat{\boldsymbol{\pi}}\) remains bounded. Parameter convergence to the true \(\boldsymbol{\pi}\) is not guaranteed: it requires a persistency-of-excitation condition on the regressor \(\mathbf{Y}\) along the trajectory.
7.3. Adaptive vs Robust
| Robust (sliding-mode) | Adaptive (Slotine–Li) | |
|---|---|---|
| Source of robustness | Worst-case bound \(\rho\) on \(\boldsymbol{\eta}\) | On-line estimate \(\hat{\boldsymbol{\pi}}(t)\) |
| Required knowledge | Bounds on parameters | Structure of the model |
| Smoothness of \(\boldsymbol{\tau}(t)\) | Discontinuous (chattering) unless smoothed | Naturally smooth |
| Handles external disturbances | Yes (within bound) | No (assumed absent) |
| Parameter convergence | N/A | Only under persistent excitation |
In practice the two are often combined: an adaptive law identifies slowly-varying inertial parameters, while a small robust corrective term handles fast disturbances and unmodeled friction.
8. Operational-Space (Task-Space) Control
So far the desired motion was specified in joint coordinates. In many tasks (visual servoing, contour following, peg-in-hole) the natural reference lives in the operational space \(\mathbf{x}_e \in \mathbb{R}^m\) of the end-effector. Two approaches exist.
8.1. Joint-Space Conversion (Inverse Kinematics)
Compute \(\mathbf{q}_d(t) = \mathbf{k}^{-1}(\mathbf{x}_d(t))\) off-line (or on-line with a Jacobian-based iterative scheme) and apply any of the joint-space controllers above. This is the industrial default.
8.2. Operational-Space Control (Khatib, 1987)
Close the feedback loop directly on \(\mathbf{x}_e\). Let \(\mathbf{J}_A(\mathbf{q})\) denote the analytical Jacobian relating \(\dot{\mathbf{q}}\) to \(\dot{\mathbf{x}}_e\). A workspace PD with gravity compensation is
\[\boxed{\;\; \boldsymbol{\tau} \;=\; \mathbf{g}(\mathbf{q}) \;+\; \mathbf{J}_A^\top(\mathbf{q}) \, \big[ \mathbf{K}_P \, \tilde{\mathbf{x}} - \mathbf{K}_D \, \dot{\mathbf{x}}_e \big], \;\;}\]with \(\tilde{\mathbf{x}} = \mathbf{x}_d - \mathbf{x}_e\). The factor \(\mathbf{J}_A^\top\) converts the desired Cartesian wrench into joint torques and is interpretable as the manipulator behaving like a generalized spring in operational space. Asymptotic stability for non-singular configurations is proved by a workspace analogue of the joint-space Lyapunov function used in §4.
For tracking, the task-space inverse dynamics uses the standard identity \(\ddot{\mathbf{x}}_e = \mathbf{J}_A \, \ddot{\mathbf{q}} + \dot{\mathbf{J}}_A \, \dot{\mathbf{q}}\) and the inner-loop control
\[\boldsymbol{\tau} \;=\; \mathbf{M}(\mathbf{q}) \, \mathbf{J}_A^{-1}(\mathbf{q}) \big[\mathbf{y} - \dot{\mathbf{J}}_A(\mathbf{q}, \dot{\mathbf{q}}) \, \dot{\mathbf{q}}\big] \;+\; \mathbf{n}(\mathbf{q}, \dot{\mathbf{q}}),\]with outer loop \(\mathbf{y} = \ddot{\mathbf{x}}_d + \mathbf{K}_D (\dot{\mathbf{x}}_d - \dot{\mathbf{x}}_e) + \mathbf{K}_P \tilde{\mathbf{x}}\). The resulting closed-loop error in workspace coordinates is again \(\ddot{\tilde{\mathbf{x}}} + \mathbf{K}_D \dot{\tilde{\mathbf{x}}} + \mathbf{K}_P \tilde{\mathbf{x}} = \mathbf{0}\).
Operational-space control becomes essential once the manipulator must regulate interaction forces with the environment, which will be the subject of the next post.
9. Practical Notes
A handful of implementation issues separate textbook controllers from working software.
- Sample time. PD and PID outer loops usually run at \(500\) Hz–\(1\) kHz; inverse-dynamics inner loops at \(1\)–\(4\) kHz, limited by the recursive Newton–Euler computation and the encoder resolution.
- Velocity estimation. Numerical differentiation of encoder counts amplifies quantization noise. Standard remedies are first-order low-pass filtering with bandwidth around 1/10 of the Nyquist frequency, or a fixed-lag state observer (Luenberger or Kalman) using the joint dynamic model.
- Friction compensation. Coulomb and Stribeck friction at low speeds are the dominant source of steady-state error and limit-cycle behavior. A feedforward of \(\mathrm{sign}(\dot{q})\) multiplied by an identified Coulomb coefficient is commonly added to the computed-torque term.
- Backlash and joint flexibility. Reduction gears introduce backlash and elasticity not captured by the rigid-body model. When their natural frequency falls inside the controller bandwidth, the rigid-body assumption breaks down and elastic-joint or two-mass models must be used.
- Gain scheduling. The “best” PD/PID gains depend on the inertia reflected at each joint, which varies with configuration. For a 6-DOF arm one may schedule gains as a function of the dominant entry of \(\mathbf{M}(\mathbf{q})\), or simply choose gains conservatively at the worst-case configuration.
- Safety. Software torque saturation, velocity limits, and configuration-space soft stops are mandatory; they are typically enforced outside the integral path to avoid windup.
10. Summary
We have reviewed the spectrum of joint-space motion controllers for serial manipulators.
- Independent-joint PID is decentralized, easy to tune, and accurate when the manipulator is geared down sufficiently to attenuate inter-joint coupling.
- PD with gravity compensation is the simplest centralized scheme; it globally asymptotically stabilizes any equilibrium posture for arbitrary positive-definite gains, with the skew-symmetry of \(\dot{\mathbf{M}} - 2\mathbf{C}\) as the key analytical tool.
- Inverse-dynamics (computed-torque) control exactly cancels the model and yields decoupled linear error dynamics for trajectory tracking; the price is full on-line model evaluation.
- Robust controllers (sliding-mode with boundary layer) bound the residual induced by imperfect cancellation and trade chattering against finite ultimate error.
- Adaptive controllers (Slotine–Li) exploit linearity in the parameters to estimate the model on-line, producing smooth control inputs and convergent tracking error without persistent excitation.
- Operational-space control closes the loop directly in task coordinates through \(\boldsymbol{\tau} = \mathbf{J}^\top(\mathbf{q}) \, \mathbf{F}\) and is the natural starting point for force/impedance control, the subject of the next post.
Reference
[1] M. W. Spong, S. Hutchinson, and M. Vidyasagar, Robot Modeling and Control, 2nd ed., Wiley, 2020 — Chapters 10 (Independent Joint Control) and 11 (Multivariable Control).
[2] B. Siciliano, L. Sciavicco, L. Villani, and G. Oriolo, Robotics: Modelling, Planning and Control, Springer, 2009 — Chapter 8 (Motion Control).
[3] K. M. Lynch and F. C. Park, Modern Robotics: Mechanics, Planning, and Control, Cambridge University Press, 2017 — Chapter 11 (Robot Control), §11.4 (Motion Control with Torque or Force Inputs).
[4] M. Takegaki and S. Arimoto, “A New Feedback Method for Dynamic Control of Manipulators,” ASME Journal of Dynamic Systems, Measurement, and Control, vol. 103, no. 2, pp. 119–125, 1981.
[5] J.-J. E. Slotine and W. Li, “On the Adaptive Control of Robot Manipulators,” International Journal of Robotics Research, vol. 6, no. 3, pp. 49–59, 1987.
[6] M. W. Spong and M. Vidyasagar, “Robust Linear Compensator Design for Nonlinear Robotic Control,” IEEE Journal of Robotics and Automation, vol. 3, no. 4, pp. 345–351, 1987.
[7] O. Khatib, “A Unified Approach for Motion and Force Control of Robot Manipulators: The Operational Space Formulation,” IEEE Journal of Robotics and Automation, vol. 3, no. 1, pp. 43–53, 1987.
[8] S. Arimoto and F. Miyazaki, “Stability and Robustness of PID Feedback Control for Robot Manipulators of Sensory Capability,” in Robotics Research: The First International Symposium, MIT Press, 1984.
Leave a comment