## 4 Design of Head Position Control System Considering Side-Slipping  
In this section, the head position control system for a snake-like robot switching the side-slipping passively is designed. A strategy for the control system design is to converge side-slipping immediately. To converge the side-slipping, the weighting matrix of SDRE is tuned corresponding to the side-slipping situation. To design such a control system, a state-space representation including the head position of the snake-like robot is first formulated. Second, the system is reduced, corresponding to the state of side-slipping. Next, the head position control system is designed, based on SDRE. Finally, a tuning algorithm for the weighting matrix to converge the side-slipping is constructed. First, the state-space representation including the head position of the snake-like robot is formulated. The head position of the snake-like robot (\(x_{h},y_{h}\)) is represented as follows,  
\[x_{h} =x_{1}-d_{1}\cos\theta_{1},\] \[y_{h} =y_{1}-d_{1}\sin\theta_{1}.\]  
By utilizing the relation \(\hat{\mathbf{x}}_{\mathbf{p}}=\mathbf{A}\mathbf{v}\) and \(\mathbf{v}=\mathbf{D}\hat{\mathbf{q}}\), the velocity of the head position is related with the tangent speed as follows:  
\[ \begin{bmatrix}\hat{x}_{h}\\ \hat{y}_{h}\end{bmatrix}  =S\hat{\mathbf{q}},\] \[S = \begin{bmatrix}d_{1}\sin\theta_{1}&1&0\\ -d_{1}\cos\theta_{1}&0&1\end{bmatrix} \mathbf{D_{1}}.\]  
The state vector is set as follows,  
\[\mathbf{x}= \begin{bmatrix}x_{h}&y_{h}&\mathbf{s}^{T}&\mathbf{q}^{T}\end{bmatrix} ^{T},\]and the state-space representation including the head position of the snake-like robot is formulated, as (12), by utilizing the estimated state of the observer \(\hat{x}\):  
\[\hat{x}=A(\hat{x})x+B(\hat{x})u, \tag{12}\]  
where  
\[A(\hat{x}) = \begin{bmatrix}Z^{2\times 2}&Z^{2\times 4}&S\\ Z^{4\times 2}&Z^{4\times 4}&H_{s}\\ Z^{11\times 2}&\tilde{K}&\tilde{M}\end{bmatrix} ,\] \[B(\hat{x}) = \begin{bmatrix}Z^{2\times 4}\\ Z^{4\times 4}\\ \tilde{N}\end{bmatrix} .\]  
Second, the state-space representation is reduced, corresponding to the state of side-slipping. In (12), when no side-slipping link exists, the velocity in the axial direction of its link is uncontrollable, because in a link without side-slipping, it is regarded that there is a constraint with respect to slip prevention (i.e., the velocity in the axial direction is fixed to zero). To avoid uncontrollable links, the state-space representation is appropriately reduced, corresponding to the side-slipping situation. The reduced system is represented as follows,  
\[\hat{x}=\bar{A}(\hat{x})\hat{x}+\bar{B}(\hat{x})u.\]  
For example, when all links are slipping,  
\[\bar{x}=x= \begin{bmatrix}x_{h}&y_{h}&\mathbf{s}^{T}&\mathbf{q}^{T}\end{bmatrix} ^{T}.\]  
For another instance, when no links are side-slipping,  
\[\bar{x}=\mathbf{x}= \begin{bmatrix}x_{h}&y_{h}&\mathbf{s}^{T}&\omega_{1}&v_{x1}\end{bmatrix}  ^{T}.\]  
When the first, second, and fourth links are side-slipping,  
\[\bar{x}=\mathbf{x}= \begin{bmatrix}x_{h}&y_{h}&\mathbf{s}^{T}&\omega_{1}&v_{x1}&v_{y1}& v_{y2}&v_{y4}\end{bmatrix} ^{T}.\]  
Next, the head position control system is designed, based on SDRE. Now, we consider a following quadratic cost function for the reduced system:  
\[J=\int_{0}^{\infty}\bar{\mathbf{x}}^{T}\mathbf{Q}(\mathbf{x})\hat{x}+\mathbf{u}^{T}R(\hat{x}) udt,\]  
where \(\mathbf{Q}_{o}(\mathbf{\xi}_{e})\) and \(\mathbf{R}_{o}(\mathbf{\xi}_{e})\) are state-dependent weighting matrices, which are chosen to be positive semidefinite and positive definite, respectively.