Vous êtes sur la page 1sur 6

Research Journal of Applied Sciences, Engineering and Technology 6(20): 3778-3783, 2013

ISSN: 2040-7459; e-ISSN: 2040-7467


© Maxwell Scientific Organization, 2013
Submitted: January 14, 2013 Accepted: February 22, 2013 Published: November 10, 2013

Co-Simulation Control of Robot Arm Dynamics in ADAMS and MATLAB


1, 2
Luo Haitao, 2Liu Yuwang, 1, 2Chen Zhengcang and 1, 2Leng Yuquan
1
University of Chinese Academy of Sciences, Beijing 100049, China
2
Shenyang Institute of Automation, Chinese Academy of Sciences, Shenyang 110016, China

Abstract: The main objective of this study is how to quickly establish the virtual prototyping model of robot arm
system and effectively solve trajectory tracking control for a given signal. Taking the 2-DOF robot arm as an
example, a co-simulation control method is introduced to research multi-body dynamics. Using Newton-Euler and
Lagrange method, respectively establish the dynamics model of robot arm and verify the correctness of equations.
Firstly, the physical model of robot arm was built by PROE and ADAMS. Furthermore, a control model was created
in MATLAB/SIMULINK. And then, the co-simulation model was established based on ADAMS/Control and
MATLAB/SIMULINK. The simulation results indicate that the robot arm system has preferable response
characteristics and nicer locus-tracking ability. The co-simulation method is intuitive and effective. It is no need to
create dynamics equation of complicated physical system and has the important practical significance to study
manipulation and control for robot arm.

Keywords: ADAMS, co-simulation, dynamics, MATLAB, robot arm

INTRODUCTION combine mechanical system simulation with design of


control system together, advantages of each software
Robot arm is a complex electromechanical system, are utilized and electromechanical co-analysis is done
in which exist complicated coupling relationship and (Li and Le, 2011). By that way, we can build complex
nonlinear feature. It includes mechanical arm ontology control scheme, in the meantime observing motor
performance and control system scheme to evaluate the process of target object, which is beneficial to research
arm robot. In traditional design method, repeat iteration of complex electromechanical system.
was adopted. Use this method, it is not only difficult to In this study, taking the joint angle control of two
improve mechanical property of robot arm, but can DOF robot arm as an example, we mainly discuss the
consume plenty of fund and manpower resource, which control method about co-simulation. After building
is worst that design of mechanical system break away virtual prototype of robot arm and simulating its
from control system without finding coupling kinematic model, the results reflect that the robot arm
relationship between them (Zong and Li, 2005). If build has well dynamic response and trajectory tracking
virtual prototype first during early R&D process before ability. Also, feasibility of this method is confirmed.
building real model, we can conduct kinematics and
dynamic simulation and analysis about arm robot and ESTABLISHMENT OF ROBOT ARM
improve the whole machine mechanical system by DYNAMICS MODEL
simulating control system (Gu et al., 2005). So, this
simulation method can shorten obviously development For researching robot arm dynamics, firstly, build
cycle and it is also in favor of robot arm dynamic coordinate system of robot arm and set related dynamic
problems and improvement of R&D efficiency. parameters (Soon and Slotine, 2009) (Fig. 1).
Developed by MDI Company, ADAMS as Where, the base coordinate system coincides with
software provides powerful model and simulation pivot of link 1. Basic dynamic parameters of links
environment and has strong analysis function about below are defined. m 1 and m 2 are respectively mass of
kinematics and dynamics, which is popular in two links; l 1 and l 2 are respectively rotational inertia
mechanical project fields in the world. While, around Z axis; q 1 and q 2 are respectively angle
MATLAB becomes indispensible utility software variable; l 1 and l 2 are respectively length and l c1 and l c2
during scientific research owing to its powerful are respectively length between centre of mass and joint
computed function, visualization of programming and axis.
calculating results and high efficiency of programming.
For control system design, control toolbox in ADAMS Newton-Euler method: First, using homogeneous
is incomplete; however, SIMULINK section of transformation theory, 4×4 homogeneous
MATLAB makes up this drawback (Xing, 2012). If transformation matrix 𝑖𝑖+11𝑇𝑇, which is from coordinate
combine two software together, in other words, system {i} to {i + 1}, describes position and pose

Corresponding Author: Luo Haitao, University of Chinese Academy of Sciences, Beijing 100049, China
3778
Res. J. App. Sci. Eng. Technol., 6(20): 3778-3783, 2013

y0 At last, list 1n 1 and 2n2 Z components, we get the


y3 x3 driving torque:
l2
τ=
1 m2lc 2 gc12 + (m1lc1 + m2l1 ) gc1 − m2l1lc 2 q2 2 s2
y2 l c2 
q2
m2g  − 2m2l1lc 2 q1q2 s2 + m2lc 2l1c2 (2q1 + q2 ) + m2lc 2 2 (q1 + q2 )
x2 
l1
 + (m1lc12 + m2l12 + I1 + I 2 )q1 + I 2 q1
x1 
τ 2 = m2lc 2 gc12 + m2lc 2l1q1 s2 + m2lc 2l1q1c2 + m2lc 2 (q1 + q2 )
2 2
y1 l c1
q1 m1g
 + I 2 (q1 + q2 )
x0 
(6)
Lagrange method: The total kinetic energy of robot
Fig. 1: Coordinate system and dynamic parameters of robot arm is:
arm
1 I +I 1
relationship. And homogeneous transformation matrix E=
k [ m1lc12 + 1 2 + m2 (l12 + lc 2 2 ) + m2l1lc 2c2 ]q12
1 2 2 2
𝑖𝑖+1𝑇𝑇 and rotation matrix between links are: (7)
1 1
+( m2lc 2 + I 2 )q2 + (m2lc 2 2 + m2l1lc 2c2 + I 2 )q1q2
2 2

cosθi +1 − sin θi +1 0 0 2 2
 sin θ cosθi +1 0 0 
 i +1 Total potential energy is:
i +1T =
i
(1)
 0 0 1 0
 
 0 0 0 1 Ep =m1 glc1 s1 + m2 ()
g lc 2 s12 + l1 s1 (8)

cosθi +1 − sin θi +1 0  Build Lagrange function L = E k - E p and we get


i +1
i
R =  sin θi +1 cosθi +1 0  (2) system dynamic equation:
 0 0 1 
d ∂L ∂L
=τ − (9)
dt ∂q ∂q
Newton-Euler method adopts recursive thought and
for link1, initial recursive condition of its dynamic
equation is: Calculate partial derivative:

0  0 0 0 


 ∂L
=ω0 0=
0  , 0ω
 0
=  1
0  , ω1
 0=
  , ω1
 1 0
  (3)  = (m1lc12 + I1 + I 2 + m2l12 + m2lc 2 2 + 2m2l1lc 2c2 )q1
0  0   q1   q1   ∂q1

 + (m2lc 2 + m2l1lc 2c2 + I 2 )q2
2

Second, outward recursive and calculate velocity  ∂L


 = (m2lc 2 2 + I 2 )q2 + (m2lc 2 2 + m2l1lc 2c2 + I 2 )q1 (10)
and acceleration of each link in link coordinate system  ∂q 2
and geocentric coordinate system and then calculate  ∂L
inertia force and inertia moment of links by Newton-  = −(m1lc1 + m2l1 ) gc1 − m2 glc 2c12
Euler method. For rotational joint, it just needs to  ∂q1
calculate moment of each link in i :  ∂L
 =−m2l1lc 2 s2 q12 − m2l1lc 2 s2 q1q2 − m2lc 2 gc12
 ∂q2
 
  Substitute Eq. (10) into (9) and we get dynamic
 0   0  lc1 
1 1 
n1 2 R 0  +  0  + 0×m equation of robot arm as follow:
      1
 m2lc 2 gc12 + m2lc 2l1q1 s2 + m2lc 2l1q1c2   I1q1   0 
2

  τ 1 (m1lc12 + I1 + I 2 + m2l12 + m2lc 2 2 + 2m2l1lc 2c2 )q1


=
 + m2lc 2 (q1 + q2 ) + I 2 (q1 + q2 ) 
2

 − 2m2l1lc 2 s2 q1q2 +() m2lc 2 2 + m2l1lc 2c2 + I 2 q2
 gs1 − lc1q1  l1 
2
 gs12 − l1q1 c2 + l1q1s2 − lc 2 (q1 + q2 ) 2 
2

    1    − m2l1lc 2 s2 q 2 + (m1lc1 + m2l1 ) gc1 + m2 glc 2c12
2 (11)
 gc1 + lc1q1  +  0  × 2 Rm2  gc12 + l1q1 s2 + l1q1c2 + lc 2 (q1 + q2 ) 
2

τ 2 = (m2lc 2 + I 2 )q2 + (m2lc 2 + m2l1lc 2c2 + I 2 )q1
2 2
 0   0   0 
    (4)  + m l l s q 2 + m l gc
 2 1 c2 2 1 2 c2 12

 0  lc 2   gs12 − l1q12c2 + l1q1s2 − lc 2 (q1 + q2 ) 2 


      (5) Through verification, results from two methods are
= 2
n2  0  +  0  × m2  gc12 + l1q1 s2 + l1q1c2 + lc 2 (q1 + q2 ) 
2    consistent and we know the whole derivation process is
 I 2 (q1 + q2 )   0   0  correct.
 
3779
Res. J. App. Sci. Eng. Technol., 6(20): 3778-3783, 2013

Fig. 2: Co-simulation flow chart of ADAMS and MATLAB

 Motion1 =80d ⋅ sin(0.1 ⋅ time)


 (12)
 Motion 2 =100d ⋅ sin(0.2 ⋅ time)

With this function driving, set simulation time as


100 s and simulation step as 200 and then simulate. We
measure displacement curve and velocity curve on
centre of mass of robot arm end effector in
postprocessor in ADAMS (Fig. 3).

Establishment of robot arm control system model:


Proportional differential system is adopted, with
Fig. 3: Displacement curve and velocity curve on test point of dynamic model as the theoretical basis and error driven
robot arm end effectors style. e represents error between ideal angle and real
angle and e is error between ideal velocity and real
velocity (Fig. 4).
Regardless of dynamic properties, we simplify
Multiple Input Multiple Output system (MIMO) as a
Single Input Single Output servo-control system
(SISO). Without considering inductance, AC servo
system is a stable second order system (Ma et al.,
Fig. 4: Control system block diagram of robot arm 2010). To accelerate system response, we add
proportional element; and to enlarge damp and reduce
ESTABLISHMENT OF ROBOT ARM CO- overshoot, we add differential element. And then we get
SIMULATION MODEL PD position control. If ignore dynamic properties of
joint driver, driven torque is:
Co-simulation with ADAMS and MATLAB
/SIMULINK means that build multi-body system in
ADAMS, output parameters related to system equation Ti Kpi (θ ref − θ ) − Kviθ
=
(13)
and then import information from ADAMS into
MATLAB/SIMULINK and set up control scheme (Zhu where,
et al., 2010). During calculation process, there θ, 𝜃𝜃̇ = Respectively feedback signal of location and
exchanges data between virtual prototype and control speed of joint
program, where, ADAMS solves the mechanical system Kp i . Kv i = Respectively related coefficient
equation and MATLAB solves the control system
equation. They both finish the whole control process.
When conduct position control for robot arm with
The flow chart of co-simulation displays in Fig. 2.
PD control system, for reducing influence from external
disturbance, greater gain should be used unless the
Establishment of robot arm physical system model:
system is unstable.
Firstly, build 3D model of two DOF robot arm in
SOLIDWORKS; secondly, simplify and save it as *.x_t
file; finally, import this file into ADAMS (Zhang et al., Build the interface between two software: The model
2009). For giving the virtual prototype attributes like built in ADAMS, as a sub-system, need to be imported
material, mass and inertia moment real machine has, we into MATLAB/SIMULINK, on which SIMULINK
need edit each component to better simulate real system constructs the co-simulation system. First, exchange
(Liu et al., 2009). data between ADAMS and MATLAB/SIMULINK
Add fixed joint on the base of robot arm, define through ADAMS/CONTROL interface. Second, define
rotational joint and set gravity (Li et al., 2007a). So far, 6 system variables which is needed in co-simulation
there exists constrain relationship between links of such as input variable Torque_1, Torque_2, output
robot arm and now physical system model is set up. variable Angle_1, Angle_2, Velocity_1 and Velocity_2.
To verify correctness and effectiveness, here exerts In “Controls” menu, we can select and set those
sine moment function: variables.
3780
Res. J. App. Sci. Eng. Technol., 6(20): 3778-3783, 2013

Fig. 5: Control structure chart of co-simulation

ADAMS_uout 1

1 Angle_1
U To Workspace
Torque_1 2

Mux MSC Software Demux Angle_2

3
ADAMS Plant
2 Velocity_1

Torque_2 4

ADAMS_yout Velocity_2
Mux Demux

Y To Workspace

ADAMS_tout

Clock T To Workspace

Fig. 6: Mechanical sub-system module

(a) (b)

Fig. 7: (a) Response of sine signal on joint1, (b) response of step signal on joint 2

3781
Res. J. App. Sci. Eng. Technol., 6(20): 3778-3783, 2013

Fig. 8: Results in ADAMS post processor

Special functions in ADAMS are real-timely called


to output torque variables, which are regarded as Loading .res file into ADAMS, we can measure
instruction code to drive the joints of robot arm. Every inertia force, gravity, centrifugal force, coriolis force
joint variable returns to control system in time and and instantaneous power of the driver. To know how
completed closed loop comes up (Ye, 2010). The they change according to time, we research the
structure chart of co-simulation on robot arm is (Fig. 5). dynamics of robot arm better (Li et al., 2010). Response
After defining the variables, three files (.m, .cmd curve from ADMAS postprocessor module is shown in
and .adm file) generate from ADMAS/CONTROL, Fig. 8.
which is useful in data-exchange between ADAMS and
MATLAB (Yi et al., 2009). Then input command CONCLUSION
“adams_sys” into MATLAB, mechanical sub-system
generates (Fig. 6). In this study, build co-simulation model of two
DOF robot arm respectively in ADAMS and
CO-SIMULATION RESULTS OF ROBOT ARM MATLAB, design the interface between mechanical
system and control system and get the response
After that, it is time to conduct the co-simulation. performance of two links of robot arm. The system has
This is a interactive closed process, in which simulation good tracking ability and co-simulation result verifies
is real-time. During the simulation, real-time interactive that. Also, its dynamic performance meets the design
process is shown on the ADAMS interface (Li et al., requirement.
2007b). At last, result curves generate from “Scope” What’s more, modeling in ADAMS, it is beneficial
module. Figure 7 describes the results. to avoid solving dynamic equations and to observe
Here are the co-simulation results: motion process visualized. Using MATLAB
/SIMULINK toolbox, we operate the whole process
• Joint 1 can follow the sine signal well with smaller simply and program efficiently and quickly. And we get
time delay. When driven by sine signal, link 1 flaps lots of design parameters from co-simulation, which is
up and down according to the sine law around the useful for subsequent research.
axis of the base. Co-simulated method takes advantages of two
• Under step signal, joint 2 follows the instruction software, with enhancing dynamic performance of
shortly. And then link 2 reaches to horizontal robot arm, improving efficiency, reducing the cost and
position and keeps still. saving time. For the complex control system, it is a
• From simulation, we know that links track the good solution selected.
given trajectory curve well with small error.
3782
Res. J. App. Sci. Eng. Technol., 6(20): 3778-3783, 2013

REFERENCES Soon, J.C. and J.J.E. Slotine, 2009. Cooperative robot


control and concurrent synchronization of
Gu, M.Y., R.R. Qin and D.Y. Yang, 2005. Co- Lagrangian systems. IEEE T. Robot., 25(3):
simulated research method of robot arm dynamics 686-700.
in ADAMS and MATLAB. Mach. Des., 1: Xing, J.W., 2012. Getting Started Using
227-228. ADAMS/Controls. MSC ADAMS Training
Li, S.Q. and H. Le, 2011. Co-simulation study of Manual.
vehicle ESP system based on ADAMS and Ye, H.P., 2010. Application of co-simulation based on
MATLAB. J. Softw., 6(5): 866-950. ADAMS/MATLAB in mechtronics. J. Zhangzhou
Li, H., B.H. Fan and Q. Liu, 2007a. Research on co-
Tech. Instit., 12(1): 4-6.
simulation based on ADAMS and MATLAB. Sci.
Yi, X.S., Z.G. Huang and M.T. Sun, 2009. Application
Technol. Inform., 8: 152.
Li, S.H., S.P. Yang and H.Y. Li, 2007b. Semi-active of co-simulation technology based on ADAMS and
control co-simulation of automotive suspension MATLAB. J. Beijing Univ. Comm., 27(5): 14-17.
based on ADAMS and MATLAB. J. Syst. Simul., Zhang, X.Y., B.B. Sun and Q.H. Sun, 2009. Vehicel
19(10): 2304-2307. and terrain interaction based on ADAMS-
Li, B.M., Z.B. Qian and H.J. Cheng, 2010. Research on MATLAB co-simulation. J. Southeastern Univ.,
co-simulation of AUV engine based on 25(3): 335-339.
ADAMS/MATLAB. J. Syst. Simul., 22(7): Zhu, D.L., J.Y. Qin and Y. Zhang, 2010. Research on
1668-1673. co-simulation using ADAMS and MATLAB for
Liu, G.J., M. Wang and B. He, 2009. Co-simulation of active vibration isolation system. IEEE ICICTA, 2:
autonomous underwater vehicle based on ADAMS 1126-1129.
and MATLAB/SIMULINK. Chinese J. Mech. Zong, X.Y. and Y.Y. Li, 2005. Control simulation of
Eng., 45(10): 22-29. robot arm based on ADAMS and MATLAB.
Ma, R.Q., S.H. Hao and W.F. Zheng, 2010. Co- Microcomput. Informat., 35: 29-30.
simulation of robot arm based on ADAMS and
MATLAB. Mach. Des. Manufact., 2(2): 93-95.

3783

Vous aimerez peut-être aussi