## 4 Detection and Mitigation Mechanism
### Dynamic Model  
The execution unit of the heavy-duty robot is a manipulator. The dynamic model for motors has been detailedly described in [37; 38; 39], and this paper will focus on the derivation of the manipulator dynamic model. The conventional dynamic modelling methods of manipulator usually adopt Newton-Euler method, Kane method, and Houston method [40]. These modelling methods are cumbersome and require large computational workloads, which are not suitable for the application requirements of the dynamic model in this paper. Aiming at the manipulator, this paper adopts the equivalent finite element method. The core idea of this method is to replace the real components in the system with equivalent units, and the equivalent system consisting of equivalent units replaces the actual heavy-duty robot system. As shown in Figure 4, the assumed modal method is adopted. The point O at any position on the boom is the pedestal point of the manipulator, and the seven local coordinate systems formed by the ideally constrained mass points \(\mathrm{O_{1},\ O_{2},\ O_{3},\ O_{4},\ O_{5},\ O_{6},\ O_{7}}\) constitute the generalized coordinate. \(\eta=[\theta_{1},\ \theta_{2},\ \theta_{3},\ \theta_{4},\ \theta_{5}]^{T}\) is the generalized coordinate vector. \(\dot{\eta}\) is the generalized velocity vector, and \(l_{1},\ l_{2},\ l_{3},\ l_{4},\ l_{5},\ l_{6},\ l_{7}\) are the length of each joint. The manipulator can be viewed as Euler-Bemoulli beam [41]. Then the expression of Lagrange equation for the dynamic equation is:  
\[\frac{\mathrm{d}}{\mathrm{dt}}\left(\frac{\partial(T-U)}{\partial\dot{q}} \right)-\frac{\partial(T-U)}{\partial q}=Q, \tag{5}\]  
where, \(T\) is the kinetic energy of the manipulator joints, \(U\) is the potential energy of the manipulator joints, \(Q\) is the generalized force, \(q\) is the generalized coordinate vector, and \(\dot{q}\) is generalized coordinate velocity vector. The kinetic energy of the manipulator joints \(T\) can be expressed as follows:  
\[T=\frac{1}{2}\int\rho v^{\tau}vdl=\frac{1}{2}\dot{q}^{T}M(q)\dot{q} \tag{6}\]  
where, \(\rho\) is the density of joints, \(v\) is the speed of any point on the joint, \(l\) is the length of the corresponding joint, and \(M(q)\) is the mass matrix of manipulator. The potential energy of the manipulator joint includes the gravitational potential energy and the elastic potential energy generated by deformation:  
\[U=U_{I}+U_{\Pi}=U_{I}+\frac{1}{2}\sum_{i=1}^{7}E_{i}l_{i}\int\frac{\partial^{ 2}\varphi_{i}}{\partial x^{2}}dx=U_{I}+\frac{1}{2}q^{T}Kq, \tag{7}\]  
Figure 4: The 7-DOF manipulator coordinate diagram. where, \(U_{I}\) is the joints' gravitational potential energy, \(U_{II}\) is the joints' elastic potential energy, \(E_{i}\) is the elastic modulus of the corresponding joint, \(I_{i}\) is the moment of inertia of the joint to the \(z\)-axis, and \(\varphi_{i}\) is the elastic deformation of the corresponding joint. Substituting Equations (6) and (7) into the Lagrange equation:  
\[M\ddot{\eta}+\dot{M}\dot{\eta}-\frac{1}{2}\bigg{(}\frac{\partial M}{\partial \eta}\bigg{)}^{\mathrm{T}}\dot{\eta}+K\eta+\frac{\partial M}{\partial\eta}=Q_{x} \tag{8}\]  
where, \(Q_{x}\) is the generalized coordinate force. Then, the manipulator dynamic equation can be described as:  
\[\left\{ \begin{array}{l}m_{\theta\theta}\ddot{\theta}+m_{\theta\theta}\ddot{ \eta}+\
u_{\theta\theta}\dot{\theta}^{2}+D_{q}\dot{\theta}=Q_{\theta}\\ m_{qq}\ddot{\eta}+m_{\theta q}^{T}\ddot{\theta}+\
u_{q\theta}\dot{\theta}^{2}+K _{qq}q=Q_{q}\end{array} \right. \tag{9}\]  
where, \(m_{\theta\theta}\), \(m_{\theta q}\) and \(m_{qq}\) make up the mass matrix \(M\), \(K_{qq}\) is the stiffness matrix. \(D\) and \(v\) are the first-order and second-order coefficient matrices of speed.