## 2 Modeling of the Snake-Like Robot Switching Side-Slipping Passively
### Modeling of the Five-Link Snake-Like Robot with a Rotational Elastic Actuator
Second, a constraint matrix \(\mathbf{C}\) of the system satisfying \(\mathbf{C}\mathbf{v}=0\) is derived. With respect to the positions of the centers of gravity, a holonomic constraint is represented as follows,  
\[\mathbf{\Phi}_{\mathbf{h}} =\left[\mathbf{\Phi}_{\mathbf{h}\mathbf{2}\mathbf{5}}^{T}\quad\mathbf{\Phi}_{\mathbf{h} \mathbf{3}}^{T}\quad\cdots\quad\mathbf{\Phi}_{\mathbf{h}\mathbf{5}}^{T}\quad\mathbf{\Phi}_{\mathbf{h} \mathbf{5}}^{T}\right]^{T}=\mathbf{0}, \tag{4}\] \[\mathbf{\Phi}_{\mathbf{h}\mathbf{j}} =\left[ \begin{matrix}x_{j_{\mathrm{S}}}-x_{j-1}-l_{j-1}\cos\theta _{j-1}\\ y_{j_{\mathrm{S}}}-y_{j-1}-l_{j-1}\sin\theta_{j-1}\end{matrix} \right],\] \[\mathbf{\Phi}_{\mathbf{h}\mathbf{j}} =\left[ \begin{matrix}x_{j}-x_{j-1s}-d_{j-1}\cos\theta_{j}\\ y_{j}-y_{j-1s}-d_{j-1}\sin\theta_{j}\end{matrix} \right].\]  
In this paper, the dynamic model without the constraint, in which the passive wheels are not side-slipping, is derived, to design a control system which allows side-slipping. Therefore, the constraint matrix of the system is defined as follows,  
\[\mathbf{C}=\frac{\partial\mathbf{\Phi}_{\mathbf{h}}}{\partial x_{\mathbf{p}}}\mathbf{A}. \tag{5}\]  
By utilizing (5), the model satisfying the constraint conditions is derived as follows:  
\[\mathbf{M}\mathbf{\dot{v}}=\mathbf{h}+\mathbf{C}^{T}\mathbf{\lambda}, \tag{6}\]  
where \(\mathbf{\lambda}\) represents the Lagrange multipliers and denotes the constraint forces of the system in the Projection Method. Finally, Equation (6) is projected into the tangent speed space and the dynamic model is obtained. From (1), the constraint-free system has 27 DOF. From (4), the system is constrained by 16 holonomic constraints. Therefore, the constrained system has 11 DOF. Now, we set the tangent speed as follows,  
\[\dot{\mathbf{q}}=\left[ \begin{array}{cccccccc}\omega_{1}&v_{x1}&\omega_{2s}& \omega_{3s}&\omega_{4s}&\omega_{5s}&v_{y1}&v_{y2}&v_{y3}&v_{y4}&v_{y5}\end{array}  \right]^{T}.\]  
The tangent speeds are chosen to be suitable for the control system. In this case, \(\omega_{1}\) and \(v_{x1}\) correspond to the first link, \(\omega_{js}\) (\(j=2\), \(\cdots\), 5) are the motor velocities and \(v_{yi}\) (\(i=1\), \(\cdots\), 5) are velocities in the axial direction. The quasi-velocity is replaced such that \(\mathbf{v}^{\prime}=\left[\dot{\mathbf{q}}^{T},\mathbf{v}_{\mathbf{q}}^{T}\right]^{T}\) is satisfied, where \(\mathbf{v}_{\mathbf{q}}\) represents the dependent velocities with respect to \(\dot{\mathbf{q}}\). Furthermore, the constraint matrix \(\mathbf{C}\) is decomposed into \(\mathbf{C}=\left[\mathbf{C}_{\mathbf{1}},\mathbf{C}_{\mathbf{2}}\right]\), satisfying \(\mathbf{C}\mathbf{v}^{\prime}=\mathbf{C}_{\mathbf{1}}\dot{\mathbf{q}}+\mathbf{C}_{\mathbf{2}}\mathbf{v}_{\mathbf{q }}=0\). The complementary orthogonal matrix \(\mathbf{D}\) satisfying both \(\mathbf{C}\mathbf{D}=\mathbf{0}\) and \(\mathbf{v}=\mathbf{D}\dot{\mathbf{q}}\) is derived as follows,  
\[\mathbf{D}=\left[ \begin{matrix}\mathbf{I}^{11\times 11}\\ -\mathbf{C}_{\mathbf{2}}^{-1}\mathbf{C}_{\mathbf{1}}\end{matrix} \right],\]  
where \(\mathbf{I}^{m\times n}\) represents the \(m\times n\) identity matrix. Then, Equation (6) is projected into the tangent speed space by the derived complementary orthogonal matrix \(\mathbf{D}\), and we obtain the dynamic model of the five-link snake-like robot as follows,  
\[\mathbf{D}^{T}\mathbf{M}\mathbf{D}\mathbf{\dot{q}}+\mathbf{D}^{T}\mathbf{M}\mathbf{\dot{D}}\mathbf{\dot{q}}= \mathbf{D}^{T}\mathbf{h}. \tag{7}\]