Discrete Dynamics and Variational Integrators

The variational integrator simulates a discrete mechanical systems. Given a known state (time \(t_{k-1}\), configuration \(q_{k-1}\), and discrete momentum \(p_{k-1}\)) and inputs (force inputs \(u_{k-1}\) and next kinematic configuration \(\rho_{k-1}\)), the integrator finds the next state:

\[(t_{k-1}, q_{k-1}, p_{k-1}), (u_{k-1}, \rho_{k-1}) \Rightarrow (t_k, q_k, p_k)\]

The integrator also finds the discrete constraint force variable \(\lambda_{k-1}\).

The variational integrator finds the next state by numerically solving the constrained Discrete Euler-Langrange (DEL) equation for \(q_k\) and \(\lambda_{k-1}\):

\[ \begin{align}\begin{aligned}p_{k-1} + D_1L_d(q_{k-1}, q_k, t_{k-1}, t_{k-1}) + f_d^-(q_{k-1}, q_k, u_{k-1}, t_{k-1}, t_k) - Dh^T(q_{k-1})\dot \lambda_{k-1}\\h(q_k) = 0\end{aligned}\end{align} \]

and then calculating the new discrete momentum:

\[p_k = D_2L_d(q_{k-1}, q_k, t_{k-1}, t_k)\]

In trep, we simplify notation by letting \(k=2\), so that we consider \(t_1\), \(q_1\), and \(p_1\) to be the previous state, and \(t_2\), \(q_2\), and \(p_2\) to be the new or current state.

\[ \begin{align}\begin{aligned}L_2 = L_d(q_1, q_2, t_1, t_2)\\f_2^\pm = f_d^\pm(q_1, q_2, u_1, t_1, t_2)\\h_1 = h(q_1)\\h_2 = h(q_2)\end{aligned}\end{align} \]