Method for controlling lifting appliance of overhead and portal crane based on multi-stage model predictive control

Through the multi-stage model predictive control method, combined with dynamic modeling and spatial perception, the swing angle suppression and obstacle avoidance of the gantry crane spreader in complex environments are achieved, the operating stability and terminal positioning accuracy of the spreader are improved, and the problem of insufficient adaptability of traditional control methods in complex environments is solved.

CN120757005AActive Publication Date: 2025-10-10WUHAN GANGDI INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202511278032.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-10-10
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

Existing gantry crane spreader control methods have shortcomings when it comes to spreader swing angle suppression and obstacle avoidance. Traditional methods rely on additional sensors and lack dynamic adaptability to rope length changes and obstacle distribution. This results in a lack of flexibility and adaptability of the control model in complex environments, affecting terminal positioning accuracy and system safety.

Method used

A multi-stage model predictive control method is adopted to construct a multi-stage model predictive control system through dynamic modeling, spatial perception and rolling optimization control. Combined with dynamic safety height and weight matrix adjustment, dynamic switching of the spreader between obstacle avoidance and target tracking stages is realized, and the control input sequence is optimized to achieve the stability and safety of the spreader.

Benefits of technology

It enables the spreader to simultaneously suppress the swing angle and dynamically avoid obstacles in complex working environments, ensures accurate terminal positioning, improves operational stability and intelligent decision-making capabilities, and solves the performance conflict problem of traditional control methods under multi-objective conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120757005A_ABST
    Figure CN120757005A_ABST
Patent Text Reader

Abstract

The invention provides an overhead and portal crane lifting appliance control method based on multi-stage model predictive control, and relates to the field of data processing. The method comprises the following steps: firstly, acquiring a control parameter and an initial state variable so as to define an operation boundary and an initial state, and establishing a dynamic model containing a coupling relationship among a trolley acceleration, a sling rope length acceleration and a sling swing angle; acquiring obstacle distribution by using space sensing equipment, and calculating the dynamic safety height of the lifting appliance by combining obstacle parameters and control parameters; judging whether the lifting appliance is in an obstacle avoidance stage or a target tracking stage according to the initial state variable and the dynamic safety height; constructing a model prediction controller and dynamically adjusting a state weight matrix and a control input weight matrix; finally, a control input sequence is generated through an optimization algorithm, and track safety and attitude stability control of the lifting appliance is achieved. According to the technical scheme, the swing angle of the lifting appliance is restrained, meanwhile, the obstacles are effectively avoided, and the safety of the lifting appliance in the whole operation process is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing, and in particular to a gantry crane spreader control method based on multi-stage model predictive control. Background Art

[0002] In recent years, as port operations have continued to evolve toward unmanned and intelligent operations, gantry cranes, as key equipment, have become crucial for intelligent scheduling and safe operation. However, in actual operations, due to the combined effects of trolley horizontal acceleration, variations in spreader rope length, and environmental disturbances, spreaders are prone to significant swing angles during operation, which are difficult to effectively suppress in a short period of time, seriously affecting terminal positioning accuracy and system operational safety.

[0003] Existing anti-swing control methods have obvious limitations: on the one hand, traditional control strategies based on proportional-integral-differential usually rely on additional swing angle detection sensors, and the control structure is rigid, making it difficult to adapt to the dynamic coupling characteristics of the system caused by changes in rope length. In particular, when performing path avoidance operations in obstacle areas, problems such as swing angle overshoot and trajectory deviation often occur; on the other hand, current mainstream model predictive control methods are mostly based on the assumption of fixed-length lifting ropes, and only predict and regulate the horizontal displacement of the trolley, ignoring the synergistic relationship between the dynamic adjustment of the lifting rope length and obstacle avoidance, resulting in the control model's lack of flexibility and adaptability in complex operating environments.

[0004] Therefore, how to achieve effective obstacle avoidance while suppressing the swing angle of the spreader and ensure the safety of the spreader during the entire operation process is a key issue that urgently needs to be broken through in the current gantry crane control system. Summary of the Invention

[0005] The present application provides a gantry crane spreader control method based on multi-stage model predictive control, which facilitates the spreader to effectively avoid obstacles while suppressing the swing angle, thereby ensuring the safety of the spreader during the entire operation process.

[0006] In a first aspect of the present application, a method for controlling a gantry crane spreader based on multi-stage model predictive control is provided, the method comprising: obtaining control parameters of the gantry crane and determining initial state variables, the control parameters and the initial state variables being used to define the operating boundaries and initial state of the gantry crane; establishing a dynamic model of the gantry crane based on the control parameters and the initial state variables, the dynamic model comprising a trolley acceleration equation, a spreader rope length acceleration equation, and a spreader swing angle coupling equation; obtaining obstacle distribution information within a working area of ​​the spreader through a spatial perception device, and calculating a dynamic safety height of the spreader in combination with obstacle parameters and the control parameters; determining a control stage of the spreader based on the initial state variables and the dynamic safety height, the control stage comprising an obstacle avoidance stage and a target tracking stage; constructing a model predictive controller, and controlling the model predictive controller to dynamically adjust a state weight matrix and a control input weight matrix according to the control stage; and generating a control input sequence for the spreader through an optimization algorithm based on the state weight matrix, the control input weight matrix, and the constraints of the spreader.

[0007] Optionally, the dynamic model of the gantry crane is established based on the control parameters and the initial state variables, specifically including: setting the initial state variables to trolley position information, trolley speed information, sling rope length information, sling rope length change speed information, sling swing angle information and sling swing angle change speed information, and setting the control input variables to trolley acceleration information and sling rope length acceleration information; based on the mass parameters, gravity constant, operating boundary conditions and damping parameters in the control parameters, combined with the initial state variables and the control input variables, constructing the trolley acceleration equation for describing the horizontal motion of the trolley, the sling rope length acceleration equation for describing the change of the sling rope length, and the trolley acceleration, sling swing angle coupling equation under the joint action of the trolley position and sling rope length for coupling the description of the dynamic change of the sling swing angle.

[0008] Optionally, the obstacle distribution information of the spreader in the working area is obtained through the spatial perception device, and the dynamic safety height of the spreader is calculated in combination with the obstacle parameters and the control parameters, specifically including: using the spatial perception device deployed on the gantry crane to collect three-dimensional environmental data in the corresponding working area of ​​the gantry crane, the three-dimensional environmental data including the horizontal position parameters and vertical height parameters of the obstacles; constructing an obstacle height mapping function based on the three-dimensional environmental data, the obstacle height mapping function is used to describe the maximum height of obstacles corresponding to different horizontal positions; constructing a dynamic safety height model in combination with the obstacle height mapping function, the sensor error tolerance in the control parameters, the obstacle area expansion factor and the system equivalent friction factor; outputting the dynamic safety height according to the dynamic safety height model.

[0009] Optionally, the control stage of the spreader is determined based on the initial state variables and the dynamic safety height, specifically including: generating a horizontal position sequence and a corresponding vertical height sequence of the spreader in a preset prediction time domain through the dynamic model based on the initial state variables; extracting a corresponding dynamic safety height sequence in the dynamic safety height model based on the horizontal position sequence, and comparing the vertical height sequence with the dynamic safety height sequence one by one to obtain a comparison result; if the comparison result indicates that there is any height value in the vertical height sequence that is lower than the corresponding dynamic safety height value, then the control stage is determined to be the obstacle avoidance stage, otherwise it is determined to be the target tracking stage.

[0010] Optionally, the model predictive controller is constructed and controlled to dynamically adjust the state weight matrix and the control input weight matrix according to the control stage, specifically including: setting a state error cost term and a control input cost term in the model predictive controller, the state error cost term is weighted by the state weight matrix to calculate the deviation cost of the trolley position, the sling rope length and the sling swing angle relative to the target state, and the control input cost term is weighted by the control input weight matrix to calculate the amplitude cost of the trolley acceleration and the sling rope length acceleration; according to the state error cost term and the control input cost term, if it is determined When the control stage is the obstacle avoidance stage, the weight coefficients of the items corresponding to the sling swing angle and the sling rope length in the state weight matrix are increased, the weight coefficients of the items corresponding to the trolley position are reduced, and the weight coefficients of the sling rope length acceleration in the control input weight matrix are reduced, and the weight coefficients of the trolley acceleration are increased; if it is determined that the control stage is the target tracking stage, the terminal state weight coefficients of the trolley position and the sling swing angle in the state weight matrix are increased, the weight coefficients of the items corresponding to the sling rope length are reduced, and the weight coefficients of the trolley acceleration in the control input weight matrix are reduced, and the weight coefficients of the sling rope length acceleration are increased.

[0011] Optionally, the control input sequence for the spreader is generated by an optimization algorithm based on the state weight matrix, the control input weight matrix, and the constraint condition of the spreader, specifically comprising: according to the dynamic model and the initial state variable, recursively generating state trajectories of trolley position, trolley speed, spreader rope length, spreader rope length change speed, spreader swing angle, and spreader swing angle change speed within the preset prediction time domain; based on the state weight matrix and the control input weight matrix, adding hard constraints including that the spreader vertical height is not lower than the dynamic safety height, the trolley speed and acceleration do not exceed the control boundary, the spreader rope length change speed and acceleration are limited, and soft constraints that the trolley speed, the spreader rope length change speed, and the spreader swing angle change speed converge to zero, to obtain a target cost function; inputting the target cost function and the constraint condition into a quadratic programming optimization algorithm with constraints to solve the optimal trolley acceleration sequence and the spreader rope length acceleration sequence within the target prediction time domain, and obtaining the control input sequence.

[0012] Optionally, weight items for punishing the spreader swing angle and the spreader swing angle change speed are set in the state weight matrix, and the numerical value of the weight items is dynamically increased in the obstacle avoidance stage and the target tracking stage to enhance the control constraint of the spreader swing angle deviation; weight items for punishing the trolley acceleration and the spreader rope length acceleration are set in the control input weight matrix, and the punishment strength of the trolley acceleration is increased in the path turning interval and the terminal braking stage to smooth the input change and reduce the driving effect of the excitation source on the spreader self-swing; a constraint condition that the spreader swing angle change speed converges to zero is set in the constraint condition to guide the realization of stable convergence of the spreader posture while completing the positioning process.

[0013] In a second aspect of the present application, a gantry crane hoist control device based on multi-stage model predictive control is provided, the device comprising an acquisition module and a processing module, wherein the acquisition module is used to acquire the control parameters of the gantry crane and determine the initial state variables, the control parameters and the initial state variables are used to define the operating boundary and the starting state of the gantry crane; the processing module is used to establish a dynamic model of the gantry crane based on the control parameters and the initial state variables, the dynamic model includes a trolley acceleration equation, a hoist rope length acceleration equation and a hoist swing angle coupling equation; the acquisition module is also used to acquire the hoist's working state through a space perception device. Obstacle distribution information in the area, and combining the obstacle parameters and the control parameters to calculate the dynamic safety height of the spreader; the processing module is also used to determine the control stage of the spreader according to the initial state variables and the dynamic safety height, and the control stage includes the obstacle avoidance stage and the target tracking stage; the processing module is also used to construct a model predictive controller, and control the model predictive controller to dynamically adjust the state weight matrix and the control input weight matrix according to the control stage; the processing module is also used to generate a control input sequence for the spreader through an optimization algorithm based on the state weight matrix, the control input weight matrix and the constraints of the spreader.

[0014] In a third aspect of the present application, an electronic device is provided, which includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device performs the method described above.

[0015] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions. When the instructions are executed, the method described above is executed.

[0016] In summary, one or more technical solutions provided in this application have at least the following technical effects or advantages: 1. By integrating dynamic modeling, spatial perception, stage identification, and rolling optimization control, a multi-stage model predictive control system for gantry cranes was constructed. This system achieves dynamic obstacle avoidance while suppressing the spreader's swing angle and ensuring precise terminal positioning. This method offers advantages such as adjustable control input, flexible state response, strong environmental adaptability, and high path safety. It effectively addresses the difficulty of coordinating multi-objective control in existing technologies and significantly improves the spreader's operational stability and intelligent decision-making capabilities in complex operating scenarios.

[0017] 2. By constructing a weighted cost function and combining physical hard constraints with terminal soft constraints, the model prediction problem is standardized into a constrained quadratic programming form. This allows for the real-time solution of the optimal trolley acceleration and spreader rope acceleration control sequences, while meeting dynamic safety height, system boundaries, and attitude convergence requirements. This constitutes a complete predictive control closed-loop path planning mechanism. This achieves the unified control objectives of obstacle avoidance, safety control, and precise terminal sway suppression in complex dynamic environments, significantly improving the scalability of existing MPC methods.

[0018] 3. By clarifying the dynamic adjustment mechanism of the state weight matrix and the control input weight matrix in different control stages, the limitations of the traditional fixed weight configuration mode on system performance are broken through, so that the model predictive controller can automatically reconstruct the control priority according to whether the spreader is in the obstacle avoidance stage or the target tracking stage, and realize the staged optimization of the swing angle stability and path convergence, effectively alleviating the performance conflict problem of the traditional controller under multi-objective conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flow chart of a gantry crane spreader control method based on multi-stage model predictive control provided in an embodiment of the present application; Figure 2 A schematic diagram of a module of a gantry crane spreader control device based on multi-stage model predictive control provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0020] Explanation of the reference numerals: 21, acquisition module; 22, processing module; 31, processor; 32, communication bus; 33, user interface; 34, network interface; 35, memory. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0022] In the description of the embodiments of this application, words such as "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "for example" or "for instance" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "for example" or "for instance" is intended to present the relevant concepts in a concrete manner.

[0023] In the description of the embodiments of the present application, the term "multiple" means two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0024] As port operations continue to accelerate toward unmanned and intelligent operations, the automatic control performance of gantry cranes, as core handling equipment, has become a key foundation for ensuring operational efficiency and system safety. However, in actual applications, the spreader is subject to the combined influence of factors such as the horizontal acceleration of the trolley, changes in spreader rope length, and environmental interference during operation. This can easily cause significant swing angles, which are difficult to effectively suppress within a limited time, directly affecting the terminal's positioning accuracy and the overall stability of the lifting operation.

[0025] Existing anti-sway control technologies still have structural shortcomings: on the one hand, the traditional method based on proportional-integral-differential relies on an additional swing angle sensor and cannot dynamically adapt to the changes in the length of the sling rope and the coupling mechanism of the trolley control, especially under obstacle avoidance conditions, which is prone to posture over-adjustment and trajectory instability; on the other hand, the currently commonly used model predictive control methods mostly use constant rope length as the modeling premise, only controlling the horizontal movement of the trolley, and lacking the joint modeling and constraint mechanism of the dynamic changes in rope length and the spatial distribution of obstacles, resulting in conservative path generation and difficulty in coping with highly complex working environments.

[0026] In order to solve the above technical problems, the present application provides a gantry crane spreader control method based on multi-stage model predictive control, referring to Figure 1 , Figure 1 This is a flow chart of a method for controlling a gantry crane spreader based on multi-stage model predictive control according to an embodiment of the present application. The method is applied to a server and includes steps S110 to S160, which are as follows: S110. Obtain control parameters of the gantry crane and determine initial state variables. The control parameters and initial state variables are used to define the operating boundary and initial state of the gantry crane.

[0027] Specifically, the server refers to the central processing unit (CPU) that deploys control algorithms and operational logic. It is an industrial control server or embedded computing platform with real-time data processing capabilities. Its functions include dynamic monitoring of the operating status of a gantry crane, parameter scheduling, predictive calculations, and control decision output. A gantry crane is a heavy-duty mechanical device with a portal structure used for large-scale horizontal and vertical transport of heavy objects. It consists of a trolley, a spreader, a wire rope system, a drive mechanism, and other components. In this scenario, the gantry crane is the control target, and the spreader is its actuator. Control parameters refer to static or semi-static physical boundary conditions that have a global constraint or control effect on the operation of the gantry crane. For example, control parameters include the maximum and minimum trolley horizontal speeds, upper and lower trolley acceleration limits, the allowable range of spreader rope length, rope length adjustment speed limits, the allowable range of spreader swing angles, the system sampling period, and the prediction time domain length. Control parameters are pre-set by system configuration, mechanical structure, or safety regulations and do not change dynamically with operating conditions.

[0028] The initial state variables refer to the state vector variables of the gantry crane at the start of the control cycle. They serve as the initial boundary conditions for trajectory prediction and input solution in the model predictive controller. Specifically, they include six dimensions: trolley position, trolley speed, spreader rope length, spreader rope length change rate, spreader swing angle, and spreader swing angle change rate. Initial state variables are typically obtained by real-time sensor measurements and filtered by the state estimation unit. Operating boundaries refer to the set of boundary restrictions during the gantry crane's motion, defined by control parameters. These are used to limit the trolley's displacement range, the spreader's maximum lifting height, the minimum safe height, and the upper and lower limits of speed and acceleration to prevent the spreader from operating beyond its limits or the system from overloading. Operating boundaries provide boundary conditions for the hard constraints in subsequent optimization algorithms. The starting state refers to the set of values ​​corresponding to the initial state variables in the current control cycle. It represents the physical operating state of the gantry crane at the current sampling moment and serves as the starting point for the state prediction recursion in model predictive control.

[0029] In summary, the server obtains the control parameters used to define the system boundary conditions and the initial state variables used to describe the current physical state, establishing the basis for the controllability and dynamics of the system, thereby providing accurate boundary basis and state starting point for the subsequent prediction calculation and control input generation of the model predictive controller.

[0030] S120. Based on the control parameters and the initial state variables, a dynamic model of the gantry crane is established. The dynamic model includes a trolley acceleration equation, a spreader rope length acceleration equation, and a spreader swing angle coupling equation.

[0031] Specifically, the dynamic model refers to a set of mathematical expressions that describe the time-varying patterns of the gantry crane system's state variables. It's used to characterize the causal relationship between the system's controlled inputs and state responses, and is the computational core of the model predictive controller for state prediction and input optimization. This model is constructed based on the principles of Lagrangian mechanics or the Newton-Euler equations and is updated in real time using a discrete-time format. The trolley acceleration equation refers to a dynamic sub-equation used to describe the trolley's horizontal linear acceleration behavior under control input. It consists of the trolley's mass, driving force, and friction terms, and is used to derive the predicted path of the trolley's position and velocity. It serves as the primary channel for coupling control drive and horizontal displacement in the system. The hoist rope acceleration equation refers to a dynamic sub-equation that describes the dynamic response of the hoist rope to its expansion and contraction under the action of the sheave drive system. It expresses the acceleration evolution of the hoist's vertical height under control input, typically taking into account rope inertia, tension changes, and damping forces. It is a key module for achieving hoist height adjustment and obstacle avoidance control. The spreader swing angle coupling equation refers to the nonlinear coupling equation that describes the dynamic evolution of the spreader's swing angle under the combined effects of trolley motion and rope length changes. This equation takes into account horizontal drive excitation, vertical length disturbance, gravity, and system damping terms. It is the core structure for modeling spreader posture instability and self-swing behavior, and constitutes the basic basis for swing elimination and posture adjustment in model predictive control.

[0032] In summary, based on the acquired control parameters and initial state variables, the server constructs a complete dynamic model that includes three types of dynamic behaviors: trolley acceleration behavior, sling rope length response, and sling posture change. This provides a dynamic evolution basis and physical consistency guarantee for subsequent model prediction, path generation, and control input solution.

[0033] In one possible implementation, a dynamic model of a gantry crane is established based on control parameters and initial state variables, specifically including: setting the initial state variables to trolley position information, trolley speed information, sling rope length information, sling rope length change speed information, sling swing angle information, and sling swing angle change speed information, and setting the control input variables to trolley acceleration information and sling rope length acceleration information; based on the mass parameters, gravity constant, operating boundary conditions, and damping parameters in the control parameters, combined with the initial state variables and the control input variables, constructing a trolley acceleration equation for describing the horizontal motion of the trolley, a sling rope length acceleration equation for describing the change in sling rope length, and a trolley acceleration, sling swing angle coupling equation under the combined action of the trolley position and sling rope length for coupling the description of the dynamic change of the sling swing angle.

[0034] Specifically, first, the state variable vector of the gantry crane is set. The state variable vector is defined as a six-dimensional state quantity, including the position of the trolley , car speed , sling rope length , Spreader rope length change speed , spreader swing angle Change speed of the spreader swing angle This state vector describes the complete physical state of the system in any control cycle and is the basis for the model predictive controller to perform prediction calculations and system response recursion. Secondly, set the control input variable. The control input variable is defined as the car acceleration Acceleration of the sling rope length , which are used to drive the trolley along the horizontal track and drive the hoist rope sheave to retract and extend the rope. These two input variables will be used as the target output variables solved by the optimization algorithm, and the driving state variables will be dynamically evolved in the prediction time domain. Next, the server extracts the necessary system constants from the control parameters, including the trolley mass , quality of slings , system damping coefficient , gravitational acceleration , as well as the operating boundary information of the gantry crane, such as the maximum rope length, minimum safe height, etc. These control parameters are the structural coefficients in the system dynamics equations, ensuring that the model is consistent with the actual physical characteristics.

[0035] Finally, based on the Newton-Euler motion principle, three sets of dynamic equations for the system are constructed: 1. Acceleration equation of the car (horizontal direction):

[0036] in: : Car acceleration; : Control input variable, representing the control acceleration applied to the car.

[0037] 2. Acceleration equation of sling rope length (vertical direction):

[0038] in: : acceleration of sling rope length; : Control input variable, representing the rope length acceleration applied to the spreader sheave.

[0039] 3. Spreader swing angle coupling equation (nonlinear dynamics):

[0040] in: : spreader swing angular acceleration; : acceleration due to gravity; : Current rope length; : Rope length change speed; : Swing angle change speed; : Car acceleration; : swing angle damping coefficient; : The mass of the spreader. This swing angle coupling equation truly describes the nonlinear evolution of the spreader's posture under the combined effects of the trolley's horizontal drive, trolley position movement, rope length change, and gravity recovery term.

[0041] In summary, through the above-mentioned state variable setting, input variable specification, system parameter extraction and construction of three types of dynamic equations, the server can complete the construction of the multivariable coupled dynamic model of the gantry crane, provide an accurate prediction structure and control solution input basis for the model predictive controller, and support the unified optimization scheduling of obstacle avoidance, sway elimination and path tracking of the spreader during the full cycle operation.

[0042] S130. Obtain obstacle distribution information of the spreader in the working area through the space perception device, and calculate the dynamic safety height of the spreader in combination with the obstacle parameters and the control parameters.

[0043] Specifically, the spreader refers to the end effector unit of a gantry crane used to hook and carry loads. In the control system, it is the controlled object for motion control and obstacle avoidance planning. Its motion path must avoid all obstacle boundaries within the working area and meet precise positioning requirements. The working area refers to the combined reachable range of the gantry crane trolley and the spreader in the horizontal and vertical directions. It is the complete three-dimensional spatial boundary area that the spreader may pass through. This area is determined by the control parameters such as the trolley travel range, maximum rope length, and minimum safe height. It is also the analysis domain for obstacle perception and obstacle avoidance modeling. Obstacle distribution information refers to the three-dimensional obstacle space information obtained and processed by the spatial perception device, which usually includes the horizontal coordinate x, vertical coordinate z of the obstacle in the working area, and its geometric contour boundary. This information is used to construct the obstacle height mapping function, which is the input basis for the subsequent dynamic safe height model.

[0044] Among them, obstacle parameters refer to the data structure extracted and formatted from the obstacle distribution information, which usually includes the maximum height value, horizontal projection boundary, position label and obstacle expansion factor corresponding to each obstacle, which is used to expand the obstacle boundary to form an avoidance area with a safety margin. The control parameters mainly provide the system operation boundary constants and error compensation items required for the calculation of the obstacle safety height model, including sensor measurement error margin, obstacle space expansion factor, system response lag compensation item and equivalent friction factor. These parameters are used to improve the robustness of the safety height model to environmental uncertainty and dynamic errors. The dynamic safety height refers to the minimum vertical height required to ensure the safe obstacle crossing of the hoist at the current horizontal position of the trolley. It is a height threshold calculated by combining the obstacle distribution information and the control parameters. It is used as a height hard constraint in the hoist trajectory planning process to ensure that the operation path is always higher than the obstacle reachable boundary at the corresponding position.

[0045] In summary, this section indicates that the server obtains the three-dimensional obstacle distribution through the spatial perception device, and combines the obstacle parameters with the control parameters to generate a set of dynamic safety height threshold sequences corresponding to the feasible path of the spreader within the vehicle position domain. This provides rigid height constraints for the subsequent model predictive controller to generate a spreader trajectory that meets the obstacle avoidance requirements.

[0046] In one possible implementation, obstacle distribution information of the spreader in the working area is obtained through a spatial sensing device, and the dynamic safety height of the spreader is calculated in combination with the obstacle parameters and control parameters, specifically including: using the spatial sensing device deployed on the gantry crane to collect three-dimensional environmental data in the corresponding working area of ​​the gantry crane, the three-dimensional environmental data including the horizontal position parameters and vertical height parameters of the obstacle; constructing an obstacle height mapping function based on the three-dimensional environmental data, the obstacle height mapping function is used to describe the maximum height of the obstacle corresponding to different horizontal positions; constructing a dynamic safety height model in combination with the obstacle height mapping function, the sensor error tolerance in the control parameters, the obstacle area expansion factor and the system equivalent friction factor; outputting the dynamic safety height according to the dynamic safety height model.

[0047] Specifically, the server first scans the operating area in real time through the spatial perception equipment deployed on the gantry crane trolley or spreader to obtain 3D environmental data. The 3D environmental data includes the spatial coordinate distribution information of all obstacles in the operating area. This data is represented in discrete point cloud or raster format, with each obstacle represented by its position on the horizontal axis (i.e., the direction of the trolley's travel). The height on the vertical axis (i.e. the direction of sling descent) Representation, forming an obstacle point set .

[0048] Next, the server constructs an obstacle height mapping function based on the collected obstacle point set. This function is used to describe the horizontal position of any car. The highest boundary height of the obstacle corresponding to the position is specifically implemented by searching for the maximum height within the horizontal position range and constructing a piecewise function. The specific formula is as follows:

[0049] in: : Obstacle height mapping function, indicating the horizontal position Maximum obstacle height at ; : Horizontal sampling window, used for local area search; : The obstacle point set collected and processed by the spatial perception device.

[0050] Subsequently, based on the obstacle height mapping function, multiple control parameters are introduced for safety compensation to construct a dynamic safety height model. This model forms a safety height function by adding compensation terms to the original obstacle height. The specific formula is as follows:

[0051] in: : Dynamic safety height; : Obstacle area expansion factor, used to compensate for spreader operation errors and path deviations; : sensor error tolerance, used to account for measurement uncertainty of spatial perception equipment; : System equivalent friction factor, used to characterize the insufficient inertial lift of the spreader due to friction and hysteresis during operation, and to enhance the system safety margin.

[0052] Finally, the server predicts the trajectory or actual position of the car. ,right Perform real-time interpolation calculations to obtain the dynamic safety height value corresponding to the position, and use it as the lower limit of the sling rope length to participate in the subsequent hard constraint setting of the model predictive controller to ensure that the predicted path always meets the following conditions throughout the entire time domain:

[0053] Therefore, it is ensured that the vertical projection height of the spreader in the swing angle state is not lower than the dynamic safety height of the current horizontal position, thereby realizing dynamic avoidance control of the obstacle area.

[0054] In summary, this technical solution forms a dynamic height threshold model that changes dynamically, has an adjustable safety margin, and is directly related to the predicted trajectory of the trolley through perception input, local modeling, parameter compensation, and real-time interpolation. This model is a key height boundary constraint input in spreader trajectory generation.

[0055] S140. Determine the control stage of the spreader according to the initial state variables and the dynamic safety height. The control stage includes an obstacle avoidance stage and a target tracking stage.

[0056] Specifically, the control stage refers to the control logic mode corresponding to the task state of the spreader classified by the model predictive controller according to the current environmental state and system state, which is used to dynamically switch the cost function weight, control constraint structure and path planning strategy to ensure that the control objectives can be coordinated and achieved under different working conditions. The obstacle avoidance stage refers to the server judging that the spreader is about to enter or is already above the obstacle area within the prediction time domain. At this time, the system must give priority to meeting the vertical obstacle avoidance and attitude stability goals of the spreader. The controller will increase the penalty weights of the spreader rope length and the spreader swing angle, and limit the trolley speed to suppress lateral disturbances. The target tracking stage refers to the server judging that the spreader is in a non-obstacle area throughout the prediction time domain. The system no longer faces height constraints. The control goals of this stage are to achieve trolley positioning accuracy and attitude convergence. The controller will enhance the control priority of the trolley position status and terminal docking accuracy.

[0057] In summary, this paragraph describes how the server identifies whether the current path of the spreader is restricted by obstacles based on the current system status and obstacle environment information, and accordingly divides the control process into an obstacle avoidance phase or a target tracking phase, driving the subsequent model predictive controller to select the most suitable control strategy to achieve dynamic coordination of path safety, control accuracy, and posture stability.

[0058] In one possible implementation, the control stage of the spreader is determined based on the initial state variables and the dynamic safety height, specifically including: based on the initial state variables, generating a horizontal position sequence and a corresponding vertical height sequence of the spreader in a preset prediction time domain through a dynamic model; based on the horizontal position sequence, extracting the corresponding dynamic safety height sequence in the dynamic safety height model, and comparing the vertical height sequence with the dynamic safety height sequence one by one to obtain a comparison result; if the comparison result indicates that there is any height value in the vertical height sequence that is lower than the corresponding dynamic safety height value, then the control stage is determined to be the obstacle avoidance stage, otherwise it is determined to be the target tracking stage.

[0059] Specifically, the first step is to generate the predicted trajectory of the spreader. The server is based on the initial state variables in the current control cycle. , combined with the discrete dynamic model of the gantry crane, in the prediction time domain Generate the horizontal position sequence of the spreader by internal recursion With vertical height sequence The vertical height of each step is It is calculated by the sling rope length and the swing angle, and its expression is:

[0060] in: : No. Step of the sling rope length; : No. The swing angle of the spreader; :The spreader is in the The vertical projection height of the step.

[0061] The second step is to extract the dynamic safety height sequence. The server will predict the generated horizontal position sequence Enter the dynamic safe height model , at each prediction step Extract the safety height at the corresponding position to form a dynamic safety height sequence , the calculation expression is:

[0062] in: : No. Step position The corresponding maximum obstacle height; : obstacle boundary expansion factor; : spatial perception error margin; : system friction compensation factor; : No. Dynamic safety height of the step.

[0063] The third step is to perform step-by-step height comparison. The server will predict the vertical height sequence With dynamic safety height sequence Compare item by item to determine whether there are risk points in the future predicted path of the spreader where the height is less than the safety threshold, namely:

[0064] If there is a moment If the above conditions are met, it means that the spreader will enter the area above the obstacle, and the system will determine the control phase as the "obstacle avoidance phase"; otherwise, if all , the control phase is determined to be the “target tracking phase”.

[0065] The fourth step is to output the control phase judgment result. The control phase judgment result serves as the decision basis for the subsequent model predictive controller to switch the control weight matrix, path restriction strategy and swing angle suppression strength, ensuring that the controller performs targeted safe obstacle avoidance or terminal precision positioning control tasks under different working conditions. In summary, this technical solution realizes the control logic segmentation judgment mechanism of the gantry crane hoist in the multi-objective control scenario by constructing a comparison system of predicted trajectory, height constraint sequence and height safety boundary, providing a structured and adaptive strategy switching trigger basis for the model predictive controller.

[0066] S150 , constructing a model predictive controller, and controlling the model predictive controller to dynamically adjust the state weight matrix and the control input weight matrix according to the control stage.

[0067] Specifically, the model predictive controller refers to a control structure that uses the gantry crane dynamics model as the prediction basis and minimizes the cost function as the optimization goal. It can predict the state evolution process and solve the optimal control input sequence based on the system's current state variables and future reference trajectories within each control cycle. Its core components are: prediction model, cost function, constraints, and optimization solver. Dynamic adjustment refers to the server resetting the parameter values ​​of the state weight matrix and the control input weight matrix in the model predictive controller cost function in real time according to the currently determined control stage, so that the controller automatically matches the current task focus and safety requirements in different operating stages, and realizes the coordinated optimization of anti-sway control, obstacle avoidance control, and path convergence control goals.

[0068] The state weight matrix refers to the weighting coefficient matrix used to construct the state error term in the cost function of the model predictive controller. It is used to penalize the degree to which state variables such as the trolley position, spreader rope length, and spreader swing angle deviate from the desired target. Different control stages require different weights for different state variables. For example, the spreader rope length and spreader swing angle should be weighted more heavily during the obstacle avoidance phase, while the trolley position and terminal state should be weighted more heavily during the target tracking phase. The control input weight matrix refers to the weighting matrix used to constrain the amplitude of the trolley acceleration and spreader rope length acceleration in the cost function of the model predictive controller. This matrix is ​​used to limit the aggressiveness of the control input, ensure input smoothness, and suppress swing angle excitation or system response oscillation caused by excessive acceleration. Different control stages require different suppression of control inputs. For example, at path turning points, the trolley acceleration weight should be increased to ensure smooth control, while the spreader rope length acceleration weight should be reduced in the initial obstacle avoidance phase to allow for rapid lifting.

[0069] In summary, this paragraph indicates that the server dynamically configures the state weight matrix and the control input weight matrix in the model predictive controller according to the control stage of the gantry crane hoist, thereby achieving adaptive adjustment of the control target priority, thereby enhancing the system's ability to stably control the swing angle and rope length in the obstacle avoidance path, and strengthening the control capability of the position accuracy and terminal convergence performance in the target alignment stage.

[0070] In one possible implementation, a model predictive controller is constructed, and the model predictive controller is controlled to dynamically adjust the state weight matrix and the control input weight matrix according to the control stage, specifically including: setting a state error cost term and a control input cost term in the model predictive controller, the state error cost term is weighted by the state weight matrix to calculate the deviation cost of the trolley position, the sling rope length and the sling swing angle relative to the target state, and the control input cost term is weighted by the control input weight matrix to calculate the amplitude cost of the trolley acceleration and the sling rope length acceleration; according to the state error cost term and the control input cost term, if When the control stage is determined to be the obstacle avoidance stage, the weight coefficients of the items corresponding to the sling swing angle and the sling rope length in the state weight matrix are increased, the weight coefficients of the items corresponding to the trolley position are reduced, and the weight coefficients of the sling rope length acceleration in the control input weight matrix are reduced, and the weight coefficients of the trolley acceleration are increased; if the control stage is determined to be the target tracking stage, the terminal state weight coefficients of the trolley position and the sling swing angle in the state weight matrix are increased, the weight coefficients of the items corresponding to the sling rope length are reduced, and the weight coefficients of the trolley acceleration in the control input weight matrix are reduced, and the weight coefficients of the sling rope length acceleration are increased.

[0071] Specifically, the first step is to construct the cost function structure. The model predictive controller takes minimizing the control target deviation and control input energy in the prediction time domain as the optimization goal, and constructs the cost function , including the state error cost term and the control input cost term, the overall expression formula is as follows:

[0072] in: : No. Step 1 prediction of state variables, including the position of the trolley, the rope length corresponding to the trolley, and the swing angle; : No. Step reference target state; : No. Step control input variables, including car acceleration Acceleration of the sling rope length ; : state weight matrix; : control input weight matrix; : The number of steps in the prediction time domain.

[0073] Step 2: Initialize the state weight matrix and the control input weight matrix. In the controller initialization phase, set the state weight matrix and the control input weight matrix The basic structure of is expressed as the weighted strength of each state variable and control input, in the following form:

[0074] in: : Weight coefficient of the car's position state; : Weight coefficient of the sling rope length state; : Weight coefficient of the spreader swing angle state; : Control cost weight of car acceleration; : The control cost weight of the spreader rope acceleration.

[0075] Step 3: Control Phase Identification. The server determines whether the current control phase is "obstacle avoidance phase" or "target tracking phase" based on the step-by-step comparison of the spreader height and the dynamic safety height in the predicted path. The control phase identification results serve as the trigger for weight adjustment.

[0076] Step 4: Dynamically adjust the weight matrix parameters. If the server determines that it is currently in the "obstacle avoidance phase", it updates the state weight matrix and control input weight matrix as follows:

[0077] in, 、 : Increase the state penalty of the sling rope length and swing angle; : Reduce the accuracy requirement of the car's position status; : Enhance the suppression of sudden acceleration changes of the car; : Allows flexible adjustment of the rope length acceleration to quickly avoid obstacles. If it is determined that the current state is in the "target tracking phase", it will be adjusted to:

[0078] in, : Enhance the position control accuracy of the trolley; : Improve the swing angle convergence capability in the terminal stage; : Weakening the constraint on rope length stability; : Relax the car's responsiveness; Enhanced suppression of vertical disturbances of the spreader. In summary, this dynamic weight adjustment mechanism ensures the model predictive controller's strategic adaptability across different mission phases. It prioritizes height and attitude control in obstacle areas, enhances path accuracy and attitude convergence during target tracking, and improves the system's dynamic coordination performance and path safety for multi-target control tasks.

[0079] S160 , generating a control input sequence for the spreader through an optimization algorithm based on the state weight matrix, the control input weight matrix, and the constraints of the spreader.

[0080] Specifically, constraints refer to a set of hard and soft constraints imposed on the control and state variables during the optimization process of the model predictive controller. These constraints define the physical boundaries, safety regulations, and terminal stability requirements of the spreader during operation. These include, but are not limited to, upper limits on trolley speed and acceleration, the range of spreader rope length variation, swing angle constraints, a spreader height not less than the dynamic safety height, and terminal convergence requirements. An optimization algorithm refers to a mathematical method used to solve the optimal control input sequence based on the objective function and constraints. It employs a constrained quadratic programming algorithm, such as the interior point method or the active set method, to calculate a feasible solution that minimizes the cost function within each control cycle and output the first control variable as the execution instruction. The control input sequence refers to the set of optimal control inputs output by the optimization algorithm over multiple future time steps. Specifically, it is a time series of trolley accelerations and spreader rope accelerations used to drive the spreader along the predicted trajectory. The controller ultimately applies the first input of this sequence as the control instruction for the current cycle, and the remaining inputs are updated in the next control cycle.

[0081] In summary, the server constructs a complete cost function and physical constraint framework based on the current control strategy in each control cycle, and solves the optimal control input sequence in the prediction time domain through an efficient optimization algorithm, thereby accurately guiding the spreader to achieve multiple task goals such as path planning, obstacle avoidance control and end positioning.

[0082] In one possible implementation, based on the state weight matrix, the control input weight matrix and the constraints of the sling, a control input sequence for the sling is generated by an optimization algorithm, specifically including: according to the dynamic model and the initial state variables, recursively generating the state trajectory of the trolley position, trolley speed, sling rope length, sling rope length change rate, sling swing angle and sling swing angle change rate in a preset prediction time domain; based on the state weight matrix and the control input weight matrix, adding hard constraints including the vertical height of the sling not being lower than the dynamic safety height, the trolley speed and acceleration not exceeding the control boundary, the sling rope length change rate and acceleration being limited, and soft constraints that the trolley speed, sling rope length change rate and sling swing angle change rate converge to zero, to obtain a target cost function; inputting the target cost function and the constraints into the constrained quadratic programming optimization algorithm to solve the optimal trolley acceleration sequence and sling rope length acceleration sequence in the target prediction time domain to obtain a control input sequence.

[0083] Specifically, in the first step, the server performs forward state recursion within the prediction time domain based on the gantry crane's dynamic model and initial state variables. Specifically, the initial state variables include trolley position, trolley speed, spreader rope length, spreader rope length change rate, spreader swing angle, and spreader swing angle change rate. Based on the set initial values ​​of the control input sequence, the server recursively calculates the state trajectory through the gantry crane's dynamic equations, as expressed in the following formula:

[0084] in, For the The state variable vector of the step, For the The control input variable vector of the step, and are the state transfer matrix and the control input mapping matrix, respectively, which are obtained by linearizing and approximating the dynamic model of the gantry crane.

[0085] In the second step, the server introduces the state error cost term and the control input cost term into the target cost function based on the state trajectory and control input variables. Expressed as:

[0086] in, is the target state trajectory, is the state weight matrix, which is used to weight the state errors of the trolley position, the spreader rope length and the spreader swing angle. is the control input weight matrix, which is used to penalize the control energy of the trolley acceleration and the sling rope acceleration.

[0087] In the third step, the server incorporates safety and operational smoothness as constraints based on the actual operating environment of the spreader. These constraints include the following hard constraints: the spreader's vertical height is always greater than or equal to the dynamic safety height; the trolley speed and acceleration do not exceed the control boundaries; and the spreader rope length change rate and acceleration fall within the specified range. Furthermore, the following soft constraints are implemented: the trolley speed, rope length change rate, and spreader swing angle change rate converge to zero at the prediction terminal stage, achieving terminal stability.

[0088] The above constraints are expressed in the following form: Dynamic safety height constraint:

[0089] in, For the spreader The vertical height of the step, For the horizontal position The corresponding dynamic safety height function.

[0090] Control boundary constraints: ; State convergence soft constraint (weighted penalty): ; The fourth step is to input the constructed objective cost function and the above constraints into the constrained quadratic programming optimization algorithm. The algorithm aims to minimize the quadratic objective function while strictly satisfying the linear constraints to solve the optimal control input sequence:

[0091] in is the concatenated control input vector, and are the cost function coefficient matrices derived from the weight matrix, and are the constraint coefficient matrix and boundary vector obtained by linearizing the constraint conditions.

[0092] Finally, the server extracts the trolley acceleration and spreader rope acceleration corresponding to the first control step in the optimization sequence as the control input for the current cycle. This is then applied to the actual gantry crane system, achieving refined spreader trajectory control and obstacle avoidance path guidance. The state is then retrieved again in the next cycle and iteratively updated, forming a complete rolling optimization closed-loop control mechanism.

[0093] The formulas involved in the aforementioned optimization control embody the multi-objective coordinated optimization logic for gantry crane spreaders, encompassing path safety, posture stability, and control input energy consumption, within a multi-stage model predictive control strategy. The core computational process can be described as follows: First, based on the known trolley position, trolley speed, spreader rope length, rope length change rate, spreader swing angle, and spreader swing angle change rate within the current cycle, the server utilizes the gantry crane's dynamic model to perform a stepwise recursive calculation within a predetermined future prediction horizon, generating a sequence of predicted states at several future moments. This sequence reflects the possible state trajectories of the system under different control input combinations and serves as the basis for subsequent optimization.

[0094] Secondly, the server measures the deviation between the predicted state and the corresponding target state at each moment and, using the state weight matrix, calculates the total cost of the overall state error during the prediction process. Simultaneously, the magnitudes of the trolley and spreader rope accelerations during the prediction process are penalized and weighted using the control input weight matrix to calculate the energy cost of the control signals. Together, these two factors form the target cost function, which essentially evaluates the "cost" of achieving the system's objectives with different control input sequences. Thirdly, the server introduces mandatory constraints, or "hard constraints," during the optimization problem construction. For example, the spreader's vertical height must always be above the dynamic safety height, and the trolley's motion parameters must be constrained within physical boundaries. These constraints ensure that the spreader does not cause actual collisions or loss of control during operation due to misoperation or model errors. Furthermore, "soft constraints" are introduced. For example, during the prediction endpoint, the trolley speed, spreader rope length change rate, and spreader swing angle change rate are guided to converge to zero. This strategy achieves stable attitude convergence while maintaining trajectory accuracy, improving endpoint positioning quality.

[0095] Finally, the server unifies the above cost function and all constraints into a standard constrained quadratic programming optimization problem. By solving it, the optimal control input sequence for multiple future control cycles is obtained, and the first control input instruction output of the sequence is applied to the current control cycle, entering the next round of prediction-optimization-execution rolling control process.

[0096] In summary, the above technical solutions can simultaneously take into account path accuracy, attitude suppression, and energy consumption control, improving the overall performance of the system. Embedding a dynamic safety height model in the constraints can guide the convergence of the spreader's swing angle while achieving obstacle avoidance, thereby improving path safety. The model predictive controller can dynamically generate the optimal control solution based on state updates, demonstrating strong robustness and environmental adaptability. Weighted penalties for acceleration inputs effectively suppress system overresponses, reducing structural impact and energy loss. The introduction of soft constraints guides final state convergence, improving the attitude convergence and positioning accuracy of the terminal spreader, facilitating the execution of subsequent operations. Therefore, this computational logic not only ensures the physical feasibility and safety of the spreader path planning process, but also enhances the intelligence and stability of the overall operation of the gantry crane through a multi-dimensional control strategy.

[0097] In one possible implementation, a weight term for penalizing the spreader swing angle and the spreader swing angle change rate is set in the state weight matrix, and the value of the weight term is dynamically increased in the obstacle avoidance stage and the target tracking stage to enhance the control constraint on the spreader swing angle deviation; a weight term for penalizing the trolley acceleration and the spreader rope length acceleration is set in the control input weight matrix, and the penalty intensity of the trolley acceleration is increased in the path turning section and the terminal braking stage to smooth the input changes and reduce the driving effect of the excitation source on the spreader self-swing; a constraint condition for the spreader swing angle change rate to converge to zero is set in the constraint condition to guide the spreader posture to converge stably while completing the positioning process.

[0098] Specifically, first, in the cost function construction stage of the model predictive controller, the server explicitly sets the state weight matrix for penalizing the spreader swing angle in the state error term. Change speed of the spreader swing angle The weight term of . The state weight matrix is , then the diagonal positions are assigned higher weight values and , used to measure the severity of the spreader posture deviation from the target posture. When the server enters the obstacle avoidance phase or target tracking phase, it increases the above two weight values ​​in real time, thereby strengthening the control convergence ability of the spreader posture change trend. In terms of expression, if the original weight is , then the promoted value is:

[0099] in It is the weight adjustment coefficient in the control phase, used to adjust the urgency of attitude control.

[0100] Secondly, in the control input weight matrix of the control input error term, the server sets the car acceleration Acceleration of the sling rope length The penalty term. The control input weight matrix is , then in the prediction time domain, when a turning point appears in the predicted path or when the target stop phase is about to begin, the server recognizes that the current position is in an area of ​​intensified dynamic changes or a braking period, and the corresponding The value of this term makes the system adjust the trolley acceleration more conservatively, thereby suppressing the self-swing effect of the spreader caused by excessive drive. It can be expressed as:

[0101] in, is the adjusted control input weight, is the basic weight, is the amplification factor for local path changes or terminal adjustments.

[0102] Furthermore, the server adds a soft constraint term in the constraint model that the spreader swing angle change rate converges to zero. Specifically, at the predicted end time step Expectations ,Right now:

[0103] in is the set attitude stability tolerance threshold. This constraint can be introduced into the cost function as a penalty term, or it can be converted into a soft constraint through the slack variable method to guide the dynamic convergence characteristics of the system terminal.

[0104] In summary, the server identifies the operating phases and path characteristics of the gantry crane spreader in real time, dynamically adjusts key coefficients in the state weight matrix and the control input weight matrix based on the system's current state, and, combined with endpoint posture convergence constraints, synergistically enhances the spreader's swing angle control capabilities, preventing the system from experiencing continuous swinging due to inertial disturbances. This improves control stability, safety, and terminal positioning accuracy during spreader path planning. This dynamic adjustment and fusion of multiple constraints makes the model predictive controller more environmentally adaptable and operationally robust.

[0105] This application also provides a gantry crane spreader control device based on multi-stage model predictive control, referring to Figure 2 , Figure 2A module schematic diagram of a bridge gantry crane sling control device based on a multi-stage model predictive control provided by the embodiment of the present application. The device is a server, and the server comprises an acquisition module 21 and a processing module 22, wherein the acquisition module 21 acquires control parameters of the bridge gantry crane, and determines initial state variables, the control parameters and the initial state variables being used to define the operation boundary and the initial state of the bridge gantry crane; the processing module 22 establishes a dynamic model of the bridge gantry crane based on the control parameters and the initial state variables, the dynamic model comprising a trolley acceleration equation, a sling rope length acceleration equation and a sling swing angle coupling equation; the processing module 22 acquires obstacle distribution information of the sling in a working area through a space perception device, and calculates a dynamic safety height of the sling in combination with obstacle parameters and the control parameters; the processing module 22 determines a control stage in which the sling is located according to the initial state variables and the dynamic safety height, the control stage comprising an obstacle avoidance stage and a target tracking stage; the processing module 22 constructs a model predictive controller, and controls the model predictive controller to dynamically adjust a state weight matrix and a control input weight matrix according to the control stage; and the processing module 22 generates a control input sequence for the sling through an optimization algorithm based on the state weight matrix, the control input weight matrix and constraint conditions of the sling.

[0106] In a possible implementation, the dynamic model of the bridge gantry crane is established based on the control parameters and the initial state variables, and specifically comprises: the processing module 22 sets the initial state variables as trolley position information, trolley speed information, sling rope length information, sling rope length change speed information, sling swing angle information and sling swing angle change speed information, and sets control input variables as trolley acceleration information and sling rope length acceleration information; and the processing module 22, based on mass parameters, a gravitational constant, operation boundary conditions and damping parameters in the control parameters, in combination with the initial state variables and the control input variables, constructs a trolley acceleration equation for describing horizontal motion of the trolley, a sling rope length acceleration equation for describing change of the sling rope length, and a sling swing angle coupling equation for coupling description of dynamic change of the sling swing angle under the joint action of the trolley acceleration, the trolley position and the sling rope length.

[0107] In one possible implementation, the processing module 22 obtains obstacle distribution information of the spreader in the working area through a spatial sensing device, and calculates the dynamic safety height of the spreader in combination with the obstacle parameters and control parameters, specifically including: the processing module 22 uses the spatial sensing device deployed on the gantry crane to collect three-dimensional environmental data in the corresponding working area of ​​the gantry crane, and the three-dimensional environmental data includes the horizontal position parameters and vertical height parameters of the obstacle; the processing module 22 constructs an obstacle height mapping function based on the three-dimensional environmental data, and the obstacle height mapping function is used to describe the maximum height of the obstacle corresponding to different horizontal positions; the processing module 22 constructs a dynamic safety height model in combination with the obstacle height mapping function, the sensor error tolerance in the control parameters, the obstacle area expansion factor and the system equivalent friction factor; the processing module 22 outputs the dynamic safety height according to the dynamic safety height model.

[0108] In one possible embodiment, the control stage of the sling is determined based on the initial state variables and the dynamic safety height, specifically including: the processing module 22 generates a horizontal position sequence and a corresponding vertical height sequence of the sling in a preset prediction time domain through a dynamic model based on the initial state variables; the processing module 22 extracts the corresponding dynamic safety height sequence in the dynamic safety height model based on the horizontal position sequence, and compares the vertical height sequence with the dynamic safety height sequence one by one to obtain a comparison result; if the comparison result indicates that there is any height value in the vertical height sequence that is lower than the corresponding dynamic safety height value, the processing module 22 determines that the control stage is the obstacle avoidance stage, otherwise it is determined to be the target tracking stage.

[0109] In a possible implementation, the processing module 22 constructs a model predictive controller and controls the model predictive controller to dynamically adjust the state weight matrix and the control input weight matrix according to the control stage, specifically including: the processing module 22 sets the state error cost term and the control input cost term in the model predictive controller, the state error cost term is weighted by the state weight matrix to calculate the deviation cost of the trolley position, the sling rope length and the sling swing angle relative to the target state, and the control input cost term is weighted by the control input weight matrix to calculate the amplitude cost of the trolley acceleration and the sling rope length acceleration; the processing module 22 calculates the state error cost term and the control input cost term according to the state error cost term and the control input cost term. If the control stage is determined to be the obstacle avoidance stage, the weight coefficients of the items corresponding to the sling swing angle and the sling rope length in the state weight matrix are increased, the weight coefficients of the items corresponding to the trolley position are reduced, and the weight coefficients of the sling rope length acceleration in the control input weight matrix are reduced, and the weight coefficients of the trolley acceleration are increased; if the processing module 22 determines that the control stage is the target tracking stage, the terminal state weight coefficients of the trolley position and the sling swing angle in the state weight matrix are increased, the weight coefficients of the items corresponding to the sling rope length are reduced, and the weight coefficients of the trolley acceleration in the control input weight matrix are reduced, and the weight coefficients of the sling rope length acceleration are increased.

[0110] In one possible embodiment, the processing module 22 generates a control input sequence for the sling through an optimization algorithm based on the state weight matrix, the control input weight matrix and the constraints of the sling, specifically including: the processing module 22 recursively generates the state trajectory of the trolley position, trolley speed, sling rope length, sling rope length change rate, sling swing angle and sling swing angle change rate within a preset prediction time domain according to the dynamic model and the initial state variables; the processing module 22 adds hard constraints including the vertical height of the sling not being lower than the dynamic safety height, the trolley speed and acceleration not exceeding the control boundary, the sling rope length change rate and acceleration being limited, and soft constraints that the trolley speed, sling rope length change rate and sling swing angle change rate converge to zero based on the state weight matrix and the control input weight matrix to obtain the target cost function; the processing module 22 inputs the target cost function and the constraints into the constrained quadratic programming optimization algorithm to solve the optimal trolley acceleration sequence and sling rope length acceleration sequence within the target prediction time domain to obtain the control input sequence.

[0111] In one possible embodiment, the processing module 22 sets weight items for penalizing the sling swing angle and the speed of change of the sling swing angle in the state weight matrix, and dynamically increases the value of the weight item in the obstacle avoidance stage and the target tracking stage to enhance the control constraint on the deviation of the sling swing angle; the processing module 22 sets weight items for penalizing the trolley acceleration and the sling rope length acceleration in the control input weight matrix, and increases the penalty intensity of the trolley acceleration in the path turning section and the terminal braking stage to smooth the input changes and reduce the driving effect of the excitation source on the sling self-swing; the processing module 22 sets a constraint condition for the sling swing angle change speed to converge to zero in the constraint condition, guiding the stable convergence of the sling posture while completing the positioning process.

[0112] It should be noted that the above embodiments provide devices that implement their functions using only the division of the above functional modules as examples. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0113] This application also provides an electronic device, referring to Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include: at least one processor 31, at least one network interface 34, a user interface 33, a memory 35, and at least one communication bus 32.

[0114] The communication bus 32 is used to realize the connection and communication between these components.

[0115] The user interface 33 may include a display screen (Display), and the optional user interface 33 may also include a standard wired interface or a wireless interface.

[0116] The network interface 34 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0117] The processor 31 may include one or more processing cores. Using various interfaces and circuits, the processor 31 connects to various components within the server. It executes instructions, programs, code sets, or instruction sets stored in the memory 35, as well as accesses data stored in the memory 35, to perform various server functions and process data. Optionally, the processor 31 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 31 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display; and the modem handles wireless communications. It is understood that the modem may also be implemented as a separate chip, rather than integrated into the processor 31.

[0118] Among them, the memory 35 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 35 includes a non-transitory computer-readable storage medium. The memory 35 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 35 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 35 may also be optionally at least one storage device located away from the aforementioned processor 31. As Figure 3 As shown, the memory 35 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program of a gantry crane spreader control method based on multi-stage model predictive control.

[0119] exist Figure 3 In the electronic device shown, the user interface 33 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 31 can be used to call the application of the gantry crane hoist control method based on multi-stage model predictive control stored in the memory 35. When executed by one or more processors, the electronic device executes one or more methods in the above embodiments.

[0120] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for this application.

[0121] The present application also provides a computer-readable storage medium storing instructions, which, when executed by one or more processors, enable an electronic device to execute one or more of the methods described in the above embodiments.

[0122] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0123] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic, such as the division of units, which is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0124] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0125] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of this application. The aforementioned memory includes various media that can store program code, such as USB flash drives, mobile hard drives, magnetic disks, or optical disks.

[0127] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any variation, use or adaptive change of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art that are not recorded in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A gantry crane spreader control method based on multi-stage model predictive control, characterized in that: The method comprises: Acquiring control parameters of the gantry crane and determining initial state variables, wherein the control parameters and the initial state variables are used to define an operating boundary and a starting state of the gantry crane; Based on the control parameters and the initial state variables, a dynamic model of the gantry crane is established, wherein the dynamic model includes a trolley acceleration equation, a spreader rope length acceleration equation, and a spreader swing angle coupling equation; Obtaining obstacle distribution information within the working area of ​​the spreader through a spatial perception device, and calculating the dynamic safety height of the spreader by combining obstacle parameters with the control parameters; Determining the control stage of the spreader according to the initial state variables and the dynamic safety height, wherein the control stage includes an obstacle avoidance stage and a target tracking stage; Constructing a model predictive controller, and controlling the model predictive controller to dynamically adjust a state weight matrix and a control input weight matrix according to the control stage; Based on the state weight matrix, the control input weight matrix and the constraints of the spreader, a control input sequence for the spreader is generated by an optimization algorithm.

2. The method for controlling a gantry crane spreader based on multi-stage model predictive control according to claim 1, characterized in that: The step of establishing a dynamic model of the gantry crane based on the control parameters and the initial state variables specifically includes: The initial state variables are set to be the trolley position information, the trolley speed information, the spreader rope length information, the spreader rope length change speed information, the spreader swing angle information, and the spreader swing angle change speed information; and the control input variables are set to be the trolley acceleration information and the spreader rope length acceleration information; Based on the mass parameter, gravity constant, operating boundary conditions and damping parameters in the control parameters, combined with the initial state variables and the control input variables, the trolley acceleration equation for describing the horizontal movement of the trolley, the sling rope length acceleration equation for describing the change in the sling rope length, and the sling swing angle coupling equation for coupling the description of the dynamic change of the sling swing angle under the combined action of the trolley acceleration, trolley position and sling rope length are constructed.

3. The method for controlling a gantry crane spreader based on multi-stage model predictive control according to claim 1, characterized in that: Obtaining obstacle distribution information of the spreader in the working area through the spatial perception device and calculating the dynamic safety height of the spreader in combination with the obstacle parameters and the control parameters specifically includes: Using the spatial perception device deployed on the gantry crane to collect three-dimensional environmental data within the corresponding operating area of ​​the gantry crane, the three-dimensional environmental data includes horizontal position parameters and vertical height parameters of obstacles; Constructing an obstacle height mapping function based on the three-dimensional environment data, wherein the obstacle height mapping function is used to describe the maximum height of obstacles corresponding to different horizontal positions; A dynamic safety height model is constructed by combining the obstacle height mapping function, the sensor error tolerance, the obstacle area expansion factor, and the system equivalent friction factor in the control parameters; The dynamic safety height is output according to the dynamic safety height model.

4. The method for controlling a gantry crane spreader based on multi-stage model predictive control according to claim 3, characterized in that: The determining the control stage of the spreader according to the initial state variable and the dynamic safety height specifically includes: Based on the initial state variables, generating a horizontal position sequence and a corresponding vertical height sequence of the spreader within a preset prediction time domain through the dynamic model; extracting a corresponding dynamic safety height sequence from the dynamic safety height model based on the horizontal position sequence, and comparing the vertical height sequence with the dynamic safety height sequence one by one to obtain a comparison result; If the comparison result indicates that any height value in the vertical height sequence is lower than the corresponding dynamic safety height value, the control phase is determined to be the obstacle avoidance phase; otherwise, it is determined to be the target tracking phase.

5. The method for controlling a gantry crane spreader based on multi-stage model predictive control according to claim 1, characterized in that: The step of constructing a model predictive controller and controlling the model predictive controller to dynamically adjust a state weight matrix and a control input weight matrix according to the control stage specifically includes: A state error cost term and a control input cost term are set in the model predictive controller. The state error cost term is weighted by the state weight matrix to calculate the deviation cost of the trolley position, the sling rope length, and the sling swing angle relative to the target state. The control input cost term is weighted by the control input weight matrix to calculate the amplitude cost of the trolley acceleration and the sling rope length acceleration. If it is determined that the control phase is the obstacle avoidance phase based on the state error cost term and the control input cost term, the weight coefficients of the items corresponding to the spreader swing angle and the spreader rope length in the state weight matrix are increased, the weight coefficients of the items corresponding to the trolley position are decreased, and the weight coefficients of the items corresponding to the spreader rope length acceleration in the control input weight matrix are decreased, and the weight coefficients of the trolley acceleration are increased; If it is determined that the control stage is the target tracking stage, the terminal state weight coefficients of the trolley position and the sling swing angle in the state weight matrix are increased, the weight coefficient of the corresponding item of the sling rope length is reduced, and the weight coefficient of the trolley acceleration in the control input weight matrix is ​​reduced, and the weight coefficient of the sling rope length acceleration is increased.

6. The method for controlling a gantry crane spreader based on multi-stage model predictive control according to claim 4, characterized in that: The step of generating a control input sequence for the spreader by an optimization algorithm based on the state weight matrix, the control input weight matrix, and the constraints of the spreader specifically includes: Recursively generating, within the preset prediction time domain, state trajectories of the trolley position, trolley speed, spreader rope length, spreader rope length change rate, spreader swing angle, and spreader swing angle change rate according to the dynamic model and the initial state variables; Based on the state weight matrix and the control input weight matrix, adding hard constraints including that the vertical height of the spreader is not less than the dynamic safety height, the trolley speed and acceleration do not exceed the control boundary, and the spreader rope length change speed and acceleration are limited, and soft constraints that the trolley speed, spreader rope length change speed, and spreader swing angle change speed converge to zero, to obtain a target cost function; The target cost function and the constraint conditions are input into a constrained quadratic programming optimization algorithm to solve the optimal trolley acceleration sequence and the sling rope length acceleration sequence in the target prediction time domain to obtain the control input sequence.

7. The method for controlling a gantry crane spreader based on multi-stage model predictive control according to claim 1, wherein: The method further comprises: Setting weight terms in the state weight matrix for penalizing the spreader swing angle and the spreader swing angle change speed, and dynamically increasing the values ​​of the weight terms during the obstacle avoidance phase and the target tracking phase to enhance the control constraint on the spreader swing angle deviation; Setting weight terms for penalizing the trolley acceleration and the spreader rope length acceleration in the control input weight matrix, and increasing the penalization intensity of the trolley acceleration during the path turning interval and the terminal braking phase to smooth input changes and reduce the driving effect of the excitation source on the spreader's self-swing; A constraint condition that the spreader swing angle change speed converges to zero is set in the constraint condition, guiding the spreader posture to achieve stable convergence while completing the positioning process.

8. A gantry crane spreader control device based on multi-stage model predictive control, characterized in that: The device comprises an acquisition module (21) and a processing module (22), wherein: The acquisition module (21) is used to acquire control parameters of the gantry crane and determine initial state variables, wherein the control parameters and the initial state variables are used to define the operating boundary and initial state of the gantry crane; The processing module (22) is used to establish a dynamic model of the gantry crane based on the control parameters and the initial state variables, wherein the dynamic model includes a trolley acceleration equation, a spreader rope length acceleration equation, and a spreader swing angle coupling equation; The acquisition module (21) is further configured to acquire obstacle distribution information of the spreader in the working area through a space sensing device, and calculate the dynamic safety height of the spreader by combining obstacle parameters with the control parameters; The processing module (22) is further configured to determine the control stage of the spreader according to the initial state variable and the dynamic safety height, wherein the control stage includes an obstacle avoidance stage and a target tracking stage; The processing module (22) is further used to construct a model predictive controller and control the model predictive controller to dynamically adjust the state weight matrix and the control input weight matrix according to the control stage; The processing module (22) is further configured to generate a control input sequence for the spreader through an optimization algorithm based on the state weight matrix, the control input weight matrix and the constraints of the spreader.

9. An electronic device, characterized in that: The electronic device comprises a processor (31), a memory (35), a user interface (33) and a network interface (34), wherein the memory (35) is used to store instructions, the user interface (33) and the network interface (34) are both used to communicate with other devices, and the processor (31) is used to execute the instructions stored in the memory (35) so that the electronic device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is performed.

Citation Information

Patent Citations

  • Bridge crane safety control method and system based on multilayer perceptron network

    CN114933243A

  • Bridge crane sling anti-swing method based on trajectory planning

    CN114955856A

  • Hook track prediction method and device based on Internet of Things perception

    CN119349422A

  • Strict safety track optimization control method and system for under-actuated bridge crane

    CN120440783A

Cited By

  • Hybrid model predictive control method and system for controlling motor

    CN121277154A

  • Anti-swing predictive control method for offshore crane

    CN121454937A

  • Anti-sway predictive control method for offshore cranes

    CN121454937B

  • Hoisting path dynamic planning and obstacle avoidance method

    CN122704797A