Vehicle control method and device, electronic equipment and computer readable storage medium
By planning the target motion trajectory of the vehicle and obtaining the trajectory curvature change rate, determining the target pre-purpose position and predicting the target motion information, the problem of the existing vehicle control methods lacking early prediction capabilities is solved, and the accuracy and stability of vehicle control are improved.
Patent Information
- Application Number
- CN202411959232.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-23
AI Technical Summary
The existing vehicle control methods lack the ability to predict in advance in autonomous driving and automatic parking, resulting in insufficient response time for vehicles in the face of emergencies and prone to emergency parking and other situations, which reduces vehicle performance and efficiency.
By planning the target motion trajectory of the vehicle from the initial position to the target position, the trajectory curvature change rate between the vehicle's current position and the next position is obtained, and the target pre-purpose position is determined in response to the trajectory curvature change rate being greater than or equal to the pre-set trajectory change rate, and the target motion information of the vehicle is predicted based on the pre-set motion information and position information to control the vehicle to drive along the target motion trajectory.
The accuracy of vehicle control is improved, and the trajectory curvature change rate that moves to the next position is predicted in advance. When the trajectory curvature change rate is greater than the preset trajectory change rate, it can prepare for steering in advance, reducing emergency braking or sudden steering.
Smart Images

Figure CN120029115A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a vehicle control method, a vehicle control device, an electronic device and a computer-readable storage medium. Background Art
[0002] In autonomous driving, the vehicle needs to plan a path based on the initial position and target position of the vehicle, and then control the vehicle to drive along the planned path. Among them, path planning is the result, and vehicle control is the process. Accurate vehicle control can ensure that the vehicle can smoothly and safely drive into the target position. Especially in automatic parking, automatic parking requires the vehicle to be parked in a pre-planned parking area. The pre-planned parking area usually only allows one vehicle to be parked. If there is a deviation in vehicle control, it will not be able to enter the parking area correctly.
[0003] The current vehicle control method mainly adjusts the vehicle based on real-time detection of surrounding environment parameters and the vehicle's own parameters. It has no advance prediction capability, resulting in insufficient response time for the vehicle to face emergencies, prone to emergency stops, etc., and reducing vehicle performance and efficiency. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a vehicle control method, a vehicle control device, an electronic device and a computer-readable storage medium, which can improve the accuracy of vehicle control.
[0005] To solve the above technical problems, a technical solution adopted in the present application is: a vehicle control method is provided, the method comprising: planning a target motion trajectory of the vehicle moving from the initial position to the target position according to the initial position and the target position of the vehicle; obtaining a trajectory curvature change rate of the vehicle between the current position and the next position during the vehicle moving along the target motion trajectory; in response to the trajectory curvature change rate being greater than or equal to a preset trajectory change rate, determining a target preview position on the target motion trajectory according to a corresponding first preview distance and the current position; predicting target motion information of the vehicle moving from the current position to the next position according to preset motion information of the target preview position in the target motion trajectory and position information of the target preview position; and controlling the vehicle to move from the current position to the next position with the target motion information until the target motion trajectory is completed.
[0006] In some embodiments, in response to the trajectory curvature change rate being greater than or equal to a preset trajectory change rate, the step of determining the target preview position on the target motion trajectory according to the corresponding first preview distance and the current position includes: initializing the preview distance of the vehicle at the current position to obtain an initial preview distance; and correcting the initial preview distance according to the trajectory curvature change rate to obtain the first preview distance of the vehicle.
[0007] In some embodiments, the step of correcting the initial preview distance according to the trajectory curvature change rate to obtain the first preview distance of the vehicle includes: determining an adjustment parameter of the initial preview distance according to the trajectory curvature change rate, the adjustment parameter being used to increase the initial preview distance; and adjusting the initial preview distance according to the adjustment parameter to obtain the first preview distance of the vehicle.
[0008] In some embodiments, the preset motion trajectory includes at least one position, and the step of predicting the target motion information of the vehicle moving from the current position to the next position based on the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position includes: obtaining the kinematic equation of the vehicle at each position in the target motion trajectory; substituting the preset motion information of the target preview position and the position information of the target preview position into the kinematic equation to obtain the target motion information of the vehicle moving from the current position to the next position.
[0009] In some embodiments, the target motion information includes acceleration and a vehicle front wheel steering angle, and the step of obtaining the kinematic equation of the vehicle at each position in the target motion trajectory includes: establishing an initial kinematic equation of the vehicle using the acceleration and the vehicle front wheel steering angle; and discretizing the initial kinematic equation to obtain the kinematic equation of the vehicle at each position.
[0010] In some embodiments, the step of substituting the preset motion information of the target preview position and the position information of the target preview position into the kinematic equation to obtain the target motion information of the vehicle moving from the current position to the next position includes: establishing constraints of the kinematic equation; solving the kinematic equation according to the constraints to obtain the target motion information of the vehicle moving from the current position to the next position.
[0011] In some embodiments, the step of establishing the constraint conditions of the kinematic equation includes: obtaining the predicted position that the vehicle will reach from the current position according to the target motion information; obtaining the error value between the predicted position of the vehicle and the corresponding target preview position; and establishing the constraint conditions of the kinematic equation with the purpose of reducing the error value.
[0012] To solve the above technical problems, another technical solution adopted in the present application is: a vehicle control device is provided, comprising: a planning module for planning a target motion trajectory of the vehicle moving from the initial position to the target position according to the initial position and the target position of the vehicle; an acquisition module for acquiring the trajectory curvature change rate of the vehicle between the current position and the next position during the vehicle moving along the target motion trajectory; a determination module for determining the target preview position on the target motion trajectory according to the corresponding first preview distance and the current position in response to the trajectory curvature change rate being greater than or equal to the preset trajectory change rate; a prediction module for predicting the target motion information of the vehicle moving from the current position to the next position according to the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position; and a control module for controlling the vehicle to move from the current position to the next position with the target operation information until the target operation trajectory is completed.
[0013] In order to solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, including a memory and a processor, the memory storing program instructions, and the processor calling the program instructions from the memory to execute the above vehicle control method.
[0014] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium including program data stored therein, wherein the program data is used to implement the above vehicle control method when executed by a processor.
[0015] The above scheme plans the target motion trajectory of the vehicle from the initial position to the target position according to the initial position and the target position of the vehicle; in the process of the vehicle moving along the target motion trajectory, the curvature change rate of the trajectory between the current position and the next position of the vehicle is obtained; in response to the curvature change rate of the trajectory being greater than or equal to the preset trajectory change rate, the target preview position is determined on the target motion trajectory according to the corresponding first preview distance and the current position; the target motion information of the vehicle moving from the current position to the next position is predicted according to the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position; the vehicle is controlled to move from the current position to the next position with the target running information until the target running trajectory is completed. In this way, in the process of the vehicle moving, the curvature change rate of the trajectory to the next position is predicted in advance, and when the curvature change rate of the trajectory is greater than the preset trajectory change rate, the target preview position is determined with the corresponding preview distance, so that steering preparations can be made in advance and control accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0017] Figure 1 is a flow chart of an exemplary embodiment of a vehicle control method shown in the present application;
[0018] Figure 2 yes Figure 1 A flow chart of an exemplary embodiment of step S130 in the driving mode determination method is shown;
[0019] Figure 3 is a schematic diagram of an exemplary embodiment of a vehicle kinematics model shown in the present application;
[0020] Figure 4 is a schematic structural diagram of an exemplary embodiment of a vehicle control device shown in the present application;
[0021] Figure 5 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;
[0022] Figure 6 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0024] First of all, it should be noted that automatic parking refers to a function in which the vehicle automatically parks in a parking space without human intervention, which has become a hot development trend in vehicles. There are many control strategies for automatic parking, and common methods include PID control (Proportional-Integral-Derivative Control), LQR control (Linear Quadratic Regulator) and MPC control (Model Predictive Control). Among them, PID control has a simple structure but poor robustness, LQR control is more suitable for small corners and has no predictive ability for subsequent control, and MPC control requires large memory and time consumption on the chip.
[0025] Among them, MPC control theory is relatively complete and can be developed based on dynamic models or kinematic models. For low-speed parking situations, it is simpler and more efficient to use kinematic models for design. However, in practical applications, especially when the curvature change rate is large, its control effect and control accuracy are significantly reduced. Based on this, this application provides a vehicle control method, a vehicle control device, an electronic device, and a computer-readable storage medium that can improve the control accuracy of the vehicle. For details, please refer to Figure 1 , Figure 1 It is a flowchart of an exemplary embodiment of a vehicle control method shown in the present application.
[0026] The execution subject of the vehicle control method may be a terminal device or a server or other processing device, wherein the terminal device may be a user equipment (UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The execution subject of the vehicle control method may also be a vehicle control device. In some possible implementations, the vehicle control method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0027] Specifically, the vehicle control method of this embodiment includes the following steps:
[0028] S110: Planning a target motion trajectory of the vehicle from the initial position to the target position according to the initial position and the target position of the vehicle.
[0029] The initial position may include but is not limited to the current position of the vehicle, the position where the vehicle starts the automatic driving, the position defined by the user, etc. In some application scenarios, the user may select the starting point of the vehicle, and the vehicle control device uses the starting point selected by the user as the initial position of the vehicle. In other application scenarios, when the user turns on the automatic driving, the vehicle control device may obtain the position of the vehicle when the automatic driving is started through the positioning system, and use it as the initial position of the vehicle.
[0030] The target location may include but is not limited to user-defined, or may be obtained through intelligent detection. In some application scenarios, the user may select the destination of the vehicle and use it as the target location of the vehicle. In other application scenarios, the vehicle control device may also intelligently detect the surrounding environment and determine the best target location. For example, after the vehicle enters a garage, the vehicle control device may detect the surrounding environment to determine the best parking space and determine the parking space as the target location.
[0031] The target motion trajectory is the trajectory obtained by the vehicle control device through the initial position and target position of the vehicle for path planning. For example, when planning a path, it is necessary not only to consider the avoidance of obstacles, but also to ensure the performance indicators of the motion trajectory, such as the shortest distance, the least time or the lowest energy consumption. For example, common path planning methods include but are not limited to A* algorithm (A-star Algorithm), genetic algorithms (Genetic Algorithms, GA), etc. It should be noted that in the process of the vehicle moving along the target motion trajectory, if the vehicle deviates from the trajectory, the target motion trajectory can be updated according to the position of the vehicle after the deviation to obtain the updated target motion trajectory, and then the vehicle moves along the updated target motion trajectory.
[0032] As an example, when the user starts automatic parking, the vehicle control device obtains the initial position and target position of the vehicle based on the positioning system; then the vehicle control device detects obstacles in the surrounding environment and determines a feasible path for the vehicle; and determines the target movement trajectory of the vehicle from the initial position to the target position based on the initial position, target position and feasible path of the vehicle.
[0033] S120: When the vehicle moves along the target motion trajectory, a rate of change of trajectory curvature between the current position and the next position of the vehicle is obtained.
[0034] The current position may be the position of the vehicle at the current time point during the vehicle's movement. For example, the vehicle control device acquires the position of the vehicle in real time during the vehicle's movement along the target motion trajectory to obtain the current position of the vehicle.
[0035] When the vehicle is moving along the target motion trajectory, the time it arrives at the current position is earlier than the time it arrives at the next position. The current position and the next position may be trajectory points in the target motion trajectory. In some embodiments, the next position may be determined based on the speed of the vehicle at the current position and the preset interval time. For example, the vehicle starts from the current position at the speed of the current position, and the position it is predicted to reach in 5 seconds is the next position. In other embodiments, the next position may also be determined based on the current position and the preset interval distance. For example, along the target motion trajectory, the position 5 meters away from the current position is determined as the next position.
[0036] Curvature is used to measure the degree of curvature of a motion trajectory at a certain point on the trajectory, and is defined as the rate of change of angle per unit arc length at that point on the trajectory. The rate of change of trajectory curvature between the current position and the next position indicates the degree of change of curvature from the current position to the next position, which can reflect the difference in curvature between the current position and the next position. The greater the rate of change of trajectory curvature, the greater the difference in curvature, and the faster the steering angle needs to be adjusted. In addition, curvature can reflect the curvature of the trajectory between the current position and the next position. The greater the curvature, the greater the curvature.
[0037] When controlling the vehicle to move along the target motion trajectory, the vehicle control device obtains the rate of change of the trajectory curvature between the current position and the next position of the vehicle in real time.
[0038] S130: In response to the trajectory curvature change rate being greater than or equal to a preset trajectory change rate, determining a target preview position on the target motion trajectory according to the corresponding first preview distance and the current position.
[0039] The preset trajectory change rate can be set based on experience. The trajectory curvature change rate between the current position and the next position is greater than or equal to the preset trajectory change rate, which may be an application scenario where the steering wheel needs to be turned at a maximum rate, such as an S-shaped bend scenario with a large curvature. In other embodiments, when there is a position with a curvature greater than the preset curvature between the current position and the next position, the target preview position is determined on the target motion trajectory according to the corresponding first preview distance and the current position. For example, in automatic parking, when the vehicle enters the parking space, the steering wheel of the vehicle needs to turn at the maximum steering angle. At this time, it is determined that the curvature of the corresponding position is greater than the preset curvature, and the target preview position is determined on the target motion trajectory according to the corresponding first preview distance and the current position.
[0040] The first preview distance refers to the preview distance determined when the trajectory curvature change rate is greater than or equal to the preset trajectory change rate, and / or the curvature is greater than the preset curvature. Preview means that the vehicle control device considers the information on the future trajectory in advance, reduces the influence of vehicle inertia and actuator lag, controls farther, turns the steering wheel in advance or slows down in advance, etc. The preview distance refers to the trajectory length considered in advance by the vehicle control device, so that the vehicle has enough time and space to adjust the speed and direction to avoid emergency braking or sudden steering. When the trajectory curvature change rate is greater than or equal to the preset trajectory change rate, due to the time lag problem caused by filtering or data transmission delay, it is easy to produce a large angle error, resulting in the phenomenon of in-cut or out-cut of the vehicle, so it is necessary to appropriately adjust the preview distance according to the trajectory curvature change rate to obtain the first preview distance. Exemplarily, the trajectory curvature change rate can be proportional to the preview distance. The greater the trajectory curvature change rate, the greater the preview distance, so that the steering preparation can be made in advance.
[0041] The target preview position can be determined according to the current position and the first preview distance. Exemplarily, along the target motion trajectory, a position at the first preview distance from the current position can be determined as the target preview position.
[0042] The trajectory curvature change rate of the vehicle control device between the current position and the next position is greater than or equal to the preset trajectory change rate, that is, the steering wheel extreme steering, for example, when the maximum curvature in the positive direction changes to the maximum curvature in the reverse direction, the first preview distance of the vehicle is determined according to the trajectory curvature change rate. Generally, the greater the trajectory curvature change rate, the greater the first preview distance; then, the target preview position is determined on the target motion trajectory according to the first preview distance and the current position; after the vehicle moves to the normal trajectory curvature change rate, the preview distance is restored.
[0043] S140: Predicting target motion information of the vehicle moving from the current position to the next position based on preset motion information of the target preview position in the target motion trajectory and position information of the target preview position.
[0044] The preset motion information may be motion information determined when planning the trajectory. For example, when the vehicle control device plans the target motion trajectory of the vehicle moving from the initial position to the target position according to the initial position and the target position of the vehicle, it is also necessary to plan the motion information at each position in the target motion trajectory. The preset motion information includes but is not limited to the speed, heading angle, vehicle wheelbase, acceleration, front wheel steering angle, etc. at each position.
[0045] The position information may also be the coordinate information of each position in the target motion trajectory determined when planning the trajectory.
[0046] The target motion information may be a control quantity for the vehicle to move from the current position to the next position. For example, when the vehicle moves, the vehicle control can generally be achieved through acceleration and the front wheel steering angle. The acceleration controls the speed of the vehicle, and the front wheel steering angle controls the direction of the vehicle. Therefore, the target motion information may include but is not limited to the acceleration and the front wheel steering angle of the vehicle. The vehicle control device performs prediction processing based on the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position to obtain the motion information of the vehicle from the target preview position to the next position, thereby optimizing the motion information of the vehicle moving from the current position to the next position and obtaining the target motion information. In practical applications, after determining the target preview position, the interval from the target preview position to the next position can be divided into at least one sub-interval to obtain at least one intermediate position, and the motion information from the target preview position to each intermediate position is predicted according to the target preview position to obtain the target motion information.
[0047] S150: Control the vehicle to move from the current position to the next position according to the target motion information until the target motion trajectory is completed.
[0048] The vehicle control device obtains the current position of the vehicle and the rate of change of trajectory curvature between the current position and the next position of the vehicle in real time when the vehicle moves along the target motion trajectory. When the rate of change of trajectory curvature is less than a preset rate of change of trajectory curvature, the second preview distance can be determined according to the speed of the vehicle, etc., and the target preview position is determined on the target motion trajectory with the current position and the second preview distance. When the rate of change of trajectory curvature is greater than or equal to the preset rate of change of trajectory curvature, the first preview distance can be determined according to the rate of change of trajectory curvature. In other embodiments, the first preview distance can also be determined in combination with the speed of the vehicle and the rate of change of trajectory curvature, and the target preview position is determined on the target motion trajectory with the current position and the first preview distance. The target motion information of the vehicle moving from the current position to the next position is predicted according to the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position. The vehicle is controlled to move from the current position to the next position with the target motion information until the target motion trajectory is completed.
[0049] It can be seen that the vehicle control method of the embodiment of the present application plans the target motion trajectory of the vehicle from the initial position to the target position according to the initial position and the target position of the vehicle; in the process of the vehicle moving along the target motion trajectory, the curvature change rate of the trajectory between the current position and the next position of the vehicle is obtained; in response to the curvature change rate of the trajectory being greater than or equal to the preset trajectory change rate, the target preview position is determined on the target motion trajectory according to the corresponding first preview distance and the current position; the target motion information of the vehicle moving from the current position to the next position is predicted according to the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position; the vehicle is controlled to move from the current position to the next position with the target running information until the target running trajectory is completed. Therefore, in the process of the vehicle moving, the curvature change rate of the trajectory to the next position is predicted in advance, and when the curvature change rate of the trajectory is greater than the preset trajectory change rate, the target preview position is determined with the corresponding preview distance, so that the steering preparation can be made in advance and the control accuracy can be improved.
[0050] Based on the above embodiments, the embodiments of the present application adopt Figure 2 The flowchart details how to determine the first preview distance, see Figure 2 , Figure 2 yes Figure 1 A flow chart of an exemplary embodiment of step S130 in the driving mode determination method is shown. Specifically, in response to the trajectory curvature change rate being greater than or equal to the preset trajectory change rate, the process of determining the target preview position on the target motion trajectory according to the corresponding first preview distance and the current position specifically includes the following steps:
[0051] S210: Initializing the preview distance of the vehicle at the current position to obtain an initial preview distance.
[0052] The initial preview distance refers to the preview distance that has not been adjusted by the trajectory curvature change rate. For example, the preview distance of the vehicle at the previous position adjacent to the current position can be determined as the preview distance, and the initial preview distance of the vehicle at the current position can also be determined according to the speed of the vehicle at the current position.
[0053] The vehicle control device may first determine the preview distance of the vehicle as the initial preview distance according to the speed at the current position.
[0054] S220: Correcting the initial preview distance according to the trajectory curvature change rate to obtain a first preview distance of the vehicle.
[0055] After determining that the trajectory curvature change rate from the current position to the next position is greater than or equal to the preset trajectory change rate, the vehicle control device corrects the initial preview distance according to the trajectory curvature change rate to obtain the first preview distance of the vehicle, so that the first preview distance can adapt to the large curvature change rate and improve the vehicle control accuracy. In some embodiments, after the trajectory curvature change rate is greater than or equal to the preset trajectory change rate, the trajectory curvature change rate is proportional to the first preview distance, and the greater the trajectory curvature change rate, the greater the first preview distance.
[0056] In other embodiments, the adjustment parameter of the initial preview distance is determined according to the trajectory curvature change rate, and the adjustment parameter is used to increase the initial preview distance; the initial preview distance is adjusted according to the adjustment parameter to obtain the first preview distance of the vehicle. Among them, a mapping relationship between the trajectory curvature change rate and the adjustment parameter can be established, and then the adjustment parameter corresponding to the trajectory curvature change rate can be determined according to the mapping relationship; and the initial preview distance is increased according to the adjustment parameter to obtain the first preview distance of the vehicle; and the initial preview distance is restored after the trajectory curvature change rate is less than the preset trajectory change rate.
[0057] Furthermore, after obtaining the first preview distance, the embodiment of the present application can use the MPC control method to control the vehicle. The specific process of MPC control includes four steps: establishing a vehicle kinematic model, calculating the error amount, designing constraints, and solving the solver.
[0058] Exemplarily, the kinematic equation of the vehicle at each position in the target motion trajectory is obtained; the preset motion information of the target preview position and the position information of the target preview position are substituted into the kinematic equation to obtain the target motion information of the vehicle moving from the current position to the next position. Thus, the target motion information of the vehicle is determined by the target preview position, which can improve the accuracy of vehicle control.
[0059] The kinematic equation is an equation established based on the motion characteristics of the vehicle. In establishing the kinematic equation of the vehicle, the motion of the vehicle in the vertical direction is ignored, and the vehicle model is simplified to a two-degree-of-freedom model. Then, the target preview position is determined as the reference position and substituted into the kinematic equation to obtain the target motion information of the vehicle moving from the current position to the next position.
[0060] Among them, by simulating the real driving environment, the driver controls the vehicle by stepping on the pedals and turning the steering wheel, so the control quantities in the kinematic equation include acceleration and the steering angle of the front wheels of the vehicle. The initial kinematic equation of the vehicle is established with the acceleration and the steering angle of the front wheels of the vehicle; the initial kinematic equation is discretized to obtain the kinematic equation of the vehicle at each position.
[0061] For details, please refer to Figure 3 , Figure 3is a schematic diagram of an exemplary embodiment of the vehicle kinematic model shown in this application. Assuming that the structure of the vehicle is similar to that of a bicycle, the front wheel of the vehicle can be combined into one tire, and the rear wheel can also be combined into one tire, such as Figure 3 As shown, the front and rear wheels of the vehicle are combined into one tire. Based on the vehicle inertial coordinate system, the x and y coordinates of the center of the vehicle's rear axle, the speed v of the center of the vehicle's rear axle, and the vehicle's heading angle As state quantities, the following are referred to as the vehicle's x-coordinate, the vehicle's y-coordinate, the vehicle's speed and the vehicle's heading angle, and the vehicle's acceleration and front wheel steering angle are used as control quantities to establish a kinematic model of the vehicle.
[0062] From this, the relationship between the state quantity and the control quantity can be obtained as follows:
[0063]
[0064] in, represents the derivative of the vehicle's x-coordinate, represents the derivative of the vehicle's y coordinate, represents the derivative of the heading angle, v represents the speed of the vehicle, represents the heading angle, L represents the vehicle wheelbase, δ represents the front wheel steering angle of the vehicle, a represents the acceleration, Represents the derivative of the vehicle's velocity.
[0065] The expression of the state quantity is as follows:
[0066]
[0067] The expression of the control quantity is as follows:
[0068]
[0069] Therefore, the expression of the kinematic model is obtained through the expression of the state quantity and the expression of the control quantity:
[0070]
[0071] Then, the kinematic model expression is Taylor expanded at each position in the target motion trajectory and the high-order terms are ignored to obtain the linearized kinematic model expression as follows:
[0072]
[0073] in, represents the derivative of the vehicle's x-coordinate, represents the derivative of the vehicle's y coordinate, represents the derivative of the heading angle, represents the derivative of the vehicle's velocity; Represents the speed of each position in the target motion trajectory, Represents the heading angle of each position in the target motion trajectory, represents the front wheel steering angle at each position in the target motion trajectory, represents the x-coordinate of each position in the target motion trajectory, represents the y coordinate of each position in the target motion trajectory, represents the acceleration of each position in the target motion trajectory; x represents the predicted x coordinate of the vehicle, y represents the predicted y coordinate of the vehicle, represents the predicted heading angle, v represents the predicted vehicle speed, a represents the predicted acceleration, δ represents the predicted front wheel steering angle of the vehicle, and L represents the vehicle wheelbase.
[0074] The above kinematic model expression can be simplified as:
[0075]
[0076] in,
[0077] It can be directly obtained from the preset motion information and position information of each target preview position in the target motion trajectory. According to the curvature of the corresponding target preview position Calculated and added with the correction factor K, the calculation formula is:
[0078]
[0079] Among them, K changes according to the curvature of the target preview position, and L represents the vehicle wheelbase.
[0080] Then the simplified kinematic model expression is discretized, and the discretized kinematic model expression is as follows:
[0081] X k+1 =(I+T s A)X k +T s Bu k
[0082] Among them, X k+1 Represents the state matrix at time k+1, T s represents the sampling time, X k represents the state matrix at time k, u k Represents the control quantity matrix at time k.
[0083] Simplified to:
[0084] X k+1 =AX k +Buk
[0085] Among them, since the preview distance of the embodiment of the present application is determined according to the rate of change of the trajectory curvature, the target preview position selected by each predicted position is also different. Therefore, since the target preview positions of the A matrix and the B matrix are different, the above formula can also be changed to:
[0086] X k+1 =A k X k +B k u k
[0087] Among them, A k represents the A matrix at time k, B k Represents the B matrix at time k.
[0088] When solving the kinematic equation, the constraints of the kinematic equation can also be established; the kinematic equation is solved according to the constraints to obtain the target motion information of the vehicle moving from the current position to the next position.
[0089] In order to obtain the optimal solution, it is necessary to establish constraints for solving the kinematic equations, so as to obtain the optimal target motion information. In some embodiments, when designing constraints, it can be based on the error amount of the vehicle, and the error amount refers to the difference between the actual position of the vehicle and the reference position. It should be noted that the selection of the reference position in this embodiment is also the selection of the target preview position. The actual position of the vehicle is obtained, and the nearest position closest to the actual position of the vehicle is determined from the target motion trajectory. The target preview position at the preview distance from the nearest position is determined as the reference position, and the preview distance changes with the change of the target motion trajectory.
[0090] Therefore, the process of determining the constraint conditions can include: obtaining the predicted position that the vehicle will reach from the current position according to the target motion information; obtaining the error value between the predicted position of the vehicle and the corresponding target preview position; and establishing the constraint conditions of the kinematic equation with the purpose of reducing the error value. In this way, the convergence of the error value can be achieved, ensuring that the vehicle moves along the target motion trajectory and improving the vehicle control accuracy.
[0091] Specifically, the formula for calculating the error value satisfies the following formula:
[0092]
[0093] Among them, e x Indicates the error value in the x-axis direction, e y Represents the error value in the y-axis direction, Indicates the heading angle error value, e v represents the speed error value, x represents the x coordinate of the predicted position, represents the x-coordinate of the corresponding target preview position, and y represents the y-coordinate of the predicted position. Indicates the y coordinate of the corresponding target preview position, represents the heading angle of the predicted position, represents the heading angle of the corresponding target preview position, v represents the speed of the predicted position, represents the speed of the corresponding target preview position, and k represents the curvature of the corresponding target preview position.
[0094] In some embodiments, constraint conditions can be established by error values. Specifically, the optimal solution of the kinematic equation is obtained with the purpose of minimizing each error value. In other embodiments, in addition to error values, constraint conditions can also be established in combination with control quantities (acceleration and front wheel steering angle). Exemplarily, the cost function corresponding to the constraint condition is as follows:
[0095]
[0096] Among them, L represents the cost value, w 1 Represents the first weight corresponding to the error value, represents the number of predicted positions, represents the error value of the i-th predicted position, represents the second weight corresponding to the control amount, represents the control amount of the i+1-th predicted position, represents the control amount of the i-th predicted position, represents the third weight corresponding to the front wheel steering angle, represents the front wheel steering angle of the first predicted position, represents the optimal front wheel steering angle calculated in the previous cycle, and represents the control amount of the first predicted position.
[0097] For the control quantity, it is also necessary to constrain it within the maximum curvature and the maximum trajectory curvature change rate according to the vehicle characteristics. Therefore, the constraints of the control quantity are as follows:
[0098]
[0099] Among them, u min represents the minimum control amount, u max Indicates the maximum control amount, Δu min The minimum matrix representing the change in control quantity between two predicted positions, Δu max The maximum matrix representing the change in control amount between two predicted positions, Δδ min Indicates the minimum difference between the front wheel steering angle in this sampling period and the previous period, Δδ max Indicates the maximum difference between the front wheel steering angle in this sampling period and the previous period.
[0100] In the above cost function, the first item indicates that the expected error amount in each predicted position is minimized, the second item indicates that the incremental amount of control in each predicted position is minimized, the third item indicates that the incremental amount of each predicted position relative to the previous predicted position is minimized, the fourth item indicates that the incremental amount of the front wheel steering angle at the first preset position relative to the optimal front wheel steering angle of the previous cycle is minimized, and the fifth item indicates that the expected amount of the first predicted position is minimized. R&D personnel can set the above weight values according to actual needs. For example, if they want to quickly achieve convergence of the error value, they can set the corresponding first weight to the maximum weight value.
[0101] After determining the constraint conditions, the vehicle control device solves the kinematic equations based on the constraint conditions to obtain target motion information of the vehicle moving from the current position to the next position. For example, the vehicle control device can adopt OSQP (Operator Splitting Quadratic Programming), HPIPM (High-Performance Interior-Point Method), and the like.
[0102] See also Figure 4 , Figure 4 It is a structural diagram of an exemplary embodiment of a vehicle control device shown in the present application. The vehicle control device 400 includes a planning module 410, an acquisition module 420, a determination module 430, a prediction module 440 and a control module 450. The planning module 410 is used to plan the target motion trajectory of the vehicle from the initial position to the target position according to the initial position and the target position of the vehicle; the acquisition module 420 is used to obtain the trajectory curvature change rate of the vehicle between the current position and the next position during the vehicle's movement along the target motion trajectory; the determination module 430 is used to determine the target preview position on the target motion trajectory according to the corresponding first preview distance and the current position in response to the trajectory curvature change rate being greater than or equal to the preset trajectory change rate; the prediction module 440 is used to predict the target motion information of the vehicle moving from the current position to the next position according to the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position; the control module 450 is used to control the vehicle to move from the current position to the next position with the target operation information until the target operation trajectory is completed.
[0103] In the above scheme, the vehicle control device plans the target motion trajectory of the vehicle from the initial position to the target position according to the initial position and the target position of the vehicle; in the process of the vehicle moving along the target motion trajectory, the curvature change rate of the trajectory between the current position and the next position of the vehicle is obtained; in response to the curvature change rate of the trajectory being greater than or equal to the preset trajectory change rate, the target preview position is determined on the target motion trajectory according to the corresponding first preview distance and the current position; the target motion information of the vehicle moving from the current position to the next position is predicted according to the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position; the vehicle is controlled to move from the current position to the next position with the target running information until the target running trajectory is completed. In this way, in the process of the vehicle moving, the curvature change rate of the trajectory to the next position is predicted in advance, and when the curvature change rate of the trajectory is greater than the preset trajectory change rate, the target preview position is determined with the corresponding preview distance, so that steering preparations can be made in advance and control accuracy can be improved.
[0104] Among them, the functions of each module can be found in the vehicle control method embodiment, and will not be repeated here.
[0105] In order to implement the vehicle control method of the above embodiment, the present application proposes another electronic device, for details, please refer to Figure 5 , Figure 5 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0106] The electronic device 500 includes a memory 510 and a processor 520 , wherein the memory 510 and the processor 520 are coupled.
[0107] The memory 510 is used to store program data, and the processor 520 is used to execute the program data to implement the vehicle control method of the above embodiment.
[0108] In this embodiment, the processor 520 may also be referred to as a CPU (Central Processing Unit). The processor 520 may be an integrated circuit chip having signal processing capabilities. The processor 520 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 520 may also be any conventional processor, etc.
[0109] The present application also provides a computer-readable storage medium, such as Figure 6 As shown, the computer-readable storage medium 600 is used to store program data 610. When the program data 610 is executed by the processor, it is used to implement the vehicle control method in the method embodiment of the present application.
[0110] The method involved in the vehicle control method embodiment of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0111] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A vehicle control method, characterized in that: The vehicle control method comprises: Planning a target motion trajectory of the vehicle moving from the initial position to the target position according to the initial position and the target position of the vehicle; In the process of the vehicle moving along the target motion trajectory, obtaining a trajectory curvature change rate of the vehicle between a current position and a next position; In response to the trajectory curvature change rate being greater than or equal to a preset trajectory change rate, determining a target preview position on the target motion trajectory according to a corresponding first preview distance and the current position; Predicting target motion information of the vehicle moving from the current position to the next position based on preset motion information of the target preview position in the target motion trajectory and position information of the target preview position; The vehicle is controlled to move from the current position to the next position according to the target motion information until the target motion trajectory is completed.
2. The vehicle control method according to claim 1, characterized in that: In response to the trajectory curvature change rate being greater than or equal to a preset trajectory change rate, the step of determining a target preview position on the target motion trajectory according to the corresponding first preview distance and the current position comprises: Initializing the preview distance of the vehicle at the current position to obtain an initial preview distance; The initial preview distance is corrected according to the trajectory curvature change rate to obtain a first preview distance of the vehicle.
3. The vehicle control method according to claim 2, characterized in that: The step of correcting the initial preview distance according to the trajectory curvature change rate to obtain the first preview distance of the vehicle includes: Determining an adjustment parameter of the initial preview distance according to the trajectory curvature change rate, wherein the adjustment parameter is used to increase the initial preview distance; The initial preview distance is adjusted according to the adjustment parameter to obtain a first preview distance of the vehicle.
4. The vehicle control method according to claim 1, characterized in that: The preset motion trajectory includes at least one position, and the step of predicting the target motion information of the vehicle moving from the current position to the next position according to the preset motion information of the target preview position in the target motion trajectory and the position information of the target preview position includes: Obtaining kinematic equations of the vehicle at each position in the target motion trajectory; The preset motion information of the target preview position and the position information of the target preview position are substituted into the kinematic equation to obtain the target motion information of the vehicle moving from the current position to the next position.
5. The vehicle control method according to claim 4, characterized in that: The target motion information includes acceleration and a front wheel steering angle of the vehicle, and the step of obtaining the kinematic equation of the vehicle at each position in the target motion trajectory includes: Establishing an initial kinematic equation of the vehicle using the acceleration and the front wheel steering angle of the vehicle; The initial kinematic equation is discretized to obtain the kinematic equation of the vehicle at each position.
6. The vehicle control method according to claim 4, characterized in that: The step of substituting the preset motion information of the target preview position and the position information of the target preview position into the kinematic equation to obtain the target motion information of the vehicle moving from the current position to the next position includes: Establishing constraints of the kinematic equations; The kinematic equation is solved according to the constraint condition to obtain target motion information of the vehicle moving from the current position to the next position.
7. The vehicle control method according to claim 6, characterized in that: The step of establishing the constraint conditions of the kinematic equation comprises: Obtaining a predicted position that the vehicle will reach from the current position according to the target motion information; Obtaining an error value between the predicted position of the vehicle and the corresponding target preview position; The constraint conditions of the kinematic equation are established for the purpose of reducing the error value.
8. A vehicle control device, characterized in that: The device comprises: A planning module, used for planning a target motion trajectory of the vehicle moving from the initial position to the target position according to the initial position and the target position of the vehicle; An acquisition module, used for acquiring a rate of change of a trajectory curvature of the vehicle between a current position and a next position when the vehicle moves along the target motion trajectory; a determination module, configured to determine a target preview position on the target motion trajectory according to a corresponding first preview distance and the current position in response to the trajectory curvature change rate being greater than or equal to a preset trajectory change rate; A prediction module, configured to predict target motion information of the vehicle moving from the current position to the next position based on preset motion information of the target preview position in the target motion trajectory and position information of the target preview position; A control module is used to control the vehicle to move from the current position to the next position according to the target operation information until the target operation trajectory is completed.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: include: Program data is stored, and when the program data is executed by a processor, it is used to implement the method according to any one of claims 1 to 7.