Vehicle control method and device, electronic equipment and medium
By using the iterative quadratic regulator optimization model with Lagrangian multiplier in the vehicle lateral control module, the problem of long-term vehicle lateral control is solved, and efficient and accurate vehicle lateral control is achieved.
Patent Information
- Application Number
- CN202310833300.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-01-07
AI Technical Summary
The solution efficiency of existing vehicle lateral control modules is low, resulting in a longer time-consuming vehicle lateral control.
The iterative quadratic regulator optimization model with Lagrangian multiplier is adopted, combined with the iLQR algorithm and the Lagrangian multiplier method, and the efficient vehicle lateral control is achieved by solving the accurate results and reducing the solution time.
It achieves improved accuracy and time-consuming improvement of vehicle lateral control, can quickly and accurately control the vehicle lateral control, and supports the use of chips with low computing power for control.
Smart Images

Figure CN119261897A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle control method, device, electronic equipment and medium. Background Art
[0002] The vehicle may be provided with a lateral control module, which may control the angular velocity of the vehicle's wheels based on a set lateral control algorithm to achieve the purpose of lateral control of the vehicle's travel.
[0003] At present, the lateral control module of the vehicle can solve the control result of the vehicle wheel angular velocity based on the vehicle lateral dynamics model, and then perform lateral control of the vehicle accordingly. However, the solution efficiency of this implementation method is low, and the lateral control of the vehicle is time-consuming. Summary of the invention
[0004] The embodiments of the present application provide a vehicle control method, device, electronic device and medium, which can solve the problem of high time consumption of vehicle lateral control.
[0005] In a first aspect, an embodiment of the present application provides a vehicle control method, comprising: obtaining target information, the target information including vehicle state reference information of the vehicle at the next moment; solving a set model according to the target information, and vehicle state information and vehicle control information of the vehicle at the current moment, and obtaining a solution result, wherein the set model is an iterative quadratic regulator optimization model with Lagrange multipliers; when the solution result meets the set error requirement, controlling the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result.
[0006] Based on the iLQR algorithm with Lagrange multipliers, the iLQR algorithm can combine the advantages of solution efficiency and Lagrange multiplier method in hard constraints, so that accurate results that meet hard constraints can be obtained, and the solution time is lower. By performing lateral vehicle control according to the solution results of the set model, the vehicle lateral control accuracy of the existing vehicle lateral controller can be achieved, and the time consumption is lower, which can solve the problem of high time consumption of vehicle lateral control.
[0007] In one embodiment, the target information includes vehicle status reference information of the vehicle at a series of time points in the future, and the series of time points includes the time point of the next moment; the solution result also includes vehicle status information of the vehicle at a series of time points; the vehicle control method also includes: when the solution result meets the error requirement, vehicle status display processing is performed according to the vehicle status information of the vehicle at a series of time points.
[0008] By performing vehicle status display processing, users (such as drivers) can be informed of the expected driving conditions of the vehicle in the future time period in real time and intuitively, thus providing a good user experience.
[0009] In one embodiment, the vehicle control method also includes: substituting the solution result into a set function; wherein, the situation where the solution result meets the set error requirement includes: the situation where the result obtained by substituting the solution result into the set function is less than a set error threshold; the set function is used to describe the error between the vehicle state information of the vehicle in the solution result at the future time and the vehicle state reference information of the vehicle in the target information at the future time.
[0010] Based on the set function and error threshold, the set model can be iteratively solved multiple times as needed to obtain an optimal solution result that supports the predicted vehicle state information and the planned vehicle state information, thereby achieving the purpose of the vehicle traveling along the planned path.
[0011] In one embodiment, the target information includes vehicle state reference information of the vehicle at a series of time points in the future, and the series of time points includes the time point of the next moment; the solution result includes vehicle state information and vehicle control information of the vehicle at a series of time points; substituting the solution result into a set function includes: substituting the vehicle state information and vehicle control information at a series of time points in the solution result into the set function respectively to obtain result values at a series of time points; obtaining the maximum result value among the result values at a series of time points; wherein, the case where the solution result meets the set error requirement includes: the case where the maximum result value is less than the error threshold.
[0012] When the solution result includes vehicle status information at multiple time points, by comparing the maximum result child and the error threshold, a quick and accurate determination of whether the solution result is the final solution result in the current cycle can be achieved.
[0013] In one embodiment, the error threshold is greater than zero; the vehicle control method also includes: if the vehicle control information of the vehicle at the next moment in the solution result is not greater than the upper limit value of the vehicle control information, executing the step of controlling the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result; if the vehicle control information of the vehicle at the next moment in the solution result is greater than the upper limit value of the vehicle control information, controlling the vehicle according to the upper limit value of the vehicle control information.
[0014] By setting the error threshold to a small positive value, the number of iterations and the accuracy of the solution can be balanced. By implementing the truncation strategy, it can be ensured that the solution result is always within a reasonable range. In this way, the accuracy and timeliness of the vehicle's lateral control can be guaranteed.
[0015] In one embodiment, the vehicle control method further includes: updating the value of the Lagrange multiplier according to the solution result; and solving the set model again when the solution result does not meet the error requirement.
[0016] By updating the values of relevant parameters of the setting model in real time and solving the problem multiple times, a solution that meets the error requirements can usually be obtained as the final solution of the current cycle.
[0017] In one embodiment, the inequality constraints in the setting model are obtained according to the maximum and minimum values of the vehicle drive wheel angle and the maximum and minimum values of the vehicle drive wheel angular velocity; the vehicle control information in the solution result includes the vehicle drive wheel angular velocity, and the vehicle state information in the solution result includes the vehicle drive wheel angle; the vehicle drive wheel angle and the vehicle drive wheel angular velocity in the solution result meet the inequality constraints; according to the vehicle control information of the vehicle at the next moment in the solution result, the vehicle is controlled, including: controlling the vehicle drive wheel angular velocity of the vehicle at the next moment to be the vehicle drive wheel angular velocity of the vehicle at the next moment in the solution result.
[0018] By using the maximum and minimum values of the vehicle's front wheel steering angle, and the maximum and minimum values of the vehicle's front wheel angular velocity, to construct inequality constraints in the boundary constraints of the setting function, the solved vehicle control information can be realized, thereby achieving accurate vehicle lateral control.
[0019] In a second aspect, an embodiment of the present application provides a vehicle control device, comprising: an acquisition module, used to acquire target information, the target information including vehicle state reference information of the vehicle at the next moment; a processing module, used to solve a set model according to the target information, and vehicle state information and vehicle control information of the vehicle at the current moment, to obtain a solution result, wherein the set model is an iterative quadratic regulator optimization model with Lagrange multipliers; a control module, used to control the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result when the solution result meets the set error requirement.
[0020] In a third aspect, an embodiment of the present application provides an electronic chip, comprising: a processor, which is used to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the electronic chip is triggered to execute any method as in the first aspect.
[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising at least one processor, wherein the processor and a memory are coupled, the memory is used to store computer program instructions, and the processor is used to execute the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute a method as described in any one of the first aspects.
[0022] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes any method in the first aspect.
[0023] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program runs on a computer, it enables the computer to execute any method in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 A schematic flow chart of a vehicle control method provided by an embodiment of the present application;
[0026] Figure 2 A schematic diagram of a vehicle control process based on the AL-iLQR optimization model provided in one embodiment of the present application;
[0027] Figure 3 A block diagram of a vehicle control device provided by one embodiment of the present application;
[0028] Figure 4 A schematic diagram of the structure of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0030] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0031] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0032] It should be understood that the term "at least one" used in this article refers to one or more, and "plurality" refers to two or more. The term "and / or" used in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, wherein a, b, c can be single or multiple.
[0033] It should be understood that, although the terms first, second, etc. may be used to describe the set thresholds in the embodiments of the present application, these set thresholds should not be limited to these terms. These terms are only used to distinguish the set thresholds from each other. For example, without departing from the scope of the embodiments of the present application, the first set threshold may also be referred to as the second set threshold, and similarly, the second set threshold may also be referred to as the first set threshold.
[0034] The vehicle may be provided with a lateral control module, which may solve a set lateral control algorithm and control the vehicle's wheel angular velocity according to the solution result to achieve the purpose of lateral control of the vehicle's travel.
[0035] In one embodiment, the controlled wheel angular velocity may be the angular velocity of the driving wheel of the vehicle. In one embodiment, the driving wheel of the vehicle may be the front wheel of the vehicle, and the controlled wheel angle may be the front wheel angle of the vehicle. In another embodiment, the driving wheel of the vehicle may also be the rear wheel of the vehicle. Below, the technical implementation of the embodiment of the present application is described by taking the control of the front wheel angular velocity as an example.
[0036] In a related technology, the lateral control module of the vehicle can solve the control result of the angular velocity of the front wheels of the vehicle based on the lateral dynamics model of the vehicle, and then perform lateral control of the vehicle accordingly. However, the solving efficiency of this implementation method is low, and the lateral control of the vehicle is time-consuming.
[0037] The vehicle lateral dynamics model may include the following formulas (1) to (3):
[0038]
[0039]
[0040]
[0041] Where y represents the lateral position of the vehicle, v represents the speed of the vehicle (or vehicle speed), θ represents the heading angle of the vehicle, k represents the understeering coefficient of the vehicle, δ represents the front wheel turning angle of the vehicle, and ω represents the front wheel turning angular velocity. It means to take the derivative of y.
[0042] In order to improve the efficiency of solving the control results of the vehicle's front wheel angular velocity and reduce the time consumption of vehicle lateral control while maintaining the vehicle's lateral control performance, the embodiment of the present application can convert the vehicle lateral control problem based on the vehicle lateral dynamics model into an iLQR (iterative Linear Quadratic Regulator) optimization problem by setting a cost function and boundary constraints. In this way, the control result of the vehicle's front wheel angle can be obtained by solving the cost function based on the limitations of the boundary constraints.
[0043] In a feasible implementation, the iLQR optimization model may involve the following formulas (4) to (7):
[0044]
[0045] stx k+1 =f(x k ,u k ) (5)
[0046] g k (x k ,u k )≤0 (6)
[0047] h k (x k ,u k )=0 (7)
[0048] Among them, l N (x N ) and l k (x k ,u k ) are both quadratic cost functions, g k (x k ,u k ) represents the inequality constraint, h k (x k ,u k ) represents the equality constraint, f(x k ,u k ) represents the system equation, N represents the total number of prediction steps, k represents the kth step of the prediction, x N represents the vehicle status information at step N, xk represents the vehicle status information at the kth step, u k represents the vehicle control information at the kth step, min represents the minimum value, x0 represents the current vehicle state information (or the initial vehicle state information, the vehicle state information at the 0th step), and u0 represents the current vehicle control information (or the initial vehicle control information, the vehicle control information at the 0th step).
[0049] In one embodiment of the present application, the vehicle state information (x) may include the lateral position of the vehicle (y), the heading angle of the vehicle (θ) and the front wheel turning angle (δ) of the vehicle, and the vehicle control information (u) may include the front wheel turning angular velocity (ω) of the vehicle.
[0050] Among them, the vehicle status information from step 0 to step N [x0, x1, ..., x N ] can be: [(y0, θ0, ω0), (y1, θ1, ω1),..., (y N ,θ N ,ω N )].
[0051] Among them, the vehicle control information from step 0 to step N-1 [u0,u1,...,u N-1 ] can be: [ω0,ω1,……,ω N-1 ].
[0052] As shown in formula (5), the vehicle state information and vehicle control information of the vehicle at any time (such as the kth step) can be used to predict the vehicle state information at the next time (such as the k+1th step). For example, x1 can be predicted based on x0 and u0, and x1 and x ref,1 (x ref,1 represents the vehicle state reference information at step 1) to predict u1, and then x2 can be predicted based on x1 and u1, and x2 and x ref,2 Predict u2, and repeat this cycle. You can get u2 according to x N-1 and x ref,N-1 Predict u N-1 , and then according to x N-1 and u N-1 Predict x N .
[0053] In one embodiment, the vehicle state reference information (x ref,1 ~x ref,N ), considering that even according to x N and x ref,N Predict u N , and according to x N and u N Predict xN+1 After that, since there is no x ref,N+1 , so it is impossible to use x N+1 and x ref,N-1 Predict u N-1 , then in the process of solving the iLQR optimization model once, it can be predicted that x(x N ), no longer predict x(x at step N+1 N+1 ), and we can predict u(u at step N-1) N ), no longer predict u(u at step N) N ).
[0054] In such an embodiment, when the total number of prediction steps is N, a set of vehicle state information obtained by solving the iLQR optimization model may include the vehicle state information [x1, x2, ..., x N ], a set of vehicle control information obtained by solving the iLQR optimization model may include the vehicle state information [u1,u2,…,u N-1 ].
[0055] Since x can be predicted from 1 to N steps and u can be predicted from 1 to N-1 steps, the cost function involved in the iLQR optimization model can include the terminal constraint control quantity and the process constraint control quantity as shown in the above formula (4). The terminal constraint control quantity is l N (x N ), the process constraint control quantity is l k (x k ,u k ). As shown in formula (4), when x and u (for example, x* and u*) obtained by solving the iLQR optimization model are substituted into the cost function in formula (4), the result obtained is not greater than the result obtained when other x and u are substituted into the cost function in formula (4). That is, the error between x* and the vehicle state reference information is not greater than the error between other x and the vehicle state reference information.
[0056] As shown in formula (6), the vehicle state information and vehicle control information obtained by solving the iLQR optimization model should comply with the inequality constraints defined by formula (6).
[0057] In one embodiment, the type of inequality constraint can be a soft constraint. In this way, when a set of x and u does not meet the inequality constraint (for example, the solution result does not fall within the constraint range of the inequality constraint), based on the soft constraint effect of the inequality constraint, the values of x and / or u can be constrained so that the next set of x and u can better meet the inequality constraint, and so on.
[0058] Based on the soft constraint effect of the inequality constraint, when each group of x and u is brought into the cost function in formula (4), the result obtained can show a trend of gradually decreasing and then gradually increasing. Then the group of x and u corresponding to the lowest point in the trend can be a group of x and u that conforms to formula (4), and this group of x and u can be the solution result (i.e., x* and u*) obtained by solving the iLQR optimization model this time. Since the type of inequality constraint can be a soft constraint, the solution result (i.e., x* and u*) can conform to the inequality constraint, or it can be basically close to the inequality constraint, but it does not conform to the inequality constraint.
[0059] In one embodiment of the present application, the boundary constraints set may include the above formula (6) but not the above formula (7), that is, the lateral control of the vehicle may involve inequality constraints but not equality constraints.
[0060] For example, considering that the value of the front wheel turning angle (δ) of the vehicle is not an arbitrary value, in one embodiment, the inequality constraint in the above boundary constraint can be set based on the restriction on the front wheel turning angle of the vehicle, for example, according to the maximum and / or minimum value that can be achieved by the front wheel turning angle of the vehicle.
[0061] For another example, considering that the value of the vehicle's front wheel angular velocity (ω) is not an arbitrary value, in one embodiment, the inequality constraint in the above boundary constraint can be set based on the restriction on the vehicle's front wheel angular velocity, for example, according to the maximum and / or minimum achievable value of the vehicle's front wheel angular velocity.
[0062] In one embodiment of the present application, the specific implementation of the above formula (6) can be shown as the following formula (8):
[0063]
[0064] Among them, δ max Indicates the maximum value of the vehicle's front wheel turning angle, δ min Represents the minimum value of the vehicle's front wheel turning angle, ω max Represents the maximum value of the vehicle's front wheel angular velocity, ω min Indicates the minimum value of the vehicle's front wheel angular velocity.
[0065] In one embodiment, the maximum value and the minimum value of the front wheel turning angle of the vehicle may be a positive value and a negative value respectively, and the absolute values of the two are equal, and the positive and negative signs are used to indicate different directions.
[0066] In one embodiment, the maximum value and the minimum value of the front wheel angular velocity of the vehicle may be a positive value and a negative value, respectively, and the absolute values of the two are equal, and the positive and negative signs are used to indicate different directions.
[0067] In another embodiment of the present application, the above formula (6) can be limited to |δ|≤δ max and / or |ω|≤ω max , where |δ| represents the absolute value of δ, and |ω| represents the absolute value of ω.
[0068] By using the maximum and minimum values of the vehicle's front wheel steering angle, and the maximum and minimum values of the vehicle's front wheel angular velocity, to construct the inequality constraints in the above boundary constraints, the solved vehicle control information can be basically realized, thereby enabling accurate vehicle lateral control.
[0069] In one feasible implementation, the cost function l in the above formula (4) is N (x N The specific implementation of ) may involve the following formula (9):
[0070] l N (x N )=1 / 2×w N (x N –x ref,N ) T (x N -x ref,N ) (9)
[0071] Among them, w N Represents the weight of the system error of vehicle state information at the Nth step, x ref,N represents the reference value of the vehicle state information at the Nth step (or the vehicle state reference information at the Nth step), and T represents transposition.
[0072] In one embodiment, the reference value of the vehicle state information may be generated by a path planning module, and the reference value of the vehicle lateral position at steps 1 to N may be the lateral position of the vehicle at corresponding time points in the driving path planned by the path planning module.
[0073] In one feasible implementation, the cost function l in the above formula (4) is k (x k ,u k The specific implementation of ) can be shown as the following formula (10):
[0074] l k (x k ,u k )=1 / 2×(x k –x ref,k ) T w k (x k -x ref,k )+1 / 2×u k T wk u k (10)
[0075] Among them, w k represents the weight of the system error of the vehicle state information at the kth step, x ref,k Represents the reference value of the vehicle state information at the k-th step (or the vehicle state reference information at the k-th step).
[0076] As shown in formula (9), formula (10) and formula (4), when solving the iLQR optimization model according to the reference value of the vehicle state information, the cost function in formula (4) can reflect the error between the solved vehicle state information and the vehicle state reference information. The solved vehicle state information can be closer to the corresponding reference value than other vehicle state information. By controlling the vehicle according to the solved vehicle control information, the vehicle can have the solved vehicle state information. In this way, the purpose of controlling the vehicle to travel along the planned path can be achieved.
[0077] In one embodiment, the solution process of the iLQR optimization model may include two stages: backwardPass (backward propagation) and forwardPass (forward propagation). In the backwardPass stage, a set of control gains can be obtained, and then in the forwardPass stage, the vehicle state information (x*) and vehicle control information (u*) that meet the iLQR optimization model can be calculated based on the set of control gains.
[0078] In a feasible implementation, in the backwardPass stage, see the following formula (11) and formula (12), and the control gain K1 and the control gain K2 can be obtained.
[0079]
[0080]
[0081] Among them, K1 and K2 are control gains, Q uu , Q u , Q ux Both represent the coefficient matrices obtained by Taylor expansion of the above cost function and the above system equations.
[0082] In a feasible implementation, in the forwardPass stage, see the following formula (13) and the above formula (5), the vehicle state information (x*) and vehicle control information (u*) that satisfy the iLQR optimization model can be solved based on the obtained K1 and K2.
[0083] u k =uk-1 +K2(x k -x ref,k )+αK1 (13)
[0084] Among them, α represents a parameter in the iLQR algorithm, which can refer to the step size of the linear search process.
[0085] As shown in the above formula (5), the vehicle state information of the vehicle at the next moment (for example, at the k+1th step) can be predicted based on the vehicle state information and vehicle control information of the vehicle at any moment (for example, at the kth step).
[0086] As shown in formula (13), the vehicle control information (i.e., u ) that the vehicle should have at any time (e.g., at the kth step) can be solved based on the error between the vehicle state information at any time (e.g., at the kth step) and the reference value of the vehicle state information at that time, and based on the vehicle control information that the vehicle already has at that time (i.e., the vehicle control information at the k-1th step), and combined with K1 and K2. k ) so that the vehicle has the solved vehicle control information (i.e. u k ), the vehicle state information of the vehicle at the next moment can be closer to the reference value of the vehicle state information at the next moment. This cycle can make the actual driving trajectory of the vehicle closer to the driving trajectory planned by the path planning module. In this way, the purpose of controlling the vehicle to travel along the planned path can be achieved.
[0087] In one embodiment, the lateral control module may periodically solve the iLQR optimization model, and may solve the iLQR optimization model once or iteratively multiple times within a cycle to obtain a final solution result of the iLQR optimization model within the current cycle, and then perform lateral control of the vehicle in the current cycle based on the final solution result.
[0088] In any model solving process of any cycle, the vehicle state information (x*) and vehicle control information (u*) that satisfy the iLQR optimization model can be solved based on the vehicle's initial vehicle state information (u0) and initial vehicle control information (x0) by solving the iLQR optimization problem. Among them, each time the iLQR optimization model is solved, the vehicle state information and vehicle control information can be generated once. u0 and x0 in the same cycle are the same.
[0089] In one embodiment, the vehicle control information finally solved in the current cycle may include the vehicle control information at the next moment, and the vehicle control information at the next moment may be used as the initial vehicle control information in the next cycle.
[0090] In one embodiment of the present application, if the vehicle status information and vehicle control information generated by the current solution of the iLQR optimization model meet the set error requirements, the current solution result can be considered as the final solution result in the current cycle; otherwise, the next solution of the iLQR optimization model in the current cycle can be executed until the generated solution result meets the error requirements.
[0091] After obtaining the final solution result of the iLQR optimization model, the vehicle control information in the final solution result can be used to control the front wheel angular velocity of the vehicle at the next moment, so that the front wheel angular velocity of the vehicle at the next moment is the corresponding wheel angular velocity in the final solution result, and the vehicle prediction state can be displayed in real time based on the vehicle state information in the final solution result, so that the user can know the expected movement state of the vehicle in real time.
[0092] Considering that a single iLQR optimization problem may have a solution that exceeds the constraints, resulting in a non-optimal solution or a solution failure, the embodiment of the present application can convert the constrained problem into an augmented unconstrained optimization problem by adding a parameter item of the Lagrange multiplier (such as AL), so as to achieve the purpose of further processing the constraint item on the iLQR optimization problem, thereby ensuring that the solution result is within the constraint range. By adding AL to the iLQR optimization problem, the iLQR optimization problem can be converted into an AL-iLQR optimization problem. Among them, the Chinese interpretation of AL (Augmented Lagrangian) is augmented Lagrangian operator.
[0093] In one embodiment, by adding Lagrange multipliers, the cost function in the iLQR optimization model (such as the cost function in the above formula (4)) can be modified into a cost function with Lagrange multipliers.
[0094] In one embodiment of the present application, based on the cost function without Lagrange multipliers in the above formula (4), the cost function with Lagrange multipliers can be shown as the following formula (14):
[0095]
[0096] Among them, C(x,u,λ,μ) represents the cost function with Lagrange multipliers, λ represents the Lagrange multiplier, μ represents the penalty weight (or penalty weight), c N (x N ) and c k (x k ,u k ) are both cost functions, λ N represents the diagonal matrix of Lagrange multipliers at the Nth step, λ k represents the diagonal matrix of Lagrange multipliers at the kth step, IμN Represents the penalty weight diagonal matrix at step N, I μk Represents the penalty weight diagonal matrix at the kth step.
[0097] In one embodiment, the constraints required for vehicle control can be added to the newly introduced c N (x N ) and c k (x k ,u k ) in these two cost functions.
[0098] When the cost function in the above formula (4) is replaced by the cost function with Lagrange multipliers as shown in the above formula (14), the following formula (15) can be obtained:
[0099]
[0100] Thus, in one embodiment, the AL-iLQR optimization model may include formula (15) and formulas (5) to (7). In another embodiment, the vehicle lateral control may not involve equality constraints, and the AL-iLQR optimization model may include formula (15) and formulas (5) to (6).
[0101] In one embodiment of the present application, by using a cost function with Lagrange multipliers, the vehicle state information (x*) and vehicle control information (u*) that satisfy the AL-iLQR optimization model can be solved by solving the AL-iLQR optimization problem. The AL-iLQR optimization problem can be solved in accordance with the solution method of the iLQR optimization model, and the AL-iLQR optimization model solution process can include the above-mentioned backwardPass and forwardPass two stages. By solving the AL-iLQR optimization model through these two stages, the vehicle state information (x*) and vehicle control information (u*) that satisfy the AL-iLQR optimization model can be solved.
[0102] In addition, combined with the set error requirements, the final solution result of the AL-iLQR optimization model in any cycle can be obtained by solving the AL-iLQR optimization model once or iteratively multiple times. After obtaining the final solution result of the AL-iLQR optimization model, the vehicle control information in the final solution result can be used to control the front wheel angular velocity of the vehicle at the next moment, and the vehicle prediction state can be displayed in real time according to the vehicle state information in the final solution result.
[0103] In a feasible implementation, the penalty weight diagonal matrix at the kth step can be obtained by the following formula (16):
[0104]
[0105] Among them, I μk,i Represents the penalty weight diagonal matrix at the kth step (I μk ), the value of the i-th weight in ki represents the Lagrange multiplier diagonal matrix (λ k ) is the value of the i-th multiplier, μ ki Represents the i-th weight value in the penalty weight at the k-th step.
[0106] Wherein, i may correspond to one of a plurality of vehicle parameters, which may include lateral position (y), heading angle (θ), and front wheel steering angle (δ). For example, in an exemplary implementation, λ k It includes the values of three multipliers, which correspond to the three parameters y, θ, and δ respectively.
[0107] In one embodiment of the present application, the Lagrangian multiplier (λ) and the penalty weight (μ) can be updated according to the final solution result of the AL-iLQR optimization model in the current cycle through the following formulas (17) and (18), so that in the next cycle, the Lagrangian multiplier (λ) and the penalty weight (μ) can be updated according to the updated Lagrangian multiplier (λ) UPD ) and the updated penalty weight (μ UPD ) to solve the AL-iLQR optimization model. UPD means update.
[0108]
[0109]
[0110] Where φ represents the scaling factor, and φ>1, Indicates the corresponding λ ki The updated value of Indicates the corresponding μ ki , x* represents the vehicle state information that satisfies the AL-iLQR optimization model, and u* represents the vehicle control information that satisfies the AL-iLQR optimization model. Wherein, i may correspond to one of a plurality of vehicle parameters, which may include a lateral position (y), a heading angle (θ), and a front wheel steering angle (δ).
[0111] In one embodiment, when the boundary constraint includes performing an inequality constraint on the lateral position according to the lateral coordinates of the boundaries on both sides of the road, the lateral position (y) belongs to the inequality constraint.
[0112] In one embodiment, when the boundary constraint includes an inequality constraint on the heading angle according to the maximum heading angle and the minimum heading angle, the heading angle (θ) belongs to the inequality constraint.
[0113] In one embodiment, when the boundary constraint includes an inequality constraint on the front wheel turning angle according to the maximum front wheel turning angle and the minimum front wheel turning angle, the front wheel turning angle (δ) belongs to the inequality constraint.
[0114] In one embodiment of the present application, in order to solve the AL-iLQR optimization model, the AL-iLQR algorithm loop exit condition can be set to the following formula (19):
[0115] max(c(x*,u*))<tol (19)
[0116] Among them, max(c(x*,u*)) represents the x* and u* (in the case where the solution does not include u*) obtained at each step of solving the AL-iLQR optimization model. N In the case of x*1~x* N-1 and u*1~u* N-1 ) are substituted into the cost function c k (x k ,u k ) is the maximum value among the results obtained, and tol represents the error threshold.
[0117] If the maximum value is less than the error threshold, it can be considered that x* and u* at any step are substituted into the cost function c k (x k ,u k ) are all smaller than the error threshold, that is, it can be considered that the error between the solved vehicle state information and the vehicle state reference information is small and meets the requirements, then the front wheel angular velocity of the vehicle at the next moment can be controlled according to the solved vehicle control information.
[0118] If formula (19) holds true, it can be considered that the solution meets the error requirement, otherwise it does not meet the error requirement.
[0119] In one embodiment, tol = 0 can be set. When tol = 0, by solving the AL-iLQR optimization model, if the solution is successful, an optimal solution that satisfies all set constraints can be obtained, and the optimal solution can make the solved vehicle state information consistent with the planned vehicle state reference information.
[0120] After the Lagrange multiplier is introduced, the set cost function needs to always satisfy the set inequality constraints. Considering that when tol=0 is set, many invalid iterations of the AL-iLQR algorithm near the optimal solution will be increased, resulting in increased solution time, and even the situation where the optimal solution cannot be obtained at all, in order to take into account the solution accuracy and time-consuming performance of the AL-iLQR algorithm, tol can be set to a small positive value (such as tol≤0.1), and the algorithm iterative calculation process can be accelerated by losing a smaller degree of error requirements (or relaxing constraints). In this way, the constraints can be satisfied with fewer iterations, so that a solution close to the optimal solution (or quasi-optimal solution) can be quickly obtained.
[0121] In one embodiment, 0<tol≤0.05 may be set.
[0122] Considering that the set inequality constraint is a soft constraint, there may be a situation where the solution result exceeds the constraint. Therefore, in one embodiment of the present application, as shown in the following formula (20), the solution result can be judged to be over-constrained, and truncation processing can be performed when it is judged to be over-constrained. By performing truncation processing as needed, the validity of the set inequality constraint can be guaranteed, so that the solution result can always be within the feasible area range, that is, the solution result is reasonable.
[0123] |u * k |=constrain_valueIf |u * k |>contrain_value (20)
[0124] Among them, |u * k | represents u at the kth step * The absolute value of constrain_value (control value) represents the upper limit of the control output (a positive value), that is, the upper limit of the vehicle control information. * k | is greater than the upper limit, then |u * k |The updated value is the upper limit value (with the positive and negative signs unchanged), otherwise no processing is performed. In this way, the absolute value of the vehicle control information at each step after the truncation processing is not greater than the upper limit value of the vehicle control information.
[0125] In one embodiment, contrain_value may be the above-mentioned ω max .
[0126] In one embodiment of the present application, the super constraint judgment can also be to judge u * kIs it satisfied? min <u * k <ω max , if satisfied, no processing is done, if u * k <ω min Then u * k The value of is updated to ω min , if u * k >ω max Then u * k The value of is updated to ω max .u * k The positive and negative signs are used to indicate different directions.
[0127] like Figure 1 As shown, an embodiment of the present application provides a vehicle control method, which may include the following steps 101 to 103.
[0128] In one embodiment, the execution subject of the vehicle control method may be a vehicle, and the vehicle may be a vehicle with an automatic driving function.
[0129] In one embodiment, the vehicle control method can be applied to any vehicle lateral control scenario, such as a vehicle turning scenario, a vehicle lane changing scenario, etc.
[0130] Step 101, obtaining target information, where the target information includes vehicle state reference information of the vehicle at the next moment.
[0131] In one embodiment, the target information may be generated by a planning model of the vehicle through periodic path planning. The planning module may periodically output the target information required for solving the setting model.
[0132] In one embodiment, the target information may further include a reference value of the vehicle speed at the next moment.
[0133] In one embodiment, the vehicle planning module can generate vehicle status reference information corresponding to the scene in which the vehicle is located.
[0134] In one embodiment of the present application, the target information includes vehicle state reference information at a series of future time points, where the series of time points includes the time point of the next moment. In such an embodiment, the target information may include vehicle state reference information (x) at the 1st to Nth steps (the time interval between two adjacent steps may be the duration of a cycle) predicted in the current cycle. ref ), for example, they are x ref,1 、x ref,2,……,x ref,N That is, the target information may be a set of vehicle status reference information.
[0135] In another embodiment, the target information may include x ref,1 The moment of step 0 can be the current moment, then x ref,1 It is the vehicle status reference information of the vehicle at the next moment.
[0136] Step 102, according to the target information, and the vehicle state information and vehicle control information of the vehicle at the current moment, solve the set model to obtain a solution result, wherein the set model is an iterative quadratic regulator optimization model with Lagrange multipliers (such as AL-iLQR optimization model). The solution result includes the vehicle control information of the vehicle at the next moment.
[0137] In one embodiment, the vehicle state information may include the lateral position, heading angle, and front wheel turning angle of the vehicle, and the vehicle control information may be the front wheel turning angular velocity of the vehicle.
[0138] In one embodiment, before solving the set model, some parameters involved in the set model, such as Lagrange multiplier (λ), penalty weight (μ), scaling factor (φ), error threshold (tol), can be initialized to support subsequent solutions to the set model. In one embodiment, tol can be initialized to a small positive value, such as 0.05.
[0139] In one embodiment, the initial values of some parameters of the setting model (such as Lagrange multiplier λ, penalty weight μ, scaling factor φ) can be determined by shunting in the setting scenario, and the upper limits of these parameters can also be determined as needed.
[0140] The vehicle state information and vehicle control information of the vehicle at the current moment are x0 and u0 of the vehicle in the current cycle. The set model can be solved based on x0 and u0, as well as the target information and the set model-related parameters to obtain a solution that satisfies the set model.
[0141] If the target information includes vehicle state reference information of the vehicle at a series of future time points, and the series of time points includes the time point of the next moment, then in one embodiment of the present application, the obtained solution result may include vehicle control information of the vehicle at the series of time points. The vehicle control information can be used to achieve the purpose of vehicle control.
[0142] In such an embodiment, the solution result may include the vehicle control information (u*) predicted at the 1st to N-1st steps in the current cycle, such as u*1, u*2, ..., u* N-1 .
[0143] In another embodiment, the solution result may include u*1. u*1 is the predicted vehicle control information of the vehicle at the next moment.
[0144] If the target information includes vehicle status reference information of a series of future time points, and the series of time points includes the time point of the next moment, then in one embodiment of the present application, the obtained solution result may also include vehicle status information of the vehicle at the series of time points. The vehicle status information may be used to achieve the purpose of displaying the vehicle status.
[0145] In such an embodiment, the solution result may include the vehicle state information (x*) predicted at the 1st to Nth steps in the current cycle, such as x*1, x*2, ..., x* N .
[0146] In another embodiment, the solution result may include x*1. x*1 is the predicted vehicle state information of the vehicle at the next moment.
[0147] Step 103, when the solution meets the set error requirement, the vehicle is controlled according to the vehicle control information of the vehicle at the next moment in the solution.
[0148] In one embodiment, when the solution result does not meet the error requirement, the set model is solved again.
[0149] After obtaining the solution result of the set model, it is also possible to further determine whether the result of the current solution meets the preset error requirement. The error requirement can be used to indicate whether the error between the predicted information obtained and the reference information obtained is in line with expectations. For example, the error requirement can be used to require that the deviation between the vehicle control information of the vehicle at the next moment in the solution result and the vehicle state reference information of the vehicle at the next moment is not greater than the expected error threshold.
[0150] If the solution result meets the error requirement, it can be considered that by controlling the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result, the vehicle state of the vehicle at the next moment can meet or substantially meet the vehicle state reference information of the vehicle at the next moment, that is, the vehicle control can be performed according to the vehicle control information of the vehicle at the next moment in the solution result. In this way, by judging whether the solution result meets the error requirement, it can be determined whether the current solution result is the final solution result of the current cycle.
[0151] If the error requirement is met, the current solution result is the final solution result of the current cycle, and there is no need to perform the next iterative solution in the current cycle. If the error requirement is not met, the current solution result is not the final solution result of the current cycle, and the next iterative solution in the current cycle is required, and the cycle is repeated until a solution result meets the error requirement, thereby completing the iterative solution of the current cycle.
[0152] In one embodiment, a maximum number of iterations of a set model may be set. When the number of completed iterations reaches the maximum number of iterations but still does not meet the error requirement, the solution of the set model may be exited and the solution failure may be determined.
[0153] In one embodiment of the present application, the vehicle control method also includes: substituting the solution result into a set function; wherein, the situation where the solution result meets the set error requirement includes: the result obtained by substituting the solution result into the set function is less than a set error threshold (such as the above-mentioned tol); the set function is used to describe the error between the vehicle state information of the vehicle in the solution result at the future time and the vehicle state reference information of the vehicle in the target information at the future time.
[0154] If the result of substituting the solution into the set function is less than the error threshold, it can be considered that the predicted vehicle state is slightly different from the reference value of the vehicle state. Therefore, the vehicle can be controlled according to the vehicle control information in the solution result, so that the vehicle state after vehicle control is not much different from the planned vehicle state.
[0155] Based on the set function and error threshold, the set model can be iteratively solved multiple times as needed to obtain an optimal solution result that supports the predicted vehicle state information and the planned vehicle state information, thereby achieving the purpose of the vehicle traveling along the planned path.
[0156] In one embodiment, the error threshold may be zero.
[0157] In another embodiment, to avoid too many invalid iterations, the error threshold may be greater than zero, for example, may be a small positive value not greater than 1.
[0158] In order to deal with the situation where the solution result may exceed the constraint when the error threshold is greater than zero, the solution result can be truncated.
[0159] Thus, in one embodiment of the present application, the vehicle control method further includes: if the vehicle control information of the vehicle at the next moment in the solution result is not greater than the upper limit of the vehicle control information, executing the step of controlling the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result. Conversely, if the vehicle control information of the vehicle at the next moment in the solution result is greater than the upper limit of the vehicle control information, controlling the vehicle according to the upper limit of the vehicle control information.
[0160] The vehicle control information in the solution result can be truncated according to the upper limit of the vehicle control information. If the vehicle control information (u*1) of the vehicle at the next moment is greater than the upper limit, there is an over-constraint situation, and truncation processing is required. Specifically, u*1 can be updated to the upper limit. If the vehicle control information (u*1) of the vehicle at the next moment is not greater than the upper limit, there is no over-constraint situation, and no processing is required.
[0161] Based on the same implementation principle, the vehicle control information of the vehicle in the solution result at the next moment can also be judged to be over-constrained according to the lower limit value of the vehicle control information, and truncation processing can be performed as needed according to the judgment result. If it is not over-constrained, no processing is performed and the vehicle control step is executed. If it is over-constrained, the vehicle is controlled according to the lower limit value of the vehicle control information.
[0162] In the case where the solution result includes a set of vehicle control information, each piece of vehicle control information may be truncated as needed, thereby obtaining a set of vehicle control information that is not over-constrained.
[0163] After over-constraint judgment and truncation processing, vehicle control information that is not over-constrained can be obtained, and the vehicle control can be performed accordingly.
[0164] By setting the error threshold to a small positive value, the number of iterations and the accuracy of the solution can be balanced. By implementing the truncation strategy, it can be ensured that the solution result is always within a reasonable range. In this way, the accuracy and timeliness of the vehicle's lateral control can be guaranteed.
[0165] In one embodiment of the present application, the target information includes vehicle state reference information of the vehicle at a series of future time points, the series of time points including the time point of the next moment; the solution result includes vehicle state information and vehicle control information of the vehicle at a series of time points. Based on this, the solution result is substituted into the set function, including: substituting the vehicle state information and vehicle control information at a series of time points in the solution result into the set function respectively, and obtaining the result values at a series of time points; obtaining the maximum result value among the result values at a series of time points; wherein, the case where the solution result meets the set error requirement includes: the case where the maximum result value is less than the error threshold.
[0166] The solution results include a set of vehicle state information (such as the vehicle state information at steps 1 to N) and a set of vehicle control information (such as the vehicle control information at steps 1 to N-1). The vehicle state information and vehicle control information at each step from 1 to N-1 can be substituted into the set function respectively to obtain the result value at the corresponding moment. The result value can reflect the error between the predicted vehicle state at that moment and the vehicle state reference value.
[0167] The maximum value of the result values at each moment can be obtained, and the maximum value can be compared with the error threshold. If the maximum value is less than the error threshold, it can be considered that the error between the predicted vehicle state at each moment and the vehicle state reference value is small and in line with expectations, so the current solution result can be determined as the final solution result in the current cycle.
[0168] On the contrary, if the maximum value is greater than the error threshold, it can be considered that the error between the predicted vehicle state and the vehicle state reference value at at least one moment is large and does not meet expectations. Therefore, it can be determined that the current solution result is not the final solution result in the current cycle, and the next iterative solution of the set function in the current cycle is required.
[0169] When the solution result includes vehicle status information at multiple time points, by comparing the maximum result value and the error threshold, a quick and accurate determination of whether the solution result is the final solution result in the current cycle can be achieved.
[0170] In one embodiment of the present application, after obtaining the solution result, the vehicle control method may further include: updating the value of the Lagrange multiplier according to the solution result. In this way, if the solution result does not meet the error requirement, the set model can be solved again based on the updated Lagrange multiplier to obtain a new solution result.
[0171] In different solution processes of the current cycle, the initial vehicle state information and the initial vehicle control information can be fixed and unchanged, and the target information can be fixed and unchanged, but because the relevant parameters of the setting model are updated and changed based on the previous solution result, the new solution result can be different from the corresponding previous solution result.
[0172] In other embodiments, in addition to updating the values of the Lagrange multipliers, the values of other parameters of the setting model (such as penalty weights) may also be updated according to the solution results.
[0173] By updating the values of relevant parameters of the setting model in real time and solving the problem multiple times, a solution that meets the error requirements can usually be obtained as the final solution of the current cycle.
[0174] After obtaining the final solution result of the current cycle, the vehicle control can be performed according to the final solution result. For example, in one embodiment, the vehicle control information is the front wheel angular velocity of the vehicle, and the front wheel angular velocity of the vehicle at the next moment can be controlled to be the front wheel angular velocity at the next moment in the final solution result, so that the vehicle state information of the vehicle at the next moment can usually be the vehicle state information at the next moment in the final solution result.
[0175] After the vehicle performs lateral control in the current cycle according to the solution result of the current cycle, the planning module can send the target information of the next cycle, and the vehicle can obtain the target information again, that is, execute step 101 again to obtain the target information of the next cycle. The vehicle can realize the vehicle control of the next cycle by executing 101 to step 103 again, and the cycle can achieve the purpose of real-time lateral control of the vehicle.
[0176] By controlling the vehicle control information of the vehicle at the next moment to be the vehicle control information of the vehicle at the next moment in the final solution result within the current cycle, the initial vehicle control information of the vehicle in the next cycle can be the vehicle control information of the vehicle at the next moment in the final solution result within the current cycle. In such an embodiment, after obtaining the final solution result within the current cycle, the initial vehicle control information can be updated according to the vehicle control information of the vehicle at the next moment in the final solution result.
[0177] Based on the iLQR algorithm with Lagrange multipliers, it is possible to combine the advantages of the iLQR algorithm in solution efficiency and the Lagrange multiplier method in hard constraints, so that accurate results that meet hard constraints can be obtained, and the solution time is reduced. By performing lateral vehicle control according to the solution results of the set model, the vehicle lateral control accuracy of the existing vehicle lateral controller can be achieved with lower time consumption, which can solve the problem of high time consumption of vehicle lateral control. In this way, it can support the use of chips with lower computing power for vehicle lateral control.
[0178] The embodiments of the present application can achieve the purpose of lateral control of the vehicle according to a set model by improving the internal algorithm of the lateral control module of the vehicle, without changing the input and output of the lateral control module, and can be adapted to the existing interface of the lateral control module.
[0179] In one embodiment of the present application, the target information includes vehicle status reference information of the vehicle at a series of time points in the future, the series of time points includes the time point of the next moment, and the solution result also includes vehicle status information of the vehicle at a series of time points. The vehicle control method also includes: when the solution result meets the set error requirement, vehicle status display processing is performed according to the vehicle status information of the vehicle at a series of time points.
[0180] For example, the predicted driving trajectory and vehicle status of the vehicle can be displayed based on the vehicle status information of the vehicle at a series of time points. In one embodiment, the expected driving trajectory and expected status of the vehicle in the future period of time can be displayed, and the displayed content is consistent with the various vehicle status information solved.
[0181] By performing vehicle status display processing, users (such as drivers) can be informed of the expected driving conditions of the vehicle in the future time period in real time and intuitively, thus providing a good user experience.
[0182] In one embodiment of the present application, the inequality constraint in the setting model is obtained according to the maximum and minimum values of the vehicle driving wheel angle and the maximum and minimum values of the vehicle driving wheel angular velocity; the vehicle control information in the solution result includes the vehicle driving wheel angular velocity, and the vehicle state information in the solution result includes the vehicle driving wheel angle; the vehicle driving wheel angle and the vehicle driving wheel angular velocity in the solution result meet the inequality constraint. Based on this, according to the vehicle control information of the vehicle at the next moment in the solution result, the vehicle is controlled, including: controlling the vehicle driving wheel angular velocity of the vehicle at the next moment to be the vehicle driving wheel angular velocity (u*1) of the vehicle at the next moment in the solution result.
[0183] By constructing the inequality constraint condition of the setting function based on the maximum and minimum values of the vehicle drive wheel angular velocity, the vehicle drive wheel angular velocity of the vehicle at the next moment can be solved to be no greater than the maximum value of the vehicle drive wheel angular velocity and no less than the minimum value of the vehicle drive wheel angular velocity.
[0184] By using the maximum and minimum values of the vehicle's front wheel steering angle, and the maximum and minimum values of the vehicle's front wheel angular velocity, to construct inequality constraints in the boundary constraints of the setting function, the solved vehicle control information can be realized, thereby achieving accurate vehicle lateral control.
[0185] In one embodiment of the present application, please refer to Figure 2 The vehicle control process based on the AL-iLQR optimization model may include the following steps 201 to 208. Figure 2 For some technical implementations in the illustrated embodiments, please refer to the relevant technical descriptions in other embodiments of the present application and will not be elaborated here.
[0186] Step 201: Initialize the target parameters involved in the AL-iLQR optimization model. The target parameters may include Lagrange multipliers (λ), penalty weights (μ), scaling factors (φ), and error thresholds (tol), where tol is a small positive value.
[0187] Step 202: Obtain a set of vehicle state reference information output by the planning module. The set of vehicle state reference information may include vehicle state reference information at a series of future time points (such as vehicle state reference information at steps 1 to N), and the time of step 0 may be the current time.
[0188] In one embodiment, the vehicle state reference information may include reference values of vehicle state information such as the vehicle's lateral position (y), heading angle (θ), and front wheel steering angle (δ).
[0189] Step 203, solving the AL-iLQR optimization model according to the vehicle state reference information and the target parameters, and according to the initial vehicle state information and the initial vehicle control information of the vehicle, to obtain a set of vehicle state information and a set of vehicle control information.
[0190] A set of vehicle status information may include vehicle status information at a series of time points (such as vehicle status information at steps 1 to N), and a set of vehicle control information may include vehicle control information at the series of time points (such as vehicle control information at steps 1 to N-1).
[0191] Step 204: Update the target parameters according to the obtained set of vehicle state information and the set of vehicle control information. In this way, the target parameters can be updated in real time.
[0192] In one embodiment, the Lagrange multiplier (λ) and the penalty weight (μ) in the target parameter may be updated. The error threshold (tol) is used to indicate the threshold of the error between the prediction information and the reference information, and thus may remain unchanged.
[0193] In one embodiment, the target parameters may be updated according to the above formula (17) and formula (18).
[0194] Step 205, determining whether the obtained set of vehicle state information and the obtained set of vehicle control information meet the set error requirements, if so, executing step 206, otherwise executing step 203 again to perform the next iterative calculation.
[0195] In one embodiment, the error requirement may be as shown in the above formula (19).
[0196] In another embodiment of the present application, step 204 of updating the target parameters may also be executed when the determination in step 205 is no, and then the next iterative calculation is performed according to the updated target parameters.
[0197] Step 206 , performing over-constraint judgment on the obtained set of vehicle control information, and performing truncation processing when it is judged to be over-constrained to obtain a set of vehicle control information that does not exceed the constraint, and executing steps 207 and 208 .
[0198] In one embodiment, the truncation process can be implemented by the above formula (20).
[0199] When it is determined that the constraint is not exceeded, no processing is required, that is, the obtained set of vehicle control information is a set of vehicle control information that does not exceed the constraint.
[0200] Step 207 , updating the initial vehicle control information of the vehicle according to a set of vehicle control information that is not over-constrained, and executing step 202 again to solve the AL-iLQR optimization model for the next cycle.
[0201] The initial vehicle control information in step 203 is the vehicle control information of the vehicle at the current time (at step 0), and is the initial vehicle control information in the current cycle. When it is judged as yes in step 205, the AL-iLQR optimization model solution of the current cycle has been completed, so the initial vehicle control information can be updated according to the vehicle control information obtained at the next moment (at step 1), so that the updated initial vehicle control information is the vehicle control information at the next moment, and the updated initial vehicle control information is the initial vehicle control information in the next cycle. Among them, the moment corresponding to step 0 in the next cycle is equivalent to the moment corresponding to step 1 in the current cycle.
[0202] Step 208, controlling the front wheel angular velocity of the vehicle according to a set of vehicle control information that does not exceed the constraint, and displaying the vehicle status according to a set of vehicle status information obtained.
[0203] In step 208, the front wheel angular velocity of the vehicle at the next moment (at step 1) can be controlled based on the vehicle control information obtained at the next moment.
[0204] In one embodiment, the expected driving trajectory and expected status of the vehicle in the future period of time can be displayed, and the displayed content conforms to a set of vehicle status information obtained.
[0205] When performing vehicle lateral control based on the solution results of the AL-iLQR optimization model, not only can the vehicle lateral control accuracy of the existing vehicle lateral controller be achieved, but the time consumption is also lower, so it can support the use of chips with lower computing power for vehicle lateral control.
[0206] like Figure 3 As shown, an embodiment of the present application provides a vehicle control device 30, including: an acquisition module 301, used to acquire target information, the target information including vehicle state reference information of the vehicle at the next moment; a processing module 302, used to solve a set model according to the target information, and vehicle state information and vehicle control information of the vehicle at the current moment, and obtain a solution result, wherein the set model is an iterative quadratic regulator optimization model with Lagrange multipliers; a control module 303, used to control the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result when the solution result meets the set error requirement.
[0207] An embodiment of the present application provides an electronic chip, including: a processor, which is used to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the electronic chip is triggered to execute the method described in any embodiment of the present application.
[0208] An embodiment of the present application provides an electronic device, which includes at least one processor, the processor and a memory are coupled, the memory is used to store computer program instructions, and the processor is used to execute the computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method described in any embodiment of the present application.
[0209] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method described in any embodiment of the present application.
[0210] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program runs on a computer, the computer executes the method described in any embodiment of the present application.
[0211] Figure 4 A schematic diagram of a computer device provided in one embodiment of the present application. Figure 4 As shown, the computer device 20 of this embodiment includes: a processor 21 and a memory 22, the memory 22 is used to store a computer program 23 that can be run on the processor 21, and the computer program 23 is executed by the processor 21 to implement the steps in the method embodiment of the present application. To avoid repetition, they are not described one by one here. Alternatively, when the computer program 23 is executed by the processor 21, the functions of each model / unit in the device embodiment of the present application are implemented. To avoid repetition, they are not described one by one here.
[0212] The computer device 20 includes but is not limited to a processor 21 and a memory 22. Those skilled in the art will appreciate that Figure 4 It is only an example of the computer device 20 and does not constitute a limitation of the computer device 20. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.
[0213] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.
[0214] The memory 22 may be an internal storage unit of the computer device 20, such as a hard disk or memory of the computer device 20. The memory 22 may also be an external storage device of the computer device 20, such as a plug-in hard disk, a Smart Media (SM) card, a Secure Digital (SD) card, a Flash Card, etc. equipped on the computer device 20. Further, the memory 22 may also include both an internal storage unit of the computer device 20 and an external storage device. The memory 22 is used to store the computer program 23 and other programs and data required by the computer device. The memory 22 may also be used to temporarily store data that has been output or is to be output.
[0215] In the several embodiments provided in the present application, 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 the units is only a logical function division. 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 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.
[0216] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0217] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0218] The integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (Processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0219] In the embodiments of the present application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.
[0220] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0221] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0222] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the same or similar parts between the various embodiments in this application can be referred to each other. For example, the specific working process of the system, device and unit described in the embodiments of this application can refer to the corresponding process in the method embodiment of this application, and will not be repeated here.
[0223] The above description is only a specific embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A vehicle control method, characterized in that: include: Acquiring target information, wherein the target information includes vehicle state reference information of the vehicle at a next moment; Solving a setting model according to the target information, and the vehicle state information and vehicle control information of the vehicle at the current moment to obtain a solution result, wherein the setting model is an iterative quadratic regulator optimization model with Lagrange multipliers; When the solution result satisfies the set error requirement, the vehicle is controlled according to the vehicle control information of the vehicle at the next moment in the solution result.
2. The method according to claim 1, characterized in that The target information includes vehicle state reference information of the vehicle at a series of future time points, wherein the series of time points includes a time point at a next moment; The solution result also includes vehicle state information of the vehicle at the series of time points; The method further includes: when the solution result meets the error requirement, performing vehicle status display processing according to vehicle status information of the vehicle at the series of time points.
3. The method according to claim 1, characterized in that The method further comprises: substituting the solution result into a set function; The case where the solution result meets the set error requirement includes: the case where the result obtained by substituting the solution result into the set function is less than the set error threshold; The setting function is used to describe the error between the vehicle state information of the vehicle at a future time in the solution result and the vehicle state reference information of the vehicle at a future time in the target information.
4. The method according to claim 3, characterized in that: The target information includes vehicle state reference information of the vehicle at a series of future time points, wherein the series of time points includes a time point at a next moment; The solution result includes vehicle state information and vehicle control information of the vehicle at the series of time points; Substituting the solution result into a setting function comprises: Substituting the vehicle state information and vehicle control information at the series of time points in the solution result into the setting function respectively to obtain result values at the series of time points; Obtaining the maximum result value among the result values at the series of time points; The case where the solution result meets the set error requirement includes: the case where the maximum result value is less than the error threshold.
5. The method according to claim 3, characterized in that: The error threshold is greater than zero; The method further comprises: If the vehicle control information of the vehicle at the next moment in the solution result is not greater than the upper limit value of the vehicle control information, executing the step of controlling the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result; If the vehicle control information of the vehicle at the next moment in the solution result is greater than the upper limit value of the vehicle control information, the vehicle is controlled according to the upper limit value of the vehicle control information.
6. The method according to claim 1, characterized in that The method further comprises: According to the solution result, the value of the Lagrange multiplier is updated; When the solution result does not meet the error requirement, the set model is solved again.
7. The method according to any one of claims 1 to 6, characterized in that: The inequality constraint conditions in the setting model are set according to the maximum and minimum values of the vehicle driving wheel angle and the maximum and minimum values of the vehicle driving wheel angular velocity; The vehicle control information in the solution result includes the vehicle driving wheel angular velocity, and the vehicle state information in the solution result includes the vehicle driving wheel angle; The vehicle driving wheel angle and the vehicle driving wheel angular velocity in the solution result meet the inequality constraint condition; The controlling the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result includes: The vehicle driving wheel angular velocity of the vehicle at the next moment is controlled to be the vehicle driving wheel angular velocity of the vehicle at the next moment in the solution result.
8. A vehicle control device, characterized in that: include: An acquisition module, used for acquiring target information, wherein the target information includes vehicle state reference information of the vehicle at the next moment; A processing module, used to solve a setting model according to the target information, and vehicle state information and vehicle control information of the vehicle at a current moment, and obtain a solution result, wherein the setting model is an iterative quadratic regulator optimization model with Lagrange multipliers; A control module is used to control the vehicle according to the vehicle control information of the vehicle at the next moment in the solution result when the solution result meets the set error requirement.
9. An electronic device, characterized in that: The electronic device comprises at least one processor, the processor is coupled to a memory, the memory is used to store computer program instructions, and the processor is used to execute computer program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 7.