# Deriving the Equation of Motion of a Serial Elastic Actuator

This note shows how I derive the Equation of Motion (EoM) for a 1-dimensional Serial Elastic Actuator (SEA). The main goal is not about the EoM, but rather how can one use a computer algebra system (CAS) to derive equation of motion very easily.

A SEA is a kind of actuator–robot joint–that has a relatively soft spring attached to it, with the goal of reducing impact between the motor with the environment. It allows the engineer to use very high gain in the motor’s controller, and thus allows high precision when needed. It is interesting to note that there are two applications in robotics that SEA are indispensable, but are often known under a different name: the Remote Compliance Center in robotic assembly and the spring-at-the-ankle in humanoids.

# The 1D Serial Elastic Actuator model

Let us consider a position-controlled motor attached to a spring-mass as is shown in the hand-drawn figure below.

The symbols are respectively:

- : force exerted on the motor by the spring;
- :
*external*force exerted on the mass; - : position of the motor and the mass;
- : position command Additionally, we will use for the stiffness of the spring, for the mass and for the velocities of the motor and the mass.

Suppose now that and are “driving forces” that affect the whole systems, our task in the next part is to derive the equations relating how other quantities are affected by these two driving forces. In fact, we will focus on and and call them the outputs of the whole system.

# Deriving the Equation of Motion

Two central equations are the force balance equations:

There are two kinematic equations relating the velocities and positions

And finally, some equation that govern how is affected by .

Using the technique invented by Laplace–the Laplace transform–we can turn all the differential equations into algebraic ones. In particular, there are 5 equations. These are:

and

Note that there are 7 dynamics symbols: . Therefore, we can solve for all symbols from any two givens ones. This can be done using sympy as follows:

```
import sympy as sym
Eq = sym.Eq
# dynamic symbols
f1, f2, x1, x2, v1, v2, u = sym.symbols('f1, f2, x1, x2, v1, v2, u')
# "constants"
s, m, b, k = sym.symbols('s, m, b, k ')
R = sym.symbols('R(s)')
equations = [
Eq(f1, k * (x2 - x1)),
Eq(m * x2 * s**2, f2 + k * (x1 - x2)),
Eq(x1, k * u),
Eq(v1, s * x1),
Eq(v2, s * x2),
]
sols = sym.solve(equations, [f1, x1, x2, v1, v2])
sols[v2] = sym.expand(sols[v2])
sols[v1] = sym.expand(sols[f1])
```

The dictionary `sols`

contain the expression for all symbols, except
the inputs $v_2, u$. The output of interest, are then
given by: