Research on Swing Model and Fuzzy Anti Swing Control Technology of Bridge Crane

: A bridge crane is often used in a complex environment and is often subject to the interference of all loads. Some uncertain factors often have an inevitable impact on its swing. So the force situation of the bridge crane during a working cycle is analyzed, and a three-dimensional dynamic mathematical model of the bridge crane is built. Through the simulation analysis of the model under the action of a driving force and wind load, the change law of the swing angle of the bridge crane is studied. Then, the fuzzy control theory is used to determine the control parameter in the anti-sway control process. The position, swing angle deviation, and deviation rate of the bridge crane are taken as the input, and the parameter correction is obtained after the fuzziﬁcation by using the center of gravity method. The anti-sway fuzzy control system of the bridge crane is designed and simulated. The research results show that the swing model of the crane is reasonable and the fuzzy PID anti-sway controller can not only improve the adaptability of the control system, but also overcome the large overshoot, quickly restrain the swing, and effectively realize the anti-sway function of the bridge crane.


Introduction
As one of the most important equipment in the field of equipment manufacturing, bridge cranes are widely used in shipyards, construction sites, steel mills, warehouses, nuclear power plants, waste storage facilities, and other industrial complexes.With the changes in the operating environment and operating requirements, the requirements for precise positioning and anti-sway cranes are getting higher and higher.Suppressing the swing of the crane can effectively improve its work efficiency, better promote the process of industrial automation, and ensure the safe operation of industrial systems.
An important reason for the swing of the bridge crane in the working process is the acceleration and deceleration movement of the large and small trolley operating mechanisms and the main and auxiliary lifting mechanisms during the work process.This reason determines the three directions of crane anti-sway research: manual anti-sway, mechanical anti-sway, and electrical anti-sway [1], with the continuous development of control technology, the current mainstream anti-sway control strategy is electrically controlled anti-sway [2].
Zhang M [3] proposed a dual-swing, boom-bridge crane-control system based on energy coupling with initial control force constraints.In order to get closer to the real operating situation, to ensure the smooth start of the crane, and reduce the initial control force, a nonlinear trolley-sliding rail friction dynamics model, based on the hyperbolic tangent function, was constructed and the dynamics simulation was carried out.This method has obvious advantages in transient performance and anti-sway effect, and there is almost no residual swing when the trolley stops, but this method relies on real-time acquisition of the crane system parameters, therefore, it is practicality poor.
In 2018, Ramli L and Mohamed Z [4] proposed an improved input shaping method based on particle swarm optimization training artificial neural networks, designed a realtime unit-level zero-vibration shaper, and exercised it on an anti-sway experimental crane in the laboratory.The experiments proved that the overall and residual swing response of the methods were reduced, respectively, by 38.9% and 91.3% compared with the use of another shaper (designed with average operating frequency) and a robust shaper (zero vibration derivative shaper (ZVDD)), thus it proved the superiority of the method.
In 2020, Ramli L and Mohamed Z [4] proposed a new swing control method for underdriven bridge cranes where load lifting and external interference exist simultaneously.In the method, a shaper based on prediction units and adaptive feedback control was used to effectively suppress the swing of the payload.Through experimental analysis, the developed controller had higher robustness under all test conditions, and its overall and remaining swing responses were significantly reduced by at least 45% and 69%, respectively.This method can be applied to design various crane anti-sway controllers when lifting by disturbance.
Many scholars have also achieved corresponding results in the research on the construction of the anti-sway control mathematical model of bridge cranes.Reference [5] studied the swing phenomenon of the hoisting weight during the hoisting process, the system was simplified into a double pendulum vibration model, the Lagrangian equation of the system was established by the method of analytical mechanics, and the differential equation of the system was obtained, and the vibration of the lifting weight was eliminated through feedback control.In reference [6], the volume of the load and spreader was considered, the dynamic model of the double pendulum crane, considering the distributed mass beam, was established, and four versions of the layered sliding mode control method were designed.For the first time, a hierarchical linear sliding mode control method based on velocity control (VLSMC) and displacement control (DLSMC) was designed, and the feasibility and effectiveness of this method in solving the double pendulum problem of the bridge lift are verified through simulation and experiment [7].
For the research on the mathematical model of crane anti-sway, scholars regard the entire bridge structure as a rigid body and regard the initial load swing angle as zero degrees.In fact, due to the flexible body of the sling and the operation and other factors, the initial swing angle of the crane is unenviable exist.
According to Liu Lei [8], the transverse bending vibration equation of a variable crosssection beam acted as the moving load under the action of the traction inertia force and relative inertia force.The Coriolis force and centrifugal inertia force are deduced, and the numerical solution is solved by using the Newmark method.According to Zhou Qi-cai [9], the trolley frame is set as an elastic structure, and the lateral deformation of the main beam of the crane is considered; a three-mass, three-freedom system vibration model of the gantry crane is established, and a more accurate mathematical model of the anti-sway system of the gantry crane is obtained.In reference [10], the influence of the vertical deformation of the crane on the sway control is analyzed, a three-dimensional, three-freedom elastic dynamic model of the trolley is proposed when the trolley was stationary, and the validity of the model is verified with Matlab software.
The above-mentioned anti-sway strategy relies on accurate mathematical models and ignores important factors such as wind load.In particular, open-loop systems such as input integers are very sensitive to external interference, which can easily cause simulation results to differ greatly from the real situation.In addition, the actual operating environment of the crane is complex, and there are many unpredictable external factors, which increase the difficulty of the crane anti-sway algorithm research, and the error is difficult to guarantee.
The author analyzes the load based on the actual operating cycle of the crane; establishes the dynamic differential equation of the cart under load based on Newton's second law; and fully considers wind disturbance, track defects, driving force, elastic deformation of the wire rope, and other factors.Then, the existing standard crane parameters were imported into the hoisting model for Matlab simulation analysis, and the model was optimized according to the simulation structure to ensure the accuracy of the dynamic model of the crane under actual working conditions to a certain extent.

Load Analysis of the Bridge Cranes under Typical Operating Conditions 2.1. The Structure of the Bridge Crane
A bridge crane is composed of four parts: bridge structure, operating mechanism, hoisting mechanism, and electrical device (as shown in Figure 1).

The Structure of the Bridge Crane
A bridge crane is composed of four parts: bridge structure, operating mechanism, hoisting mechanism, and electrical device (as shown in Figure 1).
(1) Bridge structure: bears the weight of the lifting trolley, composed of end beams, main beams, railings, walking platforms, tracks, and cabs.(2) Operating mechanism: The operating mechanism is subdivided into a large trolley operating mechanism and a small trolley operating mechanism, which drives the wheels of the crane and the trolley, respectively, to run along their respective tracks to complete the specified movement (Figure 2 is the mechanism diagram of the trolley).(3) Lifting mechanism: The function of the lifting mechanism is to realize the lifting movement of materials, which is mainly composed of a motor, pulley block, steel wire rope, braking device, and other corresponding safety devices.(4) Electrical device: The electrical system of the bridge crane includes electrical equipment and electrical wiring.It is composed of a power supply device, protection box, lighting equipment, electrical circuit, electrical main circuit, lighting signal circuit, control circuit, etc.   (1) Bridge structure: bears the weight of the lifting trolley, composed of end beams, main beams, railings, walking platforms, tracks, and cabs.(2) Operating mechanism: The operating mechanism is subdivided into a large trolley operating mechanism and a small trolley operating mechanism, which drives the wheels of the crane and the trolley, respectively, to run along their respective tracks to complete the specified movement (Figure 2 is the mechanism diagram of the trolley).
second law; and fully considers wind disturbance, track defects, driving force, elastic deformation of the wire rope, and other factors.Then, the existing standard crane parameters were imported into the hoisting model for Matlab simulation analysis, and the model was optimized according to the simulation structure to ensure the accuracy of the dynamic model of the crane under actual working conditions to a certain extent.

The Structure of the Bridge Crane
A bridge crane is composed of four parts: bridge structure, operating mechanism, hoisting mechanism, and electrical device (as shown in Figure 1).(3) Lifting mechanism: The function of the lifting mechanism is to realize the lifting movement of materials, which is mainly composed of a motor, pulley block, steel wire rope, braking device, and other corresponding safety devices.(4) Electrical device: The electrical system of the bridge crane includes electrical equipment and electrical wiring.It is composed of a power supply device, protection box, lighting equipment, electrical circuit, electrical main circuit, lighting signal circuit, control circuit, etc.

The Workflow of the Bridge Crane
Under normal circumstances, the main workflow of a complete lifting process is (1) the lifting process of the load, that is, lifting the hoisting weight to a specified height for the next step of transportation, (2) carry the hoisting load to the front or above the target position by the movement of the trolley, and (3) drop the hoisting weight vertically from above the target position to end this working stroke.In the actual work process, the above three steps are carried out in sequence.
There are two main reasons that cause the crane to sway during the working process: The first reason for the swing of the lifting weight is caused by the acceleration and deceleration movement of the crane's large and small trolley operating mechanism and the main and auxiliary lifting mechanisms during the working process.The second reason for the swing is caused by some uncertain factors in the operation process, such as the wind load received by the crane during the operation, the operation error of the operator, the height difference of the track, etc.In this paper, the different swing factors of the crane that cause the swing are analyzed, and the mathematical model of its swing angle is built.

Load Analysis of Crane during Lifting Stage
According to the working conditions of the crane, the lifting process is divided into three stages: In the first stage, before the lifting mechanism is started, the wire rope is in a relaxed state.At the moment when the lifting mechanism is started, the wire rope changes from slack to straightened.If the weight of the wire rope is ignored at this time, the wire rope is not stressed and the lifting weight (Q) is equivalent to being at a standstill.In the second stage, the force of the wire rope is from zero to Q, the lifting wire rope is gradually increased from the unstressed state to the tension, and the force (F 2 (t)) is applied to the bridge through the drum and its supporting members, which indirectly causes the force on the bridge to gradually increase, but the lifting objects are still not off the ground (as shown in Figure 3).m 1 is trolley quality, m 0 is reel quality.

The Workflow of the Bridge Crane
Under normal circumstances, the main workflow of a complete lifting process is (1) the lifting process of the load, that is, lifting the hoisting weight to a specified height for the next step of transportation, (2) carry the hoisting load to the front or above the target position by the movement of the trolley, and (3) drop the hoisting weight vertically from above the target position to end this working stroke.In the actual work process, the above three steps are carried out in sequence.
There are two main reasons that cause the crane to sway during the working process: The first reason for the swing of the lifting weight is caused by the acceleration and deceleration movement of the crane's large and small trolley operating mechanism and the main and auxiliary lifting mechanisms during the working process.The second reason for the swing is caused by some uncertain factors in the operation process, such as the wind load received by the crane during the operation, the operation error of the operator, the height difference of the track, etc.In this paper, the different swing factors of the crane that cause the swing are analyzed, and the mathematical model of its swing angle is built.

Load Analysis of Crane during Lifting Stage
According to the working conditions of the crane, the lifting process is divided into three stages: In the first stage, before the lifting mechanism is started, the wire rope is in a relaxed state.At the moment when the lifting mechanism is started, the wire rope changes from slack to straightened.If the weight of the wire rope is ignored at this time, the wire rope is not stressed and the lifting weight ( Q ) is equivalent to being at a standstill.In the second stage, the force of the wire rope is from zero to Q , the lifting wire rope is gradually increased from the unstressed state to the tension, and the force ( ) is applied to the bridge through the drum and its supporting members, which indirectly causes the force on the bridge to gradually increase, but the lifting objects are still not off the ground (as shown in Figure 3).The third stage, after the load is lifted off the ground, is he hoisting weight starts to leave the ground and resonates with the structure.At this time, the force of the wire rope reaches the maximum and the dynamic load generated by the hoisting mechanism is also the maximum.Due to the different resistance of each pulley in the pulley block, the pulling force generated by the hoisting cannot be evenly distributed to each rope, resulting in uneven rope tension, making the system a weak damping system, and causing a slight load swing.Due to the existence of the initial swing, the acceleration movement of the large and small trolleys will make the swing more violent, so the vibration swing angle is generated [6].The third stage, after the load is lifted off the ground, is he hoisting weight starts to leave the ground and resonates with the structure.At this time, the force of the wire rope reaches the maximum and the dynamic load generated by the hoisting mechanism is also the maximum.Due to the different resistance of each pulley in the pulley block, the pulling force generated by the hoisting cannot be evenly distributed to each rope, resulting in uneven rope tension, making the system a weak damping system, and causing a slight load swing.Due to the existence of the initial swing, the acceleration movement of the large and small trolleys will make the swing more violent, so the vibration swing angle is generated [6].

Load Analysis of Large (Small) Trolley of the Cranes during Acceleration
After the crane hoisting mechanism lifts the load, the load needs to be hoisted in front of or above the target position.At this time, the crane, its wheels, and other structures are subjected to horizontal loads.In the actual operation of the crane, the large and small trolleys usually move separately, even in the case of the large and small trolleys being linked.The law of motion in the linkage direction is the same as that of the trolley alone, therefore, the motion of the big trolley is separately considered in the load analysis.The main load of the crane in the horizontal direction along the track is: (1) Horizontal inertia F h The horizontal inertia force of the trolley movement (F h ) is the inertia force along the rail direction generated by the crane's own weight and lifting heavy objects when the trolley operating mechanism is started or braked, which includes the inertia force of the whole machine (F h2 ) and Inertia force of small trolley with lifting weight (F h1 ) (2) Total running resistance F w The rolling friction of the track to the wheels and the structural resistance of the crane's rotating mechanism [11] constitute its total running resistance (F w ): where c is the bearing friction factor of the rotating mechanism, d is the wheel axle diameter of the large trolley, D is the diameter of the wheel tread of the large trolley, f is the rolling friction coefficient, and ∑ F mi is the wheel pressure.
(3) Horizontal lateral force when the crane moves obliquely F s The existence of the track height difference in the bridge crane will lead to the occurrence of the phenomenon of rail gnawing and the running lateral force acting along the axial direction of the wheel, which will cause the crane to be worn to different degrees.The track of the bridge crane (travel) is in use due to the crane.The displacement, settlement, and deformation of the beams causes unevenness in the driving track.There are many reasons for the height difference of the crane track.The most common one is that the crane's service life is too long, which leads to the displacement, settlement, and deformation of the crane track.In addition, there are certain tolerances for the wheel manufacturing quality and installation.The friction between the rim of the wheel and the side of the track causes additional resistance (F z ) and intermittent swings of the lifting weight will be produced.According to the "Crane Design Code" [12], the formula for solving the deflection lateral force of the crane is: where ζ is the additional friction resistance coefficient, F mimax is the maximum total wheel pressure on the side of the crane subjected to the deflection lateral force, and λ is the deflection lateral force coefficient.
(1) Wind load of the y-direction (F dy ) If the crane is exposed to wind load during outdoor operation, the wind load is related to the windward area of the crane.Therefore, when constructing the swing model of the crane during the movement, according to the operating environment of the crane, the influence of the load-deflection caused by the wind load must be considered [13].
where, p : is the wind pressure calculated, s : is the windward area of the crane, c is the shape factor of the lifting weight in the wind direction, and k h : is the wind pressure height change coefficient.

Kinematics Analysis of Crane in a Working Cycle
In Figure 4, there is the swing diagram of the lifting weight under the horizontal load when the crane is moving (in the Cartesian three-dimensional coordinate system).It can be seen from the figure that when the crane is working, the heavy object will swing through the rope to the suspension point of the trolley, the swing angle is θ.Analyzing the swing angle (θ) along the crane's forward direction, the horizontal movement direction of the heavy object on the bridge, and the projected planes of YOZ and XOZ, respectively to get θ x and θ y , F x , and F y , are the driving forces that drive the movement of large and small trolleys, respectively.f x and f y are the frictional resistance of the large and small trolleys, respectively, a 1 and a 2 are the acceleration of the large and small trolleys along the running direction, respectively, x(t) and y(t) represent the corresponding displacement in the X and Y directions, m t is mass of the lifting weight, m 1 and m 2 are the equivalent masses of the trolley bridge structure (including the platform, main beam, end beam, the structure of the small trolley, etc.) and the mass of the small trolley, and F w is the wind load imposed on the lifting weight.Due to the difference in the height of the track, the upper surfaces of the two tracks are not in the same plane, and there is an angle (α) between the trolley body and the horizontal plane.
of the crane during the movement, according to the operating environment of the crane, the influence of the load-deflection caused by the wind load must be considered [13].
where, : p is the wind pressure calculated, : s is the windward area of the crane, c is the shape factor of the lifting weight in the wind direction, and : h k is the wind pressure height change coefficient.

Kinematics Analysis of Crane in a Working Cycle
In Figure 4, there is the swing diagram of the lifting weight under the horizontal load when the crane is moving (in the Cartesian three-dimensional coordinate system).It can be seen from the figure that when the crane is working, the heavy object will swing through the rope to the suspension point of the trolley, the swing angle is  .Analyzing the swing angle (  ) along the crane's forward direction, the horizontal movement direction of the heavy object on the bridge, and the projected planes of YOZ and XOZ , respectively to get x  and y  , x F , and y F , are the driving forces that drive the movement of large and small trolleys, respectively.x f and y f are the frictional resistance of the large and small trolleys, respectively, 1 a and 2 a are the acceleration of the large and small trolleys along the running direction, respectively, represent the corresponding displacement in the X and Y directions, t m is mass of the lifting weight, 1 m and 2 m are the equivalent masses of the trolley bridge structure (including the platform, main beam, end beam, the structure of the small trolley, etc.) and the mass of the small trolley, and w F is the wind load imposed on the lifting weight.Due to the difference in the height of the track, the upper surfaces of the two tracks are not in the same plane, and there is an angle ( ) between the trolley body and the horizontal plane.According to existing research [14], when a complete operation cycle is carried out, the trajectory of the lifting weight is similar to a circular swinging motion on a spherical surface.The swing angle of the lifting weight can be decomposed into the swing angle generated by the large and small trolleys moving in a two-dimensional plane.Therefore, the three-dimensional swing angle model of the bridge crane can be regarded as the swing angle formed by the large and small trolleys in the moving direction when they move According to existing research [14], when a complete operation cycle is carried out, the trajectory of the lifting weight is similar to a circular swinging motion on a spherical surface.The swing angle of the lifting weight can be decomposed into the swing angle generated by the large and small trolleys moving in a two-dimensional plane.Therefore, the three-dimensional swing angle model of the bridge crane can be regarded as the swing angle formed by the large and small trolleys in the moving direction when they move separately, then the independent two-dimensional motion equations are obtained in the x-axis direction and the y-axis direction, respectively.To simplify the model construction, the following assumptions need to be made: (1) The movement processes of the big and small trolleys are independent of each other.
(2) The elastic deformation of the bridge crane structure is ignored.
(3) The friction between the wheel of the trolley and the track of the trolley is the ideal rolling friction, and the friction coefficient is constant.
(4) The steel rope is regarded as a quality sling, and the friction between it and the pulley and drum of the trolley hoisting mechanism is ignored.(5) The wire rope is ideally wound on the drum groove and pulley and does not slip during lifting or lowering.(6) The additional resistance caused by the two tracks being not on the same plane is incorporated into the wheel rolling friction.( 7) F x and F y are completely affected by the output of the inverter, and some non-linear factors, such as reducer and trolley motor, are ignored Many scholars treat the wire rope as a rigid body when studying the lifting mechanism of a crane, simplifying the calculation of the wire rope.In fact, the wire rope is an elastic body, and the wire rope will be elastically deformed under the action of the lifting weight.Let the weight of the lifting weight received by the wire rope be Q, let ∆l 1 and ∆l 2 be the elastic elongation of the left and right wire ropes under tensile load (unit: mm).According to Hooke's law: the load value of each wire rope is ∆l 1 × k, ∆l 2 × k (k is the stiffness coefficient of the wire rope) [15].Assuming that there are n sets of steel wire ropes passing through the pulley block, and the force analysis on the hoisting weight is carried out (Figure 5), then: the following assumptions need to be made: (1) The movement processes of the big and small trolleys are independent of each other.
(2) The elastic deformation of the bridge crane structure is ignored.
(3) The friction between the wheel of the trolley and the track of the trolley is the ideal rolling friction, and the friction coefficient is constant.(4) The steel rope is regarded as a quality sling, and the friction between it and the pulley and drum of the trolley hoisting mechanism is ignored.(5) The wire rope is ideally wound on the drum groove and pulley and does not slip during lifting or lowering.(6) The additional resistance caused by the two tracks being not on the same plane is incorporated into the wheel rolling friction.(7) x F and y F are completely affected by the output of the inverter, and some non- linear factors, such as reducer and trolley motor, are ignored Many scholars treat the wire rope as a rigid body when studying the lifting mechanism of a crane, simplifying the calculation of the wire rope.In fact, the wire rope is an elastic body, and the wire rope will be elastically deformed under the action of the lifting weight.Let the weight of the lifting weight received by the wire rope be Q , let 1 l  and 2 l  be the elastic elongation of the left and right wire ropes under tensile load (unit: mm).According to Hooke's law: the load value of each wire rope is ( k is the stiffness coefficient of the wire rope) [15].Assuming that there are n sets of steel wire ropes passing through the pulley block, and the force analysis on the hoisting weight is carried out (Figure 5), then: The relationship between the rope length and its weight is shown in Formula (9).The relationship between the rope length and its weight is shown in Formula (9).
where F jmax is the maximum static tension of the wire rope wound into the drum (for the convenience of calculation, it is assumed that each steel wire bears the same tensile force and is the maximum tension.),Q : is the sum of the lifting load and the weight of the spreader, i h is the pulley block magnification, F is the maximum tension in the specified pulley group ratio, η h is the efficiency of the pulley block (available by referring to the manual), E is the equivalent elastic modulus of the steel wire rope, A is the cross-sectional area of the wire rope, l is the total length of the wire rope, and L is the full length of the wire rope below the reel without force.Therefore, the initial swing angle of the hoisting wire rope can be obtained as: (2) When the large trolley is moving in the y-direction When the large trolley is moving in the y-direction and the wind load is affected, the working conditions are as follows: The small trolley is located in the middle of the main girder, the hoisting weight is off the ground, and the full load is suspended on the small trolley.The lifting mechanism and the running mechanism of the trolley are stationary, and the large trolley completes the movement process of starting, accelerating, running at a constant speed, and braking.The load analysis is shown in Figure 6.
max j F convenience of calculation, it is assumed that each steel wire bears the same tensile force and is the maximum tension.),: Q is the sum of the lifting load and the weight of the spreader, h i is the pulley block magnification, F is the maximum tension in the specified pulley group ratio, h  is the efficiency of the pulley block (available by referring to the manual), E is the equivalent elastic modulus of the steel wire rope, A is the cross- sectional area of the wire rope, l is the total length of the wire rope, and L is the full length of the wire rope below the reel without force.Therefore, the initial swing angle of the hoisting wire rope can be obtained as: (2) When the large trolley is moving in the y -direction When the large trolley is moving in the y -direction and the wind load is affected, the working conditions are as follows: The small trolley is located in the middle of the main girder, the hoisting weight is off the ground, and the full load is suspended on the small trolley.The lifting mechanism and the running mechanism of the trolley are stationary, and the large trolley completes the movement process of starting, accelerating, running at a constant speed, and braking.The load analysis is shown in Figure 6.The three-dimensional dynamics analysis of the crane movement process is carried out, the coordinate system is constructed with the large trolley displacement direction (left is the positive direction) as the y -direction, and the dynamic differential equation of the large trolley system during the movement process is obtained: where 2 m is the large trolley quality, : y F is the large trolley driving force, f is the friction between the wheelset of the large trolley and the guide rail, and z F is the additional resistance.
Take lifting heavy objects as the research object for analysis: The three-dimensional dynamics analysis of the crane movement process is carried out, the coordinate system is constructed with the large trolley displacement direction (left is the positive direction) as the y-direction, and the dynamic differential equation of the large trolley system during the movement process is obtained: where m 2 is the large trolley quality, F y : is the large trolley driving force, f is the friction between the wheelset of the large trolley and the guide rail, and F z is the additional resistance.Take lifting heavy objects as the research object for analysis: where θ 1y is the deviation angle of the lifting object from the vertical direction, F dy is the wind load of the y-direction acting on the lifting object.From Equations ( 11) and (12), we get: where the friction force ( f da ) between the wheelset of the large trolley and the track can be expressed as formula (14): Machines 2023, 11, 579 9 of 23 where µ is the coefficient of the dynamic friction between the wheelset of the large trolley and the track.Then, (13) can be calculated as: According to the load analysis of the lifting weight in the vertical direction: ) According to formulas (4), ( 5), (6), and ( 16), then formula ( 17) is obtained: After finishing formula (18), formula ( 19) is obtained: In summary, the swing angle in the y-direction is: Substituting Equations ( 9) and ( 19) into Equation (20), formula (21) is obtained.

Construction of the Mathematical Model of the Swing Angle in the x-Direction during the Work Process of the Crane
There is a track angle when the large trolley is moving and the upper surface of the double track is uneven.
The deformation and tilt of the track will inevitably occur during the installation and long-term operation of the bridge crane.According to the requirements of the "Bridge and Gantry Crane Manufacturing and Track Installation Tolerance", when the height difference between the tracks exceeds ±10 mm, lateral slippage will occur due to the load, and the horizontal force on the running mechanism will change, which the load swing will be aggravated.The schematic diagram of the track height difference is shown in Figure 7.The load analysis diagram is constructed according to Figure 7 because the two rails of the large trolley are not on the same plane.An inclination angle will be generated, and the additional resistance (F z ) generated is unified into the wheel rolling friction.It can be seen from the structural analysis, (sin α = h L ) at this time, that the existence of this included angle will cause a certain slope to the track of the trolley.The force analysis of the trolley is shown in Figure 8.
angle will cause a certain slope to the track of the trolley.The force analysis of the trolley is shown in Figure 8. From this, the dynamic differential equation of the crane's small trolley system in the movement process is:

L：Main beam span
where 1 m is the mass of the small trolley, x F is the driving force of the small trolley, xiao f is the friction between the wheelset of the small trolley and the guide rail, and dx F is the wind load in the x-direction: We analyzed the lifting weight as the research object: where dx F is the wind load, generally, h is in the range of 0~10 mm when . According to formula (25), formula (26) is derived as: According to the load analysis of the lifting weight in the vertical direction, From this, the dynamic differential equation of the crane's small trolley system in the movement process is: where m 1 is the mass of the small trolley, F x is the driving force of the small trolley, f xiao is the friction between the wheelset of the small trolley and the guide rail, and F dx is the wind load in the x-direction: ..
We analyzed the lifting weight as the research object: where F dx is the wind load, generally, h is in the range of 0 ∼ 10 mm when sin α ≈ 0, cos α ≈ 1.According to formula (25), formula (26) is derived as: According to the load analysis of the lifting weight in the vertical direction, The swing angle component of the crane in the x-direction is: In summary, the comprehensive swing angle of the crane is: Substituting Equations ( 21) and (28) into Equation (29), Equation ( 31) is obtained: (30)

Three-Dimensional Simulation Model of Swing Angle of Lifting Weight
Normally, for the mathematical model of the swing angle of the lifting weight, simulation analysis is needed to determine the extent to which each influencing factor affects the swing angle of the lifting object.
In this paper, a standard crane (QD − 5T − 22.5m − A5W) is selected as the simulation object, according to the standard, the selected type of steel wire rope is 13N AT − 6x19w + FC1570, and relevant parameters are obtained through the crane's design specifications GB/T3811-2008.According to the "Crane Design Specification", when the load is high, the height is 10 m, K h = 1, the wind load expression is P w = 0.8 × S × ρ 2 2 , and other calculation parameters are shown in Table 1.According to formula (30), β + θ 1y = θ y , ∆l 1 = a, ∆l 2 = b, and the functional formula (Formula (31)) of the simulation modules are established.

The Influence of the Driving Force on the Swing Angle
As shown in Figure 9, the driving force variation curve over time, and its amplitude, has reached 3000 N.Under the condition that the other simulation parameters remain unchanged, the swing angle-time curve of the same driving force (F y ) is obtained between the acting time 0 ∼ 10 s.If F y is the linear increase, from 10 s to 20 s, the driving force remains the same, and from 20 s to 30 s, the driving force is linearly decreasing.Assuming that there is no interfering wind load, according to the time acted by the lifting weight under a different driving time, the simulation of the swing angle is shown in Figure 10.
not promptly reduced to zero.According to Figure 11, it can be concluded that the change in the driver of the crane is consistent with the load angle.It can be seen that the size of the driving force will affect the swing angle of the hoist, and the swing angle increases with the increase of the driving force.
This gives us a revelation: according to the load swing angular signal, the crane outputs the appropriate driving force, thereby achieving the effect of eliminating the load swing.

The Influence of Wind Load on Swing Angle
In the process of working on the bridge crane, the existence of wind-in contraction will inevitably affect the load swing.According to the relevant literature, the bridge crane needs to stop the operation when the wind reaches 6th.In order to study the influence of the wind storage size, this experiment has studied the swing of the crane under the wind speed of 0 ~13 m s and obtained a swing angle-wind speed graph (shown in Figure 11).
As can be seen from the figure, when the wind speed is 0-4 m/s, the swing angle increase is relatively slow.After 4 m/s, the swing angle increases with the wind speed, It can be seen that the increased driving force has a certain promotion in the crane swings.Even if the driving force is reduced, due to the inertial effect, the swing angle is not promptly reduced to zero.According to Figure 11, it can be concluded that the change in the driver of the crane is consistent with the load angle.It can be seen that the size of the driving force will affect the swing angle of the hoist, and the swing angle increases with the increase of the driving force.

The Influence of Wind Load on Swing Angle
In the process of working on the bridge crane, the existence of wind-in contraction will inevitably affect the load swing.According to the relevant literature, the bridge crane This gives us a revelation: according to the load swing angular signal, the crane outputs the appropriate driving force, thereby achieving the effect of eliminating the load swing.

The Influence of Wind Load on Swing Angle
In the process of working on the bridge crane, the existence of wind-in contraction will inevitably affect the load swing.According to the relevant literature, the bridge crane needs to stop the operation when the wind reaches 6th.In order to study the influence of the wind storage size, this experiment has studied the swing of the crane under the wind speed of 0 ∼ 13 m/s and obtained a swing angle-wind speed graph (shown in Figure 11).
As can be seen from the figure, when the wind speed is 0-4 m/s, the swing angle increase is relatively slow.After 4 m/s, the swing angle increases with the wind speed, and the angle growth is also rising, which is due to inertia and wind speed.The double effect is caused, so that it is understood that the impact of wind stall on the lift of the crane is not negligible.

The Influence of Lifting Weight Quality on Swing Angle
In response to the effect of hoisting quality on the hanging rocking, the simulation conditions include other parameters, the driving force is 3000 N, and the wind speed is 4 m/s.Simulation analysis of the model is obtained to get the relationship between the angle of hoisting and the weight.As can be seen from Figure 12, as the heating mass increases, the smaller the hanging rocking angle, the initial hoist quality is the smallest, and its swing angle is the largest, because when the driving force F is fixed, the smaller the height mass M, then The larger the acceleration A, the smaller the swing angle of the hoisting.This can be obtained, and the quality of the hoisting is affected under certain conditions.

Swing Angle Detection during Crane Operation
In this study, the Kienz LS-5041 laser scanner is used to measure the swing angle of the crane during operation [16] (as shown in Figure 13).The laser scanner can be connected to four scanning heads with a resolution of 0.05 μm and a maximum scanning range of 40 mm 40 mm  . Two groups of laser scanners are installed in the square bracket at the bottom of the crane trolley bridge, and the wire rope passes through the center point O of the optical plane when it does not swing.The scanning range of the two groups of laser scanners is the optical plane (as shown in Figure 13).The coordinates of the intersection of the wire rope and the plane are the key data for detection.The coordinates and the distance from the wire rope connection point to the optical plane form the spatial coordinates, then the algebraic expression of the swing angle is obtained indirectly through a geometric relationship calculation. is the included angle between the wire rope and the centerline as shown in Figure 14.

Swing Angle Detection during Crane Operation
In this study, the Kienz LS-5041 laser scanner is used to measure the swing angle of the crane during operation [16] (as shown in Figure 13).The laser scanner can be connected to four scanning heads with a resolution of 0.05 µm and a maximum scanning range of 40 mm × 40 mm.Two groups of laser scanners are installed in the square bracket at the bottom of the crane trolley bridge, and the wire rope passes through the center point O of the optical plane when it does not swing.The scanning range of the two groups of laser scanners is the optical plane (as shown in Figure 13).The coordinates of the intersection of the wire rope and the plane are the key data for detection.The coordinates and the distance from the wire rope connection point to the optical plane form the spatial coordinates, then the algebraic expression of the swing angle is obtained indirectly through a geometric relationship calculation.θ is the included angle between the wire rope and the centerline as shown in Figure 14.
connected to four scanning heads with a resolution of 0.05 μm and a maximum scanning range of 40 mm 40 mm  . Two groups of laser scanners are installed in the square bracket at the bottom of the crane trolley bridge, and the wire rope passes through the center point O of the optical plane when it does not swing.The scanning range of the two groups of laser scanners is the optical plane (as shown in Figure 13).The coordinates of the intersection of the wire rope and the plane are the key data for detection.The coordinates and the distance from the wire rope connection point to the optical plane form the spatial coordinates, then the algebraic expression of the swing angle is obtained indirectly through a geometric relationship calculation. is the included angle between the wire rope and the centerline as shown in Figure 14.As shown in Figure 14, the X -direction, from group A's laser scanning transmitter to receiver, is the trolley moving direction, and the Y -direction, from group B's laser scanning transmitter to receiver, is the crane moving direction.If the crane swings, two sets of laser scanners can detect the coordinate P at the intersection of the swinging wire rope and the Y X  plane.We derived the coordinates ( ) , ( y x P   ) and the distance ( h ) from the top of the crane wire rope to the Y X  plane, and then the crane swing angle is calculated through the geometric relationship: where, x  is the x -direction swing angle of the crane and y  is the y -direction swing angle of the crane.The swing angle of the crane during operation is detected using laser detection technology.The acquired swing angle signal is processed and input into the anti-swing control system of the crane.The anti-swing control system of the crane conducts comprehensive processing in combination with the displacement, speed, and measured swing angle of the large and small trolleys, and then feeds back to the crane control system through closed-loop feedback (so as to control the operation of the crane operating mechanism and lifting mechanism, and finally achieve anti-swing control0.As shown in Figure 14, the X-direction, from group A's laser scanning transmitter to receiver, is the trolley moving direction, and the Y-direction, from group B's laser scanning transmitter to receiver, is the crane moving direction.If the crane swings, two sets of laser scanners can detect the coordinate P at the intersection of the swinging wire rope and the X − Y plane.

Design of Anti-Sway Controller for
We derived the coordinates (P(x , y )) and the distance (h) from the top of the crane wire rope to the X − Y plane, and then the crane swing angle is calculated through the geometric relationship: where, θ x is the x-direction swing angle of the crane and θ y is the y-direction swing angle of the crane.The swing angle of the crane during operation is detected using laser detection technology.The acquired swing angle signal is processed and input into the anti-swing control system of the crane.The anti-swing control system of the crane conducts comprehensive processing in combination with the displacement, speed, and measured swing angle of the large and small trolleys, and then feeds back to the crane control system through closed-loop feedback (so as to control the operation of the crane operating mechanism and lifting mechanism, and finally achieve anti-swing control. 6.2.Design of Anti-Sway Controller for Bridge Crane 6.2.1.Design of Conventional PID Anti-Sway Controller for Bridge Crane PID (proportional-integral-derivative) control technology is the most mature and widely used closed-loop feedback control technology.The control principle is as follows: Let the given input value (r(t)) and the actual output value (y(t)) of the mechanical system form a deviation (e(t)), take this deviation (e(t)) as the feedback input of the controller, and obtain the output control variable (u(t)) through the proportional integral differential logic operation.The general form of the PID controller control quantity (u(t)) is [16]: where K p is a proportional control parameter, K i is the integral control parameter, K d is the differential control parameter, and e(t) is a deviation.The performance of the PID anti-sway controller mainly depends on the reasonable adjustment of the three parameters (K p , K i , and K d ).The three parameters of the PID controller play different roles in different time periods: (1) to increase the proportion coefficient that the response speed is conducive to increase, but if too large the overshoot is increased too; (2) to increase the integral coefficient that the overshoot is reduced to a certain extent, but the static error elimination time will be prolonged; (3) to increase the differential parameters so that the system can be made more stable, but the anti-interference ability will be weakened.The PID control parameters are determined according to the critical curve method [17].At first, a larger scale coefficient (K p ) is selected and the value of the scale coefficient (K p ) is gradually reduced.When the output curve reaches constant amplitude oscillation, then the critical oscillation scale coefficient (K p ) and critical oscillation period (T) are recorded.The calculation formula is seen in Table 2.According to the crane swing angle model, a PID controller is designed to control the crane displacement (y) and swing angle (θ).The control schematic diagram is shown in Figure 15.The performance of the PID anti-sway controller mainly depends on the reasonable adjustment of the three parameters ( p K , i K , and d K ).The three parameters of the PID controller play different roles in different time periods: (1) to increase the proportion coefficient that the response speed is conducive to increase, but if too large the overshoot is increased too; (2) to increase the integral coefficient that the overshoot is reduced to a certain extent, but the static error elimination time will be prolonged; (3) to increase the differential parameters so that the system can be made more stable, but the antiinterference ability will be weakened.The PID control parameters are determined according to the critical curve method [17].At first, a larger scale coefficient ( p K ) is selected and the value of the scale coefficient ( p K ) is gradually reduced.When the output curve reaches constant amplitude oscillation, then the critical oscillation scale coefficient ( p K ) and critical oscillation period ( T ) are recorded.The calculation formula is seen in Table 2.The initial swing angle is assumed to be zero, the crane mass is 10 T, the load mass is 5 T, the rope length is 3 m, g is 9.8 m/s, and the friction coefficient is 0.  The initial swing angle is assumed to be zero, the crane mass is 10 T, the load mass is 5 T, the rope length is 3 m, g is 9.8 m/s, and the friction coefficient is 0.2, for the above model, then the three parameter values (K p , K i , K d ) are calculated by the critical curve method.When K p = 10, the swing angle output curve can be achieved approximate constant amplitude oscillation (as shown in Figure 16), according to Table 2, then the three coefficients of the swing angle PID controller are calculated as K p = 10, K i = 0.2, and K d = 23.Figure 17 shows the swing angle curve of the bridge crane under the control of the conventional PID anti-swing controller.When the initial swing angle is zero, the crane will swing gradually under the action of the driving force, the PID anti-swing controller can control the maximum swing angle below 0.85 rad , and finally, the swing angle can be controlled to zero.

Design of Fuzzy Anti-Sway Controller for Bridge Crane
With the continuous improvement of production requirements, there are also high requirements for control accuracy, response speed, and the stability of control technology.The main advantage of fuzzy control is that when the system model data is inaccurate, only the controlled object data and expert experience need to be converted into "fuzzy rules" that can be processed by the computer to achieve intelligent control [17].The crane's anti-sway fuzzy controller consists of six parts: control variables, knowledge base, fuzzy processing, fuzzy rules, fuzzy reasoning, and nonfuzzy.Its control principle is shown in Figure 18.  Figure 17 shows the swing angle curve of the bridge crane under the control of the conventional PID anti-swing controller.When the initial swing angle is zero, the crane will swing gradually under the action of the driving force, the PID anti-swing controller can control the maximum swing angle below 0.85 rad, and finally, the swing angle can be controlled to zero. Figure 17 shows the swing angle curve of the bridge crane under the control of the conventional PID anti-swing controller.When the initial swing angle is zero, the crane will swing gradually under the action of the driving force, the PID anti-swing controller can control the maximum swing angle below 0.85 rad , and finally, the swing angle can be controlled to zero.

Design of Fuzzy Anti-Sway Controller for Bridge Crane
With the continuous improvement of production requirements, there are also high requirements for control accuracy, response speed, and the stability of control technology.The main advantage of fuzzy control is that when the system model data is inaccurate, only the controlled object data and expert experience need to be converted into "fuzzy rules" that can be processed by the computer to achieve intelligent control [17].The crane's anti-sway fuzzy controller consists of six parts: control variables, knowledge base, fuzzy processing, fuzzy rules, fuzzy reasoning, and nonfuzzy.Its control principle is shown in Figure 18.

Design of Fuzzy Anti-Sway Controller for Bridge Crane
With the continuous improvement of production requirements, there are also high requirements for control accuracy, response speed, and the stability of control technology.The main advantage of fuzzy control is that when the system model data is inaccurate, only the controlled object data and expert experience need to be converted into "fuzzy rules" that can be processed by the computer to achieve intelligent control [17].The crane's anti-sway fuzzy controller consists of six parts: control variables, knowledge base, fuzzy processing, fuzzy rules, fuzzy reasoning, and nonfuzzy.Its control principle is shown in Figure 18. Figure 17 shows the swing angle curve of the bridge crane under the control of the conventional PID anti-swing controller.When the initial swing angle is zero, the crane will swing gradually under the action of the driving force, the PID anti-swing controller can control the maximum swing angle below 0.85 rad , and finally, the swing angle can be controlled to zero.

Design of Fuzzy Anti-Sway Controller for Bridge Crane
With the continuous improvement of production requirements, there are also high requirements for control accuracy, response speed, and the stability of control technology.The main advantage of fuzzy control is that when the system model data is inaccurate, only the controlled object data and expert experience need to be converted into "fuzzy rules" that can be processed by the computer to achieve intelligent control [17].The crane's anti-sway fuzzy controller consists of six parts: control variables, knowledge base, fuzzy processing, fuzzy rules, fuzzy reasoning, and nonfuzzy.Its control principle is shown in Figure 18.Based on the research of conventional PID anti-sway controllers, the fuzzy algorithm is used to optimize the PID parameters.The input of the fuzzy controller is θ and .θ, and the output is the modified value of the PID controller parameters) ∆K p , ∆K i and ∆K d ).The design process of the fuzzy PID controller is: 1 Determine the dimension of the anti-sway fuzzy controller.In this design, twodimensional input is selected, swing angle deviation (e) and deviation rate (ec) are selected as input variables, and the output variables are the three-parameter correction values of the PID controller (∆K p , ∆K i , and ∆K d ).
2 Two domains of variables are determined: the basic domain is the actual range of deviation (e) and the deviation change rate (ec), the fuzzy universe is that the fuzzy controller can identify the actual variation range of the input signal, and finally, the quantization factor and scale factor are calculated. 3Fuzzy subsets are defined: determine the number of each fuzzy subset and the fuzzy language, and select the appropriate membership function for each fuzzy subset. 4Construct the output fuzzy control rule table under the input variables. 5According to the input quantity in (1) and the fuzzy rule in (3), the outputs of the fuzzy controller are ∆K p , ∆K i , and ∆K d .Then the initial parameters of the conventional PID controller and the output values of the fuzzy controller are linearly added to obtain the control quantity of the anti-sway control system of the bridge crane. 6Convert the fuzzy variables of the fuzzy universe to the clear values of the basic universe.
(1) Determination of basic parameters of the fuzzy controller: The basic parameters of the fuzzy PID controller include the basic universe of language variables, swing angle and swing angle acceleration, the basic universe of cart displacement, and displacement acceleration.In the process of justification, it is necessary to calculate the quantization factor and scale factor of the variables.The quantization factor corresponds to the input of the controller and the scale factor corresponds to the output of the controller.The basic scope of deviation is [−x e , x e ], the basic universe of deviation change rate is [−x ec , x ec ], and the basic universe of control quantity is [−y u , y u ].Let the upper bound of the universe of the three fuzzy subsets be n, m and l.The quantification factor can be calculated as k e = n x e , k ec = m x e .The scale factor [18] is calculated by K ∆k = y u l .Then, the basic domain of load swing angle is [−1.5, 1.5].The basic universe of the other variables, as well as scale factors and quantification factors, are shown in Table 3. (2) Membership function and fuzzy rules of the anti-sway fuzzy controller The number of input variables of the fuzzy controller determines the control effect.Theories show that the higher the number of input variables of the fuzzy controller is, the more accurate the control effect will be, but it will increase the complexity of the model and the calculation time.Under the condition that the control effect is accurate and the calculation time is moderate, seven subsets are selected to represent the output and input of the fuzzy controller, they are respectively: negative big, negative middle, negative small, zero, positive small, positive middle, and positive big.It is described in fuzzy language as NB, N M, NS, ZO, PS, PM, and PB.An appropriate membership function is selected for each subset, which represents the compliance of input variables with fuzzy rules.One of the rule statements is: If e is PB and ec is NB, then ∆K p is ZO, ∆K i is ZO, and ∆K d is NS.According to expert experiences, a set of control rules with good performance is shown in Table 4.The fuzzy quantity is obtained through fuzzy reasoning, and the accurate value is obtained after the area center method (Centroid) is used for the defuzzification process.The defuzzification calculation is: where d represents the proportional, integral, and differential parameters p, i, d.If d = p, then µ pj represents the value µ ∆K p ) of x at time j, ∆K p j represents the value ∆K p of x at time j, and j corresponds to the control rules.The integral and differential parameters are deduced by analogy, and the parameter increments (∆K p , ∆K i , and ∆K d ) are substituted into Formula (35) [19] to obtain the actual PID controller parameters after fuzzy processing: where K p0 , K i0 , and K d0 are the initial values of K p , K i , and K d , respectively.∆K p , ∆K i , and ∆K d respectively represent the modified values of the three parameters by the fuzzy controller.Figure 19 shows the simulation model of the anti-sway fuzzy PID controller of the bridge crane.
In the fuzzy PID controller of the swing angle, the gain modules (k e1 and k ec1 ) are the quantization factors of the swing angle and its acceleration, angle, and y are the actual output angle and displacement of the bridge crane model, respectively.k 1 , k 2 , and k 3 are the scale factors of the three parameters.k p1 , k p2 , and k p3 are, respectively, the three control parameter values of the swing angle PID controller, they are the initial value of K p , K i , and K d .The internal structure of the swing angle fuzzy controller is shown in Figure 20.From the simulation results, it can be concluded that the maximum swing angle of the bridge crane is 0.29 rad , the swing angle amplitude gradually decreases with time, and the swing angle is eliminated to zero after 11 s.According to the measured data at the crane work site, without any anti-sway measures, the swing angle should be about1 rad , and the swing angle continues to oscillate.Therefore, the fuzzy PID anti-sway controller From the simulation results, it can be concluded that the maximum swing angle of the bridge crane is 0.29 rad, the swing angle amplitude gradually decreases with time, and the swing angle is eliminated to zero after 11 s.According to the measured data at the crane work site, without any anti-sway measures, the swing angle should be 1 rad, and the swing angle continues to oscillate.Therefore, the fuzzy PID anti-sway controller can achieve good anti-sway control.

Simulation of Swing Angle under Different Rope Lengths and Load Masses
In order to verify the anti-sway positioning effect of the fuzzy PID anti-sway controller when the wire rope length changes, three groups of rope length parameters are set up on the basis of ensuring that the other parameters remain unchanged (l = 3 m, l = 5 m, and l = 7 m).The anti-sway simulation test results are shown in Figure 22.It can be seen from the figure that before the swing angle reaches the first amplitude, the shorter the wire rope length is, the greater the load swing amplitude is.After t = 5 s, the shorter the rope length is, the faster the load swing angle drops.This shows that the fuzzy PID anti-swing controller has a faster anti-swing positioning effect for the load swing under the condition of short rope length, and the fuzzy PID anti-swing controller has better adaptability for the load swing under different rope lengths.From the simulation results, it can be concluded that the maximum swing angle of the bridge crane is 0.29 rad , the swing angle amplitude gradually decreases with time, and the swing angle is eliminated to zero after 11 s.According to the measured data at the crane work site, without any anti-sway measures, the swing angle should be about1 rad , and the swing angle continues to oscillate.Therefore, the fuzzy PID anti-sway controller can achieve good anti-sway control.).The anti-sway simulation test results are shown in Figure 22.It can be seen from the figure that before the swing angle reaches the first amplitude, the shorter the wire rope length is, the greater the load swing amplitude is.After t = 5 s, the shorter the rope length is, the faster the load swing angle drops.This shows that the fuzzy PID anti-swing controller has a faster anti-swing positioning effect for the load swing under the condition of short rope length, and the fuzzy PID anti-swing controller has better adaptability for the load swing under different rope lengths.Figure 23 shows the swing angle curve under different load masses.We set the three groups of load mass test parameters as: m p = 5 Kg, m p = 7 Kg, and m p = 10 Kg.Here, the load weight is indeed too small compared to the lifting load of the crane (the load used here is for simulating the control function of the fuzzy controller) and the load size has no effect on the control function.It can be seen from Figure 24, after the load mass changes, the larger the mass is, the smaller the swing angle amplitude is, and the swing angle change trend is basically consistent with that before the increase.Therefore, when the binding force is constant, the smaller the mass is, the greater the swing acceleration is, and the swing will be more intense.
Here, the load weight is indeed too small compared to the lifting load of the crane (the load used here is for simulating the control function of the fuzzy controller) and the load size has no effect on the control function.It can be seen from Figure 24, after the load mass changes, the larger the mass is, the smaller the swing angle amplitude is, and the swing angle change trend is basically consistent with that before the increase.Therefore, when the binding force is constant, the smaller the mass is, the greater the swing acceleration is, and the swing will be more intense.

Comparison of Simulation Results between Conventional PID Anti Sway Controller and Fuzzy PID Controller
The comparative analysis of the swing angle curve, under the control of the conventional PID anti-sway controller and fuzzy PID controller, is shown in Figure 24.When 1 s t  , the swing angle of the crane under the conventional PID control reached the first peak of 0.9 rad , then the peak value of the swing angle gradually decreases until it becomes stable at zero.Under the action of the fuzzy PID controller, the peak value of the first swing angle of the crane load is 0.38 rad .After 14 s t  , the swing angle basically tends toward zero and there is no oscillation, which is 2 s ahead of the conventional PID algorithm.The research results show that the fuzzy PID controller can restrain the swing of the crane quickly and reduce the time for the swing angle to stabilize.
From the analysis of the engineering application, it can be seen that the fuzzy PID anti-sway controller can shorten the anti-sway time of the crane, thereby improving the Here, the load weight is indeed too small compared to the lifting load of the crane (the load used here is for simulating the control function of the fuzzy controller) and the load size has no effect on the control function.It can be seen from Figure 24, after the load mass changes, the larger the mass is, the smaller the swing angle amplitude is, and the swing angle change trend is basically consistent with that before the increase.Therefore, when the binding force is constant, the smaller the mass is, the greater the swing acceleration is, and the swing will be more intense.

Comparison of Simulation Results between Conventional PID Anti Sway Controller and Fuzzy PID Controller
The comparative analysis of the swing angle curve, under the control of the conventional PID anti-sway controller and fuzzy PID controller, is shown in Figure 24.When 1 s t  , the swing angle of the crane under the conventional PID control reached the first peak of 0.9 rad , then the peak value of the swing angle gradually decreases until it becomes stable at zero.Under the action of the fuzzy PID controller, the peak value of the first swing angle of the crane load is 0.38 rad .After 14 s t  , the swing angle basically tends toward zero and there is no oscillation, which is 2 s ahead of the conventional PID algorithm.The research results show that the fuzzy PID controller can restrain the swing of the crane quickly and reduce the time for the swing angle to stabilize.
From the analysis of the engineering application, it can be seen that the fuzzy PID anti-sway controller can shorten the anti-sway time of the crane, thereby improving the

Comparison of Simulation Results between Conventional PID Anti Sway Controller and Fuzzy PID Controller
The comparative analysis of the swing angle curve, under the control of the conventional PID anti-sway controller and fuzzy PID controller, is shown in Figure 24.When t = 1 s, the swing angle of the crane under the conventional PID control reached the first peak of 0.9 rad, then the peak value of the swing angle gradually decreases until it becomes stable at zero.Under the action of the fuzzy PID controller, the peak value of the first swing angle of the crane load is 0.38 rad.After t = 14 s, the swing angle basically tends toward zero and there is no oscillation, which is 2 s ahead of the conventional PID algorithm.The research results show that the fuzzy PID controller can restrain the swing of the crane quickly and reduce the time for the swing angle to stabilize.
From the analysis of the engineering application, it can be seen that the fuzzy PID anti-sway controller can shorten the anti-sway time of the crane, thereby improving the operating efficiency to a certain extent and ensuring the safety of hoisting.The analysis of the experimental results shows that compared with the conventional PID anti-sway controller, the fuzzy PID controller can not only weaken the external environmental interference but also quickly eliminate the swing, with a low overshoot, strong adaptability, and other advantages.

Conclusions
According to a working cycle of a bridge crane, a three-dimensional model of the crane is established, the dynamic behavior of its movement process is analyzed, and the two movement directions of a large and small trolley are divided according to the spatial state of the swing angle of the lifting weight during the movement of the crane, and the mathematical model is constructed and the simulation analysis of the component is completed.
According to Newton's second law, a mathematical model of the swing angle is constructed by comprehensively considering the influence of the lifting weight, the doubletrack angle of the trolley, and the wind load on the lifting weight.These factors are simulated, and the corresponding curves of the swing angle change with time, or these factors, are obtained.According to the results of the study, the initial swing angle cannot be ignored, the acceleration and deceleration of the crane will increase the swing amplitude of the lifting weight, and the presence and speed of wind load have a significant impact on the swing of the lifting weight.The research results can provide a theoretical research basis for the subsequent research on crane anti-sway, and provide a theoretical basis for improving the efficiency and safety of the crane.
Finally, according to the swing angle model of the bridge crane in the work process, the control target is proposed, and the conventional PID anti-sway control technology, and the fuzzy PID anti-sway control technology, are studied and simulated.The research results show that, because the conventional PID controller cannot adjust the parameters in real-time, according to the system parameter changes, facing the specific nonlinear and time-varying model of the bridge crane, the conventional anti-sway PID controller cannot eliminate the load swing in a smaller time range, which has limitations.However, the fuzzy PID controller can accurately locate and effectively control the swing angle of the lifting load, and its anti-sway effect is better than the conventional PID controller.
Through this study, the correct working swing angle model of the crane was obtained and the anti-swing controller was designed.The next step is to apply the anti-swing controller to the design of the anti-swing lifting system, develop the anti-swing lifting system of the crane, and conduct experimental research and engineering application research.After the experimental research is mature, the anti-swing lifting system will be installed on the actual crane.

Figure 2 .
Figure 2. Three-dimensional model of bridge crane trolley mechanism.

( 1 )
Bridge structure: bears the weight of the lifting trolley, composed of end beams, main beams, railings, walking platforms, tracks, and cabs.(2)Operating mechanism: The operating mechanism is subdivided into a large trolley operating mechanism and a small trolley operating mechanism, which drives the wheels of the crane and the trolley, respectively, to run along their respective tracks to complete the specified movement (Figure2is the mechanism diagram of the trolley).(3) Lifting mechanism: The function of the lifting mechanism is to realize the lifting movement of materials, which is mainly composed of a motor, pulley block, steel wire rope, braking device, and other corresponding safety devices.(4) Electrical device: The electrical system of the bridge crane includes electrical equipment and electrical wiring.It is composed of a power supply device, protection box, lighting equipment, electrical circuit, electrical main circuit, lighting signal circuit, control circuit, etc.

Figure 2 .
Figure 2. Three-dimensional model of bridge crane trolley mechanism.Figure 2. Three-dimensional model of bridge crane trolley mechanism.

Figure 2 .
Figure 2. Three-dimensional model of bridge crane trolley mechanism.Figure 2. Three-dimensional model of bridge crane trolley mechanism.

Figure 3 .
Figure 3. Working conditions after lifting heavy objects off the ground.

Figure 3 .
Figure 3. Working conditions after lifting heavy objects off the ground.

Figure 4 .
Figure 4.The motion model diagram of the crane in a working cycle.(a) 3D diagram of crane swing angle; (b) crane force distribution diagram.

Figure 4 .
Figure 4.The motion model diagram of the crane in a working cycle.(a) 3D diagram of crane swing angle; (b) crane force distribution diagram.

3. 2 .( 1 )
Construction of the Mathematical Model of the Swing Angle in the y-Direction during the Work Process of the Crane The initial swing angle of the lifting weight during the lifting phase

3. 2 .( 1 )
Construction of the Mathematical Model of the Swing Angle in the y -Direction during the Work Process of the Crane The initial swing angle of the lifting weight during the lifting phase

Figure 5 .
Figure 5. Schematic diagram of swing angle during lifting.

Figure 5 .
Figure 5. Schematic diagram of swing angle during lifting.

Figure 6 .
Figure 6.Force diagram of large trolley operating mechanism.

Figure 6 .
Figure 6.Force diagram of large trolley operating mechanism.

Figure 8 .
Figure 8. Force diagram of the small trolley operating mechanism.

Figure 9 .
Figure 9.The waveform of the driving force of the crane in the y -direction of the large trolley changes with time.

Figure 9 .Figure 10 .
Figure 9.The waveform of the driving force of the crane in the y-direction of the large trolley changes with time.Machines 2023, 11, x FOR PEER REVIEW 13 of 24

Figure 11 .
Figure 11.Swing angle diagram of lifting weight varies with wind speed.

Figure 10 .
Figure 10.Simulation of swing angle-time curve acted by lifting weight under different driving times.

Machines 2023 , 24 Figure 10 .Figure 11 .
Figure 10.Simulation of swing angle-time curve acted by lifting weight under different driving times.

Figure 11 .
Figure 11.Swing angle diagram of lifting weight varies with wind speed.

Machines 2023 , 24 Figure 12 .
Figure 12.Swing angle diagram of lifting weight varies with weight.

Figure 12 .
Figure 12.Swing angle diagram of lifting weight varies with weight.

Figure 13 .
Figure 13.Installation diagram of crane swing angle detection device.

Bridge Crane 6 . 2 . 1 .
Design of Conventional PID Anti-Sway Controller for Bridge Crane PID (proportional-integral-derivative) control technology is the most mature and widely used closed-loop feedback control technology.The control principle is as follows: Let the given input value ( ) (t r ) and the actual output value ( ) (t y ) of the mechanical

Figure 14 .
Figure 14.Top view of crane swing angle detection device.

Figure 15 .
Figure 15.Anti-sway PID control structure diagram of bridge crane.
2, for the above model, then the three parameter values ( p K , i K , d K ) are calculated by the critical curve method.When 10  p K, the swing angle output curve can be achieved approximate constant amplitude oscillation (as shown in Figure16), according to Table2, then the three coefficients of the swing angle PID controller are calculated as 10 

Figure 15 .
Figure 15.Anti-sway PID control structure diagram of bridge crane.

Figure 16 .
Figure 16.System output response the under critical curve method.

Figure 17 .
Figure 17.Swing angle curve under the control of the PID anti-sway controller.

Figure 18 .
Figure 18.Logic diagram of the fuzzy control algorithm principle.

Figure 16 .
Figure 16.System output response the under critical curve method.

Machines 2023 , 24 Figure 16 .
Figure 16.System output response the under critical curve method.

Figure 17 .
Figure 17.Swing angle curve under the control of the PID anti-sway controller.

Figure 18 .
Figure 18.Logic diagram of the fuzzy control algorithm principle.

17 .
Swing angle curve under the control of the PID anti-sway controller.

Machines 2023 , 24 Figure 16 .
Figure 16.System output response the under critical curve method.

Figure 17 .
Figure 17.Swing angle curve under the control of the PID anti-sway controller.

Figure 18 .
Figure 18.Logic diagram of the fuzzy control algorithm principle.18. Logic diagram of the fuzzy control algorithm principle.

6. 3 .
Simulation of a Fuzzy PID Control System for the Anti-Sway of the Bridge Crane 6.3.1.Simulation Analysis Model of a Fuzzy PID Anti-Sway Controller for the Bridge Crane

1 p k , 2 pk , and 3 pk
actual output angle and displacement of the bridge crane model, respectively.1 k , 2 k  , and 3 k are the scale factors of the three parameters.are, respectively, the three control parameter values of the swing angle PID controller, they are the initial value of p K , i K , and d K .internal structure of the swing angle fuzzy controller is shown in Figure 20.

Figure 19 .
Figure 19.Simulation model of the anti-sway fuzzy PID controller for the bridge crane.

Figure 20 .
Figure 20.The structure of the swing angle fuzzy controller.6.3.2.Simulation of the Anti-Sway Effect of the Fuzzy PID Controller Figure 21 shows the curve of the swing angle with time under the control of the antisway fuzzy controller.

Figure 19 . 1 p k , 2 pk , and 3 pk
Figure 19.Simulation model of the anti-sway fuzzy PID controller for the bridge crane.

Figure 19 .
Figure 19.Simulation model of the anti-sway fuzzy PID controller for the bridge crane.

Figure 20 .
Figure 20.The structure of the swing angle fuzzy controller.6.3.2.Simulation of the Anti-Sway Effect of the Fuzzy PID Controller Figure 21 shows the curve of the swing angle with time under the control of the antisway fuzzy controller.

Figure 20 .Figure 21 .
Figure 20.The structure of the swing angle fuzzy controller.6.3.2.Simulation of the Anti-Sway Effect of the Fuzzy PID Controller Figure 21 shows the curve of the swing angle with time under the control of the anti-sway fuzzy controller.Machines 2023, 11, x FOR PEER REVIEW 21 of 24

Figure 21 .
Figure 21.Swing angle curve of crane load.

Figure 21 .
Figure 21.Swing angle curve of crane load.

6. 3 . 3 .
Simulation of Swing Angle under Different Rope Lengths and Load MassesIn order to verify the anti-sway positioning effect of the fuzzy PID anti-sway controller when the wire rope length changes, three groups of rope length parameters are set up on the basis of ensuring that the other parameters remain unchanged (

Figure 22 .
Figure 22.Swing angle curve under different wire rope lengths.

Figure 23
Figure 23 shows the swing angle curve under different load masses.We set the three groups of load mass test parameters as: 5 Kg p m 

Figure 22 .
Figure 22.Swing angle curve under different wire rope lengths.

Figure 23 .
Figure 23.Swing angle curve under different loads.

Figure 24 .
Figure 24.Comparison of simulation results of crane swing angle.

Figure 23 .
Figure 23.Swing angle curve under different loads.

Figure 23 .
Figure 23.Swing angle curve under different loads.

Figure 24 .
Figure 24.Comparison of simulation results of crane swing angle.

Figure 24 .
Figure 24.Comparison of simulation results of crane swing angle.

Table 1 .
Table of Load and Mechanical Performance Parameters of the Crane.

Table 2 .
Table of Parameter calculation formulas based on the critical curve method.

Table 2 .
Table of Parameter calculation formulas based on the critical curve method.

Table 3 .
Input and output variable universe and factors.

Table 4 .
Fuzzy rule table of PID parameter correction.