# Phase Plane Trajectory Planning for Double Pendulum Crane Anti-Sway Control
## 2 Mathematical Modeling  
The crane model consists of a trolley, rope, hook and load. The two-dimensional schematic diagram of the fixed rope length double pendulum model is shown in Figure 1. Among them, \(M\) is the mass of the trolley, \(m_{1}\) is the mass of the hook, \(m_{2}\) is the mass of the load, \(x\) is the displacement of the trolley, \(l_{1}\) is the length of the rope connecting the trolley and the hook, \(l_{2}\) is the length of the rope connecting the hook and the load, \(\theta_{1}(t)\) and \(\theta_{2}(t)\) are the hook swing angle and the load swing angle, and the driving force of the trolley is \(F_{x}\).  
When lifting is not considered, the rope lengths \(l_{1}\) and \(l_{2}\) are considered constant. Assume that the motion trajectory of the crane is only considered on  
Figure 1: Crane dynamics model.  
The corresponding system kinematic Equations (8) and (9) can be rewritten as:  
\[\ddot{x}+l_{1}\ddot{\theta}_{1}+\frac{m_{2}l_{2}}{m_{1}+m_{2}}\ddot{\theta}_{2}+g \theta_{1}=0 \tag{10}\]  
\[\ddot{x}+l_{1}\ddot{\theta}_{1}+l_{2}\ddot{\theta}_{2}+g\theta_{2}=0 \tag{11}\]  
Since the difference between the two angles is small [18; 19], the approximate equivalent method is to set \(\theta_{1}\simeq\theta_{2}\) and substitute it into Equation (10) to obtain:  
\[\ddot{x}+l_{1}\ddot{\theta}_{1}+\frac{m_{2}l_{2}}{m_{1}+m_{2}}\ddot{\theta}_{ 1}+g\theta_{1}=0 \tag{12}\]  
Simplify Equation (12):  
\[\ddot{\theta}(t)+\frac{(m_{1}+m_{2})g}{m_{1}l_{1}+m_{2}(l_{1}+l_{2})}\theta(t )=-a_{c}\frac{(m_{1}+m_{2})}{m_{1}l_{1}+m_{2}(l_{1}+l_{2})}\]  
where \(w_{n}=\sqrt{\frac{(m_{1}+m_{2})g}{m_{1}l_{1}+m_{2}(l_{1}+l_{2})}}\), \(\frac{(m_{1}+m_{2})}{m_{1}l_{1}+m_{2}(l_{1}+l_{2})}=\frac{{w_{n}}^{2}}{g}\) and \(a_{c}=\ddot{x}\) is the acceleration of the trolley.  
Achieveing:  
\[\ddot{\theta}(t)+{w_{n}}^{2}\theta(t)=-\frac{{w_{n}}^{2}}{g}a_{c} \tag{13}\]  
The hook mass \(m_{2}\) is taken into account in \(w_{n}\), which avoids the problem that the simple pendulum model cannot accurately describe the real dynamic model of the actual system, making the oscillation frequency of the system more accurate.  
According to the system's performance index constraints and phase plane trajectory constraints, in order to keep the oscillation stable within a certain range, there are the following constraints:  
Constraint 1: The displacement target of the trolley within the running time \(t_{d}\) is \(x_{d}\):  
\[x(t)=x_{d},\ t\leq t_{d} \tag{14}\]  
Constraint 2: During the movement of the trolley, speed and acceleration should satisfy:  
\[\big{|}\dot{x}(t)\big{|}\leq v_{\max},\ \big{|}\ddot{x}(t)\big{|}\leq a_{ \max} \tag{15}\]  
Constraint 3: The maximum load swing amplitude should be kept within the specified range, that is:  
\[\big{|}\theta(t)_{1,2}\big{|}\leq\theta_{1,2\max} \tag{16}\]  
According to the above constraints, the amplitude of the trolley's acceleration and the running time of each acceleration (deceleration) can be calculated. By setting different constraint ranges, different acceleration amplitudes and acceleration times can be obtained, so that during the movement of the trolley, the displacement, speed and the swing angle between the rope and the trolley can be kept within the constraint range and eventually tend to zero.