Professional Documents
Culture Documents
2 Robot Modeling
2.1 Structual Analysis :
The rehabilitation system in this project is based on Universal Robot 10, which
consists of seven revolute joints: base, shoulder, elbow, wrist-1, wrist-2 and
tool mounting bracket. Each joint is driven by one motor separately to realize
the relative motion of adjacent links, and the whole system is a typical series
structure device. Moreover, all joints of UR10 are rotation joints, which means
that only thtea is a variable parameter when describing each joint. So for this
rehabilitation system only six joint variables (rotation variables, except joint7
which is on the top of link6) are needed to figure the changes of the whole system
out, and other parameters are used to represent the fixed part of kinematics.
1
2.2 The modified D-H parametrization method :
D-H parameterization method is a basic method in kinematic modeling. The
principle of this basic method is to establish a coordinate system at each joint
of the robot, then determine the kinematics parameters between two adjacent
coordinates, and finally get the homogeneous transformation matrix between
two adjacent coordinate systems based on the determined kinematic parame-
ters. The homogeneous transformation matrix can be determined with only four
kinematic parameters. Therefore, as long as these parameters are determined,
the coordinate transformation between the adjacent joints of the robot can be
completely described. Here, we suppose arbitrary two adjacent coordinate sys-
tems are
Oi−1 Xi−1 Yi−1 Zi−1 and Oi Xi Yi Zi
Firstly, establish a series of joint coordinate systems as shown in Fig.1, and
define D-H parameters as shown in Table I. Next, use the following four steps
to achieve a homogeneous transformation between adjacent coordinate systems:
- Move from Zi−1 to Zi along axis Xi−1 , and the distance is ai−1 ,
we use Transxi−1 (ai−1 ) to represent it :
1 0 0 ai−1
0 1 0 0
T ransxi−1 (ai−1 ) =
0 0 1
(1)
0
0 0 0 1
- Rotate from Zi−1 to Zi about axis Xi−1 , and the angle is αi−1 ,
we use Rotxi−1 (ai−1 ) to represent it :
1 0 0 0
0 cos(αi−1 ) 0 0
Rotxi−1 (αi−1 ) =
0
(2)
0 sin(αi−1 ) 0
0 0 0 1
- Move from Xi−1 to Xi along axis Zi , and the distance is di ,
we use T ranszi (di ) to represent it :
1 0 0 0
0 1 0 0
T ranszi (di ) =
0
(3)
0 1 di
0 0 0 1
- Rotate from Xi−1 to Xi about axis Zi , and the angle is θi ,
we use Rotzi (θi ) to represent it :
cos(θi ) −sin(θi ) 0 0
sin(θi ) cos(θi ) 0 0
Rotzi (θi ) =
0
(4)
0 1 0
0 0 0 1
2
After multiplying the 4 matrices, we can get general form homogeneous
transformation matrix :
i−1
i T = T ransxi−1 (ai−1 )Rotxi−1 (αi−1 )T ranszi (di )Rotzi (θi ) (5)
Using D-H parametrization, we obtain the following list of values of DH
parameters :
Table 1: DH table
where :
• a2 = 0.612
• a3 = 0.5723
• d1 = 0.1273
• d4 = 0.163941
• d5 = 0.1157
• d6 = 0.0922
3
in our case:
x 0
n
On+1 = y = 0 (8)
z d6
The orientation of the end effector is given by the orientation matrix:
0
R6 =0 T6 (1 : 3, 1 : 3) (9)
V = J(q)q̇ (10)
with:
• J(q) is the jacobian matrix of dimension 6*6 in our case
• q̇ = [q̇1 q̇2 q̇3 q̇4 q̇5 q̇6 ]T
V
• V= with
w
4
wn = sumnj=1 σ̄j q̇j zj (15)
in vector form we get:
Vn
= Jn q̇ (16)
wn
with
σ1 z1 + σ̄1 (z1 ∧ p1,n ) σ2 z2 + σ̄2 (z2 ∧ p2,n ) .
σn zn + σ̄n (zn ∧ pn,n )
Jn =
σ̄1 z1 σ̄2 z2 . σ̄n zn
(17)
in our case the speed Vn and wn are expressed in the reference frame R0 .
After calculating the speed of the frame Rn we then calculate the transla-
tional and rotational speed of the end effector using the following expression:
ẋ
ẏ
ż
V= w˙x = J q̇
(18)
w˙y
w˙z
I D
with: J = 3×3 Jn the jacobian matrix of the robot.
03×3 I3×3
0 an xz + rn+1 rz −an xy − rn+1 zy
D = −an xz − rn+1 rz 0 an xx + rn+1 zx (19)
+an xy + rn+1 zy −an xx − rn+1 zx 0
q̇ = J −1 (q)Ẋ (20)
5
2.6 results and validation:
2.6.1 Direct kinematic model:
we use the general homogenous transformation matrix form in equation(5) with
the DH table -1- in python to get: T01 ,T12 ,T23 ,T34 ,T45 ,T56 then using equation
6 we calculate: T01 ,T02 ,T03 ,T04 ,T05 ,T06 .
after calculating T06 we calculate 0 R6 the orientation matrix of the end ef-
fector and position of the end effector in reference frame using equation(7)
6
in order to verify this results, we use the code in the first part of the ’main.py’
and we get the following results:
0
On+1 = [−0.2221 0 1.428]T (29)
for the orientation, coppelia doesn’t represent the x axis the same way we
do, so added a π/2 to the yaw angle to get the same orientation of the end
effector frame, then we calculated the orientation matrix 0 R6 and we got:
0 0 −1
0
R6 = 1 0 0 (30)
0 −1 0
these results are the same ones that we got before using our model (’part1.py’)
and therefor we can say that our validate is correct.
7
3 Motion Planning
In this section, the goal is to implement a trajectory generation solution in
the operational space, that computes the robot’s instructions in the form of
successive positions of the end effector.
Ri xi
Ti = (31)
0 0 0 1
Rf xf
f
T = (32)
0 0 0 1
Where the motion of the end effector is described by
Rd xd
d
T = (33)
0 0 0 1
Ri rot(u, ϑ) = Rf (35)
xx yx zx
rot(u, ϑ) = (Ri )T Rf = xy yy zy (36)
xz yz zz
8
with: p
Cϑ = 1/2(xx +yy +zz −1) and Sϑ = 1/2( (yz − zy )2 + (zx − xz )2 + (xy − yx )2 )
and so the angle ϑ and u are calculated with the following expressions:
9
we plot the evolution of the trajectory in time, and the evolution of x,y,z,roll,yaw,pitch
in time:
10
Figure 3: evolution of roll, yaw and pitch in time
11
4 Motion Control
In this part, we’ll focus on the motion control based on kinematic control, using
the model and trajectory generation already developed.
q̇ = J −1 ẋ (41)
q̇ = q̇ d (42)
The desired control that make the error position converge to zero
for Kp positif, is :
q̇ = J −1 (ẋd + Kp ep ) (44)
with
−1
L= (S(nd )S(ne ) + S(sd )S(se ) + S(ad )S(ae )) (50)
2
And the matrix S is defined as follow
0 −nz ny
S(n) = nz 0 −nx (51)
−ny nx 0
12
to get a control law that make the orientation error converge to zero we proceed
as we did with position control, and for Ko positif the final control low for the
end effector pose is :
ẋd + Kp ep
q̇ d = J − 1 (52)
L− 1(LT wd + Ko eo )
13
1 0 0
Ko = 0 1 0 (56)
0 0 1
lead to this evolution of position and orientation error
We can notice that the error position on Y has growth in a large amount of
time, then converge to 0 while X and Z position are quite robuste.
We can notice here, that the orientation error is going crazy on ψ and θ
while γ error is small.
Finally we can conclude that, the control strategy wasn’t really succesful
which can be illustrated on the non-smooth simulation we get, spending more
time tunning the right gain control may offer better results.
14