Lane keeping control method and system based on optimization strategy, equipment and vehicle
By constructing an optimal control model and a linear quadratic regulator, an optimization strategy is generated and deployed in the vehicle MCU controller, which solves the response speed and stability problems of the lane keeping control algorithm in L2 autonomous driving and achieves more efficient vehicle trajectory tracking. ability.
Patent Information
- Application Number
- CN202410999320.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-10-15
AI Technical Summary
Existing technology In the field of L2 autonomous driving, the on-board MCU has poor computing power and strong real-time performance, which results in the PID controller having fast calculation speed but high parameter accuracy requirements during lane keeping. It also requires cumbersome pole configuration under different working conditions, which cannot be satisfied. The need for fast response and stability.
A lane keeping control method based on optimization strategy is adopted. By obtaining the state deviation between the vehicle model and the desired trajectory, an optimization control model is constructed, a linear quadratic regulator is used to optimize the objective function, an optimization strategy is generated, and it is deployed in In the vehicle MCU controller, the parameter adjustment of the steering wheel angle is realized.
It improves the rapid response performance and stability of the vehicle when maintaining lanes, reduces the small jitter of the traditional algorithm, simplifies the parameter configuration process, and adapts to the needs of different working conditions.
Smart Images

Figure CN118770255A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of autonomous driving, and in particular relates to a lane keeping control method and system, equipment and vehicle based on an optimization strategy. Background Art
[0002] The present invention relates to the lateral control direction in the field of L2 autonomous driving, and its purpose is to design a control algorithm based on optimization strategy to ensure the stability and rapid response during lane keeping in view of the characteristics of poor computing power and strong real-time performance of the vehicle-mounted MCU. During the autonomous driving process, the VDC controller will calculate the corresponding steering wheel angle according to the lane line information and the current vehicle information, and send it to the EPS controller to achieve the vehicle staying centered on the road line. At present, the mainstream control method in the market is the PID controller, which has fast calculation and simple algorithm, but has high requirements for parameter accuracy. Moreover, under normal circumstances, the control parameters of the vehicle under different conditions are obviously different, and the corresponding poles need to be configured according to the corresponding working conditions. The parameter adjustment is troublesome and can no longer meet people's requirements, and it is urgently needed to be improved. Summary of the invention
[0003] The purpose of the present invention is to provide a lane keeping control method and system, device and vehicle based on an optimization strategy, aiming at the problems pointed out in the background technology and solving the defects of the prior art.
[0004] The present invention provides the following scheme:
[0005] In a first aspect, the present application provides a lane keeping control method based on an optimization strategy, the method comprising:
[0006] Obtaining the state deviation between the pre-established vehicle model and the target trajectory point on the expected trajectory; when the state deviation exceeds a preset range threshold, treating it as a vehicle state error;
[0007] An optimization control model is constructed for the vehicle state error, the objective function of the optimization control model is determined with the minimization of the vehicle state error as a constraint, and the objective function is optimized by using a linear quadratic regulator;
[0008] Based on the optimization result of the objective function, the current speed state of the vehicle is discretized to obtain a discrete Raccati equation; the discrete Raccati equation is iteratively solved to generate an optimization strategy; the optimization strategy includes: an LQR control coefficient corresponding to the current speed, and a speed state error feedback amount and a front wheel steering angle of the vehicle corresponding to the LQR control coefficient;
[0009] The optimization strategy is deployed in the vehicle-mounted MCU controller, so that the vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque.
[0010] Optionally, the pre-established vehicle model is calculated based on the following tire dynamics equation:
[0011]
[0012] Where y is the lateral position of the vehicle, is the vehicle lateral velocity, is the vehicle lateral acceleration, φ is the vehicle yaw angle, is the vehicle yaw angular velocity, is the vehicle's yaw angular acceleration, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the vehicle's front wheel to the center of mass, b is the axial length from the vehicle's rear wheel to the center of mass, I is the vehicle's moment of inertia, and δ is the turning angle of the vehicle's front wheel.
[0013] Optionally, the vehicle state error is determined by the following formula:
[0014]
[0015] in, They represent the lateral position error, lateral velocity error, lateral angle error, and lateral angular velocity error between the vehicle and the reference road line in the Frenet coordinate system. is the rate of change of the road line angle, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the front wheel to the center of mass, b is the axial length from the rear wheel to the center of mass, and I is the vehicle's moment of inertia.
[0016] Optionally, the vehicle state error is converted into a space vector and an optimization control model is established, as shown in the following formula:
[0017]
[0018] Among them, e rr is the error state quantity, A is the error state quantity coefficient, B is the vehicle front wheel steering angle coefficient, and C is the road line angle change rate coefficient.
[0019] Optionally, the error state quantity coefficient is calculated by the following formula:
[0020]
[0021] Among them, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the front wheel to the center of mass, b is the axial length from the rear wheel to the center of mass, and I is the vehicle's moment of inertia.
[0022] Optionally, the objective function is optimized by the following formula:
[0023]
[0024] Among them, J is the objective function, e rr is the error state quantity, Q is the weight of the objective function for the error state quantity, R is the input weight, and δ is the steering angle of the front wheel of the vehicle.
[0025] Optionally, the iteratively solving the Raccati equation to generate an optimization strategy includes:
[0026] Determine whether the Raccati equation has been iterated to the maximum number of times by querying the discrete table. If it has been iterated to the maximum number of times, output the LQR control coefficient at the current vehicle speed. Otherwise, read the intermediate variable covariance matrix of the corresponding vehicle speed segment in the discrete table; iterate the Raccati equation based on the intermediate variable covariance matrix;
[0027] When it is detected that the current Raccati equation has been iterated to the maximum number of times, the LQR control coefficient of the current speed segment in the discrete table is updated; otherwise, the covariance matrix of the intermediate variables in the current speed segment in the discrete table is updated, and the LQR control coefficient of the speed closest to the current vehicle speed that has been successfully iterated is output, as well as the vehicle speed state error feedback amount and the front wheel steering angle of the vehicle corresponding to the LQR control coefficient.
[0028] In a second aspect, the present application provides a lane keeping control system based on an optimization strategy, comprising:
[0029] A state error acquisition module is used to obtain the state deviation between the pre-established vehicle model and the target trajectory point on the expected trajectory; when the state deviation exceeds a preset range threshold, it is used as the vehicle state error;
[0030] A target determination module is used to construct an optimization control model for the vehicle state error, determine the objective function of the optimization control model with the minimization of the vehicle state error as a constraint, and optimize the objective function using a linear quadratic regulator;
[0031] An iterative optimization module is used to discretize the current speed state of the vehicle based on the optimization result of the objective function to obtain a discrete Raccati equation; iteratively solve the discrete Raccati equation to generate an optimization strategy; the optimization strategy includes: an LQR control coefficient corresponding to the current speed, and a speed state error feedback amount and a front wheel steering angle of the vehicle corresponding to the LQR control coefficient;
[0032] The control module is used to deploy the optimization strategy in the vehicle-mounted MCU controller, so that the vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque.
[0033] In a third aspect, the present application provides an electronic device comprising: a processor, a communication interface, a memory and a bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods described in the first aspect.
[0034] In a third aspect, the present application provides a vehicle, comprising:
[0035] An electronic device, used to implement the steps of any one of the methods described in the first aspect;
[0036] A processor, wherein the processor runs a program, and when the program runs, the steps of any one of the method described in the first aspect are executed from the data output by the electronic device;
[0037] A storage medium is used to store a program, and when the program is run, it executes the steps of any one of the methods described in the first aspect for data output from the electronic device.
[0038] Compared with the prior art, the present invention has the following advantages:
[0039] The present invention firstly models the tire dynamics equation according to the vehicle parameters to obtain the vehicle model of the target vehicle model, thereby eliminating the cumbersome steps of pole configuration according to different working conditions required by the traditional PID method.
[0040] Secondly, in order to optimize the calculation process and achieve the purpose of real-time optimization calculation. Aiming at the problem of low computing power of the vehicle-mounted MCU, the present invention defines the vehicle state error for the state deviation between the pre-established vehicle model and the target trajectory point on the expected trajectory, and determines the objective function of the optimization control model with the minimization of the vehicle state error as a constraint, and at the same time, according to the linear quadratic optimization control theory, a linear quadratic regulator is used to optimize the objective function; based on the optimization result of the objective function, the current speed state of the vehicle is discretized to obtain a discrete Raccati equation; the discrete Raccati equation is iteratively solved to generate an optimization strategy; the optimization strategy includes an LQR control coefficient corresponding to the current vehicle speed, and a speed state error feedback amount corresponding to the LQR control coefficient and the front wheel steering angle of the vehicle.
[0041] Finally, the solution of the present invention can apply the formulated optimization strategy to the vehicle-mounted MCU controller by means of variable discretization, iterative optimization, and table query, so that the vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque, thereby improving the rapid response performance and stability of the vehicle when holding.
[0042] Compared with the traditional PID algorithm, the present invention improves the rapidity of vehicle response, while reducing the small-amplitude jitter of the traditional algorithm, thereby improving the stability of the vehicle during lane keeping. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 It is a flow chart of the lane keeping control method based on the optimization strategy.
[0045] Figure 2 It is an architectural diagram of the lane keeping control system based on the optimization strategy.
[0046] Figure 3 It is a structural diagram of an electronic device. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The lane keeping control method and system, device and vehicle based on the optimization strategy provided in the embodiments of the present application can be applied to a variety of vehicle models. Based on the angle control algorithm in the L2 lateral keeping algorithm, the steering wheel angle is controlled by using the optimization strategy deployed in the vehicle-mounted MCU controller, and at the same time, discrete speed, iteration number limit and table lookup are used to avoid processing equations that consume a lot of computing power in the algorithm. This optimization method can be applied to the vehicle-mounted MCU controller. Compared with the traditional PID method, the embodiments of the present application can make the lane keeping control more stable and reduce the problems of body drawing and shaking. In addition, the method can be applied to terminals, servers, and systems including terminals and servers, and is implemented through the interaction between terminals and servers. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.
[0049] In one embodiment, Figure 1 The process of the lane keeping control method based on the optimization strategy shown includes:
[0050] Step S1, obtaining a state deviation between a pre-established vehicle model and a target trajectory point on a desired trajectory; when the state deviation exceeds a preset range threshold, it is regarded as a vehicle state error;
[0051] Step S2, constructing an optimization control model for the vehicle state error, determining the objective function of the optimization control model with the minimization of the vehicle state error as a constraint, and optimizing the objective function using a linear quadratic regulator;
[0052] Step S3, based on the optimization result of the objective function, discretize the current speed state of the vehicle to obtain a discrete Raccati equation; iteratively solve the discrete Raccati equation to generate an optimization strategy; the optimization strategy includes: an LQR control coefficient corresponding to the current speed, and a speed state error feedback amount and a front wheel steering angle of the vehicle corresponding to the LQR control coefficient;
[0053] Step S4, deploying the optimization strategy in the vehicle-mounted MCU controller, so that the vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque.
[0054] In step S1, the pre-established vehicle model is obtained by modeling the following tire dynamics equation according to the vehicle parameters:
[0055]
[0056] Where y is the lateral position of the vehicle, is the vehicle lateral velocity, is the vehicle lateral acceleration, is the vehicle yaw angle, is the vehicle yaw angular velocity, is the vehicle's yaw angular acceleration, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the vehicle's front wheel to the center of mass, b is the axial length from the vehicle's rear wheel to the center of mass, I is the vehicle's moment of inertia, and δ is the turning angle of the vehicle's front wheel.
[0057] In the above embodiment, step S1 determines the vehicle state error by the following formula:
[0058]
[0059] in, They represent the lateral position error, lateral velocity error, lateral angle error, and lateral angular velocity error between the vehicle and the reference road line in the Frenet coordinate system. is the rate of change of the road line angle, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the front wheel to the center of mass, b is the axial length from the rear wheel to the center of mass, and I is the vehicle's moment of inertia.
[0060] In the above embodiment, step S2 converts the vehicle state error into a space vector and establishes an optimization control model, as shown in the following formula:
[0061]
[0062] Among them, e rr is the error state quantity, A is the error state quantity coefficient, B is the vehicle front wheel steering angle coefficient, and C is the road line angle change rate coefficient.
[0063] Preferably, the error state quantity coefficient satisfies the following formula:
[0064]
[0065] Among them, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the front wheel to the center of mass, b is the axial length from the rear wheel to the center of mass, and I is the vehicle's moment of inertia.
[0066] The vehicle front wheel turning angle coefficient satisfies the following formula:
[0067]
[0068] Among them, c afis the vehicle's front tire deviation coefficient, m is the vehicle's mass, and I is the vehicle's moment of inertia.
[0069] The road line angle change rate coefficient satisfies the following formula:
[0070]
[0071] Among them, c af is the vehicle's front tire deviation coefficient, m is the vehicle's mass, I is the vehicle's moment of inertia, v is the vehicle's speed, a is the axial length from the front wheel to the center of mass, and b is the axial length from the rear wheel to the center of mass.
[0072] In the above embodiment, in step S2, a linear quadratic regulator is used to optimize the objective function, and the optimization of the objective function is as follows:
[0073]
[0074] Among them, J is the objective function, e rr is the error state quantity, Q is the weight of the objective function for the error state quantity, R is the input weight, and δ is the turning angle of the front wheel of the vehicle. The entire optimization process is to find the appropriate input and error state quantity e after determining the values of Q and R. rr , so that the objective function is minimized. At the same time, the constraints of the entire error equation need to be satisfied. When Q is large, the objective function makes the state change less, and when R is large, the objective function makes the input change less.
[0075] Step S3: Raccati equation is used to solve the objective function. The Raccati equation solution process is as follows:
[0076] A T P+PA+Q-RBR -1 BP=0
[0077] K=R -1 B T P
[0078] δ=-K T *e rr +δ f
[0079]
[0080] Where P is the covariance matrix, K is the LQR control coefficient, which is obtained by the vehicle front wheel steering coefficient B, input weight R and covariance matrix P. K is a vector, which is consistent with the dimension of the state vector. a is the axis length from the front wheel to the center of mass, b is the axis length from the rear wheel to the center of mass, c is af and c arare the vehicle front tire deflection coefficient and rear tire deflection coefficient respectively, k3 is the third element of the K vector, δ f is the speed state error feedback, which is calculated according to the change of road curvature. The control input based on the optimization strategy can be obtained through the third formula in the above formula.
[0081] In the above embodiments, since the L2 lateral lane keeping algorithm usually runs in the MCU and has high real-time requirements and cannot meet the needs of algorithms with too high computing power, only solving the Raccati equation usually cannot meet the needs. This is why the L2 lateral lane keeping algorithm generally adopts PID control.
[0082] Therefore, it is necessary to optimize the computing power for solving the Raccati equation. Observing the Raccati equation, assuming that the mass, moment of inertia, axle length, and cornering stiffness parameters of the vehicle remain unchanged during driving, the only thing that changes in the A matrix and the B matrix is the vehicle speed, that is, the LQR control coefficient K vector finally solved by the Raccati equation is only related to the vehicle speed, and different vehicle speeds correspond to different LQR control coefficient K vectors.
[0083] Therefore, step S3 iteratively solves the Raccati equation, further comprising:
[0084] Determine whether the Raccati equation has been iterated to the maximum number of times by querying the discrete table. If it has been iterated to the maximum number of times, output the LQR control coefficient at the current vehicle speed. Otherwise, read the covariance matrix P of the intermediate variable corresponding to the vehicle speed segment in the discrete table; iterate the Raccati equation based on the covariance matrix P of the intermediate variable;
[0085] When it is detected that the current Raccati equation has been iterated to the maximum number of times, the LQR control coefficient of the current speed segment of the discrete table is updated. Otherwise, the intermediate variable P matrix of the current speed segment of the discrete table is updated, and the LQR control coefficient of the speed closest to the current vehicle speed and the LQR control coefficient K corresponding to the current vehicle speed are output. T , and LQR control coefficient K T The corresponding vehicle speed state error feedback δ f and the front wheel turning angle B of the vehicle T .
[0086] Exemplarily, the current vehicle speed is discretized at 1 km / h, and the speed is divided into a speed discrete table of 1-180 parts. The Raccati equation is then iteratively solved using an iterative method, and the corresponding K vector is output at a specified number of iterations. The speed discrete table is updated to facilitate the next iteration until the K vector closest to the current speed is output to confirm the real-time operation of the on-board MCU controller.
[0087] For the method steps disclosed in the above embodiments, the method steps are described as a series of action combinations for the purpose of simple description, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0088] Any process or method description described in a flowchart or other manner may be understood as representing a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations, in which the order shown or discussed may not be followed, including executing and implementing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, or executing computer instructions and implementing the corresponding functions according to program structures such as loops and branches, which will of course be known to those skilled in the art when implementing the embodiments of the present invention.
[0089] like Figure 2 The lane keeping control system based on the optimization strategy shown includes:
[0090] A state error acquisition module is used to obtain the state deviation between the pre-established vehicle model and the target trajectory point on the expected trajectory; when the state deviation exceeds a preset range threshold, it is used as the vehicle state error;
[0091] A target determination module is used to construct an optimization control model for the vehicle state error, determine the objective function of the optimization control model with the minimization of the vehicle state error as a constraint, and optimize the objective function using a linear quadratic regulator;
[0092] An iterative optimization module is used to discretize the current speed state of the vehicle based on the optimization result of the objective function to obtain a discrete Raccati equation; iteratively solve the discrete Raccati equation to generate an optimization strategy; the optimization strategy includes: an LQR control coefficient corresponding to the current speed, and a speed state error feedback amount and a front wheel steering angle of the vehicle corresponding to the LQR control coefficient;
[0093] The control module is used to deploy the optimization strategy in the vehicle-mounted MCU controller, so that the vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque.
[0094] It is worth noting that although only some basic functional modules are disclosed in the embodiments of the present invention, it does not mean that the composition of the present system is limited to the above basic functional modules. On the contrary, what the present embodiment wants to express is that on the basis of the above basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. In other words, the present system is open rather than closed. Just because the present embodiment only discloses individual basic functional modules, it cannot be considered that the protection scope of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above devices are described in terms of functions and are described separately in various units and modules. Of course, when implementing the present invention, the functions of each unit and module can be implemented in the same or one or more software and / or hardware.
[0095] The implementation methods of the system described above are merely illustrative, for example, the various functional modules, units or subsystems in the system may or may not be physically separated, or may or may not be physical units, that is, they may be located in the same place, or they may be distributed to multiple different systems and their subsystems or modules. Those skilled in the art may select some or all of the functional modules, units or subsystems according to actual needs to achieve the purpose of the embodiments of the present invention, and those of ordinary skill in the art may understand and implement the above-mentioned situations without creative work.
[0096] It can be seen from the lane keeping control method and system based on the optimization strategy shown in steps S1 to S4 that the present invention first obtains the state deviation between the pre-established vehicle model and the target trajectory point on the expected trajectory; when the state deviation exceeds the preset range threshold, it is used as the vehicle state error; an optimization control model is constructed for the vehicle state error, and the objective function of the optimization control model is determined with the minimization of the vehicle state error as a constraint; at the same time, according to the linear quadratic optimization control theory, a linear quadratic regulator is used to optimize the objective function; secondly, based on the optimization result of the objective function, the current speed state of the vehicle is discretized, and a lane keeping algorithm based on the optimization strategy is designed to improve the rapid response performance and stability of the vehicle during lane keeping, and obtain a discrete Raccati equation; due to the problem of low computing power of the on-board MCU, the calculation process is optimized, the discrete Raccati equation is iteratively solved, and an optimization strategy is generated; the optimization strategy includes: an LQR control coefficient corresponding to the current vehicle speed, and a speed state error feedback amount and a front wheel turning angle of the vehicle corresponding to the LQR control coefficient; finally, the optimization strategy is deployed in the on-board MCU controller to achieve the purpose of real-time optimization calculation. The vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque.
[0097] By applying the above solution to specific vehicle models and comparing the control effect with the traditional PID algorithm, it can be seen that the algorithm improves the rapidity of vehicle response, while reducing the small-amplitude jitter of the traditional algorithm, and the stability of the vehicle during maintenance is also improved.
[0098] By implementing the lane keeping control method based on the optimization strategy shown in steps S1 to S4, the lane keeping algorithm based on the optimization strategy is designed using the vehicle dynamics equation. The optimization method can model the motion equation according to the fixed parameters of the vehicle, eliminating the cumbersome steps of the traditional PID method that needs to configure the poles according to different working conditions. The control strategy of the present invention is to derive the corresponding error equation according to the parameters, and adopt the optimization strategy of the linear quadratic regulator to achieve accurate control of the steering wheel angle. Finally, the optimization strategy control algorithm is applied to the vehicle-mounted MCU controller by means of variable discretization, iterative optimization, and query tables. The specific control strategy can be briefly described as follows: First, state design is performed according to the dynamic equation, and the error equation is derived. Secondly, the objective function is designed and the optimization control method is designed. Finally, speed discretization, iterative optimization, parameter query, and optimization calculation process are optimized. The above optimization process ensures the real-time operation of the vehicle-mounted MCU.
[0099] In one embodiment, the present invention not only discloses a lane keeping control method and system based on an optimization strategy, but also provides a corresponding device and vehicle:
[0100] like Figure 3 As shown, the device is an electronic device, including: a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory communicate with each other through the bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the lane keeping control method based on the optimization strategy.
[0101] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the device 800 includes a processor 801, a memory 802, a communication interface 803 and a bus 804. The processor 801, the memory 802 and the communication interface 803 communicate through the bus 804, and can also communicate through other means such as wireless transmission. The memory 802 is used to store instructions, and the processor 801 is used to execute the instructions stored in the memory 802. The memory 802 stores program code 8021, and the processor 801 can call the program code 8021 stored in the memory 802 to execute the steps of the lane keeping control method based on the optimization strategy.
[0102] It should be understood that in the embodiment of the present application, the processor 801 may be a CPU, and the processor 801 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0103] The memory 802 may include a read-only memory ROM and a random access memory RAM, and provide instructions and data to the processor 801. The memory 802 may also include a non-volatile random access memory. The memory 802 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (doubledate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM), and direct memory bus random access memory (directrambus RAM, DR RAM).
[0104] The bus 804 may include, in addition to the data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as bus 804 in the figure.
[0105] In one embodiment, the present invention includes a vehicle, wherein the vehicle includes a smart cockpit. The smart cockpit is provided with an on-board MCU, and executes the lane keeping control method based on the optimization strategy based on the optimization strategy.
[0106] Also included is an electronic device for implementing the steps of the lane keeping control method based on the optimization strategy as described in steps S1-S4;
[0107] A processor, wherein the processor runs a program, and when the program runs, data output from the electronic device executes the steps of the lane keeping control method based on the optimization strategy as described in steps S1-S4;
[0108] The storage medium is used to store a program, and when the program is running, it executes the steps of the lane keeping control method based on the optimization strategy as described in steps S1-S4 for the data output from the electronic device.
[0109] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).
[0110] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0111] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, any one of the embodiments claimed in the claims can be used in any combination in the embodiments of the present invention.
[0112] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0113] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0114] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any way. Any feature disclosed in this specification, unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features. Throughout the specification, the same reference numerals indicate the same elements.
[0115] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition they can be divided into multiple submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including corresponding claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner can be combined in any combination. Unless otherwise explicitly stated, each feature disclosed in this specification (including corresponding claims, abstracts and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0116] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways, for example: the device embodiments described above are only schematic; for example: the division of units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored, or some instructions are not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms not shown.
[0117] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lane keeping control method based on optimization strategy, characterized in that: include: Obtaining a state deviation between a pre-established vehicle model and a target trajectory point on a desired trajectory; When the state deviation exceeds the preset range threshold, it is regarded as the vehicle state error; An optimization control model is constructed for the vehicle state error, the objective function of the optimization control model is determined with the minimization of the vehicle state error as a constraint, and the objective function is optimized by using a linear quadratic regulator; Based on the optimization result of the objective function, the current speed state of the vehicle is discretized to obtain the discrete Raccati equation; Iteratively solve the discrete Raccati equation to generate an optimization strategy; The optimization strategy includes: an LQR control coefficient corresponding to the current vehicle speed, and a vehicle speed state error feedback amount and a front wheel steering angle of the vehicle corresponding to the LQR control coefficient; The optimization strategy is deployed in the vehicle-mounted MCU controller, so that the vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque.
2. The method according to claim 1, characterized in that The pre-established vehicle model is calculated based on the tire dynamics equation as follows: in, is the vehicle lateral velocity, is the vehicle lateral acceleration, is the vehicle yaw angle, is the vehicle yaw angular velocity, is the vehicle's yaw angular acceleration, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the vehicle's front wheel to the center of mass, b is the axial length from the vehicle's rear wheel to the center of mass, I is the vehicle's moment of inertia, and δ is the turning angle of the vehicle's front wheel.
3. The method according to claim 2, characterized in that The vehicle state error is determined by the following formula: in, They represent the lateral position error, lateral velocity error, lateral angle error, and lateral angular velocity error between the vehicle and the reference road line in the Frenet coordinate system. is the rate of change of the road line angle, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the front wheel to the center of mass, b is the axial length from the rear wheel to the center of mass, and I is the vehicle's moment of inertia.
4. The method according to claim 3, characterized in that The vehicle state error is converted into a space vector and an optimization control model is established as follows: Among them, e rr is the error state quantity, A is the error state quantity coefficient, B is the vehicle front wheel steering angle coefficient, and C is the road line angle change rate coefficient.
5. The method according to claim 4, characterized in that The error state quantity coefficient is calculated by the following formula: Among them, c af and c ar are the vehicle's front tire deflection coefficient and rear tire deflection coefficient respectively, m is the vehicle mass, v is the vehicle speed, a is the axial length from the front wheel to the center of mass, b is the axial length from the rear wheel to the center of mass, and I is the vehicle's moment of inertia.
6. The method according to claim 1, characterized in that The objective function is optimized by the following formula: Among them, J is the objective function, e rr is the error state quantity, Q is the weight matrix of the objective function for the error state quantity, R is the input weight, and δ is the steering angle of the front wheel of the vehicle.
7. The method according to claim 1, characterized in that The iterative solution of the discrete Raccati equation to generate an optimization strategy includes: Determine whether the Raccati equation has been iterated to the maximum number of times by querying the discrete table. If it has been iterated to the maximum number of times, output the LQR control coefficient at the current vehicle speed. Otherwise, read the intermediate variable covariance matrix of the corresponding vehicle speed segment in the discrete table; iterate the Raccati equation based on the intermediate variable covariance matrix; When it is detected that the current Raccati equation has been iterated to the maximum number of times, the LQR control coefficient of the current speed segment in the discrete table is updated; otherwise, the covariance matrix of the intermediate variables in the current speed segment in the discrete table is updated, and the LQR control coefficient of the speed closest to the current vehicle speed that has been successfully iterated is output, as well as the vehicle speed state error feedback amount and the front wheel steering angle of the vehicle corresponding to the LQR control coefficient.
8. A lane keeping control system based on an optimization strategy, characterized in that: include: A state error acquisition module is used to obtain the state deviation between the pre-established vehicle model and the target trajectory point on the expected trajectory; When the state deviation exceeds the preset range threshold, it is regarded as the vehicle state error; A target determination module is used to construct an optimization control model for the vehicle state error, determine the objective function of the optimization control model with the minimization of the vehicle state error as a constraint, and optimize the objective function using a linear quadratic regulator; An iterative optimization module is used to discretize the current speed state of the vehicle based on the optimization result of the objective function to obtain a discrete Raccati equation; Iteratively solve the discrete Raccati equation to generate an optimization strategy; The optimization strategy includes: an LQR control coefficient corresponding to the current vehicle speed, and a vehicle speed state error feedback amount and a front wheel steering angle of the vehicle corresponding to the LQR control coefficient; The control module is used to deploy the optimization strategy in the vehicle-mounted MCU controller, so that the vehicle-mounted MCU controller controls the steering wheel angle based on the optimization strategy to achieve parameter adjustment of the steering wheel torque.
9. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a bus; wherein the processor, the communication interface and the memory communicate with each other via the bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of claims 1 to 7.
10. A vehicle, characterized in that: include: An electronic device for implementing the steps of the method according to any one of claims 1 to 7; A processor, wherein the processor runs a program, and when the program runs, the data output from the electronic device executes the steps of the method according to any one of claims 1 to 7; A storage medium for storing a program, wherein when the program is run, the program executes the steps of the method according to any one of claims 1 to 7 for data output from an electronic device.
