Lateral vehicle control method and system, electronic equipment and readable medium

By constructing a two-degree-of-freedom vehicle model and an LQR control algorithm, planning the lateral trajectory and optimizing the feedback gain matrix, the problem of decoupling variable coupling in the PID controller in the lateral control of the vehicle is solved, thus achieving vehicle safety, stability and ride comfort.

CN121515980APending Publication Date: 2026-02-13DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511766440.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In existing technologies, PID controllers struggle to effectively decouple the relationships between variables when handling lateral control of vehicles, making it impossible to find the globally optimal control strategy and resulting in system performance that is difficult to approach the ideal state.

Method used

A two-degree-of-freedom vehicle model is constructed, a lateral trajectory is planned, and an LQR control algorithm is adopted. The LQR controller makes the vehicle travel along the lateral trajectory according to the two-degree-of-freedom vehicle model, including quickly straightening the heading angle and slowly controlling the return to the center line of the lane, limiting lateral acceleration and acceleration changes, and optimizing the feedback gain matrix to achieve optimal control.

Benefits of technology

It achieves lateral decoupling planning and control when a vehicle deviates from its lane, preventing the vehicle from deviating from its lane, ensuring driving safety and passenger comfort, and improving system performance through optimal control strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121515980A_ABST
    Figure CN121515980A_ABST
Patent Text Reader

Abstract

The invention provides a transverse vehicle control method, belongs to the field of automobiles, and comprises the following steps: constructing a two-degree-of-freedom vehicle model; planning a transverse track, wherein the transverse track comprises the steps of correcting the course angle of the vehicle and then controlling the vehicle to turn back to the lane center line; according to the two-degree-of-freedom vehicle model, an LQR control algorithm is adopted to enable the vehicle to run according to the transverse track, the transverse vehicle control method is based on the two-degree-of-freedom vehicle model and control of an LQR controller, and the problem that when the vehicle has lane deviation, the vehicle cannot run is solved. Planning and control of transverse decoupling at the time when the lane keeping auxiliary function intervenes are needed are used for preventing the vehicle from deviating from the lane in the vehicle driving process, and driving safety and riding comfort are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive technology, and in particular to a lateral vehicle control method, system, electronic device, and computer-readable medium. Background Technology

[0002] A PID controller is essentially a single-input single-output (SISO) controller. While multiple PID controllers can be combined to handle multivariable systems, it is difficult to handle the coupling relationships between variables, requiring complex decoupling designs in vehicle lateral control. Furthermore, it cannot find the optimal control strategy at a global level to make the system performance as close to the ideal state as possible. Summary of the Invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a lateral vehicle control method and system.

[0004] In a first aspect, the present invention provides a lateral vehicle control method, comprising:

[0005] Construct a two-degree-of-freedom vehicle model;

[0006] Plan a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling it to return to the lane centerline;

[0007] Based on the two-degree-of-freedom vehicle model, the LQR control algorithm is used to make the vehicle travel along the lateral trajectory.

[0008] In some embodiments, the two-degree-of-freedom vehicle model is constructed as follows:

[0009]

[0010] in:

[0011] matrix and input matrix They are respectively:

[0012]

[0013] Where: state vector Covers the lateral position relative to the lane centerline lateral velocity Heading angle yaw rate Control input Steering wheel angle , This is the distance from the front axle of the vehicle to its center of gravity. This is the distance from the rear axle of the vehicle to its center of gravity. Let Z be the moment of inertia of the vehicle about the Z-axis; The lateral stiffness of the vehicle's front wheels; This refers to the lateral stiffness of the vehicle's rear wheels.

[0014] In some embodiments, the lateral trajectory planning includes the steps of straightening the vehicle's heading angle and then controlling it back to the centerline of the lane, wherein the step of straightening the heading angle includes calculating the lateral acceleration at each step and adjusting the rate of change of the target lateral position if a limit is exceeded.

[0015] In some embodiments, the step of calculating the lateral acceleration at each step and adjusting the rate of change of the target lateral position if it exceeds a limit includes:

[0016] Define the target heading angle: , The coefficient of the first term of the cubic curve that is currently veering off the side lane;

[0017] Set the initial target horizontal position: ;

[0018] Set the target horizontal position: , This is the current time step;

[0019] Calculate the lateral acceleration for each step: ,like Then adjust the step size of the target's lateral position. , ,

[0020] Limiting lateral acceleration: Where: the maximum permissible acceleration is The change in the horizontal position of the target at each step is The change in the previous step was Calculate acceleration ,like Then adjust .

[0021] In some embodiments, the lateral trajectory planning includes the steps of straightening the vehicle's heading angle and then controlling the return to the lane centerline, wherein the step of controlling the return to the lane centerline includes:

[0022] Set the target horizontal position: ;

[0023] Calculate the lateral acceleration for each step: ,like Then adjust the scaling factor of the target's lateral position. , ;

[0024] Acceleration Limitation: Acceleration is calculated based on the change in the target's lateral position. If the limit is exceeded, the change in the target's lateral position is adjusted, similar to the method used during the rapid heading angle correction phase. Among these... It is the lateral position of the lane centerline; It is a lateral deviation; This is the total number of time steps; It is the number of time steps to quickly correct the heading angle; It is the current time step.

[0025] In some embodiments, the step of employing an LQR control algorithm to make the vehicle travel along the lateral trajectory based on the two-degree-of-freedom vehicle model includes:

[0026] Based on the two-degree-of-freedom vehicle model, an LQR controller is used to obtain a performance index that minimizes a quadratic form, which includes the weighted sum of squares of the state error and the control input.

[0027] The optimal feedback gain matrix is ​​obtained by solving the continuous-time algebraic Riccati equation.

[0028] The steering wheel angle value is obtained based on the feedback gain matrix.

[0029] In some embodiments, minimizing a quadratic performance metric is: ,in, The state weight matrix is... To control the input weight matrix, ;

[0030] Solving the continuous-time algebraic Riccati equations includes: , It is a positive definite matrix, based on the obtained... Calculate the optimal feedback gain matrix , , The matrix will be used to calculate the control input;

[0031] Based on the current state Calculate the state error vector based on the target state corresponding to the trajectory point. :

[0032]

[0033] This represents the error in the lateral position y; lateral velocity The error, The target lateral velocity; For heading angle The error; yaw rate The error, Target yaw rate ;

[0034] According to the feedback gain matrix Calculate controller output When the lateral acceleration a x Exceed At that time, the control output u′= is adjusted. The output u′ is the steering wheel angle value.

[0035] In a first aspect, the present invention provides a lateral vehicle control system, comprising:

[0036] Model building unit, used to build a two-degree-of-freedom vehicle model;

[0037] A trajectory planning unit is used to plan a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling the return to the lane centerline.

[0038] The output unit is used to use the LQR control algorithm to make the vehicle travel along the lateral trajectory based on the two-degree-of-freedom vehicle model.

[0039] Thirdly, the present invention also provides an electronic device, comprising:

[0040] One or more processors;

[0041] Memory, used to store one or more programs;

[0042] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods.

[0043] Fourthly, the present invention also provides a computer-readable medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps in any of the methods described.

[0044] The lateral vehicle control method provided by this invention constructs a two-degree-of-freedom vehicle model; plans a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling it back to the lane centerline; and, based on the two-degree-of-freedom vehicle model, employs an LQR control algorithm to make the vehicle travel along the lateral trajectory. This lateral vehicle control method, based on a two-degree-of-freedom vehicle model and an LQR controller, solves the problem of lateral decoupling planning and control when lane keeping assist needs to intervene after a vehicle has already deviated from its lane. It is used to prevent vehicles from deviating from their lanes during driving, ensuring driving safety and passenger comfort. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the steps of an embodiment of the lateral vehicle control method of the present invention;

[0046] Figure 2 This is a schematic diagram illustrating the principle of an embodiment of the trajectory planning of the present invention, which involves two stages.

[0047] Figure 3 This is a schematic diagram of an embodiment of the lateral vehicle control system of the present invention;

[0048] Figure 4 This is a schematic diagram of the structure of an embodiment of the electronic device of the present invention. Detailed Implementation

[0049] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0050] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.

[0051] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0052] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0053] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0054] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.

[0055] While multivariable systems can be handled by combining multiple PID controllers in related technologies, managing the coupling relationships between variables is challenging, requiring complex decoupling designs in vehicle lateral control. Furthermore, it's not possible to find the optimal control strategy globally to make the system performance as close to the ideal state as possible.

[0056] To address at least one of the technical problems existing in the aforementioned related technologies, the present invention provides a lateral vehicle control method.

[0057] Figure 1 A flowchart of a lateral vehicle control method provided in an embodiment of the present invention includes the following steps:

[0058] Step S10: Construct a two-degree-of-freedom vehicle model.

[0059] As can be understood, a two-degree-of-freedom vehicle model simplifies the vehicle to a model that can only perform lateral and yaw movements on a plane. It uses Newton's second law and the angular momentum theorem to describe the vehicle's dynamic characteristics. The state vector x encompasses the lateral position y relative to the lane centerline and the lateral velocity v. y The heading angle φ and yaw rate r are used, and the control input u is the steering wheel angle σ.

[0060] In this embodiment, the two-degree-of-freedom vehicle model is constructed as follows:

[0061] in: ;

[0062] System Matrix and input matrix They are respectively:

[0063]

[0064] in: This is the distance from the front axle of the vehicle to its center of gravity. This is the distance from the rear axle of the vehicle to its center of gravity. Let Z be the moment of inertia of the vehicle about the Z-axis; The lateral stiffness of the vehicle's front wheels; This refers to the lateral stiffness of the vehicle's rear wheels.

[0065] It is understood that this embodiment constructs a two-degree-of-freedom vehicle model and establishes differential equations describing the lateral and yaw motion of the vehicle based on the vehicle's physical parameters (mass m, moment of inertia Iz, wheelbase lf, lr, tire lateral stiffness Cf, Cr), i.e., the state-space equation ẋ=Ax+Bu.

[0066] This model captures the two most important degrees of freedom in a vehicle's lateral motion (lateral translation and yaw rotation), clearly revealing how the front wheel steering angle input (σ) affects the vehicle's lateral position (y), heading angle (φ), and other states. It clarifies that the vehicle is a complex, coupled dynamic system (where lateral and yaw motions influence each other).

[0067] The controller can use this model to predict how the vehicle will move in the near future, based on the current state and control inputs.

[0068] Step S20: Plan the lateral trajectory, which includes straightening the vehicle's heading angle and then controlling the return to the center line of the lane.

[0069] Please see Figure 2 The trajectory planning is divided into two stages. First, the heading angle is quickly corrected, and then the vehicle is slowly controlled back to the center line of the lane.

[0070] During the rapid heading angle adjustment phase, the target heading angle is set to C1 of the current lane line coefficient, and the target lateral position is calculated based on the current heading angle and the distance from the rear axle to the center of mass.

[0071] During the gradual control phase back to the lane centerline, the target lateral position gradually approaches the lane centerline. Simultaneously, to ensure control comfort, lateral acceleration and acceleration limits are incorporated into the planning process.

[0072] During the rapid heading angle correction phase, lateral acceleration is calculated at each step. If it exceeds the limit, the rate of change of the target lateral position is adjusted. The same process is applied during the gradual return to the lane centerline phase. Acceleration is limited indirectly by restricting the amount of change in the target lateral position, ensuring vehicle comfort during movement.

[0073] Specifically, during the phase of rapidly correcting the heading angle, the implementation method is as follows:

[0074] Target heading angle: , The coefficient of the first term of the cubic curve that is currently veering off the side lane;

[0075] Initial target lateral position: ;

[0076] Target lateral position: , This is the current time step;

[0077] Calculate the lateral acceleration for each step: ,like Then adjust the step size of the target's lateral position. ,For example ,

[0078] Limiting lateral acceleration: The maximum permissible acceleration is The change in the horizontal position of the target at each step is The change in the previous step was Calculate acceleration ,

[0079] like Then adjust ,like ,in This is a sign function. By controlling the rate of change of the target's lateral position, it avoids excessively rapid changes in acceleration from affecting vehicle stability and comfort, ensuring smooth overall vehicle movement during the rapid correction of the heading angle.

[0080] Specifically, the phase of slowly controlling the center line of the return lane:

[0081] Target lateral position: ;

[0082] Calculate the lateral acceleration for each step: ,like Then adjust the scaling factor of the target's lateral position. , ;

[0083] Acceleration Limitation: Acceleration is calculated based on the change in the target's lateral position. If the limit is exceeded, the change in the target's lateral position is adjusted, similar to the method used during the rapid heading angle correction phase. Among these... It is the lateral position of the lane centerline; It is a lateral deviation; This is the total number of time steps; It is the number of time steps to quickly correct the heading angle; It is the current time step.

[0084] It can be understood that this embodiment plans a path from the current deviation state (such as deviation from the lane center or the existence of a heading angle error) back to the target state (lane center, heading alignment). Specifically, it is divided into two stages:

[0085] Adjust the vehicle's "attitude" by straightening the heading angle to align it with the road direction.

[0086] Control the return lane centerline: With the heading basically correct, move laterally back to the center of the lane.

[0087] In this embodiment, the "turn around first, then return" strategy closely aligns with the natural operation of a human driver. Compared to directly "diagonally" veer back to the centerline, this step-by-step approach generates less lateral acceleration, resulting in a more comfortable and natural driving experience. Furthermore, decomposing the complex lateral control problem into two relatively independent sub-objectives (controlling the heading and controlling the lateral position) reduces the difficulty of control and makes the control process more organized.

[0088] Understandably, the LQR controller needs a reference trajectory. The trajectory generated in this step is the target that the LQR needs to track, providing the controller with the desired lateral position y_des, desired heading angle φ_des, and other values ​​at each time step.

[0089] Step S30: Based on the two-degree-of-freedom vehicle model, the LQR control algorithm is used to make the vehicle travel along the lateral trajectory.

[0090] In this embodiment, the step of using the LQR control algorithm to make the vehicle travel along the lateral trajectory according to the two-degree-of-freedom vehicle model includes: using the LQR controller according to the two-degree-of-freedom vehicle model to obtain a performance index that minimizes a quadratic form, which includes the weighted sum of squares of the state error and the control input; obtaining the optimal feedback gain matrix by solving the continuous-time algebraic Riccati equation; and obtaining the steering wheel angle value according to the feedback gain matrix.

[0091] Furthermore, the expression for minimizing a quadratic performance index is:

[0092]

[0093] in, The state weight matrix is... To control the input weight matrix. For the current trajectory planning, and The settings need to consider the needs of both the rapid straightening of the heading angle and the slow return to the centerline of the lane.

[0094] It should be noted that during the rapid heading adjustment phase, due to the need for quick heading angle adjustments, the heading angle and yaw rate can be appropriately increased. The weights in .

[0095] in and The settings are relatively large to emphasize control over the heading angle and yaw rate. At the same time, to avoid excessive control input leading to vehicle instability, It needs to be set properly to ensure that the control input (steering wheel angle) is within a reasonable range.

[0096] Furthermore, during the phase of slowly controlling the centerline of the return lane, controlling the lateral position deviation becomes even more critical. At this point, the lateral position can be increased. The weight in the middle, that is, appropriately increase The value is adjusted to more effectively bring the vehicle back to the center line of the lane.

[0097] Specifically, by solving the continuous-time algebraic Riccati equation (CARE): , to obtain the matrix . It is a positive definite matrix, which is closely related to the stability and performance of the system.

[0098] Based on the obtained Calculate the optimal feedback gain matrix : The K matrix will be used to calculate the control input, enabling the system to operate along the desired trajectory.

[0099] Calculate the controller output: based on the current state Calculate the state error vector based on the target state corresponding to the trajectory point (the corresponding target heading angle and lateral position during the rapid heading angle correction phase, and the lane centerline position and other related target states during the slow control back to the lane centerline phase). :

[0100]

[0101] in This represents the error in the lateral position y; lateral velocity The error, The target lateral velocity; For heading angle The error; yaw rate The error, Target yaw rate .

[0102] Then, based on the feedback gain matrix... Calculate controller output : ;

[0103] Furthermore, considering comfort control, the lateral acceleration is limited. When the lateral acceleration a... x Exceed At that time, among them Adjust the control output u′= This output u′ is the steering wheel angle value. This is the steering wheel angle value.

[0104] As can be understood, this embodiment designs an LQR controller based on the two-degree-of-freedom model established in the first step. The LQR finds the optimal state feedback control law u = -Kx by solving an optimization problem. The gain matrix K is calculated by minimizing a quadratic performance index that includes the state error and the magnitude of the control input.

[0105] Understandably, the core advantage of LQR lies in its "optimal" nature. It can simultaneously and coordinately handle all state variables (lateral position error, lateral velocity, heading angle error, yaw rate). For example, when both position and heading deviations exist simultaneously, LQR will calculate an optimal front wheel steering angle that can most effectively reduce both deviations at the same time, rather than sacrificing one for the other.

[0106] Furthermore, by adjusting the weight matrices Q and R, designers can intuitively weigh the trade-offs. Tracking accuracy (higher Q-weight) allows the vehicle to track its trajectory faster and more precisely. Control consumption and smoothness (higher R-weight) limit the range and speed of steering wheel rotation, making control actions smoother, improving comfort, and reducing actuator wear.

[0107] Furthermore, as an optimal state feedback controller, LQR typically exhibits better stability and robustness to small changes in model parameters compared to a simple PID controller.

[0108] The lateral vehicle control method provided by this invention constructs a two-degree-of-freedom vehicle model; plans a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling it back to the lane centerline; and, based on the two-degree-of-freedom vehicle model, employs an LQR control algorithm to make the vehicle travel along the lateral trajectory. This lateral vehicle control method, based on a two-degree-of-freedom vehicle model and an LQR controller, solves the problem of lateral decoupling planning and control when lane keeping assist needs to intervene after a vehicle has already deviated from its lane. It is used to prevent vehicles from deviating from their lanes during driving, ensuring driving safety and passenger comfort.

[0109] Furthermore, the entire process forms a complete closed loop from modeling and planning to control, with the final control effect being the optimal solution under a defined performance metric (the cost function of LQR). It can accurately track the planned trajectory, stabilizing the vehicle in the center of the lane. Through smooth control input (steering wheel angle), the vehicle's trajectory is natural, without violent oscillations, greatly improving ride comfort. It can also quickly and smoothly eliminate initial lateral and directional deviations.

[0110] This method has been widely validated in autonomous driving and advanced driver assistance systems (LKA, LCC). By establishing a link between model prediction and optimal control, it provides a theoretically and practically reliable solution, and is a classic and effective method for achieving high-quality lateral automatic control.

[0111] Please see Figure 3 The present invention also provides a lateral vehicle control system. Applied to the lateral vehicle control method provided in the above embodiments, it specifically includes:

[0112] The model building unit is used to build a two-degree-of-freedom vehicle model.

[0113] As can be understood, a two-degree-of-freedom vehicle model simplifies the vehicle to a model that can only perform lateral and yaw movements on a plane. It uses Newton's second law and the angular momentum theorem to describe the vehicle's dynamic characteristics. The state vector x encompasses the lateral position y relative to the lane centerline and the lateral velocity v. y The heading angle φ and yaw rate r are used, and the control input u is the steering wheel angle σ.

[0114] In this embodiment, the two-degree-of-freedom vehicle model is constructed as follows:

[0115] in: ;

[0116] System Matrix and input matrix They are respectively:

[0117]

[0118] in: This is the distance from the front axle of the vehicle to its center of gravity. This is the distance from the rear axle of the vehicle to its center of gravity. Let Z be the moment of inertia of the vehicle about the Z-axis; The lateral stiffness of the vehicle's front wheels; This refers to the lateral stiffness of the vehicle's rear wheels.

[0119] It is understood that this embodiment constructs a two-degree-of-freedom vehicle model and establishes differential equations describing the lateral and yaw motion of the vehicle based on the vehicle's physical parameters (mass m, moment of inertia Iz, wheelbase lf, lr, tire lateral stiffness Cf, Cr), i.e., the state-space equation ẋ=Ax+Bu.

[0120] This model captures the two most important degrees of freedom in a vehicle's lateral motion (lateral translation and yaw rotation), clearly revealing how the front wheel steering angle input (σ) affects the vehicle's lateral position (y), heading angle (φ), and other states. It clarifies that the vehicle is a complex, coupled dynamic system (where lateral and yaw motions influence each other).

[0121] The controller can use this model to predict how the vehicle will move in the near future, based on the current state and control inputs.

[0122] The trajectory planning unit is used to plan a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling the return to the center line of the lane.

[0123] In this embodiment, trajectory planning is divided into two stages: first, the heading angle is quickly corrected, and then the vehicle is slowly controlled back to the center line of the lane.

[0124] During the rapid heading angle adjustment phase, the target heading angle is set to C1 of the current lane line coefficient, and the target lateral position is calculated based on the current heading angle and the distance from the rear axle to the center of mass.

[0125] During the gradual control phase back to the lane centerline, the target lateral position gradually approaches the lane centerline. Simultaneously, to ensure control comfort, lateral acceleration and acceleration limits are incorporated into the planning process.

[0126] During the rapid heading angle correction phase, lateral acceleration is calculated at each step. If it exceeds the limit, the rate of change of the target lateral position is adjusted. The same process is applied during the gradual return to the lane centerline phase. Acceleration is limited indirectly by restricting the amount of change in the target lateral position, ensuring vehicle comfort during movement.

[0127] Specifically, during the phase of rapidly correcting the heading angle, the implementation method is as follows:

[0128] Target heading angle: , The coefficient of the first term of the cubic curve that is currently veering off the side lane;

[0129] Initial target lateral position: ;

[0130] Target lateral position: , This is the current time step;

[0131] Calculate the lateral acceleration for each step: ,like Then adjust the step size of the target's lateral position. ,For example ,

[0132] Limiting lateral acceleration: The maximum permissible acceleration is The change in the horizontal position of the target at each step is The change in the previous step was Calculate acceleration ,

[0133] like Then adjust ,like ,in This is a sign function. By controlling the rate of change of the target's lateral position, it avoids excessively rapid changes in acceleration from affecting vehicle stability and comfort, ensuring smooth overall vehicle movement during the rapid correction of the heading angle.

[0134] Specifically, the phase of slowly controlling the center line of the return lane:

[0135] Target lateral position: ;

[0136] Calculate the lateral acceleration for each step: ,like Then adjust the scaling factor of the target's lateral position. ,

[0137] Acceleration Limitation: Acceleration is calculated based on the change in the target's lateral position. If the limit is exceeded, the change in the target's lateral position is adjusted, similar to the method used during the rapid heading angle correction phase. Among these... It is the lateral position of the lane centerline; It is a lateral deviation; This is the total number of time steps; It is the number of time steps to quickly correct the heading angle; It is the current time step.

[0138] It can be understood that this embodiment plans a path from the current deviation state (such as deviation from the lane center or the existence of a heading angle error) back to the target state (lane center, heading alignment). Specifically, it is divided into two stages:

[0139] Adjust the vehicle's "attitude" by straightening the heading angle to align it with the road direction.

[0140] Control the return lane centerline: With the heading basically correct, move laterally back to the center of the lane.

[0141] In this embodiment, the "turn around first, then return" strategy closely aligns with the natural operation of a human driver. Compared to directly "diagonally" veer back to the centerline, this step-by-step approach generates less lateral acceleration, resulting in a more comfortable and natural driving experience. Furthermore, decomposing the complex lateral control problem into two relatively independent sub-objectives (controlling the heading and controlling the lateral position) reduces the difficulty of control and makes the control process more organized.

[0142] Understandably, the LQR controller needs a reference trajectory. The trajectory generated in this step is the target that the LQR needs to track, providing the controller with the desired lateral position y_des, desired heading angle φ_des, and other values ​​at each time step.

[0143] The output unit is used to employ the LQR control algorithm based on the two-degree-of-freedom vehicle model to make the vehicle travel along the lateral trajectory.

[0144] In this embodiment, the step of using the LQR control algorithm to make the vehicle travel along the lateral trajectory according to the two-degree-of-freedom vehicle model includes: using the LQR controller according to the two-degree-of-freedom vehicle model to obtain a performance index that minimizes a quadratic form, which includes the weighted sum of squares of the state error and the control input; obtaining the optimal feedback gain matrix by solving the continuous-time algebraic Riccati equation; and obtaining the steering wheel angle value according to the feedback gain matrix.

[0145] Furthermore, the expression for minimizing a quadratic performance index is:

[0146]

[0147] in, The state weight matrix is... To control the input weight matrix. For the current trajectory planning, and The settings need to consider the needs of both the rapid straightening of the heading angle and the slow return to the centerline of the lane.

[0148] It should be noted that during the rapid heading adjustment phase, due to the need for quick heading angle adjustments, the heading angle and yaw rate can be appropriately increased. The weights in .

[0149] in and The settings are relatively large to emphasize control over the heading angle and yaw rate. At the same time, to avoid excessive control input leading to vehicle instability, It needs to be set properly to ensure that the control input (steering wheel angle) is within a reasonable range.

[0150] Furthermore, during the phase of slowly controlling the centerline of the return lane, controlling the lateral position deviation becomes even more critical. At this point, the lateral position can be increased. The weight in the middle, that is, appropriately increase The value is adjusted to more effectively bring the vehicle back to the center line of the lane.

[0151] Specifically, by solving the continuous-time algebraic Riccati equation (CARE): , to obtain the matrix . It is a positive definite matrix, which is closely related to the stability and performance of the system.

[0152] Based on the obtained Calculate the optimal feedback gain matrix : The K matrix will be used to calculate the control input, enabling the system to operate along the desired trajectory.

[0153] Calculate the controller output: based on the current state Calculate the state error vector based on the target state corresponding to the trajectory point (the corresponding target heading angle and lateral position during the rapid heading angle correction phase, and the lane centerline position and other related target states during the slow control back to the lane centerline phase). :

[0154]

[0155] in, This represents the error in the lateral position y; lateral velocity The error, The target lateral velocity; For heading angle The error; yaw rate The error, Target yaw rate .

[0156] Then, based on the feedback gain matrix... Calculate controller output : .

[0157] Furthermore, considering comfort control, the lateral acceleration is limited. When the lateral acceleration a... x Exceed At that time, and Adjust the control output u′= This output u′ is the steering wheel angle value. This is the steering wheel angle value.

[0158] As can be understood, this embodiment designs an LQR controller based on the two-degree-of-freedom model established in the first step. The LQR finds the optimal state feedback control law u = -Kx by solving an optimization problem. The gain matrix K is calculated by minimizing a quadratic performance index that includes the state error and the magnitude of the control input.

[0159] Understandably, the core advantage of LQR lies in its "optimal" nature. It can simultaneously and coordinately handle all state variables (lateral position error, lateral velocity, heading angle error, yaw rate). For example, when both position and heading deviations exist simultaneously, LQR will calculate an optimal front wheel steering angle that can most effectively reduce both deviations at the same time, rather than sacrificing one for the other.

[0160] Furthermore, by adjusting the weight matrices Q and R, designers can intuitively weigh the trade-offs. Tracking accuracy (higher Q-weight) allows the vehicle to track its trajectory faster and more precisely. Control consumption and smoothness (higher R-weight) limit the range and speed of steering wheel rotation, making control actions smoother, improving comfort, and reducing actuator wear.

[0161] Furthermore, as an optimal state feedback controller, LQR typically exhibits better stability and robustness to small changes in model parameters compared to a simple PID controller.

[0162] The lateral vehicle control method provided by this invention constructs a two-degree-of-freedom vehicle model; plans a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling it back to the lane centerline; and, based on the two-degree-of-freedom vehicle model, employs an LQR control algorithm to make the vehicle travel along the lateral trajectory. This lateral vehicle control method, based on a two-degree-of-freedom vehicle model and an LQR controller, solves the problem of lateral decoupling planning and control when lane keeping assist needs to intervene after a vehicle has already deviated from its lane. It is used to prevent vehicles from deviating from their lanes during driving, ensuring driving safety and passenger comfort.

[0163] Furthermore, the entire process forms a complete closed loop from modeling and planning to control, with the final control effect being the optimal solution under a defined performance metric (the cost function of LQR). It can accurately track the planned trajectory, stabilizing the vehicle in the center of the lane. Through smooth control input (steering wheel angle), the vehicle's trajectory is natural, without violent oscillations, greatly improving ride comfort. It can also quickly and smoothly eliminate initial lateral and directional deviations.

[0164] This method has been widely validated in autonomous driving and advanced driver assistance systems (LKA, LCC). By establishing a link between model prediction and optimal control, it provides a theoretically and practically reliable solution, and is a classic and effective method for achieving high-quality lateral automatic control.

[0165] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 4 As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement any of the lateral vehicle control methods described in the above embodiments; the one or more I / O interfaces 103 are connected between the processors and the memory, configured to enable information interaction between the processors and the memory.

[0166] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).

[0167] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.

[0168] In some embodiments, the one or more processors 101 include a field-programmable gate array.

[0169] This invention also provides a computer-readable medium. The computer-readable medium stores a computer program, which, when executed by a processor, implements the steps of any of the lateral vehicle control methods described in the above embodiments. The computer-readable storage medium may be volatile or non-volatile.

[0170] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described lateral vehicle control method.

[0171] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0172] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0173] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0174] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0175] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0176] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0177] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0178] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0180] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.

Claims

1. A lateral vehicle control method, characterized in that, It includes: Construct a two-degree-of-freedom vehicle model; Plan a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling it to return to the lane centerline; Based on the two-degree-of-freedom vehicle model, the LQR control algorithm is used to make the vehicle travel along the lateral trajectory.

2. The lateral vehicle control method according to claim 1, characterized in that, In the step of constructing a two-degree-of-freedom vehicle model, the two-degree-of-freedom vehicle model is as follows: in: ; matrix and input matrix They are respectively: Where: state vector Covers the lateral position relative to the lane centerline lateral velocity Heading angle yaw rate Control input Steering wheel angle , This is the distance from the front axle of the vehicle to its center of gravity. This is the distance from the rear axle of the vehicle to its center of gravity. Let Z be the moment of inertia of the vehicle about the Z-axis. The lateral stiffness of the vehicle's front wheels; This refers to the lateral stiffness of the vehicle's rear wheels.

3. The lateral vehicle control method according to claim 1, characterized in that, In planning a lateral trajectory, the lateral trajectory includes the steps of straightening the vehicle's heading angle and then controlling it back to the center line of the lane, wherein: the step of straightening the heading angle includes calculating the lateral acceleration at each step, and adjusting the rate of change of the target lateral position if it exceeds the limit.

4. The lateral vehicle control method according to claim 3, characterized in that, The step of calculating the lateral acceleration at each step and adjusting the rate of change of the target's lateral position if it exceeds the limit includes: Define the target heading angle: , The coefficient of the first term of the cubic curve that is currently veering off the side lane; Set the initial target horizontal position: ; Set the target horizontal position: , This is the current time step; Calculate the lateral acceleration for each step: ,like Then adjust the step size of the target's lateral position. , , Limiting lateral acceleration: where the maximum permissible acceleration is... The change in the horizontal position of the target at each step is The change in the previous step was Calculate acceleration ,like Then adjust .

5. The lateral vehicle control method according to claim 1, characterized in that, In planning a lateral trajectory, which includes the steps of straightening the vehicle's heading angle and then controlling the return to the lane centerline, the step of controlling the return to the lane centerline includes: Set the target horizontal position: ; Calculate the lateral acceleration for each step: ,like Then adjust the scaling factor of the target's lateral position. , ; Acceleration Limitation: Acceleration is calculated based on the change in the target's lateral position. If the limit is exceeded, the change in the target's lateral position is adjusted, similar to the method used during the rapid heading angle correction phase. Among these... It is the lateral position of the lane centerline; It is a lateral deviation; This is the total number of time steps; It is the number of time steps to quickly correct the heading angle; It is the current time step.

6. The lateral vehicle control method according to claim 1, characterized in that, The step of using the LQR control algorithm to make the vehicle travel along the lateral trajectory based on the two-degree-of-freedom vehicle model includes: Based on the two-degree-of-freedom vehicle model, an LQR controller is used to obtain a performance index that minimizes a quadratic form, which includes the weighted sum of squares of the state error and the control input. The optimal feedback gain matrix is ​​obtained by solving the continuous-time algebraic Riccati equation. The steering wheel angle value is obtained based on the feedback gain matrix.

7. The lateral vehicle control method according to claim 6, characterized in that, The performance index for minimizing a quadratic form is: ,in, The state weight matrix is... To control the input weight matrix, ; Solving the continuous-time algebraic Riccati equations includes: , It is a positive definite matrix, based on the obtained... Calculate the optimal feedback gain matrix , , The matrix will be used to calculate the control input; Based on the current state Calculate the state error vector based on the target state corresponding to the trajectory point. : This represents the error in the lateral position y; lateral velocity The error, The target lateral velocity; For heading angle The error; yaw rate The error, Target yaw rate ; According to the feedback gain matrix Calculate controller output When lateral acceleration Exceed At that time, the control output u′= is adjusted. The output u′ is the steering wheel angle value.

8. A lateral vehicle control system, characterized in that, include: Model building unit, used to build a two-degree-of-freedom vehicle model; A trajectory planning unit is used to plan a lateral trajectory, which includes straightening the vehicle's heading angle and then controlling the return to the lane centerline. The output unit is used to use the LQR control algorithm to make the vehicle travel along the lateral trajectory based on the two-degree-of-freedom vehicle model.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 7.

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