Skip to main content

Theory Series, Part 2: Counterfactual Diagnostics

Drift/Input Decomposition and Counterfactual Diagnostics

theory-core
Diagnostic tools for golf dynamics: the Zero Torque Counterfactual (ZTCF) family and Zero Velocity Counterfactual for drift/input attribution.
Author

Dieter Olson

Published

Publication date not verified

Modified

September 29, 2026

Abstract
This article develops the Zero Torque Counterfactual (ZTCF) family and Zero Velocity Counterfactual (ZVCF) as model-conditioned diagnostic tools. By simulating virtual trajectories under zero torque or zero velocity interventions, it attributes forward-dynamics outcomes to drift versus control actuation without biological overclaims.

Plain-Language Summary

This article sets up two test baselines: zero torque and zero speed. These tests show how much of a swing path comes from natural drift versus muscle push.

Key Takeaways

  • The ZTCF family simulates system evolution when all actuator inputs are set to zero.
  • ZVCF isolates static gravitational and configuration effects by freezing instantaneous velocity.
  • Counterfactual trajectories reveal control attribution while remaining bounded by model authority.

What This Shows / What It Does Not Show

What This Page Establishes (Evidence Level: Theory (Mathematical Identity))

  • Mathematical formulation of the Zero Torque Counterfactual (ZTCF) family as forward-simulated autonomous drift.
  • Definition of the Zero Velocity Counterfactual (ZVCF) as static gravity and configuration bias evaluation.

What This Page Does Not Establish

  • Partitioning of clubhead speed into percentage attribution between ‘physics’ and ‘golfer’.
  • Identification of neuromuscular intent or mental effort during the downswing.
  • Prediction of human subject adaptation to sudden physical club unloading.

Open Critiques and Active Inquiries

  • Critique: Counterfactual Diagnostics

Next Validation Gate

Simscape forward simulation replay and numerical integrator convergence checks.

These entries remain visible until evidence-backed adjudication changes their governed status.

ImportantModel-Conditioned Attribution Boundary

The identity \(\dot{x}=f_p(x)+G_p(x)u\) separates the autonomous and declared-input terms for a specified model at a fixed state. Its interpretation is conditional on the model boundary, coordinates, declared input, parameters and frozen variables, and the intervention being evaluated (a pointwise evaluation or a stated simulation horizon). This additivity does not imply orthogonality: under a chosen metric, \(f_p(x)\) and \(G_p(x)u\) may align, oppose, or be oblique. Without a separate identifiability argument and qualifying measurements, this bookkeeping does not identify neural intent, individual-muscle forces, biological effort, or a unique real-world cause.

What the Two Baselines Ask

A swing carries the consequences of earlier action into its later motion. Joint torques change velocities, posture and shaft deformation; those state changes affect the forces and accelerations that follow. A large motion-dependent term near contact can therefore reflect earlier torque input. It does not establish that the golfer has stopped contributing.

The Zero Torque Counterfactual (ZTCF) sets a declared torque channel to zero in a specified model. The Zero Velocity Counterfactual (ZVCF) evaluates that model at a specified velocity-reset state. The first can define a future trajectory; the second is a state evaluation. Neither operation weighs the club as it feels to the golfer, identifies intention, or partitions clubhead speed into percentages supplied by “physics” and “the player.”

These names are this site’s diagnostic terminology. Their underlying force balance and differential equations are established mechanics; applying them to golf does not itself demonstrate novelty or empirical validity.

Drift vs. Input Decomposition

Let \(z=(q,\eta)\) collect independent rigid and flexible coordinates, \(v=\dot z\), and \(N=\dim z\). In one declared smooth contact mode, write

\[ M(z)\dot v+h(z,v)=\mathcal B(z)u,\qquad a_d=-M^{-1}h,\qquad A=M^{-1}\mathcal B. \]

Here \(M\) is the complete positive-definite inertia matrix. The signed bias load \(h\) includes the retained gravity, elastic, dissipative, velocity-dependent and external-load terms, with the conventions of Part 1. State-only does not mean biologically passive: an identified effective impedance can contain effects of sustained activation.

At the same state, \(\dot v=a_d+Au\) and \(\dot x=f(x)+G(x)u\). These are sums of acceleration or state-rate vectors. They are not separate paths whose positions add to the observed swing. Generalized forces are covectors; multiplication by the inverse inertia maps the force balance into coordinate acceleration. Integrating a force vector alone does not generate a trajectory.

The number of written input channels need not equal their rank. Instantaneous acceleration authority depends on \(\operatorname{rank}\mathcal B\), its values, admissible inputs and constraints. Several actuators may have redundant effects, and unactuated coordinates can accelerate through coupling. Neither a large drift norm nor a channel count establishes finite-time uncontrollability.

With \(u\) measured in torque units, the corresponding load bookkeeping is

\[ \tau_{\mathrm{ID}}=M\dot v+h=\mathcal B u,\qquad \tau_{\mathrm{resultant}}=M\dot v=-h+\mathcal B u. \]

The inverse-dynamics applied load and the resultant are different quantities. A force plate, a hand wrench, a generalized torque and \(M\dot v\) cannot be interchanged without the appropriate model and mapping.

Zero Torque Counterfactual (ZTCF)

A Pointwise Sample and a Freely Evolving Counterfactual

The canonical ZTCF family distinguishes four constructions. A pointwise sample evaluates \(f(x(t_b))\) at an actual state. A stitched pointwise trace collects such samples along the actual motion. A forward trajectory initializes once and follows the zero-input model. A branched family repeats the forward experiment from several actual states, keeping its branches separate.

For a branch time \(t_b\), the forward construction is

\[ \dot x^0(t)=f(x^0(t)),\qquad x^0(t_b)=x(t_b). \]

The model parameters, retained loads, input definition and initial state are specified, including auxiliary states such as activation if present. All subsequent evaluations use the evolving \(x^0\), not the recorded \(x(t)\). A stitched trace generally is not a solution of this initial-value problem. Even in the scalar model \(\dot x=-x+1\), \(x(0)=0\), integrating the drift sampled along the actual solution gives \(-\int_0^t(1-e^{-s})\,ds\); the freely evolving zero-input solution remains zero.

Local uniqueness follows when the drift field is locally Lipschitz on the relevant state domain. It does not guarantee existence for an arbitrary duration, admissibility of zero input, avoidance of singularities, or continuation through contact. State explicitly whether a branch stops at first contact, at domain exit, or at a prescribed time. A hybrid continuation needs its own mode, contact and reset rules; different branches can reach different events or never reach the chosen event.

A time-dependent retained load or stiffness schedule requires \(f(t,x)\) and a two-time solution map, or an augmented clock state. Keeping the recorded schedule is one intervention. Freezing its value at the branch is another.

Worked Example: A Pointwise ZTCF Sample on the Golf Model

Given: the three-link rigid golf model SEGMENTS (src/affine_control/golf_model.py) at configuration \(q=(60^\circ,-30^\circ,-20^\circ)\) with generalized rates \(\dot q=(12,-18,-25)\) rad/s and zero applied torque.

Steps:

  1. Call SEGMENTS.drift_acceleration(q, qd) with q = deg2rad((60, -30, -20)) and qd = (12, -18, -25).
  2. This solves \(M(q)\ddot q=-h(q,\dot q)\) for the retained bias load \(h\) (Coriolis plus gravity) — exactly the pointwise sample \(f(x(t_b))\) defined above.

Result: \(f(x(t_b))\approx(-118.58,\ 70.47,\ 134.83)\) rad/s\(^2\) — the zero-torque acceleration at this one achieved state, not a forecast of subsequent motion.

Computed by src/affine_control/golf_model.py::GolfModel.drift_acceleration (documented as “the pointwise ZTCF acceleration”); checked against this page by tests/test_worked_example_callouts.py::test_theory_part2_pointwise_ztcf_sample.

Why the Trajectory Difference Is More Than the Input Term

For two trajectories in a common coordinate chart, let \(e=x-x^0\). Their exact difference equation is

\[ \dot e=f(x)-f(x^0)+G(x)u,\qquad e(t_b)=0. \]

The first difference accounts for the state changes induced after branching. Thus a forward contrast includes the consequences of altered geometry, velocity, gravity projection and shaft deformation. It is not simply an integral of the instantaneous input contribution. For \(\dot x=-x+u\) with constant \(u\) and matching initial states, \(e(t)=u(1-e^{-(t-t_b)})\), whereas integrating \(u\) alone gives \(u(t-t_b)\).

For golf, report a defined output: for example, clubhead velocity in a specified frame, face orientation, or location at first admissible ball contact. A velocity-vector difference is not a speed difference, since taking a norm is nonlinear. A difference at equal clock time is not a difference at each branch’s contact time. Comparisons that omit these distinctions can label altered event timing as an apparent force or speed contribution.

Using ZTCF With Inverse Dynamics

Use one force convention throughout. In independent generalized coordinates \(z=(q,\eta)\), let \(v=\dot z\) and write

\[ M(z)\dot v+h(z,v)=\bar B(z)u,\qquad h=Cv+\nabla_z V+d,\qquad \bar B=\begin{bmatrix}B\\0\end{bmatrix}. \]

Here \(h\) contains the terms written on the left of the mechanical balance; their signed contribution to acceleration is \(a_d=-M^{-1}h\). Known external loads must either be included with their signs in \(h\) or declared separately. These are the standard forward/inverse dynamics conventions (Lynch and Park 2017; Featherstone 2008).

Inverse dynamics estimates the applied generalized load. Its output is

\[ \tau_{\mathrm{ID}}=\mathrm{ID}(z,v,\dot v)=M\dot v+h=\bar B u. \]

Consequently, \(\mathrm{ID}(z,v,a_d)=0\) for an exactly matched zero-input model, up to numerical error. It does not return a nonzero gravity, elastic, or interaction-force contribution. A constrained model can simultaneously have zero actuator torque and nonzero constraint reactions; the solver’s actuator and reaction outputs must be distinguished.

A resultant-force partition is a different quantity. If we retain \(\tau_{\text{total}}\) for the net generalized right-hand side of \(M\dot v\), the consistent definitions are

\[ \tau_{\text{total}}:=M\dot v, \qquad \tau_{\text{drift}}:=-h=M a_d, \qquad \tau_{\text{input}}:=\bar B u=\tau_{\mathrm{ID}}. \tag{1}\]

Thus

\[ \tau_{\text{input}}=\tau_{\text{total}}-\tau_{\text{drift}} =M(\dot v-a_d). \tag{2}\]

These symbols denote generalized loads, whose units depend on the coordinate: torque for an angle, force for a translation, and the corresponding conjugate load for a normalized modal coordinate. They are not individual muscle forces. The rigid rows require the full acceleration vector: \([M_{qq}\ M_{q\eta}]a_d\) includes recoil; \(M_{qq}(a_d)_q\) alone does not.

For example, an unforced pendulum at an inclined angle has nonzero gravitational acceleration. Applying inverse dynamics to that free fall returns zero pivot torque. Holding it stationary instead requires the gravity-balancing torque. The same distinction persists in a coupled golfer–club model.

A forward ZTCF follows its own state after release. In a shared local chart,

\[ \frac{d}{dt}(x-x_0)=f(x)-f(x_0)+G(x)u, \]

where \(x_0\) is the zero-input trajectory, not the initial-state symbol in this equation. Only at a common state does the drift difference vanish. A later trajectory difference contains the accumulated effect of changed geometry, velocity, deformation, and contact; it is not an instantaneous input-force sample. Specify the output, comparison time or event, horizon, and admissible input set before interpreting closeness to a ZTCF as control authority.

A Complete Torque and Power Example

Consider an illustrative damped pendulum with inertia \(I=1\ \mathrm{kg\,m^2}\), point mass \(m=1\ \mathrm{kg}\) at length \(L=1\ \mathrm m\), damping \(b=0.2\ \mathrm{N\,m\,s/rad}\), and \(g=9.81\ \mathrm{m/s^2}\). Measure angle \(\theta\) from downward vertical. At \(\theta=\pi/6\), \(\dot\theta=2\ \mathrm{rad/s}\) and applied torque \(u=3\ \mathrm{N\,m}\),

\[ \begin{aligned} h&=mgL\sin\theta+b\dot\theta=5.305\ \mathrm{N\,m},\\ a_d&=-5.305\ \mathrm{rad/s^2},\\ \ddot\theta&=(u-h)/I=-2.305\ \mathrm{rad/s^2}. \end{aligned} \]

The resultant torque is \(-2.305\ \mathrm{N\,m}\), the drift load is \(-5.305\ \mathrm{N\,m}\), and the input is \(+3\ \mathrm{N\,m}\). Inverse dynamics returns \(I\ddot\theta+h=3\ \mathrm{N\,m}\). This is a pointwise generalized-torque decomposition with a complete equation behind the arithmetic.

Applied power is \(u\dot\theta=6\ \mathrm W\). Dissipation is \(b\dot\theta^2=0.8\ \mathrm W\), so total mechanical energy increases at \(5.2\ \mathrm W\). Nevertheless, kinetic energy decreases at \(I\dot\theta\ddot\theta=-4.61\ \mathrm W\) while gravitational potential energy increases at \(mgL\sin\theta\dot\theta=9.81\ \mathrm W\). Positive input work can accompany deceleration.

In general, for conjugate joint torque and velocity,

\[ P = \tau^\mathsf{T}\dot{q},\qquad W = \int_{t_0}^{t_1}P(t)\,dt. \]

A signed torque alone does not determine power, much less efficiency or the change in a remote segment’s speed. The net input does not identify individual muscle forces. These are illustrative mechanical calculations, not measurements from a golfer.

Output Tolerance Determines the Horizon

Nonlinearity does not imply chaos or exponential divergence. The scalar nonlinear system \(\dot x=-x-x^3\) contracts: the separation of two solutions decreases at least as fast as \(e^{-t}\) in its scalar coordinate. For a free double integrator, an initial velocity error produces linearly growing position error. Conversely, a linear system can have substantial transient amplification even when all eigenvalues have negative real parts.

To estimate sensitivity around a nominal zero-input branch, choose dimensionless state coordinates and a declared norm. The first-order perturbation satisfies

\[ \delta\dot x=J_f(t)\delta x+r(t),\qquad J_f(t)=D_x f(x^0(t)), \]

where \(r\) represents the linearized parameter or forcing perturbation. The state-transition matrix solves \(\dot\Phi=J_f\Phi\), \(\Phi(s,s)=I\), giving

\[ \delta x(t)=\Phi(t,t_b)\delta x_b +\int_{t_b}^{t}\Phi(t,s)r(s)\,ds. \]

This variational formula is a local approximation. A finite-error bound needs a Jacobian bound over a domain containing the segments between the perturbed and nominal states, together with bounds on model mismatch and continued domain membership. For the Euclidean logarithmic norm

\[ \mu_2(J)=\lambda_{\max}\!\left(\frac{J+J^\mathsf T}{2}\right), \]

suppose \(\mu_2(D_xf)\le \bar\mu(t)\) throughout that domain and the additive mismatch has norm at most \(\bar r(t)\). Then

\[ \begin{aligned} \|e(t)\|&\le E(t,t_b)\|e_b\| +\int_{t_b}^t E(t,s)\bar r(s)\,ds,\\ E(t,s)&=\exp\!\left(\int_s^t\bar\mu(\xi)\,d\xi\right). \end{aligned} \]

To obtain the bound, express the field difference as the Jacobian integrated along the segment between states. The logarithmic-norm bound gives the upper right derivative \(D^+\|e\|\le\bar\mu\|e\|+\bar r\); scalar comparison and an integrating factor give the displayed result. Domain membership is required for that argument.

This is an upper bound, not a measured growth rate or a Lyapunov exponent. Bounds from a nominal Jacobian alone do not automatically cover finite nonlinear deviations. Raw mixed-unit state norms are also misleading: changing position units from meters to millimeters changes the Euclidean logarithmic norm of a position–velocity system. Fix scales or a physically justified metric before comparing growth.

For example, \(J=[-1,10;0,-1]\) has stable eigenvalues but maps \(e(0)=(0,1)\) to \(e^{-t}(10t,1)\). At \(t=1\), its error norm is about \(3.70\), while the logarithmic-norm bound is \(e^4\approx54.6\). Neither number is a measured golf-swing sensitivity. In \(\dot e=-e+r\) with bounded \(|r|\le0.005\) and \(|e(0)|\le0.02\), the bound \(0.02e^{-t}+0.005(1-e^{-t})\) decreases toward a model-error floor. A longer horizon need not always make the bound larger.

Translate state uncertainty into the output being judged. For a fixed-time output \(Y(x)\), the first-order change is \(D Y\,\delta x\). For a contact surface \(\gamma(x)=0\) with \(\nabla\gamma^\mathsf T F^-\ne0\), the first-order event-time correction is

\[ \delta t_c=-\frac{\nabla\gamma^\mathsf T\delta x^-} {\nabla\gamma^\mathsf T F^-},\qquad \delta x_c=\delta x^-+F^-\delta t_c. \]

Apply the output derivative to \(\delta x_c\), and include any impact reset derivative for post-impact outputs. Near grazing contact the denominator can be small, and this first-order event calculation can become unreliable. Contact existence and event ordering also need checking.

As a simple illustration, a projectile starting at the origin with constant velocities \((v_x,v_y)\) crosses the plane \(x=D\) at height \(y_c=v_yD/v_x\). At \(D=1\ \mathrm m\), \(v_x=2\ \mathrm{m/s}\) and \(v_y=0.1\ \mathrm{m/s}\), \(\partial y_c/\partial v_x=-0.025\ \mathrm s\). Horizontal-speed uncertainty changes height at contact through timing even though height at a fixed time has no such dependence.

Declare an output tolerance, parameter/measurement uncertainty, integration error allowance and domain/contact checks. A defensible horizon is where those requirements remain satisfied for the chosen branch and output. This article establishes no universal millisecond cutoff for trustworthy golf counterfactuals. Deterministic bounds are not confidence intervals; probability claims require a justified uncertainty distribution.

Zero Velocity Counterfactual (ZVCF)

At a specified configuration, reset the declared velocity coordinates while retaining the other declared states. This evaluates configuration-dependent loads; it neither holds the club in equilibrium nor measures perceived heaviness. The force, acceleration and holding-load signs are made explicit below.

The ZVCF is a state evaluation, not a trajectory held in equilibrium. With \(z=(q,\eta)\) and \(v=\dot z\), evaluate \(h_0(z)=h(z,0)\) while retaining the declared deformation, parameters, other internal states, and contact mode. For stationary constraints and the smooth mechanical model used here,

\[ \tau_{\mathrm{ZVCF}}:=-h_0(z),\qquad a_{\mathrm{ZVCF}}=-M(z)^{-1}h_0(z). \tag{3}\]

This uses the signed drift-force convention. Software that reports the positive holding load instead returns \(h_0\); label the sign explicitly. In particular,

\[ \mathrm{ID}(z,0,0)=h_0(z),\qquad \mathrm{ID}(z,0,a_{\mathrm{ZVCF}})=0. \tag{4}\]

Holding every coordinate of an underactuated model may require fictitious actuators: \(h_0\) need not lie in \(\operatorname{range}(\bar B)\). The formal holding load remains a useful diagnostic, not an executable policy. For time-dependent constraints, zero velocity may be inadmissible; use a constraint-consistent evaluation rather than silently resetting the state.

At the same configuration, define

\[ \tau_{\mathrm{vel.\,drift}}:=-[h(z,v)-h(z,0)],\qquad \tau_{\text{drift}}=\tau_{\mathrm{ZVCF}}+ \tau_{\mathrm{vel.\,drift}}. \tag{5}\]

This difference contains every retained term that changes under the specified velocity reset, including viscous damping. It is not generally a purely inertial term. Velocity reset does not remove stiffness, stored elastic energy, activation, or history encoded in retained internal states.

Force evaluation does not identify stiffness. Tangent stiffness is a derivative of force with respect to displacement under stated loading and boundary conditions. Material elasticity and geometric stiffness from prestress can both contribute at zero velocity. For a beam under constant tension \(N>0\), the transverse restoring operator contains \(EI\,w_{ssss}-N\,w_{ss}\) even when \(w_t=0\). Centrifugal loading is one possible source of prestress; it is not the definition of geometric stiffness. ZVCF subtraction is one reproducible way to partition loads. Direct evaluation of the declared equation terms is another. Neither establishes material and geometric stiffness separately without the tangent model.

The useful golf question is therefore precise: how much does a specified load change when velocity is reset, and how sensitive is the answer to retained shaft deformation, grip conditions, and contact? This exposes interactions without calling a hypothetical frozen state a physically passive golfer.

Evidence Needed for a Golf Interpretation

An ordinary recorded swing does not directly reveal its alternative zero-input trajectory. Zero net torque can occur despite nonzero individual muscle forces; whether an entire zero-input branch is feasible depends on the actuator and contact model. The obstacle is counterfactual identification and intervention fidelity, not a universal impossibility of zero net torque.

Analytic solutions, energy checks and independent implementations verify the computations. Physical validation additionally requires measured states and external loads, identified parameters, held-out predictions and uncertainty propagation. Agreement with the same data used to fit the model is not an independent prediction test.

Nesbit’s 2005 golf study uses measured motion to drive a coupled body/club model and reports forces, torques, work and shaft behavior. It supports measurement-conditioned mechanical analysis, not validation of this site’s freely evolving zero-torque branches. See the primary article.

The practical research question is how earlier input builds the state, how current input changes its derivative, and how both affect delivery under constraints and uncertainty. Answering it requires those three levels to remain connected without treating their quantities as interchangeable.

Revision History

  • 2026-09-29: Extended critique annotations to ZTCF and proximal-distal pages (#4524).

  • 2026-09-05: Distinguished counterfactual dynamics and evidence limits (#4195).

  • 2026-08-20: Standardized and harmonized ZTCF, ZVCF, DCR, Drift, and Control definitions (#3889).

  • 2026-03-10: Three-pass professional assessment and formalization.

References

Featherstone, Roy. 2008. Rigid Body Dynamics Algorithms. Springer. https://doi.org/10.1007/978-1-4899-7560-7.
Lynch, Kevin M., and Frank C. Park. 2017. Modern Robotics: Mechanics, Planning, and Control. Cambridge University Press.

Citation

BibTeX citation: Download .bib
@online{olson,
  author = {Olson, Dieter},
  title = {Theory {Series,} {Part} 2: {Counterfactual} {Diagnostics}},
  date = {},
  url = {https://affinedrift.com/articles/theory-part2.html},
  langid = {en},
  abstract = {This article develops the Zero Torque Counterfactual
    (ZTCF) family and Zero Velocity Counterfactual (ZVCF) as
    model-conditioned diagnostic tools. By simulating virtual
    trajectories under zero torque or zero velocity interventions, it
    attributes forward-dynamics outcomes to drift versus control
    actuation without biological overclaims.}
}
For attribution, please cite this work as:
Olson, Dieter. “Theory Series, Part 2: Counterfactual Diagnostics.” https://affinedrift.com/articles/theory-part2.html.