Chapter 8: Adaptive Control
Lesson 1: Motivation and Assumptions
This lesson explains why adaptive control is needed in robot manipulators and what mathematical and physical assumptions are typically made before designing adaptive robot controllers. We contrast fixed robust controllers with adaptive ones, formalize parametric uncertainty in the robot dynamics, and state structural properties (linear parameterization, positive definiteness, passivity) that will be used in subsequent lessons.
1. Why Adaptive Control for Robots?
In previous chapters you designed model-based controllers (e.g. computed-torque) assuming that the dynamic model of the robot is known. For an \( n \)-DOF rigid manipulator, the nominal model is
\[ \mathbf{M}(\mathbf{q})\mathbf{\ddot q} + \mathbf{C}(\mathbf{q},\mathbf{\dot q})\mathbf{\dot q} + \mathbf{g}(\mathbf{q}) = \boldsymbol{\tau}, \]
where \( \mathbf{q} \) is the joint position vector, \( \mathbf{M}(\mathbf{q}) \) is the inertia matrix, \( \mathbf{C}(\mathbf{q},\mathbf{\dot q}) \) contains Coriolis and centrifugal terms, \( \mathbf{g}(\mathbf{q}) \) is gravity, and \( \boldsymbol{\tau} \) is the vector of joint torques. In practice, these terms depend on uncertain physical parameters: link masses, inertias, friction coefficients, payloads, etc.
A model-based controller such as ideal computed-torque uses an estimated model \( \hat{\mathbf{M}},\hat{\mathbf{C}},\hat{\mathbf{g}} \):
\[ \boldsymbol{\tau} = \hat{\mathbf{M}}(\mathbf{q})\mathbf{\ddot q}_r + \hat{\mathbf{C}}(\mathbf{q},\mathbf{\dot q})\mathbf{\dot q}_r + \hat{\mathbf{g}}(\mathbf{q}), \]
where \( \mathbf{q}_r,\mathbf{\dot q}_r,\mathbf{\ddot q}_r \) are reference trajectories constructed from the tracking error. If the estimates are inaccurate (parameter mismatch), the closed-loop dynamics deviate from the ideal linear behavior derived in Chapter 3. Robust controllers (e.g. sliding-mode, DOB from Chapter 7) can tolerate bounded uncertainty but often at the cost of conservatism (high gains, chattering, limited performance).
The core idea of adaptive control is to treat the unknown parameters as time-varying estimates and design both:
- a control law that depends on estimated parameters, and
- an update rule that adjusts these parameters online based on measured signals.
The goal is to obtain asymptotic tracking (or at least bounded errors) without knowing the exact physical parameters, while maintaining stability in the Lyapunov sense.
flowchart TD
A["Start: Model-based controller (computed torque, etc.)"]
B["Model mismatch (mass, friction, payload, wear)"]
C["Performance degradation (tracking error, high gains)"]
D["Design choice"]
E["Robust fixed controller \n(e.g. sliding mode, DOB)"]
F["Adaptive controller \n(online parameter estimates)"]
A --> B
B --> C
C --> D
D --> E
D --> F
F -->|"uses structural model of robot dynamics"| A
In this lesson we will not yet derive a full adaptive law; instead we will formalize the mathematical assumptions that make such laws possible and meaningful in the robotic context.
2. Parametric Uncertainty in Manipulator Dynamics
We assume that the robot dynamics are known up to a set of constant but unknown parameters \( \boldsymbol{\theta} \in \mathbb{R}^p \) (masses, inertias, centers of mass, friction coefficients, payload, etc.). Then the nominal model becomes
\[ \mathbf{M}(\mathbf{q},\boldsymbol{\theta})\mathbf{\ddot q} + \mathbf{C}(\mathbf{q},\mathbf{\dot q},\boldsymbol{\theta})\mathbf{\dot q} + \mathbf{g}(\mathbf{q},\boldsymbol{\theta}) = \boldsymbol{\tau}. \]
A fundamental property of rigid-body robot dynamics (which you have encountered in robotics dynamics) is linear parameterization: there exists a regressor matrix \( \mathbf{Y}(\mathbf{q},\mathbf{\dot q},\mathbf{\ddot q}) \in \mathbb{R}^{n \times p} \) such that
\[ \mathbf{M}(\mathbf{q},\boldsymbol{\theta})\mathbf{\ddot q} + \mathbf{C}(\mathbf{q},\mathbf{\dot q},\boldsymbol{\theta})\mathbf{\dot q} + \mathbf{g}(\mathbf{q},\boldsymbol{\theta}) = \mathbf{Y}(\mathbf{q},\mathbf{\dot q},\mathbf{\ddot q})\boldsymbol{\theta}. \]
That is, the dynamics are nonlinear in state and accelerations but linear in the unknown parameters. Adaptive controllers for manipulators rely crucially on this property.
2.1 Example: 1-DOF Rotary Joint with Unknown Parameters
Consider a single joint with dynamics
\[ m \ddot q + b \dot q + g_0 \sin(q) = \tau, \]
where \( m \) is an equivalent inertia (kg·m\(^2\)), \( b \) a viscous friction coefficient, and \( g_0 \) a gravity-related constant. We can write this as
\[ \tau = \underbrace{\bigl[\,\ddot q,\; \dot q,\; \sin(q)\,\bigr]}_{\mathbf{Y}(q,\dot q,\ddot q)} \underbrace{\begin{bmatrix} m \\[0.3em] b \\[0.3em] g_0 \end{bmatrix}}_{\boldsymbol{\theta}}. \]
Here the regressor \( \mathbf{Y}(q,\dot q,\ddot q) \in \mathbb{R}^{1 \times 3} \) depends only on measurable signals \( q,\dot q,\ddot q \), and \( \boldsymbol{\theta} \) collects the unknown constants. This simple example illustrates the general linear-parameterization structure.
In the multi-DOF case, the parameter vector typically has dimension \( p \) much larger than \( n \) because it includes inertias of each link, offsets, and friction parameters. In practice one often uses a base parameter set (minimal set of independent combinations) to avoid identifiability problems.
3. Standard Assumptions in Adaptive Robot Control
Before constructing adaptive controllers, most theoretical results rely on a common set of assumptions. We state them here; they will be explicitly used in later lessons when designing adaptive computed-torque schemes and proving stability via Lyapunov methods.
3.1 Structural Properties of the Dynamics
For an \( n \)-DOF rigid manipulator:
-
Positive definite inertia matrix.
For all joint positions \( \mathbf{q} \),
\[ \mathbf{M}(\mathbf{q}) = \mathbf{M}(\mathbf{q})' \quad\text{and}\quad \exists m_1,m_2 > 0 \text{ such that } m_1 \|\mathbf{x}\|^2 \le \mathbf{x}'\mathbf{M}(\mathbf{q})\mathbf{x} \le m_2 \|\mathbf{x}\|^2, \ \forall \mathbf{x}. \]
-
Skew-symmetry property.
Define
\( \mathbf{S}(\mathbf{q},\mathbf{\dot q}) =
\dot{\mathbf{M}}(\mathbf{q}) - 2\mathbf{C}(\mathbf{q},\mathbf{\dot
q}) \). Then
\[ \mathbf{x}'\mathbf{S}(\mathbf{q},\mathbf{\dot q})\mathbf{x} = 0, \quad \forall \mathbf{x},\mathbf{q},\mathbf{\dot q}. \]
This property underlies many Lyapunov proofs because it yields energy-like conservation relations. -
Linear parameterization.
There exists a regressor
\( \mathbf{Y}(\mathbf{q},\mathbf{\dot q},\mathbf{\ddot q})
\)
and parameter vector \( \boldsymbol{\theta} \) such
that
\[ \mathbf{M}(\mathbf{q})\mathbf{\ddot q} + \mathbf{C}(\mathbf{q},\mathbf{\dot q})\mathbf{\dot q} + \mathbf{g}(\mathbf{q}) = \mathbf{Y}(\mathbf{q},\mathbf{\dot q},\mathbf{\ddot q})\boldsymbol{\theta}. \]
3.2 Measurement and Actuation Assumptions
In addition to structural properties, most adaptive robot controllers assume:
- Full state measurement. Joint positions \( \mathbf{q} \) and velocities \( \mathbf{\dot q} \) are measurable (possibly after filtering encoder signals).
- Control authority. Each joint is independently actuated by torque input \( \tau_i \) (no underactuation), and the sign of the input gain is known.
- Bounded desired motion. The desired trajectory \( \mathbf{q}_d(t) \) and a finite number of its derivatives are bounded.
- Slow parameter variation. True physical parameters are constant or slowly varying compared to the controller bandwidth (payload changes are modeled as new constants).
- No unmodeled fast dynamics. High-frequency phenomena (flexibility, backlash) are either negligible or compensated separately (e.g. in inner loops), so that the rigid-body model remains valid at the control bandwidth of interest.
These assumptions will later allow us to construct Lyapunov functions that involve both tracking errors and parameter-estimation errors and to ensure stability of the combined robot–estimator system.
4. Conceptual Structure of an Adaptive Robot Controller
At a conceptual level, a typical adaptive controller for manipulators has three tightly coupled components:
- a reference model / desired dynamics, usually chosen as a stable linear error system (e.g. from PD gains);
- a parameterized control law that uses estimates \( \hat{\boldsymbol{\theta}} \) in place of unknown \( \boldsymbol{\theta} \);
- an adaptation law that updates \( \hat{\boldsymbol{\theta}} \) using measurable signals (errors, regressors).
In later lessons we will specify explicit forms such as adaptive computed-torque control. For this introductory lesson, it is enough to understand the data flow:
flowchart TD
Qd["Desired joint trajectory q_d(t)"] --> E["Tracking error e = q - q_d"]
Q["Robot joints q, qdot"] --> E
E --> CL["Control law using hat_theta"]
Qd --> CL
CL --> T["Applied torques tau"]
T --> P["Robot dynamics (unknown theta)"]
P --> Q
Q --> R["Regressor Y(q, qdot, qddot_r)"]
E --> R
R --> EST["Parameter estimator: update hat_theta"]
EST --> CL
The analysis of stability will be performed on the augmented system composed of the robot dynamics and the estimator dynamics. The assumptions stated in Section 3 ensure that the regressor \( \mathbf{Y} \) is well defined, that the plant dynamics are well behaved, and that the feedback signals are available for adaptation.
5. Simple 1-DOF Example with Parametric Mismatch
To motivate the need for adaptation, consider again the 1-DOF joint with true parameters \( m,b,g_0 \) and controller that uses estimated parameters \( \hat m,\hat b,\hat g_0 \). A computed-torque-like control based on a desired trajectory \( q_d(t) \) can be written as
\[ \tau = \hat m \ddot q_r + \hat b \dot q_r + \hat g_0 \sin(q) - k_p e - k_d \dot e, \]
where \( e = q - q_d \) is the tracking error and \( \ddot q_r,\dot q_r \) are reference signals constructed from \( e \) and \( q_d \) (as in Chapter 3). Substituting the true dynamics into the closed-loop error equation gives terms proportional to the parameter errors \( \tilde m = m - \hat m \), \( \tilde b = b - \hat b \), \( \tilde g_0 = g_0 - \hat g_0 \). Even if the linear part \( k_p,k_d \) is chosen to be stable, these parameter errors can produce nonzero steady-state or even oscillatory tracking errors.
Adaptive control aims to drive \( \tilde m,\tilde b,\tilde g_0 \) (or at least their effect on the regressor) toward zero using online learning algorithms that preserve stability.
6. Programming Sketches for Parametric Uncertainty
In this introductory lesson we only implement simulation of a 1-DOF joint with parametric mismatch and a placeholder for adaptive updates. Detailed adaptive laws will be implemented in later lessons. The examples here show how to structure code and where robot-specific libraries enter.
6.1 Python (NumPy / SciPy, with Robotics Libraries)
For full manipulators one can use libraries such as
roboticstoolbox-python or pinocchio to obtain
\( \mathbf{M},\mathbf{C},\mathbf{g} \). Here we implement a 1-DOF case
from scratch.
import numpy as np
# True parameters (unknown to the controller)
m_true = 2.0 # inertia
b_true = 0.4 # viscous friction
g0_true = 5.0 # gravity coefficient
# Controller parameter estimates (to be adapted)
m_hat = 1.0
b_hat = 0.2
g0_hat = 3.0
k_p = 20.0
k_d = 8.0
def desired_trajectory(t):
q_d = 0.5 * np.sin(0.5 * t)
dq_d = 0.25 * np.cos(0.5 * t)
ddq_d = -0.125 * np.sin(0.5 * t)
return q_d, dq_d, ddq_d
def plant_dynamics(t, state, tau):
q, dq = state
ddq = (tau - b_true * dq - g0_true * np.sin(q)) / m_true
return np.array([dq, ddq])
def control_law(t, q, dq, m_hat, b_hat, g0_hat):
q_d, dq_d, ddq_d = desired_trajectory(t)
e = q - q_d
de = dq - dq_d
# reference acceleration (as in computed torque)
ddq_r = ddq_d - k_d * de - k_p * e
dq_r = dq_d - k_p * e # simple choice for illustration
tau = m_hat * ddq_r + b_hat * dq_r + g0_hat * np.sin(q)
return tau, e, de
def update_parameters(m_hat, b_hat, g0_hat, Y, tau, tau_hat, gamma=0.1):
"""
Simple gradient update (for illustration only; rigorous laws in later lessons).
tau: actual torque (what was commanded)
tau_hat: Y theta_hat (model-predicted torque)
"""
error = tau - tau_hat # scalar
grad = -Y * error # gradient wrt theta_hat
m_hat_new = m_hat - gamma * grad[0]
b_hat_new = b_hat - gamma * grad[1]
g0_hat_new = g0_hat - gamma * grad[2]
return m_hat_new, b_hat_new, g0_hat_new
dt = 0.001
T = 5.0
steps = int(T / dt)
q = 0.0
dq = 0.0
history = []
for k in range(steps):
t = k * dt
tau, e, de = control_law(t, q, dq, m_hat, b_hat, g0_hat)
# Regressor for this simple system
q_d, dq_d, ddq_d = desired_trajectory(t)
ddq_r = ddq_d - k_d * de - k_p * e
dq_r = dq_d - k_p * e
Y = np.array([ddq_r, dq_r, np.sin(q)])
tau_hat = Y @ np.array([m_hat, b_hat, g0_hat])
# Update parameter estimates (toy adaptation)
m_hat, b_hat, g0_hat = update_parameters(m_hat, b_hat, g0_hat, Y, tau, tau_hat)
# Integrate plant
dq_mid = dq + 0.5 * dt * plant_dynamics(t, (q, dq), tau)[1]
ddq_mid = (tau - b_true * dq_mid - g0_true * np.sin(q)) / m_true
q += dq * dt
dq += ddq_mid * dt
history.append((t, q, dq, e, m_hat, b_hat, g0_hat))
6.2 C++ (Eigen, ROS Control / KDL / RBDL)
In C++, libraries such as Eigen (for linear algebra),
RBDL (Rigid Body Dynamics Library), and
Orocos KDL are commonly used with ROS control stacks. Below
is a minimal 1-DOF example using plain C++ and Eigen.
#include <iostream>
#include <Eigen/Dense>
struct Params {
double m_true{2.0};
double b_true{0.4};
double g0_true{5.0};
double m_hat{1.0};
double b_hat{0.2};
double g0_hat{3.0};
};
void desired_trajectory(double t, double& qd, double& dqd, double& ddqd) {
qd = 0.5 * std::sin(0.5 * t);
dqd = 0.25 * std::cos(0.5 * t);
ddqd = -0.125 * std::sin(0.5 * t);
}
double control_law(double t, double q, double dq,
const Params& p,
double k_p, double k_d,
Eigen::Vector3d& Y, double& tau_hat) {
double qd, dqd, ddqd;
desired_trajectory(t, qd, dqd, ddqd);
double e = q - qd;
double de = dq - dqd;
double ddq_r = ddqd - k_d * de - k_p * e;
double dq_r = dqd - k_p * e;
Y << ddq_r, dq_r, std::sin(q);
Eigen::Vector3d theta_hat(p.m_hat, p.b_hat, p.g0_hat);
tau_hat = Y.dot(theta_hat);
double tau = tau_hat; // plus optional extra feedback terms
return tau;
}
int main() {
Params p;
double k_p = 20.0, k_d = 8.0;
double dt = 0.001, T = 5.0;
int steps = static_cast<int>(T / dt);
double q = 0.0, dq = 0.0;
Eigen::Vector3d Y;
for (int k = 0; k < steps; ++k) {
double t = k * dt;
double tau_hat = 0.0;
double tau = control_law(t, q, dq, p, k_p, k_d, Y, tau_hat);
// Gradient-like parameter update (illustrative)
double error = tau - tau_hat;
double gamma = 0.1;
Eigen::Vector3d grad = -Y * error;
p.m_hat -= gamma * grad(0);
p.b_hat -= gamma * grad(1);
p.g0_hat -= gamma * grad(2);
// Plant integration (semi-implicit Euler)
double ddq = (tau - p.b_true * dq - p.g0_true * std::sin(q)) / p.m_true;
dq += ddq * dt;
q += dq * dt;
if (k % 1000 == 0) {
std::cout << "t=" << t
<< " q=" << q
<< " m_hat=" << p.m_hat << std::endl;
}
}
return 0;
}
6.3 Java (EJML for Linear Algebra)
In Java, the EJML library provides efficient matrix
operations. For a 1-DOF case we only need basic arrays, but the code
structure can be extended to multi-DOF robots using robotics libraries
or custom dynamics.
public class AdaptiveJoint1DOF {
static class Params {
double mTrue = 2.0;
double bTrue = 0.4;
double g0True = 5.0;
double mHat = 1.0;
double bHat = 0.2;
double g0Hat = 3.0;
}
static double[] desiredTrajectory(double t) {
double qd = 0.5 * Math.sin(0.5 * t);
double dqd = 0.25 * Math.cos(0.5 * t);
double ddqd = -0.125 * Math.sin(0.5 * t);
return new double[]{qd, dqd, ddqd};
}
static double controlLaw(double t, double q, double dq,
Params p, double kP, double kD,
double[] Y, double[] tauHatOut) {
double[] traj = desiredTrajectory(t);
double qd = traj[0], dqd = traj[1], ddqd = traj[2];
double e = q - qd;
double de = dq - dqd;
double ddq_r = ddqd - kD * de - kP * e;
double dq_r = dqd - kP * e;
Y[0] = ddq_r;
Y[1] = dq_r;
Y[2] = Math.sin(q);
double tauHat = Y[0] * p.mHat + Y[1] * p.bHat + Y[2] * p.g0Hat;
tauHatOut[0] = tauHat;
return tauHat;
}
public static void main(String[] args) {
Params p = new Params();
double kP = 20.0, kD = 8.0;
double dt = 0.001, T = 5.0;
int steps = (int)(T / dt);
double q = 0.0, dq = 0.0;
double[] Y = new double[3];
double[] tauHatOut = new double[1];
for (int k = 0; k < steps; ++k) {
double t = k * dt;
double tau = controlLaw(t, q, dq, p, kP, kD, Y, tauHatOut);
double tauHat = tauHatOut[0];
// Simple gradient adaptation
double error = tau - tauHat;
double gamma = 0.1;
p.mHat -= gamma * (-Y[0] * error);
p.bHat -= gamma * (-Y[1] * error);
p.g0Hat -= gamma * (-Y[2] * error);
// Plant integration
double ddq = (tau - p.bTrue * dq - p.g0True * Math.sin(q)) / p.mTrue;
dq += ddq * dt;
q += dq * dt;
if (k % 1000 == 0) {
System.out.printf("t=%.3f q=%.3f mHat=%.3f%n", t, q, p.mHat);
}
}
}
}
6.4 MATLAB / Simulink
In MATLAB, the 1-DOF dynamics and adaptive structure can be simulated
directly with ODE solvers. For full robot models you can use
robotics.RigidBodyTree (Robotics System Toolbox).
function adaptive_joint_1dof
% True parameters
m_true = 2.0; b_true = 0.4; g0_true = 5.0;
% Initial parameter estimates
theta_hat0 = [1.0; 0.2; 3.0]; % [m_hat; b_hat; g0_hat]
x0 = [0; 0; theta_hat0]; % [q; dq; theta_hat]
Tspan = [0 5];
[T,X] = ode45(@(t,x) dynamics(t,x,m_true,b_true,g0_true), Tspan, x0);
q = X(:,1);
theta_hat = X(:,3:5);
figure; subplot(2,1,1);
plot(T,q); ylabel('q(t)');
subplot(2,1,2);
plot(T,theta_hat); ylabel('theta\_hat'); xlabel('t');
function dx = dynamics(t,x,m_true,b_true,g0_true)
q = x(1); dq = x(2);
theta_hat = x(3:5);
m_hat = theta_hat(1); b_hat = theta_hat(2); g0_hat = theta_hat(3);
[q_d, dq_d, ddq_d] = desired_traj(t);
e = q - q_d; de = dq - dq_d;
k_p = 20; k_d = 8;
ddq_r = ddq_d - k_d*de - k_p*e;
dq_r = dq_d - k_p*e;
Y = [ddq_r, dq_r, sin(q)];
tau_hat = Y * theta_hat;
tau = tau_hat;
ddq = (tau - b_true*dq - g0_true*sin(q)) / m_true;
gamma = 0.1;
error = tau - tau_hat;
theta_hat_dot = -gamma * (Y.' * error);
dx = [dq; ddq; theta_hat_dot];
end
function [q_d, dq_d, ddq_d] = desired_traj(t)
q_d = 0.5 * sin(0.5 * t);
dq_d = 0.25 * cos(0.5 * t);
ddq_d = -0.125 * sin(0.5 * t);
end
end
A Simulink implementation would mirror this structure: a block for the plant dynamics, a block computing the regressor \( Y \), and an integrator block implementing the parameter update. The adaptive law will be refined later.
6.5 Wolfram Mathematica
Mathematica can symbolically derive the regressor and numerically integrate the closed-loop system:
mTrue = 2.0; bTrue = 0.4; g0True = 5.0;
kP = 20.; kD = 8.;
gamma = 0.1;
qd[t_] := 0.5*Sin[0.5*t];
dqd[t_] := D[qd[t], t];
ddqd[t_] := D[qd[t], {t, 2}];
eqns = {
q'[t] == dq[t],
dq'[t] == (tau[t] - bTrue*dq[t] - g0True*Sin[q[t]])/mTrue,
thetaHat'[t] == -gamma * Transpose[Y[t]].(tau[t] - tauHat[t])
};
Y[t_] := {ddqd[t] - kD*(dq[t] - dqd[t]) - kP*(q[t] - qd[t]),
dqd[t] - kP*(q[t] - qd[t]),
Sin[q[t]]};
tauHat[t_] := Y[t].thetaHat[t];
tau[t_] := tauHat[t];
ic = {q[0] == 0, dq[0] == 0, thetaHat[0] == {1., 0.2, 3.}};
sol = NDSolve[Join[eqns, ic], {q, dq, thetaHat}, {t, 0, 5}];
Plot[q[t] /. sol, {t, 0, 5}]
This code emphasizes the regressor structure and parameter estimates rather than a fully tuned adaptive controller. In subsequent lessons, the adaptation law will be linked directly to Lyapunov stability proofs.
7. Problems and Solutions
Problem 1 (Fixed Robust vs Adaptive Control): Consider the scalar system \( m \ddot q = \tau \) with unknown constant \( m \) satisfying \( m \in [m_{\min}, m_{\max}] \). You design a PD controller \( \tau = -k_p e - k_d \dot e \) with \( e = q - q_d \), where \( q_d \) is constant. Explain:
- How you would choose \( k_p,k_d \) to guarantee stability for all admissible \( m \).
- Why this design may be conservative compared to an adaptive scheme.
Solution:
The closed-loop error dynamics are
\[ m \ddot e + k_d \dot e + k_p e = 0. \]
Dividing by \( m \), one obtains \( \ddot e + \tfrac{k_d}{m}\dot e + \tfrac{k_p}{m} e = 0 \), whose characteristic polynomial is \( s^2 + \tfrac{k_d}{m}s + \tfrac{k_p}{m} \). A sufficient condition for asymptotic stability for all \( m \in [m_{\min}, m_{\max}] \) is
\[ k_d > 0,\quad k_p > 0 \quad\text{and}\quad \tfrac{k_d}{m_{\max}}, \tfrac{k_p}{m_{\max}} \text{ large enough to give desired damping and stiffness.} \]
Thus one typically chooses gains based on the worst case (largest inertia \( m_{\max} \)). For smaller masses the same gains may lead to very fast dynamics, actuator saturation, or excitation of unmodeled high-frequency phenomena. An adaptive scheme would estimate \( m \) online and effectively use gains scaled to the current estimate, achieving better performance without over-conservative tuning.
Problem 2 (Linear Parameterization of 1-DOF Dynamics): Show that the 1-DOF dynamics \( m \ddot q + b \dot q + g_0 \sin(q) = \tau \) are linear in the parameter vector \( \boldsymbol{\theta} = [m,\; b,\; g_0]' \). Identify the regressor \( \mathbf{Y}(q,\dot q,\ddot q) \).
Solution:
We rewrite the equation as
\[ \tau = m \ddot q + b \dot q + g_0 \sin(q) = \bigl[\,\ddot q,\; \dot q,\; \sin(q)\,\bigr] \begin{bmatrix} m \\ b \\ g_0 \end{bmatrix}. \]
Hence the regressor is \( \mathbf{Y}(q,\dot q,\ddot q) = \bigl[\,\ddot q,\; \dot q,\; \sin(q)\,\bigr] \) and the dynamics are linear in \( \boldsymbol{\theta} \).
Problem 3 (Skew-Symmetry and Energy): Let \( \mathbf{M}(\mathbf{q}) \) and \( \mathbf{C}(\mathbf{q},\mathbf{\dot q}) \) satisfy the skew-symmetry property \( \mathbf{S} = \dot{\mathbf{M}} - 2\mathbf{C} \) with \( \mathbf{x}'\mathbf{S}\mathbf{x} = 0 \) for all \( \mathbf{x} \). Show that along the unforced dynamics \( \mathbf{M}(\mathbf{q})\mathbf{\ddot q} + \mathbf{C}(\mathbf{q},\mathbf{\dot q})\mathbf{\dot q} = \mathbf{0} \) the kinetic energy \( V(\mathbf{q},\mathbf{\dot q}) = \tfrac{1}{2}\mathbf{\dot q}'\mathbf{M}(\mathbf{q})\mathbf{\dot q} \) satisfies \( \dot V = 0 \).
Solution:
Differentiate \( V \):
\[ \dot V = \tfrac{1}{2}\mathbf{\dot q}'\dot{\mathbf{M}}(\mathbf{q})\mathbf{\dot q} + \mathbf{\dot q}'\mathbf{M}(\mathbf{q})\mathbf{\ddot q}. \]
From the dynamics, \( \mathbf{M}\mathbf{\ddot q} = -\mathbf{C}\mathbf{\dot q} \), so
\[ \dot V = \tfrac{1}{2}\mathbf{\dot q}'\dot{\mathbf{M}}\mathbf{\dot q} - \mathbf{\dot q}'\mathbf{C}\mathbf{\dot q} = \tfrac{1}{2}\mathbf{\dot q}'\bigl(\dot{\mathbf{M}} - 2\mathbf{C}\bigr)\mathbf{\dot q} = \tfrac{1}{2}\mathbf{\dot q}'\mathbf{S}\mathbf{\dot q} = 0. \]
Hence the kinetic energy is conserved, consistent with the mechanical interpretation of manipulator dynamics. This property is frequently used in Lyapunov proofs for adaptive control.
Problem 4 (Assumptions on Measurement): Explain why assuming that both \( \mathbf{q} \) and \( \mathbf{\dot q} \) are measurable is important for adaptive robot control. What happens if \( \mathbf{\dot q} \) is not directly measurable?
Solution:
The regressor \( \mathbf{Y}(\mathbf{q},\mathbf{\dot q},\mathbf{\ddot q}_r) \) used in adaptive laws depends explicitly on velocities and reference accelerations. If \( \mathbf{\dot q} \) is not measured, then the regressor must be constructed using estimates of \( \mathbf{\dot q} \) (e.g. through numerical differentiation or observers). This introduces additional dynamics and potential noise amplification. Many Lyapunov-based proofs assume that the regressor is built from exact measurable signals; if those are replaced by estimates, the proofs must be modified (e.g. composite adaptation, observer-based adaptive control). Therefore, the full-state measurement assumption simplifies theory and is a standard starting point.
Problem 5 (Role of Linear Parameterization): Why is the linear parameterization property \( \mathbf{M}\mathbf{\ddot q} + \mathbf{C}\mathbf{\dot q} + \mathbf{g} = \mathbf{Y}(\cdot)\boldsymbol{\theta} \) crucial for designing Lyapunov-based adaptive laws for robots?
Solution:
In Lyapunov-based adaptive control, one typically constructs a Lyapunov function containing both tracking error and parameter-error terms, such as \( V = V_e(\mathbf{q},\mathbf{\dot q}) + \tfrac{1}{2}\tilde{\boldsymbol{\theta}}' \Gamma^{-1}\tilde{\boldsymbol{\theta}} \), where \( \tilde{\boldsymbol{\theta}} = \boldsymbol{\theta} - \hat{\boldsymbol{\theta}} \). When differentiating \( V \), the terms involving \( \tilde{\boldsymbol{\theta}} \) appear multiplied by the regressor \( \mathbf{Y} \). Because the dynamics are linear in \( \boldsymbol{\theta} \), these terms appear in an affine way that can be cancelled by choosing the parameter update law proportional to \( \mathbf{Y}' \) times certain error signals. Without linear parameterization, one would obtain nonlinear functions of \( \boldsymbol{\theta} \) that cannot be cancelled in this simple way, making the design of globally stable adaptive laws much more difficult.
8. Summary
In this lesson we motivated adaptive control for robots by highlighting the impact of parametric uncertainty on model-based controllers and the limitations of purely robust fixed-gain designs. We formalized parametric uncertainty via the regressor representation \( \mathbf{Y}(\mathbf{q},\mathbf{\dot q},\mathbf{\ddot q})\boldsymbol{\theta} \) and stated standard structural assumptions on the manipulator dynamics, measurement availability, and actuation. We also sketched the conceptual architecture of an adaptive robot controller and implemented simple simulation code in Python, C++, Java, MATLAB/Simulink, and Mathematica to illustrate how regressor-based models and parameter estimates enter software. Subsequent lessons will build on these foundations to derive concrete adaptive computed-torque structures and rigorous parameter update laws with Lyapunov stability proofs.
9. References
- Slotine, J.-J. E., & Li, W. (1987). On the adaptive control of robot manipulators. International Journal of Robotics Research, 6(3), 49–59.
- Craig, J. J., Hsu, P., & Sastry, S. S. (1987). Adaptive control of mechanical manipulators. International Journal of Robotics Research, 6(2), 16–28.
- Ortega, R., Spong, M. W., Gómez-Estern, F., & Blankenstein, G. (2002). Stabilization of a class of nonlinear systems via interconnection and damping assignment. IEEE Transactions on Automatic Control, 47(8), 1218–1233.
- Sastry, S., & Bodson, M. (1989). Adaptive Control: Stability, Convergence, and Robustness. Prentice Hall (foundational theory for Lyapunov-based adaptive laws).
- Ioannou, P. A., & Sun, J. (1996). Robust Adaptive Control. Prentice Hall.
- Narendra, K. S., & Annaswamy, A. M. (1987). Persistent excitation in adaptive systems. International Journal of Control, 45(1), 127–160.
- Slotine, J.-J. E., & Li, W. (1991). Applied Nonlinear Control. Prentice Hall (chapters on robotic adaptive control).
- Spong, M. W. (1987). Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109(4), 310–319.
- Kelly, R. (1995). A simple set-point robot controller by using only position measurements. IEEE Transactions on Automatic Control, 40(3), 569–573.
- De Luca, A. (1988). Decoupling and feedback linearization of robots with mixed rigid/elastic joints. International Journal of Robotics Research, 7(2), 66–89.