**4. Achievement of the control law for robot manipulators for the adapted reaching mode**

VSC systems include a group of different, generally fairly simple, feedback control laws and a decision rule. Depending on the system condition, a decision rule, usually called the *switching function*, determines which control law is "on-line" at any time. The transient dynamics of VSC systems consists of two modes: a "reaching mode" (or "non-sliding mode"), and a subsequent "sliding mode". Hence, VSC design involves two stages: the first one involves the design of the appropriate *<sup>n</sup>*‐dimensional switching function *s x*ð Þ for a desired sliding mode dynamics. The second one involves a control design for the reaching mode where a reaching condition is met. The desired sliding mode dynamics usually includes a fast and stable error-free response without overshoot. In sliding mode, an asymptotic convergence to the final state will be accomplished. The desired response in the reaching mode, in general, is to reach the switching manifold defined as

$$\mathbf{s}(\mathbf{x}) = \boldsymbol{\Psi}^T \mathbf{x} = \mathbf{0},\tag{25}$$

in a finite time with a small amount of overshoot with regard to the switching manifold [18].

The reaching law is a differential equation that determines the dynamics of a switching function *s x*ð Þ. If *s x*ð Þ is an asymptotically stable differential equation, then, it is solely a reaching condition. Further, the parameter selection in the differential equation controls the dynamic quality of the VSC system in the reaching mode. The reaching law can be expressed practically in general form as follows [18]:

$$\dot{\mathbf{s}} = -\mathbf{Q}\text{sgn}(\mathbf{s}) - \mathbf{K}\mathbf{h}(\mathbf{s}),\tag{26}$$

where *Q* ¼ *diag q*1, … , *qn* � �, *qi* <sup>&</sup>gt;0; *sgn* ðÞ¼ *<sup>s</sup>* ½ � *sgn s*ð Þ<sup>1</sup> , … , *sgn s*ð Þ*<sup>n</sup> <sup>T</sup>* ; *K* ¼ *diag k*½ � 1, … , *kn* , *ki* <sup>&</sup>gt;0; *h s*ðÞ¼ ½ � *<sup>h</sup>*1ð Þ *<sup>s</sup>*<sup>1</sup> , … , *hn*ð Þ *sn <sup>T</sup>*; and *sihi*ð Þ*si* <sup>&</sup>gt;0, *hi*ð Þ¼ <sup>0</sup> 0.

The design principle of the SMC law for the plants of arbitrary order is to force a variable's error and its derivative to zero. Tracking of a desired motion *<sup>q</sup><sup>d</sup>*ð Þ*<sup>t</sup>* is the main task of the robot arm. Here, let us start first by defining a 2*n*-dimensional error vector [18]:

$$\mathbf{e} = \begin{bmatrix} \mathbf{e}\_1 \\ \mathbf{e}\_2 \end{bmatrix} = \begin{bmatrix} \dot{\mathbf{q}}^d - \mathbf{x}\_1 \\ \dot{\mathbf{q}}^d - \mathbf{x}\_2 \end{bmatrix} = \begin{bmatrix} \dot{\mathbf{q}}^d - \mathbf{q} \\ \dot{\mathbf{q}}^d - \dot{\mathbf{q}} \end{bmatrix},\tag{27}$$

and then, an *n*-dimensional vector of switching function:

$$s(\mathbf{e}) = \Psi \mathbf{e} = \begin{bmatrix} \Lambda & I \end{bmatrix} \begin{bmatrix} \mathbf{e}\_1 \\ \mathbf{e}\_2 \end{bmatrix} = \Lambda \mathbf{e}\_1 + \dot{\mathbf{e}}\_1,\tag{28}$$

where *e*\_ represents the tracking speed error and:

$$\Lambda = \operatorname{diag} [\lambda\_1, \dots, \lambda\_n], \ \lambda\_i > 0,$$

that determines the system bandwidth. Next, the time derivative of (28) is taken as follows [18]:

$$
\dot{s}(\mathbf{e}) = \Lambda \dot{\mathbf{e}}\_1 + \dot{\mathbf{e}}\_2 = \Lambda \dot{\mathbf{e}}\_1 + \ddot{\mathbf{q}}^d - \ddot{\mathbf{q}}.\tag{29}
$$

Now, constant plus proportional rate reaching law as represented by

$$\dot{s} = -\mathbf{Q}\text{sgn}(s) - \mathbf{K}s \tag{30}$$

is adapted. Substituting (30) into (29) and setting *q*€ apart yields:

$$
\ddot{\mathbf{q}} = \mathbf{Q} \text{sgn}(\mathbf{s}) + \mathbf{K} \mathbf{s} + \Lambda \dot{\mathbf{e}}\_1 + \dddot{\mathbf{q}}^d. \tag{31}
$$

Finally, substituting (31) into the non-linear plant of continuous-time dynamic model of robot systems in (8) results in:

$$\mathbf{M}(\mathbf{q})\left[\mathbf{Q}\mathbf{g}\mathbf{n}(\mathbf{s}) + \mathbf{K}\mathbf{s} + \Lambda\dot{\mathbf{e}}\_1 + \ddot{\mathbf{q}}^d\right] + \mathbf{C}(\mathbf{q}, \dot{\mathbf{q}})\dot{\mathbf{q}} + \mathbf{F}(\dot{\mathbf{q}}) + \mathbf{G}(\mathbf{q}) = \boldsymbol{\sigma}.\tag{32}$$

This is also known as the *final control law*.
