Compared to the previous (differential) kinematics concerning how a robot moves, robot dynamics in the following lectures concerns about why a robot moves. Dynamics equation establishes a relationship between the forces/torques and their acceleration/velocities/positions.

Dynamics (Lagrange formulation)#

Lagrange formulation provides a systematic way to derive dynamics equation, independently of the reference coordinate frame. Once a set of independent variables \(q_{i}, i=1, \ldots, n\), termed generalized coordinates, are chosen which effectively describe an \(n\)-DOF robotic system, the Lagrangian of the system can be defined as

\[\mathcal{L}=\mathcal{T}-\mathcal{U}\]

where \(\mathcal{T}\) and \(\mathcal{U}\) are the total kinetic energy and potential energy of the system, respectively. The dynamics equations from the Lagrangian is

\[\frac{d}{d t} \frac{\partial \mathcal{L}}{\partial \dot{q}_{i}}-\frac{\partial \mathcal{L}}{\partial q_{i}}=\xi_{i} \quad i=1, \ldots, n\]

where \(\xi_{i}\) is the generalized force associated with \(q_{i}\) (the generalized force \(\xi_i\) should be dual to \(q_i\) in the sense that \(\xi_i*q_i\) generate power). In compact form, the above equation can be written as

\[\frac{d}{d t}\left(\frac{\partial \mathcal{L}}{\partial \dot{\boldsymbol{q}}}\right)^{T}-\left(\frac{\partial \mathcal{L}}{\partial \boldsymbol{q}}\right)^{T}=\boldsymbol{\xi}\]

For a manipulator with an open kinematic chain, the generalized coordinates are joint variables \(\boldsymbol{q}\). The generalized forces are given by the net forces from the joint actuator torques, the joint friction torques, as well as the joint torques induced by end-effector forces at the contact with the environment.

Computation of Kinetic Energy#

Consider a manipulator with \(n\) links. The total kinetic energy is due to the motion of each link and the motion of each joint actuator:

\[\mathcal{T}=\sum_{i=1}^{n}\left(\mathcal{T}_{\ell_{i}}+\mathcal{T}_{m_{i}}\right)\]

where \(\mathcal{T}_{\ell_{i}}\) is the kinetic energy of Link \(i\) and \(\mathcal{T}_{m_{i}}\) is the kinetic energy of the motor actuating Joint \(i\)

Kinetic Energy of Motor \(i\)#

../_images/motori_kinematics.jpg

Fig. 65 Kinematic description of Motor \(i\)#

The motor of Joint \(i\) is assumed to be located on Link \(i-1\). The kinetic energy contribution of the motor of Joint \(i\) can be computed in a formally analogous way to that of the link. Consider the typical case of rotary electric motors (that can actuate both revolute and prismatic joints by means of suitable transmissions). It can be assumed that the contribution of the fixed part (stator) is included in that of the link on which such motor is located, and thus the sole contribution of the rotor is to be computed.

The kinetic energy of Rotor \(i\) can be written as

\[\mathcal{T}_{m_{i}}=\frac{1}{2} m_{m_{i}} \dot{\boldsymbol{p}}_{m_{i}}^{T} \dot{\boldsymbol{p}}_{m_{i}}+\frac{1}{2} \boldsymbol{\omega}_{m_{i}}^{T} \boldsymbol{I}_{m_{i}} \boldsymbol{\omega}_{m_{i}}\]

where \(m_{m_{i}}\) is the mass of the rotor, \(\dot{\boldsymbol{p}}_{m_{i}}\) denotes the linear velocity of the centre of mass of the rotor, \(\boldsymbol{I}_{m_{i}}\) is the inertia tensor of the rotor relative to its centre of mass, and \(\boldsymbol{\omega}_{m_{i}}\) denotes the angular velocity of the rotor.

Let \(\vartheta_{m_{i}}\) denote the angular position of the rotor. On the assumption of a rigid transmission, one has

\[k_{r i} \dot{q}_{i}=\dot{\vartheta}_{m_{i}}\]

where \(k_{r i}\) is gear reduction ratio. For a prismatic joint, gear reduction ratio is a dimensional quantity.

The total angular velocity of the rotor is

\[\boldsymbol{\omega}_{m_{i}}=\boldsymbol{\omega}_{i-1}+k_{r i} \dot{q}_{i} \boldsymbol{z}_{m_{i}}\]

where \(\boldsymbol{\omega}_{i-1}\) is the angular velocity of Link \(i-1\) on which the motor is located, and \(\boldsymbol{z}_{m_{i}}\) denotes the unit vector along the rotor axis.

To express the rotor kinetic energy as a function of the joint variables, it is worth expressing the linear velocity of the rotor centre of mass as

\[\dot{\boldsymbol{p}}_{m_{i}}=\boldsymbol{J}_{P}^{\left(m_{i}\right)} \dot{\boldsymbol{q}}\]

The Jacobian to compute is then

\[\boldsymbol{J}_{P}^{\left(m_{i}\right)}=\left[\begin{array}{llllll} \boldsymbol{J}_{P 1}^{\left(m_{i}\right)} & \ldots & \boldsymbol{J}_{P, i-1}^{\left(m_{i}\right)} & \mathbf{0} & \ldots & \mathbf{0} \end{array}\right]\]

whose columns are given by

\[\begin{split}\boldsymbol{J}_{P j}^{\left(m_{i}\right)}= \begin{cases}\boldsymbol{z}_{j-1} & \text { for a prismatic joint } \\ \boldsymbol{z}_{j-1} \times\left(\boldsymbol{p}_{m_{i}}-\boldsymbol{p}_{j-1}\right) & \text { for a revolute joint }\end{cases}\end{split}\]

where \(\boldsymbol{p}_{j-1}\) is the position vector of the origin of Frame \(j-1\).

The angular velocity expressed as a function of the joint variables is $\(\boldsymbol{\omega}_{m_{i}}=\boldsymbol{J}_{O}^{\left(m_{i}\right)} \dot{\boldsymbol{q}}\)$

The Jacobian to compute is then

\[\boldsymbol{J}_{O}^{\left(m_{i}\right)}=\left[\begin{array}{llllll} \boldsymbol{J}_{O 1}^{\left(m_{i}\right)} & \ldots & \boldsymbol{J}_{O, i}^{\left(m_{i}\right)} & \mathbf{0} & \ldots & \mathbf{0} \end{array}\right]\]

whose columns are

\[\begin{split}\boldsymbol{\jmath}_{O j}^{\left(m_{i}\right)}= \begin{cases}\boldsymbol{J}_{O j}^{\left(\ell_{i}\right)} & j=1, \ldots, i-1 \\ k_{r i} \boldsymbol{z}_{m_{i}} & j=i .\end{cases}\end{split}\]

Hence, the kinetic energy of Rotor \(i\) can be written as

\[\mathcal{T}_{m_{i}}=\frac{1}{2} m_{m_{i}} \dot{\boldsymbol{q}}^{T} \boldsymbol{J}_{P}^{\left(m_{i}\right) T} \boldsymbol{J}_{P}^{\left(m_{i}\right)} \dot{\boldsymbol{q}}+\frac{1}{2} \dot{\boldsymbol{q}}^{T} \boldsymbol{J}_{O}^{\left(m_{i}\right) T} \boldsymbol{R}_{m_{i}} \boldsymbol{I}_{m_{i}}^{m_{i}} \boldsymbol{R}_{m_{i}}^{T} \boldsymbol{J}_{O}^{\left(m_{i}\right)} \dot{\boldsymbol{q}}\]

Total Kinetic Energy#

Finally, by summing the kinetic energies of Links and motors, the total kinetic energy of the manipulator with actuators is given by the quadratic form

\[\mathcal{T}=\frac{1}{2} \dot{\boldsymbol{q}}^{T} \boldsymbol{B}(\boldsymbol{q}) \dot{\boldsymbol{q}}=\frac{1}{2} \sum_{i=1}^{n} \sum_{j=1}^{n} b_{i j}(\boldsymbol{q}) \dot{q}_{i} \dot{q}_{j}\]

where

\[\begin{aligned} \boldsymbol{B}(\boldsymbol{q})=\sum_{i=1}^{n}\left(m_{\ell_{i}}\right. & \boldsymbol{J}_{P}^{\left(\ell_{i}\right) T} \boldsymbol{J}_{P}^{\left(\ell_{i}\right)}+\boldsymbol{J}_{O}^{\left(\ell_{i}\right) T} \boldsymbol{R}_{i} \boldsymbol{I}_{\ell_{i}}^{i} \boldsymbol{R}_{i}^{T} \boldsymbol{J}_{O}^{\left(\ell_{i}\right)}+\left. m_{m_{i}} \boldsymbol{J}_{P}^{\left(m_{i}\right) T} \boldsymbol{J}_{P}^{\left(m_{i}\right)}+\boldsymbol{J}_{O}^{\left(m_{i}\right) T} \boldsymbol{R}_{m_{i}} \boldsymbol{I}_{m_{i}}^{m_{i}} \boldsymbol{R}_{m_{i}}^{T} \boldsymbol{J}_{O}^{\left(m_{i}\right)}\right) \end{aligned}\]

is the \((n \times n)\) inertia matrix which is symmetric, positive definite, and configuration - dependent (in general).

Computation of Potential Energy#

As done for kinetic energy, the potential energy stored in the manipulator is given by the sum of the contributions relative to each link as well as to each rotor:

\[\mathcal{U}=\sum_{i=1}^{n}\left(\mathcal{U}_{\ell_{i}}+\mathcal{U}_{m_{i}}\right)\]

On the assumption of rigid links, the potential energy of gravitational forces is

\[\mathcal{U}_{\ell_{i}}=-\int_{V_{\ell_{i}}} \boldsymbol{g}_{0}^{T} \boldsymbol{p}_{i}^{*} \rho d V=-m_{\ell_{i}} \boldsymbol{g}_{0}^{T} \boldsymbol{p}_{\ell_{i}}\]

where \(\boldsymbol{g}_{0}\) is the gravity acceleration vector in the base frame (e.g., \(\boldsymbol{g}_{0}=\) \(\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\). As regards the contribution of Rotor \(i\), one has

\[\mathcal{U}_{m_{i}}=-m_{m_{i}} \boldsymbol{g}_{0}^{T} \boldsymbol{p}_{m_{i}}\]

The total potential energy is given by

\[\mathcal{U}=-\sum_{i=1}^{n}\left(m_{\ell_{i}} \boldsymbol{g}_{0}^{T} \boldsymbol{p}_{\ell_{i}}+m_{m_{i}} \boldsymbol{g}_{0}^{T} \boldsymbol{p}_{m_{i}}\right)\]

which reveals that potential energy, through the vectors \(\boldsymbol{p}_{\ell_{i}}\) and \(\boldsymbol{p}_{m_{i}}\) is a function only of the joint variables \(\boldsymbol{q}\), and not of the joint velocities \(\dot{\boldsymbol{q}}\)

Equations of Motion#

Having computed the total kinetic and potential energy of the system, the Lagrangian for the manipulator is

\[\mathcal{L}(\boldsymbol{q}, \dot{\boldsymbol{q}})=\mathcal{T}(\boldsymbol{q}, \dot{\boldsymbol{q}})-\mathcal{U}(\boldsymbol{q})\]

Taking the derivatives required by Lagrange equations \(\frac{d}{d t}\left(\frac{\partial \mathcal{L}}{\partial \dot{\boldsymbol{q}}}\right)^{T}-\left(\frac{\partial \mathcal{L}}{\partial \boldsymbol{q}}\right)^{T}=\boldsymbol{\xi}\) and recalling that \(\mathcal{U}\) does not depend on \(\dot{\boldsymbol{q}}\) yields

\[\boldsymbol{B}(\boldsymbol{q}) \ddot{\boldsymbol{q}}+\boldsymbol{n}(\boldsymbol{q}, \dot{\boldsymbol{q}})=\boldsymbol{\xi}\]

where

\[\boldsymbol{n}(\boldsymbol{q}, \dot{\boldsymbol{q}})=\dot{\boldsymbol{B}}(\boldsymbol{q}) \dot{\boldsymbol{q}}-\frac{1}{2}\left(\frac{\partial}{\partial \boldsymbol{q}}\left(\dot{\boldsymbol{q}}^{T} \boldsymbol{B}(\boldsymbol{q}) \dot{\boldsymbol{q}}\right)\right)^{T}+\left(\frac{\partial \mathcal{U}(\boldsymbol{q})}{\partial \boldsymbol{q}}\right)^{T}\]

In detail, noticing that \(\mathcal{U}\) does not depend on \(\dot{\boldsymbol{q}}\) and

\[\begin{aligned} \frac{d}{d t}\left(\frac{\partial \mathcal{L}}{\partial \dot{q}_{i}}\right)=\frac{d}{d t}\left(\frac{\partial \mathcal{T}}{\partial \dot{q}_{i}}\right) & =\sum_{j=1}^{n} b_{i j}(\boldsymbol{q}) \ddot{q}_{j}+\sum_{j=1}^{n} \frac{d b_{i j}(\boldsymbol{q})}{d t} \dot{q}_{j} =\sum_{j=1}^{n} b_{i j}(\boldsymbol{q}) \ddot{q}_{j}+\sum_{j=1}^{n} \sum_{k=1}^{n} \frac{\partial b_{i j}(\boldsymbol{q})}{\partial q_{k}} \dot{q}_{k} \dot{q}_{j} \end{aligned}\]

and

\[\frac{\partial \mathcal{T}}{\partial q_{i}}=\frac{1}{2} \sum_{j=1}^{n} \sum_{k=1}^{n} \frac{\partial b_{j k}(\boldsymbol{q})}{\partial q_{i}} \dot{q}_{k} \dot{q}_{j}\]

Further,

\[\begin{aligned} \frac{\partial \mathcal{U}}{\partial q_{i}} & =-\sum_{j=1}^{n}\left(m_{\ell_{j}} \boldsymbol{g}_{0}^{T} \frac{\partial \boldsymbol{p}_{\ell_{j}}}{\partial q_{i}}+m_{m_{j}} \boldsymbol{g}_{0}^{T} \frac{\partial \boldsymbol{p}_{m_{j}}}{\partial q_{i}}\right) =-\sum_{j=1}^{n}\left(m_{\ell_{j}} \boldsymbol{g}_{0}^{T} \boldsymbol{J}_{P i}^{\left(\ell_{j}\right)}(\boldsymbol{q})+m_{m_{j}} \boldsymbol{g}_{0}^{T} \boldsymbol{J}_{P i}^{\left(m_{j}\right)}(\boldsymbol{q})\right)=g_{i}(\boldsymbol{q}) \end{aligned}\]

As a result, the equations of motion are

\[\sum_{j=1}^{n} b_{i j}(\boldsymbol{q}) \ddot{q}_{j}+\sum_{j=1}^{n} \sum_{k=1}^{n} h_{i j k}(\boldsymbol{q}) \dot{q}_{k} \dot{q}_{j}+g_{i}(\boldsymbol{q})=\xi_{i} \quad i=1, \ldots, n .\]

where

\[h_{i j k}=\frac{\partial b_{i j}}{\partial q_{k}}-\frac{1}{2} \frac{\partial b_{j k}}{\partial q_{i}}\]

A physical interpretation of the above reveals that:

  • For the acceleration terms: The coefficient \(b_{i i}\) represents the moment of inertia at Joint \(i\) axis, in the current manipulator configuration, when the other joints are blocked. The coefficient \(b_{i j}\) accounts for the effect of acceleration of Joint \(j\) on Joint \(j\).

  • For the quadratic velocity terms: The term \(h_{i j j} \dot{q}_{j}^{2}\) is the centrifugal effect induced on Joint \(i\) by velocity of Joint \(j\). The term \(h_{i j k} \dot{q}_{j} \dot{q}_{k}\) represents the Coriolis effect induced on Joint \(i\) by velocities of Joints \(j\) and \(k\).

  • For the configuration-dependent terms: The term \(g_{i}\) represents the moment generated at Joint \(i\) axis of the manipulator, in the current configuration, by the presence of gravity.

Regarding the generalized force \(\boldsymbol{\xi}\) at the manipulator joints, it is $\(\boldsymbol{\xi}=\underbrace{\boldsymbol{\tau}}_{\text{motor torque}}-\underbrace{\boldsymbol{F}_{v} \dot{\boldsymbol{q}}}_{\text{viscous friction torques}}-\underbrace{\boldsymbol{F}_{s} \operatorname{sgn}(\dot{\boldsymbol{q}})}_{\text{Coulomb friction torques}}-\underbrace{\boldsymbol{J}^{T}(\boldsymbol{q}) \boldsymbol{h}_{e}}_{\text{torques induced by contact forces.}}\)$

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.

In summary, the equations of motion for a robot manipulator is

\[\boldsymbol{B}(\boldsymbol{q}) \ddot{\boldsymbol{q}}+\boldsymbol{C}(\boldsymbol{q}, \dot{\boldsymbol{q}}) \dot{\boldsymbol{q}}+\boldsymbol{F}_{v} \dot{\boldsymbol{q}}+\boldsymbol{F}_{s} \operatorname{sgn}(\dot{\boldsymbol{q}})+\boldsymbol{g}(\boldsymbol{q})=\boldsymbol{\tau}-\boldsymbol{J}^{T}(\boldsymbol{q}) \boldsymbol{h}_{e}\]

where \(\boldsymbol{C}\) is a suitable \((n \times n)\) matrix such that its elements \(c_{i j}\) satisfy the equation

\[\sum_{j=1}^{n} c_{i j} \dot{q}_{j}=\sum_{j=1}^{n} \Big(\sum_{k=1}^{n}c_{ijk}\dot{q}_{k}\Big) \dot{q}_{j}=\sum_{j=1}^{n} \sum_{k=1}^{n} h_{i j k} \dot{q}_{k} \dot{q}_{j}\]

Here, the definition of \(c_{ijk}\) is from $\(\begin{aligned} \sum_{j=1}^{n} \sum_{k=1}^{n}h_{ijk}\dot{q}_{k} \dot{q}_{j}= \sum_{j=1}^{n} \sum_{k=1}^{n}\Big(\frac{\partial b_{i j}}{\partial q_{k}}-\frac{1}{2} \frac{\partial b_{j k}}{\partial q_{i}}\Big)\dot{q}_{k} \dot{q}_{j} &=\sum_{j=1}^{n} \sum_{k=1}^{n}\Big(\frac{1}{2}\frac{\partial b_{i j}}{\partial q_{k}}+\frac{1}{2}\frac{\partial b_{i j}}{\partial q_{k}}-\frac{1}{2} \frac{\partial b_{j k}}{\partial q_{i}}\Big)\dot{q}_{k} \dot{q}_{j}\\ &=\sum_{j=1}^{n} \sum_{k=1}^{n}\underbrace{\Big(\frac{1}{2}\frac{\partial b_{i j}}{\partial q_{k}}+\frac{1}{2}\frac{\partial b_{i k}}{\partial q_{j}}-\frac{1}{2} \frac{\partial b_{j k}}{\partial q_{i}}\Big)}_{c_{ijk}}\dot{q}_{k} \dot{q}_{j} \end{aligned}\)$

Therefore, $\(c_{ijk}=\frac{1}{2}\Big(\frac{\partial b_{i j}}{\partial q_{k}}+\frac{\partial b_{i k}}{\partial q_{j}}- \frac{\partial b_{j k}}{\partial q_{i}}\Big)\)$

Property: Skew-symmetry of \(\dot{\boldsymbol{B}}-2\boldsymbol{C}\)#

The proof idea: the total time derivative of kinetic energy of the manipulator equals the power generated by all the forces/torques including the gravity.

The time derivative of the kinetic energy:

\[\label{equ.diff_kinenergy} \frac{d \mathcal{T}}{dt }=\frac{1}{2}\frac{d}{dt}\left( \dot{\boldsymbol{q}}^{T} \boldsymbol{B}(\boldsymbol{q})\dot{\boldsymbol{q}} \right)=\dot{\boldsymbol{q}}^{T}\boldsymbol{B}(\boldsymbol{q})\ddot{\boldsymbol{q}}+\frac{1}{2}\left( \dot{\boldsymbol{q}}^{T} \dot{\boldsymbol{B}}(\boldsymbol{q})\dot{\boldsymbol{q}} \right)\]

The power generated by all (generalized) external forces including gravity:

\[\label{equ.power_forces} \dot{\boldsymbol{q}}^{T}(-\boldsymbol{F}_v{\dot{\boldsymbol{q}}}-\boldsymbol{F}_s\text{sgn}({\dot{\boldsymbol{q}}})-\boldsymbol{g}(\boldsymbol{q})-\boldsymbol{\tau}-\boldsymbol{J}^T(\boldsymbol{q})\boldsymbol{h}_{e})\]

Let ([equ.diff_kinenergy]{reference-type=”ref” reference=”equ.diff_kinenergy”}) equal ([equ.power_forces]{reference-type=”ref” reference=”equ.power_forces”}), leading to $\(\label{equ.intermediate} \dot{\boldsymbol{q}}^{T}\boldsymbol{B}(\boldsymbol{q})\ddot{\boldsymbol{q}}+\frac{1}{2}\left( \dot{\boldsymbol{q}}^{T} \dot{\boldsymbol{B}}(\boldsymbol{q})\dot{\boldsymbol{q}} \right)=\dot{\boldsymbol{q}}^{T}(-\boldsymbol{F}_v{\dot{\boldsymbol{q}}}-\boldsymbol{F}_s\text{sgn}({\dot{\boldsymbol{q}}})-\boldsymbol{g}(\boldsymbol{q})-\boldsymbol{\tau}-\boldsymbol{J}^T(\boldsymbol{q})\boldsymbol{h}_{e})\)$ Recall the dynamics equation we have previously introduced,

\[\boldsymbol{B}(\boldsymbol{q}) \ddot{\boldsymbol{q}}+\boldsymbol{C}(\boldsymbol{q}, \dot{\boldsymbol{q}}) \dot{\boldsymbol{q}}+\boldsymbol{F}_{v} \dot{\boldsymbol{q}}+\boldsymbol{F}_{s} \operatorname{sgn}(\dot{\boldsymbol{q}})+\boldsymbol{g}(\boldsymbol{q})=\boldsymbol{\tau}-\boldsymbol{J}^{T}(\boldsymbol{q}) \boldsymbol{h}_{e}\]

We multiply \(\dot{\boldsymbol{q}}^T\) on both sides of the above dynamics equation and subtract ([equ.intermediate]{reference-type=”ref” reference=”equ.intermediate”}) on both sides. This yields

\[\frac{1}{2} \dot{\boldsymbol{q}}^{T} \boldsymbol{B}(\boldsymbol{q})\dot{\boldsymbol{q}}-\dot{\boldsymbol{q}}^T\boldsymbol{C}(\boldsymbol{q}, \dot{\boldsymbol{q}}) \dot{\boldsymbol{q}}=\frac{1}{2} \dot{\boldsymbol{q}}^{T} \big( \boldsymbol{B}(\boldsymbol{q})\dot{\boldsymbol{q}}-2\boldsymbol{C}(\boldsymbol{q}, \dot{\boldsymbol{q}})\big) \dot{\boldsymbol{q}}=\boldsymbol{0}\]

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.