## 2 Dynamic Model
### Equation of Motion and Simulation Algorithm
Then, the equation of motion (5) becomes  
\[\mathbf{M}\ddot{\mathbf{x}}+\dot{\mathbf{C}}\dot{\mathbf{x}}+\mathbf{K} \mathbf{x}=\mathbf{\overline{f}} \tag{6}\]  
where \(\mathbf{K}_{\theta i}=\mathbf{\overline{\theta}}_{i}\mathbf{K}_{n\;+\;i}, \mathbf{\overline{\theta}}_{i}\) is the angular displacement \(\theta_{i}\) of component \(l_{i}\) at this instant, \(\mathbf{K}_{n+i}\) is a column vector formed by the \((n+i)\)-th column of \(\mathbf{K}\). The second step is deleting the \((n+i)\)-th row of Equation (6) and the \((n+i)\)-th column of matrixes \(\mathbf{M}\), \(\mathbf{C}\), and \(\mathbf{K}\). The resulting equation becomes the equation of motion when components \(l_{i}\)\((i=1,\,3,\,4,\,6)\) are held  
\[\mathbf{\hat{M}}\ddot{\mathbf{x}}+\dot{\mathbf{C}}\dot{\mathbf{x}}+\mathbf{ \hat{K}}\mathbf{x}=\mathbf{\hat{f}} \tag{7}\]  
Just for the reasons mentioned above, the braking process consists of a set of these sub-processes governed by the different equations for the two motion states of component \(l_{i}(i=1,\,3,\,4,\,6)\). Meanwhile, in order to switch correctly between these sub-processes, the motion states of component \(l_{i}\)\((i=1,\,3,\,4,\,6)\) have to be checked in every step in the numerical integration. This process is explained as follows:  
1. When component \(l_{i}\) is in the rotation state initially, \(\dot{\theta}_{i}(i=1,\,3,\,4,\,6)\) needs to be checked at the end of each step of the numerical integration. If \(\left|\dot{\theta}_{i}\right|>0\), then \(J_{i}\)\((i=1,\,3,\,4,\,6)\) is still in the rotation state; once \(\left|\dot{\theta}_{i}\right|=0\), \(\left|T_{j_{i}}\right|-M_{\mathrm{bs}i}\) must be calculated (\(T_{j_{i}}\) is an algebraic sum of all torques acting on component \(l_{i}\) except braking torque \(M_{\mathrm{bs}i}\)). If \(\left|T_{j_{i}}\right|-M_{\mathrm{bs}i}\leq 0\), component \(l_{i}\) starts to go into the non-rotation state; otherwise, component \(l_{i}\) will continue to rotate after this time instant when the direction of rotation of component \(l_{i}\) changes. 2. When component \(l_{i}\) is in the non-rotation state initially, \(\left|T_{j_{i}}\right|-M_{\mathrm{bs}i}\) needs to be calculated at the end of each step of the numerical integration. Once \(\left|T_{j_{i}}\right|-M_{\mathrm{bs}i}=0\) and \(\mathrm{d}[T_{j_{i}}\left|/\mathrm{d}t>0\right.\), component \(l_{i}\) will start to go into the rotation state. Otherwise, component \(l_{i}\) will still be in the non-rotation state. Moreover, if there are no mechanical brakes assembled on components \(J_{1}\) and/or \(J_{\mathrm{\theta}}\), the \((n+1)\)-th and/or \((n+6)\)-th row of Equation (5), and the \((n+1)\)-th and/or \((n+6)\)-th column of matrixes \(\mathbf{M}\), \(\mathbf{C}\) and \(\mathbf{K}\) should be deleted, and \(k_{\mathrm{i}}\) (\(i=1\) and/or \(5\)) in \(\mathbf{K}_{\mathrm{L}}\) and \(\mathbf{C}\) should be set to zero. In short, the equation of motion describing braking process of the lifting mechanism of the overhead travelling crane is nonlinear. Because Coulomb friction is adopted, the equation of motion is non-smooth as well. Additionally, damping and stiffness matrices of the motion equation vary with time, therefore the simulation of the braking process is quite complicated. Matlab programs are coded to implement all the calculations. The flow chart of the simulation algorithm of the braking process of lifting mechanism in which service brakes are assembled on component 4 and 6 only is given in Figure 4. In Figure 4, \([t_{0},t_{\text{end}}]\) is the integral interval of the equation of motion. \(\mathbf{x}_{0}\) and \(\dot{\mathbf{x}}_{0}\) is the initial value, \(\mathbf{y}_{0}=\left[\mathbf{x}_{0},\dot{\mathbf{x}}_{0}\right]\). \(t\) and \(\mathbf{y}\) are the time instantaneous value at the end of each integration process and the corresponding solution of the equation respectively, \(\mathbf{y}=\left[\mathbf{x}(t),\dot{\mathbf{x}}(t)\right]\). Case \(i\) (\(i=1,2,3,4\)) is a variable used for representing the motion state of component \(J_{4}\) and \(J_{6}\).