Inverse Kinematic Analysis and Simulation of The SCARA Robot Based On Recurrent Neural Networks

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

0(0$7-DQXDU\*XLOLQ&KLQD

Inverse Kinematic Analysis and Simulation of the SCARA Robot


Based on Recurrent Neural Networks
Runsheng Hao1
1
Department of Automation Engineering, Zhonghuan Informaiton College Tianjin University of Technology, Tianjin,
300380, China
*Corresponding author’s e-mail: [email protected]

Abstract
Aiming at solving complex problems of robot inverse kinematics, this paper takes SCARA robot as the research object,
uses recurrent second-order neural network, and proposes a neural network solution method based on SCARA robot’s
simplified forward kinematics equation and Jacobian matrix. Through the inverse kinematics analysis of the SCARA
robot, the neural network model is designed and the corresponding learning algorithm is deduced. The proposed solution
method is simulated and verified by MATALB software. The simulation results show that the network model can effec-
tively solve the inverse kinematics problems of the SCARA robot, with higher solution accuracy and faster solution speed.

1 Introduction such as using BP network and RBF network to solve the


inverse kinematics solution of SCARA robot [3]. Com-
The proposal of ‘intelligent manufacturing’ has promoted pared with
the rapid development of the industrial robot industry. As other artificial neural networks, recurrent neural networks
a type of industrial robot, SCARA robot has the ad- have better generalization ability [4]. Based on the recur-
vantages of good flexibility, fast movement speed, and rent second-order neural network, this paper builds a net-
high repeat positioning accuracy. It is widely used in as- work model for solving the inverse kinematics of the
sembly operations and high-speed handling in the fields SCARA robot, and the simulation results verify the effec-
of electronics, machinery, food and medicine. tiveness of the model.
The research on SCARA robots mainly includes kinemat-
ics, dynamics and trajectory planning. Among them, in-
verse kinematics is an important basis for robot trajectory 2 SCARA robotic kinematics
planning and real-time control. The traditional solving analysis
methods of robot inverse kinematics mainly include in-
verse transformation method, geometric method and nu- Robot kinematics describes the motion relationship be-
merical iteration method [1]. These methods have their tween the robot joints and the rigid bodies that make up
own advantages, but there are also problems such as the the robot. The SCARA robot is a series-type planar joint
complexity and time-consuming of the solution process robot with four degrees of freedom. According to the D-H
and the parity of the solved matrix. Since robot inverse method, the linkage coordinate system of the SCARA ro-
kinematics can be regarded as a nonlinear mapping from bot can be constructed, as shown in figure 1. Its 1-axis, 2-
Cartesian coordinate space to joint coordinate space, and axis and 4-axis are rotary joints, and the 3-axis are mobile
neural networks have the ability to approximate arbitrary joints. The D-H parameters of a certain model of SCARA
nonlinear systems, many scholars use different neural net- robot are shown in table 1.
work models to solve inverse kinematics problems [2], 

Table 1. D-H parameters of SCARA robot connecting rod


Member bar Articul Joint twist Length Link dis- Joint Joint angle
i ation angle angle ai-1 tance variable allowable
și (°) Įi-1 di

1 ș1 0 0 d1 ș1 ±140°
2 ș2 0 l1 0 ș2 ±141°
3 0 180 l2 d3 d3 0
4 ș4 0 0 0 ș4 ±360°

,6%1 May 25,2023 at 07:29:27


Authorized licensed use limited to: Gachon University. Downloaded on ‹9'(9(5/$**0%+Â%HUOLQÂ2IIHQEDFK
UTC from IEEE Xplore. Restrictions apply.
0(0$7-DQXDU\*XLOLQ&KLQD

z1 z2
,QIRUPXOD3LVWKHMRLQWSRVLWLRQYHFWRUDQGș is the joint
y1 ș2 y2
state vector
ș1
x1 x2 The solution obtained by formula (4) is often called the
x3
l1 y3 pseudo-inverse solution of joint velocity. This method re-
z3 d3 quires the Jacobian matrix inversion algorithm, and the
l2
calculation process is very complicated.
d1
ș4
x4 From the above analysis, it can be seen that the forward
z0 y4
kinematics of the robot represents the known structural
y0 z4
x0 parameters and joint variables, and the calculation of the
end effector pose is unique and relatively simple. The in-
Figure 1. Link coordinate system of the SCARA robot verse kinematics solution process is complex with multi-
ple solutions. Some solutions need to be discarded accord-
2.1 Joint angle allows for variation range ing to the actual working environment of the robot to get
Positive kinematics refers to the calculation of the position the only correct solution.
and posture of the end effector of the robot given the D-H
parameters and joint variables of each member. It is
known that the joint variables of the SCARA robot are re-
3 Recurrent neural network
spectively șșșG, and the connecting rod lengths algorithm
are d1, l1, and l2. The pose equation of the robot end ef-
For the inverse kinematic solving problem of SCARA ro-
fector [5] is shown in formula 1.
bots, this paper establishes a neural network-based solu-
tion model. As shown in figure 2, the NN is the inverse

kinematic model. At time t+1, the


X td1 obtained from

the Cartesian space trajectory


X d (t ) desired by the ro-
(1)
If S[S\S] DQGij represent the poses of the SCARA robot bot end actuator serves as an input signal for the NN. The
end actuator, it can be obtained from formula1 that the Td
output of the NN is the joint angle t 1 of the robot at
positive solution of the kinematic equation can be ex- moment t+1. F (ș) is the positive kinematic formula of the
pressed as shown in formula 2.
Xm t 1 is the actual spatial position of the end ac-
­ p x l1 cos T1  l2 cos(T1  T 2 ) robot.
tuator at time t+1. Jt+1 is the Jacby matrix of the robot. In
° p l sin T  l sin(T  T )
° y 1 1 2 1 2 Td
order to accurately map t 1 to
Xd
t 1 , the error signal
® (2)
° p z d1  d 3 3et+1 is passed through the Jacobian matrix to continu-
ously correct the weight of NN, so that the tracking error
°¯M T1  T 2  T 4 tends to zero.

2.2 Inverse kinematic analysis


The inverse kinematics analysis of the robot refers to X td1 ștd1
knowing the position and posture of the end effector of the NN
robot, and solving all the joint variables. The traditional
robot inverse solution strategy is to establish the differen- F(ș)
tial motion of the robot’s position state vector and the joint
state vector, and solve the necessary joint speed of the ro-
X tm1
bot’s motion vector. According to the differential trans-
formation method [6], the Jacobian matrix J of the
et 1 +
SCARA robot kinematics formula can be obtained, as
Jt+1
shown in formula 3. - Xd
t 1

Figure 2. System block diagram of the neural network


solving inverse kinematic problems

Since recurrent high-order neural networks can approxi-


(3) mate a nonlinear dynamic system [7] with arbitrary accu-
From the inverse matrix J- ș RIWKH-DFRELDQPDWUL[WKH racy, the system model is provided as shown in formula
velocity of the joint state vector can be obtained, and then (5).
the joint state vector can be obtained as shown in formula
4.
F F (F , u) (5)
ș J (T ) P
1
(4) F R n
is the system stateˈand
m
u  R is the input of

,6%1 May 25,2023 at 07:29:27


Authorized licensed use limited to: Gachon University. Downloaded on ‹9'(9(5/$**0%+Â%HUOLQÂ2IIHQEDFK
UTC from IEEE Xplore. Restrictions apply.
0(0$7-DQXDU\*XLOLQ&KLQD

the system. As long as F is continuous and the Lipschitz


continuity condition is satisfied, the formula is the unique y
solution. (px,py)
Therefore, this paper chooses the recurrent second-order
neural network as the inverse model NN in figure 2. It can l2
be seen from formula 2 that to obtain the inverse kinemat- ș2
ics solution of the SCARA robot, the inverse model NN is
needed to find ș and ș. In this way, the inverse solution l1
problem of a four-degree-of-freedom robot can be simpli- ș1
fied to the inverse solution of a two-degree-of-freedom ro- 0
bot. Therefore, the recurrent second-order neural network x
has 2 inputs (pxSy) and 2 outputs (șș), and 4 input pro- Figure 4. Simplified kinematic relationship model for the
cessing units need to be used. Its structural model is shown SCARA robot
in figure 3.
Z-1 ij(·) In order to verify the effectiveness of the neural network
Z-1 ij(·) algorithm in this paper, MATLAB software is used for
simulation. It is known that the connecting rod parameters
ij(ș1(t)) of the SCARA robot are l1=0.5m, l2=0.4m, and the end of
the robot moves linearly along the X axis from the posi-
ij(ș2(t)) ș1(t+1)
tion (px0 Sy0), and the expected motion trajectory is
px(t+1) px0=0.717023m. Assuming the movement distance is
0.4m, the initial position px0=0.717023m,
py(t+1) ș2(t+1) py0=0.515199m. The corresponding joint angle ș ʌ
ș ʌ means the end of the robot moves from the point
Figure 3. Structural model of the recurrent second-order (0.717023, 0.515199) to the point (0.317023, 0.515199).
neural networks The parameters of the recurrent second-order neural net-
work are selected as follows. The parameters in the non-
In the figure 3, the formula of the state of the neurons is linear function ij [ are taken as Į=1, ȕ=0.01, and Ȗ , re-
expressed as follows. spectively. The diagonal elements of matrix A are all taken
as 0.3, and the rest are zero. The diagonal elements of the
T - AT  W T Z (6)
learning rate matrix ī are all 0.5, and the rest are zero. The
In the formula, A is the diagonal type matrix of positive initial weight is a random number between (-0.1 0.1).
definite, W is the weight matrix of dimension 42, and Z is The learning process of the neural network is to first learn
the output matrix of 4 input processing units, represented the initial position. At time t(0), the input of the network
by the following formula is Sx0Sy0), the expected output of the network is the initial
Z >p M (ș )
x 1 p y M (ș1 )  p x M (ș2 )  p y M (ș2 ) @ T
joint angle (șș), and the number of learning times is
(7) 100. Due to the fast convergence speed of the recurrent
In the formula, the function ij [ is a single-added nonlin- neural network, the error of the two joint angles is very
ear function, taken as follows. small at this time. According to the sampling period of
1ms, the expected linear motion trajectory is sampled, and
D the obtained sampled data is used as the input of the neural
M ( x) J
1  eE x (8)
network. Considering the control accuracy of the robot
and the need for real-time control, the solution is itera-
In the formula, Į and ȕ are positive real numbers, and Ȗ is
tively solved 50 times, and the resulting network output is
a real number.
the angle of the two joints, that is, the inverse kinematics
The learning algorithm of the neural network is as follows.
solution in the joint coordinate space.
W  *ZE Tx J (9) The simulation result is shown in figure 5. The figure
In the formula, ī represents the learning rate matrix, shows the error curve between the inverse solution of the
which is also a positive definite diagonal matrix, and J is position in Cartesian space along the X axis and the ex-
the Jacobian matrix of the robot. pected position during the linear trajectory movement of
the robot end. It can be seen from figure 5 that the maxi-
mum error occurs in the initial movement stage, which is
4 Simulation analysis less than 0.025mm. It can be seen that the neural network
According to the above analysis, the forward kinematics model has a higher accuracy in solving robot inverse kin-
formula of the SCARA robot can be reduced to the fol- ematics. Figure 6 shows the trajectories of the two joints
lowing. during the movement of the robot, showing that the trajec-
tories of the two joints are smooth.
­ px l1 cos T1.  l2 cos(T1.  T 2 )
® (10)
¯ py l1 sin T1.  l2 sin(T1.  T 2 )
It can be seen as the planar motion of a two-joint robot, as
shown in figure 4.

,6%1 May 25,2023 at 07:29:27


Authorized licensed use limited to: Gachon University. Downloaded on ‹9'(9(5/$**0%+Â%HUOLQÂ2IIHQEDFK
UTC from IEEE Xplore. Restrictions apply.
0(0$7-DQXDU\*XLOLQ&KLQD

6 References
[1] Qu Jiankang, Xu Yaping, Kang Hailong, Wang Tao,
Wang Xiong. Research on Solution to Robotic In-
verse Kinematics Based on Quaternion-vector.[J].
Manufacturing automation. 2009, 31(9), 8-10
[2] Yang Jinpeng . Solution of the Manipulator Inverse
Based on Neural Network. [J]. Machine tool and hy-
draulic. 2021, 49(11):57-60.
[3] Hu Chuanjun. Review of Development and Applica-
tion of Artificial Neural Network Models [D].Xiang-
tan University. Master’s degree thesis, June, 2011.
[4] Zhang Chi, Guo Yuan, Li Ming. Review of the De-
velopment and Application of Artificial Neural Net-
Figure 5. Position error changes along the X-axis work Model [J]. Computer Engineering and Appli-
cation, 2021, 57(11), 57-69.
[5] Ren Wei, Jiang Ming, Sun Longlong, Wang Fei. Re-
search on Kinematics and Trajectory Planning of
SCARA Robot [J]. Journal of Xinxiang University,
2019, 36(3), 42-47.
[6] Li Hongjun, Jiang Qingchang. Kinematic Analysis
and Simulation of the SCARA Robot[J]. Modern
manufacturing technology and equipment, 2015,
224(1), 51-53.
[7] Elias B. Kosmatopoulos, Marios M. Polycarpou,
High-order Neural Network Structures for Identifi-
cation of Dynamical Systems. IEEE Transaction on
Neural Networks, Vol.6, No.2, March 1995,
422~431.

Figure 6. Tracks of the two joints

5 Conclusion
Based on the analysis of the SCARA robot’s forward
kinematics model, this paper simplifies the forward kin-
ematics formulas in order to find the inverse solution.
The inverse kinematics solution model is built based on
the recurrent second-order neural network, and the
MATLAB software is used for simulation. The simula-
tion results verify that the method can effectively solve
the inverse kinematics problem of SCARA robots, with
high accuracy and fast solving speed. It should be
pointed out that when using the recurrent second-order
neural network to solve the inverse kinematics of the ro-
bot, different model parameters need to be selected for
different trajectories. The trained neural network can
only solve the inverse solution of the specific motion tra-
jectory.

,6%1 May 25,2023 at 07:29:27


Authorized licensed use limited to: Gachon University. Downloaded on ‹9'(9(5/$**0%+Â%HUOLQÂ2IIHQEDFK
UTC from IEEE Xplore. Restrictions apply.

You might also like