## 2 Dynamic Modeling and Linearization
### Derivation of the Inertia Matrix  
In flexible-joint robotic systems, each joint is modeled with two independent degrees of freedom to accurately capture the dynamics of both the actuator and the mechanical link. Specifically, we denote:  
\(\theta\) as the motor-side joint angle (i.e., actuator output) and \(q\) as the link-side joint angle (i.e., physical displacement of the link). The inertia matrix \(M(q)\) represents the centralized expression of inertial coupling terms in the dynamic model, and its accurate modeling is crucial for predicting system responses and achieving high-precision torque estimation. Under vibration control conditions, the accuracy of the inertia matrix directly affects the performance of feedforward compensation and the system's ability to isolate nonlinear disturbances. In systems with flexible connections or harmonic drive structures, the rigid-body inertia matrix fails to adequately capture the true dynamic characteristics of the system. Therefore, flexible coupling effects are introduced, with the expression given as:  
\[J_{\text{eff}}\ddot{\theta}+K(\theta-q)+B(\dot{\theta}-\dot{q})=\tau \tag{12}\]  
Here, \(J_{\text{eff}}\) denotes the equivalent rotational inertia; \(K\) and \(B\) refer to the equivalent stiffness and viscous damping coefficient of the flexible connecting element. By introducing this structural formulation, the elastic hysteresis behavior of the flexibly coupled system can be effectively described. Starting from the kinetic energy perspective, the inertia matrix structure of a six-degree-of-freedom manipulator is derived and reconstructed into a linear form suitable for identification. From the above, it is known that the link mass is denoted as \(\text{m}_{i}\), the center-of-mass position as \(r_{i}\), the angular velocity as \(\omega_{i}\), and the rotational inertia tensor as \(I_{i}\). The kinetic energy can be expressed as the sum of translational kinetic energy and rotational kinetic energy:  
\[T=\sum_{i=1}^{6}\left(\frac{1}{2}m_{i}r_{i}^{T}\dot{r}_{i}+\frac{1}{2}\omega_{ i}^{T}I_{i}\omega_{i}\right) \tag{13}\]  
Based on \(\dot{r}_{i}=J_{\
u_{i}}(q)\dot{q}\) and \(\omega_{i}=J_{\omega_{i}}(q)\dot{q}\), the total kinetic energy of the system can be obtained as:  
\[T=\frac{1}{2}\dot{q}^{T}\left(\sum_{i=1}^{6}\left[m_{i}I_{\
u_{i}}^{T}I_{\
u_{ i}}+\int_{\omega_{i}}^{T}I_{i}I_{\omega_{i}}\right]\right)\dot{q}\triangleq \frac{1}{2}\dot{q}^{T}M(q)\dot{q} \tag{14}\]  
From this, the explicit structure of the inertia matrix can be obtained, as shown in Equation (15):  
\[M(q)=\sum_{i=1}^{6}\left(m_{i}I_{\
u_{i}}^{T}J_{\
u_{i}}+J_{\omega_{i}}^{T}I_{ i}\omega_{i}\right) \tag{15}\]  
Using \(M(q)\) as the fundamental modeling object, its importance in output torque estimation is validated [18]. Furthermore, to characterize the role of inertial coupling terms in a six-degree-of-freedom manipulator system, it is expanded into a matrix form:  
\[M(q)= \begin{bmatrix}M_{11}&M_{12}&\dots&M_{16}\\ M_{12}&M_{22}&\dots&M_{26}\\ \vdots&\vdots&\ddots&\vdots\\ M_{16}&M_{26}&\dots&M_{66}\end{bmatrix}  \tag{16}\]  
Each element in the matrix is a function of the joint angles, with the specific coefficients determined by the geometric and mass properties of each link. According to the Newton-Euler method, the inertial torque output of the system can be expressed as \(\tau_{\text{inertia}}\) :  
\[\tau_{\text{inertia}}=M(q)\ddot{q}=\sum_{j=1}^{6}\left(\sum_{i=1}^{6}M_{ij}(q )\ddot{q}_{j}\right)e_{i} \tag{17}\]This structure can be applied in the modeling stage of predictive control, explicitly defining the inertia matrix path and allowing for correction of the predictor structure based on the residuals of the regression matrix [19].