Vehicle control method and device, electronic equipment and medium
By constructing a three-part loss function and optimizing lane decision-making and trajectory planning under a dynamic model, the problem of the separation between lane decision-making and trajectory planning in the autonomous driving system is solved, and the safety, efficiency and comfort of autonomous driving vehicles are improved.
Patent Information
- Application Number
- CN202511045130.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-07-28
AI Technical Summary
In existing autonomous driving systems, the separation between lane decision-making and trajectory planning algorithm design leads to problems such as safe decisions but uneven trajectories or smooth trajectories but unsafe decisions, affecting overall driving performance.
A three-part loss function consisting of decision variables, state variables, and control variables is constructed. A unified sum value is obtained by adding them up at each time step, and then jointly optimized under the dynamic mathematical model and constraints to minimize the target sum value to coordinate lane decision-making and trajectory planning.
It improves the safety, driving efficiency and driving comfort of autonomous vehicles in complex traffic scenarios, and achieves better overall driving performance than traditional fragmented algorithm design.
Smart Images

Figure CN120663943A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a vehicle control method, device, electronic device, and medium. Background Art
[0002] In existing autonomous vehicle systems, the algorithms for lane decision-making (e.g., "whether to change lanes, and which lane to change to") and trajectory planning (e.g., "what specific curve to take, how much throttle to apply, and how to steer") are typically separated. This separation of the algorithms first determines whether to change lanes and which lane to change to, and then performs trajectory planning based on these decisions. This disconnected algorithm design results in poor coordination between lane decision-making and trajectory planning. Lane decision-making focuses solely on "safe lane changes without collisions," while trajectory planning focuses solely on "the smoothest or most time-efficient" approach. These two objectives are inconsistent, making it easy for the system to achieve safe decisions but uneven trajectories, or smooth trajectories but unsafe decisions, impacting the overall driving performance of the autonomous vehicle. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a vehicle control method, device, electronic device and medium, which are intended to coordinate lane decision-making and trajectory planning during autonomous driving to enhance the consistency between lane decision results and trajectory planning results.
[0004] In a first aspect, an embodiment of the present application provides a vehicle control method, the method comprising:
[0005] Constructing the first loss function, the second loss function and the third loss function;
[0006] The inputs of the first loss function, the second loss function, and the third loss function all include driving variables of the first vehicle within a single time step, the driving variables including decision variables, state variables, and control variables, the decision variables are used to characterize the target driving lane of the first vehicle, the state variables are used to characterize the driving state and position of the first vehicle, the control variables are used to characterize control parameters of the first vehicle, and the control parameters are used to instruct the first vehicle to change the driving state, the first loss function is associated with a position deviation, the second loss function is associated with a speed deviation, and the third loss function is associated with the control variables, the position deviation is the deviation between the position of the first vehicle and the target driving lane, and the speed deviation is the deviation between the speed of the first vehicle and a reference speed of the target driving lane;
[0007] Adding the output of the first loss function, the output of the second loss function, and the output of the third loss function to obtain a first sum;
[0008] summing the first sum values of the plurality of time steps to obtain a target sum value;
[0009] Based on the dynamic mathematical model of the first vehicle, taking the driving variables of the plurality of time steps that minimize the target sum value as a target driving variable sequence, wherein the target driving variable sequence satisfies a first constraint condition;
[0010] The first vehicle is controlled to travel within a plurality of the time steps according to the target travel variable sequence.
[0011] In some embodiments, determining, based on the dynamic mathematical model of the first vehicle, the driving variables at the plurality of time steps that minimize the target sum value as a target driving variable sequence includes:
[0012] Linearizing the dynamic mathematical model to obtain a linearized model;
[0013] adding a collision cost value to the target sum value, wherein the collision cost value is associated with a first vehicle speed difference and a second vehicle speed difference, the first vehicle speed difference being the difference between a speed of a target vehicle and a speed of the first vehicle, the target vehicle being a vehicle located in the target driving lane and ahead of the first vehicle in the forward direction of the first vehicle, and the second vehicle speed difference being the difference between a speed of an adjacent vehicle and the first vehicle, the adjacent vehicle being a vehicle that is less than a preset distance threshold from the first vehicle;
[0014] Acquiring driving status information of surrounding vehicles, wherein the surrounding vehicles include the target vehicle and the adjacent vehicles;
[0015] Based on the linearized model and the driving state information of the surrounding vehicles, the driving variables of the plurality of time steps that minimize the target sum are used as a first driving variable sequence, wherein the first driving variable sequence satisfies a second constraint condition, and the second constraint condition includes the first constraint condition;
[0016] determining a plurality of decision variables in the first driving variable sequence as a first variable sequence;
[0017] Determining a second variable sequence based on the dynamic mathematical model using the first variable sequence, wherein the second variable sequence includes a plurality of state variables of the time steps and a plurality of control variables of the time steps;
[0018] The first variable sequence and the second variable sequence are combined to obtain the target driving variable sequence.
[0019] In some embodiments, determining a second variable sequence based on the dynamic mathematical model using the first variable sequence includes:
[0020] Determine a reference position and a reference speed of the vehicle in a plurality of the time steps according to the first variable sequence, and use the reference position and the reference speed of the vehicle in the plurality of the time steps as a reference state variable sequence;
[0021] determining a target loss value according to a deviation between a state variable of the vehicle in a plurality of the time steps and the reference state variable sequence, and a control variable of the vehicle in a plurality of the time steps;
[0022] Based on the dynamic mathematical model, the state variables and control variables of the multiple time steps that minimize the target loss value are used as the second variable sequence, and the second variable sequence satisfies a third constraint condition, and the third constraint condition includes the first constraint condition.
[0023] In some embodiments, the third constraint includes that the position of the first vehicle is outside the target ellipse of each of the surrounding vehicles, wherein the target ellipse is an ellipse centered on the position of the surrounding vehicles, and the target ellipse is determined based on the preset major axis and preset minor axis corresponding to the surrounding vehicles, and the heading angle of the surrounding vehicles.
[0024] In some embodiments, the control variables include the acceleration and steering angle of the first vehicle, and the third constraint includes that the acceleration of the first vehicle is greater than or equal to a first preset acceleration and less than or equal to a second preset acceleration, and the steering angle of the first vehicle is greater than or equal to the first preset steering angle and less than or equal to the second preset steering angle.
[0025] In some embodiments, the second constraint condition includes that the first difference between the speed of the target vehicle and the speed of the first vehicle is greater than or equal to the inverse of the first product of the first preset parameter and the preset binary variable; the second constraint condition also includes that the first difference is less than or equal to the second difference between the second product and the second preset parameter, the second product is the product of the first preset parameter and a third difference, the third difference is the difference between 1 and the preset binary variable, and the preset binary variable is 0 or 1.
[0026] In some embodiments, the control variables include the acceleration and steering angle of the first vehicle, and the output of the third loss function is the sum of a third product and a fourth product, the third product being the product of a first preset weight and the square of the steering angle of the first vehicle, and the fourth product being the product of a second preset weight and the square of the acceleration of the first vehicle.
[0027] In a second aspect, an embodiment of the present application provides a vehicle control device, the device comprising:
[0028] A construction module, used to construct a first loss function, a second loss function, and a third loss function;
[0029] The inputs of the first loss function, the second loss function, and the third loss function all include driving variables of the first vehicle within a single time step, the driving variables including decision variables, state variables, and control variables, the decision variables are used to characterize the target driving lane of the first vehicle, the state variables are used to characterize the driving state and position of the first vehicle, the control variables are used to characterize control parameters of the first vehicle, and the control parameters are used to instruct the first vehicle to change the driving state, the first loss function is associated with a position deviation, the second loss function is associated with a speed deviation, and the third loss function is associated with the control variables, the position deviation is the deviation between the position of the first vehicle and the target driving lane, and the speed deviation is the deviation between the speed of the first vehicle and a reference speed of the target driving lane;
[0030] A first calculation module, configured to add an output of the first loss function, an output of the second loss function, and an output of the third loss function to obtain a first sum;
[0031] a second calculation module, configured to sum the first sum values of the plurality of time steps to obtain a target sum value;
[0032] a determination module configured to, based on a dynamic mathematical model of the first vehicle, determine the driving variables of the plurality of time steps that minimize the target sum as a target driving variable sequence, wherein the target driving variable sequence satisfies a first constraint condition;
[0033] A control module is used to control the driving of the first vehicle within a plurality of the time steps according to the target driving variable sequence.
[0034] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0035] a memory configured to store instructions; and
[0036] The processor is configured to call the instructions from the memory and to implement the vehicle control method provided in the first aspect of the embodiment of the present application when executing the instructions.
[0037] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor implements the vehicle control method according to the first aspect of the embodiment of the present application.
[0038] In an embodiment of the present application, the processor constructs a three-part loss function including decision variables, state variables, and control variables. The first loss function is used to quantify the deviation between the current position of the first vehicle and the center of the target lane, the second loss function is used to quantify the deviation between the speed of the first vehicle and the reference speed of the target lane, and the third loss function is used to quantify the smoothness of the control variables (such as acceleration and steering angle). The outputs of these three functions are added together in each time step to obtain a first sum value. The first sum values of multiple time steps are then accumulated to form a unified target sum value. The driving variable sequence that minimizes the target sum value is jointly solved under the constraints of the dynamic mathematical model of the first vehicle and the first constraint condition. Finally, the vehicle is directly controlled with the optimal target driving variable sequence. In this way, the coupling channel between discrete decision-making (i.e., lane decision-making) and continuous trajectory planning is effectively opened up, so that lane decision-making and trajectory generation are synchronized and coordinated under the same optimization goal, thereby improving the safety, driving efficiency, and driving comfort of autonomous vehicles in complex traffic scenarios, and achieving better overall driving performance than traditional split algorithm design. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flow chart of a vehicle control method provided in an embodiment of the present application;
[0040] Figure 2 This is another flow chart of the vehicle control method provided in an embodiment of the present application;
[0041] Figure 3 is a schematic structural diagram of a vehicle control device provided in an embodiment of the present application;
[0042] Figure 4 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0044] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0045] Autonomous driving effectively improves driving safety and efficiency in modern intelligent transportation systems. The planning tasks of autonomous driving can be divided into three parts: route planning, decision making, and trajectory planning. Route planning outputs high-level paths based on the road network, while decision making (i.e., lane decisions) and trajectory planning focus on lane-level planning. Safety is the primary consideration for autonomous vehicles in all tasks. Furthermore, the decision-making capabilities of autonomous vehicles are significantly impacted by interactions with other traffic participants, including passengers and other vehicles. This consistency requirement emphasizes the necessity of adopting collaborative approaches across the various autonomous driving tasks. The primary responsibility of the autonomous driving planning task is to make decisions (such as lane keeping, lane changes, and overtaking) and generate more specific vehicle motion within the lane. Therefore, the integration of decision-making and trajectory planning modules has attracted increasing attention. The motivation is to enhance the consistency of the results of the decision-making and trajectory planning tasks, thereby significantly improving the overall driving performance of autonomous vehicles.
[0046] In existing technologies, lane decision-making and trajectory planning are two core steps in autonomous driving tasks. Although significant progress has been made in the algorithm development of these two tasks, in existing autonomous driving systems, due to the separation of decision-making and trajectory planning algorithm design, each step may have its own cost function, resulting in inconsistent goals between the two. This can easily lead to problems such as safe decisions but uneven trajectories, or smooth trajectories but unsafe decisions, affecting the overall driving performance of autonomous vehicles.
[0047] Based on this, the embodiments of the present application provide a vehicle control method, device, electronic device and medium, which aim to coordinate lane decision-making and trajectory planning during autonomous driving to enhance the consistency between lane decision results and trajectory planning results.
[0048] Figure 1 is a flow chart of the vehicle control method provided in the embodiment of the present application, such as Figure 1 As shown, a first aspect of an embodiment of the present application provides a vehicle control method, comprising the following steps S100 to S500.
[0049] Step S100: constructing a first loss function, a second loss function and a third loss function;
[0050] Among them, the inputs of the first loss function, the second loss function and the third loss function all include the driving variables of the first vehicle in a single time step. The driving variables include decision variables, state variables and control variables. The decision variables are used to characterize the target driving lane of the first vehicle, the state variables are used to characterize the driving state and position of the first vehicle, the control variables are used to characterize the control parameters of the first vehicle, and the control parameters are used to instruct the first vehicle to change the driving state. The first loss function is associated with the position deviation, the second loss function is associated with the speed deviation, and the third loss function is associated with the control variables. The position deviation is the deviation between the position of the first vehicle and the target driving lane, and the speed deviation is the deviation between the speed of the first vehicle and the reference speed of the target driving lane.
[0051] Those skilled in the art will appreciate that the processor for executing the vehicle control method provided in the embodiments of the present application may be a processor of a vehicle's automatic driving system, which may be the vehicle's MCU (Microcontroller Unit) or ECU (Electronic Control Unit).
[0052] In this step, the processor of the first vehicle can define three loss functions based on the settings and inputs of the technicians, which correspond to the three optimization objectives of "lane keeping", "reference speed tracking" and "driving comfort". Specifically, the first loss function is used to quantify the deviation between the position of the first vehicle (i.e., the host vehicle) and the target driving lane within a single time step (which can be quantified using the position of the centerline of the target driving lane). Its input is the decision variable at the current moment (indicating left lane change, lane keeping or right lane change), state variables (including vehicle position, heading, speed, etc.) and control variables (such as acceleration, steering angle, etc.). The first loss function can be expressed as follows:
[0053]
[0054] in, is the output of the first loss function, that is, the instantaneous cost or instantaneous loss of the τth time step, x(τ) is the state variable, b(τ) is the decision variable, μ(τ) is the control variable, τ is the moment, that is, the sequence number of the time step, and b(τ) satisfies the following formula:
[0055]
[0056] Formula (2) can be understood as:
[0057] At the τth time step, there are three mutually exclusive discrete action options:
[0058] α = -1 means "left lane change", and the target lane is the lane to the left of the current lane (left lane);
[0059] α=0 means “keep in the current lane”, and the target driving lane is the current lane;
[0060] α=1 means "right lane change", and the target lane is the lane to the right of the current lane (right lane);
[0061] With three binary variables b -1 , b0, b1 correspond to these three actions respectively:
[0062] If b -1 (τ) = 1, then execute "left lane change" at the τth time step;
[0063] If b0(τ)=1, then “lane keeping” is performed at the τth time step;
[0064] If b1(τ)=1, then execute “right lane change” at the τth time step;
[0065] Constraint∑ α b α (τ) = 1, which ensures that at each time step, at most one action can be selected.
[0066] In this way, formula (1) can be further understood as:
[0067] Indicates "the deviation between the position of the first vehicle and the center line of the left lane if changing lanes left";
[0068] representing “the deviation between the position of the first vehicle and the center line of the current lane if the current lane is maintained”;
[0069] Indicates the deviation between the position of the first vehicle and the center line of the right lane if changing lanes right.
[0070] Because b α Only one item is 1. Formula (1) is intended to pick out the distance deviation corresponding to the lane decision as the loss of this part, that is, the output of the first loss function.
[0071] The second loss function is used to measure the difference between the current longitudinal speed of the first vehicle and the reference speed of the selected target lane. The input also includes the three types of driving variables mentioned above to measure the speed tracking effect. The second loss function can be expressed as follows:
[0072]
[0073] in, is the output of the second loss function, that is, the instantaneous cost or instantaneous loss of the τth time step, Indicates the deviation between the speed of the first vehicle and the reference speed of the left lane if the lane is changed left. represents the deviation between the speed of the first vehicle and the reference speed of the current lane if the current lane is maintained. Indicates the deviation between the position of the first vehicle and the reference speed of the right lane if a right lane change occurs.
[0074] The third loss function, “used to evaluate the smoothness of control inputs,” is determined by the control variables and reflects the impact of acceleration and steering on passenger comfort. The third loss function can be expressed as follows:
[0075]
[0076] in, is the output of the third loss function, that is, the instantaneous cost or instantaneous loss of the τth time step, δ(τ) is the steering angle of the τth time step, a(τ) is the acceleration of the τth time step, ω δ is the first preset weight corresponding to the steering angle, ω a is a second preset weight corresponding to the acceleration.
[0077] By inputting these three types of variables at the same time in a single time step, the processor can obtain the separate outputs of the three loss functions at that moment.
[0078] Step S200: Add the output of the first loss function, the output of the second loss function, and the output of the third loss function to obtain a first sum.
[0079] After constructing the three loss functions, the second step is to sum their outputs within the same time step to obtain the first sum. This sum accurately describes the cost in lane departure, speed deviation, and comfort that the first vehicle would incur if it were to execute the current decision variables, state, and control within that time step. By simply adding the three cost functions, we can obtain a unified quantity that can be directly used to compare the advantages and disadvantages of different strategies. The first sum can be expressed as follows:
[0080]
[0081] in, is the first sum value.
[0082] Step S300: sum the first sum values of multiple time steps to obtain a target sum value.
[0083] In this step, the processor doesn't focus solely on performance at a single instant. Instead, it accumulates all first sums within the planning horizon—for example, several discrete time steps into the future—to arrive at a target sum for the entire planning period. This accumulation combines the cost levels of each time step, allowing the optimization process to consider both current lane keeping and speed tracking, as well as the smoothness and safety of the entire process, thereby forming a globally optimal evaluation metric. The target sum can be expressed using the following formula:
[0084]
[0085] Among them, J is the target and value, and T-1 is the total number of time steps.
[0086] Step S400: Based on the dynamic mathematical model of the first vehicle, the driving variables of multiple time steps that minimize the target sum value are used as a target driving variable sequence, and the target driving variable sequence satisfies a first constraint condition.
[0087] After obtaining the expressions for the objective and value, this step performs a joint optimization within the first constraint, based on the first vehicle's dynamic mathematical model (which serves as another optimization constraint). The optimization process searches for a set of decision variables b(τ), state variables x(τ), and control variables μ(τ) that minimize the objective and value over the entire time domain. This chronologically ordered set of variables constitutes the target driving variable sequence. It not only specifies the lane, speed, acceleration, and steering instructions for each future time step, but also ensures that the global optimization objective is maximized.
[0088] Determining the driving variables for multiple time steps that minimize the target sum value can be expressed as the following formula:
[0089]
[0090] The term "subjectto" is followed by constraints (including the first constraint) in the process of determining the driving variables for multiple time steps that minimize the target sum, including:
[0091] x(τ+1)=f(x(τ),μ(τ)): indicates that x(τ+1) (the τ+1 form of the state variable) must satisfy the dynamic mathematical model represented by f(x(τ),μ(τ));
[0092] x(τ)∈X,μ(τ)∈U: indicates that x(τ) and μ(τ) need to be within the range of the two sets X and U respectively;
[0093] g(x(τ))≥0: indicates that the first vehicle needs to maintain a certain speed difference or safety distance with other surrounding vehicles to prevent collision, that is, collision constraint or obstacle avoidance constraint;
[0094] x(0)=x0: indicates that the initial value of the state variable is x0;
[0095] ∑ α b α (τ) = 1, b α (τ)∈{0,1}, α∈{-1,0,1}: indicates the constraints defined by formula (2);
[0096] τ=0,1,…,T-1:indicates the value of τ;
[0097] As mentioned above, the constraints here include the first vehicle dynamics mathematical model (ensuring that the state and control meet physical feasibility), as well as discrete decision mutual exclusion (at each moment, only one of the following can be changed lanes: left, straight, or right), state / control boundaries (speed, acceleration, and steering angle are within safe ranges), etc. Among them, the first constraint includes:
[0098] x(0)=x0,
[0099] τ=0,1,…,T-1
[0100] The above dynamic mathematical model represented by f(x(τ),μ(τ)) can be expressed as follows:
[0101] p x (τ+1)=p x (τ)+f r (ν(τ),δ(τ))cos(θ(τ)) (8)
[0102] p y (τ+1)=p y (τ)+f r (v(τ),δ(τ))sin(θ(τ)) (9)
[0103]
[0104] ν(τ+1)=ν(τ)+τ s a(τ) (11)
[0105] Among them, p x 、p y are the horizontal and vertical coordinates of the center of mass of the first vehicle in the ground coordinate system, which together represent the position of the first vehicle, θ is the heading angle of the first vehicle, ν is the speed of the first vehicle, h is the front and rear wheelbase of the first vehicle, τ s is the sampling time interval of vehicle speed.
[0106] Step S500: controlling the first vehicle to travel within a plurality of time steps according to the target travel variable sequence.
[0107] In this step, the processor gradually transmits the resulting target driving variable sequence to the first vehicle. At each time step, the processor switches or maintains lanes based on the decision variables specified in the sequence, while simultaneously adjusting the throttle, brakes, and steering according to the corresponding control variables to accurately track the optimized state path. By continuously integrating decision-making, state, and control, the first vehicle achieves safe, efficient, and comfortable driving on real roads.
[0108] Through the above steps S100 to S500, the processor constructs a three-part loss function including decision variables, state variables, and control variables - the first loss function is used to quantify the deviation between the current position of the first vehicle and the center of the target lane, the second loss function is used to quantify the deviation between the first vehicle's speed and the target lane reference speed, and the third loss function is used to quantify the smoothness of the control variables (such as acceleration and steering angle) - and adds the outputs of these three functions at each time step to obtain a first sum value. The first sum values of multiple time steps are then accumulated to form a unified target sum value. The driving variable sequence that minimizes the target sum value is jointly solved under the dynamic mathematical model of the first vehicle and the first constraint condition, and finally the vehicle is directly controlled with the optimal target driving variable sequence. In this way, the coupling channel between discrete decision-making (i.e., lane decision-making) and continuous trajectory planning is effectively opened up, so that lane decision-making and trajectory generation are synchronized and coordinated under the same optimization goal, thereby improving the safety, driving efficiency and driving comfort of autonomous vehicles in complex traffic scenarios, and achieving better overall driving performance than traditional fragmented algorithm design.
[0109] In some embodiments, the control variables include the acceleration and steering angle of the first vehicle, and the output of the third loss function is the sum of a third product and a fourth product, the third product being the product of the first preset weight and the square of the steering angle of the first vehicle, and the fourth product being the product of the second preset weight and the square of the acceleration of the first vehicle.
[0110] As shown in formula (4), in this embodiment, the output of the third loss function is the third product ω δ (δ(τ)) 2 and the fourth product ω a (a(τ)) 2 The third product is the first preset weight ω δ The fourth product is the second preset weight ω a The product of the square of the acceleration a(τ) of the first vehicle.
[0111] In some embodiments, determining, based on the dynamic mathematical model of the first vehicle, driving variables at multiple time steps that minimize the target sum value as a target driving variable sequence includes:
[0112] Linearize the dynamic mathematical model to obtain a linearized model;
[0113] adding a collision cost value to the target sum value, wherein the collision cost value is associated with a first vehicle speed difference and a second vehicle speed difference, the first vehicle speed difference being the difference between the speed of a target vehicle and the speed of the first vehicle, the target vehicle being a vehicle located in the target driving lane and ahead of the first vehicle in the forward direction of the first vehicle, and the second vehicle speed difference being the difference between the speed of an adjacent vehicle and the speed of the first vehicle, the adjacent vehicle being a vehicle whose distance from the first vehicle is less than a preset distance threshold;
[0114] Obtaining driving status information of surrounding vehicles, including the target vehicle and adjacent vehicles;
[0115] Based on the linearized model and driving state information of surrounding vehicles, the driving variables of multiple time steps that minimize the target sum are used as a first driving variable sequence, the first driving variable sequence satisfies a second constraint condition, and the second constraint condition includes the first constraint condition;
[0116] determining a plurality of decision variables in the first driving variable sequence as a first variable sequence;
[0117] Using the first variable sequence, based on the dynamic mathematical model, a second variable sequence is determined, wherein the second variable sequence includes state variables of multiple time steps and control variables of multiple time steps;
[0118] The first variable sequence and the second variable sequence are combined to obtain a target driving variable sequence.
[0119] In this implementation, a two-stage optimization method is adopted to effectively solve the original nonlinear and non-convex lane decision-making and trajectory planning problem, so that the joint decision-making and planning can balance safety, efficiency and comfort while ensuring real-time performance.
[0120] First, in the first stage, the processor constructs a corresponding linearized model for the high-fidelity nonlinear dynamic mathematical model of the first vehicle, using it to approximate the complex nonlinear dynamics. The linearized model can be expressed as follows:
[0121]
[0122] in, is the state variable under the linearized model, is the control variable in the linearized model, is the linearized model, Ad 、B d It is a system matrix obtained by discretizing a high-fidelity dynamic mathematical model and can be calculated based on the physical parameters of the first vehicle and the sampling period.
[0123] In this way, the linearization of the model significantly reduces the computational complexity of formula (7), allowing the subsequent optimization problem to be expressed in a linear form. Next, the processor will no longer use the non-convex collision avoidance constraints involving the speed difference between the first vehicle and the target vehicle (the vehicle located in the target driving lane and ahead of the first vehicle in the forward direction of the first vehicle) (i.e., the first vehicle speed difference) and the speed difference with the adjacent vehicle (the vehicle whose distance from the first vehicle is less than a preset distance threshold) (i.e., the second vehicle speed difference) as hard conditions, but instead add the integrated target and value as the collision cost value of the soft penalty term through constraint relaxation. The addition process can be expressed as the following formula:
[0124]
[0125] It can be seen that the specific implementation method of adding the collision cost value to the target sum value is to add the collision cost value corresponding to the time step to the first sum value of each time step, where, is the first sum value, Pay the value for the collision. is the part of the collision cost value related to the first speed difference, It is the part of the collision cost value related to the second speed difference.
[0126] In this way, the nonlinear and non-convex parts of formula (7) are "approximated and relaxed" into a form that can be processed using mixed integer programming (MIP). The processor then uses the driving variables of multiple time steps that minimize the target sum as the first driving variable sequence based on the linearized model and the driving state information of the surrounding vehicles (neighboring vehicles + target vehicle). This process is performed under the second constraint and can be expressed as the following formula:
[0127]
[0128] After obtaining the MIP problem in formula (14), the processor can use a branch-and-bound algorithm to solve it. This algorithm continuously branches the solution space—dividing the possible decisions into several subsets; and bounding each subset (calculating lower and upper bounds), gradually approaching the optimal solution, ensuring both the quality of the solution and the efficiency of online computing.
[0129] After solving the first-stage MIP problem described in formula (14), the processor not only obtains the optimal decision variable sequence b(τ), but also simultaneously calculates the linear state variables at the corresponding time step and linear control variables This results in a first sequence of driving variables. This set of solutions serves as the initial solution to the original nonlinear, non-convex problem, providing a guiding starting point for subsequent large-scale nonlinear trajectory optimization and improving the convergence speed and accuracy of the subsequent second-stage solution.
[0130] In the second stage, based on this initial solution, the processor extracts the decision variables of multiple time steps in the first driving variable sequence as the first variable sequence, and reintroduces the high-fidelity nonlinear dynamic mathematical model and the strict collision avoidance constraint (g(x(τ))≥0). The first variable sequence is used to perform refined trajectory optimization to obtain the second variable sequence (including state variables of multiple time steps and control variables of multiple time steps, satisfying the third constraint condition) to determine the final output of a complete target driving variable sequence that is smooth, feasible, and meets the safety constraints.
[0131] In this way, the processor successfully simplifies the originally difficult mixed integer nonlinear non-convex optimization problem into an efficiently solvable MIP problem through four technical means: model linearization, relaxation of collision constraints to soft penalties, branch and bound solving of MIP, and use of the first-stage solution as the initial solution. It achieves the dual goals of real-time optimization decision-making and high-quality trajectory planning through the collaboration of the two stages.
[0132] In some embodiments, the second constraint includes that the first difference between the speed of the target vehicle and the speed of the first vehicle is greater than or equal to the inverse of the first product of the first preset parameter and the preset binary variable; the second constraint also includes that the first difference is less than or equal to the second difference between the second product and the second preset parameter, the second product is the product of the first preset parameter and the third difference, the third difference is the difference between 1 and the preset binary variable, and the preset binary variable is 0 or 1.
[0133] In this embodiment, in order to introduce the originally non-convex collision avoidance constraint "collision risk caused by the speed difference with the target vehicle" into the second constraint condition and maintain linear solvability, the processor determines the following two inequality formulas for the first vehicle speed difference (i.e., the first difference, the first difference between the speed of the target vehicle and the speed of the first vehicle) at the τth time step:
[0134]
[0135] in, is the speed of the target vehicle, v x(τ) is the speed of the first vehicle (the speed component in the vehicle's forward direction, hereinafter referred to as the speed of the first vehicle), M is a first preset parameter, is a preset binary variable, is the first difference;
[0136] That is, when the binary variable When ξ=1, the right end is 0, requiring the speed of the first vehicle to not exceed the speed of the target vehicle, and strictly avoiding rear-end collision; when ξ=1, the right end is -M, and the The lower bound constraint allows the rear-end collision risk to be temporarily “opened” during planning, and the value of M is a large value;
[0137]
[0138] in, is the second product, ∈ is the second preset parameter, is the second difference, is the third difference, σ+α is the number of the target driving lane, σ is the number of the current lane, and α indicates the lane change decision (-1, 0, 1).
[0139] That is, when When , the right end is -ε, requiring Δν≤-ε, that is, the speed of the first vehicle is higher than the speed of the target vehicle and exceeds a threshold (the value of ε can be a very small value); when When , the right side is M-ε, and the constraint fails, thus ensuring that there is no upper limit when there is no risk.
[0140] Through formula (15) and formula (16), the processor cleverly converts "If there is a risk of rear-end collision due to speed difference, then and pay the penalty, otherwise and force "The logic is all transformed into With the default binary variable The linear constraint of the collision avoidance is thus incorporated into the original nonlinear and non-convex collision avoidance condition into a second constraint that can be solved by mixed integer programming (MIP). This "Big-M soft switching" method can Strictly ensure the safety distance (hard constraint) while When passing The corresponding soft penalty terms allow the optimizer to weigh the trade-off between "risk" and "comfort / efficiency", thereby improving the solvability and computational efficiency of collision avoidance constraints in real-time online planning.
[0141] At the same time, for adjacent vehicles, the constraints of formula (15) and formula (16) can also be set to incorporate the second constraint condition mentioned above:
[0142]
[0143] in, is the speed of the neighboring vehicle.
[0144] In summary, formula (14) can be written as:
[0145]
[0146]
[0147] The second constraint condition is indicated by the following:
[0148] instruct Satisfy the linearization model;
[0149] v x ≥ρ|v y |,v x,min ≥0: indicates v x is greater than or equal to 0 and greater than or equal to the product of the preset ρ and the absolute value of the lateral velocity component;
[0150] Formula (15)-Formula (18);
[0151] a x,min ≤a x (τ)≤a x,max 、a y,min ≤a y (τ)≤a y,max : indicates the upper and lower limits of the components of the acceleration of the first vehicle in the forward direction and the lateral direction;
[0152] ∑ α b α (τ)=1、v α (τ)∈{0,1},α∈{-1,0,1};
[0153] and the first constraint.
[0154] In some embodiments, determining a second variable sequence based on a dynamic mathematical model using the first variable sequence includes:
[0155] Determining a reference position and a reference speed of the vehicle in a plurality of time steps according to the first variable sequence, and using the reference position and the reference speed of the vehicle in the plurality of time steps as a reference state variable sequence;
[0156] Determine a target loss value based on the deviation between the state variables of the vehicle in multiple time steps and the reference state variable sequence, and the control variables of the vehicle in multiple time steps;
[0157] Based on the dynamic mathematical model, the state variables and control variables of multiple time steps that minimize the target loss value are used as the second variable sequence. The second variable sequence satisfies the third constraint condition, and the third constraint condition includes the first constraint condition.
[0158] In this embodiment, the second stage uses a high-fidelity dynamic mathematical model to perform refined optimization on the first vehicle trajectory based on the first variable sequence b(τ) obtained in the first stage.
[0159] Specifically, first, the reference position of the first vehicle in each time step is derived from the target driving lane and the reference speed of the target driving lane at each time step indicated by b(τ). and reference speed The state variables are combined into a reference sequence. Then, based on the lateral and longitudinal deviations between the state variables of the first vehicle at multiple time steps and the reference sequence, as well as the control variables μ(τ) (such as acceleration a(τ) and steering angle δ(τ)) at the corresponding time steps, the loss values of the trajectories corresponding to the state variables and control variables at multiple time steps are calculated using the following formula: The target loss value is obtained by adding up the loss values of all time steps.
[0160]
[0161] Among them, q1, q2, q3, r1, and r2 are all preset weight values.
[0162] The processor incorporates the high-fidelity dynamics mathematical model and precise obstacle avoidance constraints into the third constraint. Through optimization, it finds the state with the minimum target loss value—the control sequence—as the second variable sequence x(τ), μ(τ). This second variable sequence is a smooth, executable trajectory that conforms to the high-fidelity dynamics mathematical model. The process of determining the second variable sequence can be expressed as the following formula:
[0163]
[0164] In this way, on the one hand, with the help of the reference trajectory generated by the first-stage decision, the search space of the second stage is effectively narrowed, and the convergence speed of trajectory optimization is improved; on the other hand, by directly minimizing the position tracking error, velocity tracking error and comfort cost in the complete nonlinear dynamic mathematical model, the final output trajectory not only ensures high-precision lane and speed tracking, but also takes into account the smoothness of acceleration and steering, achieving better driving safety, efficiency and driving comfort than the traditional two-stage splitting method.
[0165] In some embodiments, the third constraint includes that the position of the first vehicle is outside the target ellipse of each of the surrounding vehicles, wherein the target ellipse is an ellipse centered on the position of the surrounding vehicles, and the target ellipse is determined based on the preset major axis and preset minor axis corresponding to the surrounding vehicles, and the heading angle of the surrounding vehicles.
[0166] In this embodiment, the obstacle avoidance constraint in the third constraint condition is expressed as "the position of the first vehicle (which can be the position of the center of mass) must be outside the target ellipse defined by each surrounding vehicle." Specifically, for each surrounding vehicle, its current position is used as the As the center of the ellipse, according to the heading angle A of the vehicle i Rotate the ellipse in this direction and use the preset major axis and the minor axis As the size of the ellipse. This results in a "safety zone" that closely follows the vehicle's geometry and direction of travel, known as the target ellipse. Substituting the position of the first vehicle into the quadratic inequality shown below, as long as the equation satisfies this, it means the first vehicle falls outside all of these target ellipses and does not overlap with the safety zones of any surrounding vehicles:
[0167]
[0168] The above inequality can be expressed as g(x(τ))≥0 in formula (7) after transformation.
[0169] In some embodiments, the control variables include the acceleration and steering angle of the first vehicle, and the third constraint includes that the acceleration of the first vehicle is greater than or equal to a first preset acceleration and less than or equal to a second preset acceleration, and the steering angle of the first vehicle is greater than or equal to the first preset steering angle and less than or equal to the second preset steering angle.
[0170] In this embodiment, the third constraint condition further includes setting upper and lower limits for the acceleration and steering angle of the first vehicle:
[0171] a min ≤a(τ)≤a max (twenty two)
[0172] δ min ≤δ(τ)≤δ max (twenty three)
[0173] Among them, a min is the first preset acceleration, a max is the second preset acceleration, δ min is the first preset steering angle, δ max is the second preset steering angle.
[0174] Combining the above two implementations, formula (20) can be expressed as:
[0175]
[0176] Figure 2 This is another flow chart of the vehicle control method provided in the embodiment of the present application. Please refer to Figure 1-Figure 2 The technical effect of the vehicle control method provided in the embodiment of the present application can be experimentally verified using the following process:
[0177] In the simulation environment, the equipment used to conduct the simulation experiment first initializes the state of the first vehicle (including position, speed, and heading), the state information of surrounding vehicles, and inputs such as road topology and traffic rules. It then enters the first stage of optimization - using the linearized model and soft collision penalty through the decision-making module to solve the optimal sequence of decision variables. Then, based on this decision variable sequence, the second stage optimization is started. Under the high-fidelity dynamic mathematical model and fine elliptical obstacle avoidance constraints, a second variable sequence that meets the dynamic constraints, collision avoidance and path smoothness requirements is iteratively generated (based on the iterative linear quadratic regulator, iLQR, linear-quadratic optimal control algorithm and the alternating direction method of multipliers, ADMM, alternating direction multiplier method, and finally a coherent target driving variable sequence (including continuous states and control quantities) is output). The target driving variable sequence is loaded into the simulation software platform. The simulated first vehicle drives according to the planned trajectory and is evaluated through evaluation indicators such as safety (number of collisions, number of emergency braking), efficiency (driving time, energy consumption) and comfort (acceleration and steering angle change rate). The simulation results show that in multi-lane and dynamic traffic scenarios, the vehicle control method provided in the embodiment of the present application can effectively handle mixed constraints while ensuring real-time performance, and generate a safe, efficient and smooth driving trajectory, which is significantly better than the traditional fragmented design.
[0178] In a real-world driving environment, technicians also deployed the decision-making module and trajectory planning module on an autonomous driving test vehicle (the first vehicle) equipped with sensors such as lidar, cameras, and millimeter-wave radar. After the first vehicle collects the surrounding environment and its own status in real time, the processor of the first vehicle first generates a decision variable sequence according to the above-mentioned first and second stage optimization processes, and then outputs a refined target driving variable sequence, and sends it to the vehicle control system. Through road testing, based on the same safety, efficiency, and comfort index evaluation, the vehicle control method provided in the embodiment of the present application also demonstrates excellent obstacle avoidance capabilities, decision-making and planning coordination, and overall driving performance improvement on actual roads, verifying the feasibility and effectiveness of the method in real scenarios.
[0179] Figure 3 is a schematic diagram of the structure of the vehicle control device provided in the embodiment of the present application, such as Figure 3 As shown, the second aspect of the embodiment of the present application provides a vehicle control device 10, including:
[0180] A construction module 11 is used to construct a first loss function, a second loss function and a third loss function;
[0181] Among them, the inputs of the first loss function, the second loss function and the third loss function all include the driving variables of the first vehicle in a single time step, the driving variables include decision variables, state variables and control variables, the decision variables are used to characterize the target driving lane of the first vehicle, the state variables are used to characterize the driving state and position of the first vehicle, the control variables are used to characterize the control parameters of the first vehicle, and the control parameters are used to instruct the first vehicle to change the driving state. The first loss function is associated with the position deviation, the second loss function is associated with the speed deviation, and the third loss function is associated with the control variables. The position deviation is the deviation between the position of the first vehicle and the target driving lane, and the speed deviation is the deviation between the speed of the first vehicle and the reference speed of the target driving lane;
[0182] A first calculation module 12 is configured to add the output of the first loss function, the output of the second loss function, and the output of the third loss function to obtain a first sum;
[0183] A second calculation module 13 is used to sum the first sum values of multiple time steps to obtain a target sum value;
[0184] a determination module 14 for determining, based on a dynamic mathematical model of the first vehicle, the driving variables of a plurality of time steps that minimize the target sum as a target driving variable sequence, wherein the target driving variable sequence satisfies a first constraint condition;
[0185] The control module 15 is configured to control the first vehicle to travel within a plurality of time steps according to the target travel variable sequence.
[0186] The vehicle control device 10 provided in the second aspect of the embodiment of the present application can implement the various processes implemented in the above-mentioned method embodiment and achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0187] See Figure 4 , is a structural diagram of an electronic device provided in an embodiment of the present application. The third aspect of an embodiment of the present application provides an electronic device 1000, including a processor 1100 and a memory 1200. The memory 1200 stores machine-executable instructions that can be executed by the processor 1100. The processor 1100 can execute the machine-executable instructions to implement the above-mentioned vehicle control method.
[0188] A fourth aspect of an embodiment of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor implements the above-mentioned vehicle control method.
[0189] In some embodiments, the embodiments of the present application further provide a computer program product, including a computer program, which implements the vehicle control method according to the above embodiment when executed by a processor.
[0190] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0191] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0192] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0193] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0194] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media such as modulated data signals and carrier waves.
[0195] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0196] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
[0197] In addition, the various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A vehicle control method, characterized in that: The method comprises: Constructing the first loss function, the second loss function and the third loss function; The inputs of the first loss function, the second loss function, and the third loss function all include driving variables of the first vehicle within a single time step, the driving variables including decision variables, state variables, and control variables, the decision variables are used to characterize the target driving lane of the first vehicle, the state variables are used to characterize the driving state and position of the first vehicle, the control variables are used to characterize control parameters of the first vehicle, and the control parameters are used to instruct the first vehicle to change the driving state, the first loss function is associated with a position deviation, the second loss function is associated with a speed deviation, and the third loss function is associated with the control variables, the position deviation is the deviation between the position of the first vehicle and the target driving lane, and the speed deviation is the deviation between the speed of the first vehicle and a reference speed of the target driving lane; Adding the output of the first loss function, the output of the second loss function, and the output of the third loss function to obtain a first sum; summing the first sum values of the plurality of time steps to obtain a target sum value; Based on the dynamic mathematical model of the first vehicle, taking the driving variables of the plurality of time steps that minimize the target sum value as a target driving variable sequence, wherein the target driving variable sequence satisfies a first constraint condition; The first vehicle is controlled to travel within a plurality of the time steps according to the target travel variable sequence.
2. The method according to claim 1, characterized in that The determining, based on the dynamic mathematical model of the first vehicle, the driving variables of the plurality of time steps that minimize the target sum value as a target driving variable sequence includes: Linearizing the dynamic mathematical model to obtain a linearized model; adding a collision cost value to the target sum value, wherein the collision cost value is associated with a first vehicle speed difference and a second vehicle speed difference, the first vehicle speed difference being the difference between a speed of a target vehicle and a speed of the first vehicle, the target vehicle being a vehicle located in the target driving lane and ahead of the first vehicle in the forward direction of the first vehicle, and the second vehicle speed difference being the difference between a speed of an adjacent vehicle and the first vehicle, the adjacent vehicle being a vehicle that is less than a preset distance threshold from the first vehicle; Acquiring driving status information of surrounding vehicles, wherein the surrounding vehicles include the target vehicle and the adjacent vehicles; Based on the linearized model and the driving state information of the surrounding vehicles, the driving variables of the plurality of time steps that minimize the target sum are used as a first driving variable sequence, wherein the first driving variable sequence satisfies a second constraint condition, and the second constraint condition includes the first constraint condition; determining a plurality of decision variables in the first driving variable sequence as a first variable sequence; Determining a second variable sequence based on the dynamic mathematical model using the first variable sequence, wherein the second variable sequence includes a plurality of state variables of the time steps and a plurality of control variables of the time steps; The first variable sequence and the second variable sequence are combined to obtain the target driving variable sequence.
3. The method according to claim 2, characterized in that The method of using the first variable sequence and determining the second variable sequence based on the dynamic mathematical model includes: Determine a reference position and a reference speed of the vehicle in a plurality of the time steps according to the first variable sequence, and use the reference position and the reference speed of the vehicle in the plurality of the time steps as a reference state variable sequence; determining a target loss value according to a deviation between a state variable of the vehicle in a plurality of the time steps and the reference state variable sequence, and a control variable of the vehicle in a plurality of the time steps; Based on the dynamic mathematical model, the state variables and control variables of the multiple time steps that minimize the target loss value are used as the second variable sequence, and the second variable sequence satisfies a third constraint condition, and the third constraint condition includes the first constraint condition.
4. The method according to claim 3, characterized in that The third constraint condition includes that the position of the first vehicle is outside the target ellipse of each of the surrounding vehicles, wherein the target ellipse is an ellipse centered on the position of the surrounding vehicle, and the target ellipse is determined based on the preset major axis and preset minor axis corresponding to the surrounding vehicles, and the heading angle of the surrounding vehicles.
5. The method according to claim 3, characterized in that The control variables include the acceleration and steering angle of the first vehicle, and the third constraint condition includes that the acceleration of the first vehicle is greater than or equal to a first preset acceleration and less than or equal to a second preset acceleration, and the steering angle of the first vehicle is greater than or equal to the first preset steering angle and less than or equal to the second preset steering angle.
6. The method according to claim 2, characterized in that The second constraint condition includes that the first difference between the speed of the target vehicle and the speed of the first vehicle is greater than or equal to the negative of the first product of the first preset parameter and the preset binary variable; the second constraint condition also includes that the first difference is less than or equal to the second difference between the second product and the second preset parameter, the second product is the product of the first preset parameter and the third difference, the third difference is the difference between 1 and the preset binary variable, and the preset binary variable is 0 or 1.
7. The method according to claim 1, characterized in that The control variables include the acceleration and steering angle of the first vehicle, and the output of the third loss function is the sum of a third product and a fourth product, the third product is the product of a first preset weight and the square of the steering angle of the first vehicle, and the fourth product is the product of a second preset weight and the square of the acceleration of the first vehicle.
8. A vehicle control device, characterized in that: The device comprises: A construction module, used to construct a first loss function, a second loss function, and a third loss function; The inputs of the first loss function, the second loss function, and the third loss function all include driving variables of the first vehicle within a single time step, the driving variables including decision variables, state variables, and control variables, the decision variables are used to characterize the target driving lane of the first vehicle, the state variables are used to characterize the driving state and position of the first vehicle, the control variables are used to characterize control parameters of the first vehicle, and the control parameters are used to instruct the first vehicle to change the driving state, the first loss function is associated with a position deviation, the second loss function is associated with a speed deviation, and the third loss function is associated with the control variables, the position deviation is the deviation between the position of the first vehicle and the target driving lane, and the speed deviation is the deviation between the speed of the first vehicle and a reference speed of the target driving lane; A first calculation module, configured to add an output of the first loss function, an output of the second loss function, and an output of the third loss function to obtain a first sum; a second calculation module, configured to sum the first sum values of the plurality of time steps to obtain a target sum value; a determination module configured to, based on a dynamic mathematical model of the first vehicle, determine the driving variables of the plurality of time steps that minimize the target sum as a target driving variable sequence, wherein the target driving variable sequence satisfies a first constraint condition; A control module is used to control the driving of the first vehicle within a plurality of the time steps according to the target driving variable sequence.
9. An electronic device, characterized in that: The vehicle control method comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the vehicle control method according to any one of claims 1 to 7 is implemented.
10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores instructions, which, when executed by a processor, enable the processor to implement the vehicle control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Vehicle trajectory planning method and device, storage medium and equipment
CN112677995A
Operating vehicle-oriented road side real-time accurate induction method for road confluence area
CN114863708A
Cascade PID automatic driving longitudinal control method based on deep reinforcement learning
CN120003483A
Behavior guidance-based emergency lane changing dangerous scene generation method and system, and medium
CN120162588A
Track planning method and device and terminal equipment
CN120207370A
Cited By
Vehicle control method and device, electronic equipment, vehicle and storage medium
CN120986437A
Vehicle control method and device, electronic device, vehicle and storage medium
CN120986437B