# Phase Plane Trajectory Planning for Double Pendulum Crane Anti-Sway Control
## 3 Trajectory Planning  
The acceleration trajectory of the trolley is shown in Figure 2. Under the following acceleration amplitude and acceleration time, the swing trajectory of the load is approximately as shown in Figure 3.  
The trolley has three motion states: acceleration, uniform speed and deceleration. The motion process of the trolley is as follows: 1. In the \(\widehat{OA}\) segment, the trolley starts from rest and begins to accelerate with an acceleration of magnitude \(a_{1}\) for a time \(t_{1}\). During this process, the load begins to swing periodically. 2. In the \(\widehat{ABC}\) segment, the trolley continues to move forward at a uniform speed for a time \(t_{2}-t_{1}\). During this period, the load will reach the maximum swing angle. In the \(\widehat{CO}\) segment, the trolley accelerates again with an acceleration of magnitude \(a_{1}\) for a time \(t_{3}-t_{2}\). At the end of the acceleration, the swing angle of the load is zero, and the uniform speed travels for a time \(t_{4}-t_{3}\). 3. The trolley decelerates with an acceleration in the opposite direction of magnitude \(a_{1}\) for a time \(t_{5}-t_{4}\). During this process, the load swings again. 4. The trolley moves at a uniform speed again for a time \(t_{6}-t_{5}\). During this period, there is still a maximum swing angle. Then, it accelerates with an acceleration of magnitude \(a_{1}\) for a time \(t_{7}-t_{6}\). Finally, it arrives at the destination with a swing angle of zero. The control strategy is to control the trolley to perform a complete cycle of acceleration, uniform speed and deceleration, so that the swing angle of the load is kept as small as possible during the movement and it reaches a zero-vibration state at the final speed. The values of acceleration at different times are as follows:  
\[\tilde{x}(t)=\left\{ \begin{array}{l}a_{1},0\leq t<t_{1}\\ a_{1},t_{2}\leq t<t_{3}\\ -a_{1},t_{4}\leq t<t_{5}\\ -a_{1},t_{6}\leq t<t_{7}\\ 0,\textit{else}\end{array} \right. \tag{17}\]  
Figure 3: Two-step acceleration phase plane trajectory. For the \(\widehat{OA}\) segment, the acceleration magnitude is \(a_{1}\), and the acceleration time is \(t_{a}\). Substituting into Equation (15), results in:  
\[\ddot{\theta}_{11}(t)+{w_{n}}^{2}\theta_{11}(t)=\frac{{w_{n}}^{2}}{g}a_{1} \tag{18}\]  
Solving the differential Equation (18):  
\[\theta_{11}(t)=C_{1}\cos(w_{n}t)+C_{2}\sin(w_{n}t)-C_{3}\frac{{w_{n}}^{2}}{g} \tag{19}\]  
Substituting the initial value into Formula (19), we obtain:  
\[C_{1}=\frac{a_{1}}{g},\;C_{2}=0,\;C_{3}=\frac{a_{1}}{{w_{n}}^{2}}\]  
Therefore, the solution to the differential equation is:  
\[\theta_{11}(t)=\frac{a_{1}}{g}\cos(w_{n}t)-\frac{a_{1}}{g} \tag{20}\]  
Taking the first-order derivative of Equation (20) with respect to time, we achieve:  
\[\dot{\theta}_{11}(t)=-\frac{a_{1}}{g}w_{n}\sin(w_{n}t) \tag{21}\]  
Divide \(w_{n}\) on both sides of Equation (21) to obtain:  
\[\varphi_{1}(t)=\frac{\dot{\theta}_{11}(t)}{w_{n}}=-\frac{a_{1}}{g}\sin(w_{n}t) \tag{22}\]  
Equations (20) and (22) result in:  
\[(\theta_{11}(t)+\frac{a_{1}}{g})^{2}+{\varphi_{1}}^{2}(t)=\frac{a_{1}}{g^{2}} \tag{23}\]  
From the first acceleration trajectory equation, the coordinates of point A can be obtained:  
\[(\frac{a_{1}}{g}\cos(w_{n}t_{1})-\frac{a_{1}}{g},-\frac{a_{1}}{g}\sin(w_{n}t_ {1})) \tag{24}\]  
From this relationship, we obtain:  
\[\tan\alpha_{1}=\frac{\sin(w_{n}t_{1})}{1-\cos(w_{n}t_{1})} \tag{25}\]  
The acceleration time \(t_{1}\) corresponding to the \(\widehat{OA}\) segment is calculated as follows:  
\[\ddot{\theta}_{11}(t)+{w_{n}}^{2}\theta_{11}(t)=\frac{{w_{n}}^{2}}{g}a_{1} \tag{18}\]0  
For segment \(\widehat{ABC}\), when the trajectory reaches point A, the first segment of the trajectory with the trolley acceleration \(a_{1}\) ends, and then the trolley starts to move at a constant speed.