55 K Mechatronics Systems Ju1991
55 K Mechatronics Systems Ju1991
55 K Mechatronics Systems Ju1991
00
Printed in Great Britain (~) 199I PergamonPress plc
Abstract -- A mechatronic system m a y consist of four subsystems, namely, the linkage system, the
actuator system, the sensor system and the control system. To model a complicated system such as a
mechatronic system the aid of a digital computer is necessary. The long-term goal of this project is
the development of an expert system for the modeling and control of mechatronic systems. In the
current phase, the modeling of linkage systems and the actuator systems are considered. A symbolic
program is developed which can derive the literal equations of motion for linkage systems and
commonly-used actuator systems. A linear dynamic model of the linkage system is also developed for
the design of linear state or output feedback controllers. Two examples are used to illustrate the
applicability of the program. Inverse dynamics problems for the examples are solved and simulations
of open-loop control are performed. The advantages of using symbolic computing are discussed.
INTRODUCTION
157
158 MING-SHAUNG JU and CHIH-JUNG HSU
In general, the signals out of the pickups are small and they are further amplified by
the signal conditioners to a level readable for the controller. The control system may
be analogue or digital. Recently, due to reduction in price and enhanced perform-
ance, microprocessors have been commonly used as controllers in mechatronic
systems.
From the above description, the modeling of mechatronic systems may involve
applying knowledge from fields which are far from that of a designer. For example,
the development of a new mass-storage device for today's personal computers would
require a team with members from mechanical engineering, electrical engineering,
and applied physics. In such an interdisciplinary project, there is a need to develop a
program which can help modeling components of the system by applying proper
physical laws, explaining why a physical law is used, and automatically translating the
mathematical models into computer algorithms. The proposed system must have a
knowledge base to store the engineering knowledge from many disciplines and it must
be able to do symbolic computing. By symbolic computing, the program can use the
physical laws stored in the knowledge base to derive mathematical models of
mechatronic systems. The long-term goals of this project are many fold: to develop an
expert modeling system for mechatronic systems: to simulate the dynamics of
mechatronic systems; and to automate the integrated design of mechatronic systems.
The linkage system is the major subsystem of mechatronic system. One may start
from first principles, such as Newton's Law or the Hamilton Principle, to derive the
equations of motion for a linkage system. Many dynamical formulations extended
from these principles are more suitable for automatic modeling of complex linkage
systems. They are: the Lagrange's Equations, the D'Alembert's equations, the
Newton-Euler Equations [2] and Kane's Dynamical Equations [3]. According to its
structure, a linkage system can be classified as an open-chain system or a closed-chain
system. In robotic dynamics, Luh [4] innovates the recursive Newton-Euler Equ-
ations to develop the equations of motion for open-chain manipulators. Latterly,
Modeling of mechatronic systems 159
Hollerbach [5] presented the so-called recursive Lagrange formulation for open-chain
systems. For linkage systems which have closed chains, many approaches have been
developed: Lagrange multipliers method [6]; Kane's method [7]; the zero eigenvalue
method [8]; the orthogonal complement method [9]; and the generalized coordinate
partition method [10]. In particular, Lilov [11] suggested another approach by cutting
the closed-chain system at some links instead of joints to yield a system with a tree
structure. However, the number of coordinates is highly increased and the computa-
tion load is heavy.
In the past decades, many programs for dynamic analysis of linkage systems have
been developed. Most of these programs are developed based on the aforementioned
dynamical formulations and they are the so-called numerical multi-body programs as
suggested by Kane [12]. The disadvantages of these numerical multi-body programs
are many fold. First, the equations of motion being implicit, the user cannot check
the correctness of the equations directly. Although cross check can be performed by
solving the same dynamical problem using different multi-body programs, only the
responses are compared. Second, the numerical equations of motion are assembled at
each step of the integration during the analysis. This increases the overhead during
the numerical simulation. Last, there are redundant calculations such as adding zeros
or computing cos2(x)+ sin2(x) which makes these numerical multi-body programs
inefficient. To increase the efficiency of the mathematical models for real-time
simulation and control of robots and linkage systems, recent research efforts have
been aimed at the development of symbolic multi-body programs. Only major works
in this area are reviewed. Schiehlen [13] employed the Newton-Euler Equations to
develop a FORTRAN-based program (NEWEUL) and Wittenburg [14] developed a
PASCAL-based program (MESA VERDE). On the other hand, Neuman and Murray
[15] developed a 'C' and Lisp based program (ARM) for robotic dynamics. In
addition, there are programs which were developed under some symbolic manipulator
programs [16-18]. Among the dynamic formulations for developing symbolic pro-
grams, Ju and Mansour [19] have suggested that Kane's Dynamical Equations are the
best for deriving the symbolic equations of motion for linkage systems. They also
show that the computation time is reduced tenfold when the symbolic equations of a
PUMA robot are used in simulation. However, Kane's method lacks a systematic
description of the connectivity of links and reformulation is necessary for automatic
modeling of linkage systems.
In the modeling of mechatronic systems such as industrial robots, the dynamics of
actuators is often neglected [20]. This is due to the fact that most of the actuator
systems have time constants, which are generally less than one-tenth of that of a
linkage system. In some systems such as the micro robots or the flexible-arm robots,
this assumption may not be true and dynamics of the actuators cannot be neglected.
Research on the dynamic coupling between the actuators and the linkage system is
important for the design of mechatronic systems.
The purpose of the current phase of this study is to develop a symbolic manipula-
tion program which can automatically derive the literal equations of motion of the
linkage and actuator systems of a mechatronic system. For the design of a linear
controller, the program also derives linear models of the mechatronic systems. The
graph theory [21] is employed to describe the connection between the links of a
linkage system, and Kane's Dynamical Equations are reformulated into a form
160 MING-SHAUNG JU and CHIH-JUNG HSU
suitable for symbolic calculations. Dynamics of the actuator system are considered
and the dynamic coupling between the actuators and the linkage systems are
modeled. Two examples are used to illustrate the applicability of the developed
symbolic program.
METHODS
A mechatronic system may consist of four subsystems such as: the linkage systems,
the actuator systems, the sensor systems and the controller systems. When designing a
mechatronic system, specifications about the closed-loop system must be given. Then
the control laws are determined and the system is simulated before making of a
prototype. In these stages an accurate mathematical model of the whole system is
required.
I Lo incidence matrix
Ul I ] 0 0
. -1 1 Ol [lOOI
L~ s = 1 0 - 1 ll=L s l
u= Lo o-,3
L2
us path matrix
T =E "~
L3
L0
Fig. 2. Kinematic relation between two contiguous links associated with joint a. Vector Zo specifies the
relative translation.
vector or a tensor denotes the coordinate system which the vector or tensor are
referred to. In each link an e m b e d d e d coordinate system is defined as:
E i = [e~, e~, e~] and E J = [ei, e~, ei],
where e~, e~, e~, e{, e~, and e~ are the unit bases of the coordinate systems. The
position vectors of the center of mass for links i and j are related by:
r j : G a ( r i + Ci, + z/) - Ci,, (1)
where r z and r i express position vectors of the center of mass for the ith and jth
links, respectively. The joint vector Za describes the relative translation between link j
and link i. The vector CI~ points from the center of mass of link i to joint a and
vector C~ points from the center of mass of link j to joint a. Matrix Ga is the
transformation matrix from the ith coordinate system to the jth coordinate system.
Then the linear and angular velocities of the links are related by:
where co~ and coy denote the angular velocities of the ith and the jth link, v i and v y
express the velocities of the center of mass of the ith link and the jth link. The vector
~ i denotes the relative angular velocity associated with joint a. Using Eqns (1) and
(2), the position vector, angular velocity and center of mass velocity of each link can
be determined recursively by traveling from the based link along the trees of the
system graph. Next, a set of quasi-coordinates are chosen as linear combinations of
the generalized speeds given by:
uj = ~ a ] k ( q ) q ~ ,
k=l
where A(q) is an invertible matrix and s is the degrees of freedom of the system.
Although proper selection of A(q) may simplify the final equations of motion, in this
work, the matrix A is chosen as the identity matrix. The partial velocities and partial
angular velocities of the system are defined as:
162 MING-SHAUNG JU and C H I H - J U N G HSU
Ov i 3toi
vii =__3uj andtoji = Our f o r t = 1 , 2 . . . . . N,j = 1,2 ..... s. (3)
v i = Z v l u j + v ,i (4)
j=I
and:
~/= j=]
~toiuj + tb~uj + O~, (7)
where the o v e r dot denotes the time derivative. T h e inertial force acting on link i can
be written as:
Fi = -mfi', (8)
and the angular m o m e n t u m of link i is given by:
L' = I i.toi (9)
where F~ is the gravity force vector, F / and T'~ are the external force and torque
acting on link i and h , is the actuating force or m o m e n t corresponding to the rth
quasi-coordinate. T h e n the K a n e ' s D y n a m i c a l Equations are given by:
Modeling of mechatronic systems 163
K r + K* = 0 for r = 1, 2, 3 . . . . . s. (13)
For implementing on a symbolic manipulator, Eqn (13) is expanded and sorted into a
matrix form as:
M(q)q + N(q, ¢1) + G(q) = P(t), (14)
where M is the inertial matrix of the system with elements given by:
N
Mrj = Emivir . vii + fO ri . I i . fOyi for r, j -- 1, 2, . . . s, (15)
i=i
Gr = - ~ ] v i r ' F ~ , (17)
i=1
and vector P is related to the external forces and the actuating forces by
N
1 0 0 0 0 0 0
-1 1 0 0 1 0 0
0 -1 1 1 0 0 0
0 0 -1 0 0 0 0
0 0 0 -1 0 0 -1
0 0 0 0 -1 1 0
0 0 0 0 0 -1 1
:E j SSr~.
164 MING-SHAUNG JU and CHIH-JUNG HSU
<3
U6 ~ U7
L6
Fig. 3. The system graph of a closed-chain system. The arc u7 is cut to yield a reduced system.
It is noted that the path matrix T of the reduced system is given by:
T = S -I .
The constraint equations are derived as follows. Since there are 6 degrees of freedom
(d.o.f.) between any two rigid bodies, namely, 3 translational and 3 rotational d.o.f.
For automatic derivation of the constraint equations, the kinematic constraint
associated with a joint must be identified. For a spherical joint, no relative translation
is allowed between the associated links, i.e. the components of the joint vector are
zeros. For a universal joint, relative translations are inhibited and the relative
rotations are confined to a plane spanned by two axes. Therefore the rotation along
the norm of the plane must be zero. For a revolute joint, no relative translation is
allowed and the relative rotation was limited to an axis. For a prismatic joint, no
relative rotation is allowed and the translation is limited to a specific direction. For a
cylindrical joint, the relative rotation and translation are along the same direction
which means that relative rotation and translation along other directions are re-
strained. For a helical joint the rotation and translation are along the same direction
but the relative translational speed is given by the product of the pitch and the
rotational speed. Table 2 shows the numbers and types of constraints for each joint.
In Figure 4, assume that joint a was cut, the relative angular velocity is Qia and the
joint vector is Za- Since joint a is cut the transformation matrix G a from link i to link
j must be computed from a transform from link i to link O followed by a second
transform from link O to link j:
T
G a = GojGoi,
where
N
Goi = l--[Gk-T'' (19)
k=l
is the transformation from the ith coordinate system to the base coordinate system
and Tki is the ( k , i ) element of the path matrix T. It is noted that the values of
elements of T are either 0, 1 o r - 1 . The relative translation vector is given by:
Z / = Ga(rr j + C i a ) _ (r i + CI,,). (20)
The relative angular velocity is given by:
Modeling ot mechatronic systems 165
Spherical 3 0 0 3
Universal 2 0 1 3
Revolute 1 0 2 3
Cylindrical 1 1 2 2
Prismatic 0 1 3 2
Helical 1 0 2 3
e °
L0 I
: 1
do(q)6qi= 0, (23)
166 MING-SHAUNG JU and CHIH-JUNG HSU
Let 6q(t) denote the small perturbation of vector of generalized coordinates from the
nominal trajectory. Around the nominal trajectory the behaviour of the system is
governed by:
M ( q ° ) 6 ~ + B(q °, ~l°)6q + C(q °, ¢], ~°)6q = 6p,
where
Modeling of mechatronic systems 167
B = 3N(q, q)
3q '
and
Symbolic programming
A program called General Symbolic Multi-Body Program (GSMBP) is developed in
which the aforementioned algorithms are implemented in MACSYMA. M A C S Y M A
is a symbolic manipulation program which can perform algebra, calculus and
differentiation, solve ordinary differential equations and expand Taylor's series. It
also has an A L G O L like programming language. GSMBP is an application program
developed under MACSYMA. The inputs to the program include: the number of
rigid links, the connection between the rigid links, the kinematic constraints of the
system, the location of joints and the dimension of a rigid link, the mass and moment
of inertia of a link, the external and gravitational forces, and the type of each joint.
Based on the input information, G S M B P can derive the literal equations for the
mechatronic system with either open or closed chain.
During the execution of the symbolic program intermediate expressions are
generated, which fill the memory so rapidly that it would be used up if they were not
simplified. Trigonometric functions commonly appear in the equations of motion for
linkage systems. Therefore the simplification of trigonometric functions or operations
is the key factor for efficient symbolic computing. In M A C S Y M A , the functions sin
and cos allocate considerable amounts of memory space. To simplify the intermediate
expressions, the functions sin qi and cos qi are replaced by non-functional variables sqi
and cq,. The functional properties of the simplified symbols for the trigonometric
functions are defined according to the d.o.f, of the system and the types of joints in
the system. Furthermore, the pattern matching method is used to simplify the
expressions. The rules for simplifying known trigonometric expressions are specified
and the patterns are stored. During the derivation of equations, these rules are
applied to simplify the intermediate expression.
Illustration examples
Two examples are used to illusrate the use of the symbolic program (Fig 5 an 6).
The first is a slider crank mechanism and the second is a three-link P U M A robot. In
the first example link 1, driven by a D.C. servomotor, is the crank, link 2 is the
connecting rod and link 3 is the slider. In the P U M A robot, a D.C. servomotor is
attached to each joint. The literal equations of motion of the examples are derived
and transformed into state-space equations. F O R T R A N codes of the state-space
168 MING-SHAUNG JU and CHIH-JUNG HSU
U2
Xp
I .x
Fig. 5. Skeletal diagram of a slider crank mechanism.
$3
S2
Si
SO 01
w, e O
1 "
Fig. 6. Skeletal diagram of a P U M A robot.
equations are generated. The inverse dynamics problems are solved and the control
signal histories of the actuators are obtained. Simulation of the open-loop control of
the examples are performed.
Modeling of mechatronic systems 169
RESULTS
The nominal velocity trajectories of the slider crank system are given in Fig. 7. The
angular velocity of the crank is increased form zero to 4 radsec -1 in 2sec and the
acceleration is increased linearly from zero to about 4 rad sec -1 in 1 sec and decreased
linearly to zero in 2 sec. Figure 8 shows the computed torque history and the control
voltage trajectory for the D.C. motor. Open-loop control of the slider crank system is
simulated using the control voltage as input. Figure 9 compares the controlled and the
nominal angular velocity trajectories of the crank. In this simulation a constraint
stabilization technique [23] is used.
Figure 10 shows the planned trajectories for the P U M A robot. The control task is
to bring the system from the initial state back to the neutral position in 1 sec. To
avoid excessive dynamic load at the start and end of the task, the initial and final
velocities and accelerations of the nominal trajectory are set to zero. Figure 11 shows
the required control voltage trajectories for the D.C. motors. Open-loop control of
the P U M A robot is simulated using these voltage trajectories as inputs. Figure 12
shows the deviations of the controlled trajectories. It is noted that the joint angle q3
has larger errors when compared with other joint angles.
DISCUSSION
In this work a program G S M B P which can derive the non-linear and linear
equations of motion for mechatronic systems is developed. The program is a good
tool for the design and analysis of a mechatronic system. GSMBP provides an
6 I I I
5
.... o d.1 ................................ .................. ~ ............. ........................... F ...........
0
~~ ...~ ..i..ii-.~ii
.....I...J................
..ii~iiii
........i~.
................................................................... ~ . . . - 7 1 ............................................. . . . x . ~ - " ................. .................................. - ~ -
-1
-2 i I I
1 2 3 4
rime(sec)
3 I i 0
0 1 2 3 4 5 6
Tinae(sec)
Fig. 8. The motor torque and input voltage trajectories.
s I I I
T -- .. O. controUedcrank velocity I T
-it i i I i 1
0 2 3 4 5 6
Yime(sec)
Fig. 9. Comparison of crank angular velocity trajectories.
accurate and error-free mathematical model for the linkage system and the actuator
system. All the mathematical models are translated into F O R T R A N codes automatic-
ally. It saves significant amounts of time for developing models for mechatronic
systems. For example, it takes about 2 hr for an experienced researcher to derive the
equations of motion for the three-link P U M A robot. Using GSMBP, it takes only
5 min to derive the non-linear and the linear models, the constraint equations, the
Jacobian matrix and the actuator model.
One of the c o m m o n problems when using a symbolic manipulator program is that
the lengthy and involved intermediate expressions may use up the core memory.
Simplification of the intermediate expressions during the derivation is necessary.
Trigonometric functions are found in the equations of motion for mechanisms and
robots. Using a symbol which has the properties of a trigonometric function has
Modeling of mechatronic systems 171
0.5 m
\
\
0 "
! :
-0.5 i i i i
0.2 0.4 0.6 0.8
T'tme(sec)
40
20
-20 I
greatly reduced the requirement of memory space. The use of a pattern matching
scheme to simplify the trigonometric expressions has proved to be promising [19] and
the resulted codes of the model are efficient in computation. Although Nielan and
Kane [17] used symbols to replace repeated terms in the dynamical equations and it
172 MING-SHAUNG JU and CHIH-JUNG HSU
o.001
-o.ool
-o.oo2
-o.oo3
i
-o.oo4
-o.oo5
-o.oo6
-0.007
0
i 0.2 0.4 0.6 0.8 1
time(s¢c)
greatly reduced the amount of computation. However, many rules are required in
describing the relationship between the symbols. In this work just a few are required
to do the simplification and the yielded codes are efficient in computation.
The body connection array is suggested by Huston [24] for describing the
connectivity of a MRB system. However, this method cannot be used for closed-chain
systems. In this work the system graph suggested by Wittenburg [21] is used and the
Kane's Dynamical Equations are reformulated into matrix form. An implementation
of Kane's method for automatic modeling of complicated mechatronic systems is
achieved. The algorithm developed in this work for automatic derivation of constraint
equations can be further extended to the automatic modelling of multi-loop systems.
Although only rigid links are considered in current phase of study, it is possible to
extend the method to include the flexibility of the links and joints. For example, using
the modal expansion method the dynamic model of a flexible arm can be derived.
From the simulation of the P U M A robot, one may find that the initial torque for
the first D.C. motor is zero while those of the other motors are not zero. It is due to
the fact that the axis of rotation of the first joint is parallel to the gravitation field so
that the gravity force is counter-balanced by bearings of the first joint instead of the
first motor. The axes of the second joint and the third joint are orthogonal to the
gravity thus the second and the third motors must counter-balance the body weights
of the distal links and motors. The results also showed that the input voltage for each
motor is not proportional to the required torque. This fact indicates that the dynamic
coupling between the actuator and the linkage system must be considered in the
modeling of mechatronic systems. For mechatronic systems with flexible links, or
when the time constant of the mechanical subsystem is close to that of the actuator,
the effect of coupling is even more significant and the assumption of ideal actuators
may lead to inaccurate models.
In simulation of the slider crank mechanism, the constraint stabilization technique
M o d e l i n g of m e c h a t r o n i c systems 173
is used to reduce the error in the constraint equations. This problem arises only when
the Lagrange multiplier method was used. On the other hand if the Kane's method
for a constrained system [7] was used then there is no need to stabilize the constraint
equations. However, this method requires that the constraint equations can be solved
in terms of a set of independent generalized coordinates. This may not be possible for
general mechatronic systems. Although the computation load of the Lagrange
multiplier method is heavier than that of the Kane's method the automatic derivation
of constraint equations make possible the automatic modeling of a mechatronic
system with closed-chains.
CONCLUSIONS
REFERENCES
1. Juvinall R. C., Fundamentals of Machine Component Design. John Wiley, New York (1983).
2. Hemami H., lngenieur Archiv 52, 167-176 (1982).
3. Kane T. R. and Levinson D. A., Dynamics: Theory and Applications. McGraw-Hill, New York (1985).
4. Luh J. Y. S., Walker M. W. and Paul R. P. C., J. Dyn. Syst. Measmt. Contr. 102, 69-76 (1980).
5. Hollerback J. M., A recursive Lagrangian formulation of manipulator dynamics and a comparative
study of dynamics formulation complexity. 1EEE Tran. on Systems, Man and Cybernetics 10, 730-736
(1980).
6. Greenwood D. T., Principles of Dynamics, 13th ed. Prentice-Hall, New York (1965).
7. Kane T. R., Dynamics of nonholonomic systems. Tran. A S M E 574-578 (1961).
8. Kamman J. W. and Huston R. L., Dynamics of constrined multibody systems. J. Appl. Mech. Tran.
A S M E 51,899-903 (1984).
9. Hemani H and Weimer F. C., Modeling of nonholonomic dynamic systems with applications. J. Appl.
Mech. Tran. A S M E 48 177-182 (1981).
10. Wehage R. A. and Haug E. J., Generalized coordinate partioning for dimension reduction in analysis
of constrained dynamic systems. J. Mech. Design Tran. A S M E 104,247-255 (1982).
11. Liov L. K. and Chirikov V. A., On the dynamic equations of interconnected bodies. PMM 45,
383-390 (1982).
12. Kane T. R. and Levinson D. A., Formulation of equations of motion for complex spacecraft. J.
Guidance Contr. 3, 99-112 (1980).
13. Schiehlen W. O., Computer Generation of Equations of Motion, in Computer Aided Analysis and
Optimization of Mechanical System Dynamics (Edited by Haug E. J.), pp. 183-215. Springer-Verlag,
Berlin (1984).
14. Wolz U. and Wittenburg J., MESA VERDE: a program for the symbolic generation of equations for
multibody systems. Z A M M 66,399-340 (1986).
174 MING-SHAUNG JU and CHIH-JUNG HSU
15. Murray J. J. and Neuman C. P., ARM: an algebraic robot dynamic modelling program. IEEE
Symposium, International Conference on Robotics, 103-114 (1984).
16. Leu M. C. and Hemati N., Automatic symbolic derivation of dynamic equations of motion for robotic
manipulators. J. Dyn. Syst. Measmt. Contr. Tran. ASME 108, 172-179 (1986).
17. Nielan P. E. and Kane T. R., Symbolic generation of efficient simulation/control routines for multibody
systems. Proceedings 1UTAM Symposium, Udine 153-165 (1985).
18. Hussian M. A. and Noble B., Application of symbolic computation to the analysis of mechanical
systems, including robot arms. In Computer Aided Analysis and Optimization of Mechnical System
Dynamics (Edited by Haug E. J.). Springer-Verlag, Berlin (1984).
19. Ju M. S. and Mansour J. M., Comparison of methods for developing the dynamics of rigid-body
systems, hzt. J. Robotics res. 8, 19-27 Dec. 19-27 (1989).
20. Paul R. P., Robot Manipulators: Mathematics, Programming and Control. MIT Press, Cambridge, MA
(1981).
21. Wittenburg J., Dynamics of Systems of Rigid Bodies. Teubner, Stuttgart (1977).
22. Hsu C. J., An Intelligent Modelling Tool for Control Systems. Master Thesis, National Cheng Kung
University, Tainan, Taiwan (1989).
23. Baumgarte J., Stabilization of constraint and integrals for motion in dynamical systems. Computer
Methods in Applied Mechanics and Engineering 1, 1-16 (1972).
24. Huston R. L. and Passerello C. E., On multi-rigid-body system dynamics. Computers and Structures 10,
439-446 (1979).