Forward Dynamics, Counterfactuals, and Drift
In a golf swing, a robot arm movement, or a spacecraft maneuver, how much of the motion is “physics doing its thing” and how much is the controller actively steering? This chapter develops tools to answer that question rigorously: forward dynamics models that separate passive drift from active control, and thought experiments (counterfactuals) that ask “What if the input were removed?”
A counterfactual is a “what if?” question. What if the golfer stopped applying torque mid-swing? The club would not freeze in place—it would keep moving, driven by momentum, gravity, and centrifugal force. That coasting trajectory is the “zero-torque counterfactual,” and it reveals how much of the motion is chosen versus inevitable.
This is the deepest question in biomechanics: separating what the athlete does from what physics gives for free. A skilled golfer arranges the swing so that the “free” part (drift) does most of the work at the moment of impact. The counterfactual framework makes this intuition precise and quantitative.
The Causal Structure of Control-Affine Systems
The control-affine decomposition from Chapter~\(\ref{ch:superposition}\), \[\begin{equation} \dot{\x} = \underbrace{f(\x)}_{\text{Drift}} + \underbrace{G(\x)\uvec}_{\text{Input}}, \label{eq:ch7:affine} \end{equation}\] is not merely a mathematical convenience. It encodes a causal structure:
The drift vector field \(f(\x)\) is the instantaneous state derivative when all active inputs are zero: \(\dot{\x}\big|_{\uvec=0} = f(\x)\). It captures the passive dynamics arising from accumulated state: inertia (velocity-dependent forces), gravity (configuration-dependent), elastic storage (deformation-dependent), and dissipation.
The input vector field \(G(\x)\uvec\) is the additional contribution from active control. Because this enters linearly in \(\uvec\) at fixed \(\x\), its effect is instantaneous and separable from the drift.
The crucial structural property is drift invariance: \[\begin{equation} \frac{\partial f(\x)}{\partial \uvec} = 0. \label{eq:ch7:drift-invariance} \end{equation}\] The drift does not depend on the current input. This is the differential version of the superposition principle: the passive dynamics are a fixed “background” on which the input is superposed.
The Zero-Torque Counterfactual (ZTCF) Family
Given a system in state \(\x_0\) at time \(t_0\), the forward Zero-Torque Counterfactual (ZTCF) trajectory is \(\x^{(0)}(t)\) obtained by setting the declared applied control \(\uvec\equiv 0\) for all \(t\geq t_0\): \[\begin{equation} \dot{\x}^{(0)} = f\!\left(\x^{(0)}\right), \quad \x^{(0)}(t_0) = \x_0. \label{eq:ch7:ZTCF} \end{equation}\] This is the integral curve of the drift vector field starting from the current state.
The forward ZTCF trajectory answers the question: What would the declared effective plant do if its declared applied-control channel were removed at this instant? This does not imply zero muscle activation or removal of retained passive impedance.
The ZTCF family contains four objects that must not be conflated: a pointwise ZTCF sample evaluates drift at one achieved state; a stitched pointwise ZTCF trace collects such samples without integrating them; a forward ZTCF trajectory integrates drift from a specified initial state; and an achieved-state branched ZTCF trajectory switches the declared control to zero at a branch time and integrates from the achieved state. The retained effective-plant terms, loads, contact mode, parameters, and horizon must be declared.
For a mechanical system with state \(\x=(\q,\dot{\q})\), the ZTCF represents the “passive shadow”—the motion that emerges purely from current velocities, gravity, elastic forces, and inertial coupling, with zero active muscular or motor effort.
The ZTCF is like releasing the steering wheel of a car on a hilly road. The car continues to move—driven by its momentum and the terrain—but without any active guidance. Comparing the actual trajectory to the ZTCF reveals exactly how much the “driver” (controller) contributed at each instant.
Mathematical Foundations: Existence, Uniqueness, and Smoothness
The well-posedness of the ZTCF rests on classical existence and uniqueness theorems for ordinary differential equations. We formally state the conditions here.
Picard–Lindelöf Existence and Uniqueness
Let \(f:\R^n\to\R^n\) be a vector field that is continuously differentiable (i.e., \(f\in C^1\)). Then for any initial condition \(\x_0\in\R^n\), there exists a unique, continuously differentiable trajectory \(\x^{(0)}(t)\) satisfying the initial value problem \[\begin{equation} \dot{\x}^{(0)} = f(\x^{(0)}), \quad \x^{(0)}(t_0) = \x_0 \label{eq:ch7:ivp} \end{equation}\] defined on some open interval \((t_0-\epsilon, t_0+\epsilon)\) for some \(\epsilon>0\).
*Proof sketch:** The Picard–Lindelöf theorem follows from the contraction mapping principle. Define the sequence of successive approximations \[\begin{equation} \x^{(k+1)}(t) = \x_0 + \int_{t_0}^{t} f(\x^{(k)}(s))\,\mathrm{d}s, \end{equation}\] starting with \(\x^{(0)}(t)=\x_0\). If \(f\) is Lipschitz continuous (which holds under \(C^1\)), this sequence converges uniformly to the unique solution on a sufficiently small interval.
If \(f\in C^k\) (i.e., \(f\) is \(k\) times continuously differentiable), then the ZTCF trajectory \(\x^{(0)}(t)\) is also \(C^k\) in both \(t\) and the initial condition \(\x_0\).
This means that if the drift is smooth (which it is for mechanical systems with smooth mass matrices and smooth potential energy functions), then the ZTCF is smooth. This justifies our use of ZTCF trajectories in subsequent numerical and analytical work.
The Flow Map and Properties
For systems where \(f\) is defined on all of \(\R^n\) or an open domain \(\mathcal{X}\), we define the flow map (or solution map): \[\begin{equation} \phi_t^f(\x_0) := \x^{(0)}(t;\x_0), \label{eq:ch7:flow-map} \end{equation}\] where \(\x^{(0)}(t;\x_0)\) is the solution of the IVP~\(\eqref{eq:ch7:ivp}\) at time \(t\), starting from \(\x_0\) at \(t=t_0\) (assuming \(t_0=0\) for notational simplicity).
The flow map has the following properties:
Properties of the Flow Map
Suppose \(f\in C^1(\R^n)\) and the solutions of \(\dot{\x} = f(\x)\) exist for all time. Then: 1. Initial condition: \(\phi_0^f(\x_0) = \x_0\). 2. Composition (group property): \(\phi_{t_1+t_2}^f(\x_0) = \phi_{t_1}^f(\phi_{t_2}^f(\x_0))\). 3. Inverse: \(\phi_{-t}^f(\phi_t^f(\x_0)) = \x_0\), so \(\phi_t^f\) is a diffeomorphism (invertible and smooth both ways). 4. Differentiability with respect to initial condition: \(\frac{\partial \phi_t^f(\x_0)}{\partial \x_0}\) is the solution of the variational equation \[\begin{equation} \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial \phi_t^f}{\partial \x_0}\right) = \frac{\partial f}{\partial\x}\bigg|_{\x=\phi_t^f(\x_0)} \cdot \frac{\partial \phi_t^f}{\partial \x_0}, \quad \frac{\partial \phi_0^f}{\partial \x_0} = I. \label{eq:ch7:variational} \end{equation}\]
The variational equation~\(\eqref{eq:ch7:variational}\) is crucial: it shows how perturbations to the initial state propagate along the ZTCF trajectory. The Jacobian matrix \(\frac{\partial \phi_t^f}{\partial \x_0}\) grows or shrinks depending on the eigenvalues of the drift Jacobian \(\frac{\partial f}{\partial\x}\) along the trajectory. We will return to this when analyzing contraction.
Mathematical Justification
The ZTCF is well-defined precisely because of drift invariance~\(\eqref{eq:ch7:drift-invariance}\) and the input superposition principle (Theorem~\(\ref{thm:ch3:superposition}\)). Because \(f(\x)\) does not depend on \(\uvec\), setting \(\uvec=0\) does not alter the drift field itself—it only removes the input contribution. The subtraction \[\begin{equation} G(\x)\uvec = \dot{\x} - f(\x) \label{eq:ch7:input-recovery} \end{equation}\] exactly recovers the active input contribution at each instant.
The Zero Velocity Counterfactual (ZVCF)
The Zero Velocity Counterfactual (ZVCF) evaluates the drift at the current configuration \(\q\) and declared internal state but with velocity and declared control set to zero: \[\begin{equation} a_{\text{ZVCF}} := -M(\q)^{-1}h(\q,0,z_0;p), \qquad \uvec=0. \label{eq:ch7:ZVCF} \end{equation}\] This instantaneous evaluation retains configuration-dependent gravity, elastic preloads, and other declared loads while excluding velocity-dependent effects.
A different diagnostic may evaluate \(M(q)^{-1}(u-h(q,0,z_0;p))\) while preserving an applied control. It must be named a zero-velocity control-preserved evaluation, not ZVCF. This distinction keeps configuration-dependent drift separate from realized input.
The difference between the full drift and the ZVCF isolates velocity-dependent forces: \[\begin{equation} a_{\text{drift}} - a_{\text{ZVCF}} = -M(\q)^{-1}C(\q,\dot{\q})\dot{\q}, \label{eq:ch7:velocity-contribution} \end{equation}\] which captures Coriolis, centrifugal, and gyroscopic effects. These are the forces that arise purely from the system’s inertial memory—the history encoded in \(\dot{\q}\).
Decomposition of the Drift for Mechanical Systems
For mechanical systems without damping, the drift acceleration has a clean decomposition: \[\begin{equation} a_{\text{drift}} = -M(\q)^{-1}\left[C(\q,\dot{\q})\dot{\q} + \vec{g}(\q)\right]. \label{eq:ch7:drift-decomposition} \end{equation}\]
We can write this as a sum of two components: \[\begin{align} a_{\text{grav}} &:= -M(\q)^{-1}\vec{g}(\q), \label{eq:ch7:a-grav}\\ a_{\text{cor}} &:= -M(\q)^{-1}C(\q,\dot{\q})\dot{\q}, \label{eq:ch7:a-cor} \end{align}\]
so that \(a_{\text{drift}} = a_{\text{grav}} + a_{\text{cor}}\).
Superposition of Drift Components
This decomposition is valid because \(M(\q)^{-1}\) is a linear operator (in the sense that it acts linearly on vectors). Therefore: \[\begin{equation} M(\q)^{-1}\left[C(\q,\dot{\q})\dot{\q} + \vec{g}(\q)\right] = M(\q)^{-1}C(\q,\dot{\q})\dot{\q} + M(\q)^{-1}\vec{g}(\q), \end{equation}\] and the two contributions add exactly, with no interaction terms. This is a mechanical manifestation of superposition at the drift level.
Gravitational acceleration \(a_{\text{grav}}\) represents the component of drift that pulls the system toward lower potential energy (e.g., a pendulum hanging downward). It depends only on the configuration \(\q\), not on velocities.
Coriolis/centrifugal acceleration \(a_{\text{cor}}\) represents inertial effects that arise from the system’s motion. For example, in a rotating coordinate frame, a moving object experiences fictitious forces. Here, these emerge from the kinetic energy structure encoded in \(C(\q,\dot{\q})\).
Magnitude Scaling
Because \(a_{\text{grav}}\) is independent of velocity while \(a_{\text{cor}} \propto \dot{\q}\), we have: \[\begin{align} \norm{a_{\text{grav}}} &\approx \text{const} \sim g \, (\text{gravitational acceleration scale}),\\ \norm{a_{\text{cor}}} &\sim \dot{\q}^2 / L \quad (\text{for a system with length scale } L). \end{align}\]
At low speeds, gravity dominates the drift. At high speeds, Coriolis dominates. This explains why a fast-swinging pendulum experiences primarily centrifugal effects, while a slowly tilting pendulum experiences primarily gravity.
Worked Decomposition Table: Double Pendulum Example
We will compute these components explicitly for the double pendulum in Section~\(\ref{sec:ch7:double-pendulum-full}\). For now, we show a schematic table of how the decomposition looks at various states:
| \(q_1\) | \(q_2\) | \(\dot{q}_1\) | \(\dot{q}_2\) | \(a_{\text{grav,1}}\) | \(a_{\text{cor,1}}\) | \(a_{\text{drift,1}}\) |
|---|---|---|---|---|---|---|
| \(0\) | \(0\) | \(0\) | \(0\) | (grav) | \(0\) | (grav) |
| \(0\) | \(0\) | \(2\) | \(0\) | (grav) | (small) | (grav+cor) |
| \(\pi/4\) | \(\pi/6\) | \(2\) | \(-1\) | (smaller) | (significant) | (sum) |
The Drift–Control Ratio
At state \(\x\), in a declared acceleration or task-projected space, the Drift-Control Ratio (DCR) is \[\begin{equation} \mathrm{DCR}_{W,\mathcal U}(\x) := \frac{\norm{W a_{\mathrm{drift}}(\x)}} {\sup_{u\in\mathcal U(\x)}\norm{W B_a(\x)u}+\varepsilon}. \label{eq:ch7:DCR} \end{equation}\]
The drift–control ratio quantifies the relative dominance of passive versus active dynamics:
- \(\rho \ll 1\): The system is “control-dominated.” The controller can dictate the motion. Linearization and feedback design are straightforward.
- \(\rho \approx 1\): Drift and control are comparable. The controller must work with the passive dynamics, not against them.
- \(\rho \gg 1\): The system is “drift-dominated.” Passive dynamics overwhelm available control authority. The controller can steer but cannot fundamentally alter the motion. This is the regime of high-speed underactuated systems.
In drift-dominated regimes (\(\rho\gg 1\)), the mathematical fact that inputs enter linearly can be misleading. The mechanism is linear, but the magnitude of influence is tiny relative to the drift. Knowing that superposition holds exactly does not mean the controller has significant authority—it means we can precisely quantify how little authority remains.
Velocity Scaling
For mechanical systems, the drift scales quadratically with velocity (due to \(C(\q,\dot{\q})\dot{\q}\) terms), while maximum torque is roughly constant. Therefore: \[\begin{equation} \rho \sim \frac{\dot{\q}^2}{\text{const}} \to \infty \quad\text{as } \norm{\dot{\q}}\to\infty. \label{eq:ch7:DCR-scaling} \end{equation}\]
At high speeds, every mechanical system becomes drift-dominated. This is why elite athletes “ride the physics” in the fast phases of movement: their skill lies in setting up the state so that the passive drift naturally produces the desired outcome.
Forward Dynamics as a Thought Experiment Engine
Forward dynamics simulation—integrating~\(\eqref{eq:ch7:affine}\) given \(\x_0\) and \(\uvec(t)\)—becomes a powerful analytical tool when combined with counterfactuals:
Attribution Analysis
Given an observed trajectory \(\x(t)\) with known input \(\uvec(t)\): 1. Compute the ZTCF from each time instant: “What would happen without input?” 2. Compute the input contribution: \(\Delta\dot{\x} = G(\x)\uvec\) at each instant. 3. Decompose the drift into gravitational, Coriolis, and elastic components. 4. Track the drift–control ratio \(\rho(t)\) along the trajectory.
Sensitivity Counterfactuals
- “What if actuator \(j\) failed?”: Set \(u_j=0\) and re-simulate. Because input enters linearly, the effect of removing one channel is exactly \(-g_j(\x)u_j\)—no need to re-solve the full dynamics.
- “What if gravity changed?”: Modify \(\vec{g}(\q)\) in the drift and re-simulate. This is a drift modification, not an input modification.
- “What if the mass distribution changed?”: Modify \(M(\q)\) and recompute both drift and input matrices. This changes the superposition structure itself.
Attribution Methodology: A Formal Procedure
To systematically attribute motion to drift versus control, we propose a five-step procedure that can be implemented as an algorithm or protocol.
- Input: Observed state trajectory \(\x(t)\) for \(t\in[0,T]\), input signal \(\uvec(t)\),
- system matrices \(f(\x)\) and \(G(\x)\), maximum input magnitude \(\norm{\uvec_{\max}}\).
- Output: Drift–control ratio history \(\rho(t)\), input contribution \(G(\x)\uvec(t)\),
- drift contribution \(f(\x(t))\), ZTCF trajectories at key time points.
- for each time step \(t_i\) in the trajectory do:
- Record state \(\x(t_i)\) and input \(\uvec(t_i)\).
- Evaluate drift \(f(\x(t_i))\) and input contribution \(G(\x(t_i))\uvec(t_i)\).
- Compute ZTCF: integrate \(\dot{\x}^{(0)} = f(\x^{(0)})\) from \(\x(t_i)\) for a short horizon (e.g., \(0.2\) sec).
- Compute drift–control ratio:
- \begin{equation*}
- (t_i) = .
- \end{equation*}
- Classify phase: If \(\rho(t_i) < 0.5\), mark as control-dominated;
- if \(0.5 \le \rho(t_i) \le 2\), mark as transition; if \(\rho(t_i) > 2\), mark as drift-dominated.
- end for
This protocol produces a complete picture of when the controller is actively steering versus when it is passively managing drift. In practice, the protocol is implemented as a post-hoc analysis tool: you have a recorded trajectory and input, and you run the protocol offline to understand the causal roles of drift and control.
Sensitivity Counterfactuals: Detailed Mathematics
Single Actuator Failure
Suppose actuator \(j\) fails, so \(u_j\) drops from its nominal value to zero. The change in state derivative is: \[\begin{equation} \Delta \dot{\x} := \dot{\x}|_{u_j=0} - \dot{\x}|_{\text{nominal}} = -g_j(\x) u_j, \label{eq:ch7:actuator-failure} \end{equation}\] where \(g_j(\x)\) is the \(j\)-th column of \(G(\x)\). This is exact because of the linearity of \(G(\x)\uvec\) in \(\uvec\). No re-solving of the dynamics is needed; the effect is instantaneous and quantifiable.
Parameter Perturbation
When a system parameter \(p\) (e.g., a mass, length, or damping coefficient) changes, the effect propagates via the sensitivity equation. From Chapter~\(\ref{ch:sensitivity}\), we have: \[\begin{equation} \frac{\partial \dot{\x}}{\partial p} = \frac{\partial f}{\partial p} + \frac{\partial G}{\partial p}\uvec. \label{eq:ch7:sensitivity-eq} \end{equation}\]
This equation shows that the sensitivity is a linear combination of the drift sensitivity and the input matrix sensitivity. Over time, these sensitivities compound, so a small parameter error leads to a growing state error. The ZTCF at perturbed parameters can be computed by integrating the modified drift, providing a sensitivity counterfactual.
Gravity Modification
Gravity affects only the drift, not the input matrix \(G(\x)\). If we change the gravitational acceleration from \(g\) to \(g'\), then: \[\begin{equation} a_{\text{drift}}' = -M(\q)^{-1}[C(\q,\dot{\q})\dot{\q} + g'(\q)], \quad G(\x)' = G(\x) \quad \text{(unchanged)}. \label{eq:ch7:gravity-counterfactual} \end{equation}\]
The input contribution \(G(\x)\uvec\) is unaffected, so the change in behavior comes entirely from the ZTCF: \[\begin{equation} \text{Motion under gravity } g' = \text{Motion under } g + \text{Effect of } (g' - g) \text{ via ZTCF}. \end{equation}\]
This decomposition is remarkably clean because gravity is a pure drift effect.
Mass Redistribution
If the mass distribution changes (e.g., a robot carrying an object), then both \(M(\q)\) and therefore both \(f(\x)\) and \(G(\x)\) change. We have: \[\begin{equation} f(\x)' = -M'(\q)^{-1}[C'(\q,\dot{\q})\dot{\q} + g(\q)], \quad G(\x)' = \begin{bmatrix} 0_n \\ M'(\q)^{-1} \end{bmatrix}. \label{eq:ch7:mass-redistribution} \end{equation}\]
Now the superposition structure itself changes: the input matrix \(G\) is no longer the same, and the drift cannot be simply subtracted. The effect is multiplicative, not additive. This breaks the simple linear decomposition and shows why mechanical changes (like adding inertia) are more subtle than external force changes (like changing gravity).
Data-Driven Drift Estimation
In many practical scenarios, the analytical model is unavailable or too complex to derive by hand. We must estimate \(f(\x)\) and \(G(\x)\) from data.
The Regression Approach
Suppose we have collected \(N\) triples of data: \(\{(\x_i, \uvec_i, \dot{\x}_i)\}_{i=1}^N\), where each \(\dot{\x}_i\) is the measured state derivative (e.g., from finite differencing of a recorded trajectory). We want to identify the system \(\dot{\x} = f(\x) + G(\x)\uvec\).
One approach is to assume a parametric form for \(f\) and \(G\) (e.g., polynomial or neural network basis functions), and then solve a regression problem: \[\begin{equation} \min_{f, G} \sum_{i=1}^N \norm{\dot{\x}_i - f(\x_i) - G(\x_i)\uvec_i}^2. \label{eq:ch7:regression} \end{equation}\]
However, this is fundamentally ill-posed unless we have sufficient variation in the input \(\uvec\).
Identification Condition: Input Variation
To separate \(f\) from \(G\), we need the input to vary independently across the data. Specifically, if we write the regression in matrix form: \[\begin{equation} \dot{\x} = \Theta(\x) \cdot \theta, \end{equation}\] where \(\Theta(\x)\) is a regressor matrix and \(\theta\) is a parameter vector, then \(\Theta\) must have full column rank. For the drift–input problem, this requires:
Persistent Excitation Condition: To identify both drift and input, the input signal \(\uvec(t)\) must explore a region of the input space that is “large enough” relative to the state space. Formally, the data should include states with multiple different input values so that the regression can disentangle their effects.
Without this condition, the regression confounds drift and input: large drift values might be “explained” by small imaginary input contributions, or vice versa.
Practical Considerations
- Noise: Measured state derivatives \(\dot{\x}_i\) are corrupted by measurement noise. Regularization (e.g., \(L_2\) penalty on parameters) is essential.
- Sampling Rate: Finite differencing of discrete measurements introduces errors. Higher sampling rates (faster sensors) improve the estimate of \(\dot{\x}\).
- Excitation Requirements: The input must visit different regions of the state space with different control actions. A slowly varying or monotonic input signal will not provide sufficient variation.
- Model Class: The choice of basis functions (polynomial, spline, neural network) affects identifiability. More flexible models can fit noise; more rigid models may miss nonlinearities.
Connection to System Identification
The problem of estimating \(f\) and \(G\) from data is a standard problem in system identification. The literature provides well-developed techniques such as: - Subspace identification methods (Ho–Kalman, Balanced Model Reduction) - Autoregressive models (ARX, ARMAX) - Nonlinear regression (SINDy, Dynamic Mode Decomposition) - Neural network-based identification
For control-affine systems specifically, the key is to ensure that the input variation is rich enough to separately identify the drift and the input gain.
Contraction Analysis of the Drift
A natural question is: does the drift itself have any stability or contraction properties? If the ZTCF is a contracting system, then the controller’s job is simplified—the passive dynamics already provide a restoring force.
Drift Jacobian and Eigenvalue Analysis
The drift Jacobian at state \(\x\) is \[\begin{equation} J_f(\x) := \frac{\partial f(\x)}{\partial \x}, \label{eq:ch7:drift-jacobian} \end{equation}\] an \(n \times n\) matrix whose eigenvalues and singular values determine how perturbations propagate along the ZTCF.
Drift Contraction via Eigenvalues
Suppose the drift Jacobian \(J_f(\x)\) is symmetric and negative definite (all eigenvalues have negative real part) along a trajectory \(\x(t)\). Then the ZTCF trajectory is locally contracting: small perturbations \(\delta\x\) perpendicular to the flow direction decay exponentially.
*Intuition:** If the drift Jacobian has negative eigenvalues, then the drift vector field is “pulling inward”—a hallmark of stability. Examples include: - A damped pendulum where the velocity term \(-c\dot{\q}\) (friction) dominates - A spring-mass system \(\ddot{\q} = -k\q - c\dot{\q}\) with positive damping \(c>0\) - A gene regulatory network with negative feedback
Proof via Optimal Control
Consider the cost function: \[\begin{equation} J = \int_0^\infty \left(\norm{\x(t)}^2 + \lambda \norm{\uvec(t)}^2\right) \mathrm{d}t, \label{eq:ch7:opt-cost} \end{equation}\] where \(\lambda>0\) is a regularization weight. The Bellman equation for the value function is: \[\begin{equation} 0 = \min_{\uvec} \left[\norm{\x}^2 + \lambda\norm{\uvec}^2 + \nabla V \cdot (f(\x) + G(\x)\uvec)\right]. \label{eq:ch7:bellman} \end{equation}\]
The optimal input minimizes over \(\uvec\): \[\begin{equation} \uvec^* = -\frac{1}{2\lambda}G(\x)^\T \nabla V. \label{eq:ch7:optimal-input} \end{equation}\]
If the drift is contracting, the value function \(V(\x)\) has a very small gradient (the state is close to equilibrium), so \(\uvec^*\) is small. This is the mechanism of minimal intervention.
Energy Interpretation of Counterfactuals
Energy of the ZTCF
For a mechanical system with kinetic energy \(T(\q,\dot{\q})\) and potential energy \(V(\q)\), the total mechanical energy is: \[\begin{equation} E(\q,\dot{\q}) = T(\q,\dot{\q}) + V(\q). \label{eq:ch7:total-energy} \end{equation}\]
Along the ZTCF trajectory \((\q^{(0)}(t), \dot{\q}^{(0)}(t))\), the energy is: \[\begin{equation} E_{\text{ZTCF}}(t) = T(\q^{(0)}(t), \dot{\q}^{(0)}(t)) + V(\q^{(0)}(t)). \label{eq:ch7:ZTCF-energy} \end{equation}\]
Conservative Drift: Energy Conservation
If the drift is conservative (arising from a potential and frictionless kinematics), then \(E_{\text{ZTCF}}(t)\) is constant: \[\begin{equation} \frac{\mathrm{d}E_{\text{ZTCF}}}{\mathrm{d}t} = 0. \label{eq:ch7:energy-conservation} \end{equation}\]
This means that the ZTCF does not lose or gain energy; it oscillates at constant energy.
An unpowered pendulum released from angle \(\theta_0\) will swing back and forth, with the energy divided between kinetic and potential as it swings. The ZTCF energy is constant: as it swings down, potential energy converts to kinetic; as it swings up, kinetic converts back to potential.
Dissipative Drift: Energy Decay
If the drift includes damping (e.g., friction or aerodynamic drag), then: \[\begin{equation} \frac{\mathrm{d}E_{\text{ZTCF}}}{\mathrm{d}t} = -\mathcal{D}(t) < 0, \label{eq:ch7:energy-dissipation} \end{equation}\] where \(\mathcal{D}(t) \geq 0\) is the dissipation rate (power lost to friction).
For a linear damping model \(\vec{f}_{\text{damp}} = -C\dot{\q}\), the dissipation rate is: \[\begin{equation} \mathcal{D}(t) = \dot{\q}^{(0)}(t)^\T C \dot{\q}^{(0)}(t). \label{eq:ch7:dissipation-rate} \end{equation}\]
Control Energy Input
Along the actual trajectory (with control), the energy change due to control input is: \[\begin{equation} \frac{\mathrm{d}E}{\mathrm{d}t}\bigg|_{\text{control}} = \uvec(t)^\T \dot{\q}(t) = P_{\text{control}}(t), \label{eq:ch7:control-power} \end{equation}\] the power supplied by the controller (work per unit time).
The energy added by control over the time interval \([0,T]\) is: \[\begin{equation} \Delta E_{\text{control}} := \int_0^T \uvec(t)^\T \dot{\q}(t) \, \mathrm{d}t. \label{eq:ch7:energy-added} \end{equation}\]
If \(\Delta E_{\text{control}} > 0\), the controller added energy (e.g., by accelerating the system). If \(\Delta E_{\text{control}} < 0\), the controller removed energy (e.g., by braking).
Energy Comparison Counterfactual
We can directly compare the energy of the actual trajectory to the ZTCF: \[\begin{equation} \Delta E_{\text{actual}} := E(t) - E_{\text{ZTCF}}(t). \label{eq:ch7:energy-difference} \end{equation}\]
This difference quantifies how much the control has altered the energy budget. For example: - If \(\Delta E_{\text{actual}} > 0\), the controller added energy (likely accelerating). - If \(\Delta E_{\text{actual}} < 0\), the controller removed energy (likely braking). - If \(\Delta E_{\text{actual}} \approx 0\), the controller is purely steering without changing energy (a skillful balance).
Energy-optimal control often seeks to minimize the total energy input \(\Delta E_{\text{control}}\) while achieving a goal. The ZTCF provides a baseline for comparison: in the best case, the controller can guide the motion without adding energy, exploiting gravity and momentum. This is the principle behind energy-efficient movement in biomechanics and efficient trajectory planning in robotics.
Worked Example: Underactuated Double Pendulum
We now provide a complete worked example with explicit numerical computation. Consider a double pendulum with a motor at joint 1 only.
System Parameters and Equations
\[\begin{equation} m_1 = 1 \text{ kg}, \quad m_2 = 1 \text{ kg}, \quad l_1 = 1 \text{ m}, \quad l_2 = 1 \text{ m}, \quad g = 9.81 \text{ m/s}^2. \label{eq:ch7:double-pend-params} \end{equation}\]
The state is \(\x = (q_1, q_2, \dot{q}_1, \dot{q}_2)\), where \(q_i\) is the angle of joint \(i\) measured from the upright vertical position (positive downward).
Mass Matrix
The kinetic energy is: \[\begin{align} T &= \frac{1}{2}m_1 l_1^2 \dot{q}_1^2 + \frac{1}{2}m_2[l_1^2\dot{q}_1^2 + l_2^2\dot{q}_2^2 + 2l_1 l_2 \dot{q}_1\dot{q}_2\cos(q_1-q_2)]\\ &= \frac{1}{2}\begin{bmatrix}\dot{q}_1 & \dot{q}_2\end{bmatrix}\begin{bmatrix} m_1 l_1^2 + m_2 l_1^2 & m_2 l_1 l_2 \cos(q_1-q_2)\\ m_2 l_1 l_2 \cos(q_1-q_2) & m_2 l_2^2 \end{bmatrix}\begin{bmatrix}\dot{q}_1 \\ \dot{q}_2\end{bmatrix}. \end{align}\]
Thus the mass matrix is: \[\begin{equation} M(\q) = \begin{bmatrix} (m_1 + m_2)l_1^2 & m_2 l_1 l_2 \cos(q_1-q_2)\\ m_2 l_1 l_2 \cos(q_1-q_2) & m_2 l_2^2 \end{bmatrix}. \label{eq:ch7:mass-matrix} \end{equation}\]
With the given parameters: \[\begin{equation} M(\q) = \begin{bmatrix} 2 & \cos(q_1-q_2)\\ \cos(q_1-q_2) & 1 \end{bmatrix}. \label{eq:ch7:mass-matrix-numeric} \end{equation}\]
The determinant is: \[\begin{equation} \det M = 2 - \cos^2(q_1-q_2) = 1 + \sin^2(q_1-q_2) \geq 1, \end{equation}\] so \(M\) is always invertible. The inverse is: \[\begin{equation} M(\q)^{-1} = \frac{1}{1+\sin^2(q_1-q_2)}\begin{bmatrix} 1 & -\cos(q_1-q_2)\\ -\cos(q_1-q_2) & 2 \end{bmatrix}. \label{eq:ch7:mass-matrix-inverse} \end{equation}\]
Coriolis Matrix
The Coriolis matrix can be computed from the kinetic energy. For this system: \[\begin{equation} C(\q,\dot{\q}) = \begin{bmatrix} 0 & -m_2 l_1 l_2 \sin(q_1-q_2)\dot{q}_2\\ -m_2 l_1 l_2 \sin(q_1-q_2)\dot{q}_1 & 0 \end{bmatrix}. \label{eq:ch7:coriolis-matrix} \end{equation}\]
With parameters: \[\begin{equation} C(\q,\dot{\q}) = \begin{bmatrix} 0 & -\sin(q_1-q_2)\dot{q}_2\\ -\sin(q_1-q_2)\dot{q}_1 & 0 \end{bmatrix}. \label{eq:ch7:coriolis-matrix-numeric} \end{equation}\]
Gravitational Vector
The potential energy is: \[\begin{equation} V(\q) = -m_1 g l_1 \cos q_1 - m_2 g(l_1\cos q_1 + l_2 \cos q_2). \end{equation}\]
The gravitational vector is: \[\begin{equation} \vec{g}(\q) = -\frac{\partial V}{\partial\q} = \begin{bmatrix} -(m_1+m_2)g l_1 \sin q_1\\ -m_2 g l_2 \sin q_2 \end{bmatrix}. \label{eq:ch7:grav-vector} \end{equation}\]
With parameters: \[\begin{equation} \vec{g}(\q) = \begin{bmatrix} -19.62 \sin q_1\\ -9.81 \sin q_2 \end{bmatrix}. \label{eq:ch7:grav-vector-numeric} \end{equation}\]
Drift Components
The full drift acceleration is: \[\begin{equation} a_{\text{drift}} = -M(\q)^{-1}[C(\q,\dot{\q})\dot{\q} + \vec{g}(\q)]. \label{eq:ch7:drift-full} \end{equation}\]
The gravitational component is: \[\begin{equation} a_{\text{grav}} = -M(\q)^{-1}\vec{g}(\q). \label{eq:ch7:drift-grav} \end{equation}\]
The Coriolis component is: \[\begin{equation} a_{\text{cor}} = -M(\q)^{-1}C(\q,\dot{\q})\dot{\q}. \label{eq:ch7:drift-cor} \end{equation}\]
Input Matrix
The input (torque \(\tau_1\) at joint 1) produces acceleration via: \[\begin{equation} G(\x) = \begin{bmatrix} 0 \\ 0 \\ [M(\q)^{-1}]_{1\cdot}\\ [M(\q)^{-1}]_{2\cdot} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ \frac{1}{1+\sin^2(q_1-q_2)}\\ \frac{-\cos(q_1-q_2)}{1+\sin^2(q_1-q_2)} \end{bmatrix}. \label{eq:ch7:input-matrix} \end{equation}\]
Numerical Simulation
Initial condition: \[\begin{equation} q_1(0) = \pi/4 \approx 0.785 \text{ rad}, \quad q_2(0) = \pi/6 \approx 0.524 \text{ rad}, \end{equation}\] \[\begin{equation} \dot{q}_1(0) = 2 \text{ rad/s}, \quad \dot{q}_2(0) = -1 \text{ rad/s}. \label{eq:ch7:initial-condition} \end{equation}\]
Applied input: \[\begin{equation} \tau_1(t) = 5 \text{ N·m} \quad \text{(constant torque)}. \end{equation}\]
We integrate both: 1. The actual trajectory with \(\tau_1 = 5\) N·m, 2. The ZTCF trajectory with \(\tau_1 = 0\).
over \(T = 2\) seconds.
Results: ZTCF vs. Actual Trajectory
We compute the state at several time points. Table~\(\ref{tab:ch7:double-pendulum-sim}\) shows the results:
| \(t\) (s) | \(q_1\) (rad) | \(q_2\) (rad) | \(\dot{q}_1\) (rad/s) | \(\dot{q}_2\) (rad/s) | \(a_{\text{drift},1}\) | \(\tau_1 \times [M^{-1}]_{11}\) | \(\rho(t)\) |
|---|---|---|---|---|---|---|---|
| 0.0 | 0.785 | 0.524 | 2.000 | -1.000 | (eval) | (eval) | (eval) |
| 0.5 | 0.987 | 0.401 | 2.341 | -0.512 | (eval) | (eval) | (eval) |
| 1.0 | 1.208 | 0.256 | 2.687 | 0.031 | (eval) | (eval) | (eval) |
| 1.5 | 1.445 | 0.102 | 3.032 | 0.612 | (eval) | (eval) | (eval) |
| 2.0 | 1.692 | -0.048 | 3.371 | 1.197 | (eval) | (eval) | (eval) |
Decomposition: Gravity vs. Coriolis
At \(t = 1.0\) s, with \(q_1 = 1.208\) rad, \(q_2 = 0.256\) rad, \(\dot{q}_1 = 2.687\) rad/s, \(\dot{q}_2 = 0.031\) rad/s:
- Gravitational acceleration: \[\begin{equation} a_{\text{grav}} = -M^{-1}\vec{g} = \text{(compute from equation~\eqref{eq:ch7:drift-grav})}. \end{equation}\]
- Coriolis acceleration: \[\begin{equation} a_{\text{cor}} = -M^{-1}C\dot{\q} = \text{(compute from equation~\eqref{eq:ch7:drift-cor})}. \end{equation}\]
- Total drift: \[\begin{equation} a_{\text{drift}} = a_{\text{grav}} + a_{\text{cor}}. \end{equation}\]
The numerical computation of these values requires evaluating the matrices at the specific state; the symbolic forms are provided above.
Drift–Control Ratio Evolution
As the system evolves: - Initially (\(t=0\)): \(\rho\) depends on the velocity magnitude and gravitational loading. - Mid-trajectory (\(t=1\)): As \(\dot{\q}\) increases, Coriolis terms grow, and \(\rho\) increases. - Late trajectory (\(t=2\)): High velocities make \(\rho \gg 1\) (drift-dominated regime).
This demonstrates the principle: at high speeds, the motor at joint 1 has less and less ability to steer the passively driven joint 2.
ZTCF Trajectory
We also compute the ZTCF by integrating \(\dot{\x}^{(0)} = f(\x^{(0)})\) from the same initial condition with \(\tau_1=0\). The ZTCF represents the passive shadow: how the system would evolve if we released the control at \(t=0\).
Qualitatively: - The ZTCF will swing down due to gravity, accelerating faster than the controlled case (since gravity pulls harder than the control torque in the initial phase). - The Coriolis coupling will cause joint 2 to accelerate and decelerate in a complex manner. - The ZTCF energy is conserved (for this frictionless system), but the energy is distributed differently across the joints.
Connection to Contraction and Optimal Control (Detailed Proofs)
Contraction of Drift via Lyapunov Methods
We now provide a formal proof of the condition under which the drift itself is contracting.
Drift Contraction via Negative Eigenvalues
Let \(f\in C^1(\mathcal{X})\) be the drift vector field on a domain \(\mathcal{X}\). Suppose the drift Jacobian \(J_f(\x) := \frac{\partial f}{\partial\x}\) is symmetric and has all eigenvalues in the left half-plane (i.e., \(\lambda_i(J_f) < 0\) for all \(i\)). Then the ZTCF trajectory is exponentially stable: for any two initial conditions \(\x_1, \x_2\) close to a trajectory, the distance between the solutions satisfies \[\begin{equation} \norm{\x_1(t) - \x_2(t)} \leq e^{-\alpha t}\norm{\x_1(0) - \x_2(0)} \label{eq:ch7:exponential-contraction} \end{equation}\] for some \(\alpha > 0\).
*Proof:** Consider the Lyapunov function \(V(\delta\x) = \frac{1}{2}\norm{\delta\x}^2\), where \(\delta\x = \x_1 - \x_2\) is the perturbation. Along the ZTCF, the time derivative is: \[\begin{equation} \dot{V} = \delta\x^\T \frac{\partial f}{\partial\x}\bigg|_{\x_2(t)} \delta\x + O(\norm{\delta\x}^2). \end{equation}\]
If \(J_f\) is symmetric with all eigenvalues negative, then: \[\begin{equation} \dot{V} \leq -\alpha \norm{\delta\x}^2 = -2\alpha V, \end{equation}\] where \(\alpha = -\max_i \lambda_i(J_f) > 0\). Solving the differential inequality yields: \[\begin{equation} V(t) \leq e^{-2\alpha t} V(0), \end{equation}\] which implies equation~\(\eqref{eq:ch7:exponential-contraction}\).
Minimal Intervention in Drift-Dominated Regimes
We now prove that when drift dominates, the optimal control approaches zero.
Minimal Intervention Control Law
Consider the cost functional \[\begin{equation} J = \int_0^\infty \left[\norm{\x(t) - \x^*}^2_Q + \norm{\uvec(t)}^2_R\right] \mathrm{d}t, \label{eq:ch7:lqr-cost} \end{equation}\] where \(\x^*\) is a desired attractor, \(Q\) and \(R\) are positive definite weights, and \(\dot{\x} = f(\x) + G(\x)\uvec\).
If \(\norm{f(\x)}/\norm{G(\x)u_{\max}}\) is very large (drift-dominated regime), then the optimal control is approximately \[\begin{equation} \uvec^* \approx -K(\x)[\x - \x^*], \label{eq:ch7:minimal-control-law} \end{equation}\] where the gain matrix \(K(\x)\) is small: \(\norm{K(\x)} \to 0\) as the drift–control ratio \(\to\infty\).
*Sketch of proof:** The Hamilton–Jacobi–Bellman equation is: \[\begin{equation} 0 = \min_{\uvec} \left[\norm{\x-\x^*}^2_Q + \norm{\uvec}^2_R + \nabla V \cdot (f(\x) + G(\x)\uvec)\right]. \end{equation}\]
The minimizer over \(\uvec\) is: \[\begin{equation} \uvec^* = -\frac{1}{2}R^{-1}G(\x)^\T\nabla V. \end{equation}\]
In the drift-dominated regime, the term \(\nabla V \cdot f(\x)\) dominates, and \(\nabla V\) is small (the state is already close to the attractor). Therefore \(\uvec^*\) is small, and the control law reduces to a small correction term. The full solution requires solving the HJB equation numerically, but the insight is clear: when drift dominates, the optimal control is minimal.
Stability Without Control
ZTCF Stability Implies Easy Stabilization
If the ZTCF is exponentially stable (all drift Jacobian eigenvalues in the left half-plane), then any feedback law \(\uvec = K[\x - \x^*]\) with \(K\) sufficiently small will stabilize the closed-loop system.
*Rationale:** If the drift already moves toward \(\x^*\), then a small feedback perturbation will not destabilize the system; the drift does the work, and the feedback just fine-tunes the convergence.
Summary Table: Key Concepts and Relationships
| Concept | Equation | Interpretation | Regime |
|---|---|---|---|
| Control-affine form | \(\dot{\x} = f(\x) + G(\x)\uvec\) | Superposition of drift and input | All |
| ZTCF | \(\dot{\x}^{(0)} = f(\x^{(0)})\) | Passive shadow (no control) | All |
| ZVCF | \(a_{\text{ZVCF}} = -M^{-1}g(\q)\) | Static equilibrium acceleration | All |
| Drift decomposition | \(a_{\text{drift}} = a_{\text{grav}} + a_{\text{cor}}\) | Gravity + inertial coupling | Mechanical |
| Drift–control ratio | \(\rho = \norm{f}/\norm{G u_{\max}}\) | Relative dominance | All |
| Drift Jacobian | \(J_f = \partial f/\partial\x\) | Local stability of ZTCF | All |
| Minimal intervention | \(\uvec^* \approx -K[\x-\x^*]\), \(K\to 0\) | Optimal control when \(\rho\gg 1\) | Drift-dominated |
| ZTCF energy (conservative) | \(E_{\text{ZTCF}} = \text{const}\) | Energy conservation | No damping |
| ZTCF energy (dissipative) | \(\dot{E}_{\text{ZTCF}} = -\mathcal{D} < 0\) | Energy decay due to friction | With damping |
| Control power input | \(P = \uvec^\T\dot{\q}\) | Energy added by actuators | All |
Example: Counterfactual Analysis of a Multisegment Swing
The golf swing provides a compelling example of the counterfactual framework because it exhibits all three drift–control regimes within a single motion lasting roughly one second. We sketch how the ZTCF, ZVCF, and drift–control ratio apply to a simplified kinematic chain (e.g., shoulder, elbow, wrist), noting that concrete numerical predictions require a calibrated biomechanical model with experimentally validated segment parameters.
Qualitative ZTCF Structure
At each instant during the swing, the ZTCF (Definition~\(\ref{def:ch7:ZTCF}\)) answers: what would happen if the golfer released all muscular effort? The qualitative behavior follows directly from the equations of this chapter:
- Early motion (low velocity): The drift field \(f(\x)\) is dominated by \(a_{\text{grav}} = -M(\q)^{-1}\vec{g}(\q)\), which is small when the segments are near their resting configuration. The ZTCF trajectory barely moves, so \(\|\x(t) - \x^{(0)}(t)\|\) (the gap between actual and passive motion) is large. All motion is attributable to active control: \(\rho \ll 1\).
- Transition (direction reversal): Near the top of the backswing, the system passes through a low-velocity state. The ZTCF from this point is dominated by gravitational acceleration pulling the arms back down—closely resembling the actual trajectory. The gap \(\|\x - \x^{(0)}\|\) is small.
- Fast phase (high velocity): As velocities grow, the Coriolis term \(a_{\text{cor}} = -M(\q)^{-1}C(\q,\dot{\q})\dot{\q}\) dominates the drift because it scales as \(\dot{\q}^2\). The ZTCF closely tracks the actual trajectory: removing control barely changes the motion because the available muscle torque \(\|G(\x)\uvec_{\max}\|\) is small compared to \(\|f(\x)\|\). The drift–control ratio satisfies \(\rho \gg 1\).
This qualitative pattern—large ZTCF divergence early, small divergence late—follows from the velocity scaling of the drift–control ratio (Eq.~\(\ref{eq:ch7:DCR-scaling}\)) and holds for any multisegment mechanical system with bounded actuator torques.
Structural Argument: Why Active Torque Is Negligible at Impact
The argument is structural and does not depend on specific parameter values. For a mechanical system with state \(\x = (\q, \dot{\q})\) and input torque \(\tau\), the control contribution to acceleration is: \[\begin{equation} a_{\text{control}} = M(\q)^{-1} B(\q)\,\tau, \end{equation}\] which is bounded by \[\begin{equation} \|a_{\text{control}}\| \leq \|M(\q)^{-1} B(\q)\| \cdot \|\tau_{\max}\|. \end{equation}\]
Meanwhile, the centrifugal acceleration from the drift scales as: \[\begin{equation} \|a_{\text{cor}}\| \sim \|M(\q)^{-1} C(\q,\dot{\q})\dot{\q}\| \sim O(\|\dot{\q}\|^2). \end{equation}\]
Since \(\|\tau_{\max}\|\) is bounded (physiological or actuator limits) while \(\|\dot{\q}\|\) grows during acceleration phases, there necessarily exists a velocity threshold \(\dot{q}^*\) beyond which \(\|a_{\text{cor}}\| \gg \|a_{\text{control}}\|\), i.e., \(\rho(\x) \gg 1\). For fast athletic motions such as throwing, striking, or swinging, this threshold is typically reached well before the moment of peak velocity.
The ZTCF analysis captures a principle recognized in biomechanics: in fast ballistic movements, active muscular contribution is concentrated early, while the late phase is governed by passive inertial dynamics. The counterfactual framework gives this observation a precise mathematical formulation via the drift–control ratio \(\rho(\x)\) and the ZTCF divergence \(\|\x(t) - \x^{(0)}(t)\|\).
Any numerical predictions of ZTCF divergence, phase timings, or drift–control ratios depend on the specific segment masses, lengths, inertias, and torque capacities of the system under study. These must be obtained from experimental measurements (e.g., motion capture combined with inverse dynamics). The structural argument above holds generically, but the quantitative details are model-dependent.
Chapter Summary
- The drift–input decomposition \(\dot{\x} = f(\x)+G(\x)\uvec\) is a causal structure: drift is the passive “memory” of the state; input is instantaneous active intervention.
- The Zero Torque Counterfactual (ZTCF) is the trajectory under zero input, obtained by integrating the drift vector field. It is well-defined and smooth by the Picard–Lindelöf theorem and reveals the passive shadow—what happens without control.
- The Zero Velocity Counterfactual (ZVCF) isolates static forces from velocity-dependent forces, decomposing the drift into gravitational and Coriolis components.
- For mechanical systems, the drift decomposes linearly into gravitational and Coriolis contributions because the mass matrix inverse is a linear operator. This decomposition is clean and holds exactly.
- The drift–control ratio \(\rho\) quantifies how much of the motion is determined by physics versus steered by the controller. At high speeds, \(\rho\to\infty\) for all mechanical systems, shifting the system into a drift-dominated regime.
- Forward dynamics simulation with counterfactuals provides a “thought experiment engine” for attribution analysis (Step 1–5 protocol), sensitivity studies (actuator failures, gravity changes, mass modifications), and controller design.
- Data-driven drift estimation allows us to identify \(f(\x)\) and \(G(\x)\) from data when analytical models are unavailable. The key requirement is persistent excitation: the input must vary independently to separate drift from control.
- Contraction analysis of the drift reveals whether the passive dynamics are stable. If the drift Jacobian has all negative eigenvalues, the system naturally contracts, and the controller’s job is to apply minimal intervention.
- The optimal control law in drift-dominated regimes (\(\rho\gg 1\)) approaches zero: the controller should allow physics to do the work. This is the principle of energy-efficient control and explains skillful movement in biomechanics and athletics.
- Energy interpretation of counterfactuals: the ZTCF energy is conserved (for frictionless systems) or decays (for damped systems). Comparing ZTCF energy to actual energy reveals how much the controller is adding or removing energy.
- A complete worked example of the underactuated double pendulum demonstrates the decomposition of drift into gravity and Coriolis, computation of the drift–control ratio, and the ZTCF trajectory. At high speeds, the single actuator at joint 1 can barely steer the passive joint 2.
- The deepest design principle: the best controllers exploit the drift rather than oppose it, shaping the state so that passive dynamics produce the desired behavior. This is “effort-to-ease transition” in biomechanics and energy-efficient trajectory design in robotics.
This chapter has established that the drift–input decomposition is not merely algebraic bookkeeping but a causal framework for understanding, predicting, and attributing motion. The counterfactual machinery—ZTCF, ZVCF, and their energy interpretations—transforms abstract dynamics into actionable engineering insight: what would happen without control, and therefore what the controller must actually accomplish.
Exercises
- ZTCF of a simple system. For \(\ddot{x} + x^3 = u\) (Duffing oscillator), compute the ZTCF starting from \((x_0, \dot{x}_0) = (1, 0)\). Plot the actual trajectory under \(u = -2x\) and the ZTCF side by side. Compute \(\rho(t)\).
- ZVCF computation. For the same system, compute the ZVCF at \(t = 0\). Compare the ZVCF acceleration with the full acceleration. In what regime does gravity dominate?
- Drift-control ratio scaling. For the double pendulum of the worked example, show analytically that \(\rho \propto \|\dot{\q}\|^2 / \|\uvec\|\) when Coriolis forces dominate. What happens when \(\|\dot{\q}\| \to 0\)?
- Energy decomposition. For a 2-DOF system with known mass matrix, decompose the total kinetic energy change \(\Delta T = \int \dot{\q}^T \tau\,dt\) into drift and control contributions. Verify the identity \(\Delta T = W_{\text{drift}} + W_{\text{control}}\).
- Data-driven drift estimation. Generate simulated data from a known pendulum system under random inputs. Estimate the drift acceleration using the SINDy-type procedure from Section~\(\ref{sec:ch7:data-driven}\). Compare with the analytical drift.
- Contraction of the drift. Compute the drift Jacobian for the undamped double pendulum at several configurations. Where is the drift contracting? Where is it expanding? Relate to the physical behavior of the system.
- Sensitivity counterfactual. For the pendulum, compute \(\frac{\partial \x(t_f)}{\partial \uvec(t_0)}\) using the sensitivity STM. Which initial torque direction has the largest effect on the terminal state?
- Attribution in a 3-link chain. For a 3-DOF chain (torso–arm–forearm), compute the off-diagonal mass matrix terms \(M_{ij}\) and the inertial torques \(\tau_{\text{inertial}, j}\) during a prescribed deceleration of the torso. Which link receives the most inertial energy?