## 2 The Modeling of the Hydraulic Quadruped Robot
### Kinematic Modeling  
As shown in Figure 2, the kinematic model of the robot is established based on the improved D-H (Hartenbery) parameter method. The robot requires four coordinate frames. They are the reference coordinate frame, the torso coordinate frame, the transitional coordinate frame and the joint coordinate frame. The reference coordinate frame [\(O_{\rm w}\)] is a coordinate system representing all forces, displacements and velocities, also known as the inertial coordinate system. [\(O_{\rm w}\)] is fixed on the ground. \(x_{\rm w}\) points to the forward direction of the robot; \(z_{\rm w}\) is perpendicular to the trunk and points in the opposite direction to the ground; and \(y_{\rm w}\) is determined by the right-hand rule. The origin of the torso coordinate frame \(\{O_{\rm b}\}\) is located in the geometric center of the robot trunk. The axis direction of torso coordinate frame is the same as that of frame \(\{O_{\rm w}\}\). The transitional coordinate frames \(\{O_{i0}\}\) are fixed on the corners of the trunk. The subscript \(i\) is the serial number of four robotic legs (\(i\) = 1, 2, 3 and 4), representing the right foreleg (RF), left foreleg (LF), left hindleg (LH) and right hindleg (RH), respectively. The joint coordinate frames \(\{O_{ij}\}\) are fixed on the joints of the robot. The subscript \(j\) is the serial number of joints (\(j\) = 1, 2, 3 and 4), representing the horizontal pendulum joint, hip joint, knee joint and foot joint, respectively. \(2a\) is the length of the robot trunk, \(2b\) is the width of the robot trunk and \(h\) is the height of the robot trunk. \(l_{1}\) is the length of the link rod between the trunk and thigh, \(l_{2}\) is  
Figure 1: Model of hydraulic quadruped robot. the length of the thigh and \(l_{3}\) is the length of the shank. \(\theta_{i1}\), \(\theta_{i2}\) and \(\theta_{i3}\) are the rolling hip joint angle, pitching hip joint angle and pitching knee joint angle, respectively. Since the mechanical structure of the four legs is identical, the coordinate frame established according to the D-H rule of the four legs is exactly the same. Hence the transformation matrix from the foot coordinate frame \(\{O_{i4}\}\) to the transitional coordinate frame \(\{O_{i0}\}\) of each leg is identical. The transformation matrix \({}^{0}T_{i4}\) can be expressed as:  
\[{}^{0}T_{i4}=\left[ \begin{array}{cccc}c_{1}c_{23}&-c_{1}s_{23}&s_{1}&{}^{0} p_{ix}\\ s_{1}c_{23}&-s_{1}s_{23}&-c_{1}&{}^{0}p_{iy}\\ s_{23}&c_{23}&0&{}^{0}p_{iz}\\ 0&0&0&1\\ \end{array} \right] \tag{1}\]  
where \(s_{23}=\sin(\theta_{2}+\theta_{3})\), \(c_{23}=\cos(\theta_{2}+\theta_{3})\), \(s_{1}=\sin\theta_{1}\) and \(c_{1}=\cos\theta_{1}\). \({}^{0}p_{ix}\), \({}^{0}p_{iy}\) and \({}^{0}p_{iz}\) represent the x-coordinate, y-coordinate and z-coordinate of the foot in the corresponding transitional coordinate frame, respectively. The position of the foot of the hydraulic quadruped robot in the transitional coordinate frame \({}^{0}\mathbf{p}_{ie}=\{^{0}p_{ix}\ ^{0}p_{iy}\ ^{0}p_{iz}\ 1\}^{\rm T}\) is given by:  
\[\left\{ \begin{array}{l}{}^{0}p_{ix}=c_{1}(l_{1}+l_{2}c_{2}+l_{3}c_{23})\\ {}^{0}p_{iy}=s_{1}(l_{1}+l_{2}c_{2}+l_{3}c_{23})\\ {}^{0}p_{iz}=l_{2}s_{2}+l_{3}s_{23}\\ \end{array} \right. \tag{2}\]  
Based on forward kinematic analysis, the transformation matrix from \(\{O_{i0}\}\) to \(\{O_{\rm b}\}\) of four legs is then found:  
\[{}^{\rm b}T_{i0}=\left[ \begin{array}{cccc}0&0&1&\alpha a\\ 0&1&0&\beta b\\ -1&0&0&-h\\ 0&0&0&1\\ \end{array} \right] \tag{3}\]  
Figure 2: Kinematics model of hydraulic quadruped robot. where \(\alpha\) and \(\beta\) are symbolic signs, which are defined as follows:  
\[\alpha= \begin{cases}1&i=1,2\\ -1&i=3,4\end{cases}  \tag{4}\]  
\[\beta= \begin{cases}1&i=2,4\\ -1&i=1,3\end{cases}  \tag{5}\]  
The inverse kinematic analysis is significant for gait planning and motion control of quadruped robots.