A gantry crane anti-sway control method, device, electronic equipment and medium

By using the combination of dual fuzzy controllers and PPO algorithms in container gantry cranes, a virtual anti-shaking simulation model is built and interactively trained, the problem of fuzzy control dependence on experience and slow convergence of PPO algorithms is solved, fast convergence and efficient anti-shaking control are achieved, and the working efficiency and safety of container gantry cranes are improved.

CN119429967BActive Publication Date: 2025-09-02WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411725160.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-09-02
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

In the prior art, the dependence of fuzzy control on experience and the PPO algorithm for the anti-slope control of container gantry cranes have poor convergence and slow convergence, resulting in a reduced working efficiency and cargo unloading accuracy of container gantry cranes, and may even cause accidents such as crane imbalance or dumping.

Method used

The first virtual anti-slope simulation model of the target gantry crane is constructed based on the dual fuzzy controller, and interactive training is carried out in combination with the PPO algorithm. By modifying the parameters of the dual fuzzy controller, training data is provided for the PPO algorithm, and a three-dimensional anti-slope simulation model of the target gantry crane is constructed to achieve rapid convergence and improve anti-slope control performance.

Benefits of technology

The dual fuzzy controller provides a large amount of training data for the PPO algorithm, which accelerates the convergence speed of the PPO algorithm, improves the anti-slope control performance of container gantry cranes, improves control accuracy and stability, and reduces accident risk.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119429967B_ABST
    Figure CN119429967B_ABST
Patent Text Reader

Abstract

The present invention relates to a gantry crane anti-sway control method, device, electronic device, and medium, belonging to the field of lifting and transportation technology. The method comprises: constructing a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller; obtaining a first anti-sway control strategy model based on a PPO algorithm and the first virtual anti-sway simulation model; constructing a second virtual anti-sway simulation model of the target gantry crane based on the first virtual anti-sway simulation model; interactively training the second virtual anti-sway simulation model with the first anti-sway control strategy model based on the PPO algorithm to obtain a second anti-sway control strategy model; constructing a three-dimensional anti-sway simulation model of the target gantry crane and interactively training the second anti-sway control strategy model to obtain a final anti-sway control strategy. The present invention provides a large amount of training data for the PPO algorithm through the dual fuzzy controller, thereby accelerating the convergence speed of the PPO algorithm and improving the anti-sway control performance of the gantry crane.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lifting and transportation, and in particular to a gantry crane anti-sway control method, device, electronic equipment and medium. Background Art

[0002] Container gantry cranes are large lifting equipment used in container terminals, storage yards, and other container loading and unloading areas. They are primarily used for handling, stacking, and loading and unloading containers. Container gantry cranes are underdamped systems. Therefore, during operation, inertia or wind loads can cause spreader yaw, reducing the crane's efficiency and cargo unloading accuracy. In more serious cases, this can lead to accidents such as crane imbalance or tipping.

[0003] Currently, electronic anti-sway technology is the predominant method used in container gantry cranes. It includes common control methods such as input shaping, trajectory planning, filter-based open-loop control, PID control, fuzzy control, and closed-loop control such as optimal control. Fuzzy control, with its advantages of robustness and lack of a precise model, is currently widely used in container gantry crane anti-sway control. However, it relies heavily on experience and requires extensive practice. The PPO algorithm, due to its stability, efficiency, and wide applicability, has been widely used in game AI, robotic control, and autonomous driving. It uses a set reward function to allow an intelligent agent to interact with the environment, collects large amounts of data, and trains a strategy that maximizes reward. Therefore, the PPO algorithm can also be applied to container gantry crane anti-sway control, but it suffers from issues such as poor and slow convergence. Addressing fuzzy control's reliance on experience and the PPO algorithm's poor and slow convergence in crane anti-sway control is an urgent issue, aiming to improve the performance of container gantry crane anti-sway control. Summary of the Invention

[0004] In view of this, it is necessary to provide a gantry crane anti-sway control method, device, electronic equipment and medium to solve the problems of fuzzy control's dependence on experience and the poor and slow convergence of the PPO algorithm in crane anti-sway control.

[0005] In order to solve the above problems, the present invention provides a gantry crane anti-sway control method, comprising:

[0006] The first virtual anti-sway simulation model of the target gantry crane was constructed based on dual fuzzy controllers;

[0007] Based on the PPO algorithm and the first virtual anti-sway simulation model, a first anti-sway control strategy model is obtained;

[0008] Obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model, and constructing a second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle;

[0009] Based on the PPO algorithm, the second virtual anti-sway simulation model is interactively trained with the first anti-sway control strategy model to obtain the second anti-sway control strategy model;

[0010] A three-dimensional anti-sway simulation model of the target gantry crane is constructed, and the three-dimensional anti-sway simulation model is interactively trained with the second anti-sway control strategy model to obtain the anti-sway control strategy of the target container gantry crane.

[0011] In one possible implementation, the dual fuzzy controller includes: a first fuzzy controller and a second fuzzy controller, the input variables of the first fuzzy controller include: a difference between a target position and a current position of the vehicle, and a speed of the vehicle, and the output variable of the first fuzzy controller includes a first acceleration of the vehicle;

[0012] The input variables of the second fuzzy controller include: the target gantry crane load swing angle size and the load swing angle angular velocity, and the output variable of the second fuzzy controller includes the second acceleration of the vehicle.

[0013] In a possible implementation, the first virtual anti-sway simulation model is used to characterize the acceleration of the vehicle, and the acceleration of the vehicle is obtained by weighting the first acceleration and the second acceleration based on a linear weighted sum method.

[0014] In a possible implementation, obtaining the first anti-sway control strategy model based on the PPO algorithm and the first virtual anti-sway control simulation model includes:

[0015] Modifying the weights of the first fuzzy controller and the second fuzzy controller in the dual fuzzy controller to obtain the target position of the vehicle, the current position of the vehicle, the speed of the vehicle, the target gantry crane weight swing angle size, the target gantry crane weight swing angle angular velocity and the acceleration of the vehicle;

[0016] determining a position difference of the vehicle based on the target position of the vehicle and the current position of the vehicle;

[0017] The position difference, the speed of the vehicle, the target gantry crane weight swing angle and the target gantry crane weight swing angle angular velocity are used as the state space of the PPO algorithm;

[0018] The acceleration of the vehicle is used as the action space of the PPO algorithm;

[0019] determining a reward function value based on the position difference of the vehicles;

[0020] Taking the state space, the action space, and the reward function value as a data set;

[0021] The data set is trained based on the PPO algorithm to obtain a trained first anti-sway control strategy model.

[0022] In a possible implementation, the training of the data set based on the PPO algorithm to obtain a trained first anti-sway control strategy model includes:

[0023] S1. Initialize the Actor network parameters and Critic network parameters of the PPO algorithm to obtain the initial Actor network parameters and initial Actor network parameters;

[0024] S2. Read the data set and interact with the environment based on the current strategy to obtain the state, action, immediate reward and next state;

[0025] S3. Update the initial Actor network parameters and the initial Actor network parameters based on the immediate reward and the next state;

[0026] S4. Repeat steps S2-S3 until all the data sets are read, and obtain final Actor network parameters and final Critic network parameters, and obtain a first anti-sway control strategy model based on the final Actor network parameters and final Critic network parameters.

[0027] In one possible implementation, obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model and constructing the second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle include:

[0028] Obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model;

[0029] According to the structure of the target gantry crane, a functional relationship between the target gantry crane load swing angle and the vehicle acceleration is obtained;

[0030] Based on the functional relationship and the structural parameters of the target gantry crane, a second virtual anti-sway control simulation model of the target gantry crane is obtained.

[0031] In a possible implementation, the functional relationship between the target gantry crane load swing angle and the vehicle acceleration is expressed as follows:

[0032]

[0033] Where, represents the functional relationship; Indicates the target gantry crane hoisting swing angle; represents the displacement of the vehicle; represents the target gantry crane rope length; represents the acceleration due to gravity, s Represents a constant.

[0034] On the other hand, the present invention also provides a gantry crane anti-sway control device, comprising:

[0035] A first virtual anti-sway simulation model acquisition module is used to construct a first virtual anti-sway simulation model of the target gantry crane based on a dual fuzzy controller;

[0036] A first anti-sway control strategy model acquisition module is used to obtain a first anti-sway control strategy model based on a PPO algorithm and a first virtual anti-sway simulation model;

[0037] a second virtual anti-sway simulation model acquisition module, configured to obtain the acceleration of the vehicle based on the first virtual anti-sway simulation model, and construct a second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle;

[0038] A second anti-sway control strategy model acquisition module is used to interactively train the second virtual anti-sway simulation model with the first anti-sway control strategy model based on the PPO algorithm to obtain the second anti-sway control strategy model;

[0039] The anti-sway control strategy determination module is used to build a three-dimensional anti-sway simulation model of the target gantry crane, interactively train the three-dimensional anti-sway simulation model with the second anti-sway control strategy model, and obtain the anti-sway control strategy of the target container gantry crane.

[0040] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein:

[0041] The memory is used to store programs;

[0042] The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the gantry crane anti-sway control method described in any one of the above implementations.

[0043] On the other hand, the present invention also provides a computer-readable storage medium for storing computer-readable programs or instructions, which, when executed by a processor, can implement the steps of a gantry crane anti-sway control method described in any of the above-mentioned implementation methods.

[0044] The beneficial effects of the present invention are as follows: the present invention provides a gantry crane anti-sway control method, which constructs a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller, provides a large amount of data for PPO algorithm training by modifying the parameters of the dual fuzzy controller to achieve rapid convergence, obtains a first anti-sway control strategy model based on the PPO algorithm and the first virtual anti-sway simulation model, constructs a second virtual anti-sway simulation model of the target gantry crane based on the first virtual anti-sway simulation model, interactively trains the second virtual anti-sway simulation model with the first anti-sway control strategy model based on the PPO algorithm to obtain a second anti-sway control strategy model, constructs a three-dimensional anti-sway simulation model of the target gantry crane, thereby constructing a real model of the target gantry crane, interactively trains the three-dimensional anti-sway simulation model with the second anti-sway control strategy model to obtain the anti-sway control strategy of the target gantry crane. The present invention provides a large amount of training data for the PPO algorithm through the dual fuzzy controller, thereby accelerating the convergence speed of the PPO algorithm and improving the anti-sway control performance of the gantry crane. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flow chart of an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0046] Figure 2 A schematic diagram of a control flow of a fuzzy controller in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0047] Figure 3 A schematic diagram of a control flow of a dual fuzzy controller in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0048] Figure 4 A schematic diagram of a vehicle position difference membership function curve in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0049] Figure 5 A schematic diagram of a vehicle speed difference membership function curve in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0050] Figure 6 A schematic diagram of a membership function curve of a target gantry crane spreader swing angle in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0051] Figure 7 A schematic diagram of a membership function curve of the target gantry crane spreader swing angle angular velocity in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0052] Figure 8A schematic diagram of a vehicle acceleration difference membership function curve in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0053] Figure 9 For the present invention Figure 1 A schematic flow chart of an embodiment of S102;

[0054] Figure 10 A schematic diagram of the PPO algorithm flow in an embodiment of a gantry crane anti-sway control method provided by the present invention;

[0055] Figure 11 For the present invention Figure 1 A schematic flow chart of an embodiment of S103;

[0056] Figure 12 The working plan of the LMQ3543 container gantry crane provided by the present invention;

[0057] Figure 13 A three-dimensional structural diagram of the LMQ3543 container gantry crane provided by the present invention;

[0058] Figure 14 A schematic flow chart of an embodiment of a gantry crane anti-sway control device provided by the present invention;

[0059] Figure 15 This is a schematic structural diagram of an embodiment of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0060] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.

[0061] Before presenting the embodiments, the following terms are explained.

[0062] Simulink is a visual simulation tool within MATLAB, released by MathWorks. It is a block diagram environment for multi-domain simulation and model-based design. It supports system design, simulation, automatic code generation, and continuous testing and verification of embedded systems. Simulink provides a graphical editor, a customizable block library, and solvers for dynamic system modeling and simulation.

[0063] ADAMS (Automatic Dynamic Analysis of Mechanical Systems) uses an interactive graphical environment and libraries of parts, constraints, and forces to create fully parameterized geometric models of mechanical systems. Its solver employs the Lagrange equations from multi-body system dynamics theory to establish system dynamics equations. It then performs static, kinematic, and dynamic analysis on virtual mechanical systems, outputting displacement, velocity, acceleration, and reaction force curves. ADAMS simulations can be used to predict mechanical system performance, range of motion, collision detection, peak loads, and calculate input loads for finite element analysis.

[0064] The present invention provides a gantry crane anti-sway control method, device, electronic equipment and medium, which are described below respectively.

[0065] Figure 1 A schematic flow chart of an embodiment of the gantry crane anti-sway control method provided by the present invention is shown as follows: Figure 1 As shown, the gantry crane anti-sway control method includes:

[0066] S101, constructing a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller;

[0067] S102, obtaining a first anti-sway control strategy model based on the PPO algorithm and the first virtual anti-sway simulation model;

[0068] S103, obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model, and constructing a second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle;

[0069] S104, interactively training the second virtual anti-sway simulation model and the first anti-sway control strategy model based on the PPO algorithm to obtain a second anti-sway control strategy model;

[0070] S105: Construct a three-dimensional anti-sway simulation model of the target gantry crane, interactively train the three-dimensional anti-sway simulation model with the second anti-sway control strategy model, and obtain the anti-sway control strategy of the target gantry crane.

[0071] Compared with the prior art, the present embodiment provides a gantry crane anti-sway control method. A first virtual anti-sway simulation model of a target gantry crane is constructed based on a dual fuzzy controller. By modifying the parameters of the dual fuzzy controller, a large amount of data is provided for the training of the PPO algorithm to achieve rapid convergence. A first anti-sway control strategy model is obtained based on the PPO algorithm and the first virtual anti-sway simulation model. A second virtual anti-sway simulation model of the target gantry crane is constructed based on the first virtual anti-sway simulation model. The second virtual anti-sway simulation model is interactively trained with the first anti-sway control strategy model based on the PPO algorithm to obtain a second anti-sway control strategy model. A three-dimensional anti-sway simulation model of the target gantry crane is constructed, thereby constructing a real model of the target gantry crane. The three-dimensional anti-sway simulation model is interactively trained with the second anti-sway control strategy model to obtain the anti-sway control strategy of the target gantry crane. The present invention provides a large amount of training data for the PPO algorithm through the dual fuzzy controller, thereby accelerating the convergence speed of the PPO algorithm and improving the anti-sway control performance of the gantry crane.

[0072] It should be noted that the application scenario of the present invention is a container bridge gantry crane. It can be understood that the present invention can be applied to any scenario that requires anti-sway control of the gantry starter.

[0073] In some embodiments of the present invention, the dual fuzzy controller includes: a first fuzzy controller and a second fuzzy controller, the input variables of the first fuzzy controller include: a difference between a target position and a current position of the vehicle, and a speed of the vehicle, and the output variable of the first fuzzy controller includes a first acceleration of the vehicle;

[0074] The input variables of the second fuzzy controller include: the target gantry crane load swing angle size and the load swing angle angular velocity, and the output variable of the second fuzzy controller includes the second acceleration of the vehicle.

[0075] In some embodiments of the present invention, the first virtual anti-sway simulation model is used to characterize the acceleration of the vehicle, and the acceleration of the vehicle is obtained by weighting the first acceleration and the second acceleration based on a linear weighted sum method.

[0076] In a specific embodiment of the present invention, step S101 constructs a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller. Specifically, an LMQ3543 container gantry crane is used as an example for illustration, but it is understood that other gantry crane models may also be used. A virtual anti-sway simulation model of the LMQ3543 container gantry crane is constructed in Simulink based on the dual fuzzy controller. A first virtual anti-sway simulation model is obtained in the virtual anti-sway simulation model based on the dual fuzzy controller, and the acceleration of the trolley is obtained based on the first virtual anti-sway simulation model.

[0077] It should be noted that for the traditional anti-sway control method of container gantry crane based on fuzzy control, the general input is only the position difference of the trolley (target position - current position). x and the swing angle of the lifting weight θ As an input variable, but this does not take into account the speed of the car , angular velocity of the weight swing Therefore, the best control accuracy and effect cannot be achieved. If four input variables are used, the fuzzy rules will be too complicated and the design will be difficult. Therefore, this embodiment proposes to use two model controllers to jointly realize the anti-sway of the container gantry crane.

[0078] Specifically, such as Figure 2 The figure shows the control flow of a fuzzy controller. The control flow of a fuzzy controller is as follows: first, the input variables are fuzzified, then fuzzy reasoning is performed, and finally, the output variables are defuzzified to obtain the output variables, which are then fed back to the input to form a closed-loop control.

[0079] like Figure 3 The figure shows the control flow diagram of the dual fuzzy controller. Two fuzzy controllers are used. The input variable of fuzzy controller I is the position difference of the car (target position - current position). x and car speed , the output is a 1; The input variable of fuzzy controller II is the swing angle of the hoist θ and the angular velocity of the weight swing , the output is a 2. Afterwards a 1 and a 2 weighted to get the final output a , and feed back the four inputs to the two fuzzy controllers respectively to form a closed-loop control.

[0080] Determine the position difference of the trolley (target position - current position) based on the various parameters of the LMQ3543 container gantry crane x The basic domain is [-2, 12]m, and the car speed is The basic domain is [-1.25, 1.25] m / s, and the swing angle of the weight is θ The basic domain is [-15, 15] degrees and the angular velocity of the weight pendulum The basic domain is [-15, 15] deg / s, and the basic domain of the car's acceleration a is [0.35, 0.35] m / s 2 .

[0081] Figure 4-Figure 8Schematic diagram of the membership function curves for trolley position difference, trolley speed, spreader swing angle, spreader swing angular velocity, and trolley acceleration. Five fuzzy subsets are used for all variables: "positive large (PB)", "positive small (PS)", "zero (ZO)", "negative small (NS)", and "negative large (NB)". The membership functions are triangular, with trapezoidal membership functions at both ends.

[0082] Then, a fuzzy rule table is formulated to perform fuzzy reasoning on the input variables. Based on expert experience, the position difference (target position - current position) is obtained through simulation. x and the speed of the car Output acceleration a 1. The influence of the weight swing angle θ and the angular velocity of the weight swing Output acceleration a 2, fuzzy rules are formulated and drawn into fuzzy rule tables for fuzzy reasoning, as shown in Tables 1 and 2 below.

[0083] Table 1: Control rules considering the position of the trolley running mechanism

[0084]

[0085] Table 2: Control rules considering the swing angle of the load

[0086]

[0087] After the fuzzy inference is completed, the output variables are obtained by defuzzification. The two fuzzy controllers are defuzzified using the centroid method to obtain the output variables of the two fuzzy controllers. a 1 and a 2. Finally a 1 and a 2. Add different weights to get the final output acceleration a. The defuzzification formula is as follows:

[0088]

[0089] In the above formula, a represents the output variable The membership function The value on the domain V, Represents input variables The membership function on the universe U is, and Represents input variables and The weights of the two fuzzy controller outputs.

[0090] This embodiment uses the trolley displacement and speed, and the sling swing angle and acceleration to design two fuzzy controllers, respectively, to achieve a better anti-sway control effect.

[0091] In some embodiments of the present invention, in step S102, as Figure 9 As shown, the first anti-sway control strategy model is obtained based on the PPO algorithm and the first virtual anti-sway control simulation model, including:

[0092] S901, modifying the weights of the first fuzzy controller and the second fuzzy controller in the dual fuzzy controller to obtain the target position of the vehicle, the current position of the vehicle, the speed of the vehicle, the target gantry crane load swing angle, the target gantry crane load swing angle angular velocity, and the acceleration of the vehicle;

[0093] S902, determining a position difference of the vehicle according to the target position of the vehicle and the current position of the vehicle;

[0094] S903, using the position difference, the speed of the vehicle, the target gantry crane weight swing angle, and the target gantry crane weight swing angle angular velocity as the state space of the PPO algorithm;

[0095] S904: Using the acceleration of the vehicle as the action space of the PPO algorithm;

[0096] S905, determining a reward function value based on the position difference of the vehicle;

[0097] S906, taking the state space, the action space, and the reward function value as a data set;

[0098] S907 : Training the data set based on the PPO algorithm to obtain a trained first anti-sway control strategy model.

[0099] In some embodiments of the present invention, the training of the data set based on the PPO algorithm to obtain a trained first anti-sway control strategy model includes:

[0100] S1. Initialize the Actor network parameters and Critic network parameters of the PPO algorithm to obtain the initial Actor network parameters and initial Actor network parameters;

[0101] S2. Read the data set and interact with the environment based on the current strategy to obtain the state, action, immediate reward and next state;

[0102] S3. Update the initial Actor network parameters and the initial Actor network parameters based on the immediate reward and the next state;

[0103] S4. Repeat steps S2-S3 until all the data sets are read, and obtain final Actor network parameters and final Critic network parameters, and obtain a first anti-sway control strategy model based on the final Actor network parameters and final Critic network parameters.

[0104] In some embodiments of the present invention, in step S102, a first anti-sway control strategy model is obtained based on the PPO algorithm and the first virtual anti-sway simulation model, specifically as follows:

[0105] Modify the weights of the dual fuzzy controller, create a pre-training data set, and interactively train the initialized PPO model to obtain the pre-trained anti-sway control strategy: After building the LMQ3543 container gantry crane anti-sway control simulation model based on the dual fuzzy controller in simulink, we modify the weights and It can be achieved that in different sections, more emphasis is placed on the vehicle's operating efficiency or on the anti-sway effect. For example, it can be achieved that the two fuzzy controllers each account for half of the whole process, that is, If both w2 and w3 are 0.5, it can also be achieved by not performing model control on the swing angle in the first 3m. 1, more emphasis is placed on anti-sway effect in the last 3m is 0.6, 0.4. This method allows us to obtain a quantitative anti-sway control solution. Each solution constitutes one round, with a simulation duration of 30 seconds and a simulation step size of 0.1 seconds. This data is collected, and the state, action, and reward for each round and step are recorded to create a pre-training dataset. The actor and critic network parameters of the PPO algorithm are then initialized. Using the pre-training dataset as the environment, interactive training with the PPO algorithm is performed until all pre-training data is read. The pre-trained anti-sway control model network parameters are then saved.

[0106] The state space is: the position difference of the car (target position - current position) x , the speed of the car , the weight swing angle θ and the weight swing angular velocity , angular acceleration of the weight swing angle ,s= ; Action space: Container gantry crane trolley acceleration a, a= The reward function is used to evaluate the performance of the next state after the current action is executed. The reward function formula is as follows:

[0107]

[0108] In the above formula, x is the position difference of the car (target position - current position), A is a very small positive number, 、 and They are 、 and The weight of x is smaller The bigger, is a fixed value. When the car displacement exceeds, the speed, swing angle, angular velocity and angular acceleration exceed the limit Take 1 if the value is within the specified range and take 0 if the value is within the specified range.

[0109] Figure 10 This is a flow chart of the PPO algorithm. The interaction data is read, where the interaction data is the pre-training data set. When the experience pool is full, the initialized Actor network parameters and Critic network parameters of the PPO algorithm are updated. The Actor network parameters are updated using the gradient ascent strategy, and the Critic network parameters are updated using the gradient descent strategy. Finally, if the model achieves the target anti-sway effect, that is, the round reward meets the established requirements, or the number of interaction rounds meets the established requirements, the loop is stopped, the model parameters are saved, and the first anti-sway control strategy model is obtained.

[0110] The specific steps for updating network parameters are as follows:

[0111] Step 1: Initialize the Actor network parameters and Critic network parameters in the PPO initialization model respectively;

[0112] Step 2: Read the pre-training dataset. When the number of reading steps reaches the set update_timestep, assign the parameters of the target strategy π to πold.

[0113] Step 3: Use gradient ascent to update the Actor network parameters, and use gradient descent to update the Critic network parameters;

[0114] Step 4: Repeat steps 2 and 4 until all pre-training datasets are read and the network model parameters are saved.

[0115] In some embodiments of the present invention, in step S103, as Figure 11 As shown, the vehicle acceleration is obtained based on the first virtual anti-sway simulation model, and the second virtual anti-sway simulation model of the target gantry crane is constructed based on the acceleration of the vehicle, including:

[0116] S1101. Obtaining vehicle acceleration based on the first virtual anti-sway simulation model;

[0117] S1102: Obtaining a functional relationship between a target gantry crane's load swing angle and the vehicle acceleration based on the target gantry crane's structure;

[0118] S1103. Based on the functional relationship and the structural parameters of the target gantry crane, obtain a second virtual anti-sway control simulation model of the target gantry crane.

[0119] In some embodiments of the present invention, the functional relationship between the target gantry crane load swing angle and the vehicle acceleration is expressed as follows:

[0120]

[0121] Where, represents the functional relationship; Indicates the target gantry crane hoisting swing angle; represents the displacement of the vehicle; represents the target gantry crane rope length; represents the acceleration due to gravity, s Represents a constant.

[0122] In a specific embodiment of the present invention, in step S104, the second virtual anti-sway simulation model is interactively trained with the first anti-sway control strategy model based on the PPO algorithm to obtain the second anti-sway control strategy model. The specific steps are as follows:

[0123] In Simulink, a simulation model of the LMQ3543 container gantry crane anti-sway control is built based on the PPO algorithm. A large number of interactive trainings are performed on the pre-trained anti-sway control model to obtain the initial anti-sway control strategy: First, according to the structure of the LMQ3543 container gantry crane, the hoisting weight swing angle θ and the trolley acceleration are derived. The transfer function between , the formula is as follows:

[0124]

[0125] According to this transfer function and the structural parameters of the LMQ3543 container gantry crane, a second virtual anti-sway simulation model with acceleration control is established in Simulink. Figure 10 The provided PPO algorithm flow chart is used to update the strategy. The second virtual anti-sway simulation model controlled by acceleration is used as the environment to interact with the PPO algorithm model to obtain interaction data. When the experience pool is full, the network parameters of the first anti-sway control strategy model are updated using the data in the experience pool until the model achieves the target anti-sway effect, that is, the round reward meets the established requirements, or the number of interaction rounds meets the established requirements. The cycle is stopped, the model parameters are saved, and the second anti-sway control strategy model is obtained.

[0126] The specific steps for updating network parameters are as follows:

[0127] Step 1: Establish a second virtual anti-sway simulation model in Simulink based on the container gantry crane dynamics model and PPO algorithm;

[0128] Step 2: Read the pre-trained network model parameters;

[0129] Step 3: Initialize the environment and get the initial state;

[0130] Step 4: Use the Actor network to obtain actions, and use Simulink to simulate and read the actions to obtain the next state and reward until the end of the round;

[0131] Step 5: Repeat steps 3 and 4. When the number of interactions reaches update_timestep, assign the parameters of the target strategy π to πold.

[0132] Step 6: Use gradient ascent to update the Actor network parameters, and use gradient descent to update the Critic network parameters;

[0133] Step 7: Repeat steps 3 to 4 until the training round reward meets the requirements or reaches the maximum number of training rounds, stop the simulation, and save the model parameters.

[0134] In a specific embodiment of the present invention, in step S105, a three-dimensional anti-sway simulation model of a target gantry crane is constructed, and the three-dimensional anti-sway simulation model is interactively trained with the second anti-sway control strategy model to obtain an anti-sway control strategy for a target container gantry crane. The specific steps are as follows:

[0135] like Figure 12 The figure shows the working plan of LMQ3543 container gantry crane. Figure 13 The figure shows the structure of the 3D model of the LMQ3543 container gantry crane. A virtual prototype was built in Adams, and a small amount of interactive training was performed with the initial anti-sway control strategy model to obtain the final anti-sway control strategy: Since the simulation model built in Simulink is based on the derivation of the hoisting weight swing angle θ and the trolley acceleration The transfer function between The derivation process makes some assumptions and simplifications, so it may not represent the actual operating environment of the LMQ3543 container gantry crane. If the correlation experiment is carried out in the actual field, the cost and operation difficulty will be very high. Therefore, in order to better optimize the anti-sway control measurement, in this embodiment, Adams builds a virtual prototype to restore the real environment as much as possible. First, in SolidWorks, a 3D model is built according to the LMQ3543 container gantry crane drawing, and then imported into Adams to build a virtual prototype. Figure 10 The provided PPO algorithm flow chart is used to update the strategy, and a small amount of interaction is further performed on the second anti-sway control strategy model using the virtual prototype as the environment to obtain the anti-sway control strategy of the target container gantry crane.

[0136] In order to better implement a gantry crane anti-sway control method in an embodiment of the present invention, based on a gantry crane anti-sway control method, correspondingly, as Figure 14 As shown, an embodiment of the present invention further provides a gantry crane anti-sway control device, a gantry crane anti-sway control method device 1400 includes:

[0137] A first virtual anti-sway simulation model acquisition module 1401 is used to construct a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller;

[0138] A first anti-sway control strategy model acquisition module 1402 is configured to obtain a first anti-sway control strategy model based on a PPO algorithm and a first virtual anti-sway simulation model;

[0139] A second virtual anti-sway simulation model acquisition module 1403 is configured to obtain the acceleration of the vehicle based on the first virtual anti-sway simulation model, and to construct a second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle;

[0140] A second anti-sway control strategy model acquisition module 1404 is configured to interactively train the second virtual anti-sway simulation model and the first anti-sway control strategy model based on a PPO algorithm to obtain a second anti-sway control strategy model;

[0141] The anti-sway control strategy determination module 1405 is used to construct a three-dimensional anti-sway simulation model of the target gantry crane, interactively train the three-dimensional anti-sway simulation model with the second anti-sway control strategy model, and obtain the anti-sway control strategy of the target container gantry crane.

[0142] The gantry crane anti-sway control device 1400 provided in the above embodiment can implement the technical solution described in the above embodiment of the gantry crane anti-sway control method. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above embodiment of the gantry crane anti-sway control method, which will not be repeated here.

[0143] like Figure 15 As shown, the present invention also provides an electronic device 1500. The electronic device 1500 includes a processor 1501, a memory 1502 and a display 1503. Figure 15 Only some of the components of the electronic device 1500 are shown, but it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.

[0144] In some embodiments, the processor 1501 can be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 1502, such as a gantry crane anti-sway control method in the present invention.

[0145] In some embodiments, processor 1501 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, processor 1501 may be local or remote. In some embodiments, processor 1501 may be implemented on a cloud platform. In some embodiments, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, multiple clouds, or any combination thereof.

[0146] In some embodiments, the memory 1502 may be an internal storage unit of the electronic device 1500, such as a hard disk or memory of the electronic device 1500. In other embodiments, the memory 1502 may also be an external storage device of the electronic device 1500, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 1500.

[0147] Furthermore, the memory 1502 may include both an internal storage unit of the electronic device 1500 and an external storage device. The memory 1502 is used to store application software installed in the electronic device 1500 and various data.

[0148] In some embodiments, display 1503 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 1503 is used to display information on electronic device 1500 and to display a visual user interface. Components 1501-1503 of electronic device 1500 communicate with each other via a system bus.

[0149] In one embodiment, when the processor 1501 executes a gantry crane anti-sway control program in the memory 1502, the following steps may be implemented:

[0150] The first virtual anti-sway simulation model of the target gantry crane was constructed based on dual fuzzy controllers;

[0151] Based on the PPO algorithm and the first virtual anti-sway simulation model, a first anti-sway control strategy model is obtained;

[0152] Obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model, and constructing a second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle;

[0153] Based on the PPO algorithm, the second virtual anti-sway simulation model is interactively trained with the first anti-sway control strategy model to obtain the second anti-sway control strategy model;

[0154] A three-dimensional anti-sway simulation model of the target gantry crane is constructed, and the three-dimensional anti-sway simulation model is interactively trained with the second anti-sway control strategy model to obtain the anti-sway control strategy of the target container gantry crane.

[0155] It should be understood that when the processor 1501 executes a gantry crane anti-sway control program in the memory 1502, in addition to the above functions, it can also implement other functions. For details, please refer to the description of the corresponding method embodiment above.

[0156] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 1500 mentioned. The electronic device 1500 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, or the like. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft, or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1500 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0157] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0158] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.

Claims

1. A gantry crane anti-sway control method, characterized in that: include: A first virtual anti-sway simulation model of a target gantry crane is constructed based on a dual fuzzy controller, the dual fuzzy controller comprising: a first fuzzy controller and a second fuzzy controller, the input variables of the first fuzzy controller comprising: a difference between a target position and a current position of the vehicle, and a sum of the vehicle's speed, and the output variable of the first fuzzy controller comprising a first acceleration of the vehicle; the input variables of the second fuzzy controller comprising: a swing angle of a target gantry crane's weight and an angular velocity of the swing angle of the weight, the output variable of the second fuzzy controller comprising a second acceleration of the vehicle, the first virtual anti-sway simulation model being used to characterize the acceleration of the vehicle, and the acceleration of the vehicle being obtained by weighting the first acceleration and the second acceleration based on a linear weighted sum method; Based on the PPO algorithm and the first virtual anti-sway simulation model, a first anti-sway control strategy model is obtained; Obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model, and constructing a second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle; Based on the PPO algorithm, the second virtual anti-sway simulation model is interactively trained with the first anti-sway control strategy model to obtain the second anti-sway control strategy model; A three-dimensional anti-sway simulation model of the target gantry crane is constructed, and the three-dimensional anti-sway simulation model is interactively trained with the second anti-sway control strategy model to obtain the anti-sway control strategy of the target gantry crane; The first anti-sway control strategy model is obtained based on the PPO algorithm and the first virtual anti-sway control simulation model, including: Modifying the weights of the first fuzzy controller and the second fuzzy controller in the dual fuzzy controller to obtain the target position of the vehicle, the current position of the vehicle, the speed of the vehicle, the target gantry crane weight swing angle size, the target gantry crane weight swing angle angular velocity and the acceleration of the vehicle; determining a position difference of the vehicle based on the target position of the vehicle and the current position of the vehicle; The position difference, the speed of the vehicle, the target gantry crane weight swing angle and the target gantry crane weight swing angle angular velocity are used as the state space of the PPO algorithm; The acceleration of the vehicle is used as the action space of the PPO algorithm; determining a reward function value based on the position difference of the vehicles; Taking the state space, the action space, and the reward function value as a data set; The data set is trained based on the PPO algorithm to obtain a trained first anti-sway control strategy model.

2. The gantry crane anti-sway control method according to claim 1, characterized in that: The data set is trained based on the PPO algorithm to obtain a trained first anti-sway control strategy model, including: S1. Initialize the Actor network parameters and Critic network parameters of the PPO algorithm to obtain the initial Actor network parameters and initial Actor network parameters; S2. Read the data set and interact with the environment based on the current strategy to obtain the state, action, immediate reward and next state; S3. Update the initial Actor network parameters and the initial Actor network parameters based on the immediate reward and the next state; S4. Repeat steps S2-S3 until all the data sets are read, and obtain final Actor network parameters and final Critic network parameters, and obtain a first anti-sway control strategy model based on the final Actor network parameters and final Critic network parameters.

3. The gantry crane anti-sway control method according to claim 1, characterized in that: The method of obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model and constructing the second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle includes: Obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model; According to the structure of the target gantry crane, a functional relationship between the target gantry crane load swing angle and the vehicle acceleration is obtained; Based on the functional relationship and the structural parameters of the target gantry crane, a second virtual anti-sway control simulation model of the target gantry crane is obtained.

4. The gantry crane anti-sway control method according to claim 1, characterized in that: The functional relationship between the target gantry crane load swing angle and the vehicle acceleration is expressed as follows: Where, represents the functional relationship; Indicates the target gantry crane hoisting swing angle; represents the displacement of the vehicle; represents the target gantry crane rope length; represents the acceleration due to gravity, s Represents a constant.

5. A gantry crane anti-sway control device, characterized in that: The device is based on the gantry crane anti-sway control method according to any one of claims 1 to 4, comprising: a first virtual anti-sway simulation model acquisition module, configured to construct a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller, the dual fuzzy controller comprising: a first fuzzy controller and a second fuzzy controller, the input variables of the first fuzzy controller comprising: a difference between a target position and a current position of the vehicle, and a sum of the vehicle's speed, the output variable of the first fuzzy controller comprising a first acceleration of the vehicle; the input variables of the second fuzzy controller comprising: a target gantry crane's weight swing angle and a weight swing angle angular velocity, the output variable of the second fuzzy controller comprising a second acceleration of the vehicle, the first virtual anti-sway simulation model being configured to characterize the vehicle's acceleration, the vehicle's acceleration being obtained by weighting the first acceleration and the second acceleration using a linear weighted sum method; A first anti-sway control strategy model acquisition module is used to obtain a first anti-sway control strategy model based on a PPO algorithm and a first virtual anti-sway simulation model; a second virtual anti-sway simulation model acquisition module, configured to obtain the acceleration of the vehicle based on the first virtual anti-sway simulation model, and construct a second virtual anti-sway simulation model of the target gantry crane based on the acceleration of the vehicle; A second anti-sway control strategy model acquisition module is used to interactively train the second virtual anti-sway simulation model with the first anti-sway control strategy model based on the PPO algorithm to obtain the second anti-sway control strategy model; An anti-sway control strategy determination module is used to construct a three-dimensional anti-sway simulation model of a target gantry crane, interactively train the three-dimensional anti-sway simulation model with a second anti-sway control strategy model, and obtain the anti-sway control strategy of the target gantry crane; The first anti-sway control strategy model is obtained based on the PPO algorithm and the first virtual anti-sway control simulation model, including: Modifying the weights of the first fuzzy controller and the second fuzzy controller in the dual fuzzy controller to obtain the target position of the vehicle, the current position of the vehicle, the speed of the vehicle, the target gantry crane weight swing angle size, the target gantry crane weight swing angle angular velocity and the acceleration of the vehicle; determining a position difference of the vehicle based on the target position of the vehicle and the current position of the vehicle; The position difference, the speed of the vehicle, the target gantry crane weight swing angle and the target gantry crane weight swing angle angular velocity are used as the state space of the PPO algorithm; The acceleration of the vehicle is used as the action space of the PPO algorithm; determining a reward function value based on the position difference of the vehicles; Taking the state space, the action space, and the reward function value as a data set; The data set is trained based on the PPO algorithm to obtain a trained first anti-sway control strategy model.

6. An electronic device, characterized in that: comprising a memory and a processor, wherein, The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the gantry crane anti-sway control test method described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the gantry crane anti-sway control method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Intelligent anti-swinging crane control system and method based on fuzzy PID control

    CN107487717A

  • Anti-sway control method and bridge crane

    WO2022227585A1