Vehicle state prediction method and device for intelligent parking and storage medium
Patent Information
- Application Number
- CN202410690687.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2044-05-30
AI Technical Summary
[0004]上述方法需要通过复杂的车辆参数和控制系统原理来构建模型,构建的模型难以准确反映复杂情况的车辆动力学特性,从而导致对车辆状态预测的准确性较低
[0072] The beneficial effects of the technical solutions provided in this application include at least the following:
Smart Images

Figure CN118457629B_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] With the rapid development of autonomous driving technology, autonomous vehicles have been widely used, and motion control is one of the key aspects of autonomous driving.
[0003] Currently, most vehicle motion control is based on vehicle dynamics modeling, which is achieved through physical modeling methods.
[0004] The above methods require the construction of models based on complex vehicle parameters and control system principles. The constructed models are difficult to accurately reflect the vehicle dynamics characteristics under complex conditions, resulting in low accuracy in predicting vehicle states. Summary of the Invention
[0005] This application provides a vehicle state prediction method, apparatus, and storage medium for intelligent parking, which can improve the accuracy of vehicle state prediction. The technical solution is as follows:
[0006] On the one hand, a vehicle state prediction method for intelligent parking is provided, the method comprising:
[0007] The vehicle's first longitudinal velocity, first yaw rate, and first control command are obtained at the current moment, where the first longitudinal velocity is the vehicle's speed in the direction of the vehicle's front.
[0008] The first longitudinal velocity, the first yaw rate, and the first control command are input into a preset vehicle dynamics model to predict the vehicle's acceleration at the current moment and in the future.
[0009] 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:
[0010] 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;
[0011] 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.
[0012] Obtain the second control command corresponding to the next moment;
[0013] 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.
[0014] 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:
[0015] 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.
[0016] 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.
[0017] 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.
[0018] 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:
[0019] 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;
[0020] The target yaw rate is determined based on the second longitudinal velocity and the first control command;
[0021] Based on the target yaw rate, the third yaw rate is adjusted to obtain the second yaw rate.
[0022] Optionally, the training process of the vehicle dynamics model includes:
[0023] 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.
[0024] 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.
[0025] Optionally, the vehicle dynamics model includes: an output network model and a state network model, the state network model including a first sub-model, a second sub-model, and a third sub-model, and the initial dynamics model including: 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, the first sample yaw rate, the first sample control command, and the first sample driving mode information corresponding to the first time step in each set of training data, the second sample longitudinal velocity and the 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:
[0026] Based on the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information in each set of training data, the first predicted longitudinal velocity and first predicted yaw rate corresponding to the second time moment are input into the initial state model to obtain the first predicted longitudinal velocity and first predicted yaw rate.
[0027] 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.
[0028] 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;
[0029] 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.
[0030] 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:
[0031] 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.
[0032] 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.
[0033] Optionally, 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:
[0034] 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.
[0035] 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.
[0036] 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.
[0037] 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.
[0038] On the other hand, a vehicle state prediction device for intelligent parking is provided, the device comprising:
[0039] 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 speed of travel in the direction in which the vehicle is facing.
[0040] 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.
[0041] Optionally, the vehicle dynamics model includes: a state network model and an output network model, and the prediction module includes:
[0042] 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;
[0043] 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.
[0044] The first acquisition submodule is used to acquire the second control command corresponding to the next moment;
[0045] 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.
[0046] 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:
[0047] The first determining unit is used to input the first longitudinal velocity, the first yaw rate and the first control command into the first sub-model to obtain the time derivative of the first longitudinal velocity and the first yaw rate acceleration.
[0048] 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.
[0049] 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.
[0050] Optionally, the third determining unit is used for:
[0051] 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;
[0052] The target yaw rate is determined based on the second longitudinal velocity and the first control command;
[0053] Based on the target yaw rate, the third yaw rate is adjusted to obtain the second yaw rate.
[0054] Optionally, the device further includes:
[0055] 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.
[0056] 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.
[0057] Optionally, the vehicle dynamics model includes: an output network model and a state network model, the state network model including a first sub-model, a second sub-model, and a third sub-model; the initial dynamics model includes: an initial output model and an initial state model; and the training module includes:
[0058] 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.
[0059] 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.
[0060] 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;
[0061] 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.
[0062] Optionally, the first training submodule includes:
[0063] 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.
[0064] 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.
[0065] Optionally, the initial state model includes: a first state model and a second state model, and the second training submodule includes:
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] The beneficial effects of the technical solutions provided in this application include at least the following:
[0073] 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.
[0074] In this embodiment, the vehicle dynamics model can dynamically adjust its processing logic based on the current gear and other driving modes in the driving mode information, thereby accurately reflecting the vehicle's dynamic behavior under different modes. In this way, the vehicle dynamics model can not only adapt to normal driving conditions but also accurately handle gear changes frequently encountered in intelligent parking systems, enhancing the adaptability and accuracy of the vehicle dynamics model.
[0075] In this embodiment, 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. The longitudinal speed and yaw rate are corrected by the third sub-model, thus avoiding the unrealistic state of non-zero vehicle speed or non-zero yaw rate in the parking gear during the parking process.
[0076] In this embodiment, during the training of the first state model to obtain the first sub-model, the acquired second sample longitudinal velocity needs to be filtered to obtain the filtered second sample longitudinal velocity. Then, the filtered second sample longitudinal velocity is used to obtain the corresponding first predicted longitudinal velocity. In this way, when the sample longitudinal velocity measured by the wheel speed sensor is 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 velocity and the corresponding first predicted longitudinal velocity. This allows the second sample longitudinal velocity during the creep process, which cannot be accurately captured due to sensor limitations, to be excluded during the training process. This avoids the problems of gradient vanishing or model divergence during the training process, ensuring that the model can provide more accurate dynamic output in practical applications. Attached Figure Description
[0077] 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.
[0078] Figure 1 This is a flowchart of a vehicle state prediction method for intelligent parking provided according to an embodiment of this application;
[0079] Figure 2 This is a flowchart of another vehicle state prediction method for intelligent parking provided according to an embodiment of this application;
[0080] Figure 3 This is a flowchart of a vehicle dynamics model training process provided according to an embodiment of this application;
[0081] Figure 4 This is a flowchart of another vehicle dynamics model training process provided according to an embodiment of this application;
[0082] Figure 5 This is a flowchart of the steps for obtaining a state network model according to an embodiment of this application;
[0083] Figure 6 This is a flowchart of the steps for obtaining the output network model according to the embodiments of this application;
[0084] Figure 7 This is a schematic diagram of a vehicle dynamics model provided according to an embodiment of this application;
[0085] Figure 8This is a schematic diagram of a vehicle state prediction device for intelligent parking provided according to an embodiment of this application. Detailed Implementation
[0086] 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.
[0087] 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.
[0088] This application focuses on intelligent parking, an application scenario characterized by fuzzy boundaries arising from a combination of kinematics and dynamics. For such scenarios, kinematics is needed to constrain the intelligent parking process, ensuring the outcome remains within a kinematically controllable range. Based on this intelligent parking application scenario, this application provides a vehicle state prediction method for intelligent parking. Figure 1 This is a flowchart of a vehicle state prediction method for intelligent parking provided in an embodiment of this application. This method is applied to an intelligent parking system, such as... Figure 1 As shown, the vehicle state prediction method includes the following steps:
[0089] 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.
[0090] 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.
[0091] 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.
[0092] Figure 2 This 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, such as... Figure 2As shown, the vehicle state prediction method includes the following steps:
[0093] 201. Obtain the vehicle's first longitudinal velocity, first yaw rate, first control command, and first driving mode information at the current moment.
[0094] 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. The first yaw rate is the angular velocity of the vehicle body when rotating around its vertical axis, and 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. It 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 gear information can include: Park, Reverse, Neutral, Drive, and Low gear.
[0095] 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 the following: 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 torque of the steering motor.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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 of the MLP model are a first longitudinal velocity, a first yaw rate, and a first control command, and the output is a first acceleration, thereby reflecting the relationship between the input and output through the MLP model. The MLP model includes an input layer, a hidden layer, 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 the number of neurons in the MLP model are 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.
[0101] 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.
[0102] 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.
[0103] 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 input, 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.
[0104] In the embodiments of this application, the state network model includes a first sub-model, a second sub-model, and a third sub-model. The first sub-model includes an embedding layer network and a feedforward network. The embedding layer network is used to convert 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.
[0105] It's important to note that the driving modes during intelligent parking differ significantly from those during driving. Therefore, it's necessary to consider gear position information and mode type within each driving mode. This necessitates 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 not only adapts to regular driving conditions but also accurately handles the frequent gear changes encountered in intelligent parking systems, enhancing the adaptability and accuracy of the vehicle dynamics model.
[0106] In the embodiments of this application, the feedforward network can be an MLP (Multi-Layer Perceptron) model. The input of the MLP model is a first longitudinal velocity, a first yaw rate, a first control command, and a first driving mode vector. The output is the time derivative of the first longitudinal velocity and the first yaw acceleration. Thus, the MLP reflects the relationship between the input and output. For example, 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 to obtain a 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 the actual situation. For example, the MLP model can use three hidden layers, each containing 64 neurons. The activation function of the MLP model is responsible for converting the input of the neurons and generating the output signal. 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 the ReLU function, sigmoid function, and tanh function. The second sub-model is used to integrate the time derivative of the first longitudinal velocity and the first yaw angular acceleration, respectively, and uses the first longitudinal velocity and the first yaw angular velocity to determine the third longitudinal velocity and the third yaw angular velocity. The third sub-model is used to correct the third longitudinal velocity and the third yaw angular velocity, thereby enabling the prediction of the second longitudinal velocity and the second yaw angular velocity at the next moment through 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, which is used to perform integral processing, thereby using the integral model to integrate the time derivative of the first longitudinal velocity and the first yaw acceleration respectively 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.
[0112] It should be noted that the driving process is more dynamic, while the kinematic characteristics may be weaker. In the intelligent parking process, the kinematic characteristics are more obvious. Based on this feature of parking, the kinematic characteristics are restricted through a third sub-model. The specific restriction process 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.
[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]
[0119] 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.
[0120] In embodiments of this application, adjusting the third yaw rate according to the target yaw rate to obtain the second yaw rate includes:
[0121] 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.
[0122] 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.
[0123] 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.
[0124] In this embodiment of the application, the second yaw rate is the yaw rate closest to the target angular velocity range from the third yaw rate. For example, the second yaw rate can be the maximum value or the minimum value of the target angular velocity range, and can be selected according to the actual situation.
[0125] 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.
[0126] 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 the driving process in parking gear.
[0127] 204. Obtain the second control command corresponding to the next moment.
[0128] 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.
[0129] 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.
[0130] 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.
[0131] 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 vehicle's acceleration at the current and future times is predicted. Furthermore, 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 time moment are obtained. This allows for the prediction of the longitudinal velocity and yaw rate at future times. As a result, the vehicle can predict the acceleration at the current and future times, as well as the longitudinal velocity and yaw rate at future times, based on the vehicle dynamics model, thereby improving the accuracy of vehicle state prediction during parking.
[0132] Furthermore, when predicting the vehicle's acceleration at the current moment and in the future using a vehicle dynamics model, the vehicle's acceleration can be predicted by combining the first control command formed by the current environmental perception data to control the vehicle's behavior. This can capture complex dynamics and unconsidered factors, such as terrain gradient, wind resistance, and tire characteristics, thereby enabling the vehicle to adapt to constantly changing driving environments and operating conditions.
[0133] 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 to the state network and the output-output network are both denormalized real data.
[0134] 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 improves the accuracy of vehicle state prediction by obtaining the vehicle's dynamic behavior under different driving modes based on the driving mode information. Furthermore, the vehicle dynamics model includes a state network model and an output network model. The state network model includes a limiter, thereby enabling the use of the state network model and the output network model, as well as integrated kinematic principle-based limiter and embedding layer technology, to ensure the accuracy and stability of the vehicle dynamics model under complex driving modes.
[0135] It should be noted that steps 201-205 introduced 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 following will illustrate this process. Figure 3 Steps 301-302 describe the training process of the preset vehicle dynamics model, which can be trained before use.
[0136] 301. Obtain multiple sets of training data.
[0137] 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.
[0138] 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.
[0139] 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 at the vehicle's center of gravity in the direction perpendicular to the vehicle's direction of travel, and the sample longitudinal acceleration represents the acceleration at 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.
[0140] 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.
[0141] 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.
[0142] 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.
[0143] 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.
[0144] In the embodiments of this application, such as Figure 4 As shown, the steps to obtain the vehicle dynamics model include steps 3021-3024, and the specific steps are as follows:
[0145] 3021. Based on the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information in each set of training data, input into the initial state model to obtain the first predicted longitudinal velocity and first predicted yaw rate corresponding to the second time step.
[0146] In some embodiments of this application, obtaining the first predicted longitudinal velocity and the first predicted yaw rate corresponding to the second moment includes:
[0147] 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 moment. The time derivative of the first sample longitudinal velocity and the first predicted yaw rate acceleration are then input into the second state model to obtain the first predicted longitudinal velocity and the first predicted yaw rate acceleration at the second moment.
[0148] 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:
[0149] 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.
[0150] 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.
[0151] 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.
[0152] 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.
[0153] It should be noted that during the training of the first-state model, the first predicted longitudinal velocity and the first predicted yaw rate are calculated by the first sub-model. In this process, the third sub-model within the first sub-model does not participate in the calculation. Therefore, the training of the first-state model does not involve the correction process for the first predicted longitudinal velocity and the first predicted yaw rate; the correction process for the first predicted longitudinal velocity and the first predicted yaw rate only occurs during the vehicle state prediction phase. Thus, the third sub-model does not participate in the training process.
[0154] In the embodiments of this application, such as Figure 5 As shown, the steps to obtain the state network model include steps 30221-30226, as follows:
[0155] 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.
[0156] In this embodiment of the application, 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 the longitudinal velocities of the inaccurate low-speed segments. For example, the longitudinal velocities of the inaccurate low-speed segments can be longitudinal velocities less than a preset value, longitudinal velocities whose velocity changes more than a preset threshold within a preset time period, or multiple longitudinal velocities before the longitudinal velocities whose velocity changes more than a preset threshold within a preset time period.
[0157] 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.
[0158] Wherein, the first predicted longitudinal velocity is the velocity corresponding to the longitudinal velocity of the second sample after screening.
[0159] It should be noted that during the training of the first sub-model from the first-state 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 these filtered second-sample longitudinal velocities. In this way, when the longitudinal velocities measured by the wheel speed sensor are inaccurate under extremely low-speed parking and 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 training process to exclude second-sample longitudinal velocities during the creep process that cannot be accurately captured due to sensor limitations, thereby avoiding gradient vanishing or model divergence problems during training and ensuring that the model provides more accurate dynamic output in practical applications.
[0160] In the embodiments of this application, the loss function can be a mean squared error function or a mean absolute error function. The loss function can be used to determine the loss value between the longitudinal velocity of the second sample after screening and the corresponding first predicted longitudinal velocity, as well as the average value 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. The average value of the expected value or absolute error is used as the second model loss value corresponding to the first state model.
[0161] 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.
[0162] In the embodiments of this application, the second training condition is whether the loss value of the second model is not greater than the second target threshold. If the loss value of the first model is greater than the second target threshold, it is determined that the preset second training condition is not met; if the loss value of the second model is not greater than the second target threshold, it is determined that the preset second training condition is met.
[0163] 30224. Use the first state model as the first sub-model.
[0164] 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.
[0165] 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.
[0166] 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 by the second model loss value.
[0167] 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.
[0168] 30226. The state network model is obtained based on the first sub-model and the second state model.
[0169] In this embodiment of the application, 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. The second state model is used for integration processing and is used to perform integration processing on the input data. The second state model is the same as the second sub-model described above.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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, that is, 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 model structure and model parameters of the current initial network model.
[0174] In the embodiments of this application, such as Figure 6 As shown, the steps to obtain the output network model include steps 30241-30244, as follows:
[0175] 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.
[0176] In the embodiments of this application, the loss function can be a mean squared error function or a mean absolute error function. The loss function can be used to determine the expected value or the average value of the absolute error between the first predicted acceleration and the first sample acceleration corresponding to multiple sets of training data, so that the expected value or the average value of the absolute error is used as the first model loss value corresponding to the initial output model.
[0177] 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.
[0178] In the embodiments of this application, the first training condition is whether 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.
[0179] 30243. Use the initial output model as the output network model.
[0180] 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.
[0181] 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.
[0182] 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; it can be an adaptive learning optimizer based on gradient descent.
[0183] 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.
[0184] 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, 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, a preset initial dynamics model is trained to obtain a vehicle dynamics model. This allows the trained vehicle dynamics model to predict the vehicle's dynamic behavior under different driving modes based on the driving mode information, thus 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 the state network model, the output network model, and embedding layer technology to ensure the accuracy and stability of the vehicle dynamics model under complex driving modes.
[0185] The following is a specific example illustrating the vehicle state prediction process for intelligent parking:
[0186] like Figure 7The diagram illustrates the structure 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 comprises an embedding layer network and a feedforward network. 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. First driving mode information is input into the embedding layer network to obtain a driving mode vector. This driving mode vector is then added to a vector composed of the first longitudinal velocity, first yaw rate, and first control command at the current moment to obtain a target vector, which is then input into the feedforward network to obtain... The time derivative of the longitudinal velocity and the lateral angular acceleration at the current moment are input into the second sub-model to obtain the third longitudinal velocity and the third lateral angular velocity at the next moment. The third longitudinal velocity, the 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 the second yaw rate at the next moment. Through looping, the second longitudinal velocity and the second lateral angular velocity at the next moment replace the first longitudinal velocity and the 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 executed cyclically.
[0187] Figure 8 This 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, see [link to relevant documentation]. Figure 8 The device includes a first acquisition module 801 and a prediction module 802.
[0188] 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 speed of travel in the direction in which the vehicle is facing.
[0189] 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.
[0190] Optionally, the vehicle dynamics model includes: a state network model and an output network model, and the prediction module includes:
[0191] 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;
[0192] 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.
[0193] The first acquisition submodule is used to acquire the second control command corresponding to the next moment;
[0194] 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.
[0195] 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:
[0196] The first determining unit is used to input the first longitudinal velocity, the first yaw rate and the first control command into the first sub-model to obtain the time derivative of the first longitudinal velocity and the first yaw rate acceleration.
[0197] 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.
[0198] 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.
[0199] Optionally, the third determining unit is used for:
[0200] 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;
[0201] The target yaw rate is determined based on the second longitudinal velocity and the first control command;
[0202] Based on the target yaw rate, the third yaw rate is adjusted to obtain the second yaw rate.
[0203] Optionally, the device further includes:
[0204] 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.
[0205] 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.
[0206] Optionally, the vehicle dynamics model includes: an output network model and a state network model, the state network model including a first sub-model, a second sub-model, and a third sub-model; the initial dynamics model includes: an initial output model and an initial state model; and the training module includes:
[0207] 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.
[0208] 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.
[0209] 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;
[0210] 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.
[0211] Optionally, the first training submodule includes:
[0212] 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.
[0213] 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.
[0214] Optionally, the initial state model includes: a first state model and a second state model, and the second training submodule includes:
[0215] 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.
[0216] 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.
[0217] 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.
[0218] 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.
[0219] In this embodiment of the application, by inputting the vehicle's current longitudinal velocity, first yaw rate and first control command into a preset vehicle dynamics model, the vehicle's acceleration at the current moment and in the future moment is predicted. This allows the vehicle's acceleration at the current moment and in the future moment to be predicted based on the preset vehicle dynamics model, thereby improving the efficiency of vehicle state prediction.
[0220] 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.
[0221] 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.
[0222] 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.
[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 in that, The method includes: The vehicle acquires its 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. The first driving mode information includes the vehicle's gear information and mode type. The mode type includes energy-saving mode, sport mode, and standard mode. The vehicle's gear information includes parking gear, reverse gear, neutral gear, drive gear, and low gear. The first longitudinal velocity, the first yaw rate, the first control command, and the first driving mode information are input into the vehicle dynamics model to predict the vehicle's acceleration at the current moment and in the future. The vehicle dynamics model includes a state network model and an output 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: 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; 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. Obtain the second control command corresponding to the next moment; 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. 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: 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 rate acceleration. The first sub-model includes an embedding layer network, which is used to convert the first driving mode information into a driving mode vector. 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. 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: 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 velocity and the first control command; Based on the target yaw rate, the third yaw rate is adjusted to obtain the second yaw rate.
2. The method according to claim 1, characterized in that, The training process of the vehicle dynamics model includes: 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. 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.
3. The method according to claim 2, characterized in that, The vehicle dynamics model includes an output network model and a state network model. The state network model includes a first sub-model, a second sub-model, and a third sub-model. The initial dynamics model includes an initial output model and an initial state model. The vehicle dynamics model is obtained by training the 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. The initial dynamics model includes: Based on the first sample longitudinal velocity, first sample yaw rate, first sample control command and first sample driving mode information in each set of training data, the first predicted longitudinal velocity and first predicted yaw rate corresponding to the second time moment are input into the initial state model to obtain the first predicted longitudinal velocity and first predicted yaw rate. 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. 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; 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.
4. The method according to claim 3, characterized in that, The step of 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: 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. 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.
5. The method according to claim 3, characterized in that, 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: 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. 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. 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. 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.
6. A vehicle state prediction device for intelligent parking, characterized in that, The device includes: 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. The first longitudinal speed is the speed of travel in the direction the vehicle is facing. The first driving mode information includes the vehicle's gear information and mode type. The mode type includes: energy-saving mode, sport mode, and standard mode. The vehicle's gear information includes: parking gear, reverse gear, neutral gear, drive gear, and low gear. The prediction module is used to input the first longitudinal velocity, the first yaw rate and the first control command into a preset vehicle dynamics model to predict the acceleration of the vehicle at the current moment and in the future. The vehicle dynamics model includes a state network model and an output network model, and the prediction module includes: 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; 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. The first acquisition submodule is used to acquire the second control command corresponding to the next moment; 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. The state network model includes a first sub-model, a second sub-model, and a third sub-model. The second determining sub-module includes: 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 rate acceleration. The first sub-model includes an embedding layer network, which is used to convert the first driving mode information into a driving mode vector. 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. The third determining unit is used to input the third longitudinal velocity, 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 velocity and the second yaw rate, including: 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 velocity and the first control command; The third yaw rate is adjusted based on the target yaw rate to obtain the second yaw rate.
7. A non-transitory computer-readable storage medium, characterized in that, The storage medium is used to store at least one piece of program code, which is used to execute the vehicle state prediction method for intelligent parking as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Vehicle speed multi-time scale prediction method, system and device, medium and terminal
CN117056765A
Control method and system for shock absorber sealing system
CN117841590A
Vehicle state prediction method and device, computer equipment and storage medium
CN117842062A