Anti-swing control method and device for portal crane, electronic equipment and medium
By using the combination of dual fuzzy controller and PPO algorithm in container gantry cranes, virtual and three-dimensional simulation models are built, and the problem of fuzzy control experience dependence and slow convergence of PPO algorithm is solved, and the anti-slosh control performance is improved.
Patent Information
- Application Number
- CN202411725160.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In the prior art, fuzzy control is highly dependent on experience, and the PPO algorithm has poor convergence effect and slow convergence in the anti-slope control of container gantry cranes, resulting in insufficient anti-slope control performance.
A virtual anti-shaking simulation model is constructed using a dual fuzzy controller, and interactively trained with these models through the PPO algorithm to gradually build a more accurate anti-shaking control strategy, and finally, interactive training is performed through a three-dimensional simulation model to optimize the anti-shaking control strategy.
The dual fuzzy controller provides training data for the PPO algorithm, which significantly accelerates the convergence speed of the PPO algorithm and improves the anti-slosh control performance of the container gantry crane.
Smart Images

Figure CN119429967A_ABST
Abstract
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 crane is a large lifting equipment used in container terminals, yards or other container loading and unloading areas. It is mainly used for handling, stacking and loading and unloading of containers. Container gantry crane is an under-damped system. Therefore, during the movement, due to the effect of its inertia force or the influence of wind load, the spreader will swing, which will reduce the working efficiency of the container gantry crane and the accuracy of unloading and placing goods. In more serious cases, it will cause accidents such as crane imbalance or tipping.
[0003] At present, electronic anti-sway technology is the main method used by container gantry cranes, which includes common control methods such as input shaping, trajectory planning, open-loop control based on filtering, PID control, fuzzy control, and closed-loop control such as optimal control. Among them, fuzzy control has the advantages of strong robustness and no need for precise models. It is currently widely used in the field of anti-sway control of container gantry cranes, but it is very dependent on experience and requires a lot of practice. The PPO algorithm has been widely used in game AI, robot control, automatic driving and other fields due to its stability, high efficiency and wide applicability. He sets the reward function, allows the agent to interact with the environment, collects a large amount of data, and trains a strategy that can obtain the maximum reward. Therefore, the PPO algorithm can also be applied to the field of anti-sway control of container gantry cranes, but there will be problems such as poor convergence and slow convergence. How to solve the dependence of fuzzy control on experience and the poor and slow convergence of the PPO algorithm in crane anti-sway control to improve the anti-sway control performance of container gantry cranes has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, it is necessary to provide a gantry crane anti-sway control method, device, electronic device 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: The first virtual anti-sway simulation model of the target gantry crane was constructed based on dual fuzzy controllers; Based on the PPO algorithm and the first virtual anti-sway simulation model, a first anti-sway control strategy model is obtained; The acceleration of the vehicle is obtained based on the first virtual anti-sway simulation model, and a second virtual anti-sway simulation model of the target gantry crane is constructed 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 container gantry crane.
[0006] In a possible implementation, the dual fuzzy controller includes: a first fuzzy controller and a second fuzzy controller, the input variable of the first fuzzy controller includes: 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; The input variables of the second fuzzy controller include: the target gantry crane weight swing angle size and the weight swing angle angular velocity, and the output variables of the second fuzzy controller include the second acceleration of the vehicle.
[0007] In a possible implementation manner, 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.
[0008] 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: Modify 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 according to 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; Using the acceleration of the vehicle 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.
[0009] 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: 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.
[0010] In a possible implementation, 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 include: 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 hoisting weight 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.
[0011] In a possible implementation, the functional relationship between the target gantry crane hoisting weight swing angle and the vehicle acceleration is expressed as:
[0012] In the formula, represents the functional relationship; represents the target gantry crane hoisting swing angle; represents the displacement of the vehicle; Indicates the target gantry crane rope length; represents the acceleration due to gravity, s Represents a constant.
[0013] On the other hand, the present invention also provides a gantry crane anti-sway control device, comprising: A first virtual anti-sway simulation model acquisition module, used for constructing a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller; A first anti-sway control strategy model acquisition module, 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 is used 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; 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; The anti-sway control strategy determination module 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.
[0014] On the other hand, the present invention also provides an electronic device, including 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 method described in any one of the above implementations.
[0015] 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 in a gantry crane anti-sway control method described in any of the above-mentioned implementation methods.
[0016] 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 the training of a PPO algorithm 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 a 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, obtains 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, and obtains 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 a 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
[0017] Figure 1 A flow chart of an embodiment of a gantry crane anti-sway control method provided by the present invention; 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; Figure 3 A schematic diagram of the control flow of a dual fuzzy controller in an embodiment of a gantry crane anti-sway control method provided by the present invention; 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; 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; Figure 6 A schematic diagram of a membership function curve of a target gantry crane hanger swing angle in an embodiment of a gantry crane anti-sway control method provided by the present invention; Figure 7 A schematic diagram of a membership function curve of the angular velocity of the swing angle of the target gantry crane hanger in an embodiment of the gantry crane anti-sway control method provided by the present invention; Figure 8 A 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; Fig. 9 For the present invention Figure 1 A schematic flow chart of an embodiment of S102; Fig.10 A schematic diagram of a PPO algorithm flow chart in an embodiment of a gantry crane anti-sway control method provided by the present invention; Fig.11 For the present invention Figure 1 A schematic flow chart of an embodiment of S103; Fig.12 The working plane diagram of the LMQ3543 container gantry crane provided by the present invention; Fig.13 A three-dimensional model structure diagram of the LMQ3543 container gantry crane provided by the present invention; Fig.14 A schematic flow chart of an embodiment of a gantry crane anti-sway control device provided by the present invention; Fig.15 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present invention are 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, but are not used to limit the scope of the present invention.
[0019] Before presenting the embodiments, the following terms are explained.
[0020] Simulink is a visual simulation tool in MATLAB launched by Mathworks, USA. Simulink 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 module library, and a solver, which can model and simulate dynamic systems.
[0021] ADAMS (Automatic Dynamic Analysis of Mechanical Systems) uses an interactive graphical environment and a parts library, constraint library, and force library to create a fully parametric mechanical system geometry model. Its solver uses the Lagrange equation method in the theory of multi-rigid body system dynamics to establish the system dynamics equation, perform statics, kinematics, and dynamics analysis on the virtual mechanical system, and output displacement, velocity, acceleration, and reaction force curves. ADAMS software simulation can be used to predict the performance, range of motion, collision detection, peak load of mechanical systems, and calculate the input load of finite elements.
[0022] The present invention provides a gantry crane anti-sway control method, device, electronic equipment and medium, which are respectively described below.
[0023] Figure 1 A schematic flow chart of an embodiment of the gantry crane anti-sway control method provided by the present invention is as follows: Figure 1 As shown, the gantry crane anti-sway control method includes: S101, constructing a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller; S102, obtaining a first anti-sway control strategy model based on the PPO algorithm and the first virtual anti-sway simulation model; 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; 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; S105, constructing a three-dimensional anti-sway simulation model of the target gantry crane, interactively training the three-dimensional anti-sway simulation model and the second anti-sway control strategy model to obtain the anti-sway control strategy of the target gantry crane.
[0024] Compared with the prior art, the present embodiment 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 the training of the PPO algorithm 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, obtains 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, and 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 a dual fuzzy controller, thereby accelerating the convergence speed of the PPO algorithm and improving the anti-sway control performance of the gantry crane.
[0025] 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.
[0026] In some embodiments of the present invention, the dual fuzzy controller includes: a first fuzzy controller and a second fuzzy controller, the input variable of the first fuzzy controller includes: 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; The input variables of the second fuzzy controller include: the target gantry crane weight swing angle size and the weight swing angle angular velocity, and the output variables of the second fuzzy controller include the second acceleration of the vehicle.
[0027] 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.
[0028] In a specific embodiment of the present invention, step S101, based on the dual fuzzy controller, a first virtual anti-sway simulation model of the target gantry crane is constructed. Specifically, the LMQ3543 container gantry crane is used as an example for explanation. It can be understood that other types of gantry cranes can also be used. In simulink, a virtual anti-sway simulation model of the LMQ3543 container gantry crane is constructed based on the dual fuzzy controller, and 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 according to the first virtual anti-sway simulation model.
[0029] It should be noted that for the traditional anti-sway control method of container gantry crane based on fuzzy control, the general input only uses the position difference of the trolley (target position - current position) x And the size of 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 angle 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.
[0030] Specifically, Figure 2 The figure shows the control flow diagram of the fuzzy controller. The control flow of the 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. 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.
[0031] 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 lifting weight θ and the angular velocity of the weight swing angle , 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.
[0032] Determine the position difference of the trolley (target position - current position) by combining various parameters of LMQ3543 container gantry crane xThe basic domain is [-2, 12] m, and the car speed The basic domain is [-1.25, 1.25] m / s, and the swing angle of the hanging weight is θ The basic domain is [-15, 15] degrees and the angular velocity of the hanging weight 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 .
[0033] Figure 4-Figure 8 The following is a diagram of the membership function curves of the trolley position difference, trolley speed, sling swing angle, sling swing angle angular velocity and trolley acceleration. All variables use five fuzzy subsets: "positive large (PB)", "positive small (PS)", "zero (ZO)", "negative small (NS)", "negative large (NB)", and the membership function uses a triangular membership function form, with trapezoidal membership function forms at both ends.
[0034] Then, a fuzzy rule table is formulated to perform fuzzy reasoning on the input variables, based on expert experience, and 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 angle 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.
[0035] Table 1: Control rules considering the position of the trolley running mechanism
[0036] Table 2: Control rules considering the swing angle of the hoist
[0037] After the fuzzy reasoning 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:
[0038] In the above formula, a represents the output variable The membership function The value of on the domain V, Represents the input variables The membership function on the universe U is, and Represents the input variables and The weights of the two fuzzy controller outputs.
[0039] This embodiment uses the trolley displacement and speed, and the sling swing angle and acceleration to design two fuzzy controllers, so as to achieve a better anti-sway control effect.
[0040] In some embodiments of the present invention, in step S102, as Fig. 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: 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 hoisting weight swing angle size, the target gantry crane hoisting weight swing angle angular velocity and the acceleration of the vehicle; S902, determining a position difference of the vehicle according to the target position of the vehicle and the current position of the vehicle; 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; S904, using the acceleration of the vehicle as the action space of the PPO algorithm; S905, determining a reward function value based on the position difference of the vehicle; S906, taking the state space, the action space and the reward function value as a data set; S907 , training the data set based on the PPO algorithm to obtain a trained first anti-sway control strategy model.
[0041] 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: 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.
[0042] In some embodiments of the present invention, in step S102, based on the PPO algorithm and the first virtual anti-sway simulation model, a first anti-sway control strategy model is obtained, which is specifically as follows: 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, two fuzzy controllers can each account for half of the whole process, that is, and w2 are both 0.5, which 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, is 0.4. In this way, we can get the measured anti-sway control scheme, with one scheme as one round, and the simulation time and step length of each round are set to 30s and 0.1s. Collect it, record the state, action and reward of each round and each step length, and make a pre-training data set. After that, initialize the Actor network parameters and Critic network parameters of the PPO algorithm, use the pre-training data set as the environment, and perform interactive training with the PPO algorithm until all the pre-training data are read, and save the pre-training anti-sway control model network parameters.
[0043] 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 angle angular velocity , angular acceleration of the weight swing angle ,s= ; Action space: Acceleration a of container gantry crane trolley, 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:
[0044] In the above formula, x is the position difference of the car (target position - current position), and 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 displacement, speed, swing angle, angular velocity and angular acceleration of the car exceed the limit Takes 1, takes 0 within the specified range.
[0045] Fig.10 The figure 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 initialization 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.
[0046] The specific steps for updating network parameters are as follows: Step 1: Initialize the Actor network parameters and Critic network parameters in the PPO initialization model respectively; Step 2: Read the pre-training data set. When the number of reading steps reaches the set update_timestep, assign the parameters of the target strategy π to πold; Step 3: Use gradient ascent to update the Actor network parameters, and use gradient descent to update the Critic network parameters; Step 4: Repeat steps 2 and 4 until all pre-training data sets are read and the network model parameters are saved.
[0047] In some embodiments of the present invention, in step S103, Fig.11 As shown, the acceleration of the vehicle 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: S1101, obtaining the acceleration of the vehicle based on the first virtual anti-sway simulation model; S1102, obtaining a functional relationship between a target gantry crane hoisting weight swing angle and the vehicle acceleration according to the structure of the target gantry crane; S1103. 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.
[0048] 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:
[0049] In the formula, represents the functional relationship; represents the target gantry crane hoisting swing angle; represents the displacement of the vehicle; Indicates the target gantry crane rope length; represents the acceleration due to gravity, s Represents a constant.
[0050] 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: In simulink, a simulation model of LMQ3543 container gantry crane anti-sway control is built based on the PPO algorithm, and a large number of interactive trainings are carried out on the pre-trained anti-sway control model to obtain the initial anti-sway control strategy: First, according to the structure of LMQ3543 container gantry crane, the hoisting weight swing angle θ and the trolley acceleration are derived. The transfer function between , the formula is as follows:
[0051] 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. Fig.10 The provided PPO algorithm flow chart is used to update the strategy, and 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 through the data in the experience pool until the model achieves the target anti-sway effect, that is, the round reward reaches the established requirements, or the number of interaction rounds reaches the established requirements. The cycle is stopped, the model parameters are saved, and the second anti-sway control strategy model is obtained.
[0052] The specific steps for updating network parameters are as follows: Step 1: Establish the second virtual anti-sway simulation model in simulink based on the container gantry crane dynamics model and PPO algorithm; Step 2: Read the pre-trained network model parameters; Step 3: Initialize the environment and get the initial state; Step 4: Get the action with the Actor network, and use Simulink to simulate and read the action to get the next state and reward until the end of the round; Step 5: Repeat steps 3 and 4. When the number of interactions reaches update_timestep, assign the parameters of the target strategy π to πold. Step 6: Use gradient ascent to update the Actor network parameters, and use gradient descent to update the Critic network parameters; Step 7: Repeat steps 3 to 4 until the training round reward meets the requirement or the maximum number of training rounds is reached, stop the simulation, and save the model parameters.
[0053] 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: like Fig.12 The figure shows the working plan of LMQ3543 container gantry crane. Fig.13 The figure shows the structure diagram of the 3D model of the LMQ3543 container gantry crane. A virtual prototype is built in Adams, and a small amount of interactive training is 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 derived hoisting weight swing angle θ and trolley acceleration The transfer function between In the derivation process, some assumptions and simplifications were made, 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 are very high. Therefore, in order to better optimize the anti-sway control measurement, in this embodiment, Adams established a virtual prototype to restore the real environment as much as possible. First, in SolidWorks, a 3D model was established according to the LMQ3543 container gantry crane drawing, and then imported into ADMAS to establish a virtual prototype. Fig.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.
[0054] 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 Fig.14 As shown, the embodiment of the present invention further provides a gantry crane anti-sway control device, a gantry crane anti-sway control method device 1400 includes: 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; A first anti-sway control strategy model acquisition module 1402 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 1403 is used 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; The second anti-sway control strategy model acquisition module 1404 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; 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.
[0055] 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.
[0056] like Fig.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. Fig.15 Only some components of the electronic device 1500 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0057] In some embodiments, the processor 1501 can be a central processing unit (CPU), a microprocessor or other data processing chip, which is 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.
[0058] 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 in 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, a multi-cloud, etc., or any combination thereof.
[0059] 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.
[0060] 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.
[0061] In some embodiments, the display 1503 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 1503 is used to display information on the electronic device 1500 and to display a visual user interface. The components 1501-1503 of the electronic device 1500 communicate with each other via a system bus.
[0062] 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: The first virtual anti-sway simulation model of the target gantry crane was constructed based on dual fuzzy controllers; Based on the PPO algorithm and the first virtual anti-sway simulation model, a first anti-sway control strategy model is obtained; The acceleration of the vehicle is obtained based on the first virtual anti-sway simulation model, and a second virtual anti-sway simulation model of the target gantry crane is constructed 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 container gantry crane.
[0063] 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, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.
[0064] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 1500 mentioned, and 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, etc. 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).
[0065] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0066] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A gantry crane anti-sway control method, characterized in that: include: The first virtual anti-sway simulation model of the target gantry crane was constructed based on dual fuzzy controllers; Based on the PPO algorithm and the first virtual anti-sway simulation model, a first anti-sway control strategy model is obtained; The acceleration of the vehicle is obtained based on the first virtual anti-sway simulation model, and a second virtual anti-sway simulation model of the target gantry crane is constructed 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.
2. The gantry crane anti-sway control method according to claim 1, characterized in that: The dual fuzzy controller comprises: a first fuzzy controller and a second fuzzy controller, the input variable of the first fuzzy controller comprises: 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 comprises a first acceleration of the vehicle; The input variables of the second fuzzy controller include: the target gantry crane weight swing angle size and the weight swing angle angular velocity, and the output variables of the second fuzzy controller include the second acceleration of the vehicle.
3. The gantry crane anti-sway control method according to claim 2, characterized in that: 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.
4. The gantry crane anti-sway control method according to claim 3 is characterized in that: The method of obtaining a first anti-sway control strategy model based on the PPO algorithm and the first virtual anti-sway control simulation model includes: Modify 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 according to 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; Using the acceleration of the vehicle 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.
5. The gantry crane anti-sway control method according to claim 4, characterized in that: The training of the data set based on the PPO algorithm to obtain a trained first anti-sway control strategy model includes: 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.
6. 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 hoisting weight 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.
7. The gantry crane anti-sway control method according to claim 1, characterized in that: The expression of the functional relationship between the target gantry crane load swing angle and the vehicle acceleration is: In the formula, represents the functional relationship; represents 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.
8. A gantry crane anti-sway control device, characterized in that: include: A first virtual anti-sway simulation model acquisition module, used for constructing a first virtual anti-sway simulation model of a target gantry crane based on a dual fuzzy controller; A first anti-sway control strategy model acquisition module, 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 is used 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; 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; The anti-sway control strategy determination module 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 gantry crane.
9. 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 7.
10. 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 a gantry crane anti-sway control method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Design method of intelligent swing-proof control system of crane
CN101441441A
Intelligent anti-swinging crane control system and method based on fuzzy PID control
CN107487717A
Anti-swing control method and device for gantry crane based on deep reinforcement learning
CN117466145A
Heuristic fuzzy controller for gantry cranes
US20180297821A1
Anti-sway control method and bridge crane
WO2022227585A1