Dynamic Modeling and Simulation of Stewart Platform

Since a parallel structure is a closed kinematics chain, all legs are connected from the origin of the tool point by a parallel connection. This connection allows a higher precision and a higher velocity. Parallel kinematic manipulators have better performance compared to serial kinematic manipulators in terms of a high degree of accuracy, high speeds or accelerations and high stiffness. Therefore, they seem perfectly suitable for industrial high-speed applications, such as pick-and-place or micro and high-speed machining. They are used in many fields such as flight simulation systems, manufacturing and medical applications. One of the most popular parallel manipulators is the general purpose 6 degree of freedom (DOF) Stewart Platform (SP) proposed by Stewart in 1965 as a flight simulator (Stewart, 1965). It 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 employing the same architecture of the Gough mechanism (Merlet, 1999) is the most studied type of parallel manipulators. This is also known as Gough–Stewart platforms in literature. Complex kinematics and dynamics often lead to model simplifications decreasing the accuracy. In order to overcome this problem, accurate kinematic and dynamic identification is needed. The kinematic and dynamic modeling of SP is extremely complicated in comparison with serial robots. Typically, the robot kinematics can be divided into forward kinematics and inverse kinematics. For a parallel manipulator, inverse kinematics is straight forward and there is no complexity deriving the equations. However, forward kinematics of SP is very complicated and difficult to solve since it requires the solution of many non-linear equations. Moreover, the forward kinematic problem generally has more than one solution. As a result, most research papers concentrated on the forward kinematics of the parallel manipulators (Bonev and Ryu, 2000; Merlet, 2004; Harib and Srinivasan, 2003; Wang, 2007). For the design and the control of the SP manipulators, the accurate dynamic model is very essential. The dynamic modeling of parallel manipulators is quite complicated because of their closed-loop structure, coupled relationship between system parameters, high nonlinearity in system dynamics and kinematic constraints. Robot dynamic modeling can be also divided into two topics: inverse and forward dynamic model. The inverse dynamic model is important for system control while the forward model is used for system simulation. To obtain the dynamic model of parallel manipulators, there are many valuable studies published by many researches in the literature. The dynamic analysis of parallel manipulators has been traditionally performed through several different methods such as


Introduction
Since a parallel structure is a closed kinematics chain, all legs are connected from the origin of the tool point by a parallel connection. This connection allows a higher precision and a higher velocity. Parallel kinematic manipulators have better performance compared to serial kinematic manipulators in terms of a high degree of accuracy, high speeds or accelerations and high stiffness. Therefore, they seem perfectly suitable for industrial high-speed applications, such as pick-and-place or micro and high-speed machining. They are used in many fields such as flight simulation systems, manufacturing and medical applications. One of the most popular parallel manipulators is the general purpose 6 degree of freedom (DOF) Stewart Platform (SP) proposed by Stewart in 1965 as a flight simulator (Stewart, 1965). It 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 employing the same architecture of the Gough mechanism (Merlet, 1999) is the most studied type of parallel manipulators. This is also known as Gough-Stewart platforms in literature. Complex kinematics and dynamics often lead to model simplifications decreasing the accuracy. In order to overcome this problem, accurate kinematic and dynamic identification is needed. The kinematic and dynamic modeling of SP is extremely complicated in comparison with serial robots. Typically, the robot kinematics can be divided into forward kinematics and inverse kinematics. For a parallel manipulator, inverse kinematics is straight forward and there is no complexity deriving the equations. However, forward kinematics of SP is very complicated and difficult to solve since it requires the solution of many non-linear equations. Moreover, the forward kinematic problem generally has more than one solution. As a result, most research papers concentrated on the forward kinematics of the parallel manipulators (Bonev and Ryu, 2000;Merlet, 2004;Harib and Srinivasan, 2003;Wang, 2007). For the design and the control of the SP manipulators, the accurate dynamic model is very essential. The dynamic modeling of parallel manipulators is quite complicated because of their closed-loop structure, coupled relationship between system parameters, high nonlinearity in system dynamics and kinematic constraints. Robot dynamic modeling can be also divided into two topics: inverse and forward dynamic model. The inverse dynamic model is important for system control while the forward model is used for system simulation. To obtain the dynamic model of parallel manipulators, there are many valuable studies published by many researches in the literature. The dynamic analysis of parallel manipulators has been traditionally performed through several different methods such as For dynamic modeling of parallel manipulators, many approaches have been developed such as the principle of virtual work (Tsai, 2000, Wang andGosselin, 1998;Geike and McPhee, 2003), screw teory (Gallardo et al., 2003), Kane's method (Liu et al., 2000;Meng et al., 2010) and recursive matrix method (Staicu and Zhang, 2008). Although the derived equations for the dynamics of parallel manipulators present different levels of complexity and computational loads, the results of the actuated forces/torques computed by different approaches are equivalent. The main goal of recent proposed approaches is to minimize the number of operations involved in the computation of the manipulator dynamics. It can be concluded that the dynamic equations of parallel manipulators theoretically have no trouble. Moreover, in fact, the focus of attention should be on the accuracy and computation efficiency of the model. The aim of this paper is to present the work on dynamic formulation of a 6 DOF SP manipulator. The dynamical equations of the manipulator have been formulated by means of the Lagrangian method. The dynamic model included the rigid body dynamics of the mechanism as well as the dynamics of the actuators. The Jacobian matrix was derived in two different ways. Obtaining the accurate Jacobian matrix is very essential for accurate simulation model. Finally, the dynamic equations including rigid body and actuator dynamics were simulated in MATLAB-Simulink and verified on physical system. This chapter is organized in the following manner. In Section 2, the kinematic analysis and Jacobian matrices are introduced. In Section 3, the dynamic equations of a 6 DOF SP manipulator are presented. In Section 4, dynamic simulations and the experimental results are given in detail. Finally, conclusions of this study are summarized.

Structure description
The SP manipulator used in this study (Figure 1), is a six DOF parallel mechanism that consists of a rigid body moving plate, connected to a fixed base plate through six independent kinematics legs. These legs are identical kinematics chains, couple the moveable upper and the fixed lower platform by universal joints. Each leg contains a precision ball-screw assembly and a DC-motor. Thus, length of the legs is variable and they can be controlled separately to perform the motion of the moving platform.

Inverse kinematics
To clearly describe the motion of the moving platform, the coordinate systems are illustrated in Figure 2. The coordinate system (B XYZ ) is attached to the fixed base and other coordinate system (T xyz ) is located at the center of mass of the moving platform. Points ( i B and i T ) are the connecting points to the base and moving platforms, respectively. These points are placed on fixed and moving platforms (Figure 2.a). Also, the separation angles between points ( 2 T and 3 T , 4 T and 5 T , 1 T and 6 T ) are denoted by p  as shown in Figure 2.b. In a similar way, the separation angles between points ( 1 B and 2 B , 3 B and 4 B , 5 B and 6 B ) are denoted by b  .  Figure 2.b, the location of the i th attachment point ( i T ) on the moving platform can be found (Equation 1). p r and base r are the radius of the moving platform and fixed base, respectively. By the using the same approach, the location of the i th attachment point ( i B ) on the base platform can be also obtained from Equation 2 rotation of  about the fixed x-axis, R X (), followed by a rotaion of  about the fixed y-axis, R Y () and a rotaion of  about the fixed z-axıs, R Z (). In this way, the rotation matrix of the moving platform with respect to the base platform coordinate system is obtained. The position vector P denotes the translation vector of the origin of the moving platform with respect to the base platform. Thus, the rotation matrix and the position vector are given as the following.

  
When the position and orientation of the moving platform The actuator length is ii lL  .

Jacobian matrix
The Jacobian matrix relates the velocities of the active joints (actuators) to the generalized velocity of the moving platform. For the parallel manipulators, the commonly used expression of the Jacobian matrix is given as the following.

LJ X
where L  and X  are the velocities of the leg and the moving platform, respectively. In this work, two different derivations of the Jacobian matrix are developed. The first derivation is made using the general expression of the Jacobian matrix given in Equation 7. It can be rewritten to see the relationship between the actuator velocities, L  and the generalized velocity of the moving platform ( The generalized velocity of the moving platform is below: www.intechopen.com

Serial and Parallel Robot Manipulators -Kinematics, Dynamics, Control and Optimization
is the velocity of the platform connection point of the leg. Figure 3 shows a schematic view of one of the six legs of the SP manipulator.
where i u is the unit vector along the axis of the prismatic joint of link i ( Figure 3). It can be obtained as follows The second Jacobian matrix in Equation 10 is calculated as the following.
where 33 x I denotes the 3x3 identity matrix and S designates the 3x3 screw symmetric matrix associated with the vector The first proposed Jacobian matrix of the SP manipulator is defined as The second proposed Jacobian matrix of the SP manipulator is defined as T on the moving platform with reference to the base coordinate system (B XYZ ) is obtained as The velocity of the attachment point j T is obtained by differentiating Equation 17 with respect to time is angular velocity of the moving platform with reference to the base platform.
Since the projection of the velocity vector ( j T  ) on the axis of the prismatic joint of link i produces the extension rate of link i, the velocity of the active joint www.intechopen.com

Serial and Parallel Robot Manipulators -Kinematics, Dynamics, Control and Optimization 26
Equation 20 is rewritten in matrix format as follows.
The first Jacobian matrix is The second Jacobian matrix is

Dynamic modeling
The dynamic analysis of the SP manipulator is always difficult in comparison with the serial manipulator because of the existence of several kinematic chains all connected by the moving platform. Several methods were used to describe the problem and obtain the dynamic modeling of the manipulator. In the literature, there is still no consensus on which formulation is the best to describe the dynamics of the manipulator. Lagrange formulation was used in this work since it provides a well analytical and orderly structure. In order to derive the dynamic equations of the SP manipulator, the whole system is separated into two parts: the moving platform and the legs. The kinetic and potential energies for both of these parts are computed and then the dynamic equations are derived using these energies.

Kinetic and potential energies of the moving platform
The kinetic energy of the moving platform is a summation of two motion energies since the moving platform has translation and rotation about three orthogonal axes, (XYZ). The first one is translation energy occurring because of the translation motion of the center of mass of the moving platform. The translation energy is defined by where up m is the moving platform mass. For rotational motion of the moving platform around its center of mass, rotational kinetic energy can be written as www.intechopen.com

Dynamic Modeling and Simulation of Stewart Platform
are the rotational inertia mass and the angular velocity of the moving platform, respectively. They are given as () 00 00 00 denotes the angular velocity of the moving platform with respect to the base frame. Given the definition of the angles ,  and  , the angular velocity, In the moving platform coordinate system, the angular velocity of the moving platform given in Equation 27 is calculated as where () sin() s  and () cos() c   . As a result, the total kinetic energy of the moving platform in a compact form is given by where up M is the 6x6 mass diagonal matrix of the moving platform. Also, potential energy of the moving platform is 00 000 where g is the gravity.

Kinetic and potential energies of the legs
Each leg consists of two parts: the moving part and the fixed part ( Figure 4). The lower fixed part of the leg is connected to the base platform through a universal joint, whereas the upper moving part is connected to the moving platform through a universal joint.
Therefore, the total kinetic energy of the leg i L is calculated as the following.

Dynamic equations
In this subsection, the Lagrange formulation is used to derive the dynamic modeling of the SP manipulator. Considering q and  as the corresponding generalized coordinates and generalized forces, respectively, the general classical equations of the motion can be obtained from the Lagrange formulation: where (,) K qq  is the kinetic energy, and () P q is the potential energy. Generalized coordinates q is replaced with Cartesian coordinates ( p o X  ). The dynamic equation derived from Equation 40 can be written as where a M , a N and a K are the inertia matrix, viscous damping coefficient matrix and gain matrix of the actuator, respectively. Also, s J and m J are the mass moment of inertia of the ball-screw and motor, s b and m b are the viscous damping coefficient of the ball-screw and motor, p and n are the pitch of the ball-screw and the gear ratio. m  and F are the vectors of motor torques and the forces applied by the actuators. The electrical dynamics of the actuator can be described by the following equations.
where t K , L , R and b K are the torque constant, the rotor inductance, terminal resistance and back-emf constant of the actuators, respectively. V and i are the motor voltage and motor current , respectively. The angular velocity of the motor is given as Since the dynamics of the platform is derived in the moving platform coordinates (Cartesian space, p o X  ), Equation 52 can be generally expressed in Cartesian space as the follows.
The terms in the equation above are obtained from joint space terms and the Jacobian matrix.  Figure 6 shows the Stewart Platform manipulator used in the experiments. It is constructed from two main bodies (top and base plates), six linear motors, controller, space mouse, accelerometer, gyroscope, force/torque sensor, power supply, emergency stop circuit and interface board as shown in the figure. Inverse kinematics and control algorithm of SP are embedded in MATLAB/Simulink module. Moreover, controller board like the space DS1103owning real-time interface implementation software to generate and then download the real time code to specific space board is used, and it is fully programmable from MATLAB/Simulink environment. Thus, it is possible for the user to observe the real process and collect the data from encoders for each leg while the experiment is in progress. To demonstrate the effectiveness and the validation of the two dynamic models of the SP manipulator including the actuator dynamics, experimental tests are performed on the manipulator. The first Simulink model ("Desired" block) as shown in Figure 7 is used for the inverse kinematic solution for a given

Experimental setup and simulation blocks
Thus, the reference lengths of the legs are obtained from this block. Figure 8 shows the forward dynamics Simulink block (Jacobian matrix and its derivative, motor torques, the position and velocity of the moving platform, etc.). Figure 9 shows the developed Simulink model for the actual lengths of the legs. This block is designed using the following equation.   Table 1 and Table 2.  The constants of the motor used in the SP manipulator are given in Table 4.

Dynamic simulations and experimental results
In this subsection, the effectiveness and the validation of the dynamic models of the SP manipulator with the actuator dynamics were investigated. In order to compare the experimental results with the simulation results, three trajectory tracking experiments were conducted. Also, the dynamic models obtained with two different Jacobian matrices ( A J and B J ) are examined. In all experiments, SP was worked in open-loop. In the first experiments, the translation motion along z-axis was applied to the SP system.
( ) 0.25 10 sin( ) () 0 zt t t    Figure 11 shows the reference lengths of the legs, the actual lengths from the encoder and the lengths predicted by the dynamic equations of the SP manipulator with two different Jacobian A J (Sim-A) and B J (Sim-B). Response of two dynamic simulation models (Sim-A and Sim-B) is almost same. But, it is observed that the Sim-A shows better performance than the Sim-B for this trajectory. Also, simulation and experimental results are very close to each other. The second experiment, both translational and rotational motion along all axes (x,y,z) was applied to the SP system. The trajectory is defined in Equation 68. The experimental and simulation results for this trajectory are shown in Figure 12. As can be shown in the figure, the dynamic model (red) has better performance compared to other (blue). There is good match between the simulation and experimental results. In the last experiment, the fast translational and rotational motion along all axes (x,y,z) was conducted. The trajectory is given below.  Figure 13 illustrates the results obtained from dynamic models and experimental results for this trajectory. In accordance with the results shown in Figure 13, the relative small deviations between the models and the experimental data are occurred. However, the obtained dynamic models can track the high frequency reference trajectory.
where 16 () . . . () ei eiare the trajectory errors of i th sample obtained from difference between the experimental and the simulation results and N is the number of sample. Table 5 gives the cost function values obtained from the two different dynamic models. The two dynamic models of the SP manipulator using A J and B J exhibit very good performance in terms of model accuracy. Performance of the dynamic model using A J is better than which of other model. 3-EXP(x,y,z, , , ) 3.6470 3.3697 Table 5. The cost function values for the two different dynamic models

Conclusion
In this paper, closed-form dynamic equations of the SP manipulator with the actuator dynamics were derived using Lagrangian method. A computational highly efficient method was developed for the explicit dynamic equations. Besides, two simple methods for the calculation of the Jacobian matrix of SP were proposed. Two dynamic models of the SP were obtained using these Jacobian matrices. Two SP models were simulated in a MATLAB-Simulink. In order to verify the simulation results, three experiments were conducted. Considering all of the results, there is very good agreement between the experiments and the simulations. Modeling errors for each experiment were computed. Based on the modeling error, modeling accuracy of the developed models is very high. Thus, the verified model of the SP can be used for control and design purposes. Especially, a model based controller needs the verified model.

Acknowledgment
This work is supported by The Scientific and Technological Research Council of Turkey (TUBITAK) under the Grant No. 107M148.