Trajectory planning method, device and equipment based on model predictive control
By introducing slack variables in autonomous driving trajectory planning to handle obstacle safety distances, the problem of low trajectory planning efficiency under complex road conditions is solved, and efficient collision-free trajectory planning is achieved.
Patent Information
- Application Number
- CN202311829731.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-12-27
AI Technical Summary
In the field of autonomous driving, existing trajectory planning methods have the problem of long solution time or no solution under complex road conditions, especially in the presence of dynamic obstacles, resulting in low trajectory planning efficiency.
A model-based predictive control method is adopted to introduce relaxation variables to deal with the safe distance of obstacles. The relaxation variables are used to expand the feasibility range of the predicted input variables, improve the solvability of the objective function, and ensure the safe distance between the planned trajectory and obstacles.
The efficiency of trajectory planning is improved, avoiding situations where the solution time is too long or there is no solution, while ensuring that the planned path is collision-free.
Smart Images

Figure CN117991632B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of control technology, and in particular to a trajectory planning method, apparatus and device based on model predictive control. Background Art
[0002] Trajectory planning is a crucial step in the field of autonomous driving. It requires consideration of both the smoothness of the generated trajectory and collision-free behavior. Currently, autonomous driving trajectory planning often employs search-based algorithms or sampling-based optimization methods. However, in complex road conditions (e.g., with dynamic obstacles), excessive external constraints can lead to prolonged trajectory solution times or even unsolvable solutions, reducing trajectory planning efficiency. Summary of the Invention
[0003] In view of this, the embodiments of the present application propose a trajectory planning method, device and equipment based on model predictive control, which introduces slack variables in the safe distance of obstacles, improves the problem of difficulty in solving trajectories in complex road conditions, and improves the efficiency of trajectory planning.
[0004] The embodiments of the present application are implemented using the following technical solutions:
[0005] In a first aspect, an embodiment of the present application provides a trajectory planning method based on model predictive control, the method comprising: obtaining reference trajectory information of a target device at a target moment, the reference trajectory information comprising reference point information corresponding to multiple moments within a predicted duration from the target moment, each reference point information comprising a reference input quantity and a reference state quantity at the corresponding moment, the reference state quantity being determined based on a preset kinematic equation and the corresponding reference input quantity; determining a correspondence between a predicted state variable and a predicted input variable at each moment within the predicted duration based on the preset kinematic equation and the reference trajectory; determining, for each of the multiple moments, a constraint relationship between the predicted input variable and a slack variable at that moment based on the correspondence and a safe distance of an obstacle at that moment, the slack variable being used to characterize a value range of the safe distance; determining an objective function for selecting the predicted input variable based on the predicted input variable, the predicted state variable, and the slack variable at each moment; determining a predicted input quantity sequence based on the objective function, the correspondence, and the constraint relationship between the predicted input variable and the slack variable; obtaining a predicted trajectory based on the predicted input quantity sequence and the preset kinematic equation, the predicted input quantity sequence comprising the values of the predicted input variable at each moment within the predicted duration, the distance between the predicted trajectory and the obstacle satisfying the safe distance.
[0006] In the second aspect, an embodiment of the present application provides a trajectory planning device based on model predictive control, the device comprising: an acquisition module for acquiring reference trajectory information of a target device at a target moment, the reference trajectory information comprising reference point information corresponding to a plurality of moments within a predicted time length from the target moment, each reference point information comprising a reference input quantity and a reference state quantity at the corresponding moment, the reference state quantity being determined based on a preset kinematic equation and a corresponding reference input quantity; a first calculation module for determining the correspondence between the predicted state variables and the predicted input variables at each moment within the predicted time length based on a preset kinematic equation and a reference trajectory; a second calculation module for determining, for each of the plurality of moments, the correspondence between the predicted state variables and the predicted input variables based on a corresponding key The safe distance between the system and the obstacle at that moment is determined, and the constraint relationship between the predicted input variables and the slack variables at that moment is determined. The slack variables are used to characterize the value range of the safe distance; a construction module is used to determine the objective function for selecting the predicted input variables based on the predicted input variables, predicted state variables, and slack variables at each moment; an output module is used to determine the predicted input quantity sequence based on the objective function, the corresponding relationship, and the constraint relationship between the predicted input variables and the slack variables; an execution module is used to obtain the predicted trajectory based on the predicted input quantity sequence and the preset kinematic equation. The predicted input quantity sequence includes the values of the predicted input variables at each moment within the prediction time, and the distance between the predicted trajectory and the obstacle meets the safe distance.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor; a memory, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the above-mentioned method is implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: a computer-readable storage medium storing program code, and the program code can be called by a processor to execute the above method.
[0009] The embodiment of the present application provides a trajectory planning method, apparatus and device based on model predictive control, the method comprising obtaining reference trajectory information of a target device at a target moment; determining the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the prediction time based on a preset kinematic equation and the reference trajectory; for each moment in a plurality of moments, determining the constraint relationship between the predicted input variables and the slack variables at that moment based on the corresponding relationship and the safety distance of the obstacle at that moment; determining the objective function for selecting the predicted input variables based on the predicted input variables, the predicted state variables and the slack variables at each moment; and determining the constraint relationship between the predicted input variables and the slack variables based on the objective function, the corresponding relationship and the constraint relationship between the predicted input variables and the slack variables at each moment. and the constraint relationship between the predicted input variables and the slack variables, to determine the predicted input quantity sequence; based on the predicted input quantity sequence and the preset kinematic equation, the predicted trajectory is obtained; through the method provided by the present application, the slack variables are introduced to relax the hard constraints of the obstacle on the safety distance, thereby expanding the feasibility range of the predicted input variables and improving the solvability of the objective function, thereby avoiding the long trajectory solution time or even the situation where there is no solution, and improving the trajectory planning efficiency. At the same time, by establishing an objective function containing slack variables, the distance between the planned path and the obstacle meets the safety distance under the slack variables, ensuring that the planned trajectory is collision-free.
[0010] These and other aspects of the present application will become more readily apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 A flow chart of a trajectory planning method provided in an embodiment of the present application is shown.
[0013] Figure 2 A schematic diagram of a bicycle model provided in an embodiment of the present application is shown.
[0014] Figure 3 The embodiment of the present application provides Figure 1 Flow chart of step S120 in FIG.
[0015] Figure 4 A schematic diagram showing the relationship between the control time domain and the prediction time domain provided in an embodiment of the present application is shown.
[0016] Figure 5 The embodiment of the present application provides Figure 1 Flow chart of step S130 in FIG.
[0017] Figure 6 The embodiment of the present application provides Figure 1 Flow chart of step S140 in FIG.
[0018] Figure 7 The embodiment of the present application provides Figure 1 Flow chart of step S150.
[0019] Figure 8 The embodiment of the present application provides Figure 7 Flow chart of step S151 in FIG.
[0020] Figure 9 A schematic diagram of a scenario involved in an embodiment of the present application is shown.
[0021] Figure 10 A schematic diagram of a trajectory planning device provided in an embodiment of the present application is shown.
[0022] Figure 11 A schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.
[0024] In order to enable those skilled in the art to better understand the present invention, the following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0025] In the following description, the terms "first\second" and the like are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0026] In this document, "plurality" refers to two or more. "And / or" describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0027] In the field of autonomous driving, there are several commonly used methods for trajectory planning. The first type is a search-based algorithm with a relatively coarse search granularity, which is often used in planning tasks on unstructured roads, such as parking. The second type of method is based on sampling and optimization. The core idea is to select different target points at the current position, and then use various curve models, such as polynomial curves and Bezier curves, to sample a series of trajectories. Finally, the trajectory is scored and the optimal trajectory is selected as the output. The third type is a method based on numerical optimization, which uses the trajectory state of the future vehicle as the optimization variable and solves an optimal trajectory in the form of numerical optimization. Among them, there are many forms of trajectory expression in trajectory planning, the most common of which are the Cartesian coordinate system (xy coordinates) and the Freuner coordinate system (sl coordinates) relative to the road reference line.
[0028] In trajectory planning, in order to improve the efficiency of trajectory planning, quadratic programming is often used for trajectory prediction, that is, an algorithm is used to predetermine a reference trajectory consisting of multiple discrete reference points. Since the reference trajectory is not smooth enough, quadratic programming is required based on the reference trajectory to obtain the planned trajectory. At present, model predictive control (MPC) is often used for quadratic trajectory planning. Its basic idea is to optimize a series of future control inputs at each control time step so that the system can achieve optimal performance in a certain period of time in the future. However, when the external environment is more complex, the quadratic planning of the trajectory is difficult or even unsolvable, which reduces the efficiency of trajectory planning.
[0029] In order to solve the above problems, the present application proposes a trajectory planning method, device and equipment based on model predictive control, the method comprising: obtaining reference trajectory information of the target device at the target moment, the reference trajectory information comprising reference point information corresponding to multiple moments within the predicted time length from the target moment, each reference point information comprising a reference input quantity and a reference state quantity at the corresponding moment, the reference state quantity being determined based on a preset kinematic equation and a corresponding reference input quantity; based on the preset kinematic equation and the reference trajectory, determining the correspondence between the predicted state variables and the predicted input variables at each moment within the predicted time length; for each of the multiple moments, based on the corresponding The constraint relationship between the predicted input variables and the slack variables at that moment is determined based on the corresponding relationship and the safe distance of the obstacle at that moment. The slack variables are used to characterize the value range of the safe distance. The objective function for selecting the predicted input variables is determined based on the predicted input variables, predicted state variables, and slack variables at each moment. The predicted input quantity sequence is determined based on the objective function, the corresponding relationship, and the constraint relationship between the predicted input variables and the slack variables. The predicted trajectory is obtained based on the predicted input quantity sequence and the preset kinematic equation. The predicted input quantity sequence includes the values of the predicted input variables at each moment in the prediction time. The distance between the predicted trajectory and the obstacle meets the safe distance.
[0030] The method provided in this application relaxes the hard constraints of obstacles on the safety distance by introducing slack variables, thereby expanding the feasibility range of the predicted input variables and improving the solvability of the objective function, thereby avoiding the situation where the trajectory solution time is long or even there is no solution, and improving the efficiency of trajectory planning. At the same time, by establishing an objective function containing slack variables, the distance between the planned path and the obstacle meets the safety distance under the slack variables, ensuring that the planned trajectory is collision-free.
[0031] The embodiments provided in this application will be described below with reference to the accompanying drawings.
[0032] See also Figure 1 , Figure 1 A flow chart of a trajectory planning method based on model predictive control provided in an embodiment of the present application is provided, and the method includes:
[0033] S110: Obtain reference trajectory information of the target device at the target time.
[0034] Among them, the reference trajectory information includes reference point information corresponding to multiple moments within the predicted time distance to the target moment. Each reference point information includes the reference input quantity and reference state quantity at the corresponding moment. The reference state quantity is determined based on the preset kinematic equation and the corresponding reference input quantity.
[0035] The target time can be the current time or any specified time, and there is no specific limitation here.
[0036] It is worth mentioning that the reference trajectory can be generated by the target device based on a preset algorithm (such as a search algorithm, a sampling optimization algorithm, etc.), or it can be externally input.
[0037] In some embodiments, the preset kinematic equations are determined based on a bicycle model, which is a commonly used vehicle kinematic model used to describe the behavior of a vehicle in motion, and is typically used to analyze and control the forward, lateral, and yaw motions of a vehicle, such as Figure 2 As shown, Figure 2 A model diagram of the bicycle model is given, including the position (x, y) of the vehicle in the coordinate system, the current speed v of the vehicle, the heading angle θ of the vehicle, the front wheel turning angle φ of the vehicle, and the wheelbase L of the vehicle.
[0038] Furthermore, the bicycle model can be expressed as the following formula:
[0039]
[0040] Among them, for any moment, x and y are the positions of the vehicle in the coordinate system, θ represents the vehicle's heading angle, v represents the current vehicle speed, a represents the current vehicle acceleration, φ represents the vehicle's front wheel angle, and L represents the vehicle's wheelbase. and They represent the differentials of various physical quantities with respect to time.
[0041] The bicycle model can be viewed as a system with inputs a and φ and outputs x, y, θ, and v. Therefore, the above formulas can be reorganized to obtain a general expression for the bicycle model, namely the preset kinematic equation of this application, which is generally expressed as: Among them, u = (a, φ) is the prediction input variable at each moment; X = (x, y, θ, v) is the prediction state variable determined according to the prediction input variable.
[0042] Obviously, since each reference point in the reference trajectory satisfies the above bicycle model, the following expression is satisfied for each reference point:
[0043]
[0044] Among them, u ref is the reference input quantity of the reference point, X ref The reference state quantity of the reference point determined based on the reference input quantity.
[0045] S120 : Based on the preset kinematic equation and the reference trajectory, determine the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the prediction duration.
[0046] It should be noted that since the planned trajectory is obtained based on the bicycle model prediction, the predicted state variables and predicted input variables at any time also need to satisfy the above-mentioned preset kinematic equations; therefore, the correspondence between the reference state variables and the reference input variables and the preset kinematic equations can be used to express the correspondence between the predicted state variables and the predicted input variables.
[0047] For example, see Figure 3 , Figure 3 The embodiment of this application provides Figure 1 Schematic diagram of the process of step S120, step S120 includes:
[0048] S121. Based on the reference input quantity and the reference state quantity included in each reference point in the reference trajectory, perform Taylor expansion on the preset kinematic equation to obtain the Taylor expansion corresponding to each reference point.
[0049] Specifically, for each reference point, Taylor expansion is performed on Formula 1, and the corresponding Taylor expansion is as follows:
[0050]
[0051] in, is the Jacobian matrix of f with respect to X, is the Jacobian matrix of f with respect to u.
[0052] It should be noted that the above Taylor expansion is a first-order expansion, and its subsequent high-order terms are not considered.
[0053] S122. Linearize the Taylor expansion corresponding to each reference point to obtain a linear expression corresponding to each reference point.
[0054] Among them, linearization processing is a technology that converts a nonlinear function or system into a linear function or system.
[0055] For example, for the above Taylor expansion, the following expression is obtained by shifting the terms and combining it with Formula 1:
[0056]
[0057] make Substituting it into formula 3, we get:
[0058]
[0059] Where A is the Jacobian matrix of f with respect to X, and B is the Jacobian matrix of f with respect to u, as follows:
[0060]
[0061] Furthermore, the zero-order hold method is used to discretize the above formula 4 to obtain a linear expression:
[0062] Among them, A k =e AT ; I is the identity matrix, T s is the sampling period, and k is the sampling time.
[0063] It can be seen that by linearizing the Taylor expansion corresponding to each reference point, the linear expression corresponding to each reference point is obtained, so that the state quantity at any moment can be determined based on the state quantity at the previous moment and the input quantity at the previous moment.
[0064] It is worth mentioning that due to Represents the distance between the predicted state quantity and the reference state quantity, Represents the distance between the predicted input variable and the reference input variable. Therefore, the linearization processing here does not change the nonlinear relationship between the predicted state quantity and the predicted input variable into a linear relationship, but linearizes the error between the predicted state quantity and the predicted input variable.
[0065] S123. Iteratively calculate the linear expressions corresponding to the multiple reference points to determine the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the prediction duration.
[0066] Since the linear expression corresponding to each reference point describes the relationship between the predicted state quantity at that moment and the predicted state quantity and predicted input variables at the previous moment, that is, the predicted state quantity at each moment is related to the state quantity at the previous moment, it is possible to iteratively make the predicted state quantity at any moment only related to the predicted state variable at the initial moment and the predicted input variables at multiple moments, thereby reducing the calculation of intermediate variables in the trajectory planning process.
[0067] For ease of understanding, this application provides exemplary examples of iteration, and iterates the following expressions, which are all obtained based on the above formula 5:
[0068]
[0069]
[0070]
[0071]
[0072]
[0073] Among them, NP is the prediction length, also called the prediction time domain, which is the prediction time in this application; NC is the control length, also called the control time domain, which is part of or all of the moments close to the target time in the multiple moments of the prediction time in this application. When the control time is exceeded, the prediction input variable remains stable; it can be understood that when the control length is part of the moments close to the target time in the multiple moments of the prediction time, the control length further controls the range of change of the prediction input variable, reducing the difficulty of subsequent solution, such as Figure 4 As shown, Figure 4 A schematic diagram of the relationship between the control time domain and the prediction time domain provided in the embodiment of the present application is given. Figure 4 It can be seen that the prediction time domain is part of the control time domain. In the control time domain, the prediction input variable is discretized using the zero-order hold method, that is, the input u(k) remains unchanged within a moment; after exceeding the control time domain, the prediction input variable u remains stable.
[0074] By iterating the above expression, the following expression is obtained, which is the corresponding relationship between the predicted state variables and the predicted input variables in this application:
[0075]
[0076] in,
[0077] It can be seen that through Formula 6, the predicted state variable at any time is The initial state quantity at the target time can be and the predicted input variables at multiple times before any time Sure.
[0078] Of course, in other implementations, other approximate prediction methods may be used to expand the preset kinematic equations, such as polynomial approximation, differential approximation, etc., which can be selected according to actual needs.
[0079] S130. For each of the multiple moments, based on the corresponding relationship and the safety distance of the obstacle at the moment, determine a constraint relationship between the prediction input variable and the slack variable at the moment, where the slack variable is used to represent a value range of the safety distance.
[0080] The safe distance of the obstacle at each moment can be determined based on the collision boundary of the obstacle. Furthermore, the collision boundary of the obstacle can be obtained by linear cutting to obtain the collision boundary constraint condition of the obstacle.
[0081] For example, the collision boundary of the obstacle at each moment is determined by linear cutting:
[0082] a i x+bi y=c i ;
[0083] Among them, a i and b i is the cutting line coefficient, c i is the safe distance of the obstacle, which can be calculated through the image information and point cloud information collected by the target device, and i is the corresponding time.
[0084] Bring the target device's position (x, y) at that moment into the collision boundary. If a i x+b i y≥c i , it is determined that the distance between the position of the target device and the obstacle at this moment meets the safety distance.
[0085] It can be seen that the above collision boundary is a hard constraint. In order to relax the above collision boundary, a relaxation variable s is introduced so that the collision boundary that needs to be satisfied becomes: a i x+b i y+s≥c i , Formula 7;
[0086] Among them, 0≤s≤c i -c collision , c collision is the distance at which there is no collision with the obstacle, which is also the preset minimum safety distance. When the position of the target device at that moment satisfies Formula 7, it can be determined that the distance between the position of the target device at that moment and the obstacle satisfies the safety distance under the slack variable.
[0087] It can be understood that by introducing the slack variable s and limiting its value range, the position of the target device is encouraged to be outside the safe distance as much as possible but is also allowed to be within the safe distance, that is, accepting imperfect position solutions, which increases the feasibility range of the predicted position and reduces the subsequent solution difficulty; at the same time, it ensures that the target device does not collide with obstacles.
[0088] As can be seen from Formula 7, the slack variable can be expressed using the predicted position of the target device and the safety distance. The predicted position of the target device is determined by the predicted input variable. Therefore, in order to facilitate subsequent calculations, it is necessary to determine the constraint relationship between the slack variable and the predicted input variable. Please refer to Figure 5 , Figure 5 The embodiment of this application provides Figure 1 Flowchart of step S130, wherein the predicted state variable includes the position variable, step S130 includes:
[0089] S131. Based on the corresponding relationship, determine the constraint relationship between the position variable and the prediction input variable.
[0090] It can be understood that the position variable of the target device is part of the predicted state variable. By extracting the part related to the position variable in the corresponding relationship, the constraint relationship between the position variable and the predicted input variable can be obtained.
[0091] For example, for the location variable x of the target device i and y i , based on the corresponding relationship, that is, Formula 6 in the aforementioned embodiment: You can get:
[0092]
[0093] in, From formula six Extract the data corresponding to x and get, From formula six Extract the data corresponding to y from ; similarly, From formula six Extract the data corresponding to x and get, From Formula Six Extract the data corresponding to y from .
[0094] S132. Determine the constraint relationship between the position variable and the slack variable based on the position variable and the safety distance.
[0095] Among them, the constraint relationship between the position variable and the slack variable is also the collision boundary that the position variable needs to satisfy, that is, the aforementioned formula 7: a i x+b i y+s≥c i .
[0096] S133. Based on the constraint relationship between the position variable and the slack variable, and the constraint relationship between the position variable and the prediction input variable, determine the constraint relationship between the prediction input variable and the slack variable.
[0097] For example, the constraint relationship between the position variable and the prediction input variable, that is, Formula 8, is substituted into PTV 7 to obtain the following expression:
[0098]
[0099] Furthermore, by performing a transposition transformation on the expression, the constraint relationship between the predicted input variable and the slack variable is obtained as follows:
[0100]
[0101] Obviously, since the prediction input variables and slack variables need to satisfy the above constraints, after determining the value of the prediction input variable at any time, the value of the slack variable under the prediction input variable at that time can be determined through the above constraints.
[0102] It can be understood that if the value of the slack variable at a certain moment is determined to be 0 based on the value of the predicted input variable at that moment, it means that the position at that moment is outside the safe distance, that is, the value of the predicted input variable can be used to predict the trajectory; when the value of the slack variable is determined to be 0<s≤c based on the value of the predicted input variable i -c collision , it means that the position at this moment is within the safe distance, but outside the minimum safe distance, which ensures that the target device has no collision with the obstacle. The value of the predicted input variable can also be used to predict the trajectory; if the value of the slack variable is determined to be greater than c based on the value of the predicted input variable i -c collision If , exceeds the value range of s, it means that the position at that moment is within the minimum safety distance, the target device may collide with the obstacle, and the value of the prediction input variable cannot be used to predict the trajectory.
[0103] S140 , determining an objective function for selecting prediction input variables based on the prediction input variables, the prediction state variables, and the slack variables at each moment.
[0104] It is worth mentioning that since the objective function is determined based on the predicted input variables, predicted state variables, and slack variables at each moment, by setting different weights for the predicted input variables, predicted state variables, and slack variables, the final objective function can have different emphases.
[0105] In some embodiments, see Figure 6 , Figure 6 The present application provides an embodiment Figure 1 Schematic diagram of the process of step S140 in FIG. 1 , step S140 includes:
[0106] S141. Determine a first sub-objective function based on the difference between the predicted state variable and the reference state variable at multiple moments.
[0107] It is worth mentioning that since the difference between the predicted state variable and the reference state quantity may be positive or negative, in order to more accurately express the gap between the predicted state variable and the reference state quantity, it is necessary to dimensionalize the difference between the predicted state variable and the reference state quantity, such as taking the absolute value, normalizing, etc.
[0108] For example, in some embodiments, the first sub-objective function can be calculated by the following expression, where the first sub-objective function f1 is:
[0109]
[0110] wherein x, y, θ, v are the horizontal coordinate, vertical coordinate, heading angle and speed in the predicted state variable at each time, x ref , y ref , θ ref , v ref are the horizontal coordinate, vertical coordinate, heading angle and speed in the reference state variable at the corresponding time, w i , i ∈ (x ref , y ref , v ref , θ ref ) are different weight coefficients.
[0111] It can be seen that in the first sub-objective function, the influence of positive and negative difference values is eliminated by taking the square operation; at the same time, by summing the squares of the differences between the predicted state variables and the reference state variables at multiple times, the first sub-objective function is obtained, so that the first sub-objective function represents the distance between the predicted state variable and the reference state variable of the reference trajectory, and the smaller the first sub-objective function, the closer the predicted state variable is to the reference state variable of the reference trajectory.
[0112] S142, based on the difference between the predicted input variable and the reference input variable at multiple times, determine the second sub-objective function.
[0113] Similar to step S141, since the difference between the predicted input variable and the reference input variable may be positive or negative, in order to more accurately represent the difference between the predicted input variable and the reference input variable, the difference between the predicted input variable and the reference input variable needs to be dimensionally processed, such as taking the absolute value, normalization, etc.
[0114] For example, in some embodiments, the second sub-objective function can be calculated by the following expression, and the second sub-objective function f2 is:
[0115] f2 = w steer ∑(φ-φ ref ) 2 +w acc ∑(a-a ref ) 2 ;
[0116] wherein a, φ are the acceleration and front wheel steering angle in the predicted input variable at each time, a ref , φ ref are the acceleration and front wheel steering angle in the reference input variable at each time, w i , i ∈ (steer, acc) are the pre-set weight coefficients.
[0117] It can be seen that in the second sub-objective function, the influence of the positive and negative differences is eliminated by taking the square operation; at the same time, the second sub-objective function is obtained by summing the squares of the differences between the predicted input variables and the reference input quantities at multiple moments, so that the second sub-objective function represents the distance between the predicted input variables and the reference input quantities. The smaller the second sub-objective function is, the closer the predicted input variables are to the reference input quantities.
[0118] S143. Determine a third sub-objective function based on the difference between the predicted state variables at multiple adjacent moments.
[0119] It can be understood that the size of the difference between the predicted state variables at adjacent moments represents the stability of the driving state of the target device; the larger the difference between the predicted state variables at adjacent moments, the greater the fluctuation of the driving state of the target device, and the smaller the difference between the predicted state variables at adjacent moments, the more stable the driving state of the target device.
[0120] Therefore, in some embodiments, the third sub-objective function can be calculated by the following expression:
[0121]
[0122] in, is the rate of change of the front wheel angle in the prediction input variables at adjacent moments, which can be calculated by the following expression: is the rate of change of acceleration in the predicted input variable at adjacent moments, which can be calculated by the following expression: w i ,i∈(steer-rate,jerk) is the preset weight coefficient.
[0123] That is:
[0124]
[0125] It can be seen that the third sub-objective function further obtains the rate of change of the predicted state variables at multiple adjacent moments through the difference between the predicted state variables at multiple adjacent moments; when the third sub-objective function is smaller, it means that the rate of change of the predicted state variables is smaller, and the driving state of the target device is more stable.
[0126] S144. Determine a fourth sub-objective function based on the predicted state variables and the reference state variables at a specified moment among the multiple moments.
[0127] The designated time may be the last time among multiple times, or other designated times, and may be set as required.
[0128] In some embodiments, the specified time is the last time of the plurality of times, and the fourth sub-objective function can be calculated by the following expression, where f4 is the fourth sub-objective function:
[0129]
[0130] where Xn is the predicted state variable at the last time of the plurality of times, is the reference state variable at the last time of the plurality of times, and w end is a preset weight coefficient.
[0131] It can be understood that the fourth sub-objective function eliminates the positive and negative effects by taking the square operation; at the same time, the fourth sub-objective function makes the predicted state variable at the last time of the plurality of times close to the reference state variable at the last time of the plurality of times by squaring the difference between the predicted state variable at the last time of the plurality of times and the reference state variable at the last time of the plurality of times, that is, the end point of the predicted trajectory is close to the end point of the reference trajectory.
[0132] S145, determining a fifth sub-objective function based on the relaxation variable at the plurality of times.
[0133] It can be understood that although the introduction of the relaxation variable makes the safety distance with respect to the obstacle have a larger range of values, that is, the feasibility range of the predicted input variable is expanded, thereby reducing the difficulty of solving; but for the predicted trajectory, the smaller the relaxation variable is, the more the predicted trajectory meets the safety distance requirement of the obstacle, that is, the better the predicted trajectory is.
[0134] Therefore, in some embodiments, the fifth sub-objective function can be calculated by the following expression, where f5 is the fifth sub-objective function:
[0135]
[0136] where s i is the relaxation variable at a time, which can be determined based on the predicted input variable at the time, as shown in the aforementioned formula nine; w collision is a preset weight coefficient.
[0137] It can be understood that the smaller the fifth sub-objective function is, the smaller the relaxation variable is, that is, the predicted trajectory meets the safety distance requirement of the obstacle better, and the obstacle avoidance constraint of the predicted trajectory is better.
[0138] S146, summing the first sub-objective function, the second sub-objective function, the third sub-objective function, the fourth sub-objective function, and the fifth sub-objective function to obtain the objective function.
[0139] Among them, the summation can be a simple summation or a weighted summation; further, the weighted summation can be to set corresponding weight coefficients for the first sub-objective function, the second sub-objective function, the third sub-objective function, the fourth sub-objective function and the fifth sub-objective function, that is, each sub-objective function corresponds to a weight coefficient.
[0140] In other embodiments, a corresponding weight coefficient may be determined for each sub-item in each sub-objective function, as described in the above embodiment, w i is the weight coefficient of each sub-item in each sub-objective function, where w i ,i∈(x ref ,y ref ,v ref ,θ ref ,steer,acc,steer-rate,jerk,end,collision), the specific weight setting method can be selected and configured according to needs and is not specifically limited here.
[0141] S150 , determining a prediction input quantity sequence based on the objective function, the corresponding relationship, and the constraint relationship between the prediction input variables and the slack variables.
[0142] It can be understood that due to the corresponding relationship between the predicted input variables and the predicted state variables and the constraint relationship between the predicted input variables and the slack variables, the objective function is actually a function of the predicted input variables. By solving the specified value of the objective function (such as minimum value, maximum value, extreme value, etc.), the predicted input variables at each moment can be determined to obtain the predicted input quantity sequence.
[0143] In some implementations, the objective function may be solved by a function solver.
[0144] For example, a function parser including a Hessian matrix and a Jacobian matrix of a gradient can be used for solving the problem. The solving process is as follows:
[0145]
[0146] Among them, H is the Hessian matrix composed of the second-order derivatives of the objective function, g is the Jacobian matrix composed of the gradient of the objective function, and q is the independent variable matrix formed by the predicted input variables and slack variables.
[0147] Specifically,
[0148] When using the above expression to solve analytically, the constraints that need to be satisfied are linear constraints: i T x=b i ,i∈E, and inequality constraints: Among them, a i and h j are matrices determined based on constraints, b i and t j is a vector determined based on the constraints.
[0149] In some embodiments, in the process of solving the objective function, the predicted input variables, predicted state variables and slack variables all need to satisfy corresponding constraints. Therefore, Figure 7 As shown, Figure 7 This application provides Figure 1 Schematic diagram of the process of step S150, step S150 includes:
[0150] S151. Obtain the constraints of the objective function.
[0151] The constraints include both the constraints on the predicted input variables and the constraints on the intermediate variables (such as predicted state variables and slack variables) determined based on the predicted input variables.
[0152] For example, in some embodiments, Figure 8 As shown, Figure 8 This application provides Figure 7 Flow chart of step S151, step S150 includes:
[0153] S1511. Determine slack variable constraints based on the safety distance and the preset collision distance of the obstacle.
[0154] Specifically, the slack variable constraint is 0≤s i ≤c i -c collision .
[0155] It is understandable that, due to the constraint relationship between the slack variable and the predicted variable input, the slack variable constraint actually constrains the value of the predicted input variable.
[0156] S1512. Determine starting point constraints for predicting input variables based on a reference input quantity of the target device at the target time, and determine starting point constraints for predicting state variables based on a reference state quantity at the target time.
[0157] In some implementations, the predicted input variables at the starting time are kept consistent with the reference input variables at the starting time, and the predicted state variables at the starting time are kept consistent with the reference state variables at the starting time.
[0158] That is, the starting constraint condition for the predicted input variables is [a(0), φ(0)] = [a0, φ0], where [a(0), φ(0)] are the acceleration and front wheel angle in the predicted input variables at the starting moment, and [a0, φ0] are the acceleration and front wheel angle in the reference input variables at the starting moment; the starting constraint condition for the predicted state variables is [x(0), y(0), θ(0), v(0)] = [x0, y0, θ0, v0].
[0159] S1513. Obtain the constraints of the objective function based on the preset boundary constraints and starting point constraints of the predicted input variables, the preset boundary constraints and starting point constraints of the predicted state variables, and the slack variable constraints.
[0160] Among them, the preset boundary constraints of the predicted input variables and predicted state variables are agreed in advance based on the kinematic boundaries, such as speed range, acceleration range, front wheel angle range, front wheel angle change rate, etc.
[0161] For example, the preset boundary constraints for the predicted input variables and the predicted state variables may include the following sub-conditions: min ≤v≤v max , a min ≤a≤a max , φ min ≤φ≤φ max , Among them, v represents velocity, a represents acceleration, and φ represents the front wheel angle. represents the rate of change of acceleration, Represents the rate of change of the front wheel angle.
[0162] Take the union of the above constraints to obtain the constraints of the objective function, that is, the objective function needs to satisfy the above constraints at the same time.
[0163] S152. Determine a prediction input quantity sequence based on the objective function, the corresponding relationship, the constraint relationship between the prediction input variables and the slack variables, and the constraint conditions of the objective function.
[0164] It can be understood that the corresponding relationship, the constraint relationship between the prediction input variables and the slack variables, and the constraint conditions of the objective function can all be converted into constraints on the values of the prediction input variables.
[0165] In some embodiments, a predicted input sequence that satisfies the response relationship, the constraint relationship between the predicted input variables and the slack variables, and the constraints of the objective function can be obtained based on a specified value of the objective function (such as a minimum value, a maximum value, a maximum value, etc.).
[0166] Exemplarily, in some embodiments, step S152 may be selecting a target value from multiple values of preset input variables at each moment, where the target value satisfies the correspondence, the constraint relationship between the predicted input variable and the slack variable, and the constraint conditions of the objective function, and is the value of the predicted input variable at each moment that minimizes the value of the objective function, and the value of the predicted input variable at each moment is used as a predicted input sequence.
[0167] S160: Obtain a predicted trajectory based on the predicted input sequence and a preset kinematic equation.
[0168] The predicted input sequence includes the values of the predicted input variables at each moment within the prediction time, and the distance between the predicted trajectory and the obstacle meets the safety distance.
[0169] It is understandable that since the predicted input sequence includes the values of the predicted input variables at each moment within the prediction duration, the values of the predicted state variables at each moment can be obtained by presetting the kinematic equation, thereby determining the predicted trajectory.
[0170] The trajectory planning method based on model predictive control provided by the present application obtains the reference trajectory information of the target device at the target time; determines the correspondence between the predicted state variables and the predicted input variables at each moment within the prediction time based on the preset kinematic equation and the reference trajectory; for each moment in multiple moments, determines the constraint relationship between the predicted input variables and the slack variables at that moment based on the correspondence and the safety distance of the obstacle at that moment; determines the objective function for selecting the predicted input variables based on the predicted input variables, predicted state variables, and slack variables at each moment; determines the predicted input quantity sequence based on the objective function, the correspondence, and the constraint relationship between the predicted input variables and the slack variables; obtains the predicted trajectory based on the predicted input quantity sequence and the preset kinematic equation; through the method provided by the present application, the slack variables are introduced to relax the hard constraints of the obstacle on the safety distance, and by establishing the objective function containing the slack variables, the solvability of the objective function is improved, thereby avoiding the long trajectory solution time or even the situation where there is no solution, improving the trajectory planning efficiency, and at the same time, making the distance between the planned path and the obstacle meet the safety distance under the slack variables, ensuring that the planned trajectory is collision-free.
[0171] For easier understanding, see Figure 9 , Figure 9A schematic diagram of a scenario involved in this application is given. When the method provided by this application is used for model predictive control (MPC), the reference state quantity xref (i.e., the reference trajectory information that satisfies the preset kinematic equation in this application) is determined by inputting the reference input quantity uref. For each prediction moment in the control time domain, the MPC is used to perform quadratic programming of the trajectory based on the reference state quantity xref, the slack variable s, and the predicted state variable x. (i.e., the predicted input variable of this application) is predicted to obtain the optimal predicted input u* (i.e., the predicted input sequence of this application). The prediction module determines the value of the predicted state variable x based on the optimal predicted input u*, thereby obtaining the planned trajectory.
[0172] Based on the trajectory planning method based on model prediction provided in the above embodiment, the present application also provides a trajectory planning device based on model predictive control, such as Figure 10 As shown, Figure 10 A schematic diagram of a trajectory planning device based on model predictive control provided by the present application is provided. The trajectory planning device 200 based on model predictive control includes:
[0173] Acquisition module 210 is used to obtain reference trajectory information of the target device at the target time. The reference trajectory information includes reference point information corresponding to multiple moments within the predicted duration from the target time. Each reference point information includes a reference input quantity and a reference state quantity at the corresponding moment. The reference state quantity is determined based on a preset kinematic equation and the corresponding reference input quantity.
[0174] The first calculation module 220 is used to determine the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the prediction duration based on the preset kinematic equation and the reference trajectory.
[0175] The second calculation module 230 is used to determine, for each of the multiple moments, a constraint relationship between the predicted input variable and the slack variable at that moment based on the corresponding relationship and the safety distance of the obstacle at that moment, where the slack variable is used to represent the value range of the safety distance.
[0176] The construction module 240 is used to determine the objective function for selecting the prediction input variables based on the prediction input variables, the prediction state variables, and the slack variables at each moment.
[0177] The output module 250 is used to determine the prediction input quantity sequence based on the objective function, the corresponding relationship, and the constraint relationship between the prediction input variables and the slack variables.
[0178] The execution module 260 is used to obtain a predicted trajectory based on a predicted input sequence and a preset kinematic equation. The predicted input sequence includes the values of the predicted input variables at each moment within the prediction duration, and the distance between the predicted trajectory and the obstacle meets the safety distance.
[0179] In some embodiments, the first calculation module 220 is further used to perform Taylor expansion on the preset kinematic equation based on the reference input quantity and reference state quantity included in each reference point in the reference trajectory to obtain the Taylor expansion corresponding to each reference point; linearize the Taylor expansion corresponding to each reference point to obtain the linear expression corresponding to each reference point; iteratively calculate the linear expressions corresponding to multiple reference points to determine the correspondence between the predicted state variables and the predicted input variables at each moment within the prediction time.
[0180] In some embodiments, the predicted state variable includes a position variable, and the second calculation module 230 is further used to determine the constraint relationship between the position variable and the predicted input variable based on the corresponding relationship; determine the constraint relationship between the position variable and the slack variable based on the position variable and the safety distance; and determine the constraint relationship between the predicted input variable and the slack variable based on the constraint relationship between the position variable and the slack variable, and the constraint relationship between the position variable and the predicted input variable.
[0181] In some embodiments, the construction module 240 is also used to determine a first sub-objective function based on the difference between the predicted state variables and the reference state quantities at multiple moments; determine a second sub-objective function based on the difference between the predicted input variables and the reference input quantities at multiple moments; determine a third sub-objective function based on the difference between the predicted state variables at multiple adjacent moments; determine a fourth sub-objective function based on the predicted state variables and the reference state quantities at a specified moment among the multiple moments; determine a fifth sub-objective function based on the slack variables at multiple moments; and sum the first sub-objective function, the second sub-objective function, the third sub-objective function, the fourth sub-objective function, and the fifth sub-objective function to obtain the objective function.
[0182] In some embodiments, the output module 250 is further configured to obtain constraints of the objective function; and determine a predicted input quantity sequence based on the objective function, the corresponding relationship, the constraint relationship between the predicted input variables and the slack variables, and the constraints of the objective function.
[0183] In some embodiments, the output module 250 is also used to determine the slack variable constraints based on the safety distance and preset collision distance of the obstacle; determine the starting point constraints of the predicted input variables based on the reference input quantity of the target device at the target time, and determine the starting point constraints of the predicted state variables based on the reference state quantity at the target time; obtain the constraints of the objective function based on the preset boundary constraints and starting point constraints of the predicted input variables, the preset boundary constraints and starting point constraints of the predicted state variables, and the slack variable constraints.
[0184] In some embodiments, the output module 250 is also used to select a target value from multiple values of the preset input variables at each moment, where the target value satisfies the correspondence relationship, the constraint relationship between the predicted input variables and the slack variables, and the constraint conditions of the objective function, and is the value of the predicted input variable at each moment that minimizes the value of the objective function, and the value of the predicted input variable at each moment is used as the predicted input quantity sequence.
[0185] In some implementations, based on the method provided in the above embodiment, the embodiment of the present application also provides an electronic device, such as Figure 11 , Figure 11 A structural block diagram of an electronic device provided in an embodiment of the present application is given, where the electronic device 300 includes one or more processors 310; a memory 320; and one or more programs, wherein the one or more programs are stored in the memory 320 and configured to be executed by the one or more processors 310, and the one or more programs are configured to execute the above-mentioned method.
[0186] The electronic device 300 may be a terminal device, and the terminal device may be a computer, a tablet computer, a vehicle-mounted terminal, etc.
[0187] The processor 310 may include one or more processing cores. The processor 310 utilizes various interfaces and circuits to connect the various components within the wearable device. It executes instructions, programs, code sets, or instruction sets stored in the memory 320, as well as accesses data stored in the memory 320, to perform various functions of the wearable device and process data. Optionally, the processor 310 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 310 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and applications; the GPU is responsible for rendering and drawing displayed content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor and may be implemented separately via a communication chip.
[0188] The memory 320 may include a random access memory (RAM) or a read-only memory (ROM). The memory 320 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device during use.
[0189] In some embodiments, the present application further provides a computer-readable storage medium, which stores program code, and the program code can be called by a processor to execute the above method.
[0190] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program code for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code can be compressed in an appropriate form.
[0191] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal. It can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit of the module or unit function.
[0192] The above is only a preferred embodiment of the present application and does not constitute any form of limitation to the present application. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art can make some changes or modifications to equivalent embodiments using the technical contents disclosed above without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A trajectory planning method based on model predictive control, characterized in that: include: Obtaining reference trajectory information of the target device at the target time, the reference trajectory information including reference point information corresponding to multiple time moments within a predicted time length from the target time moment, each reference point information including a reference input quantity and a reference state quantity at the corresponding time moment, the reference state quantity being determined based on a preset kinematic equation and the corresponding reference input quantity; Determining the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the predicted duration based on the preset kinematic equation and the reference trajectory; For each of the multiple moments, determining a constraint relationship between a prediction input variable and a slack variable at the moment based on the corresponding relationship and the safety distance of the obstacle at the moment, where the slack variable is used to represent a value range of the safety distance; Determine an objective function for selecting the prediction input variable based on the prediction input variable, the prediction state variable, and the slack variable at each moment; Determining a prediction input quantity sequence based on the objective function, the corresponding relationship, and the constraint relationship between the prediction input variables and the slack variables; A predicted trajectory is obtained based on the predicted input sequence and the preset kinematic equation, the predicted input sequence including the values of the predicted input variables at each moment within the prediction duration, and the distance between the predicted trajectory and the obstacle satisfies the safety distance.
2. The method according to claim 1, characterized in that The determining, based on the preset kinematic equation and the reference trajectory, the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the predicted duration includes: Performing Taylor expansion on the preset kinematic equation based on the reference input quantity and the reference state quantity included in each reference point in the reference trajectory to obtain a Taylor expansion corresponding to each reference point; The Taylor expansion corresponding to each reference point is linearized to obtain the linear expression corresponding to each reference point: The linear expressions corresponding to multiple reference points are iteratively calculated to determine the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the prediction period.
3. The method according to claim 1, characterized in that The determining of the objective function for selecting the prediction input variable based on the prediction input variable, the prediction state variable, and the slack variable at each moment includes: Determining a first sub-objective function based on the difference between the predicted state variable and the reference state variable at multiple moments; Determining a second sub-objective function based on the difference between the predicted input variable and the reference input variable at multiple moments; determining a third sub-objective function based on the difference between the predicted state variables at a plurality of adjacent moments; Determining a fourth sub-objective function based on the predicted state variable and the reference state quantity at a specified time among the multiple time moments; Determining a fifth sub-objective function based on the slack variables at multiple moments; The first sub-objective function, the second sub-objective function, the third sub-objective function, the fourth sub-objective function and the fifth sub-objective function are summed to obtain an objective function.
4. The method according to claim 1, wherein The step of determining a prediction input quantity sequence based on the objective function, the corresponding relationship, and the constraint relationship between the prediction input variable and the slack variable includes: Obtaining constraints of the objective function; Based on the objective function, the corresponding relationship, the constraint relationship between the prediction input variables and the slack variables, and the constraint conditions of the objective function, a prediction input quantity sequence is determined.
5. The method according to claim 4, characterized in that The constraint conditions for obtaining the objective function include: Determining slack variable constraints based on a safety distance and a preset collision distance of the obstacle; Determining a starting point constraint condition for the predicted input variable based on a reference input quantity of the target device at a target time, and determining a starting point constraint condition for the predicted state variable based on a reference state quantity at the target time; Based on the preset boundary constraints and the starting point constraints of the predicted input variables, the preset boundary constraints and the starting point constraints of the predicted state variables, and the slack variable constraints, the constraints of the objective function are obtained.
6. The method according to claim 4, characterized in that The step of determining a prediction input quantity sequence based on the objective function, the corresponding relationship, the constraint relationship between the prediction input variables and the slack variables, and the constraint condition of the objective function includes: A target value is selected from multiple values of the preset input variables at each moment, and the target value satisfies the corresponding relationship, the constraint relationship between the predicted input variable and the slack variable, and the constraint condition of the objective function, and is the value of the predicted input variable at each moment that minimizes the value of the objective function. The value of the predicted input variable at each moment is used as the predicted input quantity sequence.
7. The method according to claim 1, characterized in that The predicted state variable includes a position variable, and determining the constraint relationship between the predicted input variable and the slack variable at the moment based on the corresponding relationship and the safety distance of the obstacle at the moment includes: Based on the corresponding relationship, determining a constraint relationship between the position variable and the prediction input variable; Determining a constraint relationship between the position variable and the slack variable based on the position variable and the safety distance; Based on the constraint relationship between the position variable and the slack variable, and the constraint relationship between the position variable and the prediction input variable, the constraint relationship between the prediction input variable and the slack variable is determined.
8. A trajectory planning device based on model predictive control, characterized in that: include: an acquisition module, configured to acquire reference trajectory information of a target device at a target time, the reference trajectory information including reference point information corresponding to a plurality of time moments within a predicted duration from the target time moment, each reference point information including a reference input quantity and a reference state quantity at the corresponding time moment, the reference state quantity being determined based on a preset kinematic equation and the corresponding reference input quantity; A first calculation module is used to determine the corresponding relationship between the predicted state variables and the predicted input variables at each moment within the prediction duration based on a preset kinematic equation and the reference trajectory; a second calculation module, configured to determine, for each of the multiple moments, a constraint relationship between a prediction input variable and a slack variable at that moment based on the corresponding relationship and the safety distance of the obstacle at that moment, wherein the slack variable is used to represent a value range of the safety distance; A construction module is used to determine an objective function for selecting the prediction input variable based on the prediction input variable, the prediction state variable, and the slack variable at each moment; an output module, configured to determine a prediction input quantity sequence based on the objective function, the corresponding relationship, and the constraint relationship between the prediction input variables and the slack variables; An execution module is configured to obtain a predicted trajectory based on the predicted input sequence and the preset kinematic equation, wherein the predicted input sequence includes the values of the predicted input variables at each moment within the prediction duration, and the distance between the predicted trajectory and the obstacle satisfies the safety distance.
9. An electronic device, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that include: The computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent vehicle path tracking method with preview characteristic based on model predictive control
CN114326709A
Obstacle avoidance control method and device of vehicle, storage medium and terminal
CN115309145A