Position Control and Trajectory Tracking of The Stewart Platform
Position Control and Trajectory Tracking of The Stewart Platform
Position Control and Trajectory Tracking of The Stewart Platform
www.intechopen.com
180
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
(a)
(b)
(c)
Fig. 1. Applications of the Stewart Platform: medical, manufacturing and flight simulator
(Niesing, 2001; Merlet, 2006; Wikipedia)
(a)
(b)
Fig. 2. Stewart (a) and Gough (b) original design (Bonev, 2003)
SP was not attracted attention during the first 15 years since the first invention. Then, Hunt
indicated the advantages of parallel robots. After 1983, researchers realized their high load
carrying capacity and high positioning ability of these robots. Researchers were then started
to study a detailed analysis of these structures. The widely used structure of SP, where top
platform is connected to base platform using 6 linear axis with universal joints, was then
developed (Hunt, 1983).
It is a well known fact that the solution of the forward kinematics problem is easier than the
inverse kinematics problem for serial robot manipulators. On the other hand, this situation
is the just opposite for a parallel robot. Inverse kinematics problem of parallel robot can be
expressed as follows: position vector and rotation matrix in Cartesian space is given, and
asked to find length of each link in joint space. It is relatively easy to find the link lengths
because the position of the connecting points and the position and orientation of the moving
platform is known. On the other hand, in the forward kinematics problem, the rotation
matrix and position vector of the moving platform is computed with given the link lengths.
Forward kinematic of the SP is very difficult problem since it requires the solution of many
www.intechopen.com
181
non-linear equations. In the literature, solutions of the forward (Chen & Song, 1994; Liao et
al., 1993; Merlet, 1992; Nauna et al., 1990) and the inverse (Fitcher, 1986; Kim & Chung, 1999;
Sefrioui & Gosselin, 1993) kinematics has been given in detail (Kizir et al., 2011).
In this study, design and development stages were given about position control and
trajectory tracking of a 6 DOF-Stewart platform using Matlab/Simulink and DS1103 real
time controller. Matlab (Mathworks Inc.) is a well known and one of the most popular
technical computing software package that it is used in a wide area of applications from
financial analysis to control designs. Matlab/Simulink allows easiest way of programming
and technical computing to its users. It enables simulations and real time applications of
various systems. Third party co-developers improve its abilities allowing using hundreds of
hardware. Dspace company is one of the third party participate of Matlab that produces
rapid control prototyping and hardware-in-the-loop simulation units. DS1103 is a powerful
real time controller board for rapid control prototyping (Dspace Inc.).
This chapter is organized in the following manner. System components and real-time
controller board are introduced in section 2 and 3, respectively. Position and trajectory
tracking control with PID and sliding mode controllers are described in section 4. Finally,
experimental results are given in detail.
www.intechopen.com
182
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
based on the signal of hall-effect sensors on each motor. A switch-mode 150W power supply
with inhibit input and EMI filter is used to supply required energy. Also, an interface board
was designed between controller and motors.
The Dspace DS1103 real time controller is used to implement control algorithms. DS1103 is a
rapid prototyping controller that developed for designing and analyzing complex and
difficult control applications. It has various inputs and outputs such as digital, analog digital
converter, digital analog converter, serial interface, can-bus, pulse width modulation (PWM)
channels and encoders in order to be used lots of peripheral unit like actuators and sensors.
DS1103 has a real time interface (RTI) that allows fully programmable from the Simulink
block diagram environment. A dspace toolbox will be added to Simulink after installing
RTI, so it can be configured all I/O graphically by using RTI. You can implement your
control and signal processing algorithms on the board quickly and easily. A general DS1103
controller board system is shown in Figure 4. It consists of a DS1103 controller card in
expansion box, CLP1103 input-output connector and led panel, DS817 link card and a
computer.
www.intechopen.com
183
Navigator
Instruments
Window
Empty Layout
Tool Window
www.intechopen.com
184
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
conducting experiment are listed in the experiment tab. Instrumentation tab allows building
instrument panels in order to change and monitor the variables of a model. Supported
simulations and connected boards are shown in platform tab. Test automation tab has
functions about automation tasks, other software solution of Dspace.
Bottom side is called Tool Window having log viewer, file selector, interpreter and open
experiment tabs. It is seen errors and warnings in the log viewer tab and files under selected
folder are listed where an application can be loaded by drag and drop action.
In order to create a GUI for an experiment, it should be opened an empty layout from filenew layout click. A lot of instruments are listed in the instrument selector right side on the
control desk. Virtual instruments and data acquisition elements are shown in Figure 7
below. An instrument can be placed on the layout plotting with mouse left clicked after
selecting from virtual instruments panel. Its position and size can be changed and its
properties such as color, text, precision and etc can be settled according to needs. It can be
saved and added to an experiment after completing GUI.
Fig. 7. Virtual instruments and data acquisition in the instruments selector window
www.intechopen.com
185
All development steps can be illustrated basically in the Figure 8 below. This figure is
illustrated for DS1103 in an expansion box. It should be finished all connections before this
procedure.
Power on the
system
Start
Matlab&Simulink
Drag&Drop
required blocks to
model
Open an empty
Layout in the
Control Desk
Switch off PC
Switch on
DS1103
Start Control
Desk
Design the
control algorithm
Switch off
DS1103
Do experiments
and show results
Open a Simulink
Switch on PC
4. Control
A controller is needed to move top platform from initial position to desired position and
orientation. It will generate required forces for each motor. Position and trajectory control of
the platform can be reduced to leg position control after inverse kinematic and path
planning algorithms. A PID (proportional-integrator-derivative) and sliding mode position
controllers were developed and implemented. Control algorithms designed in Simulink
environment and embedded in the Dspace DS1103 real time controller.
All robots are electro-mechanic devices consisting of actuators, sensors and mechanical
structure. In order to control the robots for desired motions kinematic and dynamic
equations of the system should be known. Firstly kinematic solution should be computed
before controller design. A schematic model of the SP for kinematic solution is illustrated in
Figure 9. In the figure, base B={X,Y,Z} and top T={x,y,z} coordinate systems are placed and
base and top joint points are labeled as Bi (i=1,2, .. 6) and Ti (i=1,2, .. 6).
It is needed to find leg lengths to reach the moving platform to its desired position and
orientation according to fixed platform (inverse kinematics). Required leg vectors ( Li ) for
given position vector P and orientation matrix R are obtained by using the following
equation. Finally, norm of the vectors ( Li ) are leg lengths ( li ) (Fitcher, 1986; Kim & Chung,
1999; Sefrioui & Gosselin, 1993).
Li RXYZTi P Bi
i : 1, 2,...,6
(1)
In order to have Ti and Bi position vectors based on robot structure, an m-file is written and
a Simulink model is designed to obtain inverse kinematic solution by using Equation 1. The
model shown in Figure 10 uses the m-file to get required variables and takes the desired
position (x, y, z) and orientation (, , ) of the top platform. It outputs the leg lengths.
Desired block in this model is shown in Figure 11. The reference inputs can be entered in
this block.
www.intechopen.com
186
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
188.67975191
B3
B4
25.68141134
250
T4
T3
T5
T2
B5
l5 l
6
l4
l3
l1
B2
l2
T6
B
293.26616983
www.intechopen.com
B6
T1
16.41456206
B1
187
La
Driver
m m
Ra
Va
Em
ia
l b
Jm
Controller
The symbols represent the following variables here; m is the motor position (radian), m is
the produced torque by the motor (Nm), l is the load torque, Va is the armature voltage (V),
La is the armature inductance (H), Ra is the armature resistance (), Em is the reverse EMF
(V), ia is the armature current (A), K b is the reverse EMF constant, K m is the torque constant.
La
dia
Raia Va Em
dt
Em K b
d m
dt
m K mi a
m l Jm
d 2 m
dt 2
(2)
(3)
(4)
(5)
www.intechopen.com
188
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
0.1
0.05
from upper side
to zero
0
0
Leg Length
-5
-10
-15
-20
0.02
0.1
Leg Length
0.05
from lower side
to zero
0
0
2
3
Time (sec)
0
-0.02
-0.04
2
3
Time (sec)
www.intechopen.com
189
y (t ) y 0 y f y 0
tt tt0
f
y f y0
2
t t0
sin 2
t f t0
(6)
where y(t) is the position function, y0 is the initial position, yf is the finish position, t is time,
t0 is initial time and tf is the finish time. An example of the trajectory generation is given
below (Figure 15) using Equation 6. As can be seen from figure, position, velocity and
acceleration curves are given for two seconds and velocity and acceleration start and finish
with zero.
10
mm
position
5
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
10
mm/sn
velocity
5
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
mm/sn2
20
acceleration
0
-20
0.2
0.4
0.6
0.8
1
time (sec)
1.2
1.4
1.6
1.8
www.intechopen.com
d
e(t )
dt
(7)
190
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
www.intechopen.com
191
Fig. 19. Control Desk GUI for data acquisition and parameter update
www.intechopen.com
192
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
Fig. 22. PID subsystem in main model and simple PID structure
www.intechopen.com
193
Initial subsystem model is shown in Figure 23 and its details were given before. It takes the
index signals of the motors and produces a predefined duty cycle value for PWM
generation, motor direction signals and status of the initialization routine.
www.intechopen.com
194
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
Fig. 24. PWM and Sign subsystems shown in the main model
Ref.
Out.
0.5
Control Outputs
0
1
0.5
0.5
0
0
0.5
0.5
0
0
-5
-5
0.5
0
0
Time (sec)
2
Time (sec)
(a)
-10
-10
-5
-5
-10
-10
-5
-5
-10
-10
Time (sec)
Time (sec)
(b)
Fig. 25. (a) 1 mm step response of the top position in z direction (b) PID controller outputs
www.intechopen.com
195
-4
0
-1
-1
0
x 10
Ref.
Out.
Ref.
Out.
-0.5
-4
x 10
-2
4
2
0
0
0
0
-4
0.4
-0.2
0.2
-0.4
0
1
2
Time (sec)
0
1
-4
-4
x 10
2
0
0
0
x 10
2
0
1
-4
x 10
x 10
1
1
0.5
2
0
2
Time (sec)
0
0
2
Time (sec)
0
0
2
Time (sec)
(a)
(b)
Fig. 26. (a) 1 rotation in x direction (b) 500 nm linear motion in z direction
4.4.2 Trajectory control
Several trajectory experiments were performed using trajectory generation algorithm
mentioned in section 4.3. If motion time and end points are entered in to the user interface,
the trajectory is created automatically and motion starts. In order to show the performance
of trajectory tracking, some examples are given below. For these examples, references,
trajectories and leg errors are illustrated in Figure 27-31. Several cases are examined in the
results.
References (mm)
rot x
pos x
rot y
pos y
rot z
pos z
0.8
0.6
0.4
0.2
0.01
0.01
-0.01
0.01
0
0
0.5
1.5
2.5
3.5
4.5
-0.01
2
3
Time (sec)
0.01
-0.01
-0.01
0.8
Legs (mm)
0.6
0.01
0.01
0.4
0.2
0
0
0.5
1.5
2.5
Time (sec)
3.5
4.5
-0.01
-0.01
2
3
Time (sec)
(a)
Fig. 27. (a) Trajectory tracking in z direction (b) Errors of the legs
www.intechopen.com
(b)
196
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
Errors of the Legs (mm)
-3
References (mm)
x 10
rot x
pos x
rot y
pos y
rot z
pos z
0.5
-3
x 10
-5
-5
-3
0.5
1.5
2.5
3.5
4.5
Legs (mm)
-5
2
3
Time (sec)
x 10
5
0
1
0
-3
x 10
0
0
-5
0
-3
0.5
x 10
0.01
5
0.5
1.5
2.5
Time (sec)
3.5
5 -0.01 0
4.5
2
3
Time (sec)
-5
(a)
(b)
References (radian)
0.08
References (radian)
rot x
pos x
rot y
pos y
rot z
pos z
0.06
0.04
0.02
0.08
0.04
0.02
0
0
1
1.5
2.5
3.5
4.5
10
10
0
-5
0.5
1.5
2.5
Time (sec)
3.5
4.5
0.5
1.5
2.5
3.5
4.5
0.5
1.5
2.5
Time (sec)
3.5
4.5
Legs (mm)
Legs (mm)
0.5
-10
rot x
pos x
rot y
pos y
rot z
pos z
0.06
0
-5
-10
(a)
(b)
0.05
rot x
pos x
rot y
pos y
rot z
pos z
0.04
0.03
0.02
0.01
References (mm)
References (radian)
0.5
1.5
2.5
3.5
4.5
2
1
Legs (mm)
Legs (mm)
0
-1
-2
rot x
pos x
rot y
pos y
rot z
pos z
0.5
1.5
2.5
Time (sec)
3.5
4.5
0.5
1.5
2.5
3.5
4.5
0.5
1.5
2.5
Time (sec)
3.5
4.5
0
-1
-2
(a)
Fig. 30. (a) Rotation in z direction (b) Linear motion in x direction
www.intechopen.com
(b)
197
References (mm)
10
rot x
pos x
rot y
pos y
rot z
pos z
8
6
4
2
0
0
0.5
1.5
2.5
3.5
4.5
0.5
1.5
2.5
Time (sec)
3.5
4.5
Legs (mm)
2
0
-2
-4
x 1 x2
x 2 a1x1 a2 x2 f t bu
(8)
a1, a2 and b are the positive parameters and f(t) is a function depending on load torque,
reference input and their derivatives in Equation 8.
For discontinuous control:
u u0 sign(s ),
s cx1 x2
(9)
and as Equation 10 is linear and doesnt depend on f(t), sliding mode on the s = 0 line allows
to decreasing error exponentially.
cx1 x 1 0
www.intechopen.com
(10)
198
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
(11)
(12)
From equation,
s and s have opposite signs and the state s 0 will approach the sliding line after a while.
Inequality given with Equation 12 determines the required voltage to force the system to
sliding mode (Utkin, 1993).
A candidate Lyapunov function can be selected as follows for stability analysis (Kassem &
Yousef, 2009),
1
v 2
2
(13)
(14)
www.intechopen.com
199
Fig. 33. Simulink model of SMC with integrator for one leg
controller. This integrator is switched on only small limited range between 0,008 mm. This
integrator does not affect the performance of sliding mode controller. It does not slow down
the system response. Also, integrator is disabled during trajectory tracking by switching.
4.5.1 Position control
Some real time responses for position control are given below. In Figure 34, errors of the legs
were shown in the motions linear and rotation in the x and z direction with 15 mm and 20
inputs. As can be seen from the figures, overshoot and steady state error are very small. But,
system response is slower.
Errors of the Legs (mm)
20
10
0.4
0.2
-2
-4
0
-5
-0.2
-10
-10
20
10
-5
2
3
Time (sec)
0.4
-10
-10
20
10
0.2
-2
0
-0.2
-5
-10
-10
-4
0
2
3
Time (sec)
(a)
2
3
Time (sec)
2
3
Time (sec)
(b)
Fig. 34. (a) Linear motion in x direction with 15 mm reference (b) Rotation in z direction with
20 reference
Figure 35 shows a phase diagram of the system with SMC. In the phase diagram, the states
of the system are leg position and leg velocity. As can be seen from the figure, SMC pushes
states to sliding line and the states went to the desired values along sliding line when 5 mm
step input along the z axis in Cartesian space was applied to the system.
www.intechopen.com
200
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
12
10
Velocity
-2
0.5
1.5
2.5
Position
3.5
4.5
References (degree)
0.02
0.05
4
rot x
others
3
2
-0.02
-0.05
4
Time (sec)
0.05
0
0
0.1
0.05
-0.05
10
-0.05
5
Legs (mm)
-0.1
0
0.02
0.1
0.05
0
-5
0
-0.05
-10
4
Time (sec)
-0.02
(a)
Fig. 36. (a) Rotation in x direction (b) Errors of the legs
www.intechopen.com
4
Time (sec)
(b)
201
References (degree)
10
8
rot y
others
6
4
2
6
4
2
0
1
20
10
10
5
Legs (mm)
Legs (mm)
0
-10
-20
others
rot z
4
Time (sec)
0
-5
4
Time (sec)
-10
(a)
(b)
References (mm)
5
4
3
pos z
others
2
1
0
2
1
1
Legs (mm)
2
0
-2
pos y
others
Legs (mm)
4
Time (sec)
0
-1
4
Time (sec)
(a)
(b)
5. Conclusion
In this study, a high precision 6 DOF Stewart platform is controlled by a PID and sliding
mode controller. These controllers were embedded in a Dspace DS1103 real time controller
which is programmable in the Simulink environment. Design details and development
stages of the PID and SMC are given from subsystems to main model in Simulink. This
study can be a good example to show how a real time controller can be developed using
Matlab/Simulink and Dspace DS1103. In order to test the performance of the controllers,
several position and trajectory tracking experiments were conducted. Step inputs are used
for position control and Kane transition function is used to generate trajectory. In the
position experiments using both controllers, there is no steady state error and moving plate
of the SP is positioned to the desired target with an error less than 0.5 m. Sliding mode
controller is better performance in terms of overshoot than PID but PID has faster response
due to high gain. In the tracking experiments, PID and SMC have similar responses under
no load. If nonlinear external forces are applied to moving platform, control performance of
the SMC will be better than PID.
www.intechopen.com
202
Serial and Parallel Robot Manipulators Kinematics, Dynamics, Control and Optimization
6. Acknowledgment
This work is supported by The Scientific and Technological Research Council of Turkey
(TUBITAK) under the Grant No. 107M148.
7. References
Bonev, I. (2003). The True Origins of Parallel Robots, 06.04.2011, Available from:
http://www.parallemic.org/Reviews/Review007.html
Chen, N.X.; Song, S.M. (1994). Direct position analysis of the 4-6 Stewart Platform, ASME J.
of Mechanical Design, Vol. 116, No. 1, (March 1994), pp. (61-66), ISSN 1050-0472
Dspace Inc., 06.04.2011, Available from: http://www.dspaceinc.com/en/inc/home.cfm
Hunt, K.H. (1983). Structural kinematics of in-parallel-actuated robot-arms, ASME J. Mech.,
Trans. Automat. Des., Vol. 105, No. 4, (December 1983), pp. (705712), ISSN 0738-0666
Fitcher, E.F. (1986). A Stewart Platform-Based Manipulator: General Theory and Practical
Construction, Int. J. of Robotics Research, Vol. 5, No. 2, (June 1986), pp. (157-182),
ISSN 0278-3649
Kassem, A.M.; Yousef, A. M. (2009). Servo DC Motor Position Control Based on Sliding Mode
Approach, 5th Saudi Technical Conference and Exhibition STCEX 2009, January 2009
Kim, D.; Chung, W. (1999). Analytic Singularity Equation and Analysis of Six-DOF Parallel
Manipulators Using Local Structurization Method, IEEE Transactions on Robotics and
Automation, Vol. 15, No. 4, (August 1999), pp. (612-622), ISSN 1042-296X
Kizir, S. ; Bingl, Z. ; Oysu, C. ; Kk, S. (2011). Development and Control of a High
Precision Stewart Platform, International Journal of Technological Sciences, Vol. 3, No.
1, pp. (51-59)
Kk, S.; Bingl, Z. (2008). Robot Dinamii ve Kontrol, Birsen press, ISBN 978-975-511-5160, stanbul
Liao, Q.; Seneviratne, L.D.; Earles, S.W.E. (1993). Forward kinematic analysis for the general
4-6 Stewart Platform, IEEE/RSJ International Conference on Intelligent Robots and
Systems IROS'93, ISBN 0-7803-0823-9, Yokohama, Japan, July 1993
Mathworks Inc., 06.04.2011, Available from: http://www.mathworks.com/
Merlet, J.P. (1992). Direct kinematics and assembly modes of parallel manipulators, Int. J. of
Robotics Research, Vol. 11, No. 2, (April 1992), pp. (150-162), ISSN 0278-3649
Merlet, J.P. (Ed(s).). (2006). Parallel Robots, Springer, ISBN-10 1-4020-4133-0, Netherlands
Nauna, P.; Waldron, K.J.; Murthy, V. (1990). Direct kinematic solution of a Stewart Platform,
IEEE Trans. Robotics Automat., Vol. 6, No. 4, (August 1990), pp. (438-444), ISSN 1042296X
Niesing, B. (2001). Medical Engineering, Fraunhofer Magazine, Vol. 2
Reckdahl, K.J. (1996). Dynamics and control of mechanical systems containing closed
kinematic chains, Phd Thesis, Stanford University
Sefrioui, J.; Gosselin., C.M. (1993). Singularity analysis and representation of planar parallel
manipulators, Robot. Autom. Syst., Vol. 10, No. 4, pp. (209-224)
Stewart, D. (1965). A Platform with Six Degrees of Freedom, Proceedings of the Institute of
Mechanical Engineering, Vol. 180, Part 1, No. 5, pp. (371-386)
Utkin, V.I., (1993). Sliding mode control design principles and applications to electric drives,
IEEE Transactions on Industrial Electronics, Vol. 40, No. 1, pp. (2336), ISSN 1042-296X
Wikipedia, 06.04.2011, Available from: http://en.wikipedia.org/wiki/Stewart_platform
www.intechopen.com
ISBN 978-953-51-0437-7
Hard cover, 458 pages
Publisher InTech
How to reference
In order to correctly reference this scholarly work, feel free to copy and paste the following:
Seluk Kizir and Zafer Bingul (2012). Position Control and Trajectory Tracking of the Stewart Platform, Serial
and Parallel Robot Manipulators - Kinematics, Dynamics, Control and Optimization, Dr. Serdar Kucuk (Ed.),
ISBN: 978-953-51-0437-7, InTech, Available from: http://www.intechopen.com/books/serial-and-parallel-robotmanipulators-kinematics-dynamics-control-and-optimization/position-control-and-trajectory-tracking-of-thestewart-platform-
InTech Europe
InTech China