## 2 Dynamics of Quadruped Robots  
### Simulation Model Analysis  
We built a simplified model of a quadruped robot modeled after [PERSON] the robot Dog, which is shown in Figure 1. The model is composed of the trunk, joints, large and small legs, and other components. Based on the forward direction, the left-front leg, right-front leg, left-rear leg, and right-rear leg are numbered as 1, 2, 3, and 4, respectively. The base coordinate system \(\{O_{w}\}\) is on the ground, the trunk coordinate system \(\{O_{b}\}\) is established at the geometric center of the trunk, and the leg base coordinate system \(\{O_{i,0}\}\) is established at the joint between the hip joint and the trunk, where \(i=1,\ 2,\ 3,\ 4\).  
The model uses the D-H method to determine the pose relationship between various components of the robot. Its single leg model is shown in Figure 2. Each leg has three degrees of freedom, including hip, knee, and ankle. The coordinate system of the body's leg \(i\) is established according to the single-leg model. The leg base coordinate system \(\{O_{i,1}\}\) is established at the hip joint. The coordinate system \(\{O_{i,2}\}\), \(\{O_{i,3}\}\) is established at the knee joint and ankle joint, respectively. The coordinate system \(\{O_{i,4}\}\) is established at the end of the foot. The \(z\)-axis of the three coordinate systems is the rotation axis of the corresponding joint, \(\theta_{i,k}\) represents the rotation angle from \(x_{i,k-1}\) to \(x_{i,k}\) around \(z_{i,k}\). The \(x\)-axis of the three coordinate systems is on the connecting rod of each joint, and the direction is shown in Figure 2. The \(y\)-axis of the three coordinate systems is determined by the right-hand rule. The length of each connecting rod of the leg is represented by \(L_{1}\), \(L_{2}\), and \(L_{3}\), and its mass corresponds to \(m_{1}\), \(m_{2}\), and \(m_{3}\) respectively.  
According to the link length and joint angle, the position of the robot's foot point in the body coordinate system is calculated, so as to analyze the motion trajectory of the quadruped robot. The motion of the quadruped robot is analyzed according to the forward kinematics equation, and the pose relationship from the foot end coordinate system \(\{O_{i,4}\}\)  
Figure 1: [PERSON] robot dog simplified structural model.  
Figure 2: The single-leg model of the quadruped robot is modeled by the D-H method.  
to the leg base coordinate system \(\{O_{i,0}\}\) is calculated. The homogeneous transformation matrix is:  
\[\begin{array}{c}{}_{4}^{0}T_{i}=\left[\begin{array}{cccc}c_{i,1}c_{i,23}&-c_{i, 1}s_{i,23}&-s_{i,1}&c_{i,1}L_{1}+c_{i,1}c_{i,2}L_{2}+c_{i,1}c_{i,23}L_{3}\\ s_{i,1}c_{i,23}&-s_{i,1}s_{i,23}&c_{i,1}&s_{i,1}L_{1}+s_{i,1}c_{i,2}L_{2}+s_{i, 1}c_{i,23}L_{3}\\ -s_{i,23}&-c_{i,23}&0&-s_{i,2}L_{2}-s_{i,23}L_{3}\\ 0&0&0&1\end{array}\right]\end{array} \tag{1}\]  
where: \(c_{i,1}=\cos\theta_{i,1},c_{i,23}=\cos(\theta_{i,2}+\theta_{i,3}),s_{i,1}=\sin \theta_{i,1},s_{i,23}=\sin(\theta_{i,2}+\theta_{i,3})\)  
According to Formula (1), the positional relationship between the end coordinates of each foot and the leg base coordinate system can be obtained:  
\[P_{i}=\left[\begin{array}{c}x_{i}\\ y_{i}\\ z_{i}\\ 1\end{array}\right]=\left[\begin{array}{c}c_{i,1}L_{1}+c_{i,1}c_{i,2}L_{2}+ c_{i,1}c_{i,23}L_{3}\\ s_{i,1}L_{1}+s_{i,1}c_{i,2}L_{2}+s_{i,1}c_{i,23}L_{3}\\ -s_{i,2}L_{2}-s_{i,23}L_{3}\\ 1\end{array}\right] \tag{2}\]  
If the foot position of the robot is given, the rotation angle of each joint of the robot can be solved through the inverse kinematics equation:  
\[\left\{\begin{array}{c}\theta_{i,1}=\tan^{-1}(\frac{y_{i}}{x_{i}})\\ \theta_{i,2}=\sin^{-1}[\frac{-L_{i,2}}{\sqrt{(L_{1}-x_{i,1}-y_{i,1})^{2}+z_{i }^{2}}}]-\tan^{-1}(\frac{z_{i}}{x_{i,1}-y_{i}y_{i,1}-L_{1}})\\ \theta_{i,3}=\cos^{-1}[\frac{(x_{i,1}+y_{i,1}-L_{1})^{2}+z_{i}^{2}-L_{2}^{2}- L_{3}^{2}}{2L_{2}L_{3}}]\end{array}\right. \tag{3}\]