Skip to main content

Hybrid Tangent Spaces

Impacts, Contact, and the Timing of Perturbations

tangent-space
Derive impact mechanics and event timing sensitivities, then connect them to golf, humanoid contact, uncertainty and trajectory optimization.
Author

Dieter Olson

Published

January 18, 2026

A swing is shaped by forces acting over time and by the short contact that turns club motion into ball motion. A walking stride combines unconstrained limb motion, support forces, and transitions between contact conditions. To understand either, we must distinguish the trajectory, the physical rule at contact, and the sensitivity of the resulting outcome. These are connected questions with different mathematical answers.

This reference develops those connections through explicit derivations and an executable example. It accompanies the accessible explanation and published critiques and responses. It applies established hybrid-systems methods; it does not establish a new impact law or a validated optimal golf swing. The compact hybrid chapter provides another entry point.

A swing, like a walking stride, mixes smooth motion with short contact events. This article works out how contact changes motion and how timing changes the result. For a longer plain-language walk-through, read the accessible explanation.

Contact Is a Model Choice

An ideal rigid impact changes velocity at once. A softer model follows the squeeze over a short time. Neither one is the whole truth, and each answers different questions.

Timing Matters

Picture two nearly identical falling balls. The one that starts higher lands later. Comparing them at one moment mixes the rebound rule with that timing gap. A correction called the saltation matrix accounts for both.

What Is Not Claimed

The article applies known hybrid-systems methods. It does not offer a new impact law or a proven best golf swing.

Key Takeaway: After contact, a small change depends on what the contact does and when it happens.

1. What Changes at Contact

A Model Has a Resolution

An ideal rigid impact changes velocity instantaneously. A compliant impact resolves deformation and force over a finite interval. Both are models of the same interaction at different resolutions. The rigid model can predict an impulse and a velocity change without predicting the peak force, contact duration, acoustic signal, or deformation history. The compliant model needs additional constitutive parameters and sufficiently resolved integration.

The smoothness of a vector field determines whether its usual flow derivative exists. It does not determine whether the underlying state manifold has tangent spaces. At a modeled velocity jump, the trajectory has no ordinary two-sided time derivative; the pre-event and post-event states still belong to their respective smooth mode domains.

For a differentiable family of trajectories \(x(t,\epsilon)\), its variation is

\[ \delta x(t)=\left.\frac{\partial x(t,\epsilon)}{\partial\epsilon}\right|_0, \qquad \delta\dot x=A(t)\delta x+B(t)\delta u. \tag{1}\]

This is a derivative equation. A finite trajectory difference equals its linear prediction plus a remainder. Even with smooth coefficients, the nonlinear system itself has not become linear.

Three Distinct Discontinuities

An impact can reset velocity. A change of support or controller can change the vector field while keeping the state continuous. A saturated actuator can have a continuous but nondifferentiable input law. These cases require different treatment; the presence of an “if” statement does not imply a physical impulse.

For example, minimizing the scalar Hamiltonian contribution \(|u|+\sigma u\) subject to \(|u|\le U\) gives \(u=-U\) for \(\sigma>1\), \(u=U\) for \(\sigma<-1\), and \(u=0\) for \(|\sigma|<1\). At the thresholds there are multiple minimizers. This calculation assumes this particular cost and sign convention. Minimum-time problems have a different switching condition, and a switching function that vanishes over an interval may require singular-control analysis.

Sensory delay and a motor-command switch also differ from instantaneous removal of muscle force. Existing activation, passive tissues and contact reactions can persist. A hybrid model must declare which physical variables it carries across the event.

2. Modes, Guards, and Solutions

A Precise Local Setup

Let mode \(i\) have domain \(D_i\) and dynamics \(\dot x=f_i(t,x,p)\), where \(p\) denotes fixed parameters. A transition to mode \(j\) occurs on an admissible portion of a guard \(h(t,x,p)=0\), with a specified crossing direction and reset

\[ x^+=R(t_e,x^-,p). \tag{2}\]

The model also needs rules for competing guards, persistent contact, and continuation after an accumulation of events. A list of vector fields and zero sets alone may not define a unique execution.

The local sensitivity derivations below assume smooth extensions of the mode flows and reset near one isolated event, a differentiable guard, and

\[ d=h_t+h_xf^-\ne0. \tag{3}\]

Nearby trajectories must undergo the same transition in the same local order. \(C^1\) data suffice for a first derivative under the corresponding local flow assumptions; second-order expansions need stronger regularity. A regular guard can be curved. A nonzero spatial gradient does not by itself prove transversality.

We evaluate \(h_x,h_t\) at the nominal incoming event, \(R_x,R_t\) there, and \(f^+\) at the reset state. Inputs may be incorporated into a declared smooth feedback law or a prescribed schedule. If the guard or reset depends directly on a varying input, that dependence must enter the differentiation. An input switch coinciding with impact needs its own timing convention.

Friction and Differential Inclusions

For a translating block of mass \(m\), tangential applied force \(F\), and fixed normal force \(N\), an ideal static/kinetic law is

\[ m\dot v=F+F_{\!f},\qquad F_{\!f}=-\mu_kN\,\operatorname{sgn}v\quad(v\ne0). \tag{4}\]

At rest, sticking is admissible when \(|F|\le\mu_sN\), with \(F_{\!f}=-F\). A complete transition rule must say what happens when this bound is exceeded. The coefficients and support force can themselves depend on the system.

For the equal-coefficient idealization \(\mu_s=\mu_k=\mu\), the Filippov set at \(v=0\) is

\[ \dot v\in[(F-\mu N)/m,\,(F+\mu N)/m]. \tag{5}\]

It contains zero precisely when the applied force can be balanced. A larger static threshold cannot be obtained merely by assigning another value at the isolated point \(v=0\): Filippov regularization discards such pointwise changes. It needs an appropriate constitutive inclusion or mode model.

For two piecewise continuous vector fields on \(h<0\) and \(h>0\), their limiting convex hull describes the Filippov set at a regular interface. Attracting sliding requires the negative-side field to point toward increasing \(h\) and the positive-side field toward decreasing \(h\). Reversing both signs gives repelling behavior; the product of normal velocities alone does not distinguish them. Physical sliding along a table is not synonymous with Filippov sliding on a discontinuity surface. Cortés’s tutorial supplies the relevant solution notions and examples.

Integrals Must Retain Impulses

A piecewise absolutely continuous state with finitely many jumps satisfies, with a consistent right-continuous convention,

\[ x(t)=x(0)+\int_0^t f(s,x(s))\,ds +\sum_{0<t_j\le t}\bigl[x(t_j^+)-x(t_j^-)\bigr]. \tag{6}\]

Its distributional derivative includes point masses at the jumps. Knowing an ordinary derivative almost everywhere does not recover those jumps. Total variation includes the continuous variation and the jump magnitudes.

A useful objective is

\[ J=\Phi(x(T))+\int_0^T L_{i(t)}(t,x,u)\,dt +\sum_{0<t_j<T}c_j(t_j,x_j^-). \tag{7}\]

The running integral needs an integrable integrand. Event costs are separate terms, regardless of the zero duration of an ideal jump. With infinitely many events, their sum needs a convergence argument. Neither “measure zero” nor “càdlàg” alone establishes finite cost or a unique continuation.

3. Deriving the Saltation Matrix

Compare at a Common Clock Time

Let the nominal event occur at \(t_e\), and let a neighboring trajectory reach it at \(t_e+\delta t\). Write \(\delta x^-\) for the incoming variation continued to the nominal event time using the incoming mode.

The perturbed incoming event state differs by \(\delta x^-+f^-\delta t\). Expanding the guard gives

\[ 0=h_x\delta x^-+(h_t+h_xf^-)\delta t, \qquad \delta t=-\frac{h_x\delta x^-}{d}. \tag{8}\]

Apply the reset at the perturbed event. Its state variation is \(R_x\delta x^-+(R_xf^-+R_t)\delta t\). To compare the two outgoing trajectories at a common time, subtract the nominal outgoing evolution \(f^+\delta t\). Therefore

\[ \delta x^+ =R_x\delta x^-+(R_xf^-+R_t-f^+)\delta t =S\delta x^-, \]

\[ \boxed{S=R_x+\frac{(f^+-R_xf^--R_t)h_x}{h_t+h_xf^-}.} \tag{9}\]

The comparison uses smooth mode extensions when one trajectory has crossed and the other has not. The derivative applies to an observation after both nearby events, with a consistent limiting convention. It is not a claim of uniform approximation during their short interval of mode mismatch.

This timing correction is already inside \(S\). Adding a second \(\delta t\) correction afterward double counts it. Conversely, \(R_x\) alone describes a prescribed-time reset or an appropriate event-aligned derivative; it generally misses a state-triggered common-time sensitivity. The standard formulation and its scope are developed in Kong et al. (2024).

Reset Extensions and Parameter Effects

If a reset is defined only on the guard, choose a smooth local extension. Replacing that extension by \(R+a h\) changes \(R_x\) by \(a h_x\) and \(R_t\) by \(a h_t\), but leaves \(S\) unchanged: the added \(a h_x\) cancels the correction \(a d h_x/d\). The physical derivative is not determined by an arbitrary off-guard extension.

For fixed parameter perturbation \(\delta p\),

\[ \delta t=-\frac{h_x\delta x^-+h_p\delta p}{d}, \qquad \delta x^+=S\delta x^-+E\delta p, \]

\[ E=R_p+\frac{(f^+-R_xf^--R_t)h_p}{d}. \tag{10}\]

Parameter-dependent flows also contribute before and after the event. This matters when ball position, ground height, restitution, contact geometry or activation parameters are uncertain.

The Bouncing Ball, Step by Step

Take state \((h,v)\), upward positive, gravity \(g>0\), guard \(h=0\) with \(v^-<0\), and reset \((h,v)\mapsto(h,-ev)\) for constant restitution \(e\). The spatial extension keeps \(h\) unchanged; the actual event still has \(h=0\). Then

\[ R_x=\begin{bmatrix}1&0\\0&-e\end{bmatrix}, \quad f^-=\begin{bmatrix}v^-\\-g\end{bmatrix}, \quad f^+=\begin{bmatrix}-ev^-\\-g\end{bmatrix}. \]

Thus \(f^+-R_xf^-=(-(1+e)v^-,-(1+e)g)^{\mathsf T}\) and

\[ \boxed{S=\begin{bmatrix} -e&0\\ -g(1+e)/v^-&-e \end{bmatrix}.} \tag{11}\]

A positive incoming height perturbation delays impact. The extra fall, the changed rebound speed, and the shorter outgoing evolution all affect the common-time result. The first row maps height variation to height variation; its velocity entry is zero. For a velocity-dependent \(e(v)\), differentiate the reset: \(R_{vv}=-e-v e'\). Smooth parameter dependence does not automatically invalidate saltation.

For an upward-moving flat floor \(h=a t\) with constant speed \(a\), restitution acts on relative velocity: \(v^+=a-e(v^--a)\). The denominator becomes \(v^--a\). Grazing means zero relative approach speed, not necessarily zero laboratory speed.

4. Geometry and Physical Impact

Tangent Space, Cone, and Metric

At a regular configuration boundary \(\phi(q)=0\), the tangent space is \(\{\delta q:J\delta q=0\}\), where \(J=\phi_q\). For the admissible set \(\phi\ge0\), its boundary tangent cone is \(\{\delta q:J\delta q\ge0\}\) under the regularity assumptions. The same cone describes that same domain before and after impact. An incoming velocity can point outward and trigger a reset; it should not be mistaken for a feasible displacement into the domain.

For mechanical generalized velocity \(v\), assume a positive-definite mass matrix \(M(q)\). It defines the kinetic metric, \(T=v^{\mathsf T}Mv/2\). The normal direction for an impulse is generally \(M^{-1}J^{\mathsf T}\), not the Euclidean vector \(J^{\mathsf T}\).

Derive the Frictionless Reset From Impulse Balance

For one stationary normal contact, negligible configuration change during impact and no other impulsive load,

\[ M(v^+-v^-)=J^{\mathsf T}p_n, \qquad Jv^+=-eJv^-. \tag{12}\]

Set \(W=JM^{-1}J^{\mathsf T}>0\). Solving gives

\[ p_n=-(1+e)W^{-1}Jv^-, \quad v^+=(I-(1+e)P_M)v^-, \quad P_M=M^{-1}J^{\mathsf T}W^{-1}J. \tag{13}\]

\(P_M^2=P_M\) and \(P_M^{\mathsf T}M=MP_M\): it is the mass-metric normal projection. For a particle with scalar isotropic mass, this reduces to the familiar Euclidean normal/tangent decomposition.

Writing \(v=v_\parallel+v_\perp\) using \(P_M\), the cross term vanishes in the kinetic metric. Hence

\[ T^- - T^+ =\frac{1-e^2}{2}(Jv^-)^{\mathsf T}W^{-1}(Jv^-). \tag{14}\]

For \(0\le e\le1\), this loss is nonnegative; it can be zero. With \(e=0\) the velocity map is a projection, and with \(e=1\) a mass-metric reflection. Intermediate restitution gives reflection and scaling. None of these identities implies that the full state saltation matrix is an energy-dissipating projection.

The full reset derivative includes \(\partial[(I-(1+e)P_M(q))v]/\partial q\). Differentiating the matrix alone leaves out its multiplication by the velocity. A tangent bundle is locally represented by position/velocity coordinates; it is not globally a Cartesian product for every manifold.

Friction, Spin, and Multiple Contacts

For a translating particle at a fixed plane, no spin and uncoupled normal/tangent inertia, a simple impulse law uses

\[ p_n=-m(1+e)v_n^-, \qquad p_t=-\min(m\|v_t^-\|,\mu p_n) \frac{v_t^-}{\|v_t^-\|}. \tag{15}\]

Set \(p_t=0\) when \(v_t^-=0\). The cap permits sticking without reversing tangential velocity. For rotating rigid bodies, the contact-point mobility couples impulses and velocities; this scalar formula is no longer a general frictional-impact solver. Restitution convention, frictional dissipation, feasibility and any simultaneous-contact resolution must be specified together.

Newton restitution prescribes a relative normal velocity ratio. It should not be silently identified with another impact law, such as a Poisson impulse-ratio construction. In multiple contacts, independent scalar restitution rules can require further consistency checks. A pseudoinverse of stacked guard normals does not determine a missing physical impulse law or remove event-order ambiguity.

5. Golf and Humanoid Contact

What a Two-Mass Collision Actually Establishes

For a one-dimensional, isolated collision of club mass \(m_c\) and ball mass \(m_b\),

\[ \begin{bmatrix}v_c^+\\v_b^+\end{bmatrix} =\frac1{m_c+m_b} \begin{bmatrix} m_c-em_b&(1+e)m_b\\ (1+e)m_c&m_b-em_c \end{bmatrix} \begin{bmatrix}v_c^-\\v_b^-\end{bmatrix}. \tag{16}\]

Both incoming velocities affect both outgoing velocities. This velocity map is part of the reset. Common-time state sensitivity additionally involves geometry, impact time and the two flows.

With manufactured values \(m_c=0.200\) kg, \(m_b=0.046\) kg, \(v_c^-=50\) m/s, \(v_b^-=0\) and \(e=0.78\), the result is \(v_b^+=72.3577\) m/s and \(v_c^+=33.3577\) m/s. Momentum is conserved. The lost kinetic energy is

\[ \Delta T_{\rm loss} =\frac12\frac{m_cm_b}{m_c+m_b}(1-e^2)(v_c^--v_b^-)^2 =18.3065\ {\rm J}, \]

about \(7.3226\%\) of the initial \(250\) J. The loss fraction is not \(1-e^2\) of the whole laboratory-frame energy: the center-of-mass motion remains.

If that ball impulse were delivered over a stipulated \(0.5\) ms, the average force would be about \(6.657\) kN and average acceleration about \(1.447\times10^5\) m/s². Those are conditional arithmetic results. They do not determine a peak force or establish that the selected duration and restitution describe a particular club and ball.

Real contact involves a finite head, rotational inertia, impact offset, normal direction, deformation, friction and ball spin. The directional effective mass follows from contact mobility \(JM^{-1}J^{\mathsf T}\), and need not equal the head’s physical mass. Shaft and grip coupling may affect the incoming state and the contact response, depending on the model’s bandwidth.

For the fixed two-mass assumptions, more incoming club speed gives more outgoing ball speed. That statement does not optimize a full swing under accuracy, torque, tissue-load or timing constraints. Conversely, reducing an actuator torque is not the same as decelerating the club, and a torque reduction is not automatically optimal. Neither conclusion follows from the existence of a saltation matrix.

Foot Strike Requires a Contact Model

A planar five-link biped with five segment angles also needs two floating-base translations during free flight: seven configuration coordinates before constraints, not five. A pinned stance model can use fewer coordinates, but its coordinate changes and reset maps must be derived consistently. In three dimensions the floating base adds its translational and rotational configuration.

For fixed active sticking contacts, a plastic reset solves

\[ \begin{bmatrix}M&-J_c^{\mathsf T}\\J_c&0\end{bmatrix} \begin{bmatrix}v^+\\p\end{bmatrix} =\begin{bmatrix}Mv^-\\0\end{bmatrix}. \tag{17}\]

This assumes independent constraints and feasible impulses. Normal impulses must be compressive, tangential impulses must satisfy the chosen friction law, and other contacts may release. Conservation of one scalar angular momentum cannot determine every joint velocity of a multibody robot.

During sustained holonomic contact, differentiating \(J_cv=0\) gives \(J_c\dot v+\dot J_cv=0\). With bias \(b(q,v)\),

\[ M\dot v+b=Bu+J_c^{\mathsf T}\lambda, \quad \lambda=(J_cM^{-1}J_c^{\mathsf T})^{-1} \left[J_cM^{-1}(b-Bu)-\dot J_cv\right]. \tag{18}\]

The curvature term \(\dot J_cv\) is essential: a mass moving around a circle requires inward acceleration even at constant speed. An algebraic solution with inadmissible contact forces signals that the assumed mode is invalid. Robot swing-leg motion does not mean that the entire robot is in flight.

6. Sensitivity, Stability, and Zeno Limits

Include Every Flow Segment

For one event, the endpoint derivative is

\[ \Psi(T,0)=\Phi_+(T,t_e)S\Phi_-(t_e,0). \tag{19}\]

For several isolated events, insert each flow and saltation in chronological order, with the earliest factor on the right. A forced variation can be written compactly as

\[ \delta x(T)=\Psi(T,0)\delta x(0) +\int_0^T\Psi(T,s)B(s)\delta u(s)\,ds, \tag{20}\]

provided the jump rules have no omitted direct dependence on the input variation. Direct reset/guard input terms add their own event contributions. This expression includes forcing after the final event; an integral ending at the last impact would miss it.

Composition holds when the operator includes all intervening events and its endpoint conventions agree. Invertibility requires the constituent maps to be invertible. For square maps, volume scaling involves the absolute determinant; a small determinant can coexist with a large amplified direction.

Dissipation Is Not Contraction

At \(e=0.8\), \(v^-=-5\) m/s and \(g=9.81\) m/s², the ball matrix is

\[ S=\begin{bmatrix}-0.8&0\\3.5316&-0.8\end{bmatrix}. \]

Its eigenvalues both have magnitude \(0.8\), but its largest singular value is approximately \(3.7044\) when height and speed are scaled by \(1\) m and \(1\) m/s. A height perturbation can become a larger velocity perturbation through timing, while each nominal impact loses kinetic energy.

Generally, choose input/output scaling or positive metrics explicitly. A one-event differential contraction bound is

\[ S^{\mathsf T}W_+S\preceq\gamma^2W_-. \tag{21}\]

The corresponding worst gain is the largest singular value of \(W_+^{1/2}SW_-^{-1/2}\). Flow bounds must be included to assess the whole trajectory. Eigenvalues of a single varying jump matrix do not supply that bound.

For a periodic gait, examine the complete return map. An autonomous orbit normally has a neutral phase direction in its full monodromy matrix; transverse Poincaré multipliers assess orbital stability. Finite-time amplification can still matter even when an asymptotic return map is stable.

What the Ideal Infinite Bounce Sequence Means

Starting just after an upward bounce of speed \(w_0>0\), the constant-\(e\) ball has flight durations \(2e^jw_0/g\) for \(j=0,1,\ldots\), so for \(0<e<1\),

\[ T_Z=\frac{2w_0}{g(1-e)}. \tag{22}\]

The state approaches \((0,0)\) in finite time. The flight/reset rules alone do not tell it to stay there afterward: continuing flight would penetrate the ground. A resting-contact mode or another declared completion is needed.

The jump magnitudes are summable in this example, and the sum of kinetic-energy losses is finite. A cost of one unit per bounce diverges. A geometric upper bound on event intervals gives an upper bound on accumulation time, not an exact equality.

Neither the isolated-event derivative nor an infinite product of saltations alone settles sensitivity at \(T_Z\). Incoming speed tends to zero, the saltation entry proportional to \(1/v^-\) grows, and flows also change. A rigorous limit needs the complete evolution and the chosen continuation.

For matrices in a common compatible norm, \(\|A_j\|\le\rho<1\) implies \(\|A_N\cdots A_1\|\le\rho^N\), without commutativity. The critique’s proposed constant-scaled-rotation counterexample was false. Merely having every norm below one is weaker: \(\prod_{j=1}^N(1-1/(j+1)^2)=(N+2)/(2(N+1))\to1/2\).

Numerically short inter-event times are a warning, not a proof of Zeno behavior. A rest threshold, compliance law, or impulse-based time-stepping method changes how the unresolved behavior is represented and needs a convergence/physical assessment. Increasing dissipation does not generally remove ideal bouncing-ball Zeno.

7. Optimization Across an Event

Event Time Also Changes Cost

The boundary identity on a guard is \(V^-=c+V^+\circ R\). Differentiating it only along the guard differs from differentiating a common-time value. A reliable construction augments the state with accumulated cost \(z\), sets \(\dot z=L_i\), and resets \(z^+=z^-+c(t,x^-)\). Applying the same saltation derivation yields

\[ \delta z^+=\delta z^-+a\,\delta x^-, \quad a=c_x-\frac{L^- -L^++c_xf^-+c_t}{d}h_x. \tag{23}\]

Thus an outgoing endpoint costate pulls back as

\[ \lambda^-=S^{\mathsf T}\lambda^++a^{\mathsf T}. \tag{24}\]

With no event cost and matching running-cost values, \(a=0\). Otherwise simply using \(S^{\mathsf T}\lambda^+\) can omit the cost of spending longer in one mode.

For a complete differentiable event-resolved discrete map \(F\) and corresponding interval cost \(\ell\),

\[ V_x=\ell_x+F_x^{\mathsf T}V_x^+, \quad V_{xx}=\ell_{xx}+F_x^{\mathsf T}V_{xx}^+F_x +\sum_r(V_x^+)_r(F_r)_{xx}. \tag{25}\]

The last term is map curvature. Dropping it gives an approximation, as in an iLQR/Gauss–Newton treatment of dynamics, not an exact second-order DDP identity. The small example \(F(x)=x^2\), \(V^+(y)=y\) has zero outgoing Hessian but composite Hessian \(2\).

What Riccati Recursion Can and Cannot Promise

For a declared continuous linear quadratic problem,

\[ -\dot P=Q+A^{\mathsf T}P+PA-PBR^{-1}B^{\mathsf T}P. \tag{26}\]

The sign of the control-elimination term matters. \(B\) need not have full row rank. Underactuated systems admit finite-horizon Riccati equations; stabilizing infinite-horizon solutions require the appropriate stabilizability/detectability conditions.

A hybrid optimization algorithm must propagate the event-resolved maps, handle infeasible trial controls and changing event order, regularize optimization curvature where justified, and verify actual rollout improvement. Adding \(\epsilon I\) to a physical saltation matrix invents a different sensitivity. Singular resets do not automatically prevent a derivative or an optimization solution.

The earlier quadratic-convergence theorem and fixed iteration counts are withdrawn. They lacked a fully specified algorithm, sufficient regularity/second-order assumptions and executable evidence. Smooth \(Q_{uu}\succ0\) along one path alone does not prove all those claims. Kong, Council and Johnson develop a specific hybrid iLQR method with saltation updates and reference extensions for mode mismatch; its results should be read within that algorithm’s tested scope.

8. Contact-Implicit and Compliant Alternatives

Complementarity Is a Constraint, Not a Solver

For candidate gaps \(\phi_i(q)\) and normal forces \(\lambda_i\), sustained-contact complementarity reads

\[ 0\le\phi_i(q)\perp\lambda_i\ge0. \tag{27}\]

It permits zero gap with zero force, as well as load-bearing contact. The scalar product equation is smooth; its feasible set is nonconvex and degenerate where both variables vanish. Gap and force complementarity alone does not specify impact impulses, tangential friction or consistent acceleration.

In trajectory optimization these become a mathematical program with complementarity constraints. A linear complementarity problem is a special algebraic form, not a guarantee of efficient global solution for arbitrary matrices. Standard nonlinear-program constraint qualifications often fail at complementarity points.

The relaxation \(\phi_i\lambda_i\le\epsilon\), together with nonnegativity, allows simultaneous small gap and force. Its units and scaling matter; it is not a sigmoid. Sending \(\epsilon\) toward zero needs feasibility, boundedness and convergence checks. A negative-log barrier can enforce strict positivity in an appropriate interior-point formulation, but positivity alone does not enforce complementary contact. A positive log added to a minimization objective has the wrong barrier sign.

Posa, Cantu and Tedrake formulate contact trajectory optimization as an MPCC, using contact forces as decision variables and a specified discretization. That is a concrete method, not a universal claim that all contact sequences or global optima will be found.

Choose the Contact Resolution for the Output

A penalty force \(F_n=k\max(0,-\phi)\) is continuous but has a derivative kink. Adding a damper only on the contact side can introduce a force discontinuity and tensile forces unless the unilateral law is formulated carefully. A linear mass-spring contact time scale is \(\sqrt{m_{\rm eff}/k}\), not \(1/\sqrt{k}\) with the mass silently omitted. Stable and accurate timesteps also depend on damping and integrator.

Compliance can be essential when the output is a force peak or deformation. A rigid impulse model can be efficient for trajectory-level analysis when its contact law and event resolution are adequate. Time stepping can integrate impulses without locating every microscopic collision, but its outputs and sensitivities belong to that discrete model.

Neither event-based modeling nor smoothing guarantees better accuracy, speed, stable gaits, or physical feasibility. Compare models at matched outputs, parameter evidence and numerical tolerances. A solver’s successful termination does not validate a contact law.

9. How the Swing Questions Fit Together

The pre-impact body/club state depends on earlier actuator forces, gravity, inertial coupling, contact support, shaft deformation and controller history. Impact maps that incoming state into ball/head outcomes. Ball flight then depends on launch velocity, launch direction, spin and aerodynamic conditions. These stages compose; none supplies the missing assumptions of another.

For a declared parameterized intervention \(\alpha\) and a common post-event output \(y=H(x(T),p)\),

\[ \frac{dy}{d\alpha} =H_x\frac{\partial x(T)}{\partial\alpha} +H_p\frac{dp}{d\alpha}. \tag{28}\]

Compute the state sensitivity using the flows and event corrections. If instead \(y\) is measured at impact itself, use the event-state derivative and any explicit time dependence of \(H\). Fixing the impact time while changing the swing solves a different counterfactual.

This distinction connects several practical questions:

  • Energy transfer: Joint force/moment powers and segment balances explain how energy moves before contact. Club or pelvis deceleration alone does not identify its destination.
  • Control authority: A torque perturbation changes future posture, velocity and event timing. A pointwise drift/input decomposition is not a finite intervention result.
  • Shaft behavior: Stored strain energy, modal phase and grip/club coupling influence incoming contact conditions. A rigid reset without those states cannot establish shaft-performance claims.
  • Accuracy: Small uncertainty in ball position or face orientation can change the guard normal, impact offset and effective mass. Speed alone does not determine the outcome.
  • Learning and robustness: A local derivative is conditional on the model and contact sequence. Repeated measurements and held-out predictions test whether that conditional model is useful.

For small uncertainty with fixed event sequence, propagate state and parameter covariance through the combined sensitivity, including cross covariance. Broad uncertainty that changes contact order or misses the ball may require separate modes or a distributional simulation; one Gaussian covariance and one saltation matrix can hide qualitatively different outcomes.

The vacuum range formula \(v^2\sin(2\theta)/g\) assumes no aerodynamics and equal launch/landing height. Its \(\theta\) is launch angle, not generally clubface angle. A golf objective must specify carry, dispersion, speed, spin, effort or risk explicitly. These distinctions let an optimization investigate a swing argument without assuming its answer.

10. An Executable Sensitivity Check

Resolve the Event in Every Rollout

The following NumPy example returns a terminal state, its initial-state Jacobian and its restitution derivative for exactly one ideal bounce. It uses exact free-flight equations and an analytically located event. It rejects horizons before the first bounce or at/after the second; it is not a general multi-contact simulator.

# Event-resolved bounce example
import numpy as np

GRAVITY_M_S2 = 9.81


def one_bounce(
    state: np.ndarray, final_time: float, restitution: float,
    gravity: float = GRAVITY_M_S2,
) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
    """Return one-bounce state and derivatives within a fixed event branch."""
    state = np.asarray(state, dtype=float)
    if state.shape != (2,):
        raise ValueError("State must contain height and upward velocity.")
    height, velocity = state
    values = [height, velocity, final_time, restitution, gravity]
    if not np.all(np.isfinite(values)):
        raise ValueError("Inputs must be finite.")
    if height <= 0 or gravity <= 0 or not 0 < restitution <= 1:
        raise ValueError("Require positive height/gravity and 0 < e <= 1.")
    speed = np.sqrt(velocity**2 + 2 * gravity * height)
    # Avoid subtraction cancellation for a rapidly descending initial state.
    impact_time = (
        2 * height / (speed - velocity)
        if velocity <= 0
        else (velocity + speed) / gravity
    )
    second_time = impact_time + 2 * restitution * speed / gravity
    if not impact_time < final_time < second_time:
        raise ValueError("The horizon must lie strictly between bounces.")
    remaining = final_time - impact_time
    terminal = np.array([
        restitution * speed * remaining - gravity * remaining**2 / 2,
        restitution * speed - gravity * remaining,
    ])
    flow_before = np.array([[1.0, impact_time], [0.0, 1.0]])
    flow_after = np.array([[1.0, remaining], [0.0, 1.0]])
    saltation = np.array([
        [-restitution, 0.0],
        [gravity * (1 + restitution) / speed, -restitution],
    ])
    jacobian = flow_after @ saltation @ flow_before
    derivative_e = speed * np.array([remaining, 1.0])
    return terminal, jacobian, derivative_e


initial = np.array([1.0, 0.0])
terminal, jacobian, derivative_e = one_bounce(initial, 0.7, 0.8)
epsilon = 1e-6
finite_difference = np.column_stack([
    (one_bounce(initial + epsilon * direction, 0.7, 0.8)[0]
     - one_bounce(initial - epsilon * direction, 0.7, 0.8)[0])
    / (2 * epsilon)
    for direction in np.eye(2)
])
np.testing.assert_allclose(jacobian, finite_difference, rtol=2e-7, atol=2e-8)

The numerical comparison independently relocates the event after each initial-state perturbation. Keeping the old event time during finite differences would test a different map. Testing several perturbation sizes distinguishes truncation error from roundoff. The derivative in the code is a mathematical/numerical verification, not experimental validation of bouncing balls or golf equipment.

General Event Detection and Autodiff

For numerically integrated flows, bracket an admissible sign change and refine the zero using accurate dense output or reintegration. A guard residual tolerance is not automatically a time tolerance: locally \(\delta t\approx-\delta h/d\). Grazing makes that conversion ill-conditioned. Bisection narrows a valid bracket geometrically; a universal “five iterations” accuracy claim has no meaning without the original bracket and tolerance. Newton needs a reliable derivative and a suitable initial neighborhood.

Check direction, competing events and post-reset mode before resuming. Finite steps can miss multiple roots, and a fixed single-bounce demonstration cannot be continued through later impacts by allowing negative height.

Automatic differentiation differentiates the executed program. A branchy event detector may need implicit event differentiation or a custom derivative. The primal applies \(R\) to the state; it never applies \(S\) as a substitute for the physical reset. A reverse-mode derivative pulls a covector through the transpose of the complete event-resolved Jacobian.

For a JAX custom VJP, the forward rule returns the output and residuals, while the backward rule returns cotangents for the differentiable inputs. Returning zero/None for an input that actually affects the requested derivative changes the result. A forward rule with a fixed event time and a backward rule that assumes a state-triggered event do not describe the same function. Continuous adjoint integration and differentiation of a numerical timestep scheme also need to be distinguished.

Checks That Make an Argument Reviewable

Useful checks include momentum and energy balance for the declared impact, nonnegative normal impulse, friction feasibility, event direction and sequence, finite-difference sensitivities with relocated events, and independent step/tolerance refinement. For optimization, also report the objective, constraints, initialization, solver, stopping criteria and held-out rollout behavior. Failed contact modes or missed events should remain visible rather than being hidden by a modified saltation matrix.

The accompanying regression tests exercise the published code, its unsupported branches, mass-metric projection, energy loss, cost-boundary terms, second-order composition and contraction counterexamples. The two companion articles distinguish the corrected results from earlier unsupported claims.

Exercises for Derivation and Investigation

  1. Derive the moving-floor saltation using \(h(q,t)=q-at\) and relative-velocity restitution. Verify it by relocating both event times.
  2. Use two different off-guard extensions of the same reset and prove that their saltation matrices agree.
  3. Differentiate a velocity-dependent restitution law and compare with finite differences away from grazing.
  4. Derive the mass-metric impact loss and give a non-diagonal inertia example where Euclidean projection gives the wrong result.
  5. Add a state-dependent event cost to a two-mode constant-speed system. Verify the augmented cost row independently.
  6. Compare a one-event singular-value bound with the full flow–jump–flow gain under two physically declared state scalings.
  7. Construct two noncommuting uniformly contractive matrices and bound their product without diagonalizing them.
  8. Derive the contact reaction for a mass moving at constant speed on a circle; explain the missing force if \(\dot Jv\) is omitted.
  9. Specify a golf intervention, its impact-time convention and output. Identify which measurements distinguish its prediction from a competing explanation.
  10. Compare a rigid and compliant collision at matched impulse. Identify which outputs can still disagree and why.

Sources and Scope

The equations above are worked derivations and manufactured examples, with their assumptions stated locally. The modern saltation tutorial Kong et al. (2024) provides the established sensitivity framework. The linked hybrid iLQR paper identifies a specific optimization method; the linked MPCC paper describes a particular contact-implicit formulation. Cortés provides solution concepts for discontinuous vector fields, and the JAX documentation specifies its custom-derivative interface. None of these sources is evidence for the earlier claimed optimal swing, iteration counts, or universal superiority of one contact model.

References

Kong, Nathan J., J. Joe Payne, James Zhu, and Aaron M. Johnson. 2024. “Saltation Matrices: The Essential Tool for Linearizing Hybrid Dynamical Systems.” Proceedings of the IEEE 112 (6): 585–608. https://doi.org/10.1109/jproc.2024.3440211.

Citation

BibTeX citation: Download .bib
@online{olson2026,
  author = {Olson, Dieter},
  title = {Hybrid {Tangent} {Spaces}},
  date = {2026-01-18},
  url = {https://affinedrift.com/articles/tangent-hyperplane-articles/Advanced/Hybrid_Tangent_Spaces.html},
  langid = {en}
}
For attribution, please cite this work as:
Olson, Dieter. 2026. “Hybrid Tangent Spaces.” January 18. https://affinedrift.com/articles/tangent-hyperplane-articles/Advanced/Hybrid_Tangent_Spaces.html.