Nonlinear state space model training method and driving system observed quantity prediction method
By using encoder and state network to predict the state quantity and observation measurement of the driving system, the loss function is constructed to update the model parameters, which solves the problem of rigid mapping of nonlinear state space models in information reduction, and improves the accuracy and numericality of the model stability.
Patent Information
- Application Number
- CN202411498337.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
AI Technical Summary
The nonlinear state space model has rigid mapping problems when information dimensionality reduction is reduced, which affects the accuracy and stability of subsequent controller design.
By obtaining the information time series of the driving system, using the encoder and state network to predict the state quantity and observation measurement, the loss function is constructed to update the model parameters, and a nonlinear state space model is obtained.
The rigid mapping problem of nonlinear state space models in information reduction is solved, and the accuracy and numerical stability of the model are improved.
Smart Images

Figure CN119395992A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning technology, and more specifically, to a nonlinear state space model training method and a driving system observation prediction method. Background Art
[0002] In recent years, nonlinear system identification has gradually become a research hotspot in the field of control. This is due to the great progress of machine learning methods in nonlinear function regression. The state space model is the basis of most modern control design technologies, such as nonlinear control, model predictive control (MPC), extended Kalman filter (EKF), etc. In the field of nonlinear system identification, the identification of nonlinear state space models has a rigid mapping when performing information dimensionality reduction, which will affect the subsequent controller design. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a nonlinear state space model training method and a driving system observation quantity prediction method to solve the technical problem of rigid mapping of nonlinear state space models during information dimensionality reduction.
[0004] A first aspect of an embodiment of the present application provides a nonlinear state space model training method, the method comprising:
[0005] Acquire information time series of the driving system at multiple moments; the information time series includes a control input time series determined based on historical driving behavior and a real observation time series;
[0006] The encoding network in the encoder is used to map the information time series at time k-1 to the first state quantity at time k, and to map the information time series at time k to the second state quantity at time k+1;
[0007] Using a state network to predict a third state quantity at time k+1 based on the first state quantity at time k and the control input quantity at time k; the state network is used to characterize the state quantity evolution of the driving system;
[0008] Using a decoding network in the encoder to predict a first observation time series based on the first state quantity, and predicting a second observation time series based on the third state quantity;
[0009] A loss function is constructed based on the first observation time series, the second observation time series, the true observation time series, the second state quantity, and the third state quantity, and the model parameters of the encoder and the state network are updated based on the loss function to obtain a nonlinear state space model including a trained decoding network and a state network.
[0010] In the above implementation process, the encoder is given the ability to capture the temporal relationship between the input information time series and the output observation time series during the model training process, thereby solving the problem of rigid mapping of nonlinear state space models in related technologies during information dimensionality reduction, which helps to improve the accuracy and numerical stability of nonlinear state space models.
[0011] Furthermore, the encoder includes a first encoder and a second encoder; the use of the encoding network in the encoder to map the information time series at time k-1 to the first state quantity at time k, and to map the information time series at time k to the second state quantity at time k+1, includes:
[0012] Using the encoding network in the first encoder to map the information time series at time k-1 to the first state quantity at time k; using the encoding network in the second encoder to map the information time series at time k to the second state quantity at time k+1;
[0013] The method further comprises:
[0014] The state network to be trained is constructed based on the first state quantity at the k moment, the second state quantity at the k+1 moment, and the control input quantity at the k moment.
[0015] In the above implementation process, a method for constructing a state network is provided, and the constructed state network is used as a network to be trained by the training method of any of the above embodiments.
[0016] Furthermore, the method further comprises:
[0017] Predicting a third observation time series based on the second state quantity using a decoding network in the second encoder;
[0018] The loss function includes the first observation time series, a first loss term between the third observation time series and the true observation time series, a second loss term between the second state quantity and the third state quantity, and a third loss term between the second observation time series and the true observation time series.
[0019] In the above implementation process, based on the provided loss function, it is possible to prevent the error of the state network from being amplified by the decoding network. Based on the loss function, the decoder and the state network are jointly trained to obtain a nonlinear state space model.
[0020] A second aspect of an embodiment of the present application provides a method for predicting a driving system observation amount, the method comprising:
[0021] Acquire a trained nonlinear state space model, wherein the nonlinear state space model includes a state network and a decoding network;
[0022] Acquiring a control input quantity of the driving system at a current moment and a historical state quantity of the driving system; the control input quantity is related to the driving behavior of the driver;
[0023] Predicting the state quantity of the driving system at the current moment based on the control input quantity and the historical state quantity using the trained state network;
[0024] The trained decoding network is used to predict the observation quantity at the current moment based on the state quantity at the current moment; the observation quantity is used to characterize the driving parameters of the vehicle.
[0025] In the above implementation process, the trained nonlinear state space model is applied to the nonlinear control problem in vehicle driving, and the model is used to predict the dynamic behavior of the driving system, so that the control strategy of vehicle driving can be adjusted in real time through online optimization, thereby ensuring that the driving system operates in the optimal state.
[0026] Furthermore, the decoding network and the state network both include an input layer, an output layer and two hidden layers, and use a rectified linear unit (ReLU) function as an activation function.
[0027] In the above implementation process, a model structure of an encoding network, a decoding network and a state network is provided. An initial network can be built based on the model structure, and the model parameters can be updated by the training method provided in any of the above embodiments.
[0028] Further, the control input comprises a longitudinal control input in the driving direction, and the observation comprises a longitudinal observation in the driving direction; and / or
[0029] The control input comprises a lateral control input perpendicular to the driving direction; and the observation comprises a lateral observation perpendicular to the driving direction.
[0030] Further, the longitudinal control input comprises the accelerator pedal position and / or brake pedal force; the longitudinal observable comprises vehicle acceleration and / or speed;
[0031] The lateral control input comprises a steering wheel angle and / or a steering wheel torque; the lateral observation comprises a vehicle yaw angle and / or a steering wheel speed.
[0032] According to a third aspect of the present application, an electronic device is provided, the electronic device comprising:
[0033] processor;
[0034] a memory for storing processor-executable instructions;
[0035] Wherein, when the processor calls the executable instruction, it implements the operation of any method described in the first aspect or the second aspect.
[0036] A fourth aspect of an embodiment of the present application provides a vehicle, comprising the electronic device as described in the third aspect.
[0037] A fifth aspect of an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspect or the second aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flowchart of a nonlinear state space model training method provided in an embodiment of the present application;
[0040] Figure 2 A flowchart of another nonlinear state space model training method provided in an embodiment of the present application;
[0041] Figure 3 A flowchart of a method for predicting driving system observation quantities provided in an embodiment of the present application;
[0042] Figure 4 A hardware structure diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0044] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0045] Nonlinear system identification refers to determining a nonlinear data model that describes the behavior of a system based on the input and output data of the system. It predicts the future evolution of the system output by establishing a model that can mimic the behavior of the real system. Machine learning methods have achieved great success in extending classical linear techniques to nonlinear systems. For example, they are used to estimate neural autoregressive models with exogenous inputs, reproducing kernel Hilbert space (RKHS) models, and for piecewise radiometric regression, and also include the development of innovative methods based on long short-term memory (LSTM) neural networks.
[0046] The idea of applying machine learning methods to identify state-space representations of dynamic systems from input-output data has been widely explored. Learning a state-space model usually requires nonlinearly transforming a vector of past input-output samples into a state vector.
[0047] However, in related technologies, nonlinear state space models have the problem of rigid mapping when reducing information dimension, which will affect the subsequent controller design. In addition, the current requirement is that the system is linear in the learned latent state space, but this does not always apply to all practical systems. And the current methods that rely on variational inference require a specific structure to be imposed on the learned latent state space, such as Gaussian distribution, but this also does not always apply to all practical systems.
[0048] In order to solve at least some of the above-mentioned technical problems, the present application provides a nonlinear state space model training method and a driving system observation prediction method, which collects the information time series of the driving system at different times, and then uses an encoder with a prediction function to predict the first observation time series based on the information time series at the k-1 moment, thereby capturing the temporal relationship between the input information time series and the output observation time series.
[0049] The so-called rigid mapping refers to treating each input element in the input sequence as an independent individual and mapping each input element to an output element in the output sequence. When an input element changes, the corresponding output element changes, but other output elements do not change. Therefore, such a mapping is rigid and irregular, and also leads to low interpretability of the model.
[0050] However, in the embodiment of the present application, the encoder with prediction function no longer regards each element in the information time series as an independent individual and maps each element separately. Instead, the timing factors of each element in the information time series are considered, and the information time series is predicted as a whole. In this way, when an element in the information time series changes, the predicted observation time series will change as a whole. Therefore, such a mapping process is no longer rigid, and the interpretability of the model is improved.
[0051] At the same time, the embodiment of the present application respectively uses the encoder and the state network to predict the state quantity at time k+1 to obtain the second state quantity and the third state quantity, and uses the encoder to predict the second observation time series based on the third state quantity. Finally, a loss function is constructed based on the first observation time series, the second observation time series, the true observation time series, the second state quantity, and the third state quantity. The encoder and the state network are jointly trained based on the loss function to finally obtain a nonlinear state space model.
[0052] It can be seen that during the model training process, the encoder is given the ability to capture the temporal relationship between the input information time series and the output observation time series, which helps to improve the accuracy and numerical stability of the nonlinear state space model.
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] It should be understood that the vehicle described in the embodiments of the present application may be a pure electric vehicle, or a hybrid vehicle, a gas-electric hybrid vehicle, a fuel cell vehicle, or a vehicle of other energy types with a motor, and the embodiments of the present application are not limited thereto. The types of vehicles in the embodiments of the present application may include sedans, off-road vehicles, trucks, buses, etc., and the embodiments of the present application are not limited thereto. The vehicles in the embodiments of the present application may be vehicles with automatic intelligent driving, manned vehicles, or manned vehicles with assisted intelligent driving functions, and the embodiments of the present application are not limited thereto.
[0055] Combine the following Figure 1-Figure 4A nonlinear state space model training method and a method for predicting driving system observations provided in an embodiment of the present application are described. The nonlinear state space model is used to describe the behavior of a vehicle driving system. It is understandable that the behavior of the driving system is affected by the driver's driving behavior. However, the driver's operating behavior is not completely linear and has complex nonlinear characteristics. Therefore, using a nonlinear state space model to describe the behavior of the driving system can better identify the driver's behavior, thereby helping to understand and predict the driver's actions, and helping to design an assisted driving system or an automatic driving system so that the control mode of intelligent driving is adapted to the driver's behavior mode.
[0056] Specifically, the nonlinear state space model includes a state network and a prediction network. The state network is used to characterize the evolution of the state quantity in the driving system; the prediction network is used to describe the relationship between the state quantity and the output of the driving system, that is, to predict the output of the driving system based on the state quantity of the driving system. The training method can be executed by an electronic device that can support model training, such as a server that is connected to the vehicle for communication. If the vehicle's computing power is sufficient to support model training, the training method can also be executed by the vehicle. See Figure 1 , a nonlinear state space model training method includes: Figure 1 Steps 110 to 150 are shown.
[0057] Step 110: Acquire information time series of the driving system at multiple moments, wherein the information time series includes a control input time series determined based on historical driving behaviors and a real observation time series.
[0058] Exemplarily, when executing step 110, a plurality of historical control inputs may be first determined based on the historical driving behavior data of the driver within a period of historical time. The historical control input refers to the control input input by the driver to the driving system through historical driving behavior, and the control input will affect the state quantity and output observable quantity inside the driving system. For example, the historical control input may include but is not limited to the historical accelerator pedal position, the historical brake pedal force, the historical steering wheel angle, the historical steering wheel torque, and the like.
[0059] In response to the historical control input, the driving system will output the corresponding historical observation quantity. For example, the historical observation quantity may include but is not limited to the historical acceleration, historical speed, historical yaw angle (yaw), historical steering wheel speed, etc. of the vehicle.
[0060] It can be seen that under a series of time-continuous historical driving behaviors, multiple historical control inputs input by the driver to the driving system and multiple historical observations of the driving system response output can be obtained. There is a time series relationship between the multiple historical control inputs and the multiple historical observations. Then the multiple historical control inputs and the multiple historical observations can form a data sample set Z, which can be expressed as Z = {u0, y0,…, u N ,y N ,}. Where N is the number of samples, u k is the control input, y k is the observed quantity.
[0061] Then, the control input time series and the corresponding real observation time series at multiple moments can be obtained from the data sample set Z. These two sequences constitute the information time series of the driving system. For example, the information time series I at moment k is k It can be expressed as I k ={y k ,…,y k-a+1 ,u k ,…,u k-b+1}. That is, the information time series is the sequence composed of the elements in the data sample set.
[0062] Step 120: Use the encoding network in the encoder to map the information time series at time k-1 to the first state quantity at time k, and map the information time series at time k to the second state quantity at time k+1.
[0063] The encoder described in this embodiment is an encoder to be trained, including an encoding network and a decoding network. In step 120, the encoding network is used to convert the information time series I k-1 Mapped to the first state quantity x k , and the information time series I k Mapped to the second state x k+1 Among them, the first state quantity x k and the second state quantity x k+1 are vectors, representing the state of the driving system at time k and time k+1 respectively. Therefore, the encoding network is actually used to reduce the dimension of the information time series of the previous moment to a low-order feature vector at the current moment, thereby compressing the information and mapping it to a low-order feature vector, which is the state quantity of the driving system.
[0064] Step 130: using a state network to predict a third state quantity at time k+1 based on the first state quantity at time k and the control input quantity at time k. The state network is used to characterize the evolution of the state quantity of the driving system.
[0065] The state network described in this embodiment is a state network to be trained, which is used to characterize the evolution of state quantities in the driving system over time. Since the state of the driving system at the next moment will be affected by the state of the driving system at the current moment and the control input quantity, the state network predicts the state at the next moment based on the state and control input quantity at the current moment.
[0066] Specifically, in step 130, the state network is based on the first state quantity x k and the control input u at time k k Predict the third state quantity at time k+1 Among them, the control input u at time k is k It can be determined from the above multiple historical control input quantities. It can be seen that the second state quantity x in step 120 k+1 and the third state quantity in step 130 are all the state quantities of the driving system at time k+1, but the second state quantity x k+1 is obtained by the encoding network from the time series I k The third state quantity obtained by mapping The state network is based on the first state quantity x k With the control input u k Predicted.
[0067] Step 140: Utilize the decoding network in the encoder to predict the first observation time series based on the first state quantity, and predict the second observation time series based on the third state quantity.
[0068] In step 120, the first state quantity x is obtained. k , and in step 130, the third state quantity is predicted Then, in step 140, the decoding network can be used based on the first state quantity x k Forecasting a time series of first observations And using the decoding network based on the third state quantity Forecasting the Second Observation Time Series in,
[0069] It can be seen that the encoder described in this embodiment is an encoder with a prediction function, which is an improvement on the automatic encoder and gives the automatic encoder a prediction capability. k-1 Forecasting a time series of first observations This captures the temporal relationship between the input information time series and the output observation time series.
[0070] Step 150: Construct a loss function based on the first observation time series, the second observation time series, the true observation time series, the second state quantity, and the third state quantity, and update the model parameters of the encoder and the state network based on the loss function to obtain a nonlinear state space model including a trained decoding network and a state network.
[0071] The encoder and state network as a whole use the constructed loss function to update the model parameters until the preset training end conditions are met, such as model convergence, or the number of training times reaches a preset threshold. In this way, a trained encoder and state network can be obtained. Among them, the decoding network in the trained encoder can be used as a prediction network for the nonlinear state space model. In this way, a nonlinear state space model including the trained decoding network and state network is obtained.
[0072] It can be seen that this embodiment gives the encoder the ability to capture the temporal relationship between the input information time series and the output observation time series during the model training process, thereby solving the problem of rigid mapping of nonlinear state space models in related technologies during information dimensionality reduction, which helps to improve the accuracy and numerical stability of nonlinear state space models.
[0073] At the same time, the nonlinear state space model proposed in this embodiment does not require the state space model to be linear in the learned latent state space, so it has a wider range of uses. And it does not rely on the variational inference method, so there is no need to make specific assumptions about the distribution of the latent space, that is, the distribution of the state quantity of the driving system. This makes the method more flexible and avoids problems caused by improper distribution assumptions. At the same time, since the state quantity no longer depends on a specific distribution assumption, the classic shrinkage operator can be used to adjust the hyperparameters, thereby simplifying the hyperparameter tuning process of the model, accelerating model convergence, and improving training efficiency. The specific process of using the shrinkage operator to adjust the hyperparameters can be found in the relevant technology, and this application will not be expanded here.
[0074] Regarding the model structure of the encoding network, decoding network and state network, in some embodiments, the encoding network, decoding network and state network may all include an input layer, an output layer and multiple hidden layers. As one example, the encoding network, decoding network and state network may all include a four-layer network, namely an input layer, an output layer and two hidden layers. The hidden layer includes 256 neurons. At the same time, the ReLU (Rectified Linear Unit) function is used as the activation function.
[0075] Of course, in addition to the above model structures, the encoding network, decoding network and state network can also use other model structures, and the model structures of these three networks can be the same or different, and the model structures of the above three networks are not limited to this.
[0076] It can be seen that this embodiment provides a model structure of an encoding network, a decoding network and a state network. Based on the model structure, an initial network can be built, and the model parameters can be updated through the training method provided by any of the above embodiments.
[0077] Based on any of the above embodiments, the encoders to be trained in step 120 may include two, namely a first encoder and a second encoder. Thus, step 120 may specifically include: Figure 2 Steps 121-122 are shown.
[0078] Step 121: Mapping the information time series at time k-1 to the first state quantity at time k using the encoding network in the first encoder;
[0079] Step 122: Utilize the encoding network in the second encoder to map the information time series at time k to the second state quantity at time k+1.
[0080] That is, the encoding network in the first encoder can convert the information time series I k-1 Mapped to the first state quantity x k , the encoding network in the second encoder can convert the information time series I k Mapped to the second state x k+1 .
[0081] In addition, the first observation time series in step 140 The prediction of can be performed by the decoding network in the first encoder. That is, the decoding network in the first encoder is based on the first state quantity x k Forecasting a time series of first observations This completes the process of using the first encoder to convert the information time series I k-1 Mapping to the first observation time series process.
[0082] In addition, the second observation time series in step 140 The prediction can be performed by the decoding network of the first encoder or by the decoding network of the second encoder, and this application does not limit this.
[0083] Based on this, the training method further includes the step of constructing the state network to be trained based on the first state quantity at the k moment, the second state quantity at the k+1 moment and the control input quantity at the k moment.
[0084] That is, based on the first state quantity x k , the second state quantity x k+1 And the control input u k Construct the state network f to be trained, for example, you can determine x k+1 =f(x k ,u k ).
[0085] It can be seen that this embodiment provides a method for constructing a state network, and the constructed state network is used as a network to be trained through the training method of any of the above embodiments.
[0086] In addition, in some embodiments, the training method further comprises the steps of:
[0087] Predicting a third observation time series based on the second state quantity using a decoding network in the second encoder;
[0088] In step 120, the second state quantity x is obtained. k+1 After that, in this step, the decoding network of the second decoder can be used based on the second state quantity x k+1 Forecasting the time series of the third observation
[0089] Based on this, the loss function constructed in step 150 includes the first observation time series, the first loss term between the third observation time series and the true observation time series, the second loss term between the second state quantity and the third state quantity, and the third loss term between the second observation time series and the true observation time series.
[0090] Specifically, the first loss term can be expressed as in, Used to characterize the time series of the first observation and the real observation time series O at time k k The loss between. Used to characterize the time series of the third observation and the real observation time series O at time k+1 k+1 The second loss term can be expressed as Used to represent the second state quantity x k+1 With the third state quantity The loss between is the difference between the state quantity predicted by the state network and the state quantity mapped by the encoding network. The third loss term can be expressed as Used to characterize the second observation time series and the real observation time series O at time k+1 k+1 Since the second observation time series is determined by the decoding network based on the third state quantity Predicted, and the third state quantity It is predicted by the state network, so by adding the third loss term in the loss function, it is possible to avoid the error of the state network being amplified by the decoding network, thereby further improving the accuracy of the nonlinear state space model.
[0091] In this way, the training of the model can be regarded as the following optimization problem
[0092]
[0093] Among them, x k =e(I k-1 ),k=k0,…,N; e represents the encoding network, f represents the state network, and d represents the decoding network.
[0094] It can be seen that based on the loss function provided in this embodiment, it is possible to prevent the error of the state network from being amplified by the decoding network. Based on the loss function, the decoder and the state network are jointly trained to obtain a nonlinear state space model.
[0095] In addition, based on any of the above embodiments, the training method may further include the steps of:
[0096] The trained nonlinear state space model is converted into a quasi-linear parameter variation model and stored.
[0097] After the trained nonlinear state space model is obtained, it can be converted into a quasi-linear parameter-varying system (LPV) of the adaptive controller and stored. The specific conversion process is referred to the related art, which is not elaborated in this application.
[0098] This embodiment converts the nonlinear state space model into the form of an LPV model that adapts to the controller, which can simplify the design of the controller.
[0099] Based on the training method provided in any of the above embodiments, the present application also provides a method for predicting driving system observations, which is applied to a nonlinear state space model. The nonlinear state space model is trained by the training method described in any of the above embodiments or combinations of embodiments. The prediction method can be executed by an electronic device such as a server that is connected to the vehicle. If the vehicle's computing power is sufficient to support the prediction operation, the prediction method can also be executed by the vehicle. Figure 3 As shown, the prediction method includes steps 310 to 340.
[0100] Step 310: Obtain a trained nonlinear state-space model.
[0101] The nonlinear state space model includes a state network and a decoding network. The state network is used to characterize the evolution of the state quantity in the driving system; the decoding network, which can also be called a prediction network, is used to describe the relationship between the state quantity and the output of the driving system, that is, to predict the output of the driving system based on the state quantity of the driving system. The decoding network is trained based on an encoder with a prediction function.
[0102] Optionally, the nonlinear state-space model may be represented in the form of a quasi-linear parameter variation model.
[0103] Step 320: Obtain the control input quantity of the driving system at the current moment and the historical state quantity of the driving system, wherein the control input quantity is related to the driving behavior of the driver.
[0104] For example, the control input u of the driving system at the current time k is obtained. k , and the historical state x of the driving system at the previous time k-1 k-1 .
[0105] Step 330: Utilize the trained state network to predict the state quantity of the driving system at the current moment based on the control input quantity and the historical state quantity.
[0106] For example, the control input u k With the historical state quantity x k-1 As the input of the state network, the state network can output the state x of the driving system at the current time k. k .
[0107] Step 340: Utilize the trained decoding network to predict the observation quantity at the current moment based on the state quantity at the current moment; the observation quantity is used to characterize the driving parameters of the vehicle.
[0108] Finally, the state quantity x k Input the decoding network, which can output the observation y of the driving system at the current time k k The observed value y k The driving parameters of the vehicle can be characterized.
[0109] In some embodiments, the state x1 of the driving system at the initial moment can be obtained based on the initial information time series I0 and the trained encoding network. The initial information time series I0 is the system input, for example, including the initial speed, initial acceleration, initial yaw angle, initial steering wheel speed, etc. of the driving system. In this way, the initial time series I0 is input into the trained encoding network, and the state x1 at the initial moment can be identified. Subsequently, the observed value y1 at the initial moment can be predicted using the trained decoding network, and the state x2 at the second moment can be predicted based on the state x1 at the initial moment and the control input u1 using the trained state network. The state x2 at the second moment can be used to predict the observed value y2 at the second moment and can be used to predict the state x3 at the third moment, and so on.
[0110] It can be seen that this embodiment applies the trained nonlinear state space model to the nonlinear control problem in vehicle driving, and uses the model to predict the dynamic behavior of the driving system, so that the control strategy of vehicle driving can be adjusted in real time through online optimization, thereby ensuring that the driving system operates in the optimal state.
[0111] In some embodiments, the control input may include a longitudinal control input in the direction of travel of the vehicle. The longitudinal control input refers to a control amount used to control the vehicle in the direction of travel. Accordingly, the observation includes a longitudinal observation in the direction of travel, and the longitudinal observation refers to a driving parameter of the vehicle in the direction of travel.
[0112] For example, the longitudinal control input may include, but is not limited to, the accelerator pedal position and / or the brake pedal force. The longitudinal observable may include, but is not limited to, the vehicle acceleration and / or speed.
[0113] In addition, the control input may include a lateral control input perpendicular to the vehicle's driving direction. The lateral control input refers to a control amount used to control the vehicle to travel perpendicular to the driving direction. Accordingly, the observation includes a lateral observation perpendicular to the driving direction, and the lateral observation refers to a driving parameter of the vehicle perpendicular to the driving direction.
[0114] For example, the lateral control input may include, but is not limited to, a steering wheel angle and / or a steering wheel torque. The lateral observable may include, but is not limited to, a vehicle yaw angle and / or a steering wheel speed.
[0115] It can be seen that the nonlinear state space model training method and prediction method provided by this application solve the problems of strong assumptions of specific distribution and rigid mapping in nonlinear system identification in related technologies, such as encoders and neural network technologies with prediction functions, which realize the nonlinear output and state space update mapping of the driving system. Since there is no need to make specific distribution assumptions for the latent space, it has certain flexibility and practicality, and can effectively handle complex problems in nonlinear system identification.
[0116] Based on a nonlinear state space model training method or a driving system observation quantity prediction method described in any of the above embodiments, the present application also provides: Figure 4 A schematic diagram of the structure of an electronic device is shown in FIG. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement a method for predicting a driving system observation amount described in any of the above embodiments.
[0117] Optionally, the electronic device may be a server or a device in a server group that is communicatively connected to the vehicle.
[0118] Optionally, the electronic device may be installed in a vehicle, such as an ECU (Electronic Control Unit) in the vehicle.
[0119] In addition, the present application also provides a vehicle, wherein the vehicle is equipped with one or more Figure 4 The electronic devices shown. Of course, other hardware required for the business may also be included.
[0120] The nonlinear state space model training method or the driving system observation quantity prediction method described in any of the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product.
[0121] Therefore, the present application also provides a computer program product, which includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the present application is performed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.
[0122] The computer program or instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0123] The present application also provides a computer storage medium, which stores a computer program. When the computer program is executed by a processor, it can be used to execute a nonlinear state space model training method or a driving system observation quantity prediction method described in any of the above embodiments.
[0124] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0126] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0127] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0128] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0129] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A nonlinear state space model training method, characterized in that: The method comprises: Acquire information time series of the driving system at multiple moments; the information time series includes a control input time series determined based on historical driving behavior and a real observation time series; The encoding network in the encoder is used to map the information time series at time k-1 to the first state quantity at time k, and to map the information time series at time k to the second state quantity at time k+1; Using a state network to predict a third state quantity at time k+1 based on the first state quantity at time k and the control input quantity at time k; the state network is used to characterize the state quantity evolution of the driving system; Using a decoding network in the encoder to predict a first observation time series based on the first state quantity, and predicting a second observation time series based on the third state quantity; A loss function is constructed based on the first observation time series, the second observation time series, the true observation time series, the second state quantity, and the third state quantity, and the model parameters of the encoder and the state network are updated based on the loss function to obtain a nonlinear state space model including a trained decoding network and a state network.
2. The method according to claim 1, characterized in that The encoder includes a first encoder and a second encoder; the encoding network in the encoder is used to map the information time series at time k-1 to the first state quantity at time k, and to map the information time series at time k to the second state quantity at time k+1, including: Using the encoding network in the first encoder to map the information time series at time k-1 to the first state quantity at time k; using the encoding network in the second encoder to map the information time series at time k to the second state quantity at time k+1; The method further comprises: The state network to be trained is constructed based on the first state quantity at the k moment, the second state quantity at the k+1 moment, and the control input quantity at the k moment.
3. The method according to claim 2, characterized in that The method further comprises: Predicting a third observation time series based on the second state quantity using a decoding network in the second encoder; The loss function includes the first observation time series, a first loss term between the third observation time series and the true observation time series, a second loss term between the second state quantity and the third state quantity, and a third loss term between the second observation time series and the true observation time series.
4. A method for predicting driving system observations, characterized in that: The method comprises: Acquire a trained nonlinear state space model, wherein the nonlinear state space model includes a state network and a decoding network; Acquiring a control input quantity of the driving system at a current moment and a historical state quantity of the driving system; the control input quantity is related to the driving behavior of the driver; Predicting the state quantity of the driving system at the current moment based on the control input quantity and the historical state quantity using the trained state network; The trained decoding network is used to predict the observation quantity at the current moment based on the state quantity at the current moment; the observation quantity is used to characterize the driving parameters of the vehicle.
5. The method according to claim 4, characterized in that The decoding network and the state network both include an input layer, an output layer and multiple hidden layers, and use a rectified linear unit (ReLU) function as an activation function.
6. The method according to claim 4 or 5, characterized in that: The control input comprises a longitudinal control input in the driving direction, and the observation comprises a longitudinal observation in the driving direction; and / or The control input comprises a lateral control input perpendicular to the driving direction; and the observation comprises a lateral observation perpendicular to the driving direction.
7. The method according to claim 6, characterized in that The longitudinal control input comprises the accelerator pedal position and / or the brake pedal force; the longitudinal observable comprises the vehicle acceleration and / or speed; The lateral control input comprises a steering wheel angle and / or a steering wheel torque; the lateral observation comprises a vehicle yaw angle and / or a steering wheel speed.
8. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, when the processor calls the executable instructions, it implements the operation of any method described in claims 1-3 or 4-7.
9. A vehicle, characterized in that: The vehicle comprises the electronic device as claimed in claim 8.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 or 4 to 7 is implemented.