# Design and Demonstration of a Flying-Squirrel-Inspired Jumping Robot with Two Modes
## 5 Pitching Requirement and Adjustment
### Pitching Adjustment  
#### 5.2.1 Dynamic Model  
In this paper, the swing of the forelimbs is used to adjust the pitch attitude of the robot. Because the hind limbs no longer move relative to the body after takeoff, the hind limbs and the body can be regarded as the same rigid body. As shown in Figure 19, the center of mass of the forelimbs, the body containing the hind limbs, and the entire robot are located at point \(A\), point \(B\), and point \(O\), respectively. The mass of the forelimbs and the body are \(m_{L}\) and \(m_{B}\), respectively. The forelimbs can swing around point \(C\) on the body. The length between point \(A\) and point \(C\) is \(l_{AC}\). The length between point \(B\) and point \(C\) is \(l_{BC}\). The angle between the forelimbs and the horizontal line is \(\phi_{L}\). The angle between the body and the horizontal line is \(\phi_{B}\). The angle between the body and the forelimbs is \(\theta_{BL}\). The rectangular coordinate frame \(\{O\}\) is set up on the point \(O\). In frame \(\{O\}\), the \(x\) axis points to the horizontal direction, and the \(y\) axis points to the vertical direction. They denote the coordinates for point \(A\) and point \(B\) in frame \(\{O\}\) as \(\overrightarrow{r}_{OA}\) and \(\overrightarrow{r}_{OB}\), respectively. They can be obtained using the relation  
\[m_{L}\overrightarrow{r}_{OA}+m_{B}\overrightarrow{r}_{OB}=0 \tag{19}\]  
Figure 18: Simulation results for gliding trajectory. The Lagrange equation is used for dynamics modeling, and its expression is  
\[\frac{d}{dt}(\frac{\partial L}{\partial\dot{q}_{i}})-\frac{\partial L}{\partial q _{i}}=Q_{i}\qquad(i=1,\cdots,n) \tag{20}\]  
where \(q_{i}\) is the \(i\)th generalized coordinate; \(Q_{i}\) is the generalized force corresponding to \(q_{i}\); \(L\) is the Lagrange function, which is equal to the difference between the kinetic energy and the potential energy of the system. Igoring the height change in the ascent stage, we only consider the influence of the swing of the forlimbs on the aerial posture [26]. In this case, the robot's potential energy is zero. Therefore, the system's total energy is the sum of the kinetic energy of the forelimbs and body, namely  
\[L=\frac{1}{2}J_{L}\dot{\phi}_{L}^{2}+\frac{1}{2}m_{L}\bigg{|}\dot{\vec{r}}_{ CA}\bigg{|}\dot{2}_{2}^{2}+\frac{1}{2}J_{B}\dot{\phi}_{B}^{2}+\frac{1}{2}m_{B} \bigg{|}\dot{\vec{r}}_{OB}\bigg{|}\dot{2}_{2}^{2} \tag{21}\]  
where \(J_{L}\) and \(J_{B}\) denote the moment of inertia of the forelimbs and body when their axes of rotation pass through the point \(C\), respectively. Further, (19) and (21) can be combined and arranged as  
\[L=\frac{1}{2}\left[J_{L}\dot{\phi}_{L}^{2}+J_{B}\dot{\phi}_{B}^{2}+\frac{m_{L} m_{B}(l_{AC}^{2}\dot{\phi}_{L}^{2}+l_{BC}^{2}\dot{\phi}_{B}^{2}+2l_{AC}l_{BC} \dot{\phi}_{L}\dot{\phi}_{B}\cos\theta_{BL})}{m_{L}+m_{B}}\right] \tag{22}\]  
Neglecting the air resistance, Equation (20) can be written as  
\[\left\{ \begin{array}{c}\frac{d}{dt}(\frac{\partial L}{\partial\dot{\phi}_{L }})-\frac{\partial L}{\partial\dot{\phi}_{L}}=\tau\\ \frac{d}{dt}(\frac{\partial L}{\partial\dot{\phi}_{B}})-\frac{\partial L}{ \partial\dot{\phi}_{B}}=-\tau\end{array} \right. \tag{23}\]  
where \(\tau\) is the the actuation torque from the motor. Combining (22) and (23), we obtain the dynamics equation as  
\[\left\{ \begin{array}{c}-M\ddot{\phi}_{L}-K\ddot{\phi}_{B}\cos\theta_{BL}-K \dot{\phi}_{B}^{2}\sin\theta_{BL}=\tau\\ N\ddot{\phi}_{B}+K\ddot{\phi}_{L}\cos\theta_{BL}+K\dot{\phi}_{L}^{2}\sin\theta_ {BL}=-\tau\end{array} \right. \tag{24}\]  
where \(M=J_{L}+\frac{m_{L}m_{B}l_{AC}^{2}}{m_{L}+m_{B}}\), \(N=J_{B}+\frac{m_{L}m_{B}l_{AC}^{2}}{m_{L}+m_{B}}\), \(K=\frac{m_{L}m_{B}l_{AC}l_{BC}}{m_{L}+m_{B}}\)  
Due to the nonlinear coupling between \(\phi_{L}\) and \(\phi_{B}\), it is difficult to transform (24) into an equation only containing \(\phi_{B}\) and \(\tau\). Therefore, the state variable \(\theta_{BL}\) is used for solving by following two steps.