A mechanism-based weakly supervised driving range estimation and driving behavior analysis method

By combining the variational autoencoder with weakly supervised learning, the problem of failing to consider the impact of driver behavior in existing technologies is solved, and low-cost mileage estimation and driving behavior analysis are achieved.

CN118643343BActive Publication Date: 2025-09-26ZHEJIANG UNIV

Patent Information

Application Number
CN202410920530.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2025-09-26
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

Existing range estimation schemes fail to effectively consider the impact of driver behavior on the range of electric vehicles, and data-driven methods require a large amount of labeled data and have high training costs.

Method used

A weakly supervised learning method combining a variational autoencoder (VAE) model and a mechanism is adopted. By calculating the transfer entropy of vehicle driving characteristics and environmental condition characteristics, the features with the greatest correlation are screened, and a priori physical model of driving range is constructed. Causal constraints and physical constraints are introduced during the training process to reduce the demand for labeled data.

Benefits of technology

It reduces the cost of mileage estimation and can take into account driver behavior and road condition information to achieve accurate mileage estimation and driving behavior analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643343B_ABST
    Figure CN118643343B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for weakly supervised range estimation and driving behavior analysis that combines mechanisms, including: obtaining vehicle driving data, environmental condition data, battery status data, and range data of a pure electric vehicle; calculating the transfer entropy of vehicle driving characteristics and environmental condition characteristics on range; screening related features based on the transfer entropy; constructing a priori physical model of range; determining the model's input features and latent variable features and dividing the training set and validation set; constructing a variational autoencoder model and setting its parameters; training the variational autoencoder model; and performing range estimation and driver behavior characterization. The present invention reduces the cost of the range estimation task through a weakly supervised variational autoencoder model; and incorporates physical models and causal constraints, overcoming the difficulty of the variational autoencoder in learning decoupled representations. Through an encoder and decoder, the range estimation and driver behavior inference tasks can be completed simultaneously.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of driver behavior characterization and vehicle range estimation, and in particular to a method for weakly supervised range estimation and driving behavior analysis combining a mechanism. Background Art

[0002] In the era of fuel-powered vehicles, range prediction accuracy was generally low. However, due to the widespread availability of gas stations and the short refueling times, user demand for range prediction was not significant. However, in today's era of new energy vehicles (pure electric vehicles), the hours-long charging times and the sparse distribution of charging stations at highway service areas force users to incorporate range prediction into their travel plans. Therefore, range prediction for new energy vehicles, especially pure electric vehicles, has become even more important.

[0003] Existing range estimation schemes are mostly based on historical data from the vehicle side, mostly ambient temperature, battery cell temperature, power consumption and mileage. A correction factor based on the historical power consumption rate and mileage factor is added to the average power consumption per 100 kilometers, without considering the impact of user-side driving behavior on the vehicle's range. The description of power consumption per 100 kilometers is relatively simple, and the vehicle state and road conditions are idealized before calculation, such as the average power consumption per 100 kilometers (total power consumption of the vehicle / total 100 kilometers). Existing range estimation schemes have the following problems: (1) They do not consider the impact of road conditions and user-side information, including driver behavior habits, driving mode, and high-voltage power system usage, on the range of electric vehicles in actual use; (2) They do not consider combining range estimation with driver behavior analysis; (3) Using data-driven methods to estimate range often requires obtaining a large amount of labeled data, which has a high training cost. Summary of the Invention

[0004] The present invention aims to address the shortcomings of existing technologies by proposing a weakly supervised range estimation and driving behavior analysis method that incorporates a mechanism. The mechanism here refers to the physical constraints satisfied between vehicle driving characteristics and range during model training. Weak supervision, in the context of machine learning, refers to the fact that algorithms do not require data with detailed labels or categorization for training. In this invention, a variational autoencoder is used as the weakly supervised learning algorithm.

[0005] The object of the present invention is achieved through the following technical solution: a method for weakly supervised driving range estimation and driving behavior analysis based on a combined mechanism, the method comprising the following steps:

[0006] S1, obtaining vehicle driving data, environmental condition data, battery status data and driving range data of the pure electric vehicle;

[0007] S2, calculates the transfer entropy of vehicle driving characteristics and environmental condition characteristics on driving range;

[0008] S3, screening the features most relevant to the driving range of pure electric vehicles based on transfer entropy;

[0009] S4, constructing a priori physical model of driving range;

[0010] S5, determine the input features and latent variable features of the variational autoencoder (VAE) model and divide the model into training and validation sets;

[0011] S6, build the VAE model, set the number of neural network layers of the encoder and decoder, the number of neurons in each layer, the learning rate, the distribution of the encoder output, and the training data batch size;

[0012] S7, training the VAE model, inputting vehicle driving data and environmental condition data into the VAE model for forward calculation, calculating the loss function value of the VAE model, and using the momentum gradient descent method to update the VAE model parameters to complete the VAE model training;

[0013] The loss function of the VAE model consists of three parts: the evidence lower bound loss, the physical loss, and the causal loss. The evidence lower bound loss is used to measure the gap between the sample reconstructed by the VAE model and the original sample, as well as the distance between the distribution of the latent variables generated by the VAE model and their prior distribution. The physical loss is used to measure the degree to which the latent variables generated by the VAE model and the input features meet the prior physical model of driving range. The causal loss is used to measure the gap between the causal relationship between the latent variables generated by the VAE model and the true causal relationship.

[0014] S8, uses the encoder part of the trained VAE model to estimate the driving range of the pure electric vehicle, and uses the decoder part of the trained VAE model to infer the driving behavior.

[0015] Furthermore, the vehicle driving data features include insulated gate bipolar transistor chip temperature, motor torque, motor speed, drive power, voltage extreme value, accelerator pedal position, brake pedal position, air conditioning equipment switch value, mileage, and power consumption. The vehicle driving data feature set is represented as DR, where the number of features included is N DR The environmental condition data features include the ambient temperature, wind speed, and road condition data outside the vehicle. The environmental condition data feature set is represented as EN, where the number of features included is N EN The battery status data features include battery charging status, battery health status data, and the battery status data feature set is represented as BS, where the number of features included is N BSThe mileage data is represented as MI, which indicates the mileage that the vehicle can continue to travel; the observation time of each feature data is represented as T, and the number of samples included is represented as n total .

[0016] Furthermore, the calculation formula of the transfer entropy is as follows:

[0017] T CAV→REV =H(REV t |REV t-1:t-L )-H(REV t |REV t-1:t-L , CAV t-1:t-L )

[0018] Among them, REV represents the target variable, REV t Represents the observed value of REV at time t, REV t-1:t-L Represents the historical data of L time steps before REV; CAV represents the cause variable, CAV t-1:t-L represents the historical data of the previous L time steps of CAV; H(·|·) represents the conditional entropy, and its processing process is as follows:

[0019] H(REV t |REV t-1:t-L )=-∑p(REV t-1:t-L )∑p(REV t |REV t-1:t-L )log p(REV t |REV t-1:t-L )H(REV t |REV t-1:t-L , CAV t-1:t-L )=-∑p(REV t-1:t-L , CAV t-1:t-L )∑p(REV t |REV t-1:t-L , CAV t-1:t-L )logp(REV t |REV t-1:t-L , CAV t-1:t-L )

[0020] Where p(·) represents the probability density function of the variable.

[0021] Furthermore, S3 is specifically as follows: the transfer entropy threshold is TH, and the feature set X with the greatest correlation with the vehicle's driving range is screened by comparing the threshold, where the number of features is N X , the processing process is as follows:

[0022] X={CAV|T CAV→REV >TH, CAV∈{DR, EN}, REV∈{BS, MI}}

[0023] And set the feature set Z = {BS, MI}, where the number of features is N Z , merge the corresponding data sets in feature set X and Z on the time axis to obtain the total data set in Representing a dataset The characteristic dimension of Alternatively, the number of features is preset, and the transfer entropy values ​​of the features are calculated and sorted, thereby identifying and selecting the features with the highest correlation with the vehicle range estimation to form a set X.

[0024] Furthermore, the driving range a priori physical model is constructed through expert experience, characterizing the approximate physical relationship satisfied between the feature set X and the feature set Z obtained by S3. The driving range a priori physical model is uniformly represented by the vector function f(·) as f(X, Z)=0.

[0025] Furthermore, in S5, the input feature of the VAE model is set to X, the latent variable feature is set to Z, and the data set is divided into Divide into training set and validation set Where n1=0.9n total , n2=0.1n total .

[0026] Furthermore, the construction of the VAE model is specifically as follows:

[0027] The structure of the encoder of the VAE model is set to a multi-layer perceptron, and the number of neurons in the input layer of the encoder is set to N X , the number of neurons in the output layer is set to 2N Z , the number of hidden layers included in the encoder is L H , the number of neurons contained in each hidden layer is N l , l=1,2,...,L H ;

[0028] The structure of the decoder of the VAE model is set to a multi-layer perceptron, and the number of neurons in the input layer of the decoder is set to N Z , the number of neurons in the output layer is set to N X , the number of hidden layers included in the decoder is L H ;

[0029] Set the learning rate of the variational autoencoder to l r ; Set the encoder output It obeys the multidimensional standard normal distribution, that is, N Z ×NZ Identity matrix; set the training data batch size to n b .

[0030] Furthermore, the forward propagation of the VAE model includes:

[0031] The training set Divide into multiple batches of data, each of which contains n b samples;

[0032] The encoder in the VAE model maps the input feature X to the mean and variance of independent exogenous variables ∈, which are calculated as follows:

[0033] h0=X

[0034] h k =σ i (W k h k-1 +b k ), k=1,2,…,L H

[0035]

[0036] Among them, h k represents the output vector of the kth hidden layer of the encoder; W k , b k Represent the weight coefficient and bias coefficient of the kth hidden layer of the encoder respectively; W out , b out Represent the weight coefficient and bias coefficient of the encoder output layer respectively; {σ i , σ out} represents the rectified linear unit activation function used in the hidden layer; is the estimated value of the mean of the encoder pair ∈, Δ∈ is the estimated value of the variance obeyed by the encoder pair ∈, through and Δ∈ to get the estimated value The processing process is as follows:

[0037]

[0038] Where exp(·) represents the exponential function with natural exponential as the base; ⊙ represents the Hadamard product; the random vector And obtained by sampling from the standard normal distribution;

[0039] The causal layer in the VAE model converts the exogenous variables output by the encoder into The linear mapping to the estimated value of Z is expressed as Assume that the features of feature set Z satisfy the linear structural causal model, the specific form of which is as follows:

[0040] Z=A T Z+∈

[0041] Among them, the correlation matrix It is a strict upper triangular matrix, ∈ is an independent exogenous variable; the above formula shows that the features in Z can generate each other, and the elements in A are the causal effect coefficients between the features of Z; the conversion relationship between Z and the independent exogenous variable ∈ is obtained from the above formula:

[0042] Z=(IA T ) -1 ∈

[0043] In the above formula, the estimated value of the independent exogenous variable ∈ Has been output by the encoder, the causal layer passes Linear mapping to obtain estimated values The mapping process is as follows:

[0044]

[0045] The association matrix A is used as a trainable parameter of the causal layer, and the element values ​​are automatically adjusted during the model training process;

[0046] The decoder in the VAE model will estimate the Mapped to estimated values ​​of input features The calculation process is as follows:

[0047]

[0048] h′ k =σ i (W′ k h′ k-1 +b′ k ), k=1,2,…,L H

[0049]

[0050] in, Represents the decoder's reconstruction of the input feature, h′ k represents the output vector of the kth hidden layer of the decoder; W' k , b′ k Represent the weight coefficient and bias coefficient of the kth hidden layer of the decoder respectively; W′ out , b′ out Represent the weight coefficient and bias coefficient of the decoder output layer respectively; {σ i , σ out} represents the rectified linear unit activation function used in the hidden layer.

[0051] Furthermore, the total loss function of the VAE model consists of three parts: evidence lower bound loss, physical loss, and causal loss;

[0052] The evidence lower bound loss l ELBO The calculation process is as follows:

[0053]

[0054] in, Indicates the calculation of expectations in the training set; u represents the label value sampled from the data set corresponding to Z; φ represents the set of all weight coefficients and bias coefficients in the encoder; q φ (∈|X,u) represents the conditional distribution of the exogenous variable ∈ generated by the encoder, q φ (Z|X,u) represents the conditional distribution obeyed by the latent variable Z generated by the causal layer; p ∈ (∈) is the prior distribution of exogenous variables; θ represents the set of all weight coefficients and bias coefficients in the decoder; p θ (X|Z) represents the conditional distribution of the variable reconstructed by the decoder; p(Z|u) represents the prior probability of Z estimated by the true sample value u; D KL (·||·) represents the KL divergence between two distributions;

[0055] The physical loss phy The calculation process is as follows:

[0056]

[0057] in, Used to measure the input features X of the encoder and the output features of the causal layer The degree to which the a priori physical model of driving range is satisfied between Used to measure the input features of the decoder And the output features The degree to which the a priori physical model of driving range is satisfied between

[0058] The causal loss calculation process is as follows:

[0059]

[0060] in, Indicates use Obey the conditional distribution q φ (Z|X,u) solution The expected value of η i is random noise, tr represents the trace of the solution matrix, k1 and k2 represent small positive numbers; is the estimated value of the i-th feature of Z, output by the causal layer; A i represents the i-th row of matrix A; l u Aims to constrain A to satisfy the causal relationship between the true label values ​​of Z; m Aims to constrain A to satisfy the latent variables obtained through causal layer mapping The causal relationship between them; H(A) aims to constrain A to maintain an acyclic structure;

[0061] The training process of the VAE model is transformed into the following optimization problem:

[0062] min-l ELBO

[0063]

[0064] The above optimization problem is transformed using the Lagrange multiplier method to obtain the total loss function L total , the processing process is as follows:

[0065] min L total =-l ELBO +αH(A)+βl u +γl m +μl phy

[0066] Among them, {α, β, γ, μ} are the weight coefficients corresponding to causal constraints and physical constraints.

[0067] Furthermore, the application process in S8 is specifically as follows: vehicle driving data and environmental condition data are collected in real time through the vehicle side, and after feature screening, the data is input into the encoder of the trained VAE model, and the estimated value of the driving range is output through the causal layer; the current vehicle's driving range and battery status data features are directly input into the decoder of the trained VAE model, and the current vehicle driving data features are estimated through the decoder, thereby inferring the current driver's driving behavior.

[0068] The advantages and beneficial effects of the present invention are as follows: the present invention introduces the VAE model, a weakly supervised learning paradigm, which reduces the demand for mileage label data in the range estimation task, thereby reducing the cost of the range estimation task; and by incorporating causal constraints and physical constraints into the VAE model training process, a small amount of battery status and range label data is used to supervise the latent variable formation process in the variational autoencoder, thereby overcoming the problem that the variational autoencoder is difficult to learn decoupling representation under pure weak supervision; at the application level, the encoder can consider road conditions, user-side information including driver behavior habits, driving mode, high-voltage power system usage and other actual driving information to infer the range; at the application level, the decoder analyzes driving behavior based on the vehicle's range and battery status, thereby simultaneously completing the two major tasks of range estimation and driving behavior analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0070] Figure 1 A flow chart of a method for weakly supervised driving range estimation and driving behavior analysis combining mechanisms provided in an embodiment of the present invention;

[0071] Figure 2 Schematic diagram of the forward propagation process of the variational autoencoder model provided in an embodiment of the present invention;

[0072] Figure 3 This is a structural diagram of the device for weakly supervised driving range estimation and driving behavior analysis based on the combined mechanism provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0074] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.

[0075] like Figure 1 As shown, an embodiment of the present invention provides a method for weakly supervised driving range estimation and driving behavior analysis based on a combined mechanism, the method comprising the following steps:

[0076] (1) Obtain vehicle driving data, environmental condition data, battery status data, and driving range data of pure electric vehicles.

[0077] Specifically, the vehicle driving data features include insulated gate bipolar transistor chip (IGBT) temperature, motor torque, motor speed, drive power, voltage extreme value, accelerator pedal position, brake pedal position, air conditioning equipment switch value, mileage, and power consumption. The vehicle driving data feature set is represented as DR, where the number of features included is N. DR By intercepting and monitoring the communication network traffic of the vehicle's underlying controller and using the automated reverse engineering method of the CAN bus protocol, the binary code is converted into a decimal value with specific physical meaning. The meaning and reasons for selecting the above vehicle driving data are as follows:

[0078] Insulated Gate Bipolar Transistor (IGBT) chip temperature: IGBTs are commonly used semiconductor devices in electric vehicles and are widely used in electric vehicle inverters, battery management systems, etc. The temperature of the IGBT affects the on-resistance and switching speed of the IGBT, which in turn affects the power loss of various system functions and thus the vehicle's driving range.

[0079] Motor torque, motor speed, and drive power: Motor torque, motor speed, and drive power directly affect the vehicle's acceleration performance, driving ability, and overall driving experience. Their values ​​also reflect real-time power consumption and are important parameters for motor status monitoring.

[0080] Voltage extremes: Voltage extremes include maximum voltage and minimum voltage, which are the highest voltage that an electric vehicle battery system or power electronic equipment can withstand and the lowest voltage at which it can operate safely, respectively. They directly affect power output characteristics and thus real-time power consumption;

[0081] Accelerator and brake pedal position inputs reflect the driver's driving intent and serve as a pre-input parameter for the vehicle's internal controller to analyze driving torque requirements, thereby affecting real-time power consumption. The accelerator and brake pedals are interactive variables used by the driver to implement longitudinal control of the vehicle, directly reflecting the driver's driving habits and serving as key variables for predicting future power consumption.

[0082] Mileage: indicates the total kilometers traveled by the vehicle from the time it leaves the factory to the current moment;

[0083] Power consumption: Indicates the amount of power consumed by the vehicle while driving.

[0084] Specifically, the environmental condition data features include the ambient temperature, wind speed, and road condition data outside the vehicle. The environmental condition data feature set is represented as EN, where the number of features included is N. EN , obtained through the infrared temperature sensor, wind speed sensor and GPS navigation system inside the car.

[0085] Specifically, the battery status data features include battery state of charge (SOC) and battery state of health (SOH) data. The battery status data feature set is represented as BS, where the number of features included is N. BS , mainly obtained through SOC and SOH estimation models.

[0086] Specifically, the driving range data is represented as MI, which indicates the mileage that the vehicle can continue to travel and can be obtained from the vehicle driving history data.

[0087] The observation time of each feature data is expressed as T, the time granularity is 10ms, and the number of samples contained in it is expressed as n total .

[0088] (2) Calculate the transfer entropy of vehicle driving characteristics and environmental conditions on driving range respectively. The transfer entropy calculation formula is as follows:

[0089] T CAV→REV =H(REV t |REV t-1:t-L )-H(REV t |REV t-1:t-L , CAV t-1:t-L )

[0090] Among them, REV represents the target variable, REV t Represents the observed value of REV at time t, REV t-1:t-L Represents the historical data of L time steps before REV; CAV represents the cause variable, CAV t-1:t-L represents the historical data of the previous L time steps of CAV; H(·|·) represents the conditional entropy, and its processing process is as follows:

[0091] H(REV t |REV t-1:t-L )=-∑p(REV t-1:t-L )∑p(REV t |REV t-1:t-L )log p(REV t |REV t-1:t-L )H(REV t |REV t-1:t-L , CAV t-1:t-L )=-∑p(REV t-1:t-L , CAV t-1:t-L )∑p(REVt |REV t-1:t-L , CAV t-1:t-L )logp(REV t |REV t-1:t-L , CAV t-1:t-L )

[0092] Where p(·) represents the probability density function of the variable.

[0093] (3) Based on the transfer entropy, the features with the greatest correlation with the driving range of pure electric vehicles are screened.

[0094] The transfer entropy threshold is TH, and in this embodiment, TH=1.5. By comparing the threshold, the feature set X with the greatest correlation to the vehicle's mileage is selected, where the number of features is N. X , the processing process is as follows:

[0095] X={CAV|T CAV→REV >TH, CAV∈{DR, EN}, REV∈{BS, MI}}

[0096] And set the feature set Z = {BS, MI}, where the number of features is N Z , merge the corresponding data sets in feature set X and Z on the time axis to obtain the total data set in Representing a dataset The characteristic dimension of In addition, the number of features can also be preset in the feature selection step. By calculating and sorting the transfer entropy value of each feature, the features with the highest correlation with the vehicle range estimation are identified and selected to form the set X.

[0097] (4) Construct a priori physical model of driving range.

[0098] The driving range a priori physical model is constructed through expert experience, representing the approximate physical relationship between the feature set X and the feature set Z obtained in step (3). The driving range a priori physical model is uniformly represented by the vector function f(·) as f(X, Z) = 0. The driving range a priori physical model is, for example, an average energy consumption model. This model calculates the remaining driving range based on a certain accumulated mileage. In this example, the amount of electricity consumed by the vehicle within a certain mileage is first obtained; then the average energy consumption of the vehicle at this time is calculated; and finally, the driving range is calculated using the remaining energy and the average energy consumption. The specific expression is as follows:

[0099]

[0100] (5) Determine the input features and latent variable features of the model and divide the training set and validation set.

[0101] Set the input feature of the Variational Auto-Encoder (VAE) model to X, the latent variable feature to Z, and divide the dataset into Divide into training set and validation set Where n1=0.9n total , n2=0.1n total .

[0102] (6) Construct a variational autoencoder model and set the number of neural network layers of the encoder and decoder, the number of neurons in each layer, the learning rate, the distribution of the encoder output, and the training data batch size.

[0103] Specifically, the structure of the encoder is set to a multi-layer perceptron, and the number of neurons in the input layer of the encoder is set to N X , the number of neurons in the output layer is set to 2N Z , the number of hidden layers included in the encoder is L H , which is a hyperparameter, and its value is set artificially. In this embodiment, L is set H =5, the number of neurons contained in each hidden layer is N l (l=1,2,...,L H ), which is a hyperparameter, and the value is set manually. In this embodiment, N1=256, N2=256, N3=128, N4=128, and N5=128 are set;

[0104] Specifically, the decoder structure is set to a multi-layer perceptron, and the number of neurons in the decoder input layer is set to N Z , the number of neurons in the output layer is set to N X , the number of hidden layers included in the decoder is L H ;

[0105] Set the learning rate l of the variational autoencoder r is 10 -2 ; Set the encoder output It obeys the multidimensional standard normal distribution, that is, N Z ×N Z Identity matrix; set the training data batch size to n b .

[0106] (7) Training the VAE model. Specifically, the vehicle driving data and environmental condition data are input into the variational autoencoder for forward calculation, the loss function value of the VAE model is calculated, and the momentum gradient descent method is used to update the parameters of the VAE model to complete the training of the VAE model.

[0107] like Figure 2 As shown, the forward propagation of the VAE model mainly includes:

[0108] The training set Divide into multiple batches of data, each of which contains n b samples;

[0109] The encoder in the VAE model maps the input feature X to the mean and variance of independent exogenous variables ∈. The encoder is calculated as follows:

[0110] h0=X

[0111] h k =σ i (W k h k-1 +b k ), k=1,2,…,L H

[0112]

[0113] Among them, h k represents the output vector of the kth hidden layer of the encoder; W k , b k Represent the weight coefficient and bias coefficient of the kth hidden layer of the encoder respectively; W out , b out Represent the weight coefficient and bias coefficient of the encoder output layer respectively; {σ i , σ out} represents the rectified linear unit activation function used by the hidden layer, and its calculation process is as follows:

[0114] σ(x)=max(0,x)

[0115] is the estimated value of the mean of the encoder pair ∈, Δ∈ is the estimated value of the variance obeyed by the encoder pair ∈, through and Δ∈ to get the estimated value The processing process is as follows:

[0116]

[0117] Where exp(·) represents the exponential function with natural exponential as the base; ⊙ represents the Hadamard product; the random vector And it is obtained by sampling from the standard normal distribution.

[0118] The causal layer in the VAE model converts the exogenous variables output by the encoder into The linear mapping to the estimated value of Z is expressed as Existing VAE models usually assume that the output of their encoders follows a multivariate Gaussian distribution, that is, the dimensions of the encoder outputs are independent of each other. However, the latent variable Z studied in this invention contains battery state characteristics and driving range data. According to the driving range prior physical model in step (4), its dimensions are not independent. This invention assumes that the features of the feature set Z satisfy a linear structural causal model, the specific form of which is as follows:

[0119] Z=A T Z+∈

[0120] Among them, the correlation matrix is a strictly upper triangular matrix, where ∈ is an independent exogenous variable. The above formula shows that the features in Z can generate each other, and the elements in A are the causal effect coefficients between the features of Z. Furthermore, the above formula can be used to obtain the conversion relationship between Z and the independent exogenous variable ∈:

[0121] Z=(IA T ) -1 ∈

[0122] In the above formula, the estimated value of the independent exogenous variable ∈ Has been output by the encoder, so the causal layer can be Linear mapping to obtain estimated values The mapping process is as follows:

[0123]

[0124] The association matrix A is used as a trainable parameter of the causal layer, and the element values ​​are automatically adjusted during the model training process.

[0125] The decoder in the VAE model will estimate the Mapped to estimated values ​​of input features The decoder is calculated as follows:

[0126]

[0127] h′ k =σ i (W′ k h′ k-1 +b′ k ), k=1,2,…,L H

[0128]

[0129] in, Represents the decoder's reconstruction of the input feature, h′ k represents the output vector of the kth hidden layer of the decoder; W′ k , b′k Represent the weight coefficient and bias coefficient of the kth hidden layer of the decoder respectively; W′ out , b′ out Represent the weight coefficient and bias coefficient of the decoder output layer respectively; {σ i , σ out} represents the rectified linear unit activation function used by the hidden layer, and its calculation process is as follows:

[0130] σ(x)=max(0,x)

[0131] The total loss of the VAE model consists of three parts: evidence lower bound loss, physical loss, and causal loss.

[0132] Evidence lower bound loss l ELBO The calculation process is as follows:

[0133]

[0134] in, Indicates the calculation of expectations in the training set; u represents the label value sampled from the data set corresponding to Z; φ represents the set of all weight coefficients and bias coefficients in the encoder; q φ (∈|X,u) represents the conditional distribution of the exogenous variable ∈ generated by the encoder, q φ (Z|X,u) represents the conditional distribution obeyed by the latent variable Z generated by the causal layer; p ∈ (∈) is the prior distribution of the exogenous variable, and in this embodiment, p is set ∈ (∈) is a multivariate Gaussian distribution; θ represents the set of all weight coefficients and bias coefficients in the decoder; p θ (X|Z) represents the conditional distribution of the variable reconstructed by the decoder; p(Z|u) represents the prior probability of Z estimated by the true sample value u; D KL (·||·) represents the KL divergence between two distributions;

[0135] Physical loss phy The calculation process is as follows:

[0136]

[0137] in, Used to measure the input features X of the encoder and the output features of the causal layer The degree to which the a priori physical model of driving range is satisfied between Used to measure the input features of the decoder And the output features The degree to which the a priori physical model of driving range is satisfied between

[0138] The causal loss calculation process is as follows:

[0139]

[0140]

[0141] in, Indicates use Obey the conditional distribution q φ (Z|X,u) solution The expected value of η i is random noise, tr represents the trace of the matrix to be solved, k1 and k2 represent small positive numbers. In this embodiment, k1 and k2 are set to 10 -3 ; is the estimated value of the i-th feature of Z, output by the causal layer; A i represents the i-th row of matrix A; l u Aims to constrain A to satisfy the causal relationship between the true label values ​​of Z; m Aims to constrain A to satisfy the latent variables obtained through causal layer mapping The causal relationship between them; H(A) aims to constrain A to maintain an acyclic structure;

[0142] The training process of the variational autoencoder is transformed into the following optimization problem:

[0143] mmin-l ELBO

[0144]

[0145] Considering that the above optimization problem is difficult to solve, the Lagrange multiplier method is used to transform the above optimization problem to obtain the total loss function L total , the processing process is as follows:

[0146] min L total =-l ELBO +αH(A)+βl u +γl m +μl phy

[0147] Among them, {α, β, γ, μ} are the weight coefficients corresponding to the causal constraint and the physical constraint. In this embodiment, α = β = γ = 10 -2 , μ=10 -3 .

[0148] The calculation process of the momentum gradient descent method is as follows:

[0149]

[0150] [φ,θ] t=[φ,θ] t-1 -v t

[0151] Among them, v t Represents the momentum value of time step t, which is the momentum v of time step t-1 t-1 The gradient of the total loss with respect to the model parameters at time step t Weighted; m is the momentum coefficient; [φ, θ] t represents the trainable parameters of the encoder and decoder at time step t; l r Represents the learning rate. In this embodiment, it is set to l r =10 -2 .

[0152] The termination condition is set as the total loss of the model in the validation set does not show a downward trend within 5 consecutive time steps.

[0153] (8) In the application, the encoder part of the VAE model is used to estimate the driving range of the pure electric vehicle, and the decoder part of the VAE model is used to infer the driving behavior.

[0154] Specifically, the vehicle driving data and environmental condition data are collected in real time from the vehicle side, and after feature screening as described in step (3), the data is input into the encoder of the trained VAE model, and the estimated value of the driving range is output through the causal layer.

[0155] Specifically, by directly inputting the current vehicle's mileage and battery status data features (data actually measured by the manufacturer or user) into the decoder of the trained VAE model, the decoder estimates the current vehicle driving data features, including a series of features described in step (1), and further inferring the driving behavior according to the following rules:

[0156] IGBT temperature: The IGBT temperature reflects the IGBT's operating status and thermal management efficiency. Excessively high temperatures may indicate overload or cooling system problems, while properly controlled temperatures may indicate that the driver is using the power system moderately.

[0157] Motor torque: This is related to the vehicle's acceleration and gradeability. Frequent high torque requests may indicate that the driver tends to drive aggressively.

[0158] Motor speed: directly related to the vehicle's speed, a high speed may indicate that the driver is driving at high speed or needs to accelerate quickly;

[0159] Drive power: reflects the power output of the motor and is related to the vehicle's acceleration performance and maximum speed. The use pattern of drive power can reflect the driver's driving style, such as whether they tend to use high power for rapid acceleration;

[0160] Accelerator pedal position: directly reflects the driver's control over acceleration. Frequent and large changes in pedal position may indicate that the driver has an aggressive driving style.

[0161] Brake pedal position: reflects the driver's control over the brakes. Frequent or heavy braking may indicate a more conservative driving style or the need for more braking to cope with traffic conditions.

[0162] Air conditioning equipment switching value: The use of air conditioning affects the vehicle's energy consumption. Frequent use of air conditioning may indicate that the driver has a high demand for comfort, or that the external environmental conditions (such as high or low temperatures) require air conditioning adjustment;

[0163] Mileage: records the total distance traveled by the vehicle, which can reflect the driver's driving habits and the frequency of vehicle use;

[0164] Power consumption: This indicates the amount of electricity a vehicle consumes while driving, and is related to energy efficiency and range. Power consumption patterns can reflect a driver's driving habits, such as frequent high-speed driving or use of high-power devices.

[0165] Corresponding to the aforementioned embodiment of a method for weakly supervised driving range estimation and driving behavior analysis using a combined mechanism, the present invention also provides an embodiment of a device for weakly supervised driving range estimation and driving behavior analysis using a combined mechanism.

[0166] See also Figure 3 An embodiment of the present invention provides a device for weakly supervised driving range estimation and driving behavior analysis with a combined mechanism, including a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it is used to implement a method for weakly supervised driving range estimation and driving behavior analysis with a combined mechanism in the above embodiment.

[0167] The embodiment of the weakly supervised mileage estimation and driving behavior analysis device with a combined mechanism provided by the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, if Figure 3 As shown, it is a hardware structure diagram of a device with data processing capability for a weakly supervised mileage estimation and driving behavior analysis device provided by the present invention, except Figure 3In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the device in the embodiment is located may also include other hardware based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0168] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0169] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present invention. Those of ordinary skill in the art can understand and implement the present invention without inventive work.

[0170] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method for weakly supervised mileage estimation and driving behavior analysis combining the above-mentioned mechanisms is implemented.

[0171] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be an external storage device of any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.

[0172] The above embodiments are used to illustrate the present invention rather than to limit the present invention. Any modifications and changes made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.

Claims

1. A method for weakly supervised driving range estimation and driving behavior analysis based on a combined mechanism, characterized in that: include: S1, obtaining vehicle driving data, environmental condition data, battery status data and driving range data of the pure electric vehicle; S2, calculates the transfer entropy of vehicle driving characteristics and environmental condition characteristics on driving range; S3, screening the features most relevant to the driving range of pure electric vehicles based on transfer entropy; S4, constructing a priori physical model of driving range; S5, determine the input features and latent variable features of the variational autoencoder (VAE) model and divide the model into training and validation sets; S6, build the VAE model, set the number of neural network layers of the encoder and decoder, the number of neurons in each layer, the learning rate, the distribution of the encoder output, and the training data batch size; S7, training the VAE model, inputting vehicle driving data and environmental condition data into the VAE model for forward calculation, calculating the loss function value of the VAE model, and using the momentum gradient descent method to update the VAE model parameters to complete the VAE model training; The loss function of the VAE model consists of three parts: the evidence lower bound loss, the physical loss, and the causal loss. The evidence lower bound loss is used to measure the gap between the sample reconstructed by the VAE model and the original sample, as well as the distance between the distribution of the latent variables generated by the VAE model and their prior distribution. The physical loss is used to measure the degree to which the latent variables generated by the VAE model and the input features meet the prior physical model of driving range. The causal loss is used to measure the gap between the causal relationship between the latent variables generated by the VAE model and the true causal relationship. S8, uses the encoder part of the trained VAE model to estimate the driving range of the pure electric vehicle, and uses the decoder part of the trained VAE model to infer the driving behavior.

2. The method according to claim 1, characterized in that The vehicle driving data features include insulated gate bipolar transistor chip temperature, motor torque, motor speed, drive power, voltage extreme value, accelerator pedal position, brake pedal position, air conditioning equipment switch value, mileage, power consumption, and the vehicle driving data feature set is represented as DR, where the number of features included is N. DR The environmental condition data features include the ambient temperature, wind speed, and road condition data outside the vehicle. The environmental condition data feature set is represented as EN, where the number of features included is N EN The battery status data features include battery charging status, battery health status data, and the battery status data feature set is represented as BS, where the number of features included is N BS The mileage data is represented as MI, which indicates the mileage that the vehicle can continue to travel; the observation time of each feature data is represented as T, and the number of samples included is represented as n total .

3. The method according to claim 2, characterized in that The calculation formula of the transfer entropy is as follows: T CAV→REV =H(REV t |REV t-1:t-L )-H(REV t |REV t-1:t-L ,CAV t-1:t-L ) Among them, REV represents the target variable, REV t Represents the observed value of REV at time t, REV t-1:t-L Represents the historical data of L time steps before REV; CAV represents the cause variable, CAV t-1:t-L represents the historical data of the previous L time steps of CAV; H(·|·) represents the conditional entropy, and its processing process is as follows: H(REV t |REV t-1:t-L )=-∑p(REV t-1:t-L )∑p(REV t |REV t-1:t-L )log p(REV t |REV t-1:t-L )H(REV t |REV t-1:t-L ,CAV t-1:t-L )=-∑p(REV t-1:t-L ,CAV t-1:t-L )∑p(REV t |REV t-1:t-L ,CAV t-1:t-L )log p(REV t |REV t-1:t-L ,CAV t-1:t-L ) Where p(·) represents the probability density function of the variable.

4. The method according to claim 3, characterized in that S3 is specifically: the transfer entropy threshold is TH, and the feature set X with the greatest correlation to the vehicle's driving range is screened by comparing the threshold, where the number of features is N X , the processing process is as follows: X={CAV|T CAV→REV >TH,CAV∈{DR,EN},REV∈{BS,MI}} And set the feature set Z = {BS, MI}, where the number of features is N Z , merge the corresponding data sets in feature set X and Z on the time axis to obtain the total data set in Representation dataset The characteristic dimension of Alternatively, the number of features is preset, and the transfer entropy values ​​of the features are calculated and sorted, thereby identifying and selecting the features with the highest correlation with the vehicle range estimation to form a set X.

5. The method according to claim 4, characterized in that The driving range a priori physical model is constructed through expert experience, and represents the approximate physical relationship satisfied between the feature set X and the feature set Z obtained by S3. The driving range a priori physical model is uniformly represented by the vector function f(·) as f(X, Z)=0.

6. The method according to claim 5, characterized in that In S5, the input feature of the VAE model is set to X, the latent variable feature is set to Z, and the dataset is divided into Divide into training set and validation set Where n1=0.9n total , n2=0.1n total .

7. The method according to claim 6, characterized in that The construction of the VAE model is specifically as follows: The structure of the encoder of the VAE model is set to a multi-layer perceptron, and the number of neurons in the input layer of the encoder is set to N X , the number of neurons in the output layer is set to 2N Z , the number of hidden layers included in the encoder is L H , the number of neurons contained in each hidden layer is N l , l=1,2,...,L H ; The structure of the decoder of the VAE model is set to a multi-layer perceptron, and the number of neurons in the input layer of the decoder is set to N Z , the number of neurons in the output layer is set to N X , the number of hidden layers included in the decoder is L H ; Set the learning rate of the variational autoencoder to l r ; Set the encoder output It obeys the multidimensional standard normal distribution, that is, N Z ×N Z Identity matrix; set the training data batch size to n b .

8. The method according to claim 7, characterized in that The forward propagation of the VAE model includes: The training set Divide into multiple batches of data, each of which contains n b samples; The encoder in the VAE model maps the input feature X to the mean and variance of independent exogenous variables ∈, which are calculated as follows: h0=X h k =σ i (W k h k-1 +b k ),k=1,2,...,L H Among them, h k represents the output vector of the kth hidden layer of the encoder; W k , b k Represent the weight coefficient and bias coefficient of the kth hidden layer of the encoder respectively; W out , b out Represent the weight coefficient and bias coefficient of the encoder output layer respectively; {σ i , σ out } represents the rectified linear unit activation function used in the hidden layer; is the estimated value of the mean of the encoder pair ∈, Δ∈ is the estimated value of the variance obeyed by the encoder pair ∈, through and Δ∈ to get the estimated value The processing process is as follows: Where exp(·) represents the exponential function with natural exponential as the base; ⊙ represents the Hadamard product; the random vector And obtained by sampling from the standard normal distribution; The causal layer in the VAE model converts the exogenous variables output by the encoder into The linear mapping to the estimated value of Z is expressed as Assume that the features of feature set Z satisfy the linear structural causal model, the specific form of which is as follows: Z=A T Z+∈ Among them, the correlation matrix It is a strict upper triangular matrix, ∈ is an independent exogenous variable; the above formula shows that the features in Z can generate each other, and the elements in A are the causal effect coefficients between the features of Z; the conversion relationship between Z and the independent exogenous variable ∈ is obtained from the above formula: Z=(I-A T ) -1 ∈ In the above formula, the estimated value of the independent exogenous variable ∈ Has been output by the encoder, the causal layer passes Linear mapping to obtain estimated values The mapping process is as follows: The association matrix A is used as a trainable parameter of the causal layer, and the element values ​​are automatically adjusted during the model training process; The decoder in the VAE model will estimate the Mapped to estimated values ​​of input features The calculation process is as follows: h′ k =σ i (W′ k h′ k-1 +b′ k ),k=1,2,…,L H in, Represents the decoder's reconstruction of the input feature, h′ k represents the output vector of the kth hidden layer of the decoder; W′ k , b′ k Represent the weight coefficient and bias coefficient of the kth hidden layer of the decoder respectively; W′ out , b′ out Represent the weight coefficient and bias coefficient of the decoder output layer respectively; {σ i , σ out } represents the rectified linear unit activation function used in the hidden layer.

9. The method according to claim 8, characterized in that The total loss function of the VAE model consists of three parts: evidence lower bound loss, physical loss and causal loss; The evidence lower bound loss l ELBO The calculation process is as follows: in, Indicates the calculation of expectations in the training set; u represents the label value sampled from the data set corresponding to Z; φ represents the set of all weight coefficients and bias coefficients in the encoder; q φ (∈|X,u) represents the conditional distribution of the exogenous variable ∈ generated by the encoder, q φ (Z|X,u) represents the conditional distribution obeyed by the latent variable Z generated by the causal layer; p ∈ (∈) is the prior distribution of exogenous variables; θ represents the set of all weight coefficients and bias coefficients in the decoder; p θ (X|Z) represents the conditional distribution of the variable reconstructed by the decoder; p(Z|u) represents the prior probability of Z estimated by the true sample value u; D KL (·||·) represents the KL divergence between two distributions; The physical loss phy The calculation process is as follows: in, Used to measure the input features X of the encoder and the output features of the causal layer The degree to which the a priori physical model of driving range is satisfied between Used to measure the input features of the decoder And the output features The degree to which the a priori physical model of driving range is satisfied between The causal loss calculation process is as follows: in, Indicates use Obey the conditional distribution q φ (Z|X,u) solution The expected value of η i is random noise, tr represents the trace of the solution matrix, k1 and k2 represent small positive numbers; is the estimated value of the i-th feature of Z, output by the causal layer; A i represents the i-th row of matrix A; l u Aims to constrain A to satisfy the causal relationship between the true label values ​​of Z; m Aims to constrain A to satisfy the latent variables obtained through causal layer mapping The causal relationship between them; H(A) aims to constrain A to maintain an acyclic structure; The training process of the VAE model is transformed into the following optimization problem: min-l ELBO The above optimization problem is transformed using the Lagrange multiplier method to obtain the total loss function L total , the processing process is as follows: min L total =-l ELBO +αH(A)+βl u +γl m +μl phy Among them, {α, β, γ, μ} are the weight coefficients corresponding to causal constraints and physical constraints.

10. The method according to claim 9, characterized in that The specific application process in S8 is as follows: vehicle driving data and environmental condition data are collected in real time through the vehicle side, and after feature screening, the data is input into the encoder of the trained VAE model, and the estimated value of the driving range is output through the causal layer; the current vehicle's driving range and battery status data features are directly input into the decoder of the trained VAE model, and the current vehicle driving data features are estimated through the decoder, thereby inferring the current driver's driving behavior.

Citation Information

Patent Citations

  • Monocular visual odometer method based on Kalman pose estimation network

    CN114663496A

  • Driving situation reasoning method based on metadata driving and causal analysis theory

    CN117217314A

Cited By

  • Gobi area highway carbon emission reinforcement learning prediction method

    CN121684220A