Electric vehicle control method, computer device and computer readable storage medium

By constructing a vehicle single-track model and calculating the unified yaw rate control reference for coordinated handling and stability using analytical expressions, and by optimizing the NMPC DYC model using Lyapunov functions and the relaxed LOG damping equation method, the problem of the conflict between stability and handling in DYC in DDEV was solved, and a comprehensive improvement in vehicle handling and stability was achieved.

CN118358378BActive Publication Date: 2024-11-15FOSHAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410169136.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2024-11-15
Estimated Expiration
2044-02-06

AI Technical Summary

Technical Problem

Existing distributed electric vehicles (DDEVs) suffer from problems in yaw moment control (DYC), including conflicts between stability and maneuverability control references, poor control performance, and complex and insufficient real-time solutions for nonlinear model predictive control (NMPC).

Method used

A single-track vehicle model is constructed, and a unified yaw rate control reference for handling and stability coordination is calculated through analytical expressions. The inequality constraints are transformed into equivalent costs by combining Lyapunov functions and the relaxed LOG constraint equation method. The unconstrained NMPC DYC model is optimized using the double-loop iterative LQR optimization method. The longitudinal speed proportional-integral control and torque distribution model are designed to achieve closed-loop control.

Benefits of technology

It simplifies the coordinated design of handling and stability, improves the overall performance of vehicle handling and stability, ensures the convergence of control references and the stable operation of algorithms, and is suitable for multi-axis multi-hub motor DDEVs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118358378B_ABST
    Figure CN118358378B_ABST
Patent Text Reader

Abstract

The present invention discloses an electric vehicle control method, a computer device and a computer-readable storage medium, and relates to the field of vehicle control technology. The method comprises: constructing a vehicle lateral dynamics model; constructing a unified yaw rate control reference coordinated with front wheel angle constraint variables, weight coefficients and handling stability; constructing a Lyapunov function and auxiliary control rate based on the unified yaw rate control reference following error, constructing a contraction constraint and a NMPC DYC model based on Lyapunov; converting the inequality constraints of the NMPC DYC model into equivalent costs, calculating the control sequence and state trajectory, and optimizing the unconstrained NMPC DYC model through a double-loop iterative LQR method; constructing a longitudinal vehicle speed proportional-integral control model based on the deviation between the expected vehicle speed and the actual vehicle speed to calculate the expected total driving torque demand; constructing a torque distribution model, and calculating the torque command of each wheel to perform closed-loop control on the vehicle. The present invention can effectively improve the vehicle's maneuverability and stability coordination performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle control technology, and in particular to an electric vehicle control method, a computer device and a computer-readable storage medium. Background Art

[0002] Distributed Drive Electric Vehicle (DDEV) is equipped with in-wheel motor (IWM) on each wheel. By controlling the torque output of each wheel, it can generate yaw moment around the vertical axis of the vehicle's center of mass, realize direct yaw moment control (DYC), and improve vehicle handling stability. Compared with traditional vehicles, its unique driving method can provide more control freedom to optimize vehicle driving performance. However, the current DYC still has the following shortcomings:

[0003] (1) Vehicle stability and maneuverability control references conflict with each other under extreme conditions. Currently, the control reference for vehicle stability coordination is generally designed by first performing phase plane analysis, calibrating / fitting characteristic points and boundary curves, but this method is labor-intensive and has complicated operation steps;

[0004] (2) The DYC control effect of nonlinear model predictive control (NMPC) is good, but the current methods generally do not consider the control convergence, and the control effect needs to be improved;

[0005] (3) NMPC problems are complex to solve. Most algorithms have problems such as insufficient real-time performance, conventional inequality constraint methods may not be able to fully guarantee hard constraints, and effective initial solutions cannot be obtained quickly.

[0006] Therefore, it is necessary to develop a DDEV NMPC DYC control method to improve the comprehensive performance of vehicle handling stability. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide an electric vehicle control method, a computer device and a computer-readable storage medium, which can effectively improve the coordinated performance of vehicle maneuverability and stability.

[0008] In order to solve the above technical problems, the present invention provides an electric vehicle control method, comprising: constructing a vehicle single track model to characterize the lateral behavior of the vehicle, and constructing a vehicle lateral dynamics model based on the vehicle single track model; constructing a front wheel turning angle constraint variable for characterizing the vehicle stability boundary according to the vehicle lateral dynamics model, constructing a weight coefficient according to the front wheel turning angle constraint variable, and constructing a unified yaw rate control reference for handling stability coordination according to the weight coefficient; constructing a Lyapunov function and an auxiliary control rate based on the unified yaw rate control reference following error according to the vehicle lateral dynamics model, constructing a contraction constraint according to the Lyapunov function and the auxiliary control rate, and constructing a Lyapunov-based NMPC DYC model according to the contraction constraint; converting the inequality constraints of the NMPCDYC model into equivalent costs by relaxing the LOG barrier equation method to construct an unconstrained NMPC DYC model, calculating the control sequence and state trajectory according to the auxiliary control rate and the vehicle lateral dynamics model, and optimizing the unconstrained NMPC in real time by a double-loop iterative LQR optimization method. A DYC model is used to obtain the external yaw moment demand; a longitudinal speed proportional-integral control model based on the deviation between the expected vehicle speed and the actual vehicle speed is constructed to calculate the expected total driving torque demand; a torque distribution model is constructed according to the expected total driving torque demand and the external yaw moment demand, and the torque command of each wheel is calculated according to the torque distribution model to perform closed-loop control of the vehicle.

[0009] As an improvement of the above solution, the front wheel turning angle constraint variable is expressed as:

[0010]

[0011]

[0012] in, is the upper limit of the front wheel turning angle, δ is the lower limit of the front wheel turning angle, l a is the distance from the front axle to the center of mass of the vehicle, l b is the distance from the rear axle to the center of mass of the vehicle, μ is the road adhesion coefficient, g is the acceleration of gravity, v x is the longitudinal speed, is the upper limit of the side slip angle of the front axle tire, α f is the lower limit of the side slip angle of the front axle tire, is the upper limit of the side slip angle of the rear axle tire, α r It is the lower limit of the side slip angle of the rear axle tire.

[0013] As an improvement of the above solution, the weight coefficient W h-s It is expressed as:

[0014]

[0015] Among them, θ is the unknown coefficient, δ is the front wheel turning angle, is the upper limit of the front wheel turning angle, δ is the lower limit of the front wheel angle. When the front wheel angle is outside the boundary, W h-s =1, when the front wheel angle is within the boundary, W h-s =0.

[0016] As an improvement of the above solution, the unified yaw rate control reference for handling stability coordination is expressed as:

[0017] γ h-s =W h-s γ s +(1-W h-s )γ h

[0018] Among them, W h-s is the weight coefficient, γ s is the stability reference, γ h For manipulative reference.

[0019] As an improvement of the above solution, the contraction constraint is expressed as:

[0020]

[0021] Among them, u aux is the auxiliary control rate, V is the Lyapunov function, γ is the yaw rate, x is the state variable of the vehicle lateral dynamics model, u is the control variable of the vehicle lateral dynamics model, and w is the external input of the vehicle lateral dynamics model.

[0022] As an improvement of the above scheme, the Lyapunov-based NMPC DYC model is expressed as:

[0023]

[0024] Among them, x * is the optimized state, u * is the optimized control quantity, φ(x N ) is the prediction time domain N p The terminal cost at time, k is the time index of the prediction time domain, L k (x k ,u k ) is the stage cost at the kth moment.

[0025] As an improvement of the above scheme, the steps of optimizing the unconstrained NMPC DYC model in real time through the dual-loop iterative LQR optimization method include: during the iteration process, judging whether the current number of iterations is less than the maximum number of iterations or whether the residual norm is greater than the iteration termination error limit; when the judgment is yes, performing an outer loop iteration to calculate the weight coefficient of the equivalent cost term, and performing an inner loop iteration based on LQR; when the judgment is no, obtaining an updated state trajectory and control sequence.

[0026] As an improvement of the above scheme, the vehicle lateral dynamics model uses the vehicle lateral speed and yaw angular velocity as state quantities, the external yaw torque as the control quantity, and the vehicle front wheel angle as the external input quantity; the longitudinal vehicle speed proportional-integral control model uses the expected vehicle speed as the target; the torque distribution model is based on the premise of meeting the total driving torque demand and the external yaw torque demand, with the minimum tire load rate as the goal, the torque command of each wheel hub motor as the optimization variable, and the physical limitation of the torque of each wheel hub motor as the constraint.

[0027] Correspondingly, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the above-mentioned electric vehicle control method when executing the computer program.

[0028] Correspondingly, the present invention also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the steps of the above-mentioned electric vehicle control method when executed by a processor.

[0029] The electric vehicle control method of the present invention can comprehensively improve the coordinated performance of vehicle maneuverability and stability. The implementation of the present invention has the following beneficial effects:

[0030] (1) The present invention proposes a simple and coordinated unified yaw rate control reference design method for handling stability. Unlike conventional methods, this method does not require the calibration / fitting of characteristic points or stability boundaries by phase plane analysis in advance, but directly calculates by analytical expressions, which is easy to design and apply. The control reference is only about a single variable, yaw rate, which is convenient for the design of a reference following controller.

[0031] (2) The present invention proposes a Lyapunov-based NMPC DYC model; the model can effectively ensure closed-loop stability, improve the convergence of control reference following, and greatly improve vehicle handling performance;

[0032] (3) The present invention proposes a fast optimization method for the NMPC DYC model; based on the iterative LQR algorithm, it focuses on solving the shortcomings of its inability to directly handle inequality constraints and sensitivity to initial solutions; in view of the problem of inequality constraint processing, a relaxed LOG function method is proposed to transform the constrained optimization problem into an unconstrained problem. The expression can be numerically calculated outside the constraint range to ensure the stable operation of the algorithm; and a double-loop iterative method is designed. By continuously reducing the weight of the equivalent cost of the LOG function in the outer loop, the constructed unconstrained problem can effectively approximate the original problem, ensuring the optimality of the solution; in terms of the initial solution, the auxiliary control rate is directly used to calculate the effective initial trajectory, which solves the problem of iterative LQR being sensitive to the initial trajectory and improves the stability of iterative LQR optimization;

[0033] (4) This method can be applied to multi-axis and multi-hub motor DDEV. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of an embodiment of an electric vehicle control method of the present invention;

[0035] Figure 2 Schematic diagram of an embodiment of an electric vehicle control method of the present invention;

[0036] Figure 3 It is a schematic diagram of the monorail vehicle model in the present invention. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.

[0038] See also Figure 1 and Figure 2 , Figure 1 and Figure 2 The flowchart of an embodiment of the electric vehicle control method of the present invention is shown, which includes:

[0039] S101, constructing a vehicle single track model to characterize the lateral behavior of the vehicle, and constructing a vehicle lateral dynamics model based on the vehicle single track model;

[0040] like Figure 3 As shown, a single-track vehicle model is used to characterize the lateral behavior of the vehicle, where the expression of the single-track vehicle model is:

[0041]

[0042]

[0043] Among them, v y is the lateral velocity of the vehicle, γ is the yaw rate of the vehicle, m is the mass of the vehicle, v x is the longitudinal speed, Iz is the yaw moment of inertia, l a is the distance from the front axle to the center of mass of the vehicle, l b is the distance from the rear axle to the center of mass of the vehicle, F yf is the lateral force of the front axle tire of the vehicle, F yr is the lateral force of the rear axle tire, M z_ext To apply the yaw moment, the ground force generated by the four-wheel hub motors is generated around the vehicle's center of mass.

[0044] Accordingly, the tire lateral force can be established by the magic formula:

[0045] F y =-D y sin(C y arctan(σ-E y (σ-arctan(σ)))) (3)

[0046] C yFα =B y C y D y =c1sin(2arctan(F z · / c2))

[0047] B y =C yFα / (C y D y )

[0048] D y =μF z · / μ nom

[0049] σ=B y ε fric α·

[0050] ε fric =μ nom / μ

[0051] Where μ is the road adhesion coefficient, B y is the stiffness coefficient, D y is the peak factor, F z · is the vertical force of a tire, α· is the side slip angle of a tire, C y 、E y , c1 and c2 are debugging parameters, μ nom is the road adhesion coefficient used in tire testing, ε fric is the road adhesion coefficient ratio, C yFα =c1sin(2arctan(F z· / c2)) is a temporary variable; the symbol "·" indicates that the above variables are about the left front, right front, left rear, and right rear. Correspondingly, the "·" in the relevant variables can be written as "fl", "fr", "rl" and "rr" respectively; the side slip angles of the front and rear axle tires can be expressed as:

[0052] α f =δ-arctan(arctan(v y / v x )+l a γ / v x ) (4)

[0053] α r =arctan(l b γ / v x -arctan(v y / v x )) (5)

[0054] Among them, α f is the side slip angle of the front axle tire, α r is the sideslip angle of the rear axle tire, and δ is the front wheel turning angle of the vehicle.

[0055] According to equations (1) to (5), the vehicle lateral dynamics model can be organized into the following state update equation:

[0056]

[0057] Where x = [v y ,γ] T is the state variable, u=M z_ext is the control variable, and w=δ is the external input.

[0058] As can be seen from the above, the present invention is based on a vehicle single-track model, adopts the magic formula to characterize the lateral force of the vehicle tire, takes the vehicle lateral velocity and yaw angular velocity as state quantities, uses the applied yaw moment as the control quantity, and takes the vehicle front wheel angle as the external input to construct a vehicle lateral dynamics model.

[0059] S102, constructing a front wheel turning angle constraint variable for characterizing the vehicle stability boundary according to the vehicle lateral dynamics model, constructing a weight coefficient according to the front wheel turning angle constraint variable, and constructing a unified yaw rate control reference for handling stability coordination according to the weight coefficient;

[0060] Generally, the driving stability of a vehicle can be determined by the range of the yaw rate, the front wheel slip angle, and the rear wheel slip angle; the vehicle stability constraint range of these three parts can be expressed as:

[0061]

[0062]

[0063]

[0064] in, is the upper limit of the relevant variable, (·) is the lower limit of the relevant variable; according to the magic formula (3), we have For tire testing (in μ nom Maximum front axle tire slip angle under road adhesion conditions, It is the maximum rear axle tire slip angle during tire testing.

[0065] It should be noted that formula (7) is derived from the maximum lateral acceleration constraint of the vehicle in contact with the ground to prevent the vehicle from skidding; formulas (8) and (9) respectively limit the front and rear axle tires of the vehicle to their linear regions to prevent the tire force from being saturated; if the front wheel slip angle of the vehicle is too large, it may cause the vehicle to lose its steering ability, and if the rear wheel slip angle is too large, it may cause problems such as tail swinging.

[0066] Combined with the vehicle lateral dynamics model and based on v y -γ phase plane analysis results show that when the vehicle is critically unstable, there are two saddle points. At this time, the three upper limits and the three lower limits in formula (7) to formula (9) intersect at the saddle points, and the front wheel steering angle of the vehicle corresponding to the saddle point is the maximum / minimum front wheel steering angle that keeps the vehicle stable. Therefore, formula (7) to formula (9) can be simplified by replacing the equation to integrate:

[0067] For the first saddle point, there is a The upper limit equation of intersects at the saddle point. According to formula (4) and formula (5), we have:

[0068]

[0069]

[0070] By replacing arctan(v y / v x ), and sorting out the first expression above, we get:

[0071]

[0072] Similarly, substitute in formula (4) and formula (5) α f =α f , α r =α r , and sort out:

[0073]

[0074] Formula (10) and Formula (11) are the front wheel steering angle ranges that the vehicle must meet to maintain driving stability when no additional control is added (only based on driver control). Through the above integration, the variables that need to be considered for vehicle stability are reduced from three in Formula (7) to Formula (9) to only one front wheel steering angle constraint variable in Formula (10) and Formula (11), which simplifies the complexity of the problem. In other words, the front wheel steering angle constraint variable can be expressed as:

[0075]

[0076]

[0077] in, is the upper limit of the front wheel turning angle, δ is the lower limit of the front wheel turning angle, l a is the distance from the front axle to the center of mass of the vehicle, l b is the distance from the rear axle to the center of mass of the vehicle, μ is the road adhesion coefficient, g is the acceleration of gravity, v x is the longitudinal speed, is the upper limit of the side slip angle of the front axle tire, α f is the lower limit of the side slip angle of the front axle tire, is the upper limit of the side slip angle of the rear axle tire, α r It is the lower limit of the side slip angle of the rear axle tire.

[0078] In addition, unlike the traditional phase plane stability region calibration / fitting method, formula (10) and formula (11) only need to substitute basic parameters such as the vehicle itself and driving conditions, which is very convenient to use.

[0079] Furthermore, the vehicle stability can be evaluated in real time by using formula (10) and formula (11). When the feedback front wheel steering angle is greater than the above boundary, the vehicle should give priority to stability; when it is less than the lower boundary, the vehicle maneuverability should be given priority. DDEV can achieve the expected driving performance by following the handling stability control reference for DYC control. To this end, the present invention defines a quantized weight coefficient W h-s To indicate the priority of the above goals:

[0080]

[0081] Among them, θ is the unknown coefficient, δ is the front wheel steering angle, is the upper limit of the front wheel turning angle, δ is the lower limit of the front wheel turning angle;

[0082] When the vehicle is considered unstable / critically unstable (i.e., the front wheel steering angle is outside the boundary), W h-s= 1, when the vehicle is considered to be in a steady state (i.e., the front wheel angle is within the boundary), W h-s = 0. When the front wheel turns from inside the boundary to outside the boundary, W h-s The transition from 0 to 1 is smooth, and the length of the transition phase can be reduced by increasing θ.

[0083] Accordingly, a unified yaw rate control reference considering the coordination of handling stability can be designed based on the weight coefficient.

[0084] (1) Select stability reference γ s =a y / v x , this expression has the advantage of not relying on the exact road adhesion coefficient, where a y The lateral acceleration fed back to the vehicle can be obtained in real time through the inertial measurement unit.

[0085] (2) The equilibrium point about γ in the vehicle lateral dynamics model is selected as the maneuverability reference, that is, γ h =vxδ / [(l a +l b )(1+k s v x 2 )],k s =[m(l b C r -l a C f )] / [2(l a +l b ) 2 C f C r ] is the stability coefficient, C f is the linear stiffness of the front axle tire, C r is the linear stiffness of the rear axle tire; in order to ensure that the driver has a consistent control feel under different working conditions, the linear tire stiffness can be used for calculation; in order to prevent the vehicle from skidding due to excessive yaw angular velocity, the maneuverability reference γ h Formula (7) is added to limit the amplitude so that

[0086] Therefore, the unified yaw rate control reference considering the coordination of handling stability can be obtained by using the weight coefficient W h-s的 The weighted sum form is obtained:

[0087] γ h-s =W h-s γ s +(1-W h-s )γ h (13)

[0088] Among them, W h-sis the weight coefficient, γ s is the stability reference, γ h For manipulative reference.

[0089] It should be noted that the unified yaw rate control reference can achieve dynamic coordination between stability and maneuverability objectives through weight coefficients. In addition, it only needs to observe the front wheel angle of the vehicle in real time, and does not require a large number of calibration / fitting operations in the design stage, which is easy to design and apply. In addition, unlike the traditional control reference that needs to consider the lateral speed / vehicle center of mass sideslip angle (stability reference) and yaw rate (maneuverability reference), formula (13) is only about the yaw rate, that is, following the yaw rate can achieve maneuverability coordination, which simplifies the complexity of the control design.

[0090] Therefore, the present invention establishes an analytically expressed vehicle stability boundary and determines the vehicle stability state by observing the vehicle front wheel angle in real time; based on this, the weight coefficient of the handling stability synergy is calculated, and the unified yaw rate control reference of the handling stability synergy is obtained by weighted sum.

[0091] S103, constructing a Lyapunov function and an auxiliary control rate based on a unified yaw rate control reference following error according to the vehicle lateral dynamics model, constructing a contraction constraint according to the Lyapunov function and the auxiliary control rate, and constructing a Lyapunov-based NMPC DYC model according to the contraction constraint;

[0092] In order to make DYC effectively follow the unified yaw rate control reference, the present invention designs the NMPC DYC model based on Lyapunov. The main idea is to introduce the contraction constraint on the auxiliary control rate so that NMPC can inherit the attraction domain of the auxiliary control rate to ensure the closed-loop stability of the control and improve the convergence of the reference following. According to the unified yaw rate control reference, the NMPC DYC model target is only about the yaw rate γ, and the differential expression of γ in the vehicle lateral dynamics model is defined as Thus, the contraction constraint is expressed as:

[0093]

[0094] Among them, u aux is the auxiliary control rate, V is the Lyapunov function, γ is the yaw rate, x is the state variable of the vehicle lateral dynamics model, u is the control variable of the vehicle lateral dynamics model, and w is the external input of the vehicle lateral dynamics model.

[0095] It should be noted that the contraction constraint only acts on the first element in the optimization control sequence in the NMPC DYC model. aux The design is as follows:

[0096] (1) Define the error system as e = γ - γ h-s , whose differential is Lyapunov function V = earctan(e)-ln(1+e 2 ) / 2≥0; yes Substitution have

[0097] (2) Design auxiliary control rate u aux for:

[0098]

[0099] Among them, the first three terms of formula (15) are feedforward gain terms, and the last term is the feedback gain term; k1>0 is the gain coefficient; Substituting formula (15) into have definition The recursive feasibility condition of NMPC under contraction constraints is, in is the upper limit of the external yaw moment constraint. M z_ext is the lower bound of the external yaw moment. By introducing the contraction constraint, we have The closed-loop stability of the system can be guaranteed.

[0100] Furthermore, the Lyapunov-based NMPC DYC model is expressed as:

[0101]

[0102] L k (x k ,u k )=q(γ-γ h-s ) 2 +rM z_ext 2

[0103] φ(x N )=q N (γ-γ h-s ) 2

[0104] Among them, x * is the optimized state, u * is the optimized control quantity, N p Indicates the prediction time domain length, x N N is the prediction time domain p The state quantity at the moment, φ(x N ) is the prediction time domain N p The terminal cost at time, k is the time index of the prediction time domain, Lk (x k ,u k ) is the stage cost at the kth moment, q, r and q N is the weight coefficient.

[0105] The NMPC DYC model follows the vehicle lateral dynamics model and Specifically:

[0106]

[0107] Among them, Ψ = u aux ; Formula (17) is the integration of contraction constraints and constraints The result is to reduce the number of inequality constraints and simplify the optimization complexity.

[0108] Therefore, the present invention designs a Lyapunov function and an auxiliary control rate for the yaw rate reference following error, proposes a contraction constraint, and establishes a Lyapunov-based NMPC DYC problem to ensure closed-loop stability and improve control convergence.

[0109] S104, converting the inequality constraints of the NMPC DYC model into equivalent costs by relaxing the LOG barrier equation method to construct an unconstrained NMPC DYC model, calculating the control sequence and state trajectory according to the auxiliary control rate and the vehicle lateral dynamics model, and optimizing the unconstrained NMPC DYC model in real time by a double-loop iterative LQR optimization method to obtain an external yaw moment demand;

[0110] In order to quickly solve the NMPC problem, the present invention adopts an improved dual-loop iterative LQR optimization method, which improves the traditional iterative LQR method for effectively handling inequality constraints and initial solution sensitivity. The following first introduces the traditional iterative LQR calculation process, and then introduces the inequality constraint processing method and the initial solution setting method.

[0111] 1. Traditional Iterative LQR Calculation

[0112] According to the principle of dynamic programming, the Bellman equation is expressed as:

[0113]

[0114] Among them, ν k (·) is the value from x k The minimum cost value at the start; define formula (18) as k and u k The perturbation equation is:

[0115]

[0116] The second-order Taylor expansion is:

[0117]

[0118]

[0119] The right subscript in the above expression is the partial derivative of the variable. In order to avoid tensor operations, the Hessian matrix in formula (20) is ignored in the iterative LQR. and The last term of . Let the partial derivative of formula (19) with respect to δu be 0, then It can be expressed as δu * =K1+K2δx, where is the feedforward gain term, is the feedback gain term. * Substituting into formula (19), we can sequentially predict the terminal time N in the time domain. p Start reverse calculation of δu * , formula (20) and To the initial moment (k = 0), this process is called "backward propagation". Then start from the initial moment (k = 0) to calculate u k =u nom,k +δu * =u nom,k -τK1-K2(x k -x nom,k ), the state is updated (6) to the predicted time domain terminal time N p moment, and this process is called "forward propagation". In this process, τ is the backtracking search parameter, which is initially 1 and gradually decreases, that is, each update, τ = ητ, η < 1 is the undetermined coefficient, and whether to reduce τ is determined by the line search method. The line search method mainly evaluates the expected target cost reduction and the actual target cost reduction to determine whether to accept the result of the current iteration. If it does not meet the expected requirements, then reduce τ and continue the iteration, otherwise accept this iteration.

[0120] 2. Inequality Constraint Processing Methods

[0121] The relaxed LOG barrier function is used to transform the inequality constraints of the NMPC DYC model into equivalent costs and introduce them into the optimization objective, thus transforming the original constrained problem into an unconstrained problem. The barrier function is expressed as follows:

[0122]

[0123] Among them, c≤0 is an inequality constraint, z=-c is a temporary variable, k con>1 is an undetermined even integer, 0<ζ≤1 is a slack variable; the traditional LOG barrier function can only calculate real values ​​within the constraint range, and cannot perform equivalent cost operations outside the constraint; formula (21) can inherit the restriction effect of the traditional LOG barrier function on the inequality constraint, and the real value can still be obtained outside the inequality constraint, that is, formula (21) expands the applicable range of the traditional LOG barrier function for z from (0, +∞) to (-∞, +∞), ensuring the smooth execution of the algorithm iteration process.

[0124] Accordingly, the inequality constraint (17) is written as the equivalent cost through formula (21) to construct the unconstrained NMPC DYC model:

[0125]

[0126] The unconstrained NMPC DYC model obeys the vehicle lateral dynamics model. Where ∈ is the weight coefficient of the equivalent cost term.

[0127] In order to make the unconstrained NMPC DYC model continuously approach the original problem, the present invention designs a dual-loop iterative LQR optimization method, where the dual loop refers to the outer loop and the inner loop. (1) When iterating the outer loop: calculate ∈=∈ / ρ, ρ>1 is the coefficient to be determined; (2) When iterating the inner loop: perform iterative LQR operation.

[0128] 3. Setting of initial solution

[0129] It should be noted that the auxiliary control rate u aux is a feasible solution of the unconstrained NMPC DYC model. The auxiliary control rate u can be used aux , and the initial trajectory is calculated using the vehicle lateral dynamics model. In this way, the initial solution must be a feasible solution to the optimization problem.

[0130] In summary, the steps of real-time optimization of the unconstrained NMPC DYC model by the dual-loop iterative LQR optimization method include:

[0131] (1) Initialization: Set x0 = x(t), iteration index l = 0, maximum iteration number l max , iterative termination error limit err tol ;

[0132] (2) Use auxiliary control rate u aux The vehicle lateral dynamics model calculates the control sequence and state trajectory in the prediction time domain. The state trajectory is used as the initial solution of the iterative LQR algorithm;

[0133] (3) Let l = l + 1, if l < l max or err>err tol, then go to step (4); otherwise, go to step (5); where err is the residual norm of the optimal condition of the optimization problem under the minimum principle. (4)

[0135] Outer loop: Let ∈ = ∈ / ρ and τ = 1;

[0136] Inner loop: Calculate the "backward propagation" and "forward propagation" processes in sequence; if the result of this iteration does not meet the requirements of the line search method, then τ = ητ and continue the "forward propagation" calculation; otherwise, go to step (6);

[0137] (5) Obtain updated state trajectory and control sequence;

[0138] (6) Output the first element in the control sequence to the torque distribution layer.

[0139] That is to say, during the iteration process, it is determined whether the current number of iterations is less than the maximum number of iterations or whether the residual norm is greater than the iteration termination error limit; if it is determined to be yes, an outer loop iteration is performed to calculate the weight coefficient of the equivalent cost term, and an inner loop iteration based on LQR is performed; if it is determined to be no, an updated state trajectory and control sequence are obtained.

[0140] Therefore, the present invention uses the relaxed LOG barrier equation to convert the inequality constraint into an equivalent cost, establishes an unconstrained optimization problem, and designs a double-loop iterative LQR optimization method, so that the solution of the unconstrained problem can effectively approach the solution of the original problem; at the same time, the present invention also uses the auxiliary control rate to calculate the initial trajectory to solve the problem that the iterative LQR is sensitive to the initial solution; and obtains the external yaw moment command by optimizing the NMPC DYC problem in real time.

[0141] S105, constructing a longitudinal vehicle speed proportional-integral control (PI) model based on a deviation between the expected vehicle speed and the actual vehicle speed to calculate an expected total driving torque demand;

[0142] Taking the expected vehicle speed as the target, the expression of the longitudinal vehicle speed proportional-integral control model is as follows:

[0143] T tot =K p (v x_tar -v x )+K i ∫(v x_tar -v x )dt

[0144] Among them, T tot is the expected total driving torque requirement, K p is the proportional gain coefficient, K i is the integral gain coefficient, v x_taris the expected vehicle speed, v x is the longitudinal vehicle speed and is obtained by feedback.

[0145] Therefore, the expected vehicle speed is obtained according to the driver's pedal analysis, and with the expected vehicle speed as the target, a longitudinal vehicle speed proportional-integral control model is designed regarding the deviation between the expected vehicle speed and the actual vehicle speed, which can calculate the total driving torque demand in real time.

[0146] S106: construct a torque distribution model according to the expected total driving torque demand and the additional yaw torque demand, and calculate the torque command of each wheel according to the torque distribution model to perform closed-loop control on the vehicle.

[0147] In order to achieve the expected vehicle control effect, the virtual control (total driving torque demand and external yaw torque demand) needs to be distributed to obtain the wheel hub motor torque command; that is, the distributed torque command demand meets the total driving torque demand and the external yaw torque requirements. In addition, the tire load rate needs to be minimized so that the vehicle can adapt to possible adverse driving conditions in the future. Therefore, the torque distribution model is as follows:

[0148]

[0149] Among them, the physical constraints of the wheel hub motor torque are met u TA =[T fl T fr T rl T rr ] T is a vector composed of the torque commands of each wheel, T fl is the torque command of the front left wheel hub motor, T fr is the torque command of the front right wheel hub motor, T rl is the torque command of the rear left wheel hub motor, T rr is the torque command of the rear right wheel hub motor, Ω is the weight matrix for the tire load rate, Ξ=diag(Ξ1,Ξ2) is the penalty The weight matrix of And Ω can be expressed as:

[0150]

[0151] Among them, F zfl 、F zfr 、F zrl and F zrr are the vertical forces of each wheel, d s is the wheel spacing of the vehicle axle (the present invention considers that the wheel spacing of the front and rear axles is consistent), r w is the effective radius of the wheel.

[0152] For the optimization problem of the torque distribution model, nonlinear optimization methods such as interior point method and sequential quadratic programming method can be used to solve the problem and obtain the optimal instantaneous torque command u TA , and input the command to each wheel hub motor for control.

[0153] Therefore, the present invention takes satisfying virtual control (total driving torque demand and external yaw torque demand) as a prerequisite, takes minimizing tire load rate as a goal, takes the torque command of each wheel hub motor as an optimization variable, and takes the physical limit of each wheel hub motor torque as a constraint to construct and optimize the torque distribution model; so as to obtain the torque command of each wheel and input it into the vehicle to realize closed-loop control.

[0154] Accordingly, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the above-mentioned electric vehicle control method when executing the computer program. At the same time, the present invention also discloses a computer-readable storage medium, wherein the computer program is stored thereon, wherein the steps of the above-mentioned electric vehicle control method are implemented when the computer program is executed by the processor.

[0155] In summary, the electric vehicle control method of the present invention can comprehensively improve the coordinated performance of vehicle maneuverability and stability, specifically:

[0156] (1) The present invention proposes a simple and coordinated unified yaw rate control reference design method for handling stability. Unlike conventional methods, this method does not require the calibration / fitting of characteristic points or stability boundaries by phase plane analysis in advance, but directly calculates by analytical expressions, which is easy to design and apply. The control reference is only about a single variable, yaw rate, which is convenient for the design of a reference following controller.

[0157] (2) The present invention proposes a Lyapunov-based NMPC DYC model; the model can effectively ensure closed-loop stability, improve the convergence of control reference following, and greatly improve vehicle handling performance;

[0158] (3) The present invention proposes a fast optimization method for the NMPC DYC model; based on the iterative LQR algorithm, it focuses on solving the shortcomings of its inability to directly handle inequality constraints and sensitivity to initial solutions; in view of the problem of inequality constraint processing, a relaxed LOG function method is proposed to transform the constrained optimization problem into an unconstrained problem. The expression can be numerically calculated outside the constraint range to ensure the stable operation of the algorithm; and a double-loop iterative method is designed. By continuously reducing the weight of the equivalent cost of the LOG function in the outer loop, the constructed unconstrained problem can effectively approximate the original problem, ensuring the optimality of the solution; in terms of the initial solution, the auxiliary control rate is directly used to calculate the effective initial trajectory, which solves the problem of iterative LQR being sensitive to the initial trajectory and improves the stability of iterative LQR optimization;

[0159] (4) This method can be applied to multi-axis and multi-hub motor DDEV.

[0160] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for controlling an electric vehicle, characterized in that: include: A vehicle single track model is constructed to characterize the lateral behavior of the vehicle, and a vehicle lateral dynamics model is constructed based on the vehicle single track model: Where x = [v y ,γ] T is the state variable, u=Mz_ext is the control variable, w=δ is the external input, γ is the vehicle yaw rate, m is the vehicle mass, v x is the longitudinal speed, I z is the yaw moment of inertia, l a is the distance from the front axle to the center of mass of the vehicle, l b is the distance from the rear axle to the center of mass of the vehicle, F yf is the lateral force of the front axle tire of the vehicle, F yr is the lateral force of the rear axle tire, M z_ext is the external yaw moment, δ is the front wheel angle, v y is the lateral speed of the vehicle; According to the vehicle lateral dynamics model, a front wheel steering angle constraint variable for characterizing the vehicle stability boundary is constructed, according to the front wheel steering angle constraint variable, a weight coefficient is constructed, and according to the weight coefficient, a unified yaw rate control reference for handling stability coordination is constructed, The front wheel turning angle constraint variable is expressed as: The weight coefficient W h-s It is expressed as: The unified yaw rate control reference for handling stability coordination is expressed as: c h-s =W h-s c s +(1-W h-s )c h in, is the upper limit of the front wheel turning angle, δ is the lower limit of the front wheel turning angle, μ is the road adhesion coefficient, g is the gravitational acceleration, is the upper limit of the side slip angle of the front axle tire, α f is the lower limit of the side slip angle of the front axle tire, is the upper limit of the side slip angle of the rear axle tire, αr is the lower limit of the side slip angle of the rear axle tire, θ is the coefficient to be determined, γ s is the stability reference, γ h For manipulative reference; According to the vehicle lateral dynamics model, a Lyapunov function and an auxiliary control rate based on the unified yaw rate control reference following error are constructed, a contraction constraint is constructed according to the Lyapunov function and the auxiliary control rate, and a Lyapunov-based NMPC DYC model is constructed according to the contraction constraint. The shrinkage constraint is expressed as: The Lyapunov-based NMPC DYC model is expressed as: Among them, u aux is the auxiliary control rate, V is the Lyapunov function, x * is the optimized state, u * is the optimized control quantity, φ(x N ) is the prediction time domain N p The terminal cost at time, k is the time index of the prediction time domain, L k (x k ,u k ) is the stage cost at the kth moment; The inequality constraints of the NMPC DYC model are converted into equivalent costs by relaxing the LOG barrier equation method to construct an unconstrained NMPC DYC model. The control sequence and state trajectory are calculated according to the auxiliary control rate and the vehicle lateral dynamics model. The unconstrained NMPC DYC model is optimized in real time by a double-loop iterative LQR optimization method to obtain an external yaw moment requirement. The constructed unconstrained NMPC DYC model is: Among them, Ψ = u aux , is the upper bound of the external yaw moment constraint, Mz_ext is the lower bound of the external yaw moment constraint, β ζ is the barrier function, ∈ is the weight coefficient of the equivalent cost term, The step of optimizing the unconstrained NMPC DYC model in real time by the dual-loop iterative LQR optimization method includes: during the iteration process, judging whether the current number of iterations is less than the maximum number of iterations or whether the residual norm is greater than the iteration termination error limit; if the judgment is yes, performing an outer loop iteration to calculate the weight coefficient of the equivalent cost term, and performing an inner loop iteration based on LQR; if the judgment is no, obtaining an updated state trajectory and control sequence; A longitudinal vehicle speed proportional-integral control model based on the deviation between the expected vehicle speed and the actual vehicle speed is constructed to calculate the expected total driving torque demand. The longitudinal vehicle speed proportional-integral control model is: T tot =K p (in x_tar -v x )+K i ∫(v x_tar -v x )dt Among them, T tot is the expected total driving torque requirement, K p is the proportional gain coefficient, K i is the integral gain coefficient, v x_tar is the expected vehicle speed; A torque distribution model is constructed according to the expected total driving torque demand and the additional yaw torque demand, and the torque command of each wheel is calculated according to the torque distribution model to perform closed-loop control on the vehicle. The torque distribution model is: Among them, u TA is the vector composed of the torque commands of each wheel, Ω is the weight matrix about the tire load rate, Ξ is the penalty The weight matrix, F zfl 、F zfr 、F zrl and F zrr are the vertical forces of each wheel, d s is the wheel spacing of the vehicle axle, r w is the effective radius of the wheel.

2. The electric vehicle control method according to claim 1, characterized in that: When the front wheel angle is outside the boundary, W h-s =1, when the front wheel angle is within the boundary, W h-s =0.

3. The electric vehicle control method according to claim 1, characterized in that: The vehicle lateral dynamics model uses the vehicle lateral velocity and yaw angular velocity as state quantities, an applied yaw moment as a control quantity, and the vehicle front wheel angle as an external input quantity; The longitudinal vehicle speed proportional-integral control model takes the expected vehicle speed as a target; The torque distribution model is based on the premise of meeting the total driving torque demand and the additional yaw torque demand, with the minimum tire load rate as the goal, the torque command of each hub motor as the optimization variable, and the physical limit of each hub motor torque as the constraint.

4. 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, the steps of the method according to any one of claims 1 to 3 are implemented.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.