## 2 Materials and Methods  
### WIPR Model  
A WIPR is a wheeled inverted pendulum transport robot with a placement table, as illustrated in Figure 1. Its left and right wheels are independent drive wheels that control the robot's movement speed, rotation direction, and tilt angle of the pendulum using the principle of differential drive to manage the position and posture of WIPR. The generalized world coordinate system is denoted \(\Sigma OXYZ\) while \((x,y)\), representing the center coordinate of the robot wheels. The robot's forward velocity and rotational angular velocity are denoted as \(v\) and \(w\), respectively. The angle of the robot's direction of motion concerning the \(X\)-axis is represented by \(\theta\), while \(\alpha\) is the tilt angle of the pendulum concerning the \(Z\)-axis. \(M\) refers to the total weight of the transport platform plus the pendulum, whereas m denotes the weight of each drive wheel. The distance between the two wheels is represented by \(d\), while \(\tau_{r}\), and \(\tau_{t}\) are the torque of the right wheel and the left wheel, respectively. The rotational inertia of each driven wheel is denoted by \(l_{w}\) and represents the rotational inertia of the transport platform and the pendulum together. The length of the pendulum is represented by \(L\). Detailed introduction of robot parameters can be seen in Table 1.  
**Remark 1**. : _The forward velocity of MWIPR is \(x_{\text{\tiny{p}}}\), and \(x_{\text{\tiny{p}}}=\dot{x}\cos\theta+\dot{y}\sin\theta\)._  
**Assumption 1**. : _The tires of the MWIPR do not experience any skidding, and there is no potential for lateral deflection during its motion._  
According to Assumption 1, the incomplete constraint equation of WIPR in Equation (1) can be listed as follows:  
\[\dot{x}\sin\theta-\dot{y}\cos\theta=0, \tag{1}\]  
The position and posture of the WIPR in the world coordinate system are represented by \(q=\left[x,y,\theta,\alpha\right]^{T}\). As the Lagrangian modeling method does not require the inclusion of internal forces within the system, it is a quick and straightforward method of building a model. This property makes it particularly well-suited for constructing multivariable and nonlinear dynamic models for the WIPR, as demonstrated in this paper. By dividing \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Description** \\ \hline \(m_{\text{\tiny{up}}}\) & Mass of each wheel \\ \(M\) & The total weight of the transport platform plus the pendulum \\ \(I_{\text{\tiny{p}}}\) & The rotational inertia of each driven wheel \\ \(I_{\text{\tiny{M}}}\) & The rotational inertia of the transport platform and the pendulum \\ \(d\) & The distance between the two wheels \\ \(L\) & The length of the pendulum \\ \(\eta_{\text{\tiny{p}}}\) & The torque of the left wheel \\ \(\tau_{\tau}\) & The torque of the right wheel \\ \(\text{\tiny{p}}\) & WIPR forward velocity \\ \(w\) & WIPR rotation velocity \\ \(\theta\) & WIPR Yaw angle \\ \(\alpha\) & The tilt angle of the pendulum \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameter descriptions. Figure 1: WIPR system. into \(q_{m}\) and \(\alpha\), the position of the robot in the coordinate system is denoted by \(q_{m}\), while the angle of the pendulum is represented by \(\alpha\). Therefore, the Lagrangian method [31] is employed to establish the dynamic model of the WIPR, and the resulting mathematical model is presented below as Equation (2). \[ \begin{bmatrix}M_{m}(q)&M_{ma}(q)\\ M_{am}(q)&M_{\alpha}(q)\end{bmatrix}\begin{bmatrix}\hat{q}_{m}\\ \hat{\alpha}\end{bmatrix} + \begin{bmatrix}C_{m}(q)&C_{ma}(q)\\ C_{sm}(q)&C_{\alpha}(q)\end{bmatrix}\begin{bmatrix}\hat{q}_{m}\\ \alpha\end{bmatrix} + \begin{bmatrix}G_{m}\\ G_{\alpha}\end{bmatrix}  \tag{2}\] \[= \begin{bmatrix}B_{m}(q_{m})\tau_{m}\\ 0\end{bmatrix} + \begin{bmatrix}A^{T}(q_{m})\lambda\\ 0\end{bmatrix} + \begin{bmatrix}d_{m}\\ d_{\alpha}\end{bmatrix}