A path tracking control method for intelligent agricultural machinery
Through dual unscented Kalman filtering and adaptive model predictive control, combined with dynamic models and real-time navigation systems, the problem of low accuracy of intelligent agricultural machinery path tracking is solved, efficient and accurate path tracking is achieved, and system reliability and cost.
Patent Information
- Application Number
- CN202210814305.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-07-12
AI Technical Summary
Existing intelligent agricultural machinery path tracking control methods have poor accuracy in actual farmland environments, and are limited by embedded system performance and cost, making it difficult to achieve high-precision path tracking.
Using dual unscented Kalman filters and adaptive model predictive control, combined with dynamic models and real-time dynamic GPS and inertial navigation systems, a constrained intelligent agricultural machinery path tracking control method is designed, and parameters and states are estimated through dual unscented Kalman filters. , achieve accurate state and parameter estimation, and utilize adaptive model predictive control to optimize path tracking.
It improves the accuracy of intelligent agricultural machinery path tracking, achieves efficient and accurate path tracking in actual farmland environments, and takes into account the reliability and cost requirements of embedded systems.
Smart Images

Figure CN115167424B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent agricultural machinery, and in particular to a path tracking control method of an intelligent agricultural machinery. Background Art
[0002] Path tracking error is defined as the shortest distance between the current position of the vehicle and the desired path. A good path tracking controller should ensure that the average deviation and maximum deviation between the actual driving path of the vehicle and the desired path are as small as possible. Accurate path tracking of automatic agricultural vehicles is one of the effective ways to improve agricultural production efficiency and quality. For example, manual or automatic sprayers that spray pesticides may have gaps or overlaps in the actual operating area due to inaccurate path tracking, causing excessive pesticides on some crops and insufficient pesticides on others, which in turn leads to reduced crop yield and quality. Due to the complex working environment of agricultural vehicles and the presence of unknown noise and interference, it is challenging to achieve accurate path tracking for agricultural vehicles.
[0003] Existing path tracking methods can be divided into three categories: geometric methods, motion control laws and optimal control. They all have their own problems in terms of accuracy and cost. Existing path tracking control methods for intelligent agricultural machinery, such as PID control methods based on fuzzy logic online tuning of control parameters, and longitudinal and lateral dynamics control methods based on fuzzy PID control and linear quadratic regulator (LQR), however, they only achieve good tracking performance under certain specific conditions, and are not path tracking control methods based on dynamic models that can more fully consider the dynamic characteristics of agricultural machinery and help improve path tracking accuracy. Others are kinematic model predictive control (MPC) methods and robust model predictive control (RMPC) methods. Although the dynamic model is taken into account, the effectiveness of the control algorithm is only tested in the simulation environment, and the real-time, robustness and path tracking performance of the controller are not tested in the actual farmland. In other words, some existing implementable path tracking control methods have poor accuracy, while other algorithms that can achieve high-precision path tracking are limited by the performance and cost of embedded systems and cannot be deployed on real agricultural machinery for the time being. Summary of the invention
[0004] The purpose of the present invention is to provide a path tracking control method for an intelligent agricultural machine to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions: a path tracking control method for intelligent agricultural machinery, comprising the following steps: step 1, designing a control system architecture; step 2, designing a dynamics model of the intelligent agricultural machinery; step 3, designing an upper controller architecture; step 4, realizing the estimation of lateral dynamics parameters of the intelligent agricultural machinery with constraints based on double unscented Kalman filtering; step 5, adaptive model predictive control based on the dynamics model;
[0006] In the above step 1, the upper controller obtains the current state information of the agricultural machinery collected by the sensor and performs state estimation. Then, according to the full coverage path of the farmland generated by the path planner, the target speed and turning angle of the agricultural machinery are calculated and generated. The lower controllers such as the vehicle speed controller and the steering controller finally perform the corresponding actions. The control system sensor configuration adopts real-time dynamic GPS (RTK-GPS) + inertial navigation system (IMU). Two RTK-GPS receivers are respectively arranged at the front and rear of the vehicle, and the inertial navigation unit (IMU) is arranged near the center of mass of the platform.
[0007] In the above step 2, designing the intelligent agricultural machinery dynamics model includes the following steps:
[0008] 1) Lateral and yaw motion modeling: Since the agricultural machinery travels at a low speed, the nonlinear dynamic characteristics are not obvious, so only the lateral and yaw motions can be considered. These two motions are described by a linear two-degree-of-freedom model. The lateral and yaw motions can be expressed by the following differential equations:
[0009] describe:
[0010]
[0011] Where m is the mass of the sprayer, I z is the yaw moment of inertia of the sprayer, u is the longitudinal velocity, β
[0012] is the sideslip angle of the center of mass, γ is the yaw rate, δ f is the front wheel turning angle, δ r is the rear wheel turning angle, C f is the front wheel cornering stiffness, C r is the rear wheel cornering stiffness, l f is the distance from the center of mass to the front axle, l r is the distance from the center of mass to the rear axle;
[0013] 2) Steering system modeling: The agricultural machinery adopts a steering mechanism with hydraulic push rods and connecting rods as the main components. Under the design of a reasonable controller, the closed-loop response of the steering controller and the steering system can be approximated as the closed-loop response of a first-order system. Therefore, the entire steering system including the controller can be
[0014] Modeled as:
[0015]
[0016] Among them, δ is the front wheel or rear wheel turning angle, δ e is the desired turning angle of the front or rear wheel, τ δ is the time delay constant of the steering system;
[0017] In the above step 3, the upper controller structure consists of a DUKF estimator and an AMPC. The estimator integrates the vehicle state information provided by different sensors, the vehicle state and parameters from the sensor or estimator, and the reference path generated by the path planner as the input of the AMPC, and participates in the control quantity, that is, the desired front wheel steering angle δ f,e In the calculation of , the expected front wheel angle is input to the lower controller to realize the action of the steering mechanism. The whole process is carried out online according to a certain cycle;
[0018] In the above step 4, two unscented Kalman filters are used to estimate parameters and states respectively, corresponding to two independent state space expressions. After estimating a set of better parameters, the parameter estimator can be temporarily closed to reduce the computational burden of the upper controller. When the current estimated state is unreliable, the parameter estimator can be restarted to achieve accurate state estimation. At the same time, due to the large number of estimated variables and the relatively small number of available sensor measurements, it is very difficult to achieve accurate estimation of the state and parameters of agricultural machinery only by the DUKF estimator, which may result in estimated values without physical meaning. Therefore, the pdf truncation method is used to implement the constrained DUKF. Here, in order to improve the computational efficiency, only constraints are imposed on the parameters to be estimated; specifically:
[0019] 1) Obtaining discrete state space expressions for parameter estimation and state estimation: Using the first-order forward Euler formula, equation (1) is transformed into discrete state space expressions for parameter estimation and state estimation respectively;
[0020] The parameter estimation state space expression is:
[0021] x p (k+1)=x p (k)+w p (k)
[0022] z p (k) = h p (x p (k))+v p (k); (3)
[0023] Among them, x p =[C f C r ] T , z p =[βγ] T , w p and v p are the process noise and observation noise of parameter estimation, respectively;
[0024] State estimation state space expression:
[0025] xs (k+1)=f s (x s (k))+w s (k)
[0026] z s (k) = x s (k)+v s (k) ; (4)
[0027] Among them, x s =[βγ] T , z s =[βγ] T , w s and v s are the process noise and observation noise of state estimation respectively;
[0028] 2) Imposing constraints on the parameters to be estimated: Assume that at time k there is an unscented Kalman filter estimate x for m parameters p (k|k), whose mean is The covariance is P p (k|k), accordingly, there are m scalar state constraints:
[0029]
[0030] Among them, LB ki ≤UB ki ,θ ki is a column vector of m elements with the i-th element being 1 and the rest being 0; under this condition, the truncated Gaussian Then find the mean of the truncated pdf and covariance That is, the mean and covariance of the constrained parameter estimates, defined as is the state estimate after executing the first i constraints, for The covariance of
[0031] 3) Using estimators to estimate the state and parameters of intelligent agricultural machinery in real time;
[0032] In the above step 5, A is defined as the point where the vehicle is located, B is the point closest to the reference trajectory, and the heading error is the difference between the headings at point A and point B, and the lateral error Δy is the distance between point A and point B. Under a given desired path, the heading error And the lateral error Δy satisfies:
[0033]
[0034] Assuming that the heading error and the sideslip angle are always small, we have V y ≈V x β, the above formula can be simplified to:
[0035]
[0036] Among them, γ is the sprayer yaw angular velocity, V x is the driving speed, β is the sideslip angle of the center of mass, and ρ is the curvature of the desired path;
[0037] Combining equations (1), (2), and (26), and using the first-order forward Euler formula, the state equation of the discrete-time system is obtained:
[0038] x(k+1)=A k x(k)+B k u(k)+d(k)
[0039] y(k)=Cx(k) ; (27)
[0040] The steering mode of the intelligent agricultural machinery under this technical solution is coordinated steering. It can be considered that the front wheel angle and the rear wheel angle are equal in magnitude and opposite in direction, that is, δ r =-δ f , so the state variable of the system The control variable is the desired front wheel steering angle δ f,e , that is, u=δ f,e , output
[0041] The matrix A is:
[0042]
[0043] The matrix B is:
[0044]
[0045] The spatial parameter d(k) is:
[0046]
[0047] The matrix C is:
[0048]
[0049] In order to avoid sudden changes in the control quantity and affect the accuracy and stability of the sprayer path tracking, the desired front wheel angle increment is used as the control quantity of the system, and the state equation of the system can be rewritten as:
[0050]
[0051] in,
[0052]
[0053] According to the estimation of state and parameters, the state at time k can be obtained And parameters Combined with formula (28), the optimization problem of constrained MPC with spatial parameters can be described as:
[0054]
[0055] Satisfy dynamics (i=0,1,…,N p )
[0056]
[0057] y(k|k)=y(k);
[0058] Satisfy the time domain constraints:
[0059] u min (k+i)≤u(k+i)≤u max (k+i),i=0,1,…,N c -1
[0060]
[0061] in,
[0062]
[0063] In the above optimization problem, Ω y and Ω u is the weighting matrix, given by:
[0064]
[0065] To control the increment sequence, as the independent variable of the constrained optimization problem, it is defined as:
[0066]
[0067] Y(k+1|k) is the N predicted by the system (28) at time k p Step control output, defined as:
[0068]
[0069] In order to avoid the situation where there is no solution in the solution process, the relaxation factor ε is introduced in equation (29), and λ is a given constant; by combining equations (28) and (29), we can get the system predicted N p Step control output:
[0070]
[0071] in,
[0072]
[0073]
[0074] Due to the existence of constraints, in general, it is impossible to obtain an analytical solution to the optimization problem. Therefore, a numerical solution method is required, that is, the constrained optimization problem needs to be converted into a quadratic programming problem description;
[0075] The standard form of the objective function for a quadratic programming problem is:
[0076]
[0077] Transformation (29) is in standard form, ignoring Irrelevant,
[0078]
[0079] Solve the above equation and convert The first element of is used as the control quantity, and the above process is repeated in each cycle to achieve complete path tracking.
[0080] Preferably, in step 1, the path planner, upper controller, lower controller, RTK-GPS and IMU of the platform all communicate via CAN.
[0081] Preferably, in step 3, the vehicle status information includes the center of mass sideslip angle measurement value β from RTK-GPS m and vehicle speed V, yaw rate measurement γ from the IMU m , and the front wheel steering angle δ from the Hall angle sensor f The parameters to be estimated are the equivalent cornering stiffness C of the front and rear axles. f and C r , the states to be estimated are the sideslip angle β and the yaw rate γ.
[0082] Preferably, in step three, the desired vehicle speed is set by the operator and is implemented by the lower-level controller operating the actuator, while the proposed upper-level controller is independent of speed, so the controller can adaptively achieve accurate path tracking at different vehicle speeds.
[0083] Preferably, in step 43), the operation steps of the DUKF estimator are as follows:
[0084] 3.1) Set initial value
[0085]
[0086] 3.2) Parameter prediction
[0087] Construct 2n+1 sample points:
[0088]
[0089] Calculate the parameter prediction sample points:
[0090]
[0091] Calculate the mean and variance of the parameter prediction sample points:
[0092]
[0093] 3.3) State prediction
[0094] Construct 2n+1 sample points:
[0095]
[0096] Substitute the parameter prediction value in step 3.2) into equation (25) to calculate the state prediction sample point:
[0097]
[0098] Calculate the mean and variance of the state prediction sample points:
[0099]
[0100] 3.4) Status Correction
[0101] When a new measurement value z is obtained s (k), the state mean and variance are updated:
[0102]
[0103] in,
[0104]
[0105] 3.5) Parameter Correction
[0106] When a new measurement value z is obtained p (k), i.e. After that, the parameter mean and variance are updated:
[0107]
[0108] in,
[0109]
[0110] 3.6)pdf truncation;
[0111] 3.7) Repeat the above steps 3.2-3.6 to achieve real-time estimation of the state and parameters of the intelligent agricultural machinery. Preferably, the step 3.6) pdf truncation specifically includes the following steps:
[0112] 3.6.1) Initialization
[0113] i=0;
[0114]
[0115]
[0116] in, is defined as the parameter estimate after executing the first i constraints, and the corresponding covariance is
[0117] 3.6.2) Let i = 1, for Perform Jordan standard decomposition to obtain the orthogonal matrix T ki and the diagonal matrix W ki ,Right now:
[0118]
[0119] 3.6.3) Use Gram-Schmidt orthogonalization to calculate the m×m orthogonal matrix ψ ki , which satisfies:
[0120]
[0121] Define ψ ki is the row vector ψ ki,j (j=1,…,m), that is:
[0122] ψ ki =[ψ ki,1 … ψ ki,m ] T ; (9)
[0123] Then ψ ki The first row of is calculated as follows:
[0124]
[0125] For j = 2, ..., m, perform the following operations:
[0126]
[0127] Among them, e j is a unit vector, that is, e jis a column vector of m elements, all of which are 0 except the jth element which is 1;
[0128] If the ψ calculated in the above formula ki,j If it is 0, use the following formula instead:
[0129]
[0130] Re-regularize ψ ki,j :
[0131]
[0132] 3.6.4) Define v k i is:
[0133]
[0134] From equations (3)-(5), we can see that v ki The mean of is 0, and the covariance matrix is identity (unit);
[0135] Combining equation (5) with equation (1), the lower bound LB ki and upper bound UB ki ,get:
[0136]
[0137] Get the standardized scalar constraint:
[0138] a ki ≤[10…0]v ki ≤ b ki ; (17)
[0139] It can be seen that before the constraint is executed, v ki The distribution of the first element of is N(0,1), but the constraint requires that v ki Must be located in a ki and b ki between;
[0140] 3.6.5) Define the random variable v k,i+1 is the v after the pdf is truncated ki ,Right now:
[0141] pdf(v k,i+1 )=truncated pdf(v ki ); (18)
[0142] The mean and variance of the transformed parameter estimates after enforcing the first constraint are:
[0143]
[0144] in,
[0145]
[0146] Then the mean and variance of the parameter estimates after executing the first constraint are:
[0147]
[0148] Increase i by 1 and repeat the process of steps 3.6.2-3.6.5 to obtain the parameter estimate after implementing the next constraint; note that is the unconstrained parameter estimate at time k, is the parameter state at time k after executing the first constraint, is the parameter state at time k after executing the first two constraints, and so on. After this process m times, the final constraint state estimate and the covariance at time k are obtained:
[0149]
[0150] Compared with the prior art, the beneficial effects of the present invention are as follows: compared with the existing path tracking control method, the present invention improves the accuracy of intelligent agricultural machinery path tracking by combining constrained dual unscented Kalman filtering with adaptive model tracking control, thereby achieving improved agricultural machinery operation efficiency, operation quality and economic benefits; the path tracking control system proposed in the present invention can be deployed in actual agricultural machinery, and on the premise of achieving good tracking accuracy, it achieves a balance between the reliability, real-time performance and cost requirements of the embedded system. BRIEF DESCRIPTION OF THE DRAWINGS
[0151] Figure 1 is a flow chart of the method of the present invention;
[0152] Figure 2 This is the control system architecture diagram;
[0153] Figure 3 This is the two-degree-of-freedom dynamics model diagram of agricultural machinery;
[0154] Figure 4 This is the architecture diagram of the upper-level controller;
[0155] Figure 5 It is the curve diagram of lateral error and heading error;
[0156] Figure 6 is the actual value curve of the front wheel steering angle;
[0157] Figure 7 It is a yaw rate comparison curve;
[0158] Figure 8 It is a comparison curve of the sideslip angle of the center of mass;
[0159] Fig. 9 It is the estimated curve diagram of the front and rear wheel cornering stiffness;
[0160] Fig.10 The agricultural machinery path map converted to the UTM coordinate system;
[0161] Fig.11 This is a curve diagram of the lateral error during the driving process of the agricultural machinery. DETAILED DESCRIPTION
[0162] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0163] See also Figure 1-5 , an embodiment provided by the present invention: a path tracking control method for an intelligent agricultural machine, comprising the following steps: step 1, designing a control system architecture; step 2, designing a dynamic model of the intelligent agricultural machine; step 3, designing an upper controller architecture; step 4, realizing the estimation of lateral dynamic parameters of the intelligent agricultural machine with constraints based on double unscented Kalman filtering; step 5, adaptive model predictive control based on the dynamic model;
[0164] In the above step 1, the upper controller obtains the current state information of the agricultural machinery collected by the sensor and performs state estimation. Then, according to the full coverage path of the farmland generated by the path planner, the target speed and turning angle of the agricultural machinery are calculated and generated. The lower controllers such as the vehicle speed controller and the steering controller finally perform the corresponding actions. The control system sensor is configured with real-time dynamic GPS (RTK-GPS) + inertial navigation system (IMU). Two RTK-GPS receivers are arranged at the front and rear of the vehicle respectively, and the inertial navigation unit (IMU) is arranged near the center of mass of the platform. The path planner, upper controller, lower controller, RTK-GPS and IMU of the platform all communicate through CAN.
[0165] In the above step 2, designing the intelligent agricultural machinery dynamics model includes the following steps:
[0166] 1) Lateral and yaw motion modeling: Since the agricultural machinery travels at a low speed, the nonlinear dynamic characteristics are not obvious, so only the lateral and yaw motions can be considered. These two motions are described by a linear two-degree-of-freedom model. The lateral and yaw motions can be expressed by the following differential equations:
[0167] describe:
[0168]
[0169] Where m is the mass of the sprayer, I z is the yaw moment of inertia of the sprayer, u is the longitudinal velocity, β
[0170] is the sideslip angle of the center of mass, γ is the yaw rate, δ f is the front wheel turning angle, δ r is the rear wheel turning angle, C f is the front wheel cornering stiffness, C r is the rear wheel cornering stiffness, l f is the distance from the center of mass to the front axle, l r is the distance from the center of mass to the rear axle;
[0171] 2) Steering system modeling: The agricultural machinery adopts a steering mechanism with hydraulic push rods and connecting rods as the main components. Under the design of a reasonable controller, the closed-loop response of the steering controller and the steering system can be approximated as the closed-loop response of a first-order system. Therefore, the entire steering system including the controller can be
[0172] Modeled as:
[0173]
[0174] Among them, δ is the front wheel or rear wheel turning angle, δ e is the desired turning angle of the front or rear wheel, τ δ is the time delay constant of the steering system;
[0175] In step 3 above, the upper controller structure consists of a DUKF estimator and an AMPC. The estimator integrates the vehicle status information provided by different sensors. The vehicle status information includes the center of mass side slip angle measurement value β from RTK-GPS. m and vehicle speed V, yaw rate measurement γ from the IMU m , and the front wheel steering angle δ from the Hall angle sensor f The parameters to be estimated are the equivalent cornering stiffness C of the front and rear axles. f and C r The state to be estimated is the sideslip angle β and the yaw rate γ. The vehicle state and parameters from the sensor or estimator and the reference path generated by the path planner are used as the input of AMPC and participate in the control quantity, that is, the desired front wheel steering angle δ f,e In the calculation, the desired front wheel angle is input to the lower controller to realize the action of the steering mechanism. The whole process is carried out online according to a certain cycle. The desired vehicle speed is set by the operator and realized by the lower controller operating the actuator. The proposed upper controller is independent of speed, so the controller can adaptively realize accurate path tracking at different vehicle speeds.
[0176] In the above step 4, two unscented Kalman filters are used to estimate parameters and states respectively, corresponding to two independent state space expressions. After estimating a set of better parameters, the parameter estimator can be temporarily closed to reduce the computational burden of the upper controller. When the current estimated state is unreliable, the parameter estimator can be restarted to achieve accurate state estimation. At the same time, due to the large number of estimated variables and the relatively small number of available sensor measurements, it is very difficult to achieve accurate estimation of the state and parameters of agricultural machinery only by the DUKF estimator, which may result in estimated values without physical meaning. Therefore, the pdf truncation method is used to implement the constrained DUKF. Here, in order to improve the computational efficiency, only constraints are imposed on the parameters to be estimated; specifically:
[0177] 1) Obtaining discrete state space expressions for parameter estimation and state estimation: Using the first-order forward Euler formula, equation (1) is transformed into discrete state space expressions for parameter estimation and state estimation respectively;
[0178] The parameter estimation state space expression is:
[0179] x p (k+1)=x p (k)+w p (k)
[0180] z p (k) = h p (x p (k))+v p (k); (3)
[0181] Among them, x p =[C f C r ] T , z p =[βγ] T , w p and v p are the process noise and observation noise of parameter estimation, respectively;
[0182] State estimation state space expression:
[0183] x s (k+1)=f s (x s (k))+w s (k)
[0184] z s (k) = x s (k)+v s (k) ; (4)
[0185] Among them, x s =[βγ]T , z s =[βγ] T , w s and v s are the process noise and observation noise of state estimation respectively;
[0186] 2) Imposing constraints on the parameters to be estimated: Assume that at time k there is an unscented Kalman filter estimate x for m parameters p (k|k), whose mean is The covariance is P p (k|k), accordingly, there are m scalar state constraints:
[0187]
[0188] Among them, LB ki ≤UB ki ,θ ki is a column vector of m elements with the i-th element being 1 and the rest being 0; under this condition, the truncated Gaussian Then find the mean of the truncated pdf and covariance That is, the mean and covariance of the constrained parameter estimates, defined as is the state estimate after executing the first i constraints, for The covariance of
[0189] 3) Using an estimator to estimate the state and parameters of intelligent agricultural machinery in real time, specifically including the following steps:
[0190] 3.1) Set initial value
[0191]
[0192] 3.2) Parameter prediction
[0193] Construct 2n+1 sample points:
[0194]
[0195] Calculate the parameter prediction sample points:
[0196]
[0197] Calculate the mean and variance of the parameter prediction sample points:
[0198]
[0199] 3.3) State prediction
[0200] Construct 2n+1 sample points:
[0201]
[0202] Substitute the parameter prediction value in step 3.2) into equation (25) to calculate the state prediction sample point:
[0203]
[0204] Calculate the mean and variance of the state prediction sample points:
[0205]
[0206] 3.4) Status Correction
[0207] When a new measurement value z is obtained s (k), the state mean and variance are updated:
[0208]
[0209] in,
[0210]
[0211] 3.5) Parameter Correction
[0212] When a new measurement value z is obtained p (k), i.e. After that, the parameter mean and variance are updated:
[0213]
[0214] in,
[0215]
[0216] 3.6) PDF truncation, including the following steps:
[0217] 3.6.1) Initialization
[0218] i=0;
[0219]
[0220] in, is defined as the parameter estimate after executing the first i constraints, and the corresponding covariance is
[0221] 3.6.2) Let i = 1, for Perform Jordan standard decomposition to obtain the orthogonal matrix T ki and the diagonal matrix W ki ,Right now:
[0222]
[0223] 3.6.3) Use Gram-Schmidt orthogonalization to calculate the m×m orthogonal matrix ψ ki , which satisfies:
[0224]
[0225] Define ψ ki is the row vector ψ ki,j (j=1,…,m), that is:
[0226] ψ ki =[ψ ki,1 … ψ ki,m ] T ; (9)
[0227] Then ψ ki The first row of is calculated as follows:
[0228]
[0229] For j = 2, ..., m, perform the following operations:
[0230]
[0231] Among them, e j is a unit vector, that is, e j is a column vector of m elements, all of which are 0 except the jth element which is 1;
[0232] If the ψ calculated in the above formula ki,j If it is 0, use the following formula instead:
[0233]
[0234] Re-regularize ψ ki,j :
[0235]
[0236] 3.6.4) Define v k i is:
[0237]
[0238] From formulas (3)-(5), we can see that v ki The mean of is 0, and the covariance matrix is identity (unit);
[0239] Combining equation (5) with equation (1), the lower bound LB ki and upper bound UB ki ,get:
[0240]
[0241] Get the standardized scalar constraint:
[0242] a ki ≤[1 0 … 0]v ki ≤ b ki ; (17)
[0243] It can be seen that before the constraint is executed, v ki The distribution of the first element of is N(0,1), but the constraint requires that v ki Must be located in a ki and b ki between;
[0244] 3.6.5) Define the random variable v k,i+1 is the v after the pdf is truncated ki ,Right now:
[0245] pdf(v k,i+1 )=truncated pdf(v ki ); (18)
[0246] The mean and variance of the transformed parameter estimates after enforcing the first constraint are:
[0247]
[0248] in,
[0249]
[0250] Then the mean and variance of the parameter estimates after executing the first constraint are:
[0251]
[0252] Increase i by 1 and repeat the process of steps 3.6.2-3.6.5 to obtain the parameter estimate after implementing the next constraint; note that is the unconstrained parameter estimate at time k, is the parameter state at time k after executing the first constraint, is the parameter state at time k after executing the first two constraints, and so on. After this process m times, the final constraint state estimate and the covariance at time k are obtained:
[0253]
[0254] 3.7) Repeat the above steps 3.2-3.6 to achieve real-time estimation of the state and parameters of the intelligent agricultural machinery;
[0255] In the above step 5, A is defined as the point where the vehicle is located, B is the point closest to the reference trajectory, and the heading error is the difference between the headings at point A and point B, and the lateral error Δy is the distance between point A and point B. Under a given desired path, the heading error And the lateral error Δy satisfies:
[0256]
[0257] Assuming that the heading error and the sideslip angle are always small, we have V y ≈V x β, the above formula can be simplified to:
[0258]
[0259] Among them, γ is the sprayer yaw angular velocity, V x is the driving speed, β is the sideslip angle of the center of mass, and ρ is the curvature of the desired path;
[0260] Combining equations (1), (2), and (26), and using the first-order forward Euler formula, the state equation of the discrete-time system is obtained:
[0261] x(k+1)=A k x(k)+B k u(k)+d(k)
[0262] y(k)=Cx(k) ; (27)
[0263] The steering mode of the intelligent agricultural machinery under this technical solution is coordinated steering. It can be considered that the front wheel angle and the rear wheel angle are equal in magnitude and opposite in direction, that is, δ r =-δ f , so the state variable of the system The control variable is the desired front wheel steering angle δ f,e , that is, u=δ f,e , output
[0264] The matrix A is:
[0265]
[0266] The matrix B is:
[0267]
[0268] The spatial parameter d(k) is:
[0269]
[0270] The matrix C is:
[0271]
[0272] In order to avoid sudden changes in the control quantity and affect the accuracy and stability of the sprayer path tracking, the desired front wheel angle increment is used as the control quantity of the system, and the state equation of the system can be rewritten as:
[0273]
[0274] in,
[0275]
[0276] According to the estimation of state and parameters, the state at time k can be obtained And parameters Combined with formula (28), the optimization problem of constrained MPC with spatial parameters can be described as:
[0277]
[0278] Satisfy dynamics (i=0,1,…,N p )
[0279]
[0280] y(k|k)=y(k);
[0281] Satisfy the time domain constraints:
[0282] u min (k+i)≤u(k+i)≤u max (k+i),i=0,1,…,N c -1
[0283]
[0284] in,
[0285]
[0286] In the above optimization problem, Ω y and Ω u is the weighting matrix, given by:
[0287]
[0288] To control the increment sequence, as the independent variable of the constrained optimization problem, it is defined as:
[0289]
[0290] Y(k+1|k) is the N predicted by the system (28) at time kp Step control output, defined as:
[0291]
[0292] In order to avoid the situation where there is no solution in the solution process, the relaxation factor ε is introduced in equation (29), and λ is a given constant; by combining equations (28) and (29), we can get the system predicted N p Step control output:
[0293]
[0294] in,
[0295]
[0296]
[0297] Due to the existence of constraints, in general, it is impossible to obtain an analytical solution to the optimization problem. Therefore, a numerical solution method is required, that is, the constrained optimization problem needs to be converted into a quadratic programming problem description;
[0298] The standard form of the objective function for a quadratic programming problem is:
[0299]
[0300] Transformation (29) is in standard form, ignoring Irrelevant,
[0301]
[0302] Solve the above equation and convert The first element of is used as the control quantity, and the above process is repeated in each cycle to achieve complete path tracking.
[0303] The method proposed in the above embodiment is applied to an actual agricultural machine for testing, and an "S"-shaped path is used as a reference path for agricultural machine path tracking; the test results are shown in FIG. Figure 6-11 ,in, Figure 7-9 The working condition of the constrained state and parameter estimator is reflected. Since the true value of the cornering stiffness is unknown at the beginning, the cornering stiffness of the front and rear wheels starts from a specified initial value. As the agricultural machinery travels, the estimated cornering stiffness of the front and rear wheels gradually converges to the true value, and the estimated center of mass slip angle also gradually converges to the true value. The results show that the designed constrained state and parameter estimator can estimate the true dynamic state and parameters of the agricultural machinery in real time, providing a reliable guarantee for the model predictive control based on the dynamic model. Fig.10 and Fig.11It reflects the actual driving path of the agricultural machinery and the deviation from the expected path. It can be seen that during the entire driving process of the agricultural machinery, its maximum lateral deviation does not exceed 0.03m, indicating that the controller can achieve high-precision path tracking of intelligent agricultural machinery, thereby improving the quality and efficiency of operations.
[0304] Based on the above, the present invention proposes a path tracking control method for intelligent agricultural machinery. By combining the PDF truncated double unscented Kalman filter (DUKF) and the adaptive MPC with spatial parameters, a controller suitable for path tracking of intelligent agricultural machinery is designed, which can effectively improve the accuracy of path tracking of intelligent agricultural machinery. This method can be used in actual agricultural machinery. Under the premise of ensuring good tracking accuracy, it achieves the reliability of the embedded system, and takes into account the real-time and cost requirements.
[0305] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A path tracking control method for an intelligent agricultural machine, comprising the following steps: Step 1: design the control system architecture; Step 2: design the intelligent agricultural machinery dynamics model; Step 3: design the upper controller architecture; Step 4: implement the constraint-based intelligent agricultural machinery lateral dynamics parameter estimation based on double unscented Kalman filtering; Step 5: adaptive model predictive control based on the dynamics model; It is characterized by: In the above step 1, the upper controller obtains the current state information of the agricultural machinery collected by the sensor and performs state estimation. Then, according to the full coverage path of the farmland generated by the path planner, the target speed and turning angle of the agricultural machinery are calculated and generated. The lower controllers such as the vehicle speed controller and the steering controller finally perform the corresponding actions. The control system sensor configuration adopts real-time dynamic GPS (RTK-GPS) + inertial navigation system (IMU). Two RTK-GPS receivers are respectively arranged at the front and rear of the vehicle, and the inertial navigation unit (IMU) is arranged near the center of mass of the platform. In the above step 2, designing the intelligent agricultural machinery dynamics model includes the following steps: 1) Lateral and yaw motion modeling: Since the agricultural machinery has a low speed and its nonlinear dynamic characteristics are not obvious, only its lateral and yaw motions can be considered. These two motions are described by a linear two-degree-of-freedom model. The lateral and yaw motions can be described by the following differential equations: Where m is the mass of the sprayer, I z is the yaw moment of inertia of the sprayer, u is the longitudinal velocity, β is the sideslip angle of the center of mass, γ is the yaw angular velocity, δ f is the front wheel turning angle, δ r is the rear wheel turning angle, C f is the front wheel cornering stiffness, C r is the rear wheel cornering stiffness, l f is the distance from the center of mass to the front axle, l r is the distance from the center of mass to the rear axle; 2) Steering system modeling: The agricultural machinery adopts a steering mechanism with hydraulic push rods and connecting rods as the main components. Under the design of a reasonable controller, the closed-loop response of the steering controller and the steering system can be approximated as the closed-loop response of a first-order system. Therefore, the entire steering system including the controller can be modeled as follows: Among them, δ is the front wheel or rear wheel turning angle, δ e is the desired turning angle of the front or rear wheel, τ δ is the time delay constant of the steering system; In the above step 3, the upper controller structure consists of a DUKF estimator and an AMPC. The estimator integrates the vehicle state information provided by different sensors, the vehicle state and parameters from the sensor or estimator, and the reference path generated by the path planner as the input of the AMPC, and participates in the control quantity, that is, the desired front wheel steering angle δ f,e In the calculation of , the expected front wheel angle is input to the lower controller to realize the action of the steering mechanism. The whole process is carried out online according to a certain cycle; In the above step 4, two unscented Kalman filters are used to estimate parameters and states respectively, corresponding to two independent state space expressions. After estimating a set of better parameters, the parameter estimator can be temporarily closed to reduce the computational burden of the upper controller. When the current estimated state is unreliable, the parameter estimator can be restarted to achieve accurate state estimation. At the same time, due to the large number of estimated variables and the relatively small number of available sensor measurements, it is very difficult to achieve accurate estimation of the state and parameters of agricultural machinery only by the DUKF estimator, which may result in estimated values without physical meaning. Therefore, the pdf truncation method is used to implement the constrained DUKF. Here, in order to improve the computational efficiency, only constraints are imposed on the parameters to be estimated; specifically: 1) Obtaining discrete state space expressions for parameter estimation and state estimation: Using the first-order forward Euler formula, equation (1) is transformed into discrete state space expressions for parameter estimation and state estimation respectively; The parameter estimation state space expression is: x p (k+1)=x p (k)+w p (k) z p (k)=h p (x p (k))+v p (k); (3) Among them, x p =[C f C r ] T , z p =[βγ] T , w p and v p are the process noise and observation noise of parameter estimation, respectively; State estimation state space expression: x s (k+1)=f s (x s (k))+w s (k) z s (k)=x s (k)+v s (k) ; (4) Among them, x s =[βγ] T , z s =[βγ] T , w s and v s are the process noise and observation noise of state estimation respectively; 2) Imposing constraints on the parameters to be estimated: Assume that at time k there is an unscented Kalman filter estimate x for m parameters p (k|k), whose mean is The covariance is P p (k|k), accordingly, there are m scalar state constraints: Among them, LB ki ≤UB ki ,θ ki is a column vector of m elements with the i-th element being 1 and the rest being 0; under this condition, the truncated Gaussian Then find the mean of the truncated pdf and covariance That is, the mean and covariance of the constrained parameter estimates, defined as is the state estimate after executing the first i constraints, for The covariance of 3) Using estimators to estimate the state and parameters of intelligent agricultural machinery in real time; In the above step 5, A is defined as the point where the vehicle is located, B is the point closest to the reference trajectory, and the heading error is the difference between the headings at point A and point B, and the lateral error Δy is the distance between point A and point B. Under a given desired path, the heading error And the lateral error Δy satisfies: Assuming that the heading error and the sideslip angle are always small, we have V y ≈V x β, the above formula can be simplified to: Among them, γ is the yaw angular velocity of the sprayer, V x is the driving speed, β is the sideslip angle of the center of mass, and ρ is the curvature of the desired path; Combining equations (1), (2), and (26), and using the first-order forward Euler formula, the state equation of the discrete-time system is obtained: x(k+1)=A k x(k)+B k u(k)+d(k) y(k)=Cx(k); (27) The steering mode of the intelligent agricultural machinery under this technical solution is coordinated steering. It can be considered that the front wheel angle and the rear wheel angle are equal in magnitude and opposite in direction, that is, δ r =-δ f , so the state variable of the system The control variable is the desired front wheel steering angle δ f,e , that is, u=δ f,e , output The matrix A is: The matrix B is: The spatial parameter d(k) is: The matrix C is: In order to avoid sudden changes in the control quantity and affect the accuracy and stability of the sprayer path tracking, the desired front wheel angle increment is used as the control quantity of the system, and the state equation of the system can be rewritten as: in, According to the estimation of state and parameters, the state at time k can be obtained And parameters Combined with formula (28), the optimization problem of constrained MPC with spatial parameters can be described as: Satisfy dynamics (i=0,1,…,N p ) y(k|k)=y(k); Satisfy the time domain constraints: u min (k+i)≤u(k+i)≤u max (k+i),i=0,1,…,N c -1 in, In the above optimization problem, Ω y and Ω u is the weighting matrix, given by: To control the increment sequence, as the independent variable of the constrained optimization problem, it is defined as: Y(k+1|k) is the N predicted by the system (28) at time k p Step control output, defined as: In order to avoid the situation where there is no solution in the solution process, the relaxation factor ε is introduced in equation (29), and λ is a given constant; by combining equations (28) and (29), we can get the system predicted N p Step control output: in, Due to the existence of constraints, in general, it is impossible to obtain an analytical solution to the optimization problem. Therefore, a numerical solution method is required, that is, the constrained optimization problem needs to be converted into a quadratic programming problem description; The standard form of the objective function for a quadratic programming problem is: Transformation (29) is in standard form, ignoring Irrelevant, Solve the above equation and convert The first element of is used as the control quantity, and the above process is repeated in each cycle to achieve complete path tracking.
2. The path tracking control method of an intelligent agricultural machine according to claim 1, characterized in that: In the step 1, the path planner, upper controller, lower controller, RTK-GPS and IMU of the platform all communicate via CAN.
3. The path tracking control method of an intelligent agricultural machine according to claim 1, characterized in that: In step 3, the vehicle status information includes the center of mass sideslip angle measurement value β from RTK-GPS m and vehicle speed V, yaw rate measurement γ from the IMU m , and the front wheel steering angle δ from the Hall angle sensor f The parameters to be estimated are the equivalent cornering stiffness C of the front and rear axles. f and C r , the states to be estimated are the sideslip angle β and the yaw rate γ.
4. The path tracking control method of an intelligent agricultural machine according to claim 1, characterized in that: In step three, the desired vehicle speed is set by the operator and is implemented by the lower-level controller operating the actuator, while the proposed upper-level controller is independent of speed, so the controller can adaptively achieve accurate path tracking at different vehicle speeds.
5. The path tracking control method of an intelligent agricultural machine according to claim 1, characterized in that: In the step 43), the operation steps of the DUKF estimator are as follows: 3.1) Set initial value 3.2) Parameter prediction Construct 2n+1 sample points: Calculate the parameter prediction sample points: Calculate the mean and variance of the parameter prediction sample points: 3.3) State prediction Construct 2n+1 sample points: Substitute the parameter prediction value in step 3.2) into equation (25) to calculate the state prediction sample point: Calculate the mean and variance of the state prediction sample points: 3.4) Status Correction When a new measurement value z is obtained s (k), the state mean and variance are updated: in, 3.5) Parameter Correction When a new measurement value z is obtained p (k), i.e. After that, the parameter mean and variance are updated: in, 3.6)pdf truncation; 3.7) Repeat the above steps 3.2-3.6 to achieve real-time estimation of the status and parameters of the intelligent agricultural machinery.
6. The path tracking control method of an intelligent agricultural machine according to claim 5, characterized in that: The step 3.6) pdf truncation specifically comprises the following steps: 3.6.1) Initialization i=0; in, is defined as the parameter estimate after executing the first i constraints, and the corresponding covariance is 3.6.2) Let i = 1, for Perform Jordan standard decomposition to obtain the orthogonal matrix T ki and the diagonal matrix W ki ,Right now: 3.6.3) Use Gram-Schmidt orthogonalization to calculate the m×m orthogonal matrix ψ ki , which satisfies: Define ψ ki is the row vector ψ ki,j (j=1,…,m), that is: ψ ki =[ψ ki,1 …ψ ki,m ] T ; (9) Then ψ ki The first row of is calculated as follows: For j = 2, ..., m, perform the following operations: in, e j is a unit vector, that is, e j is a column vector of m elements, all of which are 0 except the jth element which is 1; If the ψ calculated above ki,j If it is 0, replace it with the following formula: Re-regularize ψ ki,j : 3.6.4) Define v ki for: From formulas (3)-(5), we can see that v ki The mean of is 0, and the covariance matrix is identity (unit); Combining equation (5) with equation (1), the lower bound LB ki and upper bound UB ki ,get: Get the standardized scalar constraint: a ki ≤[1 0…0]v ki ≤ b ki ; (17) It can be seen that before the constraint is executed, v ki The distribution of the first element of is N(0,1), but the constraint requires that v ki Must be located in a ki and b ki between; 3.6.5) Define the random variable v k,i+1 is the v after the pdf is truncated ki ,Right now: pdf(v k,i+1 )=truncated pdf(v ki ); (18) The mean and variance of the transformed parameter estimates after enforcing the first constraint are: in, Then the mean and variance of the parameter estimates after executing the first constraint are: Increase i by 1 and repeat the process of steps 3.6.2-3.6.5 to obtain the parameter estimate after implementing the next constraint; note that is the unconstrained parameter estimate at time k, is the parameter state at time k after executing the first constraint, is the parameter state at time k after executing the first two constraints, and so on. After this process m times, the final constraint state estimate and the covariance at time k are obtained:
Citation Information
Cited By
New energy tractor constant speed cruise path offset compensation control method and system
CN122861302A
