First, let us introduce the ins and outs of the subject at hand: the anti-gravity arm. That is, we present what was demanded of us and why, and what was expected to come out of this work.
This project was conducted in the context of the development of the robot Reachy, created by Pollen Robotics. This humanoid robot aimed to be interacting with humans, which poses security problematics. Indeed, the arms of the Reachy are articulated using Dynamixel servomotors ; those are controlled using position command which uses maximum torque. Thus, the positioning of both arms may cause injuries if done improperly. To solve such issues, a control using torque command can be implemented. That is why the project was proposed to us.
A complete model of the Reachy was lent to us for this project. The main developper on this part of the project, Remi Fabre, also gave us a link to a repository of a firmware he, and some other developers of the Rhoban team, developed a few years ago.
During this project, we will use the motors of the Reachy's shoulder (MX-64 and MX-106), and the pypot python library.
We implemented an anti-gravity "finger", that is a one degree of freedom arm. Because of a lack of time, we are only able to give leads for the implementation of a two-degree of freedom solution. The expected output is a program that when launched, enables position control with torque command on the finger.
Now, let's focus on the science which the project is based off ; on one hand, the project has been implemented following specific mathematical models. On a second hand, some constants appearing in the models priorly defined are to be emprically computed. A section containing all the notations is at disposal.
Symbole | Definition | Unit |
---|---|---|
PWM peak duty cycle | ||
Motor tension | ||
Power supply tension | ||
Current intensity in the motor | $ | |
Back EMF | ||
Motor resistance | ||
Motor torque constant | ||
Angular velocity | ||
Stribeck velocity | ||
Motor torque | ||
Inertial torque | ||
Friction torque | ||
Stiction torque | ||
Dynamic friction torque | ||
Viscous friction constant | ||
Moment of inertia of the solid | ||
Solid's volume | ||
Distance to each point from the solid's rotation axis |
||
Material density | ||
Arm mass | ||
Elementary mass | ||
Solid's height | ||
Solid's thickness | ||
Solid's length |
The finger is crafted with a Dynamixel motor MX-106. Attached to its shaft is a metal ruler of known dimensions
The situation can be modelled as a rectangular prism attached to its end to the motor shaft as presented on the following figure :
The torque needed by the motor to overcome gravity is the following :
where
In this situation, the intertial torque is the following:
where
$$G = \dfrac{1}{m} {\int\int\int}V \rho(r)r\Delta\mathrm{d}V $$
In the case of a homogeneously distributed ruler, one gets the following:
$$\dfrac{1}{m} {\int\int\int}V \rho(r)r\Delta\mathrm{d}V = \dfrac{el\rho}{m} \int_0^L r_\Delta\mathrm{d}r = \dfrac{L}{2}$$
So the actual inertial torque in this model can be expressed as follows:
The friction torque can be modelled according to different models, more or less complex. We decided to go for the Coulomb-Stribeck equation which is composed of two main compounds : a term combining the two types of Coulomb friction, that is stiction and dynamic friction ; and a term for viscous friction. The equation is the following:
-
$f_s$ corresponds to the stiction torque, that is the torque needed to overcome the static friction ; -
$f_C$ corresponds to the dynamic friction torque, that is the torque needed to counter the dynamic friction; -
$w_s$ is the Stribeck velocity; -
$b$ is the viscous friction coefficient.
Notably, the viscous friction torque at a constant non-zero speed can be expressed as follows :
Once the physical models are understood, it is time to link them to the underlying electronics models. That is, to send a torque command to a motor, we need to communicate with it in a way it understands. The three main equations to remember are the following ones :
-
Motor torque and link with its current $$ T_m = K_m i $$
-
Motor tension $$ U = Ri + e $$
-
Back EMF
$$e = K_m \omega_m $$
In these equations,
-
Tension command :
$U = \dfrac{R T_m}{K_m} + e$ -
Current command :
$i = \dfrac{T_m}{K_m}$
The previous equations contain constants that are specific to each unit of motors. They need to be identified.
We started by identifying the motor's constants that is, identifying
For
Such calculations can be performed by calling the function caraterize
from our python module lib.py
.
In the file src/benchmark_torque.ipynb
, we tried to fit several models using curve_fit
from scipy.optimize
.
As discussed ealier, we opted for the Coulomb-Stribeck model which we managed to fit with satisfying results:
Further model fitting discussion are detailed in said file.
During the realization of this project, two compensations methods were implemented: a compensation controlling the motor using current, and another one controlling the motor using a given tension.
Using a rectangular prism made out of aluminium with dimensions 50x2x3.4cm and weighting 80g, we managed to obtain the following results:
-
Using tension-based control: with this kind of control, the motor is able to support an object weighting 35.6g, but if we add 0.1g, it starts to fall slowly. The finger's motion is smooth when applying a force on it: pushing it with a piece of paper is enough.
-
Using current-based control: with this kind of control, pushing the bar in a clock wise direction (when facing the shaft of the motor) is harder than pushing it counter clock wise; there is also more resistance than with the tension control.