Control method and device of vehicle, vehicle and storage medium
By constructing cost functions for the predicted state variable sequence and the desired state variable sequence, and using model predictive control methods to solve the control variable under the constraint of the control variable, the problem of poor vehicle running stability is solved, and the ride comfort and safety are improved.
Patent Information
- Application Number
- CN202411367623.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Existing vehicle control methods result in poor vehicle smoothness, leading to lower ride comfort and safety.
Based on the vehicle's actual state variables, a predicted state variable sequence and a desired state variable sequence are constructed. A cost function is built through model predictive control (MPC), and the control variable is solved under the constraints of the control variable to ensure the smooth operation of the vehicle.
By controlling the constraints on quantity, excessive abrupt changes during driving are prevented, ensuring smooth vehicle operation and improving passenger comfort and safety.
Smart Images

Figure CN119078841B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of vehicles, and particularly relates to a control method and device of a vehicle, the vehicle and a storage medium. BACKGROUND
[0002] At present, vehicle control is mostly realized based on PID (Proportional-Integral-Derivative) control algorithm and the like. For example, in a brake-to-stop scenario, the vehicle will continuously decelerate until the final vehicle speed is reduced to zero and the vehicle is kept in a stationary state, and the real speed of the vehicle can follow the expected speed curve. However, the vehicle control method in the related art has poor smoothness of vehicle operation, resulting in low comfort and safety of riding. SUMMARY
[0003] The present disclosure provides a control method and device of a vehicle, the vehicle, a server and a computer readable storage medium to at least solve the problem of low comfort and safety of riding caused by poor smoothness of vehicle operation in the related art. The technical solutions of the present disclosure are as follows.
[0004] According to a first aspect of an embodiment of the present disclosure, a control method of a vehicle is provided, including: obtaining a predicted state quantity sequence of the vehicle in a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity includes a speed and a first parameter of the vehicle; constructing a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein an independent variable of the cost function includes a control quantity sequence of the vehicle in a second time period, and a control quantity of the vehicle includes a change quantity of the first parameter; solving the cost function under a constraint condition of the control quantity to obtain a control quantity of the vehicle at the current time, and controlling the vehicle based on the control quantity of the vehicle at the current time.
[0005] According to a second aspect of an embodiment of the present disclosure, a control device of a vehicle is provided, including: an obtaining module configured to obtain a predicted state quantity sequence of the vehicle in a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity includes a speed and a first parameter of the vehicle; a constructing module configured to construct a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein an independent variable of the cost function includes a control quantity sequence of the vehicle in a second time period, and a control quantity of the vehicle includes a change quantity of the first parameter; and a control module configured to solve the cost function under a constraint condition of the control quantity to obtain a control quantity of the vehicle at the current time, and control the vehicle based on the control quantity of the vehicle at the current time.
[0006] According to a third aspect of the embodiments of the present disclosure, a vehicle is provided, comprising a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the method according to the first aspect of the embodiments of the present disclosure.
[0007] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the method according to the first aspect of the embodiments of the present disclosure.
[0008] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects: the vehicle control can be implemented based on MPC, the speed of the vehicle and the first parameter are both taken as state quantities, the change amount of the first parameter is taken as a control quantity, and the control quantity of the vehicle can be solved under the constraint condition of the control quantity (including the constraint condition of the change amount of the first parameter), so that the control quantity of the vehicle can meet the constraint condition of the control quantity, the excessively large jerk during the driving process can be prevented, the smooth running of the vehicle is ensured, and the riding comfort and safety are improved.
[0009] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure and do not limit the present disclosure.
[0011] Figure 1 is a flowchart of a vehicle control method according to an exemplary embodiment.
[0012] Figure 2 is a flowchart of a vehicle control method according to another exemplary embodiment.
[0013] Figure 3 is a flowchart of a vehicle control method according to another exemplary embodiment.
[0014] Figure 4 is a flowchart of a vehicle control method according to another exemplary embodiment.
[0015] Figure 5 is a schematic diagram of a desired speed curve according to an exemplary embodiment.
[0016] Figure 6 is a schematic diagram of a vehicle control method according to an exemplary embodiment.
[0017] Figure 7 is a block diagram of a control device of a vehicle according to an example embodiment.
[0018] Figure 8 is a block diagram of a vehicle according to an example embodiment. DETAILED DESCRIPTION
[0019] In order to make ordinary people in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings.
[0020] It should be noted that the terms "first", "second", and the like in the specification and claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. The embodiments described in the following example embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0021] Figure 1 is a flowchart of a control method of a vehicle according to an example embodiment, as Figure 1 shown, the control method of the vehicle of the present embodiment comprises the following steps.
[0022] S101, based on the real state quantity of the vehicle at the current time, obtaining a predicted state quantity sequence of the vehicle in a first time period, wherein each type of state quantity includes the speed and the first parameter of the vehicle.
[0023] It should be noted that the execution subject of the control method of the vehicle of the present embodiment is an electronic device, such as a vehicle terminal, a vehicle controller, etc. The control method of the vehicle of the present embodiment can be executed by the control device of the vehicle of the present embodiment, and the control device of the vehicle of the present embodiment can be configured in any electronic device to execute the control method of the vehicle of the present embodiment.
[0024] It should be noted that the first parameter is not limited too much, such as an influence parameter of the speed of the vehicle, such as an acting force applied to the vehicle, and / or a torque of the vehicle, and / or an acceleration of the vehicle. The acting force can include driving force, braking force, etc. The first time period refers to a time period after the current time. The predicted state quantity sequence is composed of predicted state quantities of the vehicle at multiple time points in the first time period. The real state quantity at each time point includes the real speed and the real first parameter of the vehicle, and the predicted state quantity at each time point includes the predicted speed and the predicted first parameter of the vehicle.
[0025] In one implementation, the vehicle's true state quantity at the current moment includes the vehicle's true speed at the current moment and the vehicle's true first parameter at the previous moment.
[0026] For example, the first parameter is the force F applied to the vehicle, the current time is the k-th time, the previous time is the (k-1)-th time, and the vehicle's actual state quantity x at the current time (i.e., the k-th time) is... k as follows:
[0027]
[0028] Among them, v k Let F be the vehicle's true speed at time k. k-1 This represents the actual force exerted by the vehicle at time k-1.
[0029] In one implementation, the predicted state quantity of the vehicle at the next moment from the current moment includes the predicted speed of the vehicle at the next moment from the current moment, and the predicted first parameter of the vehicle at the current moment.
[0030] For example, if the current time is the k-th time and the next time is the (k+1)-th time, the predicted state of the vehicle at the next time (i.e., the (k+1)-th time) is x. p,k+1 as follows:
[0031]
[0032] Among them, v p,k+1 Let F be the predicted speed of the vehicle at time k+1. p,k Let be the predicted force of the vehicle at time k.
[0033] For example, if the current time is the kth time, the first time interval is from the (k+1)th time to the (k+N)th time. p The time interval between N moments, N p For the prediction time domain, i.e., the number of prediction moments within the first time period, the predicted state quantity sequence X is... pk as follows:
[0034]
[0035] Where, x p,k+2 to For related content, please refer to x. p,k+1 The relevant content will not be repeated here; the prediction of the state variable sequence X is as follows. pk For 2N p A matrix with 1 row and 1 column.
[0036] In an embodiment, the predicted state quantity sequence of the vehicle in the first time period is obtained based on the real state quantity of the vehicle at the current time, including inputting the real state quantity of the vehicle at the current time into a prediction model, and outputting the predicted state quantity sequence from the prediction model. It should be noted that the prediction model is not limited, such as including a data-driven model, a mechanism model, etc. For example, the prediction model is constructed based on the law of dynamics (such as Newton's second law).
[0037] In some examples, the method further includes obtaining a sample state quantity of the vehicle at a sample time, and a sample state quantity sequence of the vehicle in a first sample time period, inputting the sample state quantity of the vehicle at the sample time into an initial model, outputting a third state quantity sequence of the vehicle in the first sample time period from the initial model, training the initial model based on the sample state quantity sequence and the third state quantity sequence, and obtaining the prediction model.
[0038] It should be noted that the first sample time period refers to a time period after the sample time.
[0039] S102, based on the predicted state quantity sequence and the expected state quantity sequence of the vehicle in the first time period, constructing a cost function of the vehicle, wherein the independent variable of the cost function includes a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle includes a change quantity of the first parameter.
[0040] It should be noted that the expected state quantity sequence is composed of expected state quantities of the vehicle at multiple time points in the first time period, and each expected state quantity at a time point includes an expected speed and an expected first parameter of the vehicle. The second time period refers to a time period including the current time and the remaining time points after the current time. The control quantity sequence is composed of control quantities of the vehicle at multiple time points in the second time period, and each control quantity at a time point includes a change quantity of the first parameter. The change quantity of the first parameter is not limited, such as including a change quantity of the force applied to the vehicle (hereinafter referred to as the change quantity of the force), and / or a change quantity of the torque of the vehicle, and / or a change quantity of the acceleration of the vehicle.
[0041] In an embodiment, the expected state quantity of the vehicle at the next time point of the current time includes an expected speed of the vehicle at the next time point of the current time, and an expected first parameter of the vehicle at the current time.
[0042] For example, the current time is the kth time point, the next time point of the current time is the k+1th time point, and the expected state quantity of the vehicle at the next time point of the current time (i.e. the k+1th time point) is x r,k+1 As follows:
[0043]
[0044] Wherein, v r,k+1Let F be the expected speed of the vehicle at time k+1. r,k Let be the expected force exerted by the vehicle at time k.
[0045] For example, if the current time is the kth time, the first time interval is from the (k+1)th time to the (k+N)th time. p The expected state sequence X is given between time intervals of time. rk as follows:
[0046]
[0047] Where, x r,k+2 to For related content, please refer to x. r,k+1 The relevant content will not be repeated here; the expected state sequence X rk For 2N p A matrix with 1 row and 1 column.
[0048] In one implementation, the control quantity of the vehicle at the current moment includes the deviation between a first parameter of the vehicle at the current moment and a first parameter of the vehicle at the previous moment.
[0049] For example, if the current time is the k-th time and the previous time is the (k-1)-th time, the control quantity u of the vehicle at the current time is... k =ΔF k =F p,k -F k-1 , where ΔF k Let F be the change in the force exerted by the vehicle at time k. p,k Let F be the predicted force of the vehicle at time k. k-1 This represents the actual force exerted by the vehicle at time k-1.
[0050] For example, the current time is the k-th time, and the second time period is from the k-th time to the (k+N)-th time. c The time interval between N moments, N c To control the time domain, i.e., the number of control moments within the second time period, the control quantity sequence U k as follows:
[0051]
[0052] Among them, u k+1 to For related content, please refer to u k The relevant content will not be repeated here; the control sequence U k For N c A matrix with 1 row and 1 column.
[0053] In the embodiments of this disclosure, the cost function can be any cost function in MPC (Model Predictive Control), without much limitation, such as including quadratic programming expressions, etc.
[0054] For example, the cost function J is as follows:
[0055]
[0056] Among them, (X) pk -X rk ) T For (X) pk -X rk The transpose of ) For U k Let Q be the transpose of the matrix, Q be the state weight matrix, and R be the control weight matrix. Both Q and R are symmetric positive definite matrices, and Q is 2N. p Line 2N p A matrix of columns, R = N c Line N c A matrix of columns.
[0057] For example, the state weight matrix Q is as follows:
[0058]
[0059] Where, q i The weight is the weight corresponding to the i-th state variable, where i is no greater than 2N. p A positive integer, Q is a symmetric positive definite matrix, and is a diagonal matrix.
[0060] For example, the control weight matrix R is as follows:
[0061]
[0062] Where, r j The weight is the weight corresponding to the j-th state variable, where j is no greater than N. c A positive integer, R is a symmetric positive definite matrix and is a diagonal matrix.
[0063] In one implementation, the state variable weight matrix in the cost function includes weights corresponding to the vehicle's speed and weights corresponding to the first parameter, wherein the weight corresponding to the first parameter is less than the weight corresponding to the vehicle's speed. Therefore, by prioritizing the optimization of the vehicle's speed over optimizing the first parameter, the focus shifts to reducing the deviation between the vehicle's actual speed and the desired speed, thereby improving the accuracy of speed control.
[0064] In some examples, the weight corresponding to the first parameter is zero, and the first parameter is not optimized, and in particular, when the state quantity only includes the speed of the vehicle and the first parameter, only the speed of the vehicle is optimized to reduce the deviation between the actual speed and the expected speed of the vehicle, thereby improving the accuracy of the vehicle speed control.
[0065] For example, X pk = A x k + B U k , the cost function J can be obtained as follows:
[0066]
[0067] where B T is the transpose matrix of B, X pk = A x k + B U k , and details thereof can be found in the following examples, which will not be repeated here.
[0068] In an embodiment, the method further comprises obtaining an expected speed curve of the vehicle, extracting a first curve segment within a first time period from the expected speed curve, obtaining an expected speed sequence of the vehicle within the first time period based on the curve segment within the first time period, generating an expected first parameter curve of the vehicle based on the expected speed curve, extracting a second curve segment within the first time period from the expected first parameter curve, obtaining an expected first parameter sequence of the vehicle within the first time period based on the second curve segment within the first time period, and obtaining an expected state quantity sequence based on the expected speed sequence and the expected first parameter sequence.
[0069] S103, solving the cost function under the constraint condition of the control quantity to obtain the control quantity of the vehicle at the current time, and controlling the vehicle based on the control quantity of the vehicle at the current time.
[0070] It should be noted that the constraint condition of the control quantity includes a constraint condition of the variation of the first parameter, and the constraint condition is not limited too much, such as boundary constraint (upper limit value, lower limit value), equality constraint, etc. The solving of the cost function can be implemented by using any solving method of a cost function in related technologies, which will not be repeated here. It can be understood that by setting the constraint condition of the variation of the first parameter (such as the force, acceleration, and torque), the large jerk in the driving process can be prevented, the smooth running of the vehicle is ensured, and the riding comfort and safety are improved.
[0071] In an embodiment, the cost function is solved under the constraint of the control quantity to obtain the control quantity of the vehicle at the current time, including solving the cost function under the constraint of the control quantity and the constraint of the state quantity to obtain the control quantity of the vehicle at the current time. In this way, the cost function can be solved by comprehensively considering the constraint of the control quantity and the constraint of the state quantity, so as to ensure that the control quantity of the vehicle meets the constraint of the control quantity and the state quantity of the vehicle meets the constraint of the state quantity.
[0072] It should be noted that the constraint of the state quantity includes the constraint of the speed of the vehicle and the constraint of the first parameter (such as force, acceleration, torque).
[0073] For example, in the vehicle stop (such as single pedal stop) scenario, the constraint conditions are as shown in Table 1:
[0074] Table 1 Constraint conditions
[0075]
[0076] As shown in Table 1, by setting the constraint conditions of , the excessive jerk during the stop process can be prevented, the smooth running of the vehicle during the stop process is ensured, and the riding comfort and safety during the stop process are improved. By setting the constraint condition of -5000≤F≤0, it can be ensured that the vehicle is continuously decelerated during the stop process and the deceleration is not too large. v0 is the initial speed of the vehicle. By setting the constraint condition of 0≤v≤v0, the negative speed during the stop process can be avoided, and the vehicle can be prevented from slipping backward.
[0077] In an embodiment, the cost function is solved under the constraint of the control quantity to obtain the control quantity of the vehicle at the current time, including optimizing the cost function under the constraint of the control quantity and the constraint of the state quantity to obtain the control quantity sequence when the cost function is minimized as the final control quantity sequence, and taking the first control quantity of the final control quantity sequence as the control quantity of the vehicle at the current time. In this way, the control quantity sequence when the cost function is minimized can be solved as the final control quantity sequence by comprehensively considering the constraint of the control quantity and the constraint of the state quantity, so as to obtain the control quantity of the vehicle at the current time.
[0078] In an embodiment, the cost function is solved under the constraint of the control quantity to obtain the control quantity of the vehicle at the current time, including inputting the constraint of the control quantity, the constraint of the state quantity and the cost function into a quadratic programming solver in the case that the cost function is a quadratic programming expression, and outputting the control quantity sequence by the quadratic programming solver.
[0079] The control method of the vehicle provided by the embodiments of the present disclosure comprises: obtaining a predicted state quantity sequence of the vehicle in a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity comprises a speed and a first parameter of the vehicle; constructing a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein an independent variable of the cost function comprises a control quantity sequence of the vehicle in a second time period, the control quantity of the vehicle comprises a variation of the first parameter, and the cost function is solved under a constraint condition of the control quantity to obtain the control quantity of the vehicle at the current time; and controlling the vehicle based on the control quantity of the vehicle at the current time. Thus, the vehicle control can be realized based on MPC, the speed and the first parameter of the vehicle are both taken as state quantities, the variation of the first parameter is taken as the control quantity, and the control quantity of the vehicle can be solved under the constraint condition of the control quantity (including the constraint condition of the variation of the first parameter), so that the control quantity of the vehicle can meet the constraint condition of the control quantity, the excessively large jerk in the driving process can be prevented, the smooth running of the vehicle is ensured, and the riding comfort and safety are improved.
[0080] Figure 2 is a flow chart of a control method of a vehicle according to another exemplary embodiment, as shown in Figure 2 The control method of the vehicle according to the embodiments of the present disclosure comprises the following steps.
[0081] In S201, a first conversion matrix between the predicted state quantity sequence and the real state quantity of the vehicle at the current time is obtained.
[0082] In an implementation, the first conversion matrix between the predicted state quantity sequence and the real state quantity of the vehicle at the current time is obtained by: obtaining a third conversion matrix between a predicted state quantity of the vehicle at a next time of the current time and the real state quantity of the vehicle at the current time, and obtaining the first conversion matrix based on the third conversion matrix and a prediction time domain. Thus, the third conversion matrix between the predicted state quantity of the vehicle at the next time of the current time and the real state quantity of the vehicle at the current time can be obtained first, and the first conversion matrix can be obtained by comprehensively considering the third conversion matrix and the prediction time domain.
[0083] In some examples, the third conversion matrix between the predicted state quantity of the vehicle at the next time of the current time and the real state quantity of the vehicle at the current time is obtained by: constructing a continuous time model between a variation rate of the speed of the vehicle and the first parameter based on a dynamic law, discretizing the continuous time model to obtain a first model, replacing a predicted first parameter of the vehicle in the first model with a sum of a real first parameter of the vehicle at a previous time and a variation of the first parameter of the vehicle at the current time to obtain a second model, and obtaining the third conversion matrix based on the second model.
[0084] For example, the first parameter is the force F applied on the vehicle, and the continuous-time model is as follows:
[0085]
[0086] wherein, is the rate of change of the speed of the vehicle, and m is the mass of the vehicle.
[0087] For example, the first model is as follows:
[0088]
[0089] wherein, Ts is the sampling period, and is in the order of milliseconds.
[0090] For example, F in the first model can be replaced by F p,k +F k-1 +ΔF k to obtain a second model, and the second model is as follows:
[0091]
[0092] The third conversion matrix The first conversion matrix The first conversion matrix A is a 2N p row and 2 column matrix.
[0093] In an embodiment, the first conversion matrix between the predicted state quantity sequence and the real state quantity of the vehicle at the current time is obtained by obtaining a sample state quantity of the vehicle at a sample time, and a sample state quantity sequence of the vehicle within a first sample time period, obtaining a sample conversion matrix between the sample state quantity sequence and the sample state quantity of the vehicle at the sample time, and taking the sample conversion matrix as the first conversion matrix. In this way, the sample conversion matrix between the sample state quantity sequence and the sample state quantity of the vehicle at the sample time can be obtained, and the sample conversion matrix is taken as the first conversion matrix.
[0094] In S202, the second conversion matrix between the predicted state quantity sequence and the control quantity sequence is obtained.
[0095] In an embodiment, the second conversion matrix between the sequence of predicted state quantities and the sequence of control quantities is obtained by obtaining a third conversion matrix between a predicted state quantity of the vehicle at a next time instant of the current time instant and a real state quantity of the vehicle at the current time instant, obtaining a fourth conversion matrix between the predicted state quantity of the vehicle at the next time instant and the sequence of control quantities, and obtaining the second conversion matrix based on the third conversion matrix, the fourth conversion matrix, a prediction time domain and a control time domain. In this way, the third conversion matrix between the predicted state quantity of the vehicle at the next time instant of the current time instant and the real state quantity of the vehicle at the current time instant can be obtained first, and the fourth conversion matrix between the predicted state quantity of the vehicle at the next time instant and the sequence of control quantities can be obtained, and the second conversion matrix can be obtained by comprehensively considering the third conversion matrix, the fourth conversion matrix, the prediction time domain and the control time domain.
[0096] In some examples, the fourth conversion matrix between the predicted state quantity of the vehicle at the next time instant and the sequence of control quantities is obtained by constructing a continuous-time model between a rate of change of a speed of the vehicle and a first parameter based on a dynamic law, discretizing the continuous-time model to obtain a first model, replacing a predicted first parameter of the vehicle at the current time instant in the first model with a sum of a real first parameter of the vehicle at a previous time instant and a change in the first parameter of the vehicle at the current time instant to obtain a second model, and obtaining the fourth conversion matrix based on the second model.
[0097] For example, the second model is as follows:
[0098]
[0099] The fourth conversion matrix
[0100] The second conversion matrix B is as follows:
[0101]
[0102] The second conversion matrix B is a 2N p row N c column matrix.
[0103] In an embodiment, the second conversion matrix between the sequence of predicted state quantities and the sequence of control quantities is obtained by obtaining a sequence of sample state quantities of the vehicle within a first sample time period and a sequence of sample control quantities of the vehicle within a second sample time period, obtaining a sample conversion matrix between the sequence of sample state quantities and the sequence of sample control quantities, and taking the sample conversion matrix as the second conversion matrix. In this way, the sample conversion matrix between the sequence of sample state quantities and the sequence of sample control quantities can be obtained, and the sample conversion matrix can be taken as the second conversion matrix.
[0104] It should be noted that the second sample time period refers to a time period including the sample moment and the remaining moments after the sample moment.
[0105] In S203, a predicted state quantity sequence is obtained based on the first conversion matrix, the second conversion matrix and the real state quantity of the vehicle at the current moment, wherein the predicted state quantity sequence is related to the control quantity sequence.
[0106] In this embodiment, the predicted state quantity sequence is related to the control quantity sequence, that is, the predicted state quantity sequence can be represented by the control quantity sequence.
[0107] In one embodiment, the predicted state quantity sequence is obtained based on the first conversion matrix, the second conversion matrix and the real state quantity of the vehicle at the current moment, including: converting the real state quantity of the vehicle at the current moment based on the first conversion matrix to obtain a first state quantity sequence, obtaining a second state quantity sequence based on the second conversion matrix, wherein the second state quantity sequence is related to the control quantity sequence, and performing summation processing on the first state quantity sequence and the second state quantity sequence to obtain the predicted state quantity sequence.
[0108] For example, the predicted state quantity sequence X pk is obtained as follows:
[0109] X pk =A·x k +B·U k
[0110] wherein A·x k is the first state quantity sequence, and B·U k is the second state quantity sequence.
[0111] In S204, a cost function of the vehicle is constructed based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in a first time period, wherein the independent variable of the cost function includes a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle includes a variation of the first parameter.
[0112] In S205, the cost function is solved under the constraint condition of the control quantity to obtain the control quantity of the vehicle at the current moment, and the vehicle is controlled based on the control quantity of the vehicle at the current moment.
[0113] The related content of steps S204-S205 can be referred to the above embodiment, which will not be described here.
[0114] The control method of the vehicle provided by the embodiments of the present disclosure comprises the following steps.
[0115] Figure 3 Fig. 1 is a flowchart of a control method of a vehicle according to another exemplary embodiment. Figure 3 The control method of the vehicle provided by the embodiments of the present disclosure comprises the following steps.
[0116] In S301, a predicted state quantity sequence of the vehicle in a first time period is obtained based on the real state quantity of the vehicle at the current time, wherein each type of state quantity comprises the speed and the first parameter of the vehicle.
[0117] In S302, a cost function of the vehicle is constructed based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein the independent variable of the cost function comprises a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle comprises the change amount of the first parameter.
[0118] In S303, the cost function is solved under the constraint condition of the control quantity to obtain the control quantity of the vehicle at the current time.
[0119] The related content of steps S301-S303 can be referred to the above embodiments, and will not be described here.
[0120] In S304, a first sum of the real first parameter of the vehicle at the previous time of the current time and the change amount of the first parameter of the vehicle at the current time is obtained.
[0121] In S305, a target first parameter of the vehicle at the current time is obtained based on the first sum.
[0122] It should be noted that the first sum is the predicted first parameter of the vehicle at the current time.
[0123] For example, the first parameter is the force F applied to the vehicle, and the force F applied to the vehicle at the current time is the sum of the force F applied to the vehicle at the previous time and the change amount ΔF of the force F applied to the vehicle at the current time. p,k k-1 k .
[0124] In an implementation, obtaining the target first parameter of the vehicle at the current time based on the first sum comprises taking the first sum as the target first parameter of the vehicle at the current time.
[0125] In an embodiment, the target first parameter of the vehicle at the current time is obtained based on the first sum, including obtaining a compensation amount of the first parameter based on an environment in which the vehicle is located at the current time, obtaining a second sum of the first sum and the compensation amount as the target first parameter of the vehicle at the current time. In this way, the compensation amount of the first parameter can be obtained based on the environment in which the vehicle is located at the current time, the second sum of the first sum and the compensation amount is obtained as the target first parameter of the vehicle at the current time, the influence of the environment on the performance of the vehicle can be reduced, and the control accuracy of the vehicle can be improved.
[0126] It should be noted that the compensation amount is not limited too much, such as a road resistance compensation amount (such as a wind resistance compensation amount, an ice and snow coverage compensation amount), a slope compensation amount, a temperature compensation amount, etc. The related content of obtaining the compensation amount of the first parameter can be implemented by using any compensation amount obtaining method in the related art, which is not limited too much here.
[0127] In some examples, the compensation amount of the first parameter is obtained based on the environment in which the vehicle is located at the current time, including obtaining a road resistance compensation amount based on at least one of a road parameter, a wind speed, and a wind direction in which the vehicle is located at the current time. The road parameter can include a road category, a friction coefficient, a road surface material, a road surface flatness, whether covered with ice and snow, whether wet, etc.
[0128] In some examples, the compensation amount of the first parameter is obtained based on the environment in which the vehicle is located at the current time, including obtaining a slope compensation amount based on a slope of a road in which the vehicle is located at the current time.
[0129] S306, controlling the vehicle based on the target first parameter of the vehicle at the current time.
[0130] In an embodiment, in the case that the first parameter includes an acting force applied to the vehicle, the vehicle is controlled based on the target first parameter of the vehicle at the current time, including obtaining a target acting force of the vehicle at the current time, and a ratio between the target acting force of the vehicle at the current time and a dynamic radius of a tire of the vehicle at the current time as a target torque of the vehicle at the current time, and controlling the vehicle based on the target torque of the vehicle at the current time. In this way, in the case that the first parameter includes the acting force applied to the vehicle, the target torque of the vehicle at the current time can be obtained based on the target acting force of the vehicle at the current time to control the vehicle.
[0131] In an embodiment, in the case that the first parameter includes a torque of the vehicle, the vehicle is controlled based on the target first parameter of the vehicle at the current time, including controlling the vehicle based on the target torque of the vehicle at the current time.
[0132] In an embodiment, when the first parameter comprises an acceleration of the vehicle, the vehicle is controlled based on the target first parameter of the vehicle at the current time, comprising: obtaining a product of a target acceleration of the vehicle at the current time and a mass of the vehicle as a target force of the vehicle at the current time, obtaining a ratio between the target force of the vehicle at the current time and a dynamic radius of a tire of the vehicle at the current time as a target torque of the vehicle at the current time, and controlling the vehicle based on the target torque of the vehicle at the current time. In this way, when the first parameter comprises the acceleration of the vehicle, the target force of the vehicle at the current time can be obtained based on the target acceleration of the vehicle at the current time, and the target torque of the vehicle at the current time can be obtained based on the target force of the vehicle at the current time, so as to control the vehicle.
[0133] The control method of the vehicle provided by the embodiments of the present disclosure comprises: obtaining a first sum value of a real first parameter of the vehicle at a previous time of a current time and a change amount of the first parameter of the vehicle at the current time, obtaining a target first parameter of the vehicle at the current time based on the first sum value, and controlling the vehicle based on the target first parameter of the vehicle at the current time. In this way, the first sum value of the real first parameter of the vehicle at the previous time of the current time and the change amount of the first parameter of the vehicle at the current time can be obtained, the target first parameter of the vehicle at the current time can be obtained based on the first sum value, and the vehicle can be controlled.
[0134] Figure 4 is a flow chart of a control method of a vehicle according to another exemplary embodiment, as shown in Figure 4 The control method of the vehicle provided by the embodiments of the present disclosure comprises the following steps.
[0135] S401, obtaining a predicted state quantity sequence of the vehicle within a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity comprises a speed and a first parameter of the vehicle.
[0136] The related content of step S401 can be referred to the above-mentioned embodiments, which will not be described here again.
[0137] S402, obtaining a predicted state quantity of the vehicle at the current time based on a real state quantity of the vehicle at a previous time of the current time and a control quantity of the vehicle at the previous time.
[0138] For example, the first parameter is a force F applied to the vehicle, the current time is the kth time, the previous time of the current time is the (k-1)th time, the real state quantity x k-1 As follows:
[0139]
[0140] wherein v k-1 is a real speed of the vehicle at the k-1th moment, F k-2 is a real force of the vehicle at the k-2th moment.
[0141] For example, the current moment is the kth moment, and the predicted state quantity x p,k is as follows:
[0142]
[0143] wherein v p,k is a predicted speed of the vehicle at the kth moment, F p,k-1 is a predicted force of the vehicle at the k-1th moment.
[0144] For example, the current moment is the kth moment, the previous moment of the current moment is the k-1th moment, and the control quantity u k-1 = ΔF k-1 = F p,k-1 - F k-2 wherein ΔF k-1 is a change quantity of the force of the vehicle at the k-1th moment, F p,k-1 is a predicted force of the vehicle at the k-1th moment, F k-2 is a real force of the vehicle at the k-2th moment.
[0145] In an embodiment, the predicted state quantity of the vehicle at the current moment is obtained based on the real state quantity of the vehicle at the previous moment of the current moment and the control quantity of the vehicle at the previous moment, and comprises inputting the real state quantity of the vehicle at the previous moment of the current moment and the control quantity of the vehicle at the previous moment into a prediction model, and outputting the predicted state quantity of the vehicle at the current moment by the prediction model.
[0146] In some examples, the method further comprises obtaining a sample state quantity of the vehicle at a sample moment and a sample control quantity of the vehicle at the sample moment, inputting the sample state quantity of the vehicle at the sample moment and the sample control quantity of the vehicle at the sample moment into an initial model, outputting a predicted state quantity of the vehicle at a next moment of the sample moment by the initial model, training the initial model based on the predicted state quantity of the vehicle at the next moment of the sample moment and a sample state quantity of the vehicle at the next moment of the sample moment, and obtaining the prediction model.
[0147] In an implementation, the predicted state quantity of the vehicle at the current time is obtained based on the real state quantity of the vehicle at the last time of the current time and the control quantity of the vehicle at the last time, including obtaining a fifth conversion matrix between the predicted state quantity of the vehicle at the current time and the real state quantity of the vehicle at the last time of the current time, converting the real state quantity of the vehicle at the last time of the current time based on the fifth conversion matrix to obtain a first state quantity, obtaining a sixth conversion matrix between the predicted state quantity of the vehicle at the current time and the control quantity of the vehicle at the last time, converting the control quantity of the vehicle at the last time based on the sixth conversion matrix to obtain a second state quantity, and obtaining the predicted state quantity of the vehicle at the current time based on the first state quantity and the second state quantity.
[0148] For example, the third model is as follows:
[0149]
[0150] F p,k-1 in the third model can be replaced by F k-2 +F k-1 , to obtain a fourth model, and the fourth model is as follows:
[0151]
[0152] The fifth conversion matrix is consistent with the third conversion matrix, and both are
[0153] The sixth conversion matrix is consistent with the fourth conversion matrix, and both are
[0154] For example, the process of obtaining the predicted state quantity x p,k of the vehicle at the current time is as follows:
[0155] x p,k =A d ·x k-1 +B d ·u k-1
[0156] Wherein, A d ·x k-1 is the first state quantity, and B d ·u k-1 is the second state quantity.
[0157] It should be noted that the related content of the third model can refer to the related content of the first model in the above embodiment, the related content of the fourth model can refer to the related content of the second model in the above embodiment, the related content of the fifth conversion matrix can refer to the related content of the third conversion matrix, and the related content of the sixth conversion matrix can refer to the related content of the fourth conversion matrix, which will not be repeated here.
[0158] S403, obtain an error quantity between the real state quantity of the vehicle at the current time and the predicted state quantity of the vehicle at the current time.
[0159] For example, the error quantity e = x k -x p,k .
[0160] S404, construct a cost function based on the predicted state quantity sequence, the expected state quantity sequence and the error quantity.
[0161] In an embodiment, the cost function is constructed based on the predicted state quantity sequence, the expected state quantity sequence and the error quantity, including obtaining a product of the error quantity and a feedback coefficient matrix as an error matrix, correcting the predicted state quantity sequence based on the error matrix to obtain a corrected state quantity sequence, and constructing the cost function based on the corrected state quantity sequence and the expected state quantity sequence. Thus, the error matrix can be obtained based on the error quantity and the feedback coefficient matrix to correct the predicted state quantity sequence to obtain the corrected state quantity sequence, and then the cost function is constructed.
[0162] In some examples, the predicted state quantity sequence is corrected based on the error matrix to obtain the corrected state quantity sequence, including summing the predicted state quantity sequence and the error matrix to obtain the corrected state quantity sequence.
[0163] For example, the cost function J is as follows:
[0164]
[0165] E = e · H
[0166] Wherein, E is the error matrix, H is the feedback coefficient matrix, (X pk +E) is the corrected state quantity sequence, E and H are both 2N p row and 1 column matrix, (X pk +E-X rk ) T is the transpose matrix of (X pk +E-X rk ).
[0167] For example, X pk =A·x k +B·U k , X pk =A·x k +B·U k is substituted into J = (X pk +E-Xrk)TQ(Xpk+E-Xrk)+UkTRUk to obtain the cost function J as follows:
[0168]
[0169] In an embodiment, the cost function is constructed based on the sequence of predicted state quantities, the sequence of expected state quantities and the error quantity, including correcting the sequence of predicted state quantities based on the error quantity to obtain a sequence of corrected state quantities, and constructing the cost function based on the sequence of corrected state quantities and the sequence of expected state quantities. In this way, the sequence of predicted state quantities can be corrected based on the error quantity to obtain a sequence of corrected state quantities, and then the cost function is constructed.
[0170] In some examples, the sequence of predicted state quantities is corrected based on the error quantity to obtain a sequence of corrected state quantities, including obtaining a sum of the s th predicted state quantity in the sequence of predicted state quantities and the error quantity as the s th corrected state quantity in the sequence of corrected state quantities, where s is a positive integer not greater than the prediction time domain N p
[0171] In some examples, the sequence of predicted state quantities is corrected based on the error quantity to obtain a sequence of corrected state quantities, including obtaining a product of the error quantity and a set coefficient as a correction quantity, and obtaining a sum of the s th predicted state quantity in the sequence of predicted state quantities and the correction quantity as the s th corrected state quantity in the sequence of corrected state quantities. It should be noted that the set coefficient is not limited too much, such as 0.5, 0.8, etc.
[0172] S405, the cost function is solved under the constraint condition of the control quantity to obtain the control quantity of the vehicle at the current time, and the vehicle is controlled based on the control quantity of the vehicle at the current time.
[0173] The related content of step S405 can be referred to the above-mentioned embodiments, which will not be repeated here.
[0174] The control method of the vehicle provided by the embodiments of the present disclosure is based on the real state quantity of the vehicle at the previous time of the current time, and the control quantity of the vehicle at the previous time, to obtain the predicted state quantity of the vehicle at the current time, obtain the error quantity between the real state quantity of the vehicle at the current time and the predicted state quantity of the vehicle at the current time, and construct the cost function based on the sequence of predicted state quantities, the sequence of expected state quantities and the error quantity. In this way, the predicted state quantity of the vehicle at the current time can be obtained by comprehensively considering the real state quantity of the vehicle at the previous time of the current time and the control quantity of the vehicle at the previous time, the error quantity between the real state quantity of the vehicle at the current time and the predicted state quantity of the vehicle at the current time is obtained, and the cost function is constructed by comprehensively considering the sequence of predicted state quantities, the sequence of expected state quantities and the error quantity. Feedback correction is added, which can avoid the problem that the sequence of predicted state quantities is inaccurate to affect the solution of the control quantity, improve the accuracy of the solution of the control quantity, and make the control of the vehicle have strong anti-disturbance and system uncertainty overcoming ability.
[0175] On the basis of any of the above embodiments, taking a vehicle braking (such as single pedal braking) scenario as an example, a desired speed curve as shown in Figure 5 is obtained, t0 is the time when the vehicle starts to brake, i.e. the initial time, and v0 is the speed of the vehicle at time t0, i.e. the initial speed.
[0176] As shown in Figure 6 , a desired state quantity sequence X rk is obtained based on the desired speed curve.
[0177] At the k-1th time, the control quantity u k-1 of the vehicle at the k-1th time output by the quadratic programming solver is obtained, and the vehicle is controlled based on u k-1 at the k-1th time.
[0178] The real state quantity x k-1 of the vehicle at the k-1th time and u k-1 are input to the prediction model, and the prediction state quantity x p,k of the vehicle at the current time is output by the prediction model.
[0179] At the kth time, the real state quantity x k of the vehicle at the kth time is obtained, the error quantity e = x k -x p,k is obtained, x k is input to the prediction model, and the prediction state quantity sequence X pk is output by the prediction model, the error quantity e and X pk are input to the feedback corrector, the corrected state quantity sequence X pmodk is output by the feedback corrector, the cost function is constructed based on X pmodk and X rk , and the cost function is input to the quadratic programming solver, the control quantity u k of the vehicle at the kth time is output by the quadratic programming solver, and the vehicle is controlled based on u k at the kth time.
[0180] Figure 7 is a block diagram of a control device of a vehicle according to an exemplary embodiment. Referring to Figure 7 , the control device 100 of the vehicle of the embodiment of the disclosure includes an acquisition module 110, a construction module 120 and a control module 130.
[0181] The acquisition module 110 is configured to obtain a prediction state quantity sequence of the vehicle within a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity includes a speed and a first parameter of the vehicle.
[0182] The construction module 120 is configured to construct a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in a first time period, wherein an independent variable of the cost function comprises a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle comprises a variation of the first parameter.
[0183] The control module 130 is configured to solve the cost function under the constraint condition of the control quantity to obtain a control quantity of the vehicle at a current time, and control the vehicle based on the control quantity of the vehicle at the current time.
[0184] In an embodiment of the present disclosure, the acquisition module 110 is further configured to: acquire a first conversion matrix between the predicted state quantity sequence and a real state quantity of the vehicle at the current time; acquire a second conversion matrix between the predicted state quantity sequence and the control quantity sequence; and obtain the predicted state quantity sequence based on the first conversion matrix, the second conversion matrix and the real state quantity of the vehicle at the current time, wherein the predicted state quantity sequence is related to the control quantity sequence.
[0185] In an embodiment of the present disclosure, the acquisition module 110 is further configured to: acquire a third conversion matrix between a predicted state quantity of the vehicle at a next time of the current time and the real state quantity of the vehicle at the current time; and obtain the first conversion matrix based on the third conversion matrix and a prediction time domain.
[0186] In an embodiment of the present disclosure, the acquisition module 110 is further configured to: acquire a third conversion matrix between a predicted state quantity of the vehicle at a next time of the current time and the real state quantity of the vehicle at the current time; acquire a fourth conversion matrix between the predicted state quantity of the vehicle at the next time and the control quantity sequence; and obtain the second conversion matrix based on the third conversion matrix, the fourth conversion matrix, a prediction time domain and a control time domain.
[0187] In an embodiment of the present disclosure, the acquisition module 110 is further configured to: convert the real state quantity of the vehicle at the current time based on the first conversion matrix to obtain a first state quantity sequence; obtain a second state quantity sequence based on the second conversion matrix, wherein the second state quantity sequence is related to the control quantity sequence; and perform summation processing on the first state quantity sequence and the second state quantity sequence to obtain the predicted state quantity sequence.
[0188] In one embodiment of the present disclosure, the state quantity weight matrix in the cost function comprises a weight corresponding to a speed of the vehicle and a weight corresponding to the first parameter, wherein the weight corresponding to the first parameter is smaller than the weight corresponding to the speed of the vehicle.
[0189] In one embodiment of the present disclosure, the weight corresponding to the first parameter is zero.
[0190] In one embodiment of the present disclosure, the control module 130 is further configured to: obtain a first parameter of the vehicle at a previous moment of a current moment, and a first sum value of a variation of the first parameter of the vehicle at the current moment; obtain a target first parameter of the vehicle at the current moment based on the first sum value; and control the vehicle based on the target first parameter of the vehicle at the current moment.
[0191] In one embodiment of the present disclosure, the control module 130 is further configured to: obtain a compensation amount of the first parameter based on an environment in which the vehicle is located at the current moment; and obtain a second sum value of the first sum value and the compensation amount as the target first parameter of the vehicle at the current moment.
[0192] In one embodiment of the present disclosure, in a case where the first parameter comprises an acting force applied to the vehicle, the control module 130 is further configured to: obtain a target acting force of the vehicle at the current moment, and a ratio between a target torque of the vehicle at the current moment and a dynamic radius of a tire of the vehicle at the current moment; and control the vehicle based on the target torque of the vehicle at the current moment.
[0193] In one embodiment of the present disclosure, the construction module 120 is further configured to: obtain a predicted state quantity of the vehicle at the current moment based on a real state quantity of the vehicle at a previous moment of the current moment and a control quantity of the vehicle at the previous moment; obtain an error quantity between the real state quantity of the vehicle at the current moment and the predicted state quantity of the vehicle at the current moment; and construct the cost function based on the predicted state quantity sequence, the expected state quantity sequence and the error quantity.
[0194] In one embodiment of the present disclosure, the construction module 120 is further configured to: obtain a product of the error quantity and a feedback coefficient matrix as an error matrix; correct the predicted state quantity sequence based on the error matrix to obtain a corrected state quantity sequence; and construct the cost function based on the corrected state quantity sequence and the expected state quantity sequence.
[0195] In an embodiment of the present disclosure, the control module 130 is further configured to: perform optimization processing on the cost function under the constraint condition of the control quantity and the constraint condition of the state quantity, to obtain a control quantity sequence when the cost function is minimized as a final control quantity sequence; and take the first control quantity of the final control quantity sequence as the control quantity of the vehicle at the current time.
[0196] In an embodiment of the present disclosure, the first parameter includes a force applied to the vehicle and / or a torque of the vehicle.
[0197] As to the apparatus in the above-mentioned embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments of the method, and thus will not be described in detail here.
[0198] The control apparatus of the vehicle provided by the embodiments of the present disclosure obtains the predicted state quantity sequence of the vehicle in the first time period based on the real state quantity of the vehicle at the current time, wherein each type of state quantity includes the speed of the vehicle and the first parameter, constructs the cost function of the vehicle based on the predicted state quantity sequence and the expected state quantity sequence of the vehicle in the first time period, wherein the independent variable of the cost function includes the control quantity sequence of the vehicle in the second time period, the control quantity of the vehicle includes the change amount of the first parameter, solves the cost function under the constraint condition of the control quantity to obtain the control quantity of the vehicle at the current time, and controls the vehicle based on the control quantity of the vehicle at the current time. Thus, the vehicle control can be implemented based on MPC, the speed of the vehicle and the first parameter are both taken as state quantities, the change amount of the first parameter is taken as the control quantity, and the control quantity of the vehicle can be solved under the constraint condition of the control quantity (including the constraint condition of the change amount of the first parameter), so that the control quantity of the vehicle can meet the constraint condition of the control quantity, the excessively large jerk in the driving process can be prevented, the smooth running of the vehicle is ensured, and the riding comfort and safety are improved.
[0199] Figure 8 is a block diagram of a vehicle according to an example embodiment. For example, the vehicle 200 can be a hybrid vehicle, or a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other type of vehicle. The vehicle 200 can be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.
[0200] Referring to Figure 8In some embodiments, the vehicle 200 can include various subsystems, such as an infotainment system 210, a perception system 220, a decision control system 230, a drive system 240, and a computing platform 250. The vehicle 200 can include more or fewer subsystems, and each subsystem can include multiple components. In addition, each subsystem and each component of the vehicle 200 can be interconnected through wired or wireless means.
[0201] In some embodiments, the infotainment system 210 can include a communication system, an entertainment system, a navigation system, and the like.
[0202] The perception system 220 can include several sensors for sensing information of the environment surrounding the vehicle 200. For example, the perception system 220 can include a global positioning system (which can be a GPS system, a Beidou system, or other positioning system), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.
[0203] The decision control system 230 can include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0204] The drive system 240 can include components that provide power motion for the vehicle 200. In one embodiment, the drive system 240 can include an engine, an energy source, a transmission system, and wheels. The engine can be one or a combination of an internal combustion engine, an electric motor, an air compression engine, or the like. The engine can convert energy provided by the energy source into mechanical energy.
[0205] Some or all functions of the vehicle 200 are controlled by the computing platform 250. The computing platform 250 can include at least one processor 251 and a memory 252, and the processor 251 can execute instructions 253 stored in the memory 252.
[0206] The processor 251 can be any conventional processor, such as commercially available CPUs. The processor can also include a Graphic Process Unit (GPU), a Field Programmable Gate Array (FPGA), a System on Chip (SOC), an Application Specific Integrated Circuit (ASIC), or a combination thereof.
[0207] The memory 252 can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0208] In addition to the instructions 253, the memory 252 can also store data, such as road map, route information, position, direction, speed and the like of the vehicle. The data stored in the memory 252 can be used by the computing platform 250.
[0209] In the embodiments of the present disclosure, the processor 251 can execute the instructions 253 to implement all or part of the steps of the control method of the vehicle provided by the present disclosure.
[0210] The vehicle of the embodiments of the present disclosure obtains a sequence of predicted state quantities of the vehicle in a first time period based on the real state quantities of the vehicle at the current time, wherein each type of state quantity includes the speed and the first parameter of the vehicle, constructs a cost function of the vehicle based on the sequence of predicted state quantities and a sequence of expected state quantities of the vehicle in the first time period, wherein the independent variable of the cost function includes a sequence of control quantities of the vehicle in a second time period, the control quantity of the vehicle includes the change amount of the first parameter, solves the cost function under the constraint condition of the control quantity to obtain the control quantity of the vehicle at the current time, and controls the vehicle based on the control quantity of the vehicle at the current time. Thus, the vehicle control can be implemented based on MPC, the speed and the first parameter of the vehicle are both taken as state quantities, the change amount of the first parameter is taken as a control quantity, and the control quantity of the vehicle can be solved under the constraint condition of the control quantity (including the constraint condition of the change amount of the first parameter), so that the control quantity of the vehicle can meet the constraint condition of the control quantity, the excessively large jerk in the driving process can be prevented, the smooth running of the vehicle is ensured, and the riding comfort and safety are improved.
[0211] In order to implement the above-mentioned embodiments, the present disclosure further provides a server, comprising a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the control method of the vehicle provided by the present disclosure.
[0212] In order to implement the above-mentioned embodiments, the present disclosure further provides a computer-readable storage medium having computer program instructions stored thereon, which are executed by a processor to implement the steps of the control method of the vehicle provided by the present disclosure.
[0213] Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk and an optical data storage device, etc.
[0214] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the disclosure be construed as including any paterns of this disclosure that can be derived from the description and illustrations presented herein without departing from the scope and spirit of the disclosure. The specification and examples given are considered exemplary only, and the true scope and spirit of the disclosure are indicated by the following claims.
[0215] It is to be understood that the disclosure is not limited to the precise construction described above and shown in the attached drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the disclosure is limited only by the claims that follow.
Claims
1. A control method of a vehicle, characterized by, The method comprises: obtaining a predicted state quantity sequence of the vehicle in a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity comprises a speed of the vehicle and a first parameter, and the first parameter comprises an acting force applied to the vehicle and / or a torque of the vehicle; constructing a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein the cost function is any cost function in MPC model predictive control, and the independent variables of the cost function comprise a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle comprises a change quantity of the first parameter, and the expected state quantity sequence is composed of expected state quantities of the vehicle at multiple time points in the first time period; solving the cost function under the constraint condition of the control quantity to obtain a control quantity of the vehicle at the current time, and controlling the vehicle based on the control quantity of the vehicle at the current time; wherein controlling the vehicle based on the control quantity of the vehicle at the current time specifically comprises: obtaining a real first parameter of the vehicle at a time point preceding the current time, and a first sum of a change quantity of the first parameter at the current time; obtaining a compensation quantity of the first parameter based on an environment in which the vehicle is located at the current time; taking a second sum of the obtained first sum and the compensation quantity as a target first parameter of the vehicle at the current time, and controlling the vehicle based on the target first parameter; wherein the constraint condition of the control quantity is [-25N / s, 25N / s].
2. The method of claim 1, wherein, The method comprises: obtaining a predicted state quantity sequence of the vehicle in a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity comprises a speed of the vehicle and a first parameter, and the first parameter comprises an acting force applied to the vehicle and / or a torque of the vehicle; constructing a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein the cost function is any cost function in MPC model predictive control, and the independent variables of the cost function comprise a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle comprises a change quantity of the first parameter, and the expected state quantity sequence is composed of expected state quantities of the vehicle at multiple time points in the first time period; solving the cost function under the constraint condition of the control quantity to obtain a control quantity of the vehicle at the current time, and controlling the vehicle based on the control quantity of the vehicle at the current time; wherein controlling the vehicle based on the control quantity of the vehicle at the current time specifically comprises: obtaining a real first parameter of the vehicle at a time point preceding the current time, and a first sum of a change quantity of the first parameter at the current time; obtaining a compensation quantity of the first parameter based on an environment in which the vehicle is located at the current time; taking a second sum of the obtained first sum and the compensation quantity as a target first parameter of the vehicle at the current time, and controlling the vehicle based on the target first parameter; wherein the constraint condition of the control quantity is [-25N / s, 25N / s].
3. The method of claim 2, wherein, The method comprises: obtaining a predicted state quantity sequence of the vehicle in a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity comprises a speed of the vehicle and a first parameter, and the first parameter comprises an acting force applied to the vehicle and / or a torque of the vehicle; constructing a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein the cost function is any cost function in MPC model predictive control, and the independent variables of the cost function comprise a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle comprises a change quantity of the first parameter, and the expected state quantity sequence is composed of expected state quantities of the vehicle at multiple time points in the first time period; 4. The method of claim 2, wherein, solving the cost function under the constraint condition of the control quantity to obtain a control quantity of the vehicle at the current time, and controlling the vehicle based on the control quantity of the vehicle at the current time; wherein controlling the vehicle based on the control quantity of the vehicle at the current time specifically comprises: obtaining a real first parameter of the vehicle at a time point preceding the current time, and a first sum of a change quantity of the first parameter at the current time; obtaining a compensation quantity of the first parameter based on an environment in which the vehicle is located at the current time; taking a second sum of the obtained first sum and the compensation quantity as a target first parameter of the vehicle at the current time, and controlling the vehicle based on the target first parameter; wherein the constraint condition of the control quantity is [-25N / s, 25N / s]. The method comprises: obtaining a predicted state quantity sequence of the vehicle in a first time period based on a real state quantity of the vehicle at a current time, wherein each type of state quantity comprises a speed of the vehicle and a first parameter, and the first parameter comprises an acting force applied to the vehicle and / or a torque of the vehicle; constructing a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in the first time period, wherein the cost function is any cost function in MPC model predictive control, and the independent variables of the cost function comprise a control quantity sequence of the vehicle in a second time period, and the control quantity of the vehicle comprises a change quantity of the first parameter, and the expected state quantity sequence is composed of expected state quantities of the vehicle at multiple time points in the first time period; solving the cost function under the constraint condition of the control quantity to obtain a control quantity of the vehicle at the current time, and controlling the vehicle based on the control quantity of the vehicle at the current time; wherein controlling the vehicle based on the control quantity of the vehicle at the current time specifically comprises: obtaining a real first parameter of the vehicle at a time point preceding the current time, and a first sum of a change quantity of the first parameter at the current time; obtaining a compensation quantity of the first parameter based on an environment in which the vehicle is located at the current time; taking a second sum of the obtained first sum and the compensation quantity as a target first parameter of the vehicle at the current time, and controlling the vehicle based on the target first parameter; wherein the constraint condition of the control quantity is [-25N / s, 25N / s].
5. The method of claim 2, wherein, The first conversion matrix, the second conversion matrix and the real state quantity of the vehicle at the current time are used to obtain the predicted state quantity sequence, including: The real state quantity of the vehicle at the current time is converted based on the first conversion matrix to obtain a first state quantity sequence; The second state quantity sequence is obtained based on the second conversion matrix, wherein the second state quantity sequence is related to the control quantity sequence; The first state quantity sequence and the second state quantity sequence are summed to obtain the predicted state quantity sequence.
6. The method of claim 1, wherein, The state quantity weight matrix in the cost function includes a weight corresponding to the speed of the vehicle and a weight corresponding to the first parameter, wherein the weight corresponding to the first parameter is less than the weight corresponding to the speed of the vehicle.
7. The method of claim 6, wherein, The weight corresponding to the first parameter is zero.
8. The method of claim 1, wherein, In the case where the first parameter includes the force applied to the vehicle, the vehicle is controlled based on the target first parameter of the vehicle at the current time, including: The ratio between the target force of the vehicle at the current time and the dynamic radius of the tire of the vehicle at the current time is obtained as the target torque of the vehicle at the current time; The vehicle is controlled based on the target torque of the vehicle at the current time.
9. The method according to any one of claims 1-8, characterized in that, The cost function of the vehicle is constructed based on the predicted state quantity sequence and the expected state quantity sequence of the vehicle within the first time period, including: The predicted state quantity of the vehicle at the current time is obtained based on the real state quantity of the vehicle at the previous time of the current time and the control quantity of the vehicle at the previous time; The error quantity between the real state quantity of the vehicle at the current time and the predicted state quantity of the vehicle at the current time is obtained; The cost function is constructed based on the predicted state quantity sequence, the expected state quantity sequence and the error quantity.
10. The method of claim 9, wherein, The cost function is constructed based on the predicted state quantity sequence, the expected state quantity sequence and the error quantity, including: The product of the error quantity and the feedback coefficient matrix is obtained as an error matrix; The predicted state quantity sequence is corrected based on the error matrix to obtain a corrected state quantity sequence; The cost function is constructed based on the corrected state quantity sequence and the expected state quantity sequence.
11. The method of claim 1, wherein, The control quantity of the vehicle at the current time is obtained by solving the cost function under the constraint condition of the control quantity, including: The control quantity sequence when the cost function is minimized is obtained as the final control quantity sequence by optimizing the cost function under the constraint condition of the control quantity and the constraint condition of the state quantity; The first control quantity of the final control quantity sequence is taken as the control quantity of the vehicle at the current time.
12. A control device of a vehicle characterized by comprising: The obtaining module is configured to obtain the predicted state quantity sequence of the vehicle within the first time period based on the real state quantity of the vehicle at the current time, wherein each type of state quantity includes the speed of the vehicle and the first parameter, and the first parameter includes the force applied to the vehicle and / or the torque of the vehicle. The construction module is configured to construct a cost function of the vehicle based on the predicted state quantity sequence and an expected state quantity sequence of the vehicle in a first time period, wherein the cost function is any cost function in MPC model predictive control, and the independent variables of the cost function include a control quantity sequence of the vehicle in a second time period, the control quantity of the vehicle includes a variation of the first parameter, and the expected state quantity sequence is composed of expected state quantities of the vehicle at multiple time points in the first time period. The control module is configured to solve the cost function under the constraint condition of the control quantity to obtain the control quantity of the vehicle at the current time point, and obtain a first sum of a variation of the first parameter of the vehicle at a previous time point of the current time point and the first parameter at the current time point; obtain a compensation quantity of the first parameter based on an environment in which the vehicle is located at the current time point; take a second sum of the first sum and the compensation quantity as a target first parameter of the vehicle at the current time point, and control the vehicle based on the target first parameter; and the constraint condition of the control quantity is [-25N / s, 25N / s].
13. A vehicle characterized by comprising: Comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: implement the steps of the method of any one of claims 1-11.
14. A computer-readable storage medium having stored thereon computer program instructions, wherein, The program instructions, when executed by the processor, implement the steps of the method of any one of claims 1-11.
Citation Information
Patent Citations
Vehicle control method and device, storage medium, electronic equipment and vehicle
CN112947492A
Trajectory tracking method for robot queue
CN117850414A