**4.5.1 Position control**

198 Serial and Parallel Robot Manipulators – Kinematics, Dynamics, Control and Optimization

*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

A candidate Lyapunov function can be selected as follows for stability analysis (Kassem &

1 <sup>2</sup> 2 *v* 

*<sup>d</sup> <sup>K</sup>*

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

"smc" subsystem is shown in the Figure 33. 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

 

 

<sup>2</sup> 1 2

*dt* 

2 11 22 <sup>0</sup> *s cx a x a x f t bu sign s* () () (11)

0 2 11 22 *bu cx a x a x f* ( )*t* (12)

(13)

(14)

Derivative of the sliding surface is:

sliding mode (Utkin, 1993).

where *K* is a positive constant.

using subsystems in PID will be given only.

Fig. 32. Main sliding mode controller model

The stability condition from Lyapunov's second theorem,

From equation,

Yousef, 2009),

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.

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.

Position Control and Trajectory Tracking of the Stewart Platform 201

Legs (mm)

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

References (mm)

Legs (mm)

References (degree)

0 1 2 3 4 5 6 7 8

others rot z

pos y others

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>6</sup> <sup>7</sup> <sup>8</sup> -10

Time (sec)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Time (sec)

rot y others

0 1 2 3 4 5 6 7 8

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>6</sup> <sup>7</sup> <sup>8</sup> -20

Fig. 37. (a) Rotation in *y* and (b) *z* direction

Time (sec)

0 1 2 3 4 5 6 7 8

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>6</sup> <sup>7</sup> <sup>8</sup> -2

Time (sec)

Fig. 38. (a) Linear motion in *z* and (b) in *y* direction

(a) (b)

(a) (b)

pos z others

**5. Conclusion** 

the SMC will be better than PID.

Legs (mm)

References (mm)

Legs (mm)

References (degree)

Fig. 35. Phase diagram of the SMC position control

#### **4.5.2 Trajectory control**

Different situations in trajectory control are considered in this section. These are shown in Figure 36-38. As can be seen from the figures legs followed the desired trajectories synchronous.

Fig. 36. (a) Rotation in *x* direction (b) Errors of the legs

0 1

Legs (mm)

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

Time (sec)

Fig. 38. (a) Linear motion in *z* and (b) in *y* direction

(a) (b)

<sup>0</sup> <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>6</sup> <sup>7</sup> <sup>8</sup> -2

Time (sec)

0 1 2 3 4 5 6 7 8
