Vehicle state prediction method and apparatus for intelligent parking, and storage medium
By combining the output network model and the state network model with vehicle dynamics parameters to predict vehicle state, the problem that existing vehicle dynamics modeling cannot accurately reflect complex situations is solved, and high-accuracy prediction is achieved in the intelligent parking process.
Patent Information
- Application Number
- PCT/CN2025/086659
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-30
- Filing Date
- 2025-04-01
- Publication Date
- 2025-12-04
AI Technical Summary
Existing vehicle dynamics modeling methods are unable to accurately reflect the vehicle dynamics characteristics in complex situations, resulting in low accuracy in vehicle state prediction.
By employing an output network model and a state network model, and combining information such as the vehicle's longitudinal velocity, yaw rate, control commands, and driving mode, a neural network model is used to predict vehicle acceleration and state. The model is then optimized using training data to improve prediction accuracy.
It improves the accuracy of vehicle state prediction, enabling precise prediction of vehicle acceleration and state in complex driving environments, adapting to frequent gear changes, and enhancing the adaptability and accuracy of the vehicle dynamics model.
Smart Images

Figure CN2025086659_04122025_PF_FP_ABST
Abstract
Description
Vehicle state prediction methods, devices, and storage media for intelligent parking
[0001] This application claims priority to Chinese Patent Application No. 202410690687.X, filed on May 30, 2024, entitled "Vehicle State Prediction Method, Apparatus and Storage Medium for Intelligent Parking", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of autonomous driving technology, and in particular to a vehicle state prediction method, device, and storage medium for intelligent parking. Background Technology
[0003] With the rapid development of autonomous driving technology, autonomous vehicles have been widely used, and motion control is one of the key links for autonomous vehicles to achieve autonomous driving.
[0004] Currently, most vehicle motion control is based on vehicle dynamics modeling, which is achieved through physical modeling methods.
[0005] The above methods require building models based on complex vehicle parameters and control system principles. The models built are difficult to accurately reflect the vehicle dynamics characteristics under complex conditions, resulting in low accuracy in predicting vehicle states. Summary of the Invention
[0006] This application provides a vehicle state prediction method, apparatus, and storage medium for intelligent parking. The technical solution is as follows:
[0007] On the one hand, a vehicle state prediction method for intelligent parking is provided, the method comprising:
[0008] The vehicle's first longitudinal speed, first yaw rate, first control command, and first driving mode information at the current moment are obtained, where the first longitudinal speed is the speed in the direction of the vehicle's front.
[0009] The first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information are input into a preset vehicle dynamics model to predict the vehicle's acceleration at the current moment and in the future.
[0010] Optionally, the vehicle dynamics model includes an output network model and a state network model. The step of inputting the first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information into the vehicle dynamics model to predict the vehicle's acceleration at the current and future times includes:
[0011] The first longitudinal velocity, the first yaw rate, and the first control command are input into the output network model to obtain the first acceleration corresponding to the current moment;
[0012] The first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information are input into the state network model to obtain the second longitudinal velocity and the second yaw rate corresponding to the next moment.
[0013] Obtain the second control command corresponding to the next moment;
[0014] The second longitudinal velocity, the second yaw rate, and the second control command are input into the output network model to obtain the second acceleration corresponding to the next moment.
[0015] Optionally, the state network model includes a first sub-model, a second sub-model, and a third sub-model. The step of inputting the first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information into the state network model to obtain the second longitudinal velocity and the second yaw rate corresponding to the next moment includes:
[0016] The first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information are input into the first sub-model to obtain the time derivative of the first longitudinal velocity and the first yaw acceleration.
[0017] The time derivative of the first longitudinal velocity and the first yaw acceleration are respectively input into the second sub-model to obtain the third longitudinal velocity and the third yaw acceleration corresponding to the next moment. The second sub-model is used for integration processing.
[0018] The third longitudinal speed, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command are input into the third sub-model to obtain the second longitudinal speed and the second yaw rate.
[0019] Optionally, the step of inputting the third longitudinal speed, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command into the third sub-model to obtain the second longitudinal speed and the second yaw rate includes:
[0020] Using the third sub-model, the third longitudinal speed is limited to the longitudinal speed range corresponding to the current gear to obtain the second longitudinal speed;
[0021] The target yaw rate is determined based on the second longitudinal velocity and the first control command;
[0022] The third yaw rate is adjusted based on the target yaw rate to obtain the second yaw rate.
[0023] Optionally, the training process of the vehicle dynamics model includes:
[0024] Acquire multiple sets of training data, each set of training data including: the first sample longitudinal velocity, the first sample yaw rate, the first sample control command and the first sample driving mode information corresponding to the first time moment; the second sample longitudinal velocity and the second sample yaw rate corresponding to the second time moment; the second sample control command and the first sample acceleration corresponding to the second time moment; the second time moment is the next time moment after the first time moment.
[0025] Based on the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information corresponding to the first moment in each set of training data, the second sample longitudinal velocity and second sample yaw rate corresponding to the second moment, the second sample control command corresponding to the second moment, and the first sample acceleration corresponding to the second moment, the preset initial dynamics model is trained to obtain the vehicle dynamics model.
[0026] Optionally, the vehicle dynamics model includes an output network model and a state network model, and the initial dynamics model includes an initial output model and an initial state model. The vehicle dynamics model is obtained by training a preset initial dynamics model based on the first sample longitudinal velocity, first sample yaw rate, first sample control command, and first sample driving mode information corresponding to the first time step in each set of training data, the second sample longitudinal velocity and second sample yaw rate corresponding to the second time step, the second sample control command corresponding to the second time step, and the first sample acceleration corresponding to the second time step. This training includes:
[0027] The first sample longitudinal velocity, the first sample yaw rate, the first sample control command, and the first sample driving mode information from each set of training data are input into the initial state model to obtain the first predicted longitudinal velocity and the first predicted yaw rate corresponding to the second time moment.
[0028] Based on the first predicted longitudinal velocity, the first predicted yaw rate, the second sample longitudinal velocity, and the second sample yaw rate corresponding to the multiple sets of training data, the initial state model is trained to obtain the state network model.
[0029] The first predicted longitudinal velocity, the first predicted yaw rate, and the second sample control command corresponding to the second time moment are input into the initial output model to obtain the first predicted acceleration corresponding to the second time moment;
[0030] Based on the first predicted acceleration and the first sample acceleration corresponding to each set of training data in the multiple sets of training data, the initial output model is trained to obtain the output network model.
[0031] Optionally, training the initial output model based on the first predicted acceleration and the first sample acceleration corresponding to each of the multiple sets of training data to obtain the output network model includes:
[0032] Based on the first predicted acceleration and the first sample acceleration corresponding to each set of training data in multiple sets of training data, the first model loss value corresponding to the initial output model is calculated using the loss function.
[0033] Determine whether the first model loss value meets the preset first training condition. If yes, use the initial output model as the output network model. If no, continue training the initial output model until the first model loss value corresponding to the initial output model meets the first training condition. Then, use the initial output model that meets the first training condition as the output network model.
[0034] Optionally, the state network model includes a first sub-model, a second sub-model, and a third sub-model. The initial state model includes a first state model and a second state model. The initial state model is trained based on the first predicted longitudinal velocity, the first predicted yaw rate, the second sample longitudinal velocity, and the second sample yaw rate corresponding to the multiple sets of training data to obtain the state network model, including:
[0035] The longitudinal velocity of the second sample corresponding to multiple sets of training data is filtered to obtain the filtered longitudinal velocity of the second sample.
[0036] Based on the first predicted longitudinal velocity, the first predicted yaw rate, the filtered second sample longitudinal velocity, and the second sample yaw rate corresponding to the multiple sets of training data, the second model loss value corresponding to the first state model is calculated using the loss function, and the first predicted longitudinal velocity is the velocity corresponding to the filtered second sample longitudinal velocity.
[0037] Determine whether the loss value of the second model meets the preset second training condition. If yes, then the first state model is used as the first sub-model. If no, then continue to train the first state model until the loss value of the second model corresponding to the first state model meets the second training condition. Then, the first state model that meets the second training condition is used as the first sub-model.
[0038] Based on the first sub-model and the second state model, the state network model is obtained, and the second state model is used for integration processing.
[0039] Optionally, the first control command includes at least one of the following: throttle opening command, deceleration control command, and steering wheel angle control command.
[0040] On the other hand, a vehicle state prediction device for intelligent parking is provided, the device comprising:
[0041] The first acquisition module is used to acquire the vehicle's first longitudinal speed, first yaw rate, first control command, and first driving mode information at the current moment, wherein the first longitudinal speed is the driving speed in the direction of the vehicle's front.
[0042] The prediction module is used to input the first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information into the vehicle dynamics model to predict the vehicle's acceleration at the current moment and in the future.
[0043] Optionally, the vehicle dynamics model includes a state network model and an output network model, and the prediction module includes:
[0044] The first determining submodule is used to input the first longitudinal velocity, the first yaw rate and the first control command into the output network model to obtain the first acceleration corresponding to the current moment;
[0045] The second determining submodule is used to input the first longitudinal velocity, the first yaw rate, the first control command and the first driving mode information into the state network model to obtain the second longitudinal velocity and the second yaw rate corresponding to the next moment.
[0046] The first acquisition submodule is used to acquire the second control command corresponding to the next moment;
[0047] The third determining submodule is used to input the second longitudinal velocity, the second yaw rate and the second control command into the output network model to obtain the second acceleration corresponding to the next moment.
[0048] Optionally, the state network model includes a first sub-model, a second sub-model, and a third sub-model, and the second determining sub-module includes:
[0049] The first determining unit is used to input the first longitudinal velocity, the first yaw rate, the first control command and the first driving mode information into the first sub-model to obtain the time derivative of the first longitudinal velocity and the first yaw acceleration.
[0050] The second determining unit is used to input the time derivative of the first longitudinal velocity and the first yaw acceleration into the second sub-model to obtain the third longitudinal velocity and the third yaw acceleration corresponding to the next moment. The second sub-model is used to perform integration processing.
[0051] The third determining unit is used to input the third longitudinal speed, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command into the third sub-model to obtain the second longitudinal speed and the second yaw rate.
[0052] Optionally, the third determining unit is used for:
[0053] Using the third sub-model, the third longitudinal speed is limited to the longitudinal speed range corresponding to the current gear to obtain the second longitudinal speed;
[0054] The target yaw rate is determined based on the second longitudinal velocity and the first control command;
[0055] The third yaw rate is adjusted based on the target yaw rate to obtain the second yaw rate.
[0056] Optionally, the device further includes:
[0057] The second acquisition module is used to acquire multiple sets of training data. Each set of training data includes: the first sample longitudinal velocity, the first sample yaw rate, the first sample control command and the first sample driving mode information corresponding to the first time moment; the second sample longitudinal velocity and the second sample yaw rate corresponding to the second time moment; the second sample control command and the first sample acceleration corresponding to the second time moment; and the second time moment is the next time moment after the first time moment.
[0058] The training module is used to train a preset initial dynamics model based on the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information corresponding to the first moment in each set of training data, the second sample longitudinal velocity and second sample yaw rate corresponding to the second moment, the second sample control command corresponding to the second moment, and the first sample acceleration corresponding to the second moment, to obtain the vehicle dynamics model.
[0059] Optionally, the vehicle dynamics model includes: an output network model and a state network model; the initial dynamics model includes: an initial output model and an initial state model; and the training module includes:
[0060] The fourth determination submodule is used to input the first sample longitudinal velocity, the first sample yaw rate, the first sample control command, and the first sample driving mode information from each set of training data into the initial state model to obtain the first predicted longitudinal velocity and the first predicted yaw rate corresponding to the second time moment.
[0061] The second training submodule is used to train the initial state model based on the first predicted longitudinal velocity, the first predicted yaw rate, the second sample longitudinal velocity, and the second sample yaw rate corresponding to the multiple sets of training data, so as to obtain the state network model.
[0062] The fifth determining submodule is used to input the first predicted longitudinal velocity, the first predicted yaw rate and the second sample control command corresponding to the second time moment into the initial output model to obtain the first predicted acceleration corresponding to the second time moment;
[0063] The first training submodule is used to train the initial output model based on the first predicted acceleration and the first sample acceleration corresponding to each of the multiple sets of training data, so as to obtain the output network model.
[0064] Optionally, the first training submodule includes:
[0065] The first calculation unit is used to calculate the first model loss value corresponding to the initial output model based on the first predicted acceleration and the first sample acceleration corresponding to each group of training data in multiple groups of training data, using a loss function.
[0066] The judgment unit is used to determine whether the first model loss value meets the preset first training condition. If yes, the initial output model is used as the output network model; if no, the initial output model is trained until the first model loss value corresponding to the initial output model meets the first training condition, and the initial output model that meets the first training condition is used as the output network model.
[0067] Optionally, the state network model includes a first sub-model, a second sub-model, and a third sub-model, the initial state model includes: a first state model and a second state model, and the second training sub-module includes:
[0068] The first filtering unit is used to filter the longitudinal velocity of the second sample corresponding to multiple sets of training data to obtain the filtered longitudinal velocity of the second sample.
[0069] The second calculation unit is used to calculate the second model loss value corresponding to the first state model based on the first predicted longitudinal velocity, the first predicted yaw rate, the filtered second sample longitudinal velocity and the second sample yaw rate corresponding to the multiple sets of training data, using a loss function. The first predicted longitudinal velocity is the velocity corresponding to the filtered second sample longitudinal velocity.
[0070] The second judgment unit is used to determine whether the second model loss value meets the preset second training condition. If yes, the first state model is used as the first sub-model; if no, the first state model is trained until the second model loss value corresponding to the first state model meets the second training condition, and the first state model that meets the second training condition is used as the first sub-model.
[0071] A combination unit is used to obtain the state network model based on the first sub-model and the second state model, wherein the second state model is used for integration processing.
[0072] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory being used to store at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the vehicle state prediction method for intelligent parking in the embodiments of this application.
[0073] On the other hand, a non-transitory computer-readable storage medium is provided, wherein at least one piece of program code is stored in the computer-readable storage medium, the at least one piece of program code being loaded and executed by the processor to implement the vehicle state prediction method for intelligent parking as described in the embodiments of this application. Attached Figure Description
[0074] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0075] Figure 1 is a flowchart of a vehicle state prediction method for intelligent parking according to an embodiment of this application;
[0076] Figure 2 is a flowchart of another vehicle state prediction method for intelligent parking provided according to an embodiment of this application;
[0077] Figure 3 is a flowchart of a vehicle dynamics model training process according to an embodiment of this application;
[0078] Figure 4 is a flowchart of another vehicle dynamics model training process provided according to an embodiment of this application;
[0079] Figure 5 is a flowchart of the steps for obtaining a state network model according to an embodiment of this application;
[0080] Figure 6 is a flowchart of the steps for obtaining the output network model according to an embodiment of this application;
[0081] Figure 7 is a schematic diagram of a vehicle dynamics model provided according to an embodiment of this application;
[0082] Figure 8 is a structural schematic diagram of a vehicle state prediction device for intelligent parking provided according to an embodiment of this application. Detailed Implementation
[0083] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0084] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0085] This application embodiment is geared towards intelligent parking functionality, an application scenario characterized by fuzzy boundaries combining kinematics and dynamics. For such applications, kinematics is needed to constrain the intelligent parking process, ensuring the outcome remains within kinematically controllable constraints. Based on this intelligent parking application scenario, this application embodiment provides a vehicle state prediction method for intelligent parking. This application embodiment uses a vehicle state prediction method to predict the vehicle's acceleration at the current and future moments. This predicted information is used to control the vehicle's operation to achieve intelligent parking. Figure 1 is a flowchart of a vehicle state prediction method for intelligent parking provided by this application embodiment. This method is applied to an intelligent parking system. As shown in Figure 1, the vehicle state prediction method includes the following steps:
[0086] 101. Obtain the vehicle's first longitudinal speed, first yaw rate, first control command, and first driving mode information at the current moment. The first longitudinal speed is the speed in the direction of the vehicle's front.
[0087] 102. Input the first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information into the vehicle dynamics model to predict the vehicle's acceleration at the current moment and in the future.
[0088] In this embodiment, the vehicle's current longitudinal velocity, first yaw rate, first control command, and first driving mode information are input into the vehicle dynamics model to predict the vehicle's acceleration at the current and future times. This allows for prediction of the vehicle's acceleration at the current and future times based on the driving mode information, thus improving the accuracy of vehicle state prediction.
[0089] Figure 2 is a flowchart of another vehicle state prediction method for intelligent parking provided in an embodiment of this application. This method is applied to an intelligent parking system. As shown in Figure 2, the vehicle state prediction method includes the following steps:
[0090] 201. Obtain the vehicle's first longitudinal velocity, first yaw rate, first control command, and first driving mode information at the current moment.
[0091] The first longitudinal velocity is the longitudinal velocity at the vehicle's center of gravity, which can be the speed in the direction of the vehicle's front end. In other words, the longitudinal direction can be the extension of the line connecting the front and rear of the vehicle, and the longitudinal velocity can be the speed in this extension direction. The first yaw rate is the angular velocity of the vehicle body when it rotates around its vertical axis (i.e., the angular velocity of the vehicle body relative to the axis of rotation, which is perpendicular to the plane of the vehicle body. This axis of rotation is generally perpendicular to the ground, but may not be perpendicular in special cases). This first yaw rate is usually measured by sensors. The first driving mode information is obtained from the vehicle's parking control system. This first driving mode information is variable when the vehicle is parked. The first driving mode information indicates the vehicle's driving mode and includes: the vehicle's gear information and mode type. The mode type can be: Eco mode, Sport mode, and Standard mode. The vehicle's gear information can include: Park, Reverse, Neutral, Drive, and Low gear.
[0092] In the embodiments of this application, the first control command is an instruction issued by the autonomous driving controller of the autonomous vehicle to the vehicle control system. The first control command may include at least one of: throttle opening command, deceleration control command, and steering wheel angle control command. The throttle opening command is used to control the throttle opening of the vehicle, the deceleration control command is used to control the master cylinder pressure and brake caliper force of the vehicle, and the steering wheel angle control command is used to control the steering motor torque. It should be noted that the vehicle control system involved here may include, for example, a vehicle controller, which refers to a system that coordinates the operation of various systems in the vehicle. The autonomous driving controller can send the first control command to the vehicle controller, which integrates the first control command and information feedback from other systems to generate and issue the final vehicle control command to the corresponding instruction execution system to control the operation of the vehicle.
[0093] In this embodiment, the first control command corresponding to the current moment is a control command that combines the vehicle's longitudinal acceleration, lateral acceleration and current environmental perception data to control the vehicle's behavior. This first control command will adjust the vehicle's speed, direction, etc., to cope with different road conditions and different driving environments during the parking process, thereby realizing intelligent parking control of the vehicle.
[0094] 202. Input the first longitudinal velocity, the first yaw rate, and the first control command into the output network model to obtain the first acceleration corresponding to the current moment.
[0095] It should be noted that before the first longitudinal velocity, the first yaw rate, and the first control command are input into the output network model, they all need to be homogenized to ensure that the first longitudinal velocity, the first yaw rate, and the first control command are all homogenized to the same range. Subsequently, the homogenized first longitudinal velocity, the first yaw rate, and the first control command are input into the output network model for processing.
[0096] In this embodiment of the application, the vehicle dynamics model includes an output network model and a state network model. The output network model is used to determine the first acceleration corresponding to the current moment. The first acceleration is used to characterize the acceleration at the center of gravity of the vehicle. The first acceleration includes longitudinal acceleration and lateral acceleration. The longitudinal acceleration is used to represent the acceleration at the center of gravity of the vehicle in the driving direction, and the lateral acceleration is used to represent the acceleration at the center of gravity of the vehicle in the direction perpendicular to the driving direction.
[0097] In the embodiments of this application, the output network model is a neural network model, which can be an MLP (Multi-Layer Perceptron) model. The inputs to the MLP model are a first longitudinal velocity, a first yaw rate, and a first control command, and the output is a first acceleration, thus reflecting the relationship between the input and output. The MLP model includes an input layer, hidden layers, and an output layer. The different layers of the MLP model are fully connected. The hidden layers of the MLP model can be called fully connected layers. The number of hidden layers and neurons in the MLP model is set according to the actual situation. For example, the MLP model can use six hidden layers, each containing 64 neurons. The activation function of the MLP model can be set according to the actual situation. In the embodiments of this application, the activation function of the MLP model can be one of ReLU, sigmoid, and tanh.
[0098] In this embodiment, the first longitudinal velocity and the first yaw rate are used as one input vector, and the first control command is used as another input vector. The first longitudinal velocity, the first yaw rate, and the first control command are input into the output network model in the form of two vectors, and the first acceleration is used as an output vector of the output network model.
[0099] 203. Input the first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information into the state network model to obtain the second longitudinal velocity and the second yaw rate corresponding to the next moment.
[0100] The state network model is used to predict the longitudinal velocity and yaw rate at the next moment. In this embodiment, the first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information are input into the state network model, and the second longitudinal velocity and the second yaw rate are used as an output vector of the state network model. In this way, when obtaining the second longitudinal velocity and the second yaw rate, the vehicle's driving mode can be combined, such as frequently changing driving modes and extremely low-speed (crawl) driving conditions, thereby reflecting the vehicle's dynamic characteristics under different modes through the vehicle's driving mode.
[0101] In the embodiments of this application, the state network model includes: a first sub-model, a second sub-model, and a third sub-model.
[0102] The first sub-model includes an embedding layer network and a feedforward network. The embedding layer network is used to convert the first driving mode information into a driving mode vector. For example, the first driving mode information is encoded by the embedding layer network to obtain the first driving mode vector.
[0103] It's important to note that driving modes vary more during intelligent parking compared to driving. Therefore, it's necessary to consider gear information and mode type within each driving mode. Specifically, this requires deep processing of these complex driving modes using an embedding layer network, mapping the driving mode information to a vector projection. Thus, the embedding layer network is specifically designed for the intelligent parking application scenario. By processing driving mode information through the embedding layer network, the model can dynamically adjust its processing logic based on the current gear and other driving modes, accurately reflecting the vehicle's dynamic behavior under different modes. In this way, the vehicle dynamics model can not only adapt to regular driving conditions but also accurately handle the frequent gear changes encountered in intelligent parking systems, enhancing the adaptability and accuracy of the vehicle dynamics model.
[0104] In embodiments of this application, the feedforward network can be an MLP (Multi-Layer Perceptron) model. The inputs to the MLP model are a first longitudinal velocity, a first yaw rate, a first control command, and a first driving mode vector. The outputs are the time derivative of the first longitudinal velocity and the first yaw acceleration, thus reflecting the relationship between the input and output. In some embodiments, the first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode vector corresponding to the first driving mode information are concatenated into a single vector, which is then input into the feedforward network to obtain the time derivative of the first longitudinal velocity and the first yaw acceleration. The MLP model includes an input layer, hidden layers, and an output layer. The different layers of the MLP model are fully connected. The hidden layers of the MLP model can be called fully connected layers. The number of hidden layers and neurons in the MLP model is set according to actual conditions. In some embodiments, the MLP model can use three hidden layers, each containing 64 neurons. The activation function of the MLP model is responsible for converting the inputs of the neurons and generating the output signal. The activation function of the MLP model can be set according to actual conditions. In the embodiments of this application, the activation function of the MLP model can be one of the ReLU function, sigmoid function, and tanh function.
[0105] The second sub-model is used to integrate the time derivative of the first longitudinal velocity and the first yaw acceleration, respectively, and to determine the third longitudinal velocity and the third yaw acceleration using the first longitudinal velocity and the first yaw acceleration.
[0106] The third sub-model is used to correct the third longitudinal velocity and the third yaw rate. Thus, the second longitudinal velocity and the second yaw rate at the next moment can be predicted using the first, second, and third sub-models in the state network model. The specific steps are as follows:
[0107] The first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information are input into the first sub-model to obtain the time derivative of the first longitudinal velocity and the first yaw acceleration.
[0108] The time derivative of the first longitudinal velocity and the first yaw acceleration are input into the second sub-model to obtain the third longitudinal velocity and the third yaw acceleration corresponding to the next moment. The second sub-model is used for integration.
[0109] The third longitudinal speed, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command are input into the third sub-model to obtain the second longitudinal speed and the second yaw rate.
[0110] In some embodiments of this application, the second sub-model may include an integral model for performing integration. Thus, by using the integral model, the time derivative of the first longitudinal velocity and the first yaw acceleration are integrated to obtain the third longitudinal velocity and the third yaw acceleration corresponding to the next moment.
[0111] In another embodiment of this application, the third sub-model can be a limiter model, which is used to adjust the longitudinal speed and yaw rate of the vehicle in different gears. The third longitudinal speed, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command are input into the third sub-model to obtain the second longitudinal speed and the second yaw rate. That is, the limiter model is used to limit the third longitudinal speed and the third yaw rate output by the second sub-model according to the vehicle's gear to obtain the second longitudinal speed and the second yaw rate.
[0112] It should be noted that the driving process leans towards dynamics, while kinematic characteristics may be less prominent; however, kinematic characteristics are more pronounced during intelligent parking. Based on this characteristic of parking, the kinematic features are constrained through a third sub-model, the specific constraint process of which can be found in the steps below.
[0113] In some embodiments of this application, the third longitudinal velocity, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command are input into the third sub-model to obtain the second longitudinal velocity and the second yaw rate, including:
[0114] Using the third sub-model, the third longitudinal speed is limited to the longitudinal speed range corresponding to the current gear to obtain the second longitudinal speed; the target yaw rate is determined based on the second longitudinal speed and the first control command; the third yaw rate is adjusted based on the target yaw rate to obtain the second yaw rate.
[0115] In this embodiment, there is a correspondence between gear position and longitudinal speed. Based on the current gear position, the corresponding longitudinal speed is found from the correspondence between gear position and longitudinal speed; this longitudinal speed is the second longitudinal speed. For example, taking forward gear as an example, the limiter model restricts the longitudinal speed from being less than 0. When the limiter model determines that the longitudinal speed is less than 0, the longitudinal speed is set to 0. Taking reverse gear as an example, the limiter model restricts the longitudinal speed from being greater than 0. When the limiter model determines that the longitudinal speed is greater than 0, the longitudinal speed is set to 0. It should be noted that the longitudinal speed here is described with positive values when the vehicle is moving forward and negative values when the vehicle is moving backward. The above process means: find the longitudinal speed range corresponding to the current gear position; if the third longitudinal speed does not fall within this range, then a longitudinal speed within that range is taken as the second longitudinal speed. In some embodiments, the longitudinal speed range corresponding to forward gear is greater than or equal to 0; if the vehicle mode is forward gear and the third longitudinal speed does not fall within this range (i.e., the third longitudinal speed is less than 0), then 0 is taken as the second longitudinal speed. In some embodiments, the longitudinal speed range corresponding to reverse gear is less than or equal to 0; if the vehicle mode is reverse gear and the third longitudinal speed does not fall within this range (i.e., the third longitudinal speed is greater than 0), then 0 is taken as the second longitudinal speed.
[0116] In embodiments of this application, determining the target yaw rate based on the second longitudinal velocity and the first control command includes:
[0117] Based on the second longitudinal velocity, the steering wheel angle control command in the first control command, the vehicle wheelbase, and the steering ratio from the steering wheel angle to the front wheel angle, the target yaw rate is calculated using the following formula:
[0118] in, For the target yaw rate, For the second longitudinal velocity, δ sw For steering wheel angle control commands, i sw The steering ratio is the angle of the steering wheel to the angle of the front wheels, and L is the wheelbase of the vehicle.
[0119] In embodiments of this application, adjusting the third yaw rate according to the target yaw rate to obtain the second yaw rate includes:
[0120] Determine whether the third yaw rate is within the target yaw rate range. The minimum value of the target yaw rate range is the target yaw rate at a first preset ratio, and the maximum value of the target yaw rate range is the target yaw rate at a second preset ratio. The first preset ratio is less than 1, and the second preset ratio is greater than 1.
[0121] If the third yaw rate is not within the target angular velocity range, then adjust the third yaw rate to the target angular velocity range to obtain the second yaw rate.
[0122] It should be noted that in the process of obtaining the second longitudinal velocity and the second yaw rate using the third sub-model, the third longitudinal velocity, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command used are all real data that have not been homogenized.
[0123] In this embodiment, the second yaw rate is the yaw rate closest to the target angular velocity range from the third yaw rate. That is, when the third yaw rate is not within the target angular velocity range, the yaw rate closest to the third yaw rate within the target angular velocity range is taken as the second yaw rate. In some embodiments, the second yaw rate may also be the maximum value or the minimum value within the target angular velocity range, which can be selected according to the actual situation.
[0124] In this embodiment, the first yaw rate acceleration is used to represent the derivative of the vehicle's lateral velocity with time, and the time derivative of the first longitudinal velocity is used to represent the derivative of the vehicle's longitudinal velocity with time.
[0125] In this embodiment, the third longitudinal velocity and the third yaw rate are corrected by a third sub-model to avoid unrealistic states such as non-zero vehicle speed or non-zero yaw rate during parking in the parking gear.
[0126] 204. Obtain the second control instruction corresponding to the next moment.
[0127] In this embodiment, the second control command corresponding to the next moment is a control command for vehicle behavior formed by combining the vehicle's longitudinal acceleration, lateral acceleration, and current environmental perception data. This second control command adjusts the vehicle's speed, direction, etc., to cope with different road conditions and driving environments, thereby achieving intelligent control of the intelligent vehicle. The specific content of the second control command is the same as that of the first control command, only the corresponding moment is different. The specific content of the second control command can be found in the first control command.
[0128] 205. Input the second longitudinal velocity, the second yaw rate, and the second control command into the output network model to obtain the second acceleration corresponding to the next moment.
[0129] It should be noted that by outputting the network model, we can obtain not only the first acceleration corresponding to the current moment, but also the second acceleration corresponding to the next moment.
[0130] In this embodiment, by inputting the vehicle's current longitudinal velocity, first yaw rate, first control command, and first driving mode information into a preset vehicle dynamics model, the acceleration of the vehicle at the current and future moments can be predicted. Specifically, by inputting the first longitudinal velocity, first yaw rate, first control command, and first driving mode information into a state network model, the second longitudinal velocity and second yaw rate corresponding to the next moment are obtained. This allows for the prediction of the longitudinal velocity and yaw rate at future moments, enabling the vehicle to predict its acceleration at the current and future moments, as well as its longitudinal velocity and yaw rate at future moments, based on the vehicle dynamics model, thus improving the accuracy of vehicle state prediction during parking.
[0131] Furthermore, when predicting the vehicle's acceleration at the current and future moments using the vehicle dynamics model, the system also incorporates a first control command based on current environmental perception data to control vehicle behavior, thereby predicting the vehicle's acceleration. This allows the system to capture complex dynamics and integrate various unconsidered factors, such as terrain gradient, wind resistance, and tire characteristics, enabling the vehicle to adapt to constantly changing driving environments and operating conditions.
[0132] It should be noted that the data input to the state network and the data input to the output network are both normalized to the same range, while the data output by the state network and the output network are both denormalized real data.
[0133] In this embodiment, the vehicle's current longitudinal velocity, first yaw rate, first control command, and first driving mode information are input into the vehicle dynamics model to predict the vehicle's acceleration at the current and future times. This enables the acquisition of the vehicle's dynamic behavior under different driving modes based on driving mode information, improving the accuracy of vehicle state prediction. Specifically, the vehicle dynamics model includes a state network model and an output network model, with the state network model including a limiter. In other words, this embodiment employs a state network model, an output network model, and integrated kinematically based limiters and embedding layer technology to ensure the accuracy and stability of the vehicle dynamics model under complex driving modes.
[0134] It should be noted that steps 201-205 describe the specific process of predicting the first acceleration at the current moment and the second acceleration at the next moment using a preset vehicle dynamics model. The training process of the preset vehicle dynamics model is described below through steps 301-302 in Figure 3. This preset vehicle dynamics model only needs to be trained before use.
[0135] 301. Obtain multiple sets of training data.
[0136] It should be noted that the multiple sets of training data are vehicle data collected under different road conditions at at least one vehicle within a preset time period, representing multiple historical moments. This ensures that the trained vehicle dynamics model can be applied to different driving environments during parking. For the same vehicle, the multiple historical moments within the preset time period are adjacent. The first moment mentioned below refers to any moment in the historical time, and the second moment is the moment following the first moment. The first moments corresponding to multiple sets of training data can be different to obtain training data corresponding to different historical moments. In one embodiment of this application, the vehicle dynamics model can be obtained using training data corresponding to multiple adjacent historical moments within a preset time period for the same vehicle.
[0137] Each set of training data includes: the first sample longitudinal velocity, the first sample yaw rate, the first sample control command and the first sample driving mode information corresponding to the first time moment; the second sample longitudinal velocity and the second sample yaw rate corresponding to the second time moment; the second sample control command and the second sample acceleration corresponding to the second time moment.
[0138] In this embodiment, each set of training data corresponds to the same vehicle. The first sample acceleration at the first moment is the actual acceleration of the vehicle at that moment. This first sample acceleration includes: sample lateral acceleration and sample longitudinal acceleration. The sample lateral acceleration represents the acceleration of the vehicle's center of gravity in a direction perpendicular to the vehicle's direction of travel, and the sample longitudinal acceleration represents the acceleration of the vehicle's center of gravity in the direction of travel. The first sample driving mode information includes: vehicle gear information and mode type. The mode type can be: energy-saving mode, sport mode, and standard mode. The vehicle gear information can include: parking gear, reverse gear, neutral gear, drive gear, and low gear.
[0139] 302. Based on the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information corresponding to the first moment in each set of training data, the second sample longitudinal velocity and second sample yaw rate corresponding to the second moment, the second sample control command corresponding to the second moment, and the first sample acceleration corresponding to the second moment, the preset initial dynamics model is trained to obtain the vehicle dynamics model.
[0140] It should be noted that the preset initial dynamics model is an initial model. Multiple sets of training data are input into the initial dynamics model to train the initial dynamics model and obtain the corresponding vehicle dynamics model.
[0141] In this embodiment, the initial dynamics model includes an initial output model and an initial state model. The initial state model includes a first state model and a second state model. The second state model is the same as the second sub-model in the vehicle dynamics model and is used for integration processing. The initial output model is an initial neural network model, which can be an MLP model. The output network model in the vehicle dynamics model is obtained by training the initial output model. The first state model includes an initial embedding layer network and an initial feedforward network. The initial feedforward network can be an MLP model. The first sub-model in the vehicle dynamics model is obtained by training the first state model. The specific training process can be found in the following steps.
[0142] In this embodiment of the application, the first sample acceleration in the multiple sets of training data is the vehicle's actual acceleration at the second time moment, and the second sample longitudinal velocity and the second sample yaw rate corresponding to the second time moment are the vehicle's actual longitudinal velocity and actual yaw rate corresponding to the second time moment.
[0143] In the embodiments of this application, as shown in Figure 4, the steps to obtain the vehicle dynamics model include steps 3021-3024, the specific steps of which are as follows:
[0144] 3021. Input the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information from each set of training data into the initial state model to obtain the first predicted longitudinal velocity and first predicted yaw rate corresponding to the second time step.
[0145] In some embodiments of this application, obtaining the first predicted longitudinal velocity and the first predicted yaw rate corresponding to the second moment includes:
[0146] The first sample longitudinal velocity, first sample yaw rate, first sample control command, and first sample driving mode information from each set of training data are input into the first state model to obtain the time derivative of the first sample longitudinal velocity and the first predicted yaw rate acceleration at the first time moment; the time derivative of the first sample longitudinal velocity and the first predicted yaw rate acceleration are input into the second state model to obtain the first predicted longitudinal velocity and the first predicted yaw rate acceleration at the second time moment.
[0147] In embodiments of this application, the first state model includes an initial embedding layer network and an initial feedforward network. In one embodiment of this application, the first sample longitudinal velocity, first sample yaw rate, first sample control command, and first sample driving mode information from each set of training data are input into the first state model to obtain the time derivative of the first sample longitudinal velocity and the first predicted yaw rate acceleration corresponding to the first time moment, including:
[0148] The first sample driving mode information is input into the initial embedding layer network to obtain the sample driving mode vector corresponding to the first sample driving mode. The sample driving mode vector is concatenated with the vector composed of the first sample longitudinal velocity, the first sample yaw rate and the first sample control command to obtain the target vector. The target vector is input into the initial feedforward network to obtain the time derivative of the first sample longitudinal velocity and the first predicted yaw rate at the first time moment.
[0149] In this embodiment, the first sample control command includes: throttle opening command, deceleration control command, and steering wheel angle control command. The vector composed of the first sample longitudinal velocity, the first sample yaw rate, and the first sample control command can be a five-dimensional vector. The sample driving mode vector obtained by using the embedded layer network is a multi-dimensional sample driving mode vector, which is then concatenated to obtain the target vector.
[0150] It should be noted that the initial embedding layer network is used to convert the first driving mode information into a fixed-length vector. This initial embedding layer network converts the first driving mode information into a fixed-length vector through the embedding matrix in the embedding layer network. Since the first-state model includes the initial embedding layer network and the initial feedforward network, during the training of the first-state model, the embedding matrix of the initial embedding layer network, as well as the weights and bias vectors in the initial feedforward network, need to be adjusted according to the loss value corresponding to the first-state model. Once the first-state model is trained, the embedding matrix in the embedding layer network becomes fixed. Thus, inputting the first sample driving mode information into the embedding layer network will yield the corresponding sample driving model vector.
[0151] 3022. Based on the first predicted longitudinal velocity, the first predicted yaw rate, the second sample longitudinal velocity, and the second sample yaw rate corresponding to multiple sets of training data, the initial state model is trained to obtain the state network model.
[0152] It should be noted that during the training of the initial state model, the first predicted longitudinal velocity and the first predicted yaw rate are calculated using the first and second state models. The third sub-model within this initial state model does not participate in the calculation during this process. Therefore, the training of the initial state model does not involve a correction process for the first predicted longitudinal velocity and the first predicted yaw rate; this correction process is only performed during the vehicle state prediction phase. Thus, the third sub-model does not participate in the training process.
[0153] In this embodiment of the application, as shown in Figure 5, the steps to obtain the state network model include steps 30221-30226, as follows:
[0154] 30221. Filter the longitudinal velocity of the second sample corresponding to multiple sets of training data to obtain the filtered longitudinal velocity of the second sample.
[0155] In this embodiment, the longitudinal velocity of the second sample is filtered to avoid gradient vanishing or model divergence during training. Filtering the longitudinal velocity of the second sample can remove inaccurate longitudinal velocities of the low-speed segments. Specifically, inaccurate longitudinal velocities of the low-speed segments can be longitudinal velocities less than a preset value, longitudinal velocities whose velocity change exceeds a preset threshold within a preset time period, or multiple longitudinal velocities preceding longitudinal velocities whose velocity change exceeds a preset threshold within a preset time period.
[0156] 30222. Based on the first predicted longitudinal velocity, the first predicted yaw rate, the filtered second sample longitudinal velocity, and the second sample yaw rate corresponding to multiple sets of training data, the loss value of the second model corresponding to the first state model is calculated using the loss function.
[0157] Wherein, the first predicted longitudinal velocity is the velocity corresponding to the longitudinal velocity of the second sample after screening. That is, the first predicted longitudinal velocity is the predicted velocity obtained based on the longitudinal velocity of the second sample after screening.
[0158] It should be noted that during the training of the first state model to obtain the first sub-model, the acquired second sample longitudinal velocities need to be filtered to obtain filtered second sample longitudinal velocities. Then, the corresponding first predicted longitudinal velocity is obtained using the filtered second sample longitudinal velocities. In this way, when the sample longitudinal velocities measured by the wheel speed sensor are inaccurate under extremely low-speed parking creep conditions, the first state model can be trained to obtain the first sub-model based on the filtered second sample longitudinal velocities and the corresponding first predicted longitudinal velocities. This allows the second sample longitudinal velocities during the creep process that cannot be accurately captured due to sensor limitations to be excluded during training. This avoids gradient vanishing or model divergence problems during training, ensuring that the model provides more accurate dynamic output in practical applications.
[0159] In the embodiments of this application, the loss function can be either the mean squared error function or the mean absolute error function. Using the loss function, the loss value between the longitudinal velocity of the filtered second sample and the corresponding first predicted longitudinal velocity, as well as the average of the expected value or absolute error corresponding to the loss value between the first predicted yaw rate and the yaw rate of the second sample, can be determined. The average of the expected value or absolute error is then used as the second model loss value corresponding to the first state model.
[0160] 30223. Determine whether the loss value of the second model meets the preset second training conditions. If yes, proceed to step 30224; otherwise, proceed to step 30225.
[0161] In the embodiments of this application, the second training condition is that the second model loss value is not greater than the second target threshold. If the first model loss value is greater than the second target threshold, it is determined that the preset second training condition is not met; if the second model loss value is not greater than the second target threshold, it is determined that the preset second training condition is met.
[0162] 30224. Take the first state model as the first sub-model.
[0163] It should be noted that if the loss value of the second model is not greater than the target threshold, it can be determined that the current first-state model has met the second training condition, and the current first-state model can be used as the first sub-model.
[0164] 30225. Continue training the first state model until the loss value of the second model corresponding to the first state model meets the second training condition. Then, take the first state model that meets the second training condition as the first sub-model.
[0165] It should be noted that the first-state model includes the initial embedding layer network and the initial feedforward network. The training process of the first-state model includes the training process of the embedding layer network and the initial feedforward network. Therefore, the parameters of the embedding layer network and the feedforward network are updated using the second model loss value.
[0166] In this embodiment, continuing to train the first-state model can be achieved by updating the model parameters of the first-state model using a preset update algorithm to obtain a first sub-model. This embodiment does not specifically limit the preset update algorithm. The preset update algorithm can be an adaptive learning optimizer based on gradient descent.
[0167] 30226. The state network model is obtained based on the first sub-model and the second state model.
[0168] In this embodiment, the first sub-model and the second state model are combined to obtain a state network model. The output of the first sub-model is used as the input of the second state model, which is used for integration processing of the input data. The second state model is the same as the second sub-model described above. It should be noted that during the model training phase, the third sub-model is omitted from the description because it does not require training. However, during the application phase of the state network model, as described in the previous embodiments, the third sub-model needs to be embedded within the state network model trained here.
[0169] 3023. Input the first predicted longitudinal velocity, the first predicted yaw rate and the second sample control command corresponding to the second time moment into the initial output model to obtain the first predicted acceleration corresponding to the second time moment.
[0170] In this embodiment, the first predicted longitudinal velocity and the first predicted yaw rate at the second moment are predicted by the initial state model. The second sample control command is the actual control command at the second moment, which is a control command for vehicle behavior formed by combining the vehicle's longitudinal acceleration, lateral acceleration and current environmental perception data.
[0171] 3024. Based on the first predicted acceleration and the first sample acceleration corresponding to each set of training data in multiple sets of training data, train the initial output model to obtain the output network model.
[0172] In this embodiment, the first predicted acceleration and the first sample acceleration corresponding to each set of training data in multiple sets of training data are compared to determine the comparison result. Based on the comparison result, the model parameters of the initial output model are iteratively adjusted. By iteratively adjusting the model parameters, the initial output model gradually converges, i.e., the initial output model is gradually optimized. When the initial output model meets the preset training conditions, the output network model can be determined based on the current model structure and model parameters of the initial network model.
[0173] In this embodiment of the application, as shown in Figure 6, the steps to obtain the output network model include steps 30241-30244, as follows:
[0174] 30241. Based on the first predicted acceleration and the first sample acceleration corresponding to each set of training data in multiple sets of training data, calculate the first model loss value corresponding to the initial output model using the loss function.
[0175] In the embodiments of this application, the loss function can be either the mean squared error function or the mean absolute error function. Using the loss function, the expected value or the average absolute error of the loss value between the first predicted acceleration and the first sample acceleration corresponding to multiple sets of training data can be determined, thereby using the expected value or the average absolute error of the loss value as the first model loss value corresponding to the initial output model.
[0176] 30242. Determine whether the loss value of the first model meets the preset first training condition. If yes, proceed to step 30243; otherwise, proceed to step 30244.
[0177] In the embodiments of this application, the first training condition is that the first model loss value is not greater than the first target threshold. If the first model loss value is greater than the first target threshold, it is determined that the preset first training condition is not met; if the first model loss value is not greater than the first target threshold, it is determined that the preset first training condition is met.
[0178] 30243. Use the initial output model as the output network model.
[0179] It should be noted that if the loss value of the first model is not greater than the target threshold, it can be determined that the current initial output model has met the first training condition, and the current initial output model can be used as the output network model.
[0180] 30244. Continue training the initial output model until the first model loss value corresponding to the initial output model meets the first training condition. Use the initial output model that meets the first training condition as the output network model.
[0181] In this embodiment, continuing to train the initial output model can be achieved by updating the model parameters of the initial output model using a preset update algorithm to obtain the output network model. This embodiment does not specifically limit the preset update algorithm; the preset update algorithm can be an adaptive learning optimizer based on gradient descent.
[0182] It should be noted that in the process of training the initial state model to obtain the state network model and training the initial output network model to obtain the output network model using training data, the data input to the initial state network model and the initial input network model are both normalized data.
[0183] In this embodiment, based on the first sample longitudinal velocity, first sample yaw rate, first sample control command, and first sample driving mode information corresponding to the first moment in each set of training data, and the second sample longitudinal velocity, second sample yaw rate, second sample control command, and first sample acceleration corresponding to the second moment in the second moment, a preset initial dynamics model is trained to obtain a vehicle dynamics model. This allows the trained vehicle dynamics model to acquire the vehicle's dynamic behavior under different driving modes based on driving mode information, improving the accuracy of vehicle state prediction. Furthermore, the vehicle dynamics model includes a state network model and an output network model, thereby enabling the use of state network models, output network models, and embedding layer techniques to ensure the accuracy and stability of the vehicle dynamics model under complex driving modes.
[0184] The following example illustrates the specific process of vehicle state prediction for intelligent parking:
[0185] Figure 7 shows a schematic diagram of a vehicle dynamics model, which includes a first sub-model, a second sub-model, a third sub-model, and an output network model. The first sub-model includes an embedding layer network and a feedforward network. Specifically, the first longitudinal velocity, first yaw rate, and first control command at the current moment are input into the output network model to obtain the first longitudinal acceleration and first lateral acceleration at the current moment; the first driving mode information is input into the embedded layer network to obtain the driving mode vector; the driving mode vector is added to the vector composed of the first longitudinal velocity, first yaw rate, and first control command at the current moment to obtain the target vector, which is then input into the feedforward network to obtain the time derivative of the longitudinal velocity and lateral angular acceleration at the current moment; the time derivative of the longitudinal velocity and lateral angular acceleration at the current moment are input into the second sub-model to obtain the third longitudinal velocity and third lateral angular velocity at the next moment; the third longitudinal velocity, third yaw rate, the current gear corresponding to the first driving mode information, and the steering wheel angle command in the first control command are input into the third sub-model to obtain the second longitudinal velocity and second yaw rate at the next moment; through looping, the second longitudinal velocity and second lateral angular velocity at the next moment replace the first longitudinal velocity and first lateral angular velocity at the previous moment and are input into the output network model and the state network model; the above process is repeated.
[0186] Figure 8 is a block diagram of a vehicle state prediction device for intelligent parking according to an embodiment of this application. The device is used to perform the steps of the above-described vehicle state prediction method. Referring to Figure 8, the device includes: a first acquisition module 801 and a prediction module 802.
[0187] The first acquisition module 801 is used to acquire the vehicle's first longitudinal speed, first yaw rate, first control command, and first driving mode information at the current moment, wherein the first longitudinal speed is the driving speed in the direction of the vehicle's front.
[0188] The prediction module 802 is used to input the first longitudinal velocity, the first yaw rate, the first control command and the first driving mode information into the vehicle dynamics model to predict the acceleration of the vehicle at the current moment and in the future.
[0189] Optionally, the vehicle dynamics model includes a state network model and an output network model, and the prediction module includes:
[0190] The first determining submodule is used to input the first longitudinal velocity, the first yaw rate and the first control command into the output network model to obtain the first acceleration corresponding to the current moment;
[0191] The second determining submodule is used to input the first longitudinal velocity, the first yaw rate, the first control command and the first driving mode information into the state network model to obtain the second longitudinal velocity and the second yaw rate corresponding to the next moment.
[0192] The first acquisition submodule is used to acquire the second control command corresponding to the next moment;
[0193] The third determining submodule is used to input the second longitudinal velocity, the second yaw rate and the second control command into the output network model to obtain the second acceleration corresponding to the next moment.
[0194] Optionally, the state network model includes a first sub-model, a second sub-model, and a third sub-model, and the second determining sub-module includes:
[0195] The first determining unit is used to input the first longitudinal velocity, the first yaw rate, the first control command and the first driving mode information into the first sub-model to obtain the time derivative of the first longitudinal velocity and the first yaw acceleration.
[0196] The second determining unit is used to input the time derivative of the first longitudinal velocity and the first yaw acceleration into the second sub-model to obtain the third longitudinal velocity and the third yaw velocity corresponding to the next moment. The second sub-model is used to perform integration processing.
[0197] The third determining unit is used to input the third longitudinal speed, the third yaw rate, the current gear corresponding to the first driving mode information, and the first control command into the third sub-model to obtain the second longitudinal speed and the second yaw rate.
[0198] Optionally, the third determining unit is used for:
[0199] Using the third sub-model, the third longitudinal speed is limited to the longitudinal speed range corresponding to the current gear to obtain the second longitudinal speed;
[0200] The target yaw rate is determined based on the second longitudinal velocity and the first control command;
[0201] The third yaw rate is adjusted based on the target yaw rate to obtain the second yaw rate.
[0202] Optionally, the device further includes:
[0203] The second acquisition module is used to acquire multiple sets of training data. Each set of training data includes: the first sample longitudinal velocity, the first sample yaw rate, the first sample control command and the first sample driving mode information corresponding to the first time moment; the second sample longitudinal velocity and the second sample yaw rate corresponding to the second time moment; the second sample control command and the first sample acceleration corresponding to the second time moment; and the second time moment is the next time moment after the first time moment.
[0204] The training module is used to train a preset initial dynamics model based on the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information corresponding to the first moment in each set of training data, the second sample longitudinal velocity and second sample yaw rate corresponding to the second moment, the second sample control command corresponding to the second moment, and the first sample acceleration corresponding to the second moment, to obtain the vehicle dynamics model.
[0205] Optionally, the vehicle dynamics model includes: an output network model and a state network model; the initial dynamics model includes: an initial output model and an initial state model; and the training module includes:
[0206] The fourth determination submodule is used to input the first sample longitudinal velocity, the first sample yaw rate, the first sample control command, and the first sample driving mode information from each set of training data into the initial state model to obtain the first predicted longitudinal velocity and the first predicted yaw rate corresponding to the second time moment.
[0207] The second training submodule is used to train the initial state model based on the first predicted longitudinal velocity, the first predicted yaw rate, the second sample longitudinal velocity, and the second sample yaw rate corresponding to the multiple sets of training data, so as to obtain the state network model.
[0208] The fifth determining submodule is used to input the first predicted longitudinal velocity, the first predicted yaw rate and the second sample control command corresponding to the second time moment into the initial output model to obtain the first predicted acceleration corresponding to the second time moment;
[0209] The first training submodule is used to train the initial output model based on the first predicted acceleration and the first sample acceleration corresponding to each of the multiple sets of training data, so as to obtain the output network model.
[0210] Optionally, the first training submodule includes:
[0211] The first calculation unit is used to calculate the first model loss value corresponding to the initial output model based on the first predicted acceleration and the first sample acceleration corresponding to each group of training data in multiple groups of training data, using a loss function.
[0212] The judgment unit is used to determine whether the first model loss value meets the preset first training condition. If yes, the initial output model is used as the output network model; if no, the initial output model is trained until the first model loss value corresponding to the initial output model meets the first training condition, and the initial output model that meets the first training condition is used as the output network model.
[0213] Optionally, the state network model includes a first sub-model, a second sub-model, and a third sub-model, the initial state model includes: a first state model and a second state model, and the second training sub-module includes:
[0214] The first filtering unit is used to filter the longitudinal velocity of the second sample corresponding to multiple sets of training data to obtain the filtered longitudinal velocity of the second sample.
[0215] The second calculation unit is used to calculate the second model loss value corresponding to the first state model based on the first predicted longitudinal velocity, the first predicted yaw rate, the filtered second sample longitudinal velocity and the second sample yaw rate corresponding to the multiple sets of training data, using a loss function. The first predicted longitudinal velocity is the velocity corresponding to the filtered second sample longitudinal velocity.
[0216] The second judgment unit is used to determine whether the second model loss value meets the preset second training condition. If yes, the first state model is used as the first sub-model; if no, the first state model is trained until the second model loss value corresponding to the first state model meets the second training condition, and the first state model that meets the second training condition is used as the first sub-model.
[0217] A combination unit is used to obtain the state network model based on the first sub-model and the second state model, wherein the second state model is used for integration processing.
[0218] In this embodiment of the application, by inputting the vehicle's current longitudinal velocity, first yaw rate, first control command, and first driving mode information into a preset vehicle dynamics model, the vehicle's acceleration at the current moment and in the future moment is predicted. This realizes the prediction of acceleration at the current moment and in the future moment based on the preset vehicle dynamics model, thereby improving the efficiency of vehicle state prediction.
[0219] It should be noted that the vehicle state prediction device for intelligent parking provided in the above embodiments is only illustrated by the division of the above functional modules when performing acceleration prediction. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the vehicle state prediction device for intelligent parking provided in the above embodiments and the vehicle state prediction method embodiments for intelligent parking belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0220] This application also provides a non-transitory computer-readable storage medium applied to a computer device. The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the operations performed by the computer device in the vehicle state prediction method for intelligent parking described above.
[0221] This application also provides a computer program product or computer program, which includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the vehicle state prediction method for intelligent parking provided in the above aspects or various optional implementations of the above aspects.
[0222] This application also provides a computer device, which includes a processor and a memory. The memory is used to store at least one piece of program code, which is loaded and executed by the processor to implement the vehicle state prediction method for intelligent parking in this application.
[0223] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program or program code related to hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0224] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A vehicle state prediction method for intelligent parking, characterized by, The method comprises: obtaining a first longitudinal speed, a first yaw rate, a first control instruction and a first driving mode information of a vehicle corresponding to a current time, the first longitudinal speed being a driving speed in a vehicle head direction; inputting the first longitudinal speed, the first yaw rate, the first control instruction and the first driving mode information into a vehicle dynamics model to predict an acceleration of the vehicle at the current time and a future time.
2. The method of claim 1, wherein, The vehicle dynamics model comprises a state network model and an output network model, and the inputting the first longitudinal speed, the first yaw rate, the first control instruction and the first driving mode information into the vehicle dynamics model to predict the acceleration of the vehicle at the current time and the future time comprises: inputting the first longitudinal speed, the first yaw rate and the first control instruction into the output network model to obtain a first acceleration corresponding to the current time; inputting the first longitudinal speed, the first yaw rate, the first control instruction and the first driving mode information into the state network model to obtain a second longitudinal speed and a second yaw rate corresponding to a next time; obtaining a second control instruction corresponding to the next time; inputting the second longitudinal speed, the second yaw rate and the second control instruction into the output network model to obtain a second acceleration corresponding to the next time.
3. The method of claim 2, wherein, The state network model comprises a first sub-model, a second sub-model and a third sub-model, and the inputting the first longitudinal speed, the first yaw rate, the first control instruction and the first driving mode information into the state network model to obtain the second longitudinal speed and the second yaw rate corresponding to the next time comprises: inputting the first longitudinal speed, the first yaw rate, the first control instruction and the first driving mode information into the first sub-model to obtain a time derivative of the first longitudinal speed and a first yaw angular acceleration; inputting the time derivative of the first longitudinal speed and the first yaw angular acceleration into the second sub-model respectively to obtain a third longitudinal speed and a third yaw rate corresponding to the next time, the second sub-model being used for integral processing; inputting the third longitudinal speed, the third yaw rate, a current gear corresponding to the first driving mode information and the first control instruction into the third sub-model to obtain the second longitudinal speed and the second yaw rate.
4. The method of claim 3, wherein, The inputting the third longitudinal speed, the third yaw rate, the current gear corresponding to the first driving mode information and the first control instruction into the third sub-model to obtain the second longitudinal speed and the second yaw rate comprises: limiting the third longitudinal speed in a longitudinal speed range corresponding to the current gear by using the third sub-model to obtain the second longitudinal speed; determining a target yaw rate according to the second longitudinal speed and the first control instruction; and determining a target yaw rate according to the second longitudinal speed and the first control instruction. The third yaw rate is adjusted according to the target yaw rate, to obtain the second yaw rate.
5. The method of claim 1, wherein, The training process of the vehicle dynamics model comprises: a plurality of groups of training data are acquired, each group of training data comprising: a first sample longitudinal speed, a first sample yaw rate, a first sample control instruction and first sample driving mode information corresponding to a first time, a second sample longitudinal speed and a second sample yaw rate corresponding to a second time, a second sample control instruction corresponding to the second time and a first sample acceleration corresponding to the second time, the second time being a next time of the first time; the initial dynamics model is trained based on the first sample longitudinal speed, the first sample yaw rate, the first sample control instruction and the first sample driving mode information corresponding to the first time, the second sample longitudinal speed and the second sample yaw rate corresponding to the second time, the second sample control instruction corresponding to the second time and the first sample acceleration corresponding to the second time in each group of training data, to obtain the vehicle dynamics model.
6. The method of claim 5, wherein, The vehicle dynamics model comprises an output network model and a state network model, the initial dynamics model comprises an initial output model and an initial state model, and the training of the initial dynamics model based on the first sample longitudinal speed, the first sample yaw rate, the first sample control instruction and the first sample driving mode information corresponding to the first time, the second sample longitudinal speed and the second sample yaw rate corresponding to the second time, the second sample control instruction corresponding to the second time and the first sample acceleration corresponding to the second time in each group of training data comprises: the first sample longitudinal speed, the first sample yaw rate, the first sample control instruction and the first sample driving mode information in each group of training data are input into the initial state model, to obtain a first predicted longitudinal speed and a first predicted yaw rate corresponding to the second time; the initial state model is trained based on the first predicted longitudinal speed, the first predicted yaw rate, the second sample longitudinal speed and the second sample yaw rate corresponding to the plurality of groups of training data, to obtain the state network model; the first predicted longitudinal speed, the first predicted yaw rate and the second sample control instruction corresponding to the second time are input into the initial output model, to obtain a first predicted acceleration corresponding to the second time; the initial output model is trained based on the first predicted acceleration and the first sample acceleration corresponding to each group of training data in the plurality of groups of training data, to obtain the output network model.
7. The method of claim 6, wherein, the initial output model is trained based on the first predicted acceleration and the first sample acceleration corresponding to each group of training data in the plurality of groups of training data, to obtain the output network model, and the training comprises: The first model loss value corresponding to the initial output model is calculated by using a loss function based on the first predicted acceleration and the first sample acceleration corresponding to each of the plurality of sets of training data; It is determined whether the first model loss value meets a preset first training condition. If yes, the initial output model is taken as the output network model. If no, the initial output model is continuously trained until the first model loss value corresponding to the initial output model meets the first training condition, and the initial output model meeting the first training condition is taken as the output network model.
8. The method of claim 6, wherein, The state network model comprises a first sub-model, a second sub-model and a third sub-model, and the initial state model comprises a first state model and a second state model. The initial state model is trained based on the first predicted longitudinal velocity, the first predicted yaw rate, the second sample longitudinal velocity and the second sample yaw rate corresponding to the plurality of sets of training data to obtain the state network model, comprising: The second sample longitudinal velocities corresponding to the plurality of sets of training data are screened to obtain screened second sample longitudinal velocities; A second model loss value corresponding to the first state model is calculated by using a loss function based on the first predicted longitudinal velocity, the first predicted yaw rate, the screened second sample longitudinal velocity and the second sample yaw rate corresponding to the plurality of sets of training data, the first predicted longitudinal velocity being a velocity corresponding to the screened second sample longitudinal velocity; It is determined whether the second model loss value meets a preset second training condition. If yes, the first state model is taken as the first sub-model. If no, the first state model is continuously trained until the second model loss value corresponding to the first state model meets the second training condition, and the first state model meeting the second training condition is taken as the first sub-model. The state network model is obtained based on the first sub-model and the second state model, and the second state model is used for integral processing.
9. The method of claim 1, wherein, The first control instruction comprises at least one of a throttle opening degree instruction, a deceleration control instruction and a steering wheel angle control instruction.
10. A vehicle state prediction device for intelligent parking, characterized by, The device comprises: A first acquisition module is configured to acquire a first longitudinal velocity, a first yaw rate, a first control instruction and first driving mode information of a vehicle corresponding to a current time, the first longitudinal velocity being a driving speed in a vehicle head direction; A prediction module is configured to input the first longitudinal velocity, the first yaw rate, the first control instruction and the first driving mode information into a vehicle dynamics model to predict an acceleration of the vehicle at the current time and future times.
11. A non-transitory computer-readable storage medium, comprising: The storage medium is configured to store at least one piece of program code for performing the intelligent parking-oriented vehicle state prediction method according to any one of claims 1 to 9.
12. A computer device, comprising: The smart parking oriented vehicle state prediction method comprises a processor and a memory, the memory is used for storing at least one piece of program code, the at least one piece of program code is loaded and executed by the processor to realize the smart parking oriented vehicle state prediction method as claimed in any one of claims 1-9.
Citation Information
Patent Citations
Vehicle speed prediction method and device and electronic equipment
CN115545218A
Transverse and longitudinal control signal prediction method and device of vehicle, vehicle and storage medium
CN116476850A
Vehicle state prediction method and device, computer equipment and storage medium
CN117842062A
Vehicle state prediction method and device for intelligent parking and storage medium
CN118457629A
Vehicle behavior prediction method and vehicle behavior prediction device
JP2020026188A
Cited By
Wind turbine generator tower tube marine transportation tool monitoring method and system
CN121933078A