Crane anti-swing method and system based on feedforward optimal trajectory planning and feedback model predictive control
By combining feedforward optimal trajectory planning and feedback model predictive control, the optimal speed trajectory is generated in real time and disturbances are compensated, which solves the problem of fast, accurate and stable operation of cranes under complex working conditions and achieves efficient anti-sway control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING SPECIAL MOTOR PLANT CO
- Filing Date
- 2026-03-23
- Publication Date
- 2026-06-30
AI Technical Summary
Existing crane anti-sway control technology cannot simultaneously meet the requirements of fast, accurate and stable operation under complex working conditions. Open-loop feedforward control lacks disturbance rejection capability, and closed-loop feedback lacks a global optimization perspective.
A method based on feedforward optimal trajectory planning and feedback model predictive control is adopted. By collecting system state signals in real time, a simplified linear discrete state-space model is established, finite-time domain optimization is performed, the optimal velocity trajectory is generated, and the model predictive control algorithm is combined to compensate for disturbances in real time, so as to achieve accurate tracking.
It achieves high-precision positioning and anti-sway control under complex working conditions, effectively resisting disturbances such as load changes and wind resistance, and ensuring the stability and efficiency of crane operation.
Smart Images

Figure CN122301074A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control technology for industrial cranes, and in particular to a crane anti-sway method and system based on feedforward optimal trajectory planning and feedback model predictive control. Background Technology
[0002] In modern industrial plants, ports, and logistics warehouses, bridge or gantry cranes are core equipment for material handling. Their trolley (the longitudinal movement of the bridge along the tracks) and gantry (the lateral movement of the lifting device along the bridge) mechanisms often require frequent start-stop and positioning operations. Traditional manual operation relies on the driver's experience, repeatedly adjusting the load in a "jog" motion to eliminate swaying, which is inefficient and poses safety hazards.
[0003] To achieve automated, efficient, and precise handling, automatic anti-sway control technology for cranes has emerged. Currently, there are two main methods: Model-based open-loop feedforward control (such as input shaping and preset S-shaped velocity curves): These methods calculate the ideal velocity command to suppress swaying based on a theoretical model before the action is executed. Their fundamental drawback lies in their over-reliance on precise system models (such as precise rope length and load mass). Once unmodeled disturbances such as load changes, unknown wind resistance, or uneven track friction occur in actual operating conditions, their sway-suppression effect will drastically decrease, resulting in poor robustness.
[0004] Closed-loop feedback control that does not rely on precise models (such as PID control and fuzzy control): This type of method detects the actual swaying of the suspended load using sensors and adjusts the motor speed in real time to counteract the swaying. Its inherent contradiction lies in its "passive response," only beginning to correct after the swaying occurs, resulting in a response lag. Simultaneously, the controller must make a difficult trade-off between rapid positioning (requiring large acceleration) and sway suppression (requiring smooth acceleration and deceleration), often leading to excessively long settling times or continuous oscillations.
[0005] The common challenge of existing technologies lies in the fact that open-loop feedforward lacks disturbance rejection capability, while closed-loop feedback lacks a global optimization perspective. Neither can simultaneously meet the operational goals of "speed," "precision," and "stability" required for high-paced production under complex real-world conditions. Therefore, there is an urgent need for a new intelligent control architecture that can integrate the advantages of feedforward's "global planning" and feedback's "real-time disturbance rejection." Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies by proposing a crane anti-sway method and system based on feedforward optimal trajectory planning and feedback model predictive control.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control, comprising the following steps: S1: Real-time signal collection and processing to form a state vector describing the current complete motion state of the system. ; Furthermore, the signals include system fixed parameters, encoder pulse signals, and oscillation state sensing; The system's fixed parameters include rope length l, trolley mass, rated load mass, motor torque parameters, reduction ratio i from motor shaft to wheel, and wheel diameter D. The encoder pulse signal is generated by an incremental photoelectric rotary encoder installed on the drive motor shaft or the walking wheel shaft. The absolute position X of the trolley and the real-time running speed V of the trolley are calculated based on the pulse signal generated by the rotation. Furthermore, the pulse signal can be processed by the high-speed counter module of the controller to obtain the encoder pulse count N and the encoder pulse count P per revolution; The absolute position X of the trolley is given by the formula The real-time operating speed V of the vehicle is calculated using the formula... Where D is the wheel diameter and i is the reduction ratio from the motor shaft to the wheel. For a fixed time interval The encoder pulse count N increments within the range; The swing state sensing specifically involves real-time acquisition of triaxial acceleration by installing an inertial measurement unit (IMU) on the trolley hook or the end of the wire rope. and triaxial angular velocity ; Specifically, the signal processing procedure refers to the triaxial acceleration. Triaxial angular velocity The absolute position X and real-time running speed V are input to an attitude observer based on filtering theory (using a complementary filtering algorithm). This observer first extracts the drag motion component caused by the vehicle's acceleration and deceleration from the IMU acceleration signal, then fuses it with the gyroscope angular velocity signal, and finally calculates and outputs high-precision load swing angle θ and swing angular velocity in real time. .
[0008] The above process is a commonly known method in this field for obtaining the swing state when no direct measurement means are available. The output load swing angle θ, angular velocity ω, and the absolute position x and real-time running speed v directly measured by the encoder together constitute a complete state vector characterizing the current dynamics of the system, denoted as . .
[0009] This step provides accurate and reliable real-time state feedback for the entire control system, forming the basis for all subsequent intelligent decisions and solving the problems of traditional methods relying on inaccurate models or feedback lag. S2: Using the complete state vector from S1 and the location of the target car Based on the prediction model, a finite-time optimization problem is solved on a rolling basis in each planning cycle to obtain a dynamically updated optimal velocity reference sequence. ; This step aims to address the problem of "lack of a global optimization perspective in closed-loop feedback" in the background technology. Through model prediction, it proactively calculates a globally optimal velocity trajectory that comprehensively considers positioning speed and sway suppression, providing an intelligent reference benchmark for lower-level control.
[0010] Further steps include the following sub-steps: S21: Establish a prediction model based on the fixed parameters of the system; Furthermore, the prediction model is a simplified linear discrete state-space model of trajectory planning, mathematically expressed as: ; in, This is the internal predicted state vector of the planning model. The control variable is defined as the acceleration 'a' of the vehicle. and The system matrix is calculated from the fixed parameters of the system. Specifically, the prediction model building process includes: The trajectory planner is based on the dynamic model of the crane trolley-load system. It considers the trolley mass M, load mass m, rope length l, trolley displacement x and load swing angle θ as generalized coordinates, and establishes the nonlinear dynamic model of the system through the Lagrange equation.
[0011] Before using the nonlinear dynamic model for predictive control, it needs to be linearized to suit small swing angle conditions to obtain the continuous-time state-space equations: ; Wherein, the state vector Control input Let F be the driving force of the car. ; Furthermore, to accommodate the discrete-time operation of the digital controller, the sampling period is... Discretize the above continuous model (using the zero-order preservation method) to obtain the discrete-time prediction model: ; in, In practical applications, a first-order approximation can be used to simplify the calculation: The planning control quantity The physical meaning is the acceleration command of the car. The relationship between the driving force F and the driving force F is as follows: .
[0012] S22: Transform the complete state vector Substitute the values into the prediction model and perform simulation to obtain the optimal acceleration sequence; Furthermore, the complete state vector in S1 Set as the initial value of the predicted state vector within the prediction model, i.e. This operation aligns predictions with reality.
[0013] Define a scalar objective function J with the predicted state and control input as variables, to comprehensively evaluate the future. The objective function J is mathematically expressed as follows: (This is used to predict the performance of the system within the time domain.) ;in, and These are the predicted position of the car and the predicted swing angle of the load for the i-th step, derived from the prediction model, respectively. The target position of the car. , R and J are pre-set positive weighting coefficients used to adjust the relative importance of positioning accuracy, anti-sway performance, and control smoothness in the optimization process. The smaller the J value, the better the overall performance of the corresponding predicted trajectory.
[0014] Furthermore, the solution to the objective function J must satisfy all of the following constraints: 1) System dynamics equality constraints: All predicted states must strictly follow the discrete-time prediction model established in S21, that is, for all ,satisfy: ; This constraint is the core of connecting the optimization problem with the physical system model, ensuring that any considered control sequence and its resulting state trajectory are dynamically feasible.
[0015] 2) Control input inequality constraint: The planned control quantity (acceleration) must not exceed the capability range of the actuator, that is: , ;in, This represents the maximum allowable acceleration for the vehicle. 3) State variable inequality constraints: The system's prediction speed must meet the safe operating limits, that is: for all , ,in This is the maximum permissible operating speed for the vehicle.
[0016] In each planning cycle, the above initial values will be used. The objective function J and all constraints constitute a standard constrained optimization problem. This mathematical optimization problem is solved online in real time by calling the built-in numerical optimization solver module. The numerical optimization solver module employs mature mathematical programming algorithms (e.g., sequential quadratic programming, interior-point method, or effective set method). Its core function is to perform automated iterative calculations within the feasible solution space jointly defined by the optimization objective J and all constraints in S223, thereby finding and determining a specific set of future control input sequences. The sequence is the solution that minimizes the objective function J in the feasible solution space, i.e., the optimal solution to the optimization problem.
[0017] After successful solution, the optimal control input sequence is obtained. This is the output of this step. Since the physical meaning of is the acceleration of the car, this sequence represents the future... The optimal acceleration sequence of the car in steps is denoted as . .
[0018] S23: Perform a first-order integral on the optimal acceleration sequence obtained in S22 to calculate the corresponding optimal velocity reference sequence. ;in, For the planning period. S3: The optimal velocity reference sequence output from the previous step S2. To track the target, the system state vector is combined with real-time feedback. The optimal torque command for the drive motor is calculated by the tracking controller. This step aims to address the problem of "lack of disturbance rejection capability in open-loop feedforward" in the background technology. It uses the optimal trajectory generated by S2 as input, and through a refined model incorporating actuator dynamics and a model predictive control algorithm, it resists disturbances and compensates for errors in real time, ensuring accurate tracking of the ideal trajectory under complex operating conditions.
[0019] Further steps include the following sub-steps: S31: The tracking controller adopts an algorithm based on the model predictive control principle to construct a discrete-time prediction model for short-term high-precision tracking. The discrete-time prediction model, based on the prediction model established in S21, further incorporates the dynamic characteristics of the motor and its drive system to more accurately predict the system response in a short time.
[0020] Specifically, the process of establishing the tracking controller prediction model is as follows: S311: Construct a continuous-time model that includes motor dynamics: Consider motor torque command The transmission process between the velocity (in N·m) and the actual acceleration 'a' of the vehicle can be approximated by a first-order inertial element: ;in, K is the equivalent time constant of the motor armature circuit or drive system (unit: s), and K is the gain coefficient (unit: m / (s²·N·m)).
[0021] The above motor dynamic equations are compared with the continuous-time state-space equations in S21 ( By combining these elements, a new extended state vector is defined. The extended continuous-time state-space equations are obtained as follows: ;in, matrix The first four rows and four columns are consistent with the core of the matrix in S21, with the newly added fifth row and fifth column element. The newly added description of the inertial decay of acceleration itself. It describes the control quantity (motor torque). The effect on the rate of change of acceleration.
[0022] S312: Apply the above continuous-time state-space equations to the tracking control period. Discretization yields a discrete-time prediction model for online optimization of the tracking controller: ;in, To track the internal predicted state vector of the controller, the discrete matrix , In practical applications, a first-order approximation can be used to simplify the calculation: .
[0023] The key difference between this model and the planning model in S21 is that the state of the planning model in S21 is... The control variable is acceleration 'a', implicitly assuming that acceleration can be instantaneously and precisely achieved. The state extension of this tracking controller model is... Control quantity This represents the motor torque.
[0024] S32: The tracking controller prediction model built based on S31, using the optimal velocity reference sequence output by S2. To track the target and, in conjunction with the current system state, solve a constrained optimization problem in the finite time domain to calculate the optimal motor torque command sequence for achieving accurate tracking and disturbance resistance.
[0025] Specifically, it includes the following steps: The current actual state vector obtained from S1 =[x,v,θ,ω]^T and the current estimated acceleration of the vehicle a(k) are used together as the initial values of the extended predicted state vector inside the tracking controller, that is, let Define a scalar objective function with the tracking and prediction state and control input as variables. Used for comprehensive evaluation of the future The tracking performance and dynamic qualities of a system in the control time domain are mathematically expressed as follows: ; in, The predicted speed of the car in the i-th step is derived from the tracking prediction model described in S31. The predicted load swing angle for the i-th step in the future is derived from the tracking prediction model described in S31. This is the optimal velocity reference value from the corresponding time step in step S2. , , These are pre-set positive weighting coefficients, used to adjust the relative importance of speed tracking accuracy, real-time anti-sway performance, and torque smoothness in the optimization process. The smaller the value, the better the overall tracking performance of the corresponding control sequence, and the objective function... The solution must satisfy all of the following constraints: 1) System dynamics equality constraint: All tracking and prediction states must strictly follow the discrete-time prediction model established in S31, that is, for all satisfy .
[0026] 2) Control input inequality constraint: The torque command output by the controller must not exceed the physical capability range of the motor and driver, that is, for all... ,satisfy ;in, This represents the maximum allowable motor torque of the system.
[0027] 3) State variable inequality constraints: The predicted velocity and predicted acceleration of the system must still meet the safe operation limits, that is, for all... ,satisfy ,and .
[0028] In each control cycle, the initial state, objective function J_c, and all constraints are combined to form a standard constrained optimization problem. This problem is then solved online in real-time by calling the built-in numerical optimization solver module. The solver module employs mature mathematical programming algorithms (such as sequential quadratic programming), and its core function is to perform automated iterative calculations within the feasible solution space defined by the objective function J_c and the constraints, thereby finding and determining a specific set of future control input sequences. The sequence is the solution that minimizes the value of the objective function J_c within the feasible solution space, i.e., the optimal solution to the tracking optimization problem.
[0029] After a successful solution, based on the "rolling time domain" strategy in model predictive control, the first element of the obtained optimal control input sequence is... Extract it as the immediate output of this step. The physical meaning of is the optimal torque command that should be applied to the drive motor at the current moment.
[0030] S4: Send the optimal torque command The inverter or servo drive sent to the crane trolley drives the motor to output precise torque, which is converted into a force that moves the trolley through the transmission system, thereby changing the state of the entire crane system.
[0031] Specifically, the real-time torque command is sent to the frequency converter or servo drive of the crane trolley via an industrial communication interface (such as Ethernet or CAN bus) or an analog output channel. The driver's built-in current and speed loop control algorithms (such as vector control) generate a corresponding three-phase pulse width modulation (PWM) signal based on the command value, driving the motor armature to produce precise electromagnetic torque. This torque is amplified and transmitted through transmission mechanisms such as reducers, gears, and wheels, ultimately transforming into a driving force or braking force acting on the trolley body. Under the action of this force, the dynamic state of the crane system—including the trolley's displacement x and velocity v, and the load swing angle θ and angular velocity ω connected by ropes—is determined.
[0032] First, after S4 is executed, the actual physical state of the system changes; then, at the next sampling time, the sensors in S1 collect data again, the state observer updates based on the latest data, and outputs a new generation of system state estimates. This new state immediately triggers the trajectory planner in S2 to perform a new round of rolling optimization. Based on the latest position and sway information, it recalculates and updates the optimal velocity reference sequence V_ref in the future time domain, ensuring that the planning always fits the current actual situation. At the same time, the tracking controller in S3 also receives this new state X_{k+1} and the updated reference trajectory. The system calculates the optimal torque command u_c^*(k+1) for the next moment; this command is then passed to the S4 drive system. This process of "perception (S1) → planning (S2) → tracking (S3) → execution (S4) → re-perception…" is continuously repeated until the task termination condition is met (e.g., position error enters the dead zone). Through this closed-loop architecture, the system can continuously cope with external disturbances and internal model errors, achieving online updates of control commands and continuous performance optimization, thereby reliably achieving the ultimate control goal of high-precision positioning and sway elimination.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention creatively integrates an upper-level feedforward trajectory planner with a lower-level feedback tracking controller. The upper-level planner, based on a simplified dynamic model, generates an optimal velocity trajectory that balances positioning efficiency and anti-sway performance from a global perspective through rolling time-domain optimization, overcoming the shortcomings of traditional feedback control that "misses the forest for the trees" and struggles to achieve global optimization. The lower-level planner, based on an extended predictive model incorporating motor dynamics, uses the upper-level trajectory as a reference and employs high-frequency model predictive control to compensate for model errors and external disturbances in real time, overcoming the inherent weakness of traditional open-loop feedforward control in terms of poor disturbance rejection. These two elements complement each other, forming an intelligent control system that is both forward-looking and adaptable.
[0034] This invention employs model predictive control (MPC) principles in both the trajectory planning and tracking control layers, forming a unique dual-MPC architecture. The planning layer MPC, with its larger prediction time domain and simplified model, ensures the global optimality and stability of the trajectory; the tracking layer MPC, with its smaller prediction time domain and refined model (including motor dynamics), ensures high-precision real-time tracking of the planned trajectory. This layered, time-division predictive control strategy guarantees both real-time computation and control accuracy, enabling the system to maintain a smooth and stable dynamic response during start-up, acceleration / deceleration, and when encountering disturbances such as sudden load increases and wind resistance.
[0035] By coordinating the encoder and IMU, and combining complementary filter attitude observers, the position, speed, load swing angle and swing angular velocity of the vehicle can be estimated in real time and accurately, and the motion disturbances can be effectively isolated to ensure that the control decision is based on "accurate vision".
[0036] It has a natural ability to suppress disturbances such as load changes, rope length changes, and gusts of wind. The tracking controller actively corrects deviations online, and it can still maintain excellent anti-sway and positioning performance in harsh working conditions such as ports and metallurgy. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating the implementation of Embodiment 1 of the present invention. Detailed Implementation
[0038] To provide a further understanding of the purpose, structure, features, and functions of the present invention, detailed descriptions are provided below with reference to specific embodiments.
[0039] A crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control includes the following steps: S1: Real-time signal collection and processing to form a state vector describing the current complete motion state of the system. ; Furthermore, the signals include system fixed parameters, encoder pulse signals, and oscillation state sensing; The system's fixed parameters include rope length l, trolley mass, rated load mass, motor torque parameters, reduction ratio i from motor shaft to wheel, and wheel diameter D. The encoder pulse signal is generated by an incremental photoelectric rotary encoder installed on the drive motor shaft or the walking wheel shaft. The absolute position X of the trolley and the real-time running speed V of the trolley are calculated based on the pulse signal generated by the rotation. Furthermore, the pulse signal can be processed by the high-speed counter module of the controller to obtain the encoder pulse count N and the encoder pulse count P per revolution; The absolute position X of the trolley is given by the formula The real-time operating speed V of the vehicle is calculated using the formula... Where D is the wheel diameter and i is the reduction ratio from the motor shaft to the wheel. For a fixed time interval The encoder pulse count N increments within the range; The swing state sensing specifically involves real-time acquisition of triaxial acceleration by installing an inertial measurement unit (IMU) on the trolley hook or the end of the wire rope. and triaxial angular velocity ; Specifically, the signal processing procedure refers to the triaxial acceleration. Triaxial angular velocity The absolute position X and real-time running speed V are input to an attitude observer based on filtering theory (using a complementary filtering algorithm). This observer first extracts the drag motion component caused by the vehicle's acceleration and deceleration from the IMU acceleration signal, then fuses it with the gyroscope angular velocity signal, and finally calculates and outputs high-precision load swing angle θ and swing angular velocity in real time. .
[0040] The above process is a commonly known method in this field for obtaining the swing state when no direct measurement means are available. The output load swing angle θ, angular velocity ω, and the absolute position x and real-time running speed v directly measured by the encoder together constitute a complete state vector characterizing the current dynamics of the system, denoted as . .
[0041] This step provides accurate and reliable real-time status feedback for the entire control system, which is the foundation for all subsequent intelligent decisions and solves the problem of traditional methods relying on inaccurate models or feedback lag.
[0042] S2: The complete state vector from S1 and the location of the target car Based on the prediction model, a finite-time optimization problem is solved on a rolling basis in each planning cycle to obtain a dynamically updated optimal velocity reference sequence. ; This step aims to address the problem of "lack of a global optimization perspective in closed-loop feedback" in the background technology. Through model prediction, it proactively calculates a globally optimal velocity trajectory that comprehensively considers positioning speed and sway suppression, providing an intelligent reference benchmark for lower-level control.
[0043] Further steps include the following sub-steps: S21: Establish a prediction model based on the fixed parameters of the system; Furthermore, the prediction model is a simplified linear discrete state-space model of trajectory planning, mathematically expressed as: ; in, This is the internal predicted state vector of the planning model. The control variable is defined as the acceleration 'a' of the vehicle. and The system matrix is calculated from the fixed parameters of the system. Specifically, the prediction model building process includes: The trajectory planner is based on the dynamic model of the crane trolley-load system. It considers the trolley mass M, load mass m, rope length l, trolley displacement x and load swing angle θ as generalized coordinates, and establishes the nonlinear dynamic model of the system through the Lagrange equation.
[0044] Before using the nonlinear dynamic model for predictive control, it needs to be linearized to suit small swing angle conditions to obtain the continuous-time state-space equations: ; Wherein, the state vector Control input Let F be the driving force of the car. ; Furthermore, to accommodate the discrete-time operation of the digital controller, the sampling period is... Discretize the above continuous model (using the zero-order preservation method) to obtain the discrete-time prediction model: ; in, In practical applications, a first-order approximation can be used to simplify the calculation: The planning control quantity The physical meaning is the acceleration command of the car. The relationship between the driving force F and the driving force F is as follows: .
[0045] S22: Transform the complete state vector Substitute the values into the prediction model and perform simulation to obtain the optimal acceleration sequence; Furthermore, the complete state vector in S1 Set as the initial value of the predicted state vector within the prediction model, i.e. This operation aligns predictions with reality.
[0046] Define a scalar objective function J with the predicted state and control input as variables, to comprehensively evaluate the future. The objective function J is mathematically expressed as follows: (This is used to predict the performance of the system within the time domain.) ;in, and These are the predicted position of the car and the predicted swing angle of the load for the i-th step, derived from the prediction model, respectively. The target position of the car. , R and R are pre-set positive weighting coefficients, used to adjust the relative importance of positioning accuracy, anti-sway performance, and control smoothness in the optimization. A smaller J value indicates better overall performance of the predicted trajectory. Furthermore, the solution to the objective function J must satisfy all of the following constraints: 1) System dynamics equality constraints: All predicted states must strictly follow the discrete-time prediction model established in S21, that is, for all ,satisfy: ; This constraint is the core of connecting the optimization problem with the physical system model, ensuring that any considered control sequence and its resulting state trajectory are dynamically feasible.
[0047] 2) Control input inequality constraint: The planned control quantity (acceleration) must not exceed the capability range of the actuator, that is: , ;in, This represents the maximum allowable acceleration for the vehicle. 3) State variable inequality constraints: The system's prediction speed must meet the safe operating limits, that is: for all , ,in This is the maximum permissible operating speed for the vehicle.
[0048] In each planning cycle, the above initial values will be used. The objective function J and all constraints constitute a standard constrained optimization problem. This mathematical optimization problem is solved online in real time by calling the built-in numerical optimization solver module. The numerical optimization solver module employs mature mathematical programming algorithms (e.g., sequential quadratic programming, interior-point method, or effective set method). Its core function is to perform automated iterative calculations within the feasible solution space jointly defined by the optimization objective J and all constraints in S223, thereby finding and determining a specific set of future control input sequences. The sequence is the solution that minimizes the objective function J in the feasible solution space, i.e., the optimal solution to the optimization problem.
[0049] After successful solution, the optimal control input sequence is obtained. This is the output of this step. Because... The physical meaning is the acceleration of the car; this sequence represents the future. The optimal acceleration sequence of the car in steps is denoted as . .
[0050] S23: Perform a first-order integral on the optimal acceleration sequence obtained in S22 to calculate the corresponding optimal velocity reference sequence. ;in, For the planning cycle.
[0051] S3: The optimal velocity reference sequence output from step S2 above. To track the target, the system state vector is combined with real-time feedback. The optimal torque command for the drive motor is calculated by the tracking controller. This step aims to address the problem of "lack of disturbance rejection capability in open-loop feedforward" in the background technology. It uses the optimal trajectory generated by S2 as input, and through a refined model incorporating actuator dynamics and a model predictive control algorithm, it resists disturbances and compensates for errors in real time, ensuring accurate tracking of the ideal trajectory under complex operating conditions.
[0052] Further steps include the following sub-steps: S31: The tracking controller adopts an algorithm based on the model predictive control principle to construct a discrete-time prediction model for short-term high-precision tracking. The discrete-time prediction model, based on the prediction model established in S21, further incorporates the dynamic characteristics of the motor and its drive system to more accurately predict the system response in a short time.
[0053] Specifically, the process of establishing the tracking controller prediction model is as follows: S311: Construct a continuous-time model that includes motor dynamics: Consider motor torque command The transmission process between the velocity (in N·m) and the actual acceleration 'a' of the vehicle can be approximated by a first-order inertial element: ;in, Let K be the equivalent time constant (in seconds) of the motor armature circuit or drive system, and K be the gain coefficient (in meters (s²·N·m)). Compare the above motor dynamic equations with the continuous-time state-space equations in S21 (…). By combining these elements, a new extended state vector is defined. The extended continuous-time state-space equations are obtained as follows: ;in, ; matrix The first four rows and four columns and S21 The core of the matrix remains the same, with the addition of the fifth row and fifth column element. The newly added description of the inertial decay of acceleration itself. It describes the control quantity (motor torque). With respect to the rate of change of acceleration The impact.
[0054] S312: Apply the above continuous-time state-space equations to the tracking control period. Discretization yields a discrete-time prediction model for online optimization of the tracking controller: ;in, To track the internal predicted state vector of the controller, the discrete matrix , In practical applications, a first-order approximation can be used to simplify the calculation: .
[0055] The key difference between this model and the planning model in S21 is that the state of the planning model in S21 is... The control variable is acceleration 'a', implicitly assuming that acceleration can be instantaneously and precisely achieved. The state extension of this tracking controller model is... Control quantity This represents the motor torque.
[0056] S32: The tracking controller prediction model built based on S31, using the optimal velocity reference sequence output by S2. To track the target and, in conjunction with the current system state, solve a constrained optimization problem in the finite time domain to calculate the optimal motor torque command sequence for achieving accurate tracking and disturbance resistance.
[0057] Specifically, it includes the following steps: The current actual state vector X_k=[x,v,θ,ω]^T obtained from S1 and the current estimated acceleration value a(k) of the vehicle are jointly set as the initial values of the extended predicted state vector inside the tracking controller, that is, let Define a scalar objective function with the tracking and prediction state and control input as variables. Used for comprehensive evaluation of the future The tracking performance and dynamic qualities of a system in the control time domain are mathematically expressed as follows: ; in, The predicted speed of the car in the i-th step is derived from the tracking prediction model described in S31. The predicted load swing angle for the i-th step in the future is derived from the tracking prediction model described in S31. This is the optimal velocity reference value from the corresponding time step in step S2. , , These are pre-set positive weighting coefficients, used to adjust the relative importance of speed tracking accuracy, real-time anti-sway performance, and torque smoothness in the optimization process. The smaller the value, the better the overall tracking performance of the corresponding control sequence, and the objective function... The solution must satisfy all of the following constraints: 1) System dynamics equality constraints: All tracking and prediction states must strictly follow the discrete-time prediction model established in S31, that is, for all satisfy .
[0058] 2) Control input inequality constraint: The torque command output by the controller must not exceed the physical capability range of the motor and driver, that is, for all... ,satisfy ;in, This represents the maximum allowable motor torque of the system.
[0059] 3) State variable inequality constraints: The predicted velocity and predicted acceleration of the system must still meet the safe operation limits, that is, for all... ,satisfy ,and .
[0060] In each control cycle, the initial state, objective function J_c, and all constraints are combined to form a standard constrained optimization problem. This problem is then solved online in real-time by calling the built-in numerical optimization solver module. The solver module employs mature mathematical programming algorithms (such as sequential quadratic programming), and its core function is to perform automated iterative calculations within the feasible solution space defined by the objective function J_c and the constraints, thereby finding and determining a specific set of future control input sequences. The sequence is the solution that minimizes the value of the objective function J_c within the feasible solution space, i.e., the optimal solution to the tracking optimization problem.
[0061] After a successful solution, based on the "rolling time domain" strategy in model predictive control, the first element of the obtained optimal control input sequence is... Extract it as the immediate output of this step. The physical meaning of S4 is the optimal torque command that should be applied to the drive motor at the current moment. The inverter or servo drive sent to the crane trolley drives the motor to output precise torque, which is converted into a force that moves the trolley through the transmission system, thereby changing the state of the entire crane system.
[0062] Specifically, the real-time torque command is sent to the frequency converter or servo drive of the crane trolley via an industrial communication interface (such as Ethernet or CAN bus) or an analog output channel. The driver's built-in current and speed loop control algorithms (such as vector control) generate a corresponding three-phase pulse width modulation (PWM) signal based on the command value, driving the motor armature to produce precise electromagnetic torque. This torque is amplified and transmitted through transmission mechanisms such as reducers, gears, and wheels, ultimately transforming into a driving force or braking force acting on the trolley body. Under the action of this force, the dynamic state of the crane system—including the trolley's displacement x and velocity v, and the load swing angle θ and angular velocity ω connected by ropes—is determined.
[0063] First, after execution of S4, the actual physical state of the system changes. Then, at the next sampling moment, the sensors in S1 collect data again, and the state observer updates based on the latest data, outputting a new generation of system state estimates X_(k+1). This new state immediately triggers the trajectory planner in S2 to perform a new round of rolling optimization, recalculating and updating the optimal velocity reference sequence for the future time domain based on the latest position and oscillation information. This ensures that the planning always aligns with the current actual situation; simultaneously, the S3 tracking controller also receives this new state X_{k+1} and the updated reference trajectory. The system calculates the optimal torque command u_c^*(k+1) for the next moment; this command is then passed to the S4 drive system. This process of "perception (S1) → planning (S2) → tracking (S3) → execution (S4) → re-perception…" is continuously repeated until the task termination condition is met (e.g., position error enters the dead zone). Through this closed-loop architecture, the system can continuously cope with external disturbances and internal model errors, achieving online updates of control commands and continuous performance optimization, thereby reliably achieving the ultimate control goal of high-precision positioning and sway elimination.
[0064] The present invention has been described by the above-described embodiments; however, these embodiments are merely examples for implementing the present invention. It must be noted that the disclosed embodiments do not limit the scope of the present invention. Conversely, any modifications and refinements made without departing from the spirit and scope of the present invention are within the scope of patent protection of the present invention.
Claims
1. A crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control, characterized in that, Includes the following sub-steps: S1: Real-time signal collection and processing to form a state vector describing the current complete motion state of the system. ,in V represents the absolute position, and V represents the real-time operating speed. For the load swing angle, It is the angular velocity of the swing. S2: Using the state vector in S1 and the location of the target car Based on the prediction model, a finite-time optimization problem is solved on a rolling basis in each planning cycle to obtain a dynamically updated optimal velocity reference sequence. ; Includes the following sub-steps: S21: Establish a prediction model based on the fixed parameters of the system; The system's fixed parameters include rope length l, trolley mass, rated load mass, motor torque parameters, reduction ratio i from motor shaft to wheel, and wheel diameter D. S22: Transfer the state vector Substitute the values into the prediction model and perform simulation to obtain the optimal acceleration sequence; S23: Perform a first-order integral on the optimal acceleration sequence obtained in S22 to calculate the corresponding optimal velocity reference sequence. ;in, For the planning cycle; S3: The optimal velocity reference sequence output from step S2 above. To track the target, combine the state vector The optimal torque command for the drive motor is calculated by the tracking controller. Includes the following sub-steps: S31: The tracking controller adopts an algorithm based on the principle of model predictive control to construct a predictive model for short-term high-precision tracking controller; The process of establishing the tracking controller prediction model is as follows: S311: Construct a continuous-time model that includes motor dynamics; S312: Apply the above continuous-time state-space equations to the tracking control period. Discretization is performed to obtain a discrete-time prediction model for online optimization of the tracking controller; S32: The tracking controller prediction model built based on S31, using the optimal velocity reference sequence output by S2. To track the target and, considering the current system state, solve a finite-time constrained optimization problem to calculate the optimal motor torque command sequence for achieving accurate tracking and disturbance rejection. (k); S4: Optimal motor torque command sequence (k) The frequency converter or servo driver sent to the crane trolley drives the motor to output precise torque, which is converted into a force that moves the trolley through the transmission system, thereby changing the state of the entire crane system.
2. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: In step S1, the absolute position x and real-time running speed v of the trolley are calculated using encoder pulse signals installed on the motor shaft or wheel axle. The calculation formula is as follows: ; Where N is the cumulative number of encoder pulses, PPR is the number of encoder pulses per revolution, D is the wheel diameter, and i is the reduction ratio from the motor shaft to the wheel. For a fixed time interval The encoder pulse count N increments within the range.
3. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: In step S1, the load swing angle θ and swing angular velocity ω are collected in real time by an inertial measurement unit (IMU) installed on the trolley hook or the end of the wire rope, which acquires triaxial acceleration. and triaxial angular velocity The values are input to an attitude observer based on a complementary filtering algorithm for calculation. The attitude observer uses a complementary filtering algorithm, takes the gravity direction measured by the triaxial accelerometer as a long-term reference, integrates the triaxial angular velocity to obtain the attitude angle, and calculates the load swing angle θ and swing angular velocity ω.
4. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: S21: Establish a prediction model based on the fixed parameters of the system; The prediction model is a simplified linear discrete state-space model of trajectory planning, mathematically expressed as: ; in, This is the internal predicted state vector of the planning model. The control variable is defined as the acceleration 'a' of the vehicle. and The system matrix is calculated from the trolley mass, load mass, and rope length.
5. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: S22: The complete state vector Substitute the values into the prediction model and perform simulation to obtain the optimal acceleration sequence; The complete state vector in S1 Set as the initial value of the predicted state vector within the prediction model, i.e. This operation aligns predictions with reality; Define a scalar objective function J with the predicted state and control input as variables, to comprehensively evaluate the future. The objective function J is mathematically expressed as follows: (This is used to predict the performance of the system within the time domain.) ;in, and These are the predicted position of the car and the predicted swing angle of the load for the i-th step, derived from the prediction model, respectively. The target position of the car. , R and R are pre-set positive weighting coefficients, used to adjust the relative importance of positioning accuracy, anti-sway performance and control motion smoothness in the optimization; the smaller the J value, the better the overall performance of the corresponding predicted trajectory; Furthermore, the solution to the objective function J must satisfy all of the following constraints: 1) System dynamics equality constraints: All predicted states must strictly follow the discrete-time prediction model established in S21, that is, for all ,satisfy: ; This constraint is the core of connecting the optimization problem with the physical system model, ensuring that any considered control sequence and its resulting state trajectory are dynamically feasible. 2) Control input inequality constraint: The planned control quantity must not exceed the capability range of the actuator, that is: , ;in, This represents the maximum allowable acceleration for the vehicle. 3) State variable inequality constraints: The system's prediction speed must meet the safe operating limits, that is: for all , ,in This refers to the maximum permissible operating speed of the vehicle. The future solution is obtained by solving online using a numerical optimization solver. Optimal acceleration sequence of the car in one step .
6. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: Step S23: Perform a first-order integral on the optimal vehicle acceleration sequence to calculate the corresponding optimal velocity reference sequence. ;in, Let v(k) be the planning period, v(k) be the real-time speed of the vehicle at the current moment, and the optimal speed reference sequence be denoted as . .
7. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: In step S31, the tracking controller prediction model is constructed based on the prediction model described in claim 4 by introducing the dynamic characteristics of the motor and its drive system. This model expands the state vector to include state variables containing the vehicle's acceleration and expands the control quantity to motor torque commands. The mathematical expression of its discrete-time prediction model is as follows: ,in and Let be the system matrix containing the motor time constant τ and the gain coefficient K.
8. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: S32: Based on the tracking controller prediction model established by S31, the optimal speed reference sequence output by S2 is used as the tracking target, and combined with the current system state, a finite time-domain constrained optimization problem is solved to calculate the optimal motor torque command sequence for achieving accurate tracking and disturbance resistance. With the current actual state vector The current estimated acceleration value a(k) of the vehicle is used to set the initial value of the predicted state vector within the prediction model of the tracking controller, i.e. and the optimal velocity reference sequence output in step S2. To track the target, the following objective function and constraints are constructed: Objective function: ; in, To track the prediction time domain, The predicted speed of the car in the i-th step is derived from the tracking prediction model described in S31. The predicted load swing angle for the i-th step in the future is derived from the tracking prediction model described in S31. This is the optimal velocity reference value from the corresponding time step in step S2. , , where is a pre-set positive weighting coefficient; Constraints: 1) System dynamics equation constraint: All tracking and prediction states must strictly follow the discrete-time prediction model established in S31, that is, for all satisfy; 2) Control input inequality constraint: The torque command output by the controller must not exceed the physical capability range of the motor and driver, that is, for all... ,satisfy ;in, This represents the maximum allowable motor torque of the system. 3) State variable inequality constraints: The predicted velocity and predicted acceleration of the system must still meet the safe operation limits, that is, for all... ,satisfy ,and .
9. The crane anti-sway method based on feedforward optimal trajectory planning and feedback model predictive control as described in claim 1, characterized in that: In step S4, the optimal torque command is sent to the frequency converter or servo driver via an industrial fieldbus or analog output module. The driver generates a three-phase pulse width modulation signal according to the command, drives the motor to generate electromagnetic torque, and converts it into trolley driving force through the transmission mechanism.
10. A crane anti-sway and precise positioning intelligent control system for implementing the method of any one of claims 1 to 9, characterized in that, include: The state sensing unit includes an encoder mounted on the motor shaft or wheel axle, an inertial measurement unit (IMU) mounted on the hook or wire rope end, and a signal processing module for generating state vectors in real time. A feedforward trajectory planner, embedded in a digital controller, is used to perform step S2 as described in claim 1 and the optimization calculation and trajectory generation as described in any one of claims 4 to 6; A feedback tracking controller, embedded in a digital controller, is used to perform step S3 as described in claim 1 and the optimization calculation and torque command generation as described in any one of claims 7 to 8; The instruction execution interface is used to send the optimal torque instruction to the motor driver.