Position Control and Trajectory Tracking of the Stewart Platform

Demand on high precision motion systems has been increasing in recent years. Since performance of today’s many mechanical systems requires high stiffness, fast motion and accurate positioning capability, parallel manipulators have gained popularity. Currently, parallel robots have been widely used several areas of industry such as manufacturing, medicine and defense. Some of these areas: precision laser cutting, micro machining, machine tool technology, flight simulators, helicopter runway, throwing platform of missiles, surgical operations. Some examples are shown in Figure 1. Unlike open-chain serial robots, parallel manipulators are composed of closed kinematic chain. There exist several parallel kinematic chains between base platform and end moving platform. Serial robots consist of a number of rigid links connected in serial so every actuator supports the weight of the successor links. This serial structure suffers from several disadvantages such as low precision, poor force exertion capability and low payload-to-weight-ratio. The parallel robot architecture eliminates these disadvantages. In this architecture, the load is shared by several parallel kinematic chains. This superior architecture provides high rigidity, high payload-to-weight-ratio, high positioning accuracy, low inertia of moving parts and a simpler solution of the inverse kinematics equations over the serial ones. Since high accuracy of parallel robots stems from load sharing of each actuator, there are no cumulative joint errors and deflections in the links. Under heavy loads, serial robots cannot perform precision positioning and oscillate at high-speeds. Positioning accuracy of parallel robots is high because the positioning error of the platform cannot exceed the average error of the legs positions. They can provide nanometer-level motion performance. But they have smaller workspace and singularities in their workspace. The most widely used structure of a parallel robot is the Stewart platform (SP). It is a six degrees of freedom (DOF) positioning system that consists of a top plate (moving platform), a base plate (fixed base), and six extensible legs connecting the top plate to the bottom plate. SP was invented as a flight simulator by Stewart in 1965 (Stewart, 1965). This platform contained three parallel linear actuators. Gough had previously suggested a tire test machine similar to Stewart's model (Bonev, 2003). In the test machine, six actuators were used as a mechanism driven in parallel. Gough, the first person, developed and utilized this type parallel structure. Therefore, SP is sometimes named as Stewart-Gough platform in the literature. Stewart’s and Gough’s original designs are shown in Figure 2.


Introduction
Demand on high precision motion systems has been increasing in recent years.Since performance of today's many mechanical systems requires high stiffness, fast motion and accurate positioning capability, parallel manipulators have gained popularity.Currently, parallel robots have been widely used several areas of industry such as manufacturing, medicine and defense.Some of these areas: precision laser cutting, micro machining, machine tool technology, flight simulators, helicopter runway, throwing platform of missiles, surgical operations.Some examples are shown in Figure 1.Unlike open-chain serial robots, parallel manipulators are composed of closed kinematic chain.There exist several parallel kinematic chains between base platform and end moving platform.Serial robots consist of a number of rigid links connected in serial so every actuator supports the weight of the successor links.This serial structure suffers from several disadvantages such as low precision, poor force exertion capability and low payload-to-weight-ratio.The parallel robot architecture eliminates these disadvantages.In this architecture, the load is shared by several parallel kinematic chains.This superior architecture provides high rigidity, high payload-to-weight-ratio, high positioning accuracy, low inertia of moving parts and a simpler solution of the inverse kinematics equations over the serial ones.Since high accuracy of parallel robots stems from load sharing of each actuator, there are no cumulative joint errors and deflections in the links.Under heavy loads, serial robots cannot perform precision positioning and oscillate at high-speeds.Positioning accuracy of parallel robots is high because the positioning error of the platform cannot exceed the average error of the legs positions.They can provide nanometer-level motion performance.But they have smaller workspace and singularities in their workspace.The most widely used structure of a parallel robot is the Stewart platform (SP).It is a six degrees of freedom (DOF) positioning system that consists of a top plate (moving platform), a base plate (fixed base), and six extensible legs connecting the top plate to the bottom plate.SP was invented as a flight simulator by Stewart in 1965(Stewart, 1965).This platform contained three parallel linear actuators.Gough had previously suggested a tire test machine similar to Stewart's model (Bonev, 2003).In the test machine, six actuators were used as a mechanism driven in parallel.Gough, the first person, developed and utilized this type parallel structure.Therefore, SP is sometimes named as Stewart-Gough platform in the literature.Stewart's and Gough's original designs are shown in Figure 2.  (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 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.

Stewart platform system
The system components are two main bodies (top and base plates), six linear motors, controller, space mouse, accelerometer, gyroscope, laser interferometer, force/torque sensor, power supply, emergency stop circuit and interface board.They are shown in Figure 3.A simple emergency stop circuit was designed to protect the motors, when they move to out of the limits.This circuit controls the power supply which gives the energy to the motors 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.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.

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 B i (i=1,2, .. 6) and T i (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 ( i L ) for given position vector P and orientation matrix R are obtained by using the following equation.Finally, norm of the vectors ( i L ) are leg lengths ( i l ) (Fitcher, 1986;Kim & Chung, 1999;Sefrioui & Gosselin, 1993).

Leg model
The leg system is basically composed of dc motor, precision linear bearing & ball screw and coupling elements.Dc motor model is given below (Küçük & Bingül, 2008).

Startup algorithm
Before controller design a startup algorithm is needed to get robot to its home position.The position of each motor is controlled after startup.Motors have incremental encoders therefore firstly they must be brought their zero or home position.When SP system is energized, an index search algorithm looks what the position of the each leg is.The algorithm simply searches index signal of the leg and when it is found encoders are reset by hardware.Designed Simulink model for this purpose is illustrated in Figure 13.Movements to the home position for possible two situations (from upper and lower sides to zero) are shown in Figure 14.

Trajectory generation
For step inputs, the leg lengths obtained from inverse kinematics solution input to independent position control system for each motor.This movement is defined in the joint space.In order to move robot along a straight line, a trajectory planning algorithm is developed.Thus, it can be determined start and stop times of the motion besides desired position and orientation inputs.Also, motors are synchronized each other during the motion.If classical polynomial-based trajectory equations are examined, the following deficiencies are determined: i) there are need many initial and finish values in order to find the polynomial coefficients ii) the acceleration values, especially initially require high levels, iii) the coefficients need to be calculated again each time when the conditions changes.Kane's transition function is used to resolve these shortcomings and it is given the following equation (Reckdahl, 1996).
where y(t) is the position function, y 0 is the initial position, y f is the finish position, t is time, t 0 is initial time and t f 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.6was embedded in Simulink block.Only end position and path period is given to this structure and other parameters are automatically calculated.This form of motion starts and finishes with zero velocity and zero acceleration.Position, velocity and acceleration values are quite soft changes.This is very important for motors to start and stop more softly.Main model of the trajectory planning with reference inputs is shown in Figure 16 below.Detail of the blocks named 'path' in the Figure 16 is shown in Figure 17 which implements the Equation 6.

PID controller
PID control is one of the classical control methods and widely used in the industrial applications.The difference between the set point and the actual output is represented by the e(t) error signal.This signal is applied to a PID controller, control signal, u(t) is as follows.
() () () () www.intechopen.comLeg trajectory subsystem detail was given before, so it will be continued giving other blocks.Firstly, encoder subsystem given in Figure 20 is described.Each encoder is read using an encoder block and then pulses are converted to metric unit (mm) and scaled.Round subsystem shown in Figure 21 is used to eliminate errors less than 500 nanometer.

Position control
After creating controller model and user interfaces, experiments can be done and results can be observed.Firstly, PID parameters were determined via trial-error experiments in order to obtain desired responses.A lot of experiments can be done simply and system responses can be taken easily.Output data can be saved '*.mat' extension in order to analyze in detail in Matlab.Some real time responses are given below.For 1 mm motion along the z direction, responses of the legs with references and control outputs are shown in Figure 25.An orientation step response in x direction and a 500 nm step response in z direction were given in Figure 26.As can be seen from figures, PID parameters were selected to obtain fast rising time, no steady state error and smaller overshoot.PID controller works in a wide range between 500 nm to 100 mm with good control behavior.

Sliding mode controller
Nonlinear control has a very important role in the robot control applications.An important reason for this situation is to create knowledge-based systems which simplify the modeling of complex dynamics in the robot control.SMC is one of the suitable methods used in the knowledge-based systems (Küçük & Bingül, 2008).SMC is a special case of the variable structure control systems.Variable structure control systems have a structure using feedback control laws and decision making laws together.Decision-making rule called as switching function selects a special feedback control structure according to the behavior of the system.Variable structure control system is designed to force the system states to slide a special surface called the sliding surface in the state space.Once the sliding surface is reached, the SMC tries to keep the states very close to the sliding surface (Küçük & Bingül, 2008).If it is considered the change in the position error, second order equation of motion given with Equation 2, 3, 4 and 5 can be written as follows according to 1 rm x      (Utkin, 1993).s and s  have opposite signs and the state 0 s  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), The stability condition from Lyapunov's second theorem, where K is a positive constant.After theoretical steps, sliding mode controller was designed in Simulink similar to PID controller.Main model is shown in Figure 32.Details of some subsystems different from using subsystems in PID will be given only.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.

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

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.

Fig. 5 .
Fig. 5. Dspace toolbox and libraryAnother software component is the control desk (interface is shown in Figure6) which allows downloading applications, doing experiments, easily creating graphical user interface and data acquisition.

Fig. 6 .
Fig. 6.Control desk interfaceAs can be seen from Figure6, panel on the left side is called "Navigator" and it has four tabs: experiment, instrumentation, platform and test automation.All files written for

Fig. 7 .Fig. 8 .
Fig. 7. Virtual instruments and data acquisition in the instruments selector window 1)In order to have T i and B i position vectors based on robot structure, an m-file is written and a Simulink model is designed to obtain inverse kinematic solution by using Equation1.The model shown in Figure10uses 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 Figure11.The reference inputs can be entered in this block.

Fig. 9 .
Fig. 9. Schematic diagram of the Stewart platform Fig. 12. DC motor modelThe 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, a V is the armature voltage (V),

Fig
Fig. 13.Simulink model for initialization algorithm

Fig. 15 .
Fig. 15.An example of trajectory generation with Kane function Equation6was embedded in Simulink block.Only end position and path period is given to this structure and other parameters are automatically calculated.This form of motion starts and finishes with zero velocity and zero acceleration.Position, velocity and acceleration values are quite soft changes.This is very important for motors to start and stop more softly.Main model of the trajectory planning with reference inputs is shown in Figure16below.Detail of the blocks named 'path' in the Figure16is shown in Figure17which implements the Equation6.

Fig. 19 .
Fig. 19.Control Desk GUI for data acquisition and parameter update

Fig. 24 .
Fig. 24.PWM and Sign subsystems shown in the main model

Fig. 32 .
Fig. 32.Main sliding mode controller model "smc" subsystem is shown in the Figure33.This model contains sliding mode control and integrator algorithm for one leg.In order to reduce the chattering, a rate limiter block was added to output.In order to eliminate the steady state error, an integrator was added to the Fig. 34.(a) Linear motion in x direction with 15 mm reference (b) Rotation in z direction with 20º reference

Fig. 35 .
Fig. 35.Phase diagram of the SMC position control a 2 and b are the positive parameters and f(t) is a function depending on load torque, reference input and their derivatives in Equation8.