Double-wheel differential AGV course control method and system

By using fuzzy adaptive model predictive control and composite variable speed approaching law sliding mode control, the problem of balancing response speed and stability in AGV heading control by traditional PID controllers is solved. This enables AGV to achieve high-precision and high-stability heading tracking under complex working conditions, enhances anti-disturbance capability, eliminates chattering, and ensures long service life of AGV.

CN121957016APending Publication Date: 2026-05-01QINGDAO KERISIDE ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO KERISIDE ELECTRONIC TECH CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional PID controllers cannot simultaneously achieve rapid correction and smooth cornering in the heading control of dual-wheel differential AGVs. Furthermore, existing model predictive control and sliding mode control suffer from control command fluctuations and mechanical wear under nonlinear disturbances, making it difficult to meet the requirements of high precision and long lifespan in industrial applications.

Method used

By employing fuzzy adaptive model predictive control combined with composite variable speed reaching law sliding mode control, high-precision and robust heading tracking of AGVs is achieved through real-time adjustment of the weight matrix and construction of the composite variable speed reaching law.

Benefits of technology

Under varying curvature paths and complex load conditions, the system achieves high-precision and high-stability heading tracking for AGVs, enhances their anti-disturbance capabilities, eliminates chattering issues, and ensures a long hardware lifespan for AGVs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957016A_ABST
    Figure CN121957016A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of AGV motion control, and discloses a double-wheel differential AGV course control method and system.The method comprises the steps that firstly, a wheel type odometer and IMU data are fused to obtain a high-precision pose, and transverse and course deviations with a reference path are calculated; secondly, a fuzzy controller is introduced, the state error weight and the control quantity weight of model predictive control (MPC) are dynamically adjusted according to the real-time deviation and the path curvature, the optimal expected speed is solved through rolling optimization, and a self-adaptive strategy of large-error strong deviation correction and large-curvature stability keeping is achieved; and finally, constructing a sliding mode speed controller based on a composite variable speed reaching law, and driving a left motor and a right motor by using the dominant switching characteristic of an exponential term and a power term. According to the method, the defect that a traditional control algorithm is sensitive to system parameters is effectively overcome, and the trajectory tracking precision and the robustness of a bottom layer execution mechanism are remarkably improved while the AGV driving smoothness is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated guided vehicle (AGV) motion control technology, and in particular to a heading control method and system for a two-wheel differential AGV. Background Technology

[0002] Currently, the heading control of dual-wheel differential AGVs widely adopts the classic cascade PID control architecture, which uses the yaw angle feedback from the inertial measurement unit (IMU) to construct the outer-loop heading PID and the speed feedback from the encoder to construct the inner-loop motor speed PID. However, with the increasing complexity of industrial logistics scenarios, AGVs need to operate on paths with varying curvature (such as straight-line curves) and under varying load conditions. Traditional PID controllers have fixed parameters and cannot balance the contradiction between "rapid correction" and "smooth curve handling": excessive gain can easily lead to overshoot oscillations (head sway) when entering a curve, while insufficient gain leads to tracking lag (internal angle cut), making it difficult to adapt to nonlinear path changes. In addition, although existing model predictive control (MPC) has predictive capabilities, using fixed weighting coefficients on different curvature road sections often causes the control commands to fluctuate drastically at high frequencies, leading to mechanical wear.

[0003] On the other hand, at the underlying execution stage, AGVs are highly susceptible to nonlinear disturbances such as changes in ground friction coefficient, changes in cargo weight, and inconsistencies in the characteristics of the left and right motors. Traditional motor PID control is a linear control strategy, lacking robustness to parameter perturbations and external disturbances. This means that even if the correct speed command is issued from the upper level, the underlying motor cannot withstand the difference in load between the left and right wheels, resulting in actual speed deviations and ultimately causing the AGV to run off course. While existing sliding mode control has strong anti-interference capabilities, the conventional exponential approach law exhibits significant "chattering" near the switching surface, causing motor current squealing and premature fatigue damage to the transmission mechanism, making it difficult to meet the requirements of high-precision and long-life industrial applications. Summary of the Invention

[0004] This invention provides a heading control method and system for a dual-wheel differential AGV. By dynamically adjusting the weights through upper-level fuzzy adaptive MPC to balance correction response and driving stability, and combining it with lower-level composite variable speed approaching law sliding mode control to enhance anti-disturbance capability and eliminate chattering, the dual-wheel differential AGV achieves high-precision and high-robust heading tracking under variable curvature paths and complex load conditions.

[0005] This invention provides a heading control method for a dual-wheel differential AGV, applicable to an automated guided vehicle (AGV) equipped with a dual-wheel differential drive module and on-board sensors. The method includes the following steps:

[0006] S1. Real-time acquisition of wheel odometer data and inertial measurement unit (IMU) data of the AGV, and fusion processing to obtain the current pose state of the AGV; wherein, the pose state includes the current actual lateral coordinates, longitudinal coordinates and heading angle of the AGV;

[0007] S2. Obtain the target point pose on the preset reference path, calculate the projection distance between the lateral coordinates, longitudinal coordinates and the target point pose to obtain the lateral deviation, calculate the difference between the heading angle and the tangential angle of the target point pose to obtain the heading deviation, and obtain the path curvature of the preset reference path at the current moment.

[0008] S3. Input the lateral deviation, heading deviation and path curvature into the preset fuzzy controller, dynamically output the weight adjustment coefficient through fuzzy inference rules, and use the weight adjustment coefficient to update the state error weight matrix and control quantity weight matrix in the model prediction control objective function in real time.

[0009] S4. Construct prediction equations based on the kinematic model of AGV, construct cost functions using the state error weight matrix and control quantity weight matrix, and obtain the optimal expected linear velocity and optimal expected angular velocity at the current moment through rolling optimization.

[0010] S5. Based on the kinematic relationship of the two-wheel differential speed, the optimal expected linear velocity and the optimal expected angular velocity are calculated into the target linear velocity of the left wheel and the target linear velocity of the right wheel;

[0011] S6. Construct a left-wheel sliding mode speed controller and a right-wheel sliding mode speed controller respectively. Take the target linear velocity of the left wheel and the target linear velocity of the right wheel as inputs respectively. Use a composite speed-changing approach law to calculate the control voltage of the left-wheel drive motor and the right-wheel drive motor to control the rotation of the left and right wheel drive motors and eliminate speed errors. The composite speed-changing approach law includes an exponential approach term and a power approach term. When the speed error is greater than the set value, the exponential approach term is used to dominate the control output to accelerate the approach speed. When the speed error is less than or equal to the set value, the power approach term is used to dominate the control output to reduce control chattering.

[0012] Furthermore, in step S1, the fusion processing employs an extended Kalman filter algorithm, specifically including the following steps:

[0013] S101. Synchronously acquire the pulse increment of the encoder of the left and right drive wheels of the AGV and the original angular velocity of the Z-axis of the IMU with a preset sampling period, and subtract the pre-calibrated static zero bias value to obtain the corrected IMU angular velocity.

[0014] S102. Using the dual-wheel differential kinematic model, calculate the linear displacement increment of the left and right wheels of the AGV in the current sampling period based on the pulse increment, and then calculate the mileage increment of the AGV center point and the heading angle increment calculated by the odometer.

[0015] S103. Establish a state vector containing two-dimensional plane coordinates and heading angle. Using the mileage increment and heading angle increment calculated in step S102 as control inputs, update the optimal posterior estimated state of the previous moment in time to obtain the prior state estimate and prior covariance matrix at the current moment. The prior state estimate includes prior lateral coordinates, prior longitudinal coordinates and prior heading angle.

[0016] S104. Integrate the corrected IMU angular velocity obtained in step S101 to obtain the angle change observation value, calculate the measurement residual between the angle change observation value and the prior heading angle, and use Kalman gain to perform measurement correction on the prior state estimate value to obtain the optimal posterior state estimate value at the current time; wherein, the optimal posterior state estimate value includes the fused lateral coordinate, longitudinal coordinate and heading angle;

[0017] S105. Normalize the fused heading angle to limit it to a preset angle range, and output the fused lateral coordinates, longitudinal coordinates, and normalized heading angle as the current pose state of the AGV.

[0018] Furthermore, S2 specifically includes:

[0019] S201. Pre-plan a reference path and discretize it into an ordered set containing multiple waypoints. Each waypoint in the ordered set contains a reference lateral coordinate, a reference longitudinal coordinate, a reference tangential angle, and a reference path curvature.

[0020] S202. Receive the current pose state of the AGV obtained in step S1, traverse the ordered set or search within the index neighborhood of the target reference point at the previous moment, calculate the Euclidean distance between the actual horizontal and vertical coordinates of the AGV and the reference horizontal and vertical coordinates contained in each waypoint, and select the waypoint with the smallest Euclidean distance as the target reference point at the current moment.

[0021] S203. Calculate the position difference vector between the current actual lateral and longitudinal coordinates of the AGV and the reference lateral and longitudinal coordinates contained in the target reference point, and project the position difference vector onto the lateral axis direction indicated by the reference tangential angle to obtain the signed lateral deviation.

[0022] S204. Calculate the difference between the current actual heading angle of the AGV and the reference tangential angle of the target reference point, and perform angle normalization processing on the difference to limit it within a preset angle range to obtain the heading deviation.

[0023] S205. Extract the reference path curvature contained in the target reference point, and combine the lateral deviation, the heading deviation and the reference path curvature into a state deviation vector and output it to the fuzzy controller.

[0024] Furthermore, S3 specifically includes:

[0025] S301. Determine the input variables of the fuzzy controller as the absolute value of the lateral deviation, the absolute value of the heading deviation, and the absolute value of the path curvature, and establish input fuzzy membership functions for the input variables, including high-level subsets, medium-level subsets, and low-level subsets respectively.

[0026] S302. Determine the output variables of the fuzzy controller as the state weight adjustment coefficient and the control weight adjustment coefficient, and establish output fuzzy membership functions and corresponding numerical domains for the output variables, including high-gain subsets, medium-gain subsets and low-gain subsets respectively.

[0027] S303. Construct a fuzzy inference rule base and establish a logical mapping relationship between input variables and output variables; wherein, the logical mapping relationship is set as follows: when the absolute value of the lateral deviation or the absolute value of the heading deviation belongs to the higher-level subset, activate the inference rule that maps the state weight adjustment coefficient to the higher-gain subset; when the absolute value of the path curvature belongs to the higher-level subset, and both the absolute value of the lateral deviation and the absolute value of the heading deviation belong to the lower-level subset, activate the inference rule that maps the control weight adjustment coefficient to the higher-gain subset;

[0028] S304. The lateral deviation, heading deviation and path curvature output in step S2 are used as measured values ​​as input. The degree of fuzzification is calculated according to the input fuzzy membership function. Fuzzy inference is performed according to the fuzzy inference rule base to obtain fuzzy output. Combined with the numerical domain, the centroid method is used to perform defuzzification calculation on the fuzzy output to obtain the precise state weight adjustment coefficient and precise control weight adjustment coefficient at the current moment.

[0029] S305. Obtain a preset reference state error weight matrix and a reference control quantity weight matrix. Use the precise state weight adjustment coefficient to perform scalar multiplication correction on the reference state error weight matrix to obtain an updated state error weight matrix. Use the precise control weight adjustment coefficient to perform scalar multiplication correction on the reference control quantity weight matrix to obtain an updated control quantity weight matrix.

[0030] Furthermore, S4 specifically includes:

[0031] S401. Based on the dual-wheel differential kinematic model, a Taylor series expansion and linearization process are performed with points on the reference path as working points to establish a discretized error state space model containing a state transition matrix and an input matrix; wherein, the state variable of the error state space model is the pose error vector, and the control variable is the velocity deviation vector.

[0032] S402. Set the prediction time domain and control time domain, adopt the incremental state space model structure, take the increment of the control quantity as the variable to be solved, and take the pose error vector and velocity deviation vector at the current moment as the initial conditions for recursive iteration. Use the discretized error state space model to recursively derive the output prediction equation in the future prediction time domain.

[0033] S403. The state error weight matrix and the control weight matrix updated in step S3 are expanded using the Kronecker product to construct a quadratic programming cost function containing the expanded state weight matrix and the expanded control weight matrix. The output prediction equation is substituted into the quadratic programming cost function to establish a mathematical mapping relationship between the cost function and the variable to be solved. The cost function minimizes the weighted sum of tracking errors in the future prediction time domain and the weighted sum of control changes in the control time domain.

[0034] S404. Based on the physical characteristics of the AGV drive motor, set control amplitude constraints and control increment constraints, and convert the control amplitude constraints and control increment constraints into matrix inequality form.

[0035] S405. Combining the quadratic programming cost function substituted into the output prediction equation and the constraints of step S404, the quadratic programming solver is used to perform rolling optimization to obtain the optimal control increment sequence. The first element in the optimal control increment sequence is extracted and superimposed on the control quantity of the previous time step to obtain the optimal expected linear velocity and optimal expected angular velocity at the current time step.

[0036] Furthermore, S4 specifically includes:

[0037] S501. Receive the current optimal expected linear velocity and optimal expected angular velocity, and read the AGV's pre-calibrated effective wheelbase parameters;

[0038] S502. Based on the inverse kinematics formula for differential speed, and according to the optimal desired linear velocity, optimal desired angular velocity, and effective wheelbase parameters, calculate the original target linear velocity of the left wheel and the original target linear velocity of the right wheel. The calculation formula is as follows:

[0039]

[0040]

[0041] in, and These are the calculated original target linear velocities of the left and right wheels, respectively. The optimal desired linear velocity; The desired angular velocity is L; the effective wheelbase parameter is L.

[0042] S503. Obtain the maximum permissible linear speed of the drive motor, calculate the absolute value of the original target linear speed of the left wheel and the absolute value of the original target linear speed of the right wheel, and take the maximum value of the two as the current peak speed; determine whether the current peak speed exceeds the maximum permissible linear speed: if it does not exceed, directly use the original target linear speed of the left wheel and the original target linear speed of the right wheel as the final output; if it exceeds, calculate the ratio of the maximum permissible linear speed to the current peak speed as a scaling factor, and use the scaling factor to simultaneously reduce the original target linear speed of the left wheel and the original target linear speed of the right wheel by the same proportion to obtain the target linear speed of the left wheel and the target linear speed of the right wheel.

[0043] S504. Output the target linear velocity of the left wheel and the target linear velocity of the right wheel to the left wheel sliding speed controller and the right wheel sliding speed controller in step S6.

[0044] Furthermore, S6 specifically includes:

[0045] S601. The actual feedback speeds of the left and right wheels are collected in real time respectively. The difference between the target linear velocity of the left wheel and the actual feedback speed of the left wheel is calculated as the speed error of the left wheel. The difference between the target linear velocity of the right wheel and the actual feedback speed of the right wheel is calculated as the speed error of the right wheel. Based on the integral sliding mode control principle, integral sliding surfaces containing speed error terms and speed error integral terms are defined respectively.

[0046] S602. Establish a composite variable speed reaching law equation, which includes an exponential reaching term and a power reaching term, configured such that: when the state is far from the integral sliding surface, the output value of the exponential reaching term is greater than the output value of the power reaching term to dominate the reaching speed; when the state is close to the integral sliding surface, the output value of the power reaching term is greater than the output value of the exponential reaching term to dominate the convergence process.

[0047] S603. Establish a first-order inertial dynamics model of the drive motor, differentiate the integral sliding surface, and make the differentiation result equal to the composite speed-approaching law equation. Combine the inverse solution of the first-order inertial dynamics model to obtain the control voltage calculation formula including the target acceleration, actual speed feedback and sliding surface function.

[0048] S604. Replace the sign function in the control voltage calculation formula with a hyperbolic tangent function or a saturation function to eliminate control signal jitter, and apply the calculated control voltage to the left wheel drive motor and the right wheel drive motor respectively through pulse width modulation to control the rotation of the left and right wheel drive motors and eliminate speed error.

[0049] This invention also provides a dual-wheel differential AGV heading control system, based on the dual-wheel differential AGV heading control method described above. Its characteristic is that it is applied to automated guided vehicles (AGVs) equipped with a dual-wheel differential drive module and onboard sensors. The system includes the following modules:

[0050] The data acquisition module is used to acquire wheel odometer data and inertial measurement unit (IMU) data of the AGV in real time, and obtain the current pose state of the AGV after fusion processing; wherein, the pose state includes the current actual lateral coordinates, longitudinal coordinates and heading angle of the AGV;

[0051] The calculation module is used to obtain the pose of the target point on the preset reference path, calculate the projection distance between the lateral coordinates, longitudinal coordinates and the pose of the target point to obtain the lateral deviation, calculate the difference between the heading angle and the tangential angle of the pose of the target point to obtain the heading deviation, and obtain the path curvature of the preset reference path at the current moment.

[0052] The update module is used to input the lateral deviation, heading deviation and path curvature into a preset fuzzy controller, dynamically output weight adjustment coefficients through fuzzy inference rules, and use the weight adjustment coefficients to update the state error weight matrix and control quantity weight matrix in the model prediction control objective function in real time.

[0053] The solution module is used to construct prediction equations based on the kinematic model of the AGV, construct a cost function using the state error weight matrix and the control quantity weight matrix, and obtain the optimal expected linear velocity and optimal expected angular velocity at the current moment through rolling optimization.

[0054] The calculation module is used to calculate the optimal expected linear velocity and optimal expected angular velocity into the target linear velocity of the left wheel and the target linear velocity of the right wheel based on the kinematic relationship of the two-wheel differential speed.

[0055] The control module is used to construct a left-wheel sliding mode speed controller and a right-wheel sliding mode speed controller respectively. The target linear velocities of the left and right wheels are used as inputs, and a composite speed-adapting law is employed to calculate the control voltages of the left-wheel drive motor and the right-wheel drive motor, thereby controlling the rotation of the left and right wheel drive motors and eliminating speed errors. The composite speed-adapting law includes exponential and power-law approach terms. When the speed error is greater than a set value, the exponential approach term dominates the control output to accelerate the approach speed; when the speed error is less than or equal to the set value, the power-law approach term dominates the control output to reduce control chattering.

[0056] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0057] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.

[0058] The beneficial effects of this invention are as follows:

[0059] This invention constructs a dual closed-loop control architecture of upper-level decision-making and lower-level execution. At the upper level, fuzzy adaptive model predictive control is employed, which dynamically adjusts the objective function weights of the MPC based on real-time monitoring of heading deviation, lateral deviation, and path curvature. This enables intelligent switching between strong correction when there are large errors on straightaways and smooth tracking when there are small errors on curves, effectively solving the problem of balancing response speed and driving stability in traditional control. Simultaneously, at the lower level, sliding mode control based on a composite variable speed reaching law is used. The exponential term provides a fast response when far from the sliding surface, while the power term reduces chattering when approaching the sliding surface. This not only greatly enhances the robustness of the motor system against sudden load changes and ground friction differences but also eliminates the mechanical chattering problem of conventional sliding mode control, thus ensuring high precision, high stability, and long hardware lifespan for AGV heading tracking under complex operating conditions. Attached Figure Description

[0060] Figure 1 This is a schematic diagram of a method flow according to an embodiment of the present invention.

[0061] Figure 2 This is a schematic diagram of the device structure according to an embodiment of the present invention.

[0062] Figure 3 This is a schematic diagram of the internal structure of a computer device according to an embodiment of the present invention.

[0063] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0064] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0065] like Figure 1 As shown, this invention provides a heading control method for a dual-wheel differential AGV, applicable to an automated guided vehicle (AGV) equipped with a dual-wheel differential drive module and onboard sensors. The method includes the following steps:

[0066] S1. Real-time acquisition of wheel odometer data and inertial measurement unit (IMU) data from the AGV, followed by fusion processing to obtain the current pose state of the AGV; wherein, the pose state includes the AGV's current actual lateral coordinates, longitudinal coordinates, and heading angle. Specifically, this includes the following sub-steps:

[0067] S101, Sensor Data Acquisition and Preprocessing

[0068] With a preset sampling period (For example, every 10ms) Synchronously acquire the pulse increments of the encoders on the left and right drive wheels of the AGV and the angular velocity data of the on-board IMU. Specifically, read the number of pulses from the left wheel encoder within the current sampling period. The number of pulses of the right wheel encoder in the current sampling period Simultaneously, the raw angular velocity value of the IMU gyroscope in the Z-axis direction (i.e., perpendicular to the ground) is read. To eliminate sensor static drift, IMU data is pre-collected for a period of time while the AGV is stationary to calculate the zero bias. The original angular velocity was then debiased during subsequent real-time operation to obtain the corrected angular velocity. .

[0069] S102. Calculate the pose change estimated by the wheel odometer.

[0070] Using a dual-wheel differential kinematic model, the incremental travel distance and heading angle of the AGV within the current sampling period are calculated based on the number of pulses acquired by S101. Let the radius of the drive wheel be r, and the number of encoder lines (i.e., the number of pulses per revolution) be... The reduction ratio is G, and the wheelbase between the left and right wheels is L. First, calculate the linear displacement increment of the left and right wheels. and :

[0071]

[0072] Next, calculate the mileage increment at the AGV center point. and the heading angle increment calculated from the odometer :

[0073]

[0074] S103. Construct a Kalman filter prediction model (state prediction)

[0075] This embodiment uses the Extended Kalman Filter (EKF) algorithm to fuse odometer data and IMU data. A system state vector is then established. ,in Two-dimensional plane coordinates, The heading angle is used. The mileage increment calculated in step S102 is used. and heading increment As a control input, the state is estimated based on the best posterior estimate from the previous time step. Perform state prediction (time update) to obtain the prior state estimate at the current time. :

[0076]

[0077] At the same time, update the state covariance matrix. This is to reflect the transmission of uncertainty caused by odometer slippage or accumulated error.

[0078] S104. Use IMU data for measurement updates (measurement calibration).

[0079] Because wheeled odometers accumulate directional errors during prolonged operation or when the ground is slippery, while the short-time angular velocity integral of an IMU has high dynamic accuracy, the IMU angular velocity obtained in S101 is used to... The angle change obtained by integration is used as the observed value to correct the prior heading angle in S103. The measurement residuals are calculated as follows:

[0080]

[0081] Calculate Kalman gain This gain determines whether the system trusts the odometry estimate or the IMU observation more. Subsequently, the Kalman gain is used to correct the prior state. To obtain the optimal posterior state estimate at the current time. :

[0082]

[0083] Corrected state vector This includes the fused optimal coordinates (x, y) and optimal heading angle. .

[0084] S105, Data Normalization and Output

[0085] The heading angle output by S104 Normalization is performed to limit the angle data to the interval (-π, π] to prevent overflow. Finally, the processed x-coordinate, y-coordinate, and heading angle are... The image is packaged as the pose state at the current moment and transmitted to step S2 for path tracking control.

[0086] S2. Obtain the target point pose on the preset reference path, calculate the projection distance between the lateral coordinates, longitudinal coordinates and the target point pose to obtain the lateral deviation, calculate the difference between the heading angle and the tangential angle of the target point pose to obtain the heading deviation, and obtain the path curvature of the preset reference path at the current moment. Specifically, this includes the following sub-steps:

[0087] S201. Construct a set of discretized reference paths.

[0088] A reference path is pre-planned and stored, which is discretized into an ordered set of N waypoints. Each waypoint in the set It contains information in four dimensions: reference horizontal coordinates Reference vertical coordinate Reference tangential angle (i.e., target heading) and reference path curvature Wherein, the curvature of the reference path It is calculated in advance based on the geometry of the path and is used to characterize the curvature of the path (e.g., the curvature of a straight line segment is 0, and the curvature of a circular arc segment with radius R is 1 / R).

[0089] S202, Search for the nearest target reference point

[0090] Receive the current pose state of the AGV output in step S1 Traverse the set of reference paths Calculate the current position of the AGV With each waypoint in the set The Euclidean distance between them is used to select the waypoint with the smallest Euclidean distance as the target reference point for the current control cycle, denoted as . To improve real-time performance, a local search strategy can be adopted in practical engineering, which means searching only within the index neighborhood of the target reference point at the previous time step (e.g., 10 points before and after), rather than traversing the entire path set.

[0091] S203. Calculate Lateral Error.

[0092] lateral deviation Defined as the perpendicular distance from the current position of the AGV to the target reference point along the tangent direction. To distinguish whether the AGV is on the left or right side of the reference path, the signed lateral deviation needs to be calculated. The specific calculation formula is as follows:

[0093]

[0094] in, and Let be the position difference vector; project it onto the horizontal axis of the Frenet coordinate system using a rotation transformation matrix. If... This indicates that the AGV is located to the left of the reference path; if This indicates that the AGV is located on the right side of the reference path.

[0095] S204. Calculate Heading Error

[0096] heading deviation Defined as the difference between the AGV's current actual heading angle and the tangential angle at the target reference point. The specific calculation formula is as follows:

[0097]

[0098] To ensure the continuity of the control system, the calculation results need to be normalized by angle, limiting them to the range of (-π, π]. For example, if the calculated result is 370°, it is corrected to 10°; if the result is -190°, it is corrected to 170°, in order to avoid control divergence caused by multiple angle turns.

[0099] S205, Extracting Path Curvature and Packaging Data

[0100] Directly from the target reference point selected in step S202 Read the corresponding path curvature value Finally, the calculated lateral deviation will be... Heading deviation and the extracted path curvature Combined into a state deviation vector The vector is then transmitted to step S3 as an input variable for the fuzzy controller.

[0101] S3. Input the lateral deviation, heading deviation, and path curvature into a preset fuzzy controller, dynamically output weight adjustment coefficients through fuzzy inference rules, and use the weight adjustment coefficients to update the state error weight matrix Q and control quantity weight matrix R in the model predictive control objective function in real time. Specifically, this includes the following sub-steps:

[0102] S301. Define fuzzy input variables and their membership functions (fuzzification).

[0103] First, determine the three input variables of the fuzzy controller: the absolute value of the lateral deviation. Absolute value of heading deviation and the absolute value of the curvature of the reference path Define fuzzy subsets and corresponding linguistic variables for the above input variables:

[0104] Deviation variables ( and Define three fuzzy levels: {"Zero" (ZO), "Small" (S), "Large" (L)}. Use triangular or trapezoidal membership functions. For example, "Zero" has the highest membership degree when the deviation is close to 0; "Large" has the highest membership degree when the deviation exceeds a preset safety threshold (e.g., 5cm).

[0105] Curvature variable ( Define two fuzzy levels: {"Straight Path" (ST), "Curve" (CV)}. A curvature close to 0 is considered a "straight path," and a curvature greater than a set value (e.g., 0.1 m) is considered a "curve." -1 When it is a "curve", it is considered a "curve".

[0106] S302. Define fuzzy output variables and their universe of discourse.

[0107] Determine the two output variables of the fuzzy controller: the state weight adjustment coefficient. and control weight adjustment coefficient . , used to adjust the state error weight matrix Q; The larger the value, the heavier the penalty for tracking errors, and the more precise the tracking is required. , used to adjust the control quantity weight matrix R. The larger the value, the heavier the penalty for drastic changes in the control variable, and the more compliant the action is required. Similarly, fuzziness levels are defined for the output variable: {"weak" (W), "medium" (M), "strong" (S)}.

[0108] S303. Construct a fuzzy reasoning rule base (expert knowledge base).

[0109] Based on the control strategy of "large errors require strong correction, and large curvatures require stability maintenance", the following fuzzy rule table (IF-THEN rule) is established:

[0110] Rule 1 (Straight-line High-Precision Mode): IF ( is ST) AND ( is L OR is L) THEN ( is S, (is W). That is, if a large deviation occurs on a straight track, the Q weight should be significantly increased and the R weight decreased to enable the AGV to respond quickly and eliminate the error.

[0111] Rule 2 (Cornering Smoothness Mode): IF ( is CV) AND ( is S AND is S) THEN ( is W, That is, when the error is small in a curve, the weight of Q should be reduced and the weight of R should be increased significantly to prevent the steering servo from frequently shaking (oscillating) due to excessive pursuit of zero error, and to prioritize smooth driving.

[0112] Rule 3 (Emergency Correction Mode): IF ( is Very Large) THEN ( is Very S, isVery W). That is, regardless of the road conditions, if the deviation is too large and the vehicle is about to go off the path, a very high Q weight is forcibly output for hard constraint correction.

[0113] S304, Fuzzy Reasoning and Defuzzification

[0114] The specific numerical values ​​input in step S2 are mapped to the membership function in S301 to obtain the activation intensity of each rule. The Mamdani fuzzy inference method is used to obtain the fuzzy distribution of the output variables. Subsequently, the centroid method is used to defuzzify the fuzzy output, calculating the precise numerical output.

[0115]

[0116] Obtain the specific adjustment coefficient for the current control cycle. and .

[0117] S305, Real-time update of MPC weight matrix

[0118] Using the adjustment coefficients obtained from S304, the basic weight matrix of the MPC controller is adjusted. and Perform online corrections to obtain the dynamic weight matrix at the current time. and :

[0119]

[0120]

[0121] in, It is a pre-calibrated baseline state error weight matrix (usually a diagonal matrix). This is the baseline control weight matrix. (Updated) and These coefficients are directly used as the coefficients for constructing the cost function in step S4, thereby changing the focus of subsequent optimization solutions.

[0122] S4. Construct prediction equations based on the kinematic model of the AGV, and construct a cost function using the state error weight matrix Q and the control quantity weight matrix R. Solve the problem through rolling optimization to obtain the optimal expected linear velocity and optimal expected angular velocity at the current moment. Specifically, this includes the following sub-steps:

[0123] S401. Construct a linearized error state-space model.

[0124] Based on the kinematic model of a two-wheel differential speed system, Taylor series expansion and linearization are performed using points on the reference path as operating points. The system state variables are defined as the error vector. The control quantity is the input deviation. The continuous-time linear error model is obtained as follows: Subsequently, using the forward Euler method or a discretization method, the above model is discretized with a sampling time T to obtain the discrete state-space equations:

[0125]

[0126] in, Here is the state transition matrix. Both are time-varying matrices calculated based on the Jacobian matrix of the current reference trajectory point, and are input matrices.

[0127] S402. Constructing the prediction time-domain equation

[0128] Set the prediction time domain as Control time domain (generally To eliminate steady-state errors and improve computational smoothness, this embodiment employs an incremental state-space model, which increments the control quantity... As a new variable to be solved, the future is established by recursively iterating the discrete state equations. The output prediction equation for the step:

[0129]

[0130] in: For the future Predicted state sequence vector of step It is a combined vector containing the current state error and the control quantity from the previous time step; For the future to be solved Step control increment sequence ; and For the matrix , The coefficient matrix derived by combination.

[0131] S403. Construct a quadratic programming cost function with dynamic weights.

[0132] The updated state error weight matrix Q (3×3) and control weight matrix R (2×2) from step S3 are received. To apply these dynamic weights across the entire prediction time domain, an expanded weighted matrix is ​​constructed using the Kronecker Product:

[0133] Extended-dimensional state weight matrix , dimension ;

[0134] Extended Dimension Control Weight Matrix , dimension Constructing a standard quadratic cost function J:

[0135]

[0136] The physical meaning of this function is: to minimize the future tracking error (first term) while minimizing the change in the control quantity (second term). This is an optional relaxation factor term used to prevent the possibility of no solution. Here, and The value is directly adjusted by the fuzzy controller, thereby changing the direction of optimization (to be more accurate or more stable).

[0137] S404, Introducing physical constraints

[0138] To ensure the physical execution capability of the AGV, the following constraints are set:

[0139] ① Control variable amplitude constraint: That is, the linear velocity and angular velocity of the motor must not exceed the rated speed of the motor.

[0140] ②Control incremental constraints: This means limiting the motor's acceleration to prevent current overload or mechanical shock; the above inequality constraints are converted into standard matrix form: .

[0141] S405, Rolling Optimization Solution and Control Variable Extraction

[0142] The cost function J in step S403 and the constraints in step S404 are transformed into a standard quadratic programming (QP) problem:

[0143]

[0144] The optimal control increment sequence is obtained by iteratively solving the problem using a QP solver (such as the Active Set method or the Interior Point method) in the airborne controller (such as an ARM processor). Based on the principle of rolling time windows, only the first element in the sequence is extracted. This value is then added to the control input from the previous time step to obtain the optimal expected control input for the current time step.

[0145]

[0146] Should That is, including the optimal expected linear velocity and optimal expected angular velocity Then output it to step S5.

[0147] S5. Based on the kinematic relationship of the two-wheel differential speed, the optimal desired linear velocity and optimal desired angular velocity are calculated into the target linear velocities of the left wheel and the right wheel. This specifically includes the following sub-steps:

[0148] S501, Obtain the optimal control command and structural parameters

[0149] The optimal expected linear velocity at the current moment is received from the output of step S4. and optimal expected angular velocity Simultaneously, the mechanical structure parameters of the AGV are read, with the most critical parameter being the effective track width (L). The effective track width L is defined as the straight-line distance between the center points of the left and right drive wheels. To improve calculation accuracy, parameter L is best calibrated on a real vehicle to compensate for deviations caused by tire wear or mechanical assembly errors.

[0150] S502, Perform inverse differential kinematics calculation

[0151] Based on the principles of rigid body kinematics, it is assumed that the AGV body undergoes circular motion around the instantaneous center of rotation (ICR) in a very short time. To achieve the desired overall motion state... The left and right wheels must satisfy the following speed relationship:

[0152]

[0153]

[0154] in, and These are the calculated original target linear velocities of the left and right wheels, respectively. When the vehicle turns left ( When the right wheel speed needs to be increased, the left wheel speed needs to be decreased; and vice versa.

[0155] S503, Perform proportional scaling and limiting processing

[0156] Due to the physical limitations of the motor, the drive wheel has a maximum permissible linear speed. If the original speed calculated by S502 exceeds this limit, directly truncating it will change the speed difference ratio between the left and right wheels, thus altering the AGV's actual turning radius and causing severe yaw. To avoid this problem, a proportional scaling strategy is adopted:

[0157] (1) Calculate the maximum absolute value of the original target speed of the left and right wheels:

[0158]

[0159] (2) Determine if the boundary has been crossed:

[0160] like If no scaling is applied, the output will be directly:

[0161]

[0162] like Then calculate the scaling factor. And scale the speed of both wheels simultaneously:

[0163]

[0164] Through this process, although the overall speed of the AGV is reduced, the speed ratio of the left and right wheels remains unchanged, thus ensuring that the curvature of the AGV's desired motion trajectory (i.e., the path shape) is not distorted.

[0165] S504, Data Format Conversion and Command Issuance

[0166] The target linear velocity of the revolver after processing in step S503 and the target linear velocity of the right wheel As the final instruction, these two variables are transferred to step S6 as reference input signals for the sliding mode controller (SMC).

[0167] S6. Construct a left-wheel sliding mode speed controller and a right-wheel sliding mode speed controller respectively. Use the target linear velocity of the left wheel and the target linear velocity of the right wheel as inputs, respectively. Calculate the control voltages of the left-wheel drive motor and the right-wheel drive motor using a composite variable speed reaching law to control the rotation of the left and right wheel drive motors and eliminate speed errors. The composite variable speed reaching law includes exponential reaching terms and power reaching terms. When the speed error is greater than a set value, the exponential reaching term dominates the control output to accelerate the approach speed; when the speed error is less than or equal to the set value, the power reaching term dominates the control output to reduce control chattering. Specifically, it includes the following sub-steps:

[0168] S601. Establish the velocity error model and integral sliding surface.

[0169] First, define the speed tracking error of the left wheel. :

[0170]

[0171] in, The target linear velocity of the left wheel is input in step S5. The actual rotational speed is fed back by the encoder. To eliminate the steady-state error of the system, the integral sliding surface S(t) is selected:

[0172]

[0173] Where c > 0 is the integral gain coefficient. This occurs when the state is reached and maintained at the sliding surface. When, that is Solving this differential equation reveals the error. It will converge to zero at an exponential rate, thus ensuring zero steady-state error tracking.

[0174] S602, Design of Composite Variable Speed ​​Approach Law

[0175] To resolve the contradiction between slow approach speed and large chattering in traditional sliding mode control, a composite variable speed approach law of the following form is designed:

[0176]

[0177] Exponential approach term When the system is far from the sliding surface (|S| is large), the exponential function... The value increases rapidly, providing a very high approach speed, enabling the system to respond quickly to sudden control commands (such as emergency direction changes).

[0178] Power-order approach term When the system approaches the sliding surface (|S| is small), the effect of the exponential term weakens, and the effect of the power term (assuming...) decreases. The power function plays a dominant role. Due to the slope characteristics of the power function near the origin, it can converge in a finite time, while avoiding high-frequency switching of control quantities (i.e., chattering) caused by excessive gain.

[0179] For the approach law parameters, These are standard symbolic functions.

[0180] S603, Deriving the sliding mode control law (inverse solution of control voltage)

[0181] A first-order inertial dynamics model based on a brushless DC motor (or servo motor):

[0182]

[0183] in, The electromechanical time constant, Let u be the motor gain and u be the input control voltage. Differentiate the sliding surface in step S601 and set it equal to the reaching law in step S602:

[0184]

[0185] Substituting the motor dynamics model into the above equation and solving for the control voltage u, we obtain the final control law expression:

[0186]

[0187] This formula is the core algorithm for the actual calculations inside the controller.

[0188] S604, Signed Function Smoothing and Control Output

[0189] In practical digital controllers, standard symbolic functions The discontinuous jump at S=0 is the physical root cause of mechanical chattering. To further reduce chattering and protect the motor and gearbox, this embodiment uses a hyperbolic tangent function (tanh) or a saturation function (sat) instead of the sign function. For example, using the saturation function:

[0190]

[0191] in, This refers to the boundary layer thickness. In the boundary layer... Within this system, the control quantity changes continuously, thus achieving smooth switching. The final calculated voltage value... After PWM modulation, the signal is applied to the motor windings through the H-bridge drive circuit, driving the wheels to rotate.

[0192] like Figure 2As shown, the present invention also provides a dual-wheel differential AGV heading control system, based on the dual-wheel differential AGV heading control method described above, applied to an automated guided vehicle AGV equipped with a dual-wheel differential drive module and on-board sensors. The system includes the following modules:

[0193] The acquisition module 1 is used to acquire the wheel odometer data and inertial measurement unit (IMU) data of the AGV in real time, and obtain the current pose state of the AGV after fusion processing; wherein, the pose state includes the current actual lateral coordinate, longitudinal coordinate and heading angle of the AGV;

[0194] The calculation module 2 is used to obtain the pose of the target point on the preset reference path, calculate the projection distance between the lateral coordinates, longitudinal coordinates and the pose of the target point to obtain the lateral deviation, calculate the difference between the heading angle and the tangential angle of the pose of the target point to obtain the heading deviation, and obtain the path curvature of the preset reference path at the current time.

[0195] Update module 3 is used to input the lateral deviation, heading deviation and path curvature into a preset fuzzy controller, dynamically output weight adjustment coefficients through fuzzy inference rules, and use the weight adjustment coefficients to update the state error weight matrix and control quantity weight matrix in the model prediction control objective function in real time.

[0196] Solution module 4 is used to construct prediction equations based on the kinematic model of AGV, construct cost function using the state error weight matrix and control quantity weight matrix, and obtain the optimal expected linear velocity and optimal expected angular velocity at the current moment through rolling optimization.

[0197] Solution module 5 is used to solve the optimal expected linear velocity and optimal expected angular velocity into the target linear velocity of the left wheel and the target linear velocity of the right wheel based on the kinematic relationship of the two-wheel differential speed;

[0198] Control module 6 is used to construct a left-wheel sliding mode speed controller and a right-wheel sliding mode speed controller respectively. The target linear velocity of the left wheel and the target linear velocity of the right wheel are used as inputs respectively. A composite speed-changing approach law is used to calculate the control voltage of the left-wheel drive motor and the right-wheel drive motor to control the rotation of the left and right wheel drive motors and eliminate speed errors. The composite speed-changing approach law includes an exponential approach term and a power approach term. When the speed error is greater than a set value, the exponential approach term is used to dominate the control output to accelerate the approach speed. When the speed error is less than or equal to the set value, the power approach term is used to dominate the control output to reduce control chattering.

[0199] Each of the above modules is used to execute the corresponding steps in the above dual-wheel differential AGV heading control method. The specific implementation method is as described in the above method embodiment, and will not be repeated here.

[0200] like Figure 3 As shown, the present invention also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores all data required for the heading control method of the two-wheel differential AGV. The network interface is used for communication with external terminals via a network connection. The computer program is executed by the processor to implement the heading control method of the two-wheel differential AGV.

[0201] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0202] An embodiment of this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-described two-wheel differential AGV heading control methods.

[0203] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by hardware related to computer program instructions. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. Any references to memory, storage, databases, or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), such as dynamic RAM (used as main memory) or static RAM (commonly used as cache memory). By way of illustration and not limitation, RAM has various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), and Rambus DRAM (RDRAM).

[0204] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0205] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A heading control method for a dual-wheel differential AGV, characterized in that, The method, applied to automated guided vehicles (AGVs) equipped with dual-wheel differential drive modules and on-board sensors, includes the following steps: S1. Real-time acquisition of wheel odometer data and inertial measurement unit (IMU) data of the AGV, and fusion processing to obtain the current pose state of the AGV; wherein, the pose state includes the current actual lateral coordinates, longitudinal coordinates and heading angle of the AGV; S2. Obtain the target point pose on the preset reference path, calculate the projection distance between the lateral coordinates, longitudinal coordinates and the target point pose to obtain the lateral deviation, calculate the difference between the heading angle and the tangential angle of the target point pose to obtain the heading deviation, and obtain the path curvature of the preset reference path at the current moment. S3. Input the lateral deviation, heading deviation and path curvature into the preset fuzzy controller, dynamically output the weight adjustment coefficient through fuzzy inference rules, and use the weight adjustment coefficient to update the state error weight matrix and control quantity weight matrix in the model prediction control objective function in real time. S4. Construct prediction equations based on the kinematic model of AGV, construct cost functions using the state error weight matrix and control quantity weight matrix, and obtain the optimal expected linear velocity and optimal expected angular velocity at the current moment through rolling optimization. S5. Based on the kinematic relationship of the two-wheel differential speed, the optimal expected linear velocity and the optimal expected angular velocity are calculated into the target linear velocity of the left wheel and the target linear velocity of the right wheel; S6. Construct a left-wheel sliding mode speed controller and a right-wheel sliding mode speed controller respectively. Take the target linear velocity of the left wheel and the target linear velocity of the right wheel as inputs respectively. Use a composite speed-changing approach law to calculate the control voltage of the left-wheel drive motor and the right-wheel drive motor to control the rotation of the left and right wheel drive motors and eliminate speed errors. The composite speed-changing approach law includes an exponential approach term and a power approach term. When the speed error is greater than the set value, the exponential approach term is used to dominate the control output to accelerate the approach speed. When the speed error is less than or equal to the set value, the power approach term is used to dominate the control output to reduce control chattering.

2. The heading control method for a dual-wheel differential AGV according to claim 1, characterized in that, In step S1, the fusion processing employs the extended Kalman filter algorithm, specifically including the following steps: S101. Synchronously acquire the pulse increment of the encoder of the left and right drive wheels of the AGV and the original angular velocity of the Z-axis of the IMU with a preset sampling period, and subtract the pre-calibrated static zero bias value to obtain the corrected IMU angular velocity. S102. Using the dual-wheel differential kinematic model, calculate the linear displacement increment of the left and right wheels of the AGV in the current sampling period based on the pulse increment, and then calculate the mileage increment of the AGV center point and the heading angle increment calculated by the odometer. S103. Establish a state vector containing two-dimensional plane coordinates and heading angle. Using the mileage increment and heading angle increment calculated in step S102 as control inputs, update the optimal posterior estimated state of the previous moment in time to obtain the prior state estimate and prior covariance matrix at the current moment. The prior state estimate includes prior lateral coordinates, prior longitudinal coordinates and prior heading angle. S104. Integrate the corrected IMU angular velocity obtained in step S101 to obtain the angle change observation value, calculate the measurement residual between the angle change observation value and the prior heading angle, and use Kalman gain to perform measurement correction on the prior state estimate value to obtain the optimal posterior state estimate value at the current time; wherein, the optimal posterior state estimate value includes the fused lateral coordinate, longitudinal coordinate and heading angle; S105. Normalize the fused heading angle to limit it to a preset angle range, and output the fused lateral coordinates, longitudinal coordinates, and normalized heading angle as the current pose state of the AGV.

3. The heading control method for a dual-wheel differential AGV according to claim 1, characterized in that, S2 specifically includes: S201. Pre-plan a reference path and discretize it into an ordered set containing multiple waypoints. Each waypoint in the ordered set contains a reference lateral coordinate, a reference longitudinal coordinate, a reference tangential angle, and a reference path curvature. S202. Receive the current pose state of the AGV obtained in step S1, traverse the ordered set or search within the index neighborhood of the target reference point at the previous moment, calculate the Euclidean distance between the actual horizontal and vertical coordinates of the AGV and the reference horizontal and vertical coordinates contained in each waypoint, and select the waypoint with the smallest Euclidean distance as the target reference point at the current moment. S203. Calculate the position difference vector between the current actual lateral and longitudinal coordinates of the AGV and the reference lateral and longitudinal coordinates contained in the target reference point, and project the position difference vector onto the lateral axis direction indicated by the reference tangential angle to obtain the signed lateral deviation. S204. Calculate the difference between the current actual heading angle of the AGV and the reference tangential angle of the target reference point, and perform angle normalization processing on the difference to limit it within a preset angle range to obtain the heading deviation. S205. Extract the reference path curvature contained in the target reference point, and combine the lateral deviation, the heading deviation and the reference path curvature into a state deviation vector and output it to the fuzzy controller.

4. The heading control method for a dual-wheel differential AGV according to claim 1, characterized in that, S3 specifically includes: S301. Determine the input variables of the fuzzy controller as the absolute value of the lateral deviation, the absolute value of the heading deviation, and the absolute value of the path curvature, and establish input fuzzy membership functions for the input variables, including high-level subsets, medium-level subsets, and low-level subsets respectively. S302. Determine the output variables of the fuzzy controller as the state weight adjustment coefficient and the control weight adjustment coefficient, and establish output fuzzy membership functions and corresponding numerical domains for the output variables, including high-gain subsets, medium-gain subsets and low-gain subsets respectively. S303. Construct a fuzzy inference rule base and establish a logical mapping relationship between input variables and output variables; wherein, the logical mapping relationship is set as follows: when the absolute value of the lateral deviation or the absolute value of the heading deviation belongs to the higher-level subset, activate the inference rule that maps the state weight adjustment coefficient to the higher-gain subset; when the absolute value of the path curvature belongs to the higher-level subset, and both the absolute value of the lateral deviation and the absolute value of the heading deviation belong to the lower-level subset, activate the inference rule that maps the control weight adjustment coefficient to the higher-gain subset; S304. The lateral deviation, heading deviation and path curvature output in step S2 are used as measured values ​​as input. The degree of fuzzification is calculated according to the input fuzzy membership function. Fuzzy inference is performed according to the fuzzy inference rule base to obtain fuzzy output. Combined with the numerical domain, the centroid method is used to perform defuzzification calculation on the fuzzy output to obtain the precise state weight adjustment coefficient and precise control weight adjustment coefficient at the current moment. S305. Obtain a preset reference state error weight matrix and a reference control quantity weight matrix. Use the precise state weight adjustment coefficient to perform scalar multiplication correction on the reference state error weight matrix to obtain an updated state error weight matrix. Use the precise control weight adjustment coefficient to perform scalar multiplication correction on the reference control quantity weight matrix to obtain an updated control quantity weight matrix.

5. The heading control method for a dual-wheel differential AGV according to claim 1, characterized in that, S4 specifically includes: S401. Based on the dual-wheel differential kinematic model, a Taylor series expansion and linearization process are performed with points on the reference path as working points to establish a discretized error state space model containing a state transition matrix and an input matrix; wherein, the state variable of the error state space model is the pose error vector, and the control variable is the velocity deviation vector. S402. Set the prediction time domain and control time domain, adopt the incremental state space model structure, take the increment of the control quantity as the variable to be solved, and take the pose error vector and velocity deviation vector at the current moment as the initial conditions for recursive iteration. Use the discretized error state space model to recursively derive the output prediction equation in the future prediction time domain. S403. The state error weight matrix and the control weight matrix updated in step S3 are expanded using the Kronecker product to construct a quadratic programming cost function containing the expanded state weight matrix and the expanded control weight matrix. The output prediction equation is substituted into the quadratic programming cost function to establish a mathematical mapping relationship between the cost function and the variable to be solved. The cost function minimizes the weighted sum of tracking errors in the future prediction time domain and the weighted sum of control changes in the control time domain. S404. Based on the physical characteristics of the AGV drive motor, set control amplitude constraints and control increment constraints, and convert the control amplitude constraints and control increment constraints into matrix inequality form. S405. Combining the quadratic programming cost function substituted into the output prediction equation and the constraints of step S404, the quadratic programming solver is used to perform rolling optimization to obtain the optimal control increment sequence. The first element in the optimal control increment sequence is extracted and superimposed on the control quantity of the previous time step to obtain the optimal expected linear velocity and optimal expected angular velocity at the current time step.

6. The heading control method for a dual-wheel differential AGV according to claim 1, characterized in that, S4 specifically includes: S501. Receive the current optimal expected linear velocity and optimal expected angular velocity, and read the AGV's pre-calibrated effective wheelbase parameters; S502. Based on the inverse kinematics formula for differential speed, and according to the optimal desired linear velocity, optimal desired angular velocity, and effective wheelbase parameters, calculate the original target linear velocity of the left wheel and the original target linear velocity of the right wheel. The calculation formula is as follows: ; ; in, and These are the calculated original target linear velocities of the left and right wheels, respectively. The optimal desired linear velocity; The desired angular velocity is L; the effective wheelbase parameter is L. S503. Obtain the maximum permissible linear speed of the drive motor, calculate the absolute value of the original target linear speed of the left wheel and the absolute value of the original target linear speed of the right wheel, and take the maximum value of the two as the current peak speed; determine whether the current peak speed exceeds the maximum permissible linear speed: if it does not exceed, directly use the original target linear speed of the left wheel and the original target linear speed of the right wheel as the final output; if it exceeds, calculate the ratio of the maximum permissible linear speed to the current peak speed as a scaling factor, and use the scaling factor to simultaneously reduce the original target linear speed of the left wheel and the original target linear speed of the right wheel by the same proportion to obtain the target linear speed of the left wheel and the target linear speed of the right wheel. S504. Output the target linear velocity of the left wheel and the target linear velocity of the right wheel to the left wheel sliding speed controller and the right wheel sliding speed controller in step S6.

7. The heading control method for a dual-wheel differential AGV according to claim 1, characterized in that, S6 specifically includes: S601. The actual feedback speeds of the left and right wheels are collected in real time respectively. The difference between the target linear velocity of the left wheel and the actual feedback speed of the left wheel is calculated as the speed error of the left wheel. The difference between the target linear velocity of the right wheel and the actual feedback speed of the right wheel is calculated as the speed error of the right wheel. Based on the integral sliding mode control principle, integral sliding surfaces containing speed error terms and speed error integral terms are defined respectively. S602. Establish a composite variable speed reaching law equation, which includes an exponential reaching term and a power reaching term, configured such that: when the state is far from the integral sliding surface, the output value of the exponential reaching term is greater than the output value of the power reaching term to dominate the reaching speed; when the state is close to the integral sliding surface, the output value of the power reaching term is greater than the output value of the exponential reaching term to dominate the convergence process. S603. Establish a first-order inertial dynamics model of the drive motor, differentiate the integral sliding surface, and make the differentiation result equal to the composite speed-approaching law equation. Combine the inverse solution of the first-order inertial dynamics model to obtain the control voltage calculation formula including the target acceleration, actual speed feedback and sliding surface function. S604. Replace the sign function in the control voltage calculation formula with a hyperbolic tangent function or a saturation function to eliminate control signal jitter, and apply the calculated control voltage to the left wheel drive motor and the right wheel drive motor respectively through pulse width modulation to control the rotation of the left and right wheel drive motors and eliminate speed error.

8. A heading control system for a dual-wheel differential AGV, based on the heading control method for a dual-wheel differential AGV according to any one of claims 1-7, characterized in that, An automated guided vehicle (AGV) equipped with a dual-wheel differential drive module and on-board sensors, the system includes the following modules: The data acquisition module is used to acquire wheel odometer data and inertial measurement unit (IMU) data of the AGV in real time, and obtain the current pose state of the AGV after fusion processing; wherein, the pose state includes the current actual lateral coordinates, longitudinal coordinates and heading angle of the AGV; The calculation module is used to obtain the pose of the target point on the preset reference path, calculate the projection distance between the lateral coordinates, longitudinal coordinates and the pose of the target point to obtain the lateral deviation, calculate the difference between the heading angle and the tangential angle of the pose of the target point to obtain the heading deviation, and obtain the path curvature of the preset reference path at the current moment. The update module is used to input the lateral deviation, heading deviation and path curvature into a preset fuzzy controller, dynamically output weight adjustment coefficients through fuzzy inference rules, and use the weight adjustment coefficients to update the state error weight matrix and control quantity weight matrix in the model prediction control objective function in real time. The solution module is used to construct prediction equations based on the kinematic model of the AGV, construct a cost function using the state error weight matrix and the control quantity weight matrix, and obtain the optimal expected linear velocity and optimal expected angular velocity at the current moment through rolling optimization. The calculation module is used to calculate the optimal expected linear velocity and optimal expected angular velocity into the target linear velocity of the left wheel and the target linear velocity of the right wheel based on the kinematic relationship of the two-wheel differential speed. The control module is used to construct a left-wheel sliding mode speed controller and a right-wheel sliding mode speed controller respectively. The target linear velocities of the left and right wheels are used as inputs, and a composite speed-adapting law is employed to calculate the control voltages of the left-wheel drive motor and the right-wheel drive motor, thereby controlling the rotation of the left and right wheel drive motors and eliminating speed errors. The composite speed-adapting law includes exponential and power-law approach terms. When the speed error is greater than a set value, the exponential approach term dominates the control output to accelerate the approach speed; when the speed error is less than or equal to the set value, the power-law approach term dominates the control output to reduce control chattering.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.