## 4 Dynamics and Control of Planar One-Legged Hopping Robots
### Hopping Control of the One-Legged Planar Robot  
As shown in Section 3, for a hybrid dynamical system, it is possible to control the system to certain time varying trajectories by partial state feedback and time-sharing patterns. For the one-legged hopping robot system considered in this paper, the time of continuous dynamics modes (stance and flight phases) is very limited, which do not exactly satisfy the condition (A6) of Theorem 3 or (B3) of Theorem 4. Thus, the state jumps caused by the constraint variations of the hybrid systems can quickly destroy the stability of the closed-loop hybrid systems. However, for the one-legged hopping robot system such as that illustrated in Figure 1, we can use the following two level control approaches to stabilize the periodic hopping systems. During the continuous dynamics modes, linear controllers with only partial state feedback are utilized on the basis of the Theorems 3 and 4. That is, in stance phases, the variables \(l(t)\) and \(\varphi(t)\) of the robot will be controlled to their target motions, while the rotational motions \(\theta(t)\) of the leg will be open loop. Thus, the controller in stance phases is  
\[\left\{ \begin{array}{l}\tau_{s}=J_{b}\left(1-\frac{1}{l_{l}+l_{b}+ml^{2}} \right)\left(\bar{\varphi}^{d}(t)-k_{1}e_{\varphi}-k_{2}\dot{e}_{\varphi} \right)\\ \quad-\frac{\int_{b}\left[2 ml\dot{\theta}+mg\cos(\theta)\right]}{l_{l}+l_{b}+ ml^{2}}+k_{h}(\varphi-\varphi_{0}),\\ F=m\left(l^{d}(t)-k_{3}e_{l}-k_{4}\dot{e}_{l}\right)-ml\theta^{2}+mg\sin\left( \theta\right)\\ \quad+k_{l}(l-l_{0}),\end{array} \right. \tag{77}\]  
where \(e_{\varphi}=\varphi(t)-\varphi^{d}(t)\), \(e_{l}=l(t)-l^{d}(t)\), \(t\in\left[ \begin{array}{cc}0&T_{\varphi}\end{array} \right]\), and \(k_{i}\)\((i=1,\ldots,4)\) are positive constants. In flight phases, the angle of the leg is only controlled to the given trajectory \(\theta^{d}(t)\) in closed loop so that the robot lands in right states, while the body is actuated in open loop by the opposite reaction of the leg. In flight phase, the length of the leg does not change, i.e., \(l(t)=l_{0}\). Thus, the controller in flight phases is given by  
\[\tau_{f}=-J_{l}\left(\bar{\theta}^{d}(t)-k_{5}e_{\theta}-k_{6}e_{\theta} \right)+k_{h}(\varphi-\varphi_{0}), \tag{78}\]  
where \(e_{\theta}=\theta(t)-\theta^{d}(t)\), \(t\in\left[ \begin{array}{cc}0&T_{f}\end{array} \right]\); \(k_{5}\) and \(k_{6}\) are also two positive constants. Note that the feedback gains \(k_{i}\)\((i=1,\ldots,6)\) can easily be obtained by the approaches of linear quadratic optimal regulators (LQR). In order to stabilize the one-legged robots to a desired periodic orbit trajectory, an adaptive controller with discrete time feedback is applied to stabilize the leg's attitude in stance phases  
\[ \begin{array}{l}\theta_{\text{th}}(k)=\theta_{0}+r_{2}(k)E_{\theta_{lo}}(k) +r_{3}DE_{\theta_{lo}}(k),\\ r_{2}(k)=r_{0}+r_{1}\chi(k),\end{array}  \tag{79}\]  
where \(k\) is the current times of touchdown, \(\theta_{\text{th}}(k)\) is the desired angle of the leg at the instant of touchdown, \(E_{\theta_{lo}}(k)=\theta_{lo}(k)-\theta_{lo}(k-1)\) is the change of the leg angle at the instant of lift off, and \(DE_{\theta_{lo}}(k)\) is defined to be \(DE_{\theta_{lo}}(k)=E_{\theta_{lo}}(k)-E_{\theta_{lo}}(k-1)\), \(r_{0}\), \(r_{1}\) and \(r_{3}\) are adjustable positive constants, and \(\theta_{0}\) is determined by the desired locomotion speed of the robot and is approximately given by \(\theta_{0}=\frac{\pi}{2}+\text{atan}\left(\frac{\dot{x}_{cm}T_{c}}{2l_{0}}\right)\). Suppose the physical parameters of the robot model as that given in Table 1, and the initial states of the robot are given by  
\[ \begin{array}{l}\left(x_{cm},z_{cm},\theta,\varphi,l,\dot{x}_{cm},z_{cm}, \dot{\theta},\dot{\varphi},l\right)_{t=0}=\\ \left(0,1.0,\frac{\pi}{2}-\frac{10\pi}{180},\frac{\pi}{2}+\frac{10\pi}{180},0.5 31,1.7,0,0,0\right),\end{array}