# Newton-Euler equations

We are going to detail the Newton-Euler equations of motion, which correspond to the six unactuated coordinates in the equations of motion of humanoid robots. The final result will be:

I'm just writing them here for returning readers ;-) Let us now dive a bit deeper.

## Newton's equation

### Positions and inertias

Let us denote by \(\bfp_i\) the position in the world frame of a reference point on the robot's \(i^{\textrm{th}}\) link. We denote the center of mass by \(G\) and its position in the world frame by \(\bfp_G\).

Meanwhile, we denote by \(m_i\) the mass of link \(i\), and \(m = \sum_i m_i\) the robot's total mass.

### Forces

The robot is subject to gravity and contact forces. Let \(\bfg\) denote the
gravity vector. For a link \(i\) in contact with the environment, we write
\(\bff_i\) the resultant force exerted on the link. Let \(\bfh_{ij}\)
denote the *internal force* exerted by link \(i\) on link \(j\). We
take the convention that \(\bfh_{ij} = 0\) if links \(i\) and \(j\)
are not connected (similarly, \(\bff_i = 0\) if link \(i\) is not in
contact). All force vectors are expressed in the world frame.

### Equation

Newton's equation of motion links the resultant accelerations and forces:

An interesting point here is that \(\bfh_{ij} = - \bfh_{ji}\) (Newton's third law of motion), so that internal forces vanish in this sum over all links: \(\sum_i \sum_{j \neq i} \bfh_{ij} = 0\). In concise form, Newton's equation then binds the acceleration of the center of mass (COM) with the whole-body resultant force:

The *linear momentum* of the robot is defined by:

Then, Newton's equation can be written in concise form as:

With words: the rate of change of the linear momentum is equal to the resultant of external forces exerted on the robot.

## Euler's equation

Newton's equation binds the translations of the robot's links. Euler's equation provides a similar binding for their orientations.

### Positions and inertias

Let \(\bfR_i\) denote the rotation matrix from the link frame to the world frame. We denote by \(\omega_i\) its angular velocity.

Meanwhile, let \(\bfI_i\) denote the inertia matrix of the
\(i^{\textrm{th}}\) link, expressed in the world frame and *taken at the
center of mass* of the link.

### Forces

For a link \(i\) in contact with the environment, we write \(\bftau_i\) the resultant moment of contact forces exerted on the link at the reference point \(\bfp_i\). If the link is in point contact with the environment at \(\bfp_i\), the moment will be zero. If the link is in surface contact, both \(\bff_i\) and \(\bftau_i\) may be non-zero. See [Caron2015] for more details on this.

### Equation

Euler's equation of motion links the angular momenta and resultant moments of external forces:

Note that, by definition of the COM, \(\sum_i (\bfp_i - \bfp_G) \times m_i \bfg = 0\). By a similar argument to the vanishing of internal forces in the translational case, the moments of internal forces do not appear in the equation above. For details on this, see D'Alembert's principle which is the axiom behind the vanishing of internal forces.

The *angular momentum* of the robot is defined by:

Then, Euler's equation can be written in concise form as:

With words: the rate of change of the angular momentum is equal to the resultant moment of external forces exerted on the robot.

### Using local frames

We took care to precise that our vectors are matrices above are all given with
respect to the world frame. Let us denote by \(\omega_i^\ell\),
\(\bfI_i^\ell\) and \(\bftau_i^\ell\) the angular velocity, inertia
matrix and resultant moment of contact forces (respectively) but this time in
the *local link frame*.

Euler's equation can equivalently be written as:

You can check this as an exercise.

## To go further

My favorite introduction to humanoid equations of motion is Some comments on the structure of the dynamics of articulated motion by Pierre-Brice Wieber. I warmly advise reading it. Again.