1. Introduction
As typical underactuated mechanical pieces of equipment, cranes are widely used in the fields of construction, ships, ports, etc. Due to their structural characteristics and operating conditions [
1], cranes are very prone to swaying during operation. Suppressing this swaying phenomenon is the key to improving the efficiency and safety of cranes [
2,
3]. Therefore, it is necessary to design an efficient anti-sway control method [
4].
On the two-dimensional physical modeling of cranes, the single pendulum model and the double pendulum model are adopted widely. Some scholars choose to ignore the mass of the hook and simplify the crane into a single pendulum model for analysis [
5,
6]. However, although this simplification reduces the complexity of the model, it fails to fully capture the dynamic behavior of the system. The crane system will exhibit double pendulum characteristics during operation. This model takes into account more dynamic interactions and system complexity, especially the impact of the hook mass on the overall system. The model that includes the hook mass can more accurately reflect the dynamic characteristics of the crane system.
In the field of single pendulum model anti-sway control, Zhang et al. [
7] proposed a fuzzy sliding mode controller, which integrated the trolley displacement and load swing angle into the same sliding mode surface, introduced fuzzy rules to adjust the control quantity, and ensured that the system state was always on the sliding mode surface. Xue et al. [
8] introduced a composite signal to enhance the coupling relationship between the driving variable and the underactuated variable. The stability analysis was based on the original nonlinear model of the system, rather than the linearized model, to ensure the accuracy of the system analysis. Miranda et al. [
9] proposed a method to achieve more accurate system control by coupling the trolley displacement coordinates with the effective load swing angle coordinates. In addition, the method combined the S-curve based trajectory planning technology to smooth the motion path and reduce the oscillation effect of the system. Zhang et al. [
10] designed a predictive control method, which used the introduced constraint method to determine that the output constraint of the underactuated system was limited to a preset range. However, the high computational complexity of model predictive control makes it difficult to apply in practice. Shi et al. [
11] proposed a nonlinear coupling tracking anti-sway controller. A composite signal was constructed to suppress the swing angle of the system, and a suitable switching function was established to solve the chattering problem existing in the sliding mode control system. A fuzzy controller was designed to improve the positioning accuracy of the system. Zhang et al. [
12] proposed a PD-SMC hybrid controller. The PD part is used to stabilize the controlled system and the SMC part has strong robustness to external disturbances, parameters and unmodeled uncertainties. In order to improve the control performance of anti-sway, Lu et al. [
13] added more swing information to the control input and designed an adaptive law to accurately identify the load mass online, further improving the robustness of the method. The open-loop anti-sway control method is very popular. Among them, the input shaping controller has a simple structure. This technology uses a series of specific pulse signals to convolve with a unique input signal to obtain the final synthetic input signal for control. Alhazza [
14] proposed an adjustable maneuvering waveform command shaper. The initial parameter approximation is taken, and the shaper parameters are optimized using a genetic algorithm to determine the optimal acceleration parameters. The proposed command shaper can effectively eliminate the residual vibration of a single continuous waveform command. Yang et al. [
15] proposed a parameter tuning algorithm for a multivariable PID controller based on generalized predictive control (GPC). The designed multivariable PID controller has the same structural mathematical expression as the GPC law, making the transfer and calculation of the three parameters P, I, and D simpler.
The above studies assume that the mass of the hook can be ignored, but in actual applications, the mass of the hook cannot be simply ignored. In this case, the system will produce a double pendulum effect; therefore, the control performance of the control algorithm based on the single-stage swing assumption will be greatly reduced [
16]. In response to the anti-sway control problem of the double pendulum model of the crane, several innovative solutions have been proposed. Arabasi et al. [
17] proposed a frequency-modulation (FM) input-shaping strategy for a double pendulum crane. FM technology uses model-based feedback and partial feedback linearization. FM system parameters are time-independent and do not need to change when the system frequency changes. Ouyang [
18] proposed a composite trajectory planning method for a double pendulum bridge crane without advance or offline planning. This method keeps the load swing angle within the constraint range by adjusting the gain of the damping term. However, the above two methods [
17,
18] both have residual oscillations of different magnitudes. Wang et al. [
19] proposed a variable parameter time-varying sliding mode control (VP-TVSMC) method, designed time-varying parameters, realized dynamic adjustment of sliding surface, and enhanced the adjustment ability of sliding surface.
The existing anti-sway control strategies [
17,
18,
19] generally adopt the “trajectory-velocity” cascade control framework: first plan the displacement trajectory of the trolley, and then indirectly suppress the load swing by adjusting the trolley acceleration/velocity. Although this method can achieve basic anti-sway effects, its essence is to passively weaken the swing angle through kinematic constraints, and there are core limitations: the swing angle control depends on the indirect transmission of the trolley motion, and the dynamic response has a lag. In response to the above problems, this paper proposes an innovative control of “active swing angle planning-inverse solution of trolley motion”, taking the swing angle as the direct planning object and establishing an explicit mapping relationship with the trolley displacement and acceleration to achieve a fundamental reconstruction of anti-sway control.
Specific innovations include constructing the coordinated trajectory of the load swing angle in the phase plane, suppressing high-order oscillation modes through input shaping technology, and ensuring that the double pendulum angle is controlled throughout the process. In view of the under-actuated problem that the double pendulum system cannot independently plan the double pendulum angle, the parameter approximate equivalence hypothesis is proposed, and the trajectory is solved after the double pendulum dynamics is approximately simplified, which significantly reduces the planning complexity. The acceleration trajectory obtained by phase plane trajectory planning is substituted into the original double pendulum nonlinear model, abandoning the traditional linearization/order reduction simplification operation and retaining the complete dynamic characteristics.
The remainder of this paper is organized as follows.
Section 2 discusses the modeling of the crane double pendulum system.
Section 3 performs phase plane trajectory planning for the trolley and the load.
Section 4 performs numerical simulations to verify the proposed method.
Section 5 performs physical experiments to verify the proposed method.
Section 6 provides some conclusions.
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,
is the mass of the trolley,
is the mass of the hook,
is the mass of the load,
is the displacement of the trolley,
is the length of the rope connecting the trolley and the hook,
is the length of the rope connecting the hook and the load,
and
are the hook swing angle and the load swing angle, and the driving force of the trolley is
.
When lifting is not considered, the rope lengths
and
are considered constant. Assume that the motion trajectory of the crane is only considered on the
plane. First, the kinetic energy and potential energy of the system are obtained through Lagrangian kinematic analysis:
where
T and
V represent the kinetic energy and potential energy of the crane system, respectively, then the Lagrangian function is defined as
L =
T −
V:
The following Lagrange equation is used to calculate the dynamic model of the crane system:
Further solving the three formulas in (4) above, achieving:
Dividing both sides of (6) and (7) by
and
, respectively, achieves:
It can be seen from Equations (8) and (9) that the input of the system is less than the degree of freedom of the system; therefore, the system is an underactuated double pendulum system. Due to the existence of two swing angles, the state of the crane system is more complicated than that of the single pendulum system. The underactuated characteristics of the crane make it impossible to directly plan and , and there is a nonlinear relationship between the two angles, making it impossible to directly derive the exact relationship between them.
The load swing angle of a crane during actual operation is generally within plus or minus 10 degrees [
20]. Therefore, this paper makes the following simplifications:
The corresponding system kinematic Equations (8) and (9) can be rewritten as:
Since the difference between the two angles is small [
18,
19], the approximate equivalent method is to set
and substitute it into Equation (10) to obtain:
Simplify Equation (12):
where
,
and
is the acceleration of the trolley.
The hook mass is taken into account in , 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
is
:
Constraint 2: During the movement of the trolley, speed and acceleration should satisfy:
Constraint 3: The maximum load swing amplitude should be kept within the specified range, that is:
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.
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 segment, the trolley starts from rest and begins to accelerate with an acceleration of magnitude for a time . During this process, the load begins to swing periodically. 2. In the segment, the trolley continues to move forward at a uniform speed for a time . During this period, the load will reach the maximum swing angle. In the segment, the trolley accelerates again with an acceleration of magnitude for a time . At the end of the acceleration, the swing angle of the load is zero, and the uniform speed travels for a time . 3. The trolley decelerates with an acceleration in the opposite direction of magnitude for a time . During this process, the load swings again. 4. The trolley moves at a uniform speed again for a time . During this period, there is still a maximum swing angle. Then, it accelerates with an acceleration of magnitude for a time . 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:
For the
segment, the acceleration magnitude is
, and the acceleration time is
. Substituting into Equation (15), results in:
Solving the differential Equation (18):
Substituting the initial value into Formula (19), we obtain:
Therefore, the solution to the differential equation is:
Taking the first-order derivative of Equation (20) with respect to time, we achieve:
Divide
on both sides of Equation (21) to obtain:
Equations (20) and (22) result in:
From the first acceleration trajectory equation, the coordinates of point A can be obtained:
From this relationship, we obtain:
The acceleration time
corresponding to the
segment is calculated as follows:
For segment
, when the trajectory reaches point A, the first segment of the trajectory with the trolley acceleration
ends, and then the trolley starts to move at a constant speed. At this time, the acceleration remains
, and Equation (13) becomes:
Solving the differential Equation (27), we obtain:
From the initial conditions:
Substituting the initial conditions into Equation (28):
Therefore, Equation (28) is obtained as:
Taking the first-order derivative of Equation (29) with respect to time, achieves:
Divide
on both sides of Equation (30) to obtain:
Equations (29) and (31) obtain:
The angle
corresponding to the
segment is calculated as follows:
Arriving at point C, the second section of the uniform velocity trajectory ends. The load trajectory is
, which is a part of a circle with (0, 0) as the center and
as the radius. The third section is the second acceleration process of the load. The trajectory is symmetrical with the first stage. The acceleration amplitude of this process is the same as that of the first section. This stage is the same as the first stage, and the deceleration stage is similar to the acceleration process.
The acceleration amplitude and switching time are calculated by the system condition constraints. According to the kinematic equation, the speed and displacement of each section of the trolley are calculated as follows:
After integrating Equation (34) once over time, the target
is obtained as:
The maximum speed of the trolley during the whole process is:
From the phase plane trajectory, it can be seen that the maximum swing angle corresponding to the load in the phase plane is:
From the phase plane trajectory, we can see that at point A, the trolley has the same speed before and after switching acceleration, and the loads at points A and C have the same swing angle, obtaining:
From Equations (24), (25) and (33)–(38), the acceleration amplitude and acceleration switching time of the trolley can be calculated.
4. Simulation Verification
This section verifies the effectiveness of the proposed method through simulation. The numerical simulation process is divided into two groups. In the first group, the proposed method is compared under different constraints, including simulation comparisons under different maximum constraint swing angles and different maximum constraint speeds. In the second group, the proposed method is compared with the sliding mode method [
19] and the nonlinear coupling tracking controller (NCTR) [
16]. For the simulation of the crane system, accurate setting of various parameters is crucial to ensure the reliability and effectiveness of the simulation. The following are the specific parameters required for the crane system simulation: rope length
is
, the distance between the hook and the load
is
, the hook mass
is
, the load mass
is
, the trolley target distance
is
, the load maximum swing angle constraints are 2°, 3°, and 4°, and the trolley maximum speed constraints are
,
and
.
According to the constraints, a series of corresponding solutions are obtained as shown in
Table 1, and the simulation results are shown in
Figure 4,
Figure 5 and
Figure 6, respectively.
It can be seen from simulation
Figure 4,
Figure 5 and
Figure 6 that when the trolley travels the same displacement, when the swing angle constraint and the maximum speed of the trolley increase, the acceleration amplitude also increases, and the shorter the uniform speed time of the trolley, the shorter the total running time of the trolley. The swing angle of the load is controlled within the constrained swing angle range, the phase plane trajectory of the load swing angle is in line with expectations, and the load swing angle eventually reaches a relatively stable state. There is no residual vibration of the load when the trolley stops.
From (10) and (11), we obtain:
To show the reliability of the method, the following system model verification is carried out. The approximate acceleration is substituted into the original model simulation to obtain the images of the hook and load swing angles and .
The simulation results of this method are compared with those of VP-TVSMC and NCTR.
The displacement image of the trolley is shown in
Figure 7. It can be seen from the figure that within the time range of 0–20 s, the displacement growth rate of the black line (Proposed method) is the fastest (about 7 s to reach 4 m), and there is no oscillation in the later period. Compared with VP-TVSMC and NCTR, it can achieve the target displacement more quickly and stably, showing higher control efficiency.
According to the comparison of hook and load swing angles of the three methods in
Figure 8, the black line (proposed method) shows significant advantages within 0–15 s: its swing angle fluctuation amplitude is the smallest and the convergence speed is the fastest (basically tending to balance after about 7 s), while the blue line (VP-TVSMC) and the light blue line (NCTR) basically tend to balance after about 13 s. The blue line has a larger swing angle amplitude (up to 4°) and a longer oscillation duration. The black line effectively suppresses the load swing through a better control strategy and is superior to the other two methods in terms of dynamic response speed and steady-state accuracy.
5. Experimental Verification
The proposed control method has good control performance in simulation. The proposed method is verified on the mobile lifting gantry crane anti-sway control experimental platform. The platform size is 3 m × 4 m, and it consists of an industrial computer, a PLC (Siemens S-71200), a frequency converter (Invt Goodrivr350-19) and a trolley drive mechanism. The industrial computer uses the Windows 10 operating system and uses the Modbus TCP protocol to communicate with the PLC through the host computer program. The position of the trolley is measured using laser ranging. The laser ranging (OD Series) has a measurement range of 0–4 m and an accuracy of ±1 mm. The swing angle detection system uses two cameras (Lumenera’s Lt225) to measure the swing angle, with a frame rate of 50 frames per second and an accuracy of ±0.05°. The crane experimental system is shown in
Figure 9. Under the premise of keeping the crane system parameters unchanged, the actual control effect of the proposed control method is verified experimentally and compared with the simulation results.
The target displacement of the trolley is 1.5 m, and rope length l1 is 1 m, l2 is 0.5 m. The hook mass m1 is 10 kg and the load mass m2 is 20 kg.
The comparison results between the experiment and the simulation are shown in
Figure 10 and
Figure 11. The experimental results show that the actual time for the trolley to reach the target position is consistent with the simulation, and the actual maximum hook swing angle and load swing angle are both within the constraint range. Due to the inevitable external interference and hardware conditions in the experiment, the experimental curve will have slight fluctuations but the overall trend of the experimental curve is consistent with the simulation curve. Therefore, the proposed control method still achieves good control performance in the physical experiment.
In order to show the robustness of this method to the influence of mass factors, the figure shows the swing of the hook and the load with a load mass of 20 kg and 40 kg, respectively. As can be seen from the figure below, the controller scheme is not greatly affected by mass changes and has strong robustness.
Figure 12 shows the comparison between the anti-sway control simulation and the experiment for loads of different masses. The results showed that the change in load mass has little effect on the dynamic response trend of the swing angle, and the swing angle attenuation law under different masses is consistent. Specifically, despite the significant difference in load mass (from 20 kg to 40 kg), the proposed control method can still effectively suppress the load swing, and the swing angle peak value and steady-state time do not show obvious fluctuations, showing that the control strategy has strong robustness to changes in mass parameters. This result indirectly verifies the control model’s adaptability to the load and provides a theoretical basis for anti-sway control in quality uncertain scenarios in actual engineering.
6. Conclusions
This paper proposes an input shaping double pendulum anti-sway control method based on phase plane trajectory planning. This method derives the acceleration switching time and amplitude by analyzing the phase plane swing angle and the physical constraints of the system, ensuring that the displacement, speed, hook and load swing angles of the trolley are kept within the constraints. In addition, considering that the oscillation frequency of the actual system is affected by multiple parameters such as hook mass, load mass and rope length, the model introducing these parameters can more accurately describe the dynamic behavior of the crane system and improve the accuracy and reliability of system modeling. The proposed control method is compared with the sliding mode controller. The numerical simulation results show that the proposed method not only achieves a trolley displacement trajectory without overshoot but also significantly reduces the load swing angle and maintains a stable swing angle for a longer time during the movement. In addition, numerical simulation and physical experimental verification also indicate that the experimental curve is highly consistent with the simulation curve, further showing the reliability and effectiveness of the control method. Although this study mainly focuses on the two-dimensional physical model of the crane, the results of the numerical simulation and the physical experiments both show the good performance of this method. Future research will be further extended to three-dimensional physical models to further improve the applicability and control accuracy of this method.
Wiseman [
21] introduces a system combining a laser radar rangefinder and an ultrasonic rangefinder used in autonomous vehicles, which can help overcome the obstacles of the traumatic laser radar system and have better target detection capabilities. In the future, it can be considered to be applied to the problem of measuring the distance of trolley. First, an ultrasonic sensor matching the working conditions is selected and installed side by side with the laser sensor to cover the target area; secondly, the controller interface is expanded and the ultrasonic drive circuit is integrated, and then the ranging code is written and the laser and ultrasonic data are integrated. Finally, the accuracy is verified through static calibration and dynamic testing so as to achieve dual sensor complementarity and improve the measurement reliability and anti-interference ability in complex environments.
Some shortcomings of this method and suggestions for improvement are that at the current stage, this research method is mainly applicable to controlled environments with weak or no interference. Subsequent research plans will focus on the development of dynamic disturbance suppression strategies, with an emphasis on breakthroughs in modeling and compensation techniques for typical external disturbance sources such as wind-induced interference in order to achieve enhanced robustness in complex open environments. The trajectory planning scheme used in this paper relies on offline calculations to obtain the optimal parameters. Therefore, when the crane faces different work requirements (such as changing the cargo handling distance or transportation time), the parameters need to be recalculated, which is time-consuming and reduces production efficiency. In order to improve the flexibility and response speed of the system, future research can focus on the online trajectory planning problem of the crane. The crane model in this study only considers the two-dimensional anti-sway problem and has not yet covered the scenario of three-dimensional anti-sway. In order to improve the integrity of the system and the breadth of practical applications, future related research should consider incorporating three-dimensional anti-sway problems into the analysis.