Dynamixel MX Model
Dynamixel MX Model
Abstract— Position servos are extensively used as actuators for robots. In particular, Dynamixel servos from
Robotis are employed as the actuator in each of the 20 joints of a humanoid research robot known as Darwin
OP2. The lack of adequate dynamic modeling of the servo behavior renders control applications more difficult, as
the performance of the control system is compromised due to model-plant mismatches. In the present paper we
develop and validate experimentally a model for the behavior of the Dynamixel MX-28AT, including phenomena
such as viscous friction and saturation. Such a model allows the correct simulation of the servo behavior and the
adequate design of controllers.
2033
XIII Simpósio Brasileiro de Automação Inteligente
Porto Alegre – RS, 1o – 4 de Outubro de 2017
These are incompatible with (9). Thus, it 2.3 Open-loop dynamical model
is assumed that some power is dissipated by the
From (4) and (5):
gearbox, resulting in a reduction of the actually
transmitted torque. The proposal is to determine h i
Jl θ̈l = τl = N η τm + τf,m − Jm θ̈m , (21)
a gearbox efficiency factor η such that:
τl and using (1) and (14):
τm = . (12)
Nη h i
Using the stall torques, one can determine: Jl θ̈l = τl = N η Kt i − bm θ̇m − Jm θ̈m . (22)
Combining (3), (2) and (8), and using the 2.4 Closed-loop dynamical model
value of the “no load” speed θ̇l,N Ls = 55 rpm from
the servo datasheet: The controller that the manufacturer proposed
N ×θ̇l,N Ls
for the MX-28AT is a Proportional-Integral-
uN Ls − Kω Derivative (PID), meaning that the input voltage
τm,N Ls =Kt iN Ls = Kt
R is:
−5
=7.69 × 10 N m, (19)
Ki
U (s) = Kp + + Kd s [Θr (s) − Θl (s)] ,
τf,m,N Ls =bm N θ̇l,N Ls s
=9.87 × 10−5 N m. (20) (29)
where Kp , Ki and Kd are the controller gains and
These values are not compatible, as this would Θr (s) is the reference output angle.
entail more friction torque than what is actually Considering the servo input-output relation
generated by the motor. It is advocated that the (28) and the controller transfer function (29), the
rouding of the data provided in the datasheets of closed-loop transfer function relating the com-
the servo resulted in such an inconsistency. As a manded servo angle Θr (s) and the measured one
consequence, the proposal at this point is to sim- Θl (s) is given in (30).
ply disregard friction at the load shaft and make Simplifying this model is possible assuming
bl = 0, simplifying the right hand side of (5) be- that the electrical dynamics is much faster than
L
cause τf,l = 0. the mechanical one, i. e., the time constant R is
2034
XIII Simpósio Brasileiro de Automação Inteligente
Porto Alegre – RS, 1o – 4 de Outubro de 2017
Θl (s) N ηKt
= n o. (28)
U (s) s L(Jl + Jm N η)s + [R(Jl + Jm N 2 η) + Lbm N 2 η]s + bm N 2 ηR +
2 2 Kt N 2 η
Kω
(30)
2035
XIII Simpósio Brasileiro de Automação Inteligente
Porto Alegre – RS, 1o – 4 de Outubro de 2017
Θl (s) N ηKt (Kd s2 + Kp s + Ki )
=
K N2η
. (31)
Θr (s) R(Jl + Jm N η)s + bm N ηR + tKω + N ηKt Kd s2 + N ηKt Kp s + N ηKt Ki
2 3 2
G(jω) [deg]
for frequencies between 1 rad/s and 16 rad/s and
200 counts peak-to-peak for frequencies ranging
from 32 rad/s to 128 rad/s, to avoid saturation
of the input voltage. −100
6
The model and experimental frequency re-
sponses can be seen in Figs. 2 and 3. It can
be noticed that up until ω5 = 32 rad/s the gain
and phase both agree very well between the fre- −150 0 1 2 3
quency responses of the model and the servo. 10 10 10 10
ω [rad/s]
The gain actually remains acceptable up until
ω7 = 128 rad/s, but from ω6 = 64 [rad/s] to
ω7 = 128 [rad/s] the phase error is about 25◦ , Figure 3: Phase frequency response.
which is already considerable for control applica-
tions. This could partially be explained by the
the encoder range, the reference in each case was
readings of the data for recording purposes be-
θri = −(θl,i (0)−5) counts, meaning that the servo
ing being performed at every Ts = 0.005 s, which
commanded position was initially 5 counts ≈
starts to represent a considerable delay in these
0.0077 [rad] during 1 s, then it returned to θr = 0.
frequencies.
Even with Ki = 0, the open-loop transfer
Thus, from these results, it can be noticed
function in (28) is of type 1, thus it is expected
that if one operates with input reference signals
that there is no steady state error to a step in-
with a bandwidth of about 32 rad/s, the proposed
put. From Fig. 4(a), the simulation results agree
model can be used to predict the actual response
with this both for the linear and nonlinear mod-
of the MX-28AT with reasonable fidelity. This
els, however a small steady state error can be ob-
is actually not very limiting for the normal uses
served from the experimental data (the error os-
of the servo such as in humanoid robots (Kajita
cillates between 1 and 2 encoder counts, i. e., at
et al., 2003; Maximo and Ribeiro, 2016).
most 0.0031 rad). This could be attributed to dry
friction, which is not present in the models (re-
0
Model call that the nonlinear phenomena considered in
−2 Experimental the model are only saturation of the voltage u and
quantization of the measured angle θl ). Therefore,
−4
one possible improvement of having a reasonable
−6 model of the servo is to choose Ki 6= 0 so as to
|G(jω)| [dB]
Figure 2: Magnitude frequency response. In steady state with an error of 2 counts and
using Kpc = 4 from Table 1:
ucss = 8. (34)
3.2 Step response
The servo was started at three different an- From Remark 2, it means a duty cycle of
gles θl,1 (0) = 100 counts ≈ 0.1534 rad, 8/511 = 0.0157 of the source voltage, yielding an
Vs
θl,2 (0) = 200 counts ≈ 0.3068 rad and θl,3 (0) = equivalent voltage of uss = 511 ucss = 0.188 [V ].
400 counts ≈ 0.6136 rad. To avoid angles out of Now admitting that the θ̇sss = 0 in (3) (recall that
2036
XIII Simpósio Brasileiro de Automação Inteligente
Porto Alegre – RS, 1o – 4 de Outubro de 2017
the servo has already stopped in steady state in a) 100
Linear model
Fig. 4(a)), it follows from (2) that iss = uss /R = Nonlinear model
80 Experimental
0.0226 [A]. Using (1) with the steady state current
iss , the motor torque is determined to be:
60
τmss = Kt iss = 2.422 × 10−4 [N m]. (35)
One can therefore argue that this motor 40
torque is not enough to move the motor axis,
therefore the static friction torque must be equal 20
to that amount. This imposes a lower limit on
the static dry friction (using a Coulomb model 0
0 0.5 1 1.5 2
(Stribeck, 1902)). On the other hand, an upper Time [s]
limit can be found by noticing that the error in less b) 200
Linear model
than 3 counts. Repeating the calculations above, Nonlinear model
an error of 3 counts would entail a motor torque Experimental
150
τmss = Kt iss = 3.633 × 10−4 [N m]. (36)
Since this error never occurs in Fig. 4(a), this 100
torque must be greater than the maximal value
of the Coulomb dry friction torque. Thus, static
50
friction referred to the motor axis is known to be
τmst ∈ 2.422 × 10−4 , 3.633 × 10−4 [N m]. Since
the effect of this dry static friction is minor (re- 0
sulting in an error of 1 or 2 counts), disregarding it 0 0.5 1 1.5 2
Time [s]
in the model does not affect the response severely. c) 400
Linear model
During the transient regime, the calculated vis- 350 Nonlinear model
cous friction was assumed to be the only friction Experimental
300
source, therefore all the friction phenomena are
represented in this coefficient bm , which is enough 250
to allow a very precise matching between the re- 200
sponses from the servo and from the models, as
150
seen in Fig. 4(a).
To observe the nonlinear phenomena more ac- 100
curately, the results with larger reference changes 50
can be seen in Figs. 4(b) and 4(c), for references
θr2 = −195 counts and θr3 = −395 counts, re- 0
0 0.5 1 1.5 2
spectively. The hypothesized dry friction being a Time [s]
nonlinear phenomenon, its effect should not be-
have linearly with the change on the reference in- Figure 4: MX-28AT steps responses to inputs of
put. It is indeed what can be observed comparing (a) θr1 = 95 counts, (b) θr2 = −195 counts, and
the steady state errors in Figs. 4(a), 4(b) and 4(c), (c) θr3 = −395 counts.
where it can be noticed that the steady state error
becomes less and less relevant with each increase
poor prediction with the linear model. To per-
in the reference amplitude, until it is barely visible
ceive more clearly the outcomes of the saturation,
in Fig. 4(c).
the voltages resulting from the controller after sat-
On the other hand, the effect of voltage sat-
uration in the nonlinear simulation can be seen in
uration grows with the reference amplitude.With
Fig. 5, where it can be confirmed that the greater
an amplitude of 95 counts in Fig. 4(a), the linear
the reference, the larger the time that the voltage
and nonlinear models responses are very similar
remains saturated.
and both agree well with the experiment.As the
amplitude is increased to 195 counts a very subtle
difference between the responses of the linear and 4 Conclusion
nonlinear models appears as shown in Fig. 4(b).
However, with the amplitude of 395 counts of the A model based mostly on physical principles
reference, it can be observed in Fig. 4(c) that and with usage of the data available from the
there is a great mismatch between the simulation datasheets was developed for the servo MX-28AT,
results of both models. Moreover, the response with exception from the gain to convert from the
of the nonlinear model remains very close to the PWM command to volts, which had to be de-
data from the servo, thus indicating that the sat- termined through experimental observation. This
uration of the voltage is indeed the cause for a analytical model was validated by two experi-
2037
XIII Simpósio Brasileiro de Automação Inteligente
Porto Alegre – RS, 1o – 4 de Outubro de 2017
15 H. (2003). Biped Walking Pattern Gen-
Amplitude 395
Amplitude 195 eration by using Preview Control of Zero-
10 Amplitude 95 Moment Point, Proc. International Confer-
ence on Robotics and Automation, Taipei,
5
Taiwan, pp. 14 – 19.
u [V]
The authors acknowledge the support of the São ROBOTIS (2010a). Robotis e-manual v1.29.00.
Paulo Research Foundation – FAPESP (grant Accessed April 24th 2017.
2016/03647-3). Carlos Ribeiro thanks CNPq for http://support.robotis.com/en/
the research fellowship 303738/2013-8. product/actuator/dynamixel/mx_series/
mx-28.htm
References ROBOTIS (2010b). Robotis e-manual v1.30.00.
Accessed 24th April 2017.
Drmac, Z., Gugercin, S. and Beattie, C. (2014). http://support.robotis.com/en/
Quadrature-based vector fitting for dis- software/robotis_opencm_main.htm
cretized h2 approximation., SIAM Journal
on Scientific Computing 37(2): A625–A652. Sen, P. C. (1997). Principles of Electric Machines
and Power Electronics, 2nd edn, John Wiley
Garnier, H., Mensler, M. and Richard, A. (2003). & Sons, New Jersey.
Continuous-time model identification from
Stribeck, R. (1902). Die wesentlichen eigen-
sampled data: Implementation issues and
schaften der gleit - und rollenlager - the
performance evaluation, International Jour-
key qualities of sliding and roller bearings,
nal of Control 76(13): 1337–1357.
Zeitschrift des Vereines Seutscher Ingenieure
Gouaillier, D., Hugel, V., Blazevic, P., Kilner, C., 46(38-39): 1342–1348(38), 1432–1437(39).
Monceaux, J., Lafourcade, P., Marnier, B., Wensing, P. M., Wang, A., Seok, S., Otten, D.,
Serre, J. and Maisonnier, B. (2009). Mecha- Lang, J. and Kim, S. (2017). Propriocep-
tronic Design of Nao Humanoid, Proc. IEEE tive Actuator Design in the MIT Cheetah:
International Conference on Robotics and impact mitigation and high-bandwidth phys-
Automation (IROS), Kobe, Japan, pp. 769 ical interaction for dynamic legged robots,
– 774. IEEE TRANSACTIONS ON ROBOTICS
Ha, I., Tamura, Y., Asama, H., Han, J. and Preprint: 1 – 14.
.Hong, D. W. (2011). Development of Open Zhao, Y., Paine, N., Kim, K. S. and Sentis, L.
Humanoid Platform Darwin-OP, Proc. SICE (2015). Stability and Performance Limits
Annual Conference, Tokyo, Japan, pp. 2178– of Latency-prone Distributed Feedback Con-
2181. trollers, IEEE TRANSACTIONS ON IN-
DUSTRIAL ELECTRONICS 62(11): 7151 –
Kajita, S., Kanehiro, F., Kaneko, K., Fujiwara,
7162.
K., Harada, K., Yokoi, K. and Hirukawa,
2038