Skip to main content

In Layman’s Terms: Contraction Theory Meets Tangent Spaces

tangent-space
How error recovery, optimal feedback, mechanical impedance and impact sensitivity connect—and what the mathematics can establish about a golf swing.

Audience: Readers who want an intuitive explanation with checkable mathematical examples. This is the companion to the technical contraction reference.

The Big Idea in One Sentence

A controller can sometimes use the same calculation to price a mistake and to prove that nearby mistakes will shrink—but the proof concerns a specified model, feedback law, measure of error and region of motion.

For a golf swing, the interesting question goes further: which disturbances change the delivered strike, and how do mechanics and feasible corrections limit those changes before impact? Returning every joint to one prescribed trajectory is only one possible strategy. Some joint variation may scarcely affect the strike, while a small error in another direction may matter greatly.

The Core Problem

Imagine a robot painting a line on a moving piece of pottery. Planning chooses a feasible brush motion and its cost. Feedback changes the commands when the measured state differs from the plan. Verification checks what that implemented combination does under a stated class of errors.

These jobs interact. A cheap trajectory may pass close to a torque limit, leaving little room for correction. A controller that recovers position quickly may demand unavailable torque. A smooth-looking trace may conceal velocity error that becomes important later. Conversely, allowing motion along the painted line may be harmless even when motion across it is not.

Optimal control and stability analysis have long shared tools. The useful connection here is not a newly discovered equivalence between the two fields. It is a way to ask precise questions about the same candidate motion: what does it optimize, which errors does it suppress, and where are the two claims valid?

What Is Contraction Theory?

Compare Two Motions Under the Same Rule

Run two copies of a model from slightly different states. Give them the same feedback rule and the same prescribed external signal. Because feedback depends on state, their actual control commands may differ. Contraction asks whether their separation shrinks, measured with a specified mathematical ruler called a metric.

A simple example is the error equation \(\dot e=-2e\), with time in seconds. Two solutions have separation

\[ \Delta e(t)=e^{-2t}\Delta e(0). \]

After half a second, the separation is about 37% of its starting value. The length-decay rate is \(2\ \mathrm{s}^{-1}\); the squared separation decays at twice that rate. This is a calculation for an ideal equation, not a measured golf recovery time. Exponential decay is not an oscillation, so its rate should not be reported as a frequency in cycles per second.

The reference motion must itself be a solution of the model under that feedback rule. Shrinking the separation between solutions does not make an infeasible reference trackable or keep those solutions within safe position and load limits.

Why a Rubber Band or Pendulum Is Not Enough

A stretched spring pulls back, but a mass on an ideal spring oscillates indefinitely. Restoring force does not by itself dissipate the difference between two motions. Position can temporarily approach the target while velocity carries it straight past.

A pendulum with viscous friction loses mechanical energy, but the perfectly upright, stationary configuration is still an equilibrium of the ideal equations. It does not converge to the bottom unless perturbed. Near the upright position, one disturbance direction grows. Thus friction does not prove global contraction of the pendulum. A local result near the downward equilibrium requires its own metric and domain.

Cruise control and thermostats are also examples of feedback, not automatic examples of contraction. Saturation, delay, switching and the plant dynamics affect whether a particular model satisfies the test. The analogy is useful only after the actual error dynamics are specified.

The Ruler and the Region Matter

A state may contain joint angles, angular velocities, muscle activation and shaft deformation. Adding the squares of their raw numerical values would mix units. A metric supplies declared scales and cross terms; it can assign different lengths to perturbations in different directions.

The ruler must remain positive and bounded. If its markings shrink to zero, an apparently shrinking error might only mean that we stopped counting it. To translate metric distances into physical coordinate bounds, its smallest and largest weights must be controlled.

A calculation on one nominal trajectory also does not prove recovery from all surrounding states. The intervening trajectories must stay within the region where the inequality is valid. An invariant tube around the reference is one way to establish that containment. The original contraction analysis by Lohmiller and Slotine develops the differential-distance argument and its regional conditions.

What Are Tangent Spaces?

A Local Map of Possible Changes

At one state, a tangent vector describes an infinitesimal change. For a mechanical system with constraints, admissible changes must respect those constraints. A tangent vector is not necessarily a displacement in ordinary three-dimensional space; it can describe changes in a much larger state.

Differentiating a smooth dynamics model gives an exact equation for its infinitesimal variations. Using that equation for a finite displacement is an approximation. A quadratic remainder requires adequate second-derivative bounds; differentiability alone does not guarantee a quadratic bound. The relevant small quantity is the state or input perturbation, not automatically the elapsed integration step.

Contraction controls the growth of variations under verified conditions. It does not erase an unmodeled force or make a large finite perturbation obey the tangent equation exactly. The local model, its remainder and the region over which the bound holds remain part of the analysis.

A Metric Measures; the Dynamics Move

A metric can be visualized as an ellipsoidal ruler: a displacement in one direction counts more than a displacement of the same coordinate magnitude in another. This does not create a physical slope that pulls the system toward a goal. Forces and the feedback law determine motion; the metric helps us assess it.

A spatially constant positive-definite matrix gives a flat metric, even if its weights differ by direction or change with time. It need not create Riemannian curvature. The simple equation \(\dot e=-2e\) contracts in an ordinary flat ruler. A Riccati matrix, an inertia matrix and a stiffness matrix are different objects, with different domains and units.

The Optimal Control Connection

Pricing a Mistake

Linear-quadratic regulation, or LQR, chooses feedback for linear dynamics and a specified quadratic cost. State weights price errors; input weights price the declared control signal. A torque-squared penalty, for example, is a design choice rather than a direct measurement of muscle effort or metabolic energy.

For a perturbation state \(\xi\), let the remaining optimal cost be \(V=\xi^\top S\xi\). The symmetric matrix \(S\) is obtained from a Riccati equation; it is not the feedback gain itself. With this convention, the Hessian of \(V\) is \(2S\). Calling \(S\) the Hessian without declaring the factor-of-two convention causes avoidable confusion.

An open-loop trajectory optimizer need not provide a feedback law. LQR supplies one for its problem; other methods may supply local gains, a receding-horizon policy, or only a sequence of inputs. Each resulting closed loop needs its own stability assessment. The MIT LQR chapter explains the cost and feedback construction.

When the Cost Matrix Also Measures Shrinking Errors

For \(\dot\xi=A\xi+Bv\), with no state-input cross cost, the LQR feedback is \(v=-K\xi\). Its closed-loop matrix is \(A_c=A-BK\). The Riccati equation gives the identity

\[ \dot S+A_c^\top S+SA_c=-W, \qquad W=Q+K^\top RK. \]

Here \(Q\) and \(R\) are the state and input cost weights. If \(S\) stays uniformly positive definite and bounded, and \(W\succeq2\lambda S\) throughout the stated interval, \(S\) is a valid contraction metric for that linear closed loop. The comparison includes both state and input costs and measures them relative to \(S\).

Positive semidefinite is not enough for a full-state ruler: it can give zero length to a nonzero error. A finite-horizon solution may become singular at the terminal time, especially with zero terminal cost. Furthermore, a result on a finite interval says nothing by itself about behavior after that interval.

Consider the uncontrolled unstable equation \(\dot\xi=\xi\), running cost \(\xi^2\) and zero terminal cost at \(T\). Then

\[ S(t)=\frac{e^{2(T-t)}-1}{2}, \qquad S(T)=0. \]

Its remaining cost decreases even as \(|\xi|\) grows. There is less future time over which to charge for the error. This is why decreasing cost-to-go and decreasing physical error cannot be treated as interchangeable statements.

A Small Example You Can Check

Take the normalized scalar model \(\dot e=e+u\) and infinite-horizon cost \(\int_0^\infty(3e^2+u^2)\,dt\). Time is measured in seconds and the state, input and cost scales are fixed for this illustration. The stabilizing Riccati solution is \(S=3\), giving \(u=-3e\) and hence \(\dot e=-2e\).

The cost derivative uses \(W=3+3^2=12\). Dividing by twice the metric gives the length-decay rate \(12/(2\times3)=2\ \mathrm{s}^{-1}\). Multiplying the entire cost by seven gives \(S=21\) and \(W=84\), but leaves the controller and rate unchanged. Changing the units used to report cost cannot change the same physical motion.

This executable example uses the existing pointwise calculator in the AffineDrift repository. Run it from that repository with its Python dependencies installed:

import numpy as np
from src.tools.contraction_examples import local_contraction_rate

value_weight = 3.0
input_weight = 1.0
gain = value_weight / input_weight
closed_loop = np.array([[1.0 - gain]])
metric = np.array([[value_weight]])
rate = local_contraction_rate(closed_loop, metric, np.zeros((1, 1)))
assert np.isclose(rate, 2.0)

This is an algebraic example, not a contraction-DDP implementation, optimizer benchmark or human experiment. The technical companion gives a multivariable example where the rate in the Riccati metric differs from the asymptotic rate inferred from the closed-loop eigenvalues.

The Math (Simplified)

The complete smooth-system test can be kept in one place. Write the implemented dynamics, including feedback, as \(\dot x=F(x,t)\), and their Jacobian as \(A_c=\partial F/\partial x\). For a metric \(M(x,t)\), define

\[ \begin{aligned} H&=A_c^\top M+MA_c+\dot M,\\ \dot M&=\partial_tM+\sum_iF_i\partial_{x_i}M. \end{aligned} \]

The second line follows the ruler as both time and state change. The condition is \(H\preceq-2\lambda M\). For a fixed metric, \(\dot M=0\); omitting it when the metric changes tests a different statement. A positive pointwise candidate rate is

\[ \lambda_M=-\frac12\lambda_{\max} \!\left(M^{-1/2}HM^{-1/2}\right). \]

To claim a uniform rate, take a justified positive lower bound over the whole certified domain and time interval. For the Riccati identity above, the same expression becomes

\[ \lambda_S=\frac12\lambda_{\min} \!\left(S^{-1/2}WS^{-1/2}\right). \]

These are symmetric, metric-normalized eigenvalue tests. Eigenvalues of \(A_c\) alone are not a substitute: for example, \(A_c=\left[\begin{smallmatrix}-1&4\\0&-1\end{smallmatrix}\right]\) has both eigenvalues \(-1\), yet some Euclidean errors grow initially. A suitable different metric can certify contraction, with its own conversion bounds to Euclidean error.

For a sampled closed-loop update with Jacobian \(D_k\), use the discrete condition

\[ D_k^\top M_{k+1}D_k\preceq\rho M_k, \qquad 0<\rho<1, \]

with the next metric evaluated at the next state. The corresponding length-decay rate at step size \(h\) is \(-\log(\rho)/(2h)\). The implemented update matters: for \(\dot e=u\) with \(u_k=-2e_k\) held between samples, \(e_{k+1}=(1-2h)e_k\). It contracts for \(0<h<1\) seconds; at \(h=0.5\) the ideal scalar update eliminates the error in one step. At \(h=1.25\) seconds it expands. The continuously updated law \(u=-2e\) would contract. A continuous-time proof cannot simply be assigned to its sampled implementation.

Contraction-Constrained Optimization

What Can Be Designed Together?

One can optimize a motion while imposing explicit stability constraints. A finite penalty on violating those constraints is different: an optimizer may accept a violation to reduce another part of the objective. A requested rate is a target until the actual inequality meets it, with numerical margin.

For a fixed linear closed loop and fixed desired rate, searching for a constant metric with declared positive lower and upper bounds is a convex semidefinite feasibility problem. Jointly optimizing a nonlinear trajectory, controller and state-dependent metric is not generally convex in those variables. Special formulations and changes of variables can help; naming a solver does not supply their assumptions.

DDP, differential dynamic programming, uses local expansions of both cost and dynamics, including second derivatives of dynamics in its quadratic model. iLQR omits those dynamics-Hessian terms. Neither method is simply a guarantee that repeated linearization will find a globally optimal, contracting policy. Regularization, control bounds and line search affect what it actually returns. See MIT’s trajectory-optimization treatment for the distinction.

What Would Count as Evidence?

A credible comparison would specify the model, units, cost, input limits, integrator, initialization, perturbation distribution, seeds, failure criterion and code revision. It would report failed runs as well as successful ones. A probability of success depends on the tested distribution; it is not a worst-case certificate. A sampled capture region over a finite horizon is not automatically an asymptotic basin of attraction or the set reachable using all possible controls.

This article reports no measured cart-pole success percentages, basin-volume improvements, solver iteration counts or runtime overhead. The former numerical comparison had no reproducible experiment attached and has been withdrawn. For a conventional four-state cart-pole, a full-state volume also needs four declared coordinate scales; a three-dimensional slice must be explicitly identified. Arbitrary “units cubed” do not define a reproducible robustness measure.

The actionable sequence is to verify trajectory feasibility, define the metric throughout a proposed region, differentiate the actual feedback implementation, check the inequality and containment, then assess model uncertainty and task outcomes. Automatic differentiation computes derivatives of the supplied model; it does not establish that the model describes a human correctly. A sampled check is useful evidence, but a continuum certificate additionally needs justified bounds between samples.

Applications to Biomechanics

Inertia, Stiffness and Damping Play Different Roles

A small displacement near a mechanical operating state may satisfy a model of the form

\[ D\,\delta\ddot q+C\,\delta\dot q+K\,\delta q =\delta\tau_{\mathrm{external}}. \]

Here \(D\) represents inertia; in this simplified local model, \(C\) is damping and \(K\) is stiffness. During a swing, linearization can add time-dependent, velocity-dependent and coupling terms; the matrices above are not a complete generic human model.

Stiffness redirects displacement into restoring load. Damping dissipates energy. Inertia relates load to acceleration. A contraction metric instead measures perturbations of the full state, including both displacement and velocity. Replacing that metric with the stiffness matrix loses half of this mechanical state and changes the units.

For the scalar oscillator \(\ddot q+0.2\dot q+kq=0\), both \(k=1\) and \(k=4\) have eigenvalue real parts \(-0.1\ \mathrm{s}^{-1}\). Increased stiffness changes the oscillation frequency but not this underdamped envelope rate. Thus “stiffer” does not automatically mean “faster error recovery.” Without damping, the corresponding oscillator conserves energy.

Mechanical impedance describes the dynamic relationship between motion and load; stiffness is one contribution. Muscle activation, tendon state, reflex pathways, delays, grip conditions and contact constraints can change that relationship. A force response already generated by tissue does not wait for a newly computed visual correction, but it still depends on the tissue’s current state. Mechanical and neural effects must be represented together rather than assigned a single universal response time.

What Muscle Synergies Might Mean

A low-dimensional pattern in muscle recordings can be a useful description. It does not uniquely identify neural modules or show that the brain minimizes an LQR cost. Muscle-pattern coefficients live in a different space from joint-state errors. Linking them requires muscle force laws, moment arms, inertia and constraints.

The narrower empirical result is informative: Burdet, Osu, Franklin, Milner and Kawato (2001) reported adaptation of arm impedance in an unstable environment generated by a robotic interface. That supports investigation of task-dependent mechanical stabilization. It does not measure a golf contraction metric, establish a universal synergy objective, or demonstrate a particular neural algorithm. This summary uses the publisher’s abstract and accessible supporting material; it is not a reanalysis of the participant data.

A golf study could compare measured perturbation responses with predictions from competing activation and impedance models. EMG alone does not determine muscle force, and reaching a target alone does not prove optimality. No general prediction about brain injury or diagnosis follows from this article’s equations.

Golf Swings With Safety Margins

Start With the Delivered Strike

Choose the actual outcome: clubhead velocity, face orientation, contact point or ball-launch variables. Then define when it is measured. Comparing two swings at the same clock time differs from comparing each swing at its own impact. A phase-shifted motion can reach the same contact state later, even while showing a sizeable error at a shared time.

The mechanisms are intertwined. Posture changes inertia and the directions in which joint loads affect motion. Earlier muscle work and elastic storage set part of the later state. Grip and ground constraints redirect load and restrict admissible motion. Tissue impedance changes the response to perturbations. Feedback adds corrections that must respect activation dynamics, sensing, delays and available force. None of these contributions can be inferred from a single contraction rate.

For a smooth fixed-time outcome \(y=g(x(T))\), the first-order relation is

\[ \delta y\approx G\Phi(T,t)\delta x(t), \qquad G=Dg(x(T)). \]

\(\Phi\) propagates a small state error through the implemented closed loop; \(G\) converts the terminal error into the chosen outcome. This relation explains why a small full-state error need not imply the smallest task error. With outcome \(y=x_1\), an error \((0,1)\) is invisible at that instant, whereas the much smaller error \((0.1,0)\) is not. Subsequent dynamics can make a previously invisible direction matter, so the full propagation cannot be skipped.

A contraction estimate can bound this propagation, but also needs the metric’s conditioning, the outcome sensitivity, and the remaining time. A high nominal rate over a very short interval need not provide much recovery. A technique could improve strike consistency by reducing outcome sensitivity instead of making every joint trajectory converge faster. These are distinct hypotheses that can be tested with matched perturbations and outcome definitions.

Impact Adds an Event-Time Question

Impact is a change in dynamics and often an abrupt change in velocity. A disturbed club may also reach the ball at a different time. Differentiating only the velocity reset misses that timing effect. For a regular, non-grazing event, a saltation matrix combines reset and timing sensitivities; Kong and colleagues explain this construction and its assumptions.

Contraction during the approach does not by itself control the jump. As a simple counterexample, a scalar flow \(\dot e=-e\) with a scheduled reset \(e^+=2e^-\) every half second multiplies error by \(2e^{-1/2}>1\) over each cycle. Shrinkage between events is outweighed by expansion at the event. This is an illustrative hybrid equation, not a golf-impact law. Actual contact needs its own geometry, compliance or impulse model, event sequence and uncertainty analysis.

Disturbances and Noise Leave Residual Error

A one-time disturbance and continuing disturbances are different tests. In \(\dot e=-2e+0.2\), the error approaches \(0.1\), despite the contracting homogeneous dynamics. A bound on ongoing forcing generally gives a residual error bound, not exact return to the undisturbed trajectory.

Random variability likewise requires a noise model. Differences between two copies driven by identical additive noise can behave differently from differences under independent noise. A compact cloud of repeated swings could reflect small disturbances, low output sensitivity or corrective feedback; it does not identify which explanation is responsible.

To investigate golfers, compare the same task, phase or event definition, state scales, feasible inputs and uncertainty treatment. Record perturbation direction and size, repeated trials, force and motion measurements, model alternatives and predictions on withheld trials. Training claims require evidence that the intervention improves the defined outcome under those conditions. The mathematics supplies questions and conditional predictions; it supplies no coaching prescription by itself.

Common Questions

Does a Stable Motion Have to Be Contracting?

No. Contraction in a uniformly bounded positive metric is a strong incremental property: it compares neighboring solutions under the same rule. A motion may be useful, locally stable or accurate at impact without a verified full-state contraction certificate. Autonomous periodic motions retain a phase direction; studying convergence toward their orbit requires a transverse or orbital formulation.

Does Choosing the Identity Metric Preserve Stability?

It only restricts the proposed ruler. If the required inequality holds with \(M=I\), that supplies a certificate in the declared coordinate scaling. If it fails, the system might still contract in another metric. Choosing \(I\) neither proves stability nor guarantees that an optimization retains its former performance.

Can a Model Certificate Establish Safety?

A verified recovery region can support a safety argument, but does not alone enforce tissue-load, contact, actuator or environmental limits. Disturbance magnitude and model error must also fit the argument. A loss of golf performance is not, by itself, proof of leaving a contraction region or evidence for a particular neurological mechanism.

Does the Brain Have to Solve These Equations?

No. These equations describe candidate mechanisms and observable consequences. An equivalent input-output behavior need not come from the same internal computation. Neural implementation, physiological cost and learning rules require additional evidence.

In Layman’s Terms

Read the Short Explanation

A good plan describes a motion we want and can produce. A feedback rule describes the corrections we will actually make. A contraction calculation checks whether nearby motions under that rule draw closer, using a ruler whose scaling and domain are explicit.

The ruler does not pull the body or club anywhere. Inertia, muscle and tissue forces, constraints and feedback create the motion. In certain LQR problems, the matrix used to price errors can also certify their decay. That is a useful connection, not an identity between good performance, low effort and stability.

For golf, ask whether a perturbation changes the strike, how much time remains to influence it, and what corrections the body can supply. Some harmless variation may persist; small variations in a sensitive direction may deserve more attention. Impact timing and continuing disturbances belong in the comparison.

Critics’ Comments

Read the Objections and Responses

Does a Local Proof Say Anything About a Full Swing?

Only to the extent of its verified domain. A trajectory-level calculation is a starting point. A neighborhood claim needs a metric throughout that neighborhood, containment, feasible controls and uncertainty bounds. A swing-wide claim must also account for contact transitions and the delivered outcome. The scope cannot be enlarged by relabeling an estimated region as a certified basin.

Could the Observed Stability Have Another Explanation?

Yes. Low disturbance, mechanical impedance, task-insensitive variability, state estimation and active correction can produce overlapping observations. Perturbation experiments and alternative models help discriminate them. A fitted contraction rate or muscle factorization alone cannot establish a neural objective.

Are the Examples Evidence of a Better Controller?

The scalar example proves an identity for its declared model. It is not comparative performance evidence. A better-controller claim needs reproducible baselines, equal constraints, failure reporting and outcome uncertainty. The withdrawn benchmark numbers must not be used to infer a benefit.

Citation

BibTeX citation: Download .bib
@online{untitled,
  author = {},
  title = {In {Layman’s} {Terms:} {Contraction} {Theory} {Meets}
    {Tangent} {Spaces}},
  url = {https://affinedrift.com/articles/tangent-hyperplane-articles/Advanced/Contraction_Tangent_LAYMAN.html},
  langid = {en}
}
For attribution, please cite this work as:
“In Layman’s Terms: Contraction Theory Meets Tangent Spaces.” n.d. https://affinedrift.com/articles/tangent-hyperplane-articles/Advanced/Contraction_Tangent_LAYMAN.html.