55 K Mechatronics Systems Ju1991

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Mechatronics Vol. I, No. 2, pp. 157-174, 1991 0957-4158/91 $3.00+0.

00
Printed in Great Britain (~) 199I PergamonPress plc

AUTOMATIC MODELING OF MECHATRONIC SYSTEMS VIA


SYMBOLIC APPROACH

MING-SHAUNG Ju* and Cnin-JuNG Hsv


Department of Mechanical Engineering, National Cheng Kung University, Tainan,
Taiwan 70101, R.O.C.
(Received 7 August 1990; accepted 19 November 1990)

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

Developing mathematical models is a prominent stage in the design and analysis of


mechatronic systems. A mechatronic system could be defined as a mechanical system
whose performance is enhanced by control from electrical devices which could not be
achieved by mechnical devices. Table 1 shows the structure of a mechatronic system
which has four subsystems: the linkage system, the actuator system, the sensor system
and the control system. Powered by the actuator system, the linkage system is able to
perform mechanical effects such as guiding or applying force and/or torques on an
external environment. The elements of a linkage system are: links, joints and
stabilizers. The links can be either flexible or rigid, and the joints can be revolute,
prismatic, universal or spherical. The stabilizers are springs and dampers which are
employed to smooth motion of the linkage system and to hold the integrities of the
system. Unfortunately, the stabilizers are nearly ignored in current machine design
course [1]. The actuator system consists of pre-amplifiers, p o w e r amplifiers and
energy transformers such as the D.C. motors, A.C. motors and hydraulic cylinders.
To increase the mechanical advantage of an energy transformer, speed reducers such
as pinion-gear pairs or harmonic drivers are often used. The sensor system consists of
pickups and signal conditioners. The pickups transform mechanical variables such as
displacement, velocity, acceleration, force, torque or pressure into electrical signals.

* A u t h o r to w h o m correspondence should be addressed.

157
158 MING-SHAUNG JU and CHIH-JUNG HSU

Table 1. Structure of mechatronicsystems


Linkage system Actuator system Sensor system Controller system

Links Amplifiers Pickups Analogue controller


Rigid Pre-amplifier Position
Flexible Power amplifier Velocity
Acceleration
Force
Torque
Joints Energy transformers Signal amplifiers Digital controller
Revolute Stepping motor CPU
Prismatic D.C. Motor Interface for I / 0
Helical A.C. Motor
Cylindrical Hydraulic actuator
Universal Hydraulic motor
Spherical Pneumatic bellows
Pneumatic motor
Stabilizer
Spring
Dampers
Gyroscopes

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.

Reformulate Kane's Dynamical Equations


If the operating speed is not too high or the rigidity of links is high, a linkage
system can be modeled as the connecting of multiple rigid bodies or a multi-rigid-
body (MRB) system. It must be assumed that the joints between any two links are
frictionless. The graph theory is used to describe the connectivity of a MRB system
and the Kane's Dynamical Equations are reformulated into matrix form. First the
skeletal diagram of a linkage system is transformed into a system graph by numbering
the links and the joints and representing each link by a node and each joint by an
directed arc. The direction of an arc specifies the kinematic relation between two
neighboring links. Two matrices, namely, the incidence matrix and the path matrix
are derived from the system graph. Figure 1 shows the system graph and the
incidence and path matrices of an open-chain system. Using the path matrix the
kinematic variables of the system can be determined automatically. First, an
embedded coordinate system is assigned to each link and the generalized coordinates
which describe the relative motion of two contiguous links are specified. Then the
kinematic variables of the links are provided by the designer either in symbolic or
numerical form. Figure 2 shows the relative motion of two contiguous links. Link i
and link j are connected by joint a. In the following derivation the superscript of a

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

Fig. 1. The system graph of a three-link robot.


Modeling of mechatronic systems 161

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:

V j = G a [ v i + O)i X (Cia -~- Z/a) "+ ~ t ] -- OJj X Cia , (2)

coJ = Ga[co i + ~io],

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)

T h e translational velocity and angular velocity of link i can be e x p a n d e d as:

v i = Z v l u j + v ,i (4)
j=I

and:

toi = toSuj + to,, (5)


j=l
where v~ and tol are i n d e p e n d e n t of the quasi-speeds. T h e translational and the
angular acceleration vectors can be given by:
s
•i (2)i V)Uj + V,, (6)
j-1

~/= 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 I i is the inertia tensor of link i. T h e time derivative of the angular m o m e n t u m


can be given by:
3L i
I]' = + tot X Li
3t
= i i.Oi + tot × (i i . t o i ) ,

and the inertial torque acting on link i can be written as:


T~ = - L i
= _ i i . oi _ toi x (I i. ¢oi). (10)

Define the rth generalized inertial force as:


N N
K* = ~ v ' , . V'. + ~to',." T~, (11)
i=l i-I

and the rth generalized active force as:


N N
K r = ZV,. (F~ + Fie) + Z t o i " T / + h,, (12)
i-I i=1

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

and vector N is the sum of Coriolis forces and centripetal forces


N s
N, = ~ E ( m / v ~ ' v j • i + fO~i . i i . @ ) u j _j~ o),i.((Di x i i . m i) + m i v , i. ( m i × vi). (16)
i=lj=l

The gravity vector G is given by:


N

Gr = - ~ ] v i r ' F ~ , (17)
i=1

and vector P is related to the external forces and the actuating forces by
N

p~ = E v l . Vie + fOi,. Tie + hr. (18)


i=1

In real mechanical systems such as industrial robots or the machinery systems,


closed-kinematic chains are often adopted to either increase the stiffness of the system
or to reduce the static load exerted on the actuators. Linkage systems with closed
chains can be modeled as constrained mechanical systems. The types of constraint
equations are the scleronomic, the rheonomic, and the nonholonomic constraints. In
this work, only the scleronomic and the rheonomic constraints are considered. The
Lagrange multiplier method is implemented to derive the literal equations of motion
for constrained mechanical systems. In each closed loop a joint is temporarily cut to
yield a system with a tree structure which is called the reduced system. The equations
of motion of the reduced system are derived first. Then the relative m o v e m e n t of the
links associated with each cut joint was employed to generate the constraint
equations. Figure 3 shows the graph of a closed chain system. If the joint represented
by arc u7 is cut then the incidence matrix S can be partitioned as:

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

Table 2. Number of constraints associated with different joints

Joints Rotational Translational Constrained Constrained


d.o.f, d.o.f, rotational d.o.f, translational d.o.f.

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

Fig. 4. Kinematic constraints between two rigid links.

E2i = G/c0j _ c o i . (21)

E q u a t i o n (20) r e p r e s e n t e d the relative translation and E q n (21) represented the


relative rotation b e t w e e n links i and j. T h e constraint equations were specified by
setting appropriate elements of E q n s (20) and (21) to zeros. T h e constraint e q u a t i o n
associated with translation can be given by:

~(q) = 0 for i = 1, 2 . . . . . np,


where np is the total n u m b e r of translational constraints. Similarly, the constraint
equations associated with rotation can be written as:

gi(q, cl) = ~di/(q)(lj =


)=1
0 for i = 1, 2 . . . . . nr,

where n r is the total n u m b e r of rotational constraints.


Taking variations of E q n s (20) and (21) yields:
~(q)
6f,(q) - ~q /~1 = 0, (22)
$

: 1
do(q)6qi= 0, (23)
166 MING-SHAUNG JU and CHIH-JUNG HSU

or in a combined form as:


H ( q ) 0 q = 0, (24)
where H is the Jacobian matrix of the system. The equations of motion for a
closed-chain system can be written as:
M(q)(l + N(q, (]) + G(q) = P(t) + Hr(q)~,, (25)
where A is the vector of Lagrange multipliers. Using Eqns (20) and (21), the Jacobian
matrix for a closed-chain system can be derived automatically.

Modeling o f actuator systems


The actuator system applies force or torque on the linkage system based on the
output of a controller. In this work, the dynamics of many actuator systems were
stored in a M A C S Y M A subroutine. During the modeling process once an actuator
was chosen, the equations of motion for that actuator are retrieved and coupled in
the equations of motion. Four actuator systems are considered in this work: the D.C.
motor, the A.C. motor, the hydraulic actuator and the pneumatic actuator. Details
about the development of the mathematical model for the actuator systems can be
found in [22].

Derivation o f linear models


If linear control are chosen then a linear model of the mechatronic system must be
derived. In the past, the linear equations of motion of a mechatronic system are
developed by numerical differentiation of the non-linear models. However, accuracy
of the yielded linear model is questionable. On the other hand, if exact differentiation
of the non-linear model is performed then an accurate linear model can be obtained.
Consider an open-chain system, if a set of nominal trajectories of the system are
denoted as q°(t), ~]°(t), ~°(t) and p°(t). The nominal trajectories must satisfy the
equations of motion as follows:
M(q°)/i ° + N(q °, q'~) + G(q °) = P°(t),
where

qO = / q~i and t • [t,r tf] 0 <~ t,i < tt"


\qO

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

C _ ~M(q)q° + 3N(q, ~l) + ~G(q, ~1)


~q 3q ~q
All the matrices are evaluated along the nominal trajectory. The symbolic differenti-
ation of these matrices is performed and matrices B, C and M are stored and
evaluated numerically along the nominal trajectory. The linearization of systems with
closed-chains will appear in another report.

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

/ ~//._ kT"..~, ..... i . . . .


/. ~ _~" I l L ~ ~ " ~ :

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)

Fig. 7. The desired angular velocity trajectories.


170 MING-SHAUNG JU and CHIH-JUNG HSU

o motortorque -input voltagefor motor


4 I ! ! ! = 25
3 .......................... i ....
20~"
2 ......... + ...... i ..............~L

~'~ ..... ,~ ~5~

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

---e .L. -~. o ql -o-q3 I


~ o,,.. --~ -q2

0.5 m

\
\

0 "

! :
-0.5 i i i i
0.2 0.4 0.6 0.8
T'tme(sec)

Fig. 10. Planned joint trajectories for the P U M A robot.

40

20

-20 I

0 0.2 0.4 0.6 0.8 1


time(sec)

Fig. 11. Control voltage histories for the D.C. motors.

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)

Fig. 12. Comparison of angular displacement errors.

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

In this work a symbolic program for modeling mechatronic systems is developed. In


the past, the actuator systems are modeled as ideal systems by many investigators. In
this paper, the dynamics of the actuator system are considered in the system equation
and this makes it possible to analyse the coupling effect between the actuator and the
mechanical subsystem. The symbolic linear model derived by exact symbolic differen-
tiation are more accurate than those obtained by numerical differentiation. The
combination of graph theory and Kane's method has made automatic modeling of
complicated mechatronic systems possible, which in the past was not tractable by
long-hand derivation.

Acknowledgements--Research supported by the NSC of the R.O.C. in grant NSC78-0401-36.

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).

You might also like