Dynamics (Lagrangian formulation)#
Compared to the previous kinematics concerning how a robot moves, robot dynamics concerns about why a robot moves. Dynamics equation establishes a relationship between the forces/torques and their acceleration/velocities/positions.
Lagrange method provides a systematic way to derive dynamics equation of a mechanical system. Suppose that the configuration space of a \(n\)-DOF mechanical system is described by a set of independent variables \(q_{i}, i=1, \ldots, n\), named generalized coordinates, the Lagrangian of the system is defined as
where \(\mathcal{T}\) and \(\mathcal{U}\) are the kinetic energy and potential energy of the system, respectively. The dynamics from the Lagrangian is
where \(\xi_{i}\) is the generalized force associated with \(q_{i}\) (the generalized force \(\xi_i\) is dual to \(q_i\) in the sense that \(\xi_i*q_i\) generate power). In compact form, the above equation can be written as
For an open-chain robot arm, the generalized coordinates are joint variables \(\boldsymbol{q}\). The generalized forces are the net torque/force at each joint.
Kinetic Energy of a Robot Arm#
Consider a \(n\)-DoF robot arm. The kinetic energy is due to the motion of each link. The total kinetic energy is given by
where \(\mathcal{T}_{\ell_{i}}\) is the kinetic energy of Link \(i\).
As shown in Fig. 67, the kinetic energy contribution of Link \(i\) is given by
where \(\rho\) is the density of the elementary particle of volume \(d V\); \(\dot{\boldsymbol{p}}_{i}^{*}\) denotes the linear velocity vector of the elementary particle; and \(V_{\ell_{i}}\) is the volume of Link \(i\). Here, the position \(\boldsymbol{p}_{i}^{*}\) of the elementary particle is expressed in the base frame.
The position \(\boldsymbol{p}_{l_{i}}\) of the link center of mass (COM) defined as
where \(m_{\ell_{i}}\) is the mass of link \(i\). We also define
As a result, the velocity of an elementary particle of link \(i\) can be expressed as
where \(\dot{\boldsymbol{p}}_{\ell_{i}}\) is the linear velocity of COM and \(\boldsymbol{\omega}_{i}\) is the angular velocity of the link.
By substituting (30) into (29), it leads to that the total kinetic energy of link \(i\), \( \mathcal{T}_{\ell_{i}}\), is the sumation of the following three terms
Translational term
Cross term
Rotational term
Recall that
Then,
is the inertia tensor relative to the COM of Link \(i\). Since \(\boldsymbol{r}_i\) is expressed in the base frame, this inertia tensor is thus also expressed in the base frame, thus is configuration-dependent.
Let’s consider \(\boldsymbol{r}_i^i\) be expressed in the frame of link \(i\)
where \(\boldsymbol{R}_{i}\) is the rotation matrix from Link \(i\) frame to the base frame. Then, from (33), we have
Here,
is expressed in the body frame (link \(i\) frame), and thus is configuration-independent.
By summing the translational and rotational terms, the total kinetic energy in (29) of link \(i\) is
Now, let’s find out the linear and angular velocities of Link \(i\) using Jacobian! Using our previous method to find Jacobian up to link \(i\), we have
where (think about why the columns after \(i\) is zeros?)
where
where \(\boldsymbol{p}_{j-1}\) is the position of the origin of Frame \(j-1\) and \(\boldsymbol{z}_{j-1}\) is the unit vector of axis \(z\) of Frame \(j-1\).
It follows that the kinetic energy of Link \(i\) in (34) can be written as
Important
Finally, by summing the kinetic energies of all Links, the total kinetic energy of a robot arm is
where
is the \((n \times n)\) inertia matrix which is symmetric, positive definite, and configuration - dependent.
Potential Energy of a Robot Arm#
The potential energy of a robot arm is given by the sum of the contributions of each link:
The potential energy of Link \(i\) is
where \(\boldsymbol{g}\) is the gravity acceleration vector in the base frame (e.g., \(\boldsymbol{g}=\) \(\left[\begin{array}{lll}0 & 0 & -g\end{array}\right]^{T}\) if \(z\) is the vertical axis), and \(\boldsymbol{p}_{\ell_{i}}\) the center of mass of Link \(i\).
Important
The total potential energy of the robot arm is
which shows that potential energy is only a function of the joint variable \({\boldsymbol{q}}\) because \(\boldsymbol{p}_{\ell_{i}}\) is a function of \(\boldsymbol{q}\),
Dynamics Equation (Different Forms)#
Vector Form#
Having computed the total kinetic energy \(\mathcal{T}(\boldsymbol{q}, \dot{\boldsymbol{q}})\) in (36) and potential energy \(\mathcal{U}(\boldsymbol{q})\) in (38) of the robot arm, the Lagrangian of the system is
Important
By applying the vector form of Lagrange formulation (28), we have the vector form of the dynamics equation:
where
Detailed Form#
Below, let’s also apply the detailed form of Lagrange formulation (27). Notice that \(\mathcal{U}\) does not depend on \(\dot{\boldsymbol{q}}\) and
and
Further,
Important
By applying the detailed form of Lagrange formulation (27), the detailed form of the dynamics equation is
where
and
A physical interpretation to each term in (40)
Acceleration term \(\sum_{j=1}^{n} b_{i j}(\boldsymbol{q}) \ddot{q}_{j}\): the diagonal coefficient \(b_{i i}\) represents the moment of inertia at Joint \(i\) axis, and off-diagonal coefficient \(b_{i j}\) accounts for the coupling effect of acceleration of Joint \(i\) on Joint \(j\).
For the quadratic velocity term \(\sum_{j=1}^{n} \sum_{k=1}^{n} h_{i j k}(\boldsymbol{q}) \dot{q}_{k} \dot{q}_{j}\): the term \(h_{i j j} \dot{q}_{j}^{2}\) is the centrifugal effect to Joint \(i\) by Joint \(j\). The term \(h_{i j k} \dot{q}_{j} \dot{q}_{k}\) represents the Coriolis effect on Joint \(i\) by Joints \(j\) and \(k\).
For the configuration-dependent term \(g_{i}(\boldsymbol{q})\): the term \(g_{i}\) represents the moment generated at Joint \(i\) axis by the gravity.
Christoffel-Symbols Form#
In may textbooks/papers, there is another commonly-used form of dynamics equation derived from (40). We introduce below. The quadratic velocity term in (40) has
Thus, we define
which is called Christoffel-symbols. Then, the dynamics equation in (40) becomes
with
Important
By writing (43) into a compact vector form, we have a new form of dynamics equation
where \(\boldsymbol{C}\) is a \((n \times n)\) matrix such that its elements \(C_{i j}\) is calculated by
with
Generalized forces/torques#
The generalized force \(\boldsymbol{\xi}\) applied on the right side of (39) or (40) includes
where \(\boldsymbol{F}_{v}\) denotes the \((n \times n)\) diagonal matrix of viscous friction coefficients; \(\boldsymbol{F}_{s}\) is an \((n \times n)\) diagonal matrix and \(\operatorname{sgn}(\dot{\boldsymbol{q}})\) denotes the \((n \times 1)\) vector whose components are given by the sign functions of the single joint velocities; and \(\boldsymbol{h}_{e}\) denotes the vector of force and moment exerted by the end-effector on the environment.
Skew-symmetry of \(\dot{\boldsymbol{B}}-2\boldsymbol{C}\)#
The idea: the total time derivative of kinetic energy of a robot arm equals the power generated by all the forces/torques including the gravity.
The time derivative of the kinetic energy:
The power generated by all (generalized) external forces including gravity:
Equalling (48) to (47), we have
Recall the dynamics equation:
We multiply \(\dot{\boldsymbol{q}}^T\) on both sides of (50) and subtract (50) from (49) on both sides. This yields
which holds for any \(\dot{\boldsymbol{q}}\). It means that \(\boldsymbol{B}(\boldsymbol{q})\dot{\boldsymbol{q}}-2\boldsymbol{C}(\boldsymbol{q}, \dot{\boldsymbol{q}})\) is a skew-symmetric matrix.
Example: Two-link Planar Arm#
Consider the two-link planar arm below.
The vector of generalized coordinates is \(\boldsymbol{q}=\left[\begin{array}{ll}\vartheta_{1} & \vartheta_{2}\end{array}\right]^{T}\). Let \(\ell_{1}, \ell_{2}\) be the distances of the centres of mass of the two links from the respective joint axes. Also let \(m_{\ell_{1}}, m_{\ell_{2}}\) be the masses of the two links, and let \(I_{\ell_{1}}, I_{\ell_{2}}\) be the moments of inertia relative to the Centers of mass of the two links, respectively.
With the chosen coordinate frames, by applying (35), the Jacobians for the COM of each link are
By applying (37), the inertia matrix is
By applying (46), the Christoffel symbols are
By applying (45), the matrix \(\boldsymbol{C}(\boldsymbol{q},\boldsymbol{\dot{q}})\) is
As for the gravitational terms, here the gravity accelration vector is \(\boldsymbol{g}=\left[\begin{array}{lll}0 & -g & 0\end{array}\right]^{T}\). By applying (42)
Given only motor toruqes \(\tau_{1}\) and \(\tau_{2}\) applied to the each joint, the dynamics equation is