CN117150882A - Engine oil consumption prediction method, system, electronic equipment and storage medium - Google Patents

Engine oil consumption prediction method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN117150882A
CN117150882A CN202310901984.XA CN202310901984A CN117150882A CN 117150882 A CN117150882 A CN 117150882A CN 202310901984 A CN202310901984 A CN 202310901984A CN 117150882 A CN117150882 A CN 117150882A
Authority
CN
China
Prior art keywords
engine
data
oil consumption
lstm
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310901984.XA
Other languages
Chinese (zh)
Inventor
向佳豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inceptio Star Intelligent Technology Shanghai Co Ltd
Original Assignee
Inceptio Star Intelligent Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inceptio Star Intelligent Technology Shanghai Co Ltd filed Critical Inceptio Star Intelligent Technology Shanghai Co Ltd
Priority to CN202310901984.XA priority Critical patent/CN117150882A/en
Publication of CN117150882A publication Critical patent/CN117150882A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/15Vehicle, aircraft or watercraft design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/17Mechanical parametric or variational design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/06Power analysis or power optimisation

Abstract

The invention provides an engine oil consumption prediction method, an engine oil consumption prediction system, electronic equipment and a storage medium, wherein real-time operation data of an engine are obtained; classifying real-time operation data of the engine to obtain the current operation condition of the engine; determining an LSTM engine oil consumption simulation model corresponding to the current operation condition of the engine from a plurality of LSTM engine oil consumption simulation models corresponding to the operation conditions of the plurality of engines, inputting real-time operation data of the engine into the determined LSTM engine oil consumption simulation model to obtain an engine oil consumption instant oil consumption prediction result under the current operation condition of the engine, and better understanding a time sequence relation in the input data due to the fact that the LSTM model has strong sequence modeling capability and long-term dependency capturing capability, so that accuracy of oil consumption prediction is improved; by classifying input data and training a corresponding LSTM model for each class independently, accurate prediction of fuel consumption under various working conditions can be achieved.

Description

Engine oil consumption prediction method, system, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of fuel consumption prediction, in particular to an engine fuel consumption prediction method, an engine fuel consumption prediction system, electronic equipment and a storage medium.
Background
The fuel efficiency of an engine is one of the key factors for vehicle performance and sustainability. The instantaneous fuel consumption rate of an engine is an important measure of the fuel efficiency of the engine, which is very sensitive to variations in driving behavior and vehicle operating conditions. Thus, accurately predicting engine instantaneous fuel consumption is an important challenge in optimizing vehicle performance and achieving energy efficiency. Conventional engine fuel consumption estimation methods include a physics-based model, a data-based model, and a statistics-based model. However, these methods often require a large amount of data such as a priori knowledge and feature engineering, and occupy a large amount of computation resources, and limit the application conditions or vehicle types of the models due to the poor adaptive capacity of the algorithms involved in the models.
Disclosure of Invention
The invention provides an engine oil consumption prediction method, an engine oil consumption prediction system, electronic equipment and a storage medium, which are used for solving the defects that the traditional engine oil consumption estimation method needs a large amount of data, occupies a large amount of calculation resources to influence the accuracy of an oil consumption prediction result and the application range of a model is restricted.
The invention provides an engine oil consumption prediction method, which comprises the following steps:
acquiring real-time operation data of an engine;
Classifying the real-time operation data of the engine to obtain the current operation condition of the engine;
determining an LSTM engine oil consumption simulation model corresponding to the current operation condition of the engine from a plurality of LSTM engine oil consumption simulation models corresponding to a plurality of engine operation conditions, wherein each LSTM engine oil consumption simulation model in the plurality of LSTM engine oil consumption simulation models is obtained by training based on engine operation data under the corresponding engine operation condition in the plurality of engine operation conditions;
and inputting the real-time running data of the engine into the determined LSTM engine oil consumption simulation model to obtain an engine oil consumption instant oil consumption prediction result under the current running condition of the engine.
According to the method for predicting the fuel consumption of the engine provided by the invention, the classification of the real-time operation data of the engine comprises the following steps:
and classifying the engine real-time operation data by using a pre-constructed cluster model, wherein the cluster model is constructed based on a plurality of engine operation data, and a plurality of cluster classes included in the cluster model correspond to the plurality of engine operation conditions.
According to the engine oil consumption prediction method provided by the invention, the clustering model construction method comprises the following steps:
Randomly selecting a plurality of engine operation history data from the engine operation history data set as a mean vector of the initial working condition cluster class;
dividing the remaining engine operation history data in the engine operation history data set into a cluster of conditions nearest to it;
updating the average value vector of the working condition cluster class according to the average value of all engine operation history data in the same working condition cluster;
and (3) until the preset iteration times are reached or the mean value vector of the working condition cluster is not changed any more, completing the construction of the clustering model.
According to the method for predicting the engine oil consumption provided by the invention, the training process of the LSTM engine oil consumption simulation model comprises the following steps:
extracting engine parameter data of a plurality of time steps from engine operation history data under the engine operation working conditions corresponding to the LSTM engine oil consumption simulation model by using a sliding window, and marking engine oil consumption target data for the engine parameter data of each time step;
inputting the engine parameter data of the time steps into the LSTM engine oil consumption simulation model to obtain engine oil consumption prediction data;
measuring the prediction error of the LSTM engine oil consumption simulation model according to a loss function constructed by the engine oil consumption target data and the engine oil consumption prediction data;
And according to the prediction error, updating parameters of the LSTM engine oil consumption simulation model by using a back propagation algorithm.
According to the engine fuel consumption prediction method provided by the invention, the output layer of the LSTM engine fuel consumption simulation model comprises a full connection layer, and the full connection layer is used for reducing the length of output data to 1.
According to the method for predicting the engine oil consumption provided by the invention, before inputting the real-time engine operation data under the current engine operation condition into the LSTM engine oil consumption simulation model corresponding to the current engine operation condition, the method further comprises the following steps:
performing mean value filtering convolution operation on the real-time operation data of the engine under the current operation condition of the engine to obtain real-time operation stable data of the engine under the current operation condition of the engine;
and inputting the real-time running stability data of the engine under the current running working condition of the engine into an LSTM engine oil consumption simulation model of the corresponding working condition to obtain an engine oil consumption instant oil consumption prediction result under the corresponding working condition.
According to the method for predicting the fuel consumption of the engine provided by the invention, after the real-time operation data of the engine is obtained, the method further comprises the following steps:
And cleaning the real-time running data of the engine to filter out impurity data, wherein the impurity data comprises at least one of diesel particulate filter regeneration period data, reverse gear data, neutral sliding data and brake data.
According to the method for predicting the fuel consumption of the engine, the real-time operation data of the engine comprise the following steps:
at least one of an actual torque of the engine, an engine speed and instantaneous fuel consumption data, a brake pedal and a gear;
the actual engine torque is calculated from the engine output torque and the engine torque loss.
The invention also provides an engine oil consumption prediction system, which comprises:
the acquisition module is used for acquiring real-time operation data of the engine;
the classification module is used for classifying the real-time operation data of the engine to obtain the current operation condition of the engine;
the determining module is used for determining an LSTM engine oil consumption simulation model corresponding to the current operation condition of the engine from a plurality of LSTM engine oil consumption simulation models corresponding to a plurality of engine operation conditions, wherein each LSTM engine oil consumption simulation model in the plurality of LSTM engine oil consumption simulation models is obtained by training based on engine operation data under the corresponding engine operation condition in the plurality of engine operation conditions;
And the prediction module is used for inputting the real-time running data of the engine into the determined LSTM engine oil consumption simulation model to obtain an engine oil consumption instant oil consumption prediction result under the current running condition of the engine.
The invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the engine oil consumption prediction method according to any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the engine fuel consumption prediction method of any one of the above.
According to the engine oil consumption prediction method, the system, the electronic equipment and the storage medium, real-time operation data of the engine are obtained; classifying real-time operation data of the engine to obtain the current operation condition of the engine; determining an LSTM engine oil consumption simulation model corresponding to the current operation condition of the engine from a plurality of LSTM engine oil consumption simulation models corresponding to a plurality of engine operation conditions, wherein each LSTM engine oil consumption simulation model in the plurality of LSTM engine oil consumption simulation models is obtained by training based on engine operation data under the corresponding engine operation condition in the plurality of engine operation conditions; inputting real-time running data of an engine into the determined LSTM engine oil consumption simulation model to obtain an engine oil consumption instant oil consumption prediction result under the current running condition of the engine, wherein the LSTM model has strong sequence modeling capability and long-term dependency capturing capability, so that a time sequence relation in the input data can be better understood, and the accuracy of oil consumption prediction is improved; by classifying input data and training a corresponding LSTM model for each class independently, accurate prediction of fuel consumption under various working conditions can be achieved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an engine fuel consumption prediction method provided by the invention;
FIG. 2 is a second flow chart of the method for predicting fuel consumption of an engine according to the present invention;
FIG. 3 is a third flow chart of the fuel consumption prediction method of the present invention;
FIG. 4 is a schematic view of a sliding window according to the present invention;
FIG. 5 is a schematic diagram of a gating cell and combination of LSTM provided by the present invention;
FIG. 6 is a graph of one-dimensional mean convolution effects provided by the present invention;
FIG. 7 is a schematic diagram of an LSTM model structure provided by the present invention;
FIG. 8 is a schematic diagram of a model construction process provided by the present invention;
FIG. 9 is a schematic diagram of a model reasoning process provided by the present invention;
FIG. 10 is a schematic diagram of an engine fuel consumption prediction system according to the present disclosure;
Fig. 11 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flowchart of an engine oil consumption prediction method provided by an embodiment of the present invention, where, as shown in fig. 1, the engine oil consumption prediction method provided by the embodiment of the present invention includes:
step 101, acquiring real-time operation data of an engine;
in an embodiment of the present invention, engine real-time operating data includes, but is not limited to:
the engine actual torque, the engine speed, the instantaneous fuel consumption data, the brake pedal, the gear and the like, wherein the engine actual torque is calculated according to the engine output torque and the engine torque loss.
In the embodiment of the invention, the actual torque and the engine speed are combined together to be used as input data, so that more accurate and comprehensive information can be provided, and the accuracy of predicting the instantaneous fuel consumption of the vehicle is improved. The adopted data source is closer to the working stage of the engine, and the data is accurate and reliable, so that the oil consumption prediction is more accurate. The engine real-time operation data can be acquired by using a sensor. The signals acquired by the sensor are converted into digital signals through an analog-to-digital converter (ADC), the digital signals are processed and stored by a microcontroller, the signals are transmitted through a CAN bus, the sampling frequency of instantaneous oil consumption is 10Hz, the rest sampling frequencies are 50Hz, the acquisition requirement of high-frequency data CAN be met, and the accuracy and the instantaneity of the data are ensured. The data may also be transmitted in real time to a remote computer for analysis and storage. In some embodiments of the invention, the method further comprises the step of carrying out data verification and error correction on the collected real-time engine operation data, so that the reliability and the integrity of the data are ensured.
102, classifying real-time operation data of an engine to obtain the current operation condition of the engine;
step 103, determining an LSTM engine oil consumption simulation model corresponding to the current operation condition of the engine from a plurality of LSTM engine oil consumption simulation models corresponding to a plurality of engine operation conditions, wherein each LSTM engine oil consumption simulation model in the plurality of LSTM engine oil consumption simulation models is obtained by training based on engine operation data under the corresponding engine operation condition in the plurality of engine operation conditions;
and 104, inputting the real-time engine operation data into the determined LSTM engine oil consumption simulation model to obtain an engine oil consumption instant oil consumption prediction result under the current engine operation condition.
In embodiments of the present invention, LSTM (Long Short-Term Memory) is a variant of a recurrent neural network that is specifically used to process and model sequence data. Compared with the traditional cyclic neural network model, the LSTM introduces a memory unit and a gating mechanism, so that the problem of long-term dependence can be effectively solved. By inputting different types of data into the LSTM model for training, the time dependence relationship between the data can be captured, and a more accurate instantaneous fuel consumption prediction result can be generated.
Conventional engine fuel consumption estimation methods include a physics-based model, a data-based model, and a statistics-based model. However, these methods often require a large amount of data such as a priori knowledge and feature engineering, and occupy a large amount of computation resources, and limit the application conditions or vehicle types of the models due to the poor adaptive capacity of the algorithms involved in the models.
The method for predicting the engine oil consumption provided by the embodiment of the invention obtains the real-time operation data of the engine; classifying real-time operation data of the engine to obtain the current operation condition of the engine; inputting real-time engine operation data under the current engine operation condition into an LSTM engine oil consumption simulation model corresponding to the current engine operation condition to obtain an engine oil consumption instant oil consumption prediction result under the corresponding condition; the LSTM engine oil consumption simulation model is obtained by training based on engine operation data under a plurality of working conditions, and because the LSTM model has strong sequence modeling capability and long-term dependency capturing capability, the time sequence relation in input data can be better understood, so that the accuracy of oil consumption prediction is improved; by classifying input data and training a corresponding LSTM model for each class independently, accurate prediction of fuel consumption under various working conditions can be achieved.
Based on any of the above embodiments, classifying the engine real-time operation data is a classification result obtained by inputting the engine real-time operation data into a cluster model constructed in advance. As shown in fig. 2, the cluster model construction method includes:
step 201, randomly selecting a plurality of engine operation history data from an engine operation history data set as a mean value vector of an initial working condition cluster class;
step 202, dividing the rest engine operation history data in the engine operation history data set into a working condition cluster nearest to the rest engine operation history data set;
step 203, updating the mean vector of the working condition cluster class according to the mean value of all engine operation history data in the same working condition cluster;
and 204, constructing a clustering model until the preset iteration times are reached or the mean value vector of the working condition cluster is not changed any more.
The clustering model comprises but is not limited to KMeans, GMM, differential, agglimerate, and the like, and the selection of the clustering model is not limited by the invention, and can be selected according to actual needs by a person skilled in the art.
In the embodiment of the invention, the clustering model is KMeans clustering, after KMeans clustering model construction is completed, data are classified into n clusters, namely n public categories, and feature values of a classification center are stored.
In the embodiment of the invention, KMeans clustering in an unsupervised classification method is adopted to classify engine data according to three characteristics of actual torque of an engine, engine speed and oil consumption. The KMeans clustering algorithm can automatically classify data samples into different categories without the need for a pre-given category label. The method for unsupervised learning is suitable for the situation that the category cannot be determined in advance or the marked data is lacking, so that the data classification process is more automatic and efficient.
The KMeans clustering algorithm has an objective function of
Wherein r is ik Representing the ith sample x out of N samples i The division into cluster class k is 1, otherwise 0.u (u) k Representing the mean vector of cluster class k. The smaller the objective function J value, the higher the similarity of samples within the cluster. In the KMeans algorithm, the EM algorithm idea is adopted to realize the minimization of the objective function.
Initializing mean vectors of K clusters, i.e. u k For a constant, find r when J is minimized ik . It is known that J is the smallest when a data point is classified into the cluster closest to the data point. Known r ik When the u corresponding to the minimum J is calculated k . Let the objective function J vs. u k Is biased to 0, i.e
Obtaining
I.e. the cluster center is equal to the mean of the belonging cluster samples.
In the judging of the data category, the Euclidean distance between each data point of time sequence data and each classification center is calculated, and then the average value of all data points is taken as the distance between the time sequence data and each classification center, namely
For the data point at the j-th moment, m is the length of the time sequence data, u i Is the cluster center feature of class i. If the distance to the ith classification center is the smallest, the set of data is determined to be the ith class. Namely there is
c=argmin(d i )
Inputting the data into the trained LSTM model of the corresponding category to obtain the prediction result of the model.
In the embodiment of the invention, the engine data is subjected to clustering classification in advance, the LSTM model is trained for different types of data, the instantaneous fuel consumption of the vehicle can be predicted more accurately, and meanwhile, the characteristics of different types of data can be adapted better by combining KMeans clustering and personalized model training, so that the applicability and generalization capability of the model are improved. The embodiment of the invention adopts classification and regression, and has the following advantages:
there may be a large difference in the operating conditions and characteristics of the engine under different conditions. For example, the torque and rotational speed of the engine may vary significantly during low-speed travel and high-speed travel. By classifying the working condition data, the data under similar working conditions can be clustered together, so that the regression model can better adapt to and capture the specific mode and relation of each working condition.
Engine operating condition data tends to have large fluctuations and noise, and may be affected by various factors. These fluctuations can pose challenges to the accuracy and stability of the regression model. By first performing data classification, the data samples can be divided into more similar subsets, and then a regression model is trained on each subset. Such classification may help reduce the impact of data volatility, making the regression model more stable and reliable.
The engine behavior and the fuel consumption mode may have differences under different working conditions, so that a specific regression model can be constructed for different working conditions by using a method of classifying before regressing. The classification of each working condition can make the model concentrate on specific characteristics and influencing factors under the working condition, and the prediction capability of the model on each working condition is improved.
In the engine operating condition dataset, some operating conditions may occur more frequently, while other operating conditions may be relatively less. This results in data imbalance. Through classifying before regressing, the model training strategy can be adjusted for each working condition according to the problem of unbalance of the sample number of different working conditions, and the prediction accuracy of few working conditions is improved.
Based on any of the above embodiments, as shown in fig. 3, the training process of the LSTM engine fuel consumption simulation model includes:
step 301, extracting engine parameter data of a plurality of time steps from engine operation history data under an engine operation condition corresponding to an LSTM engine oil consumption simulation model by using a sliding window, and labeling engine oil consumption target data for the engine parameter data of each time step;
in the embodiment of the invention, the historical data of the instantaneous oil consumption of the engine is acquired by using a sliding window technology, so that the change rule of the oil consumption of the engine can be better analyzed, the prediction accuracy is improved, and the form of the sliding window is shown in figure 4. In the embodiment of the invention, the data segment with the length of 2s is adopted to predict the instantaneous fuel consumption data at the next moment. Since the sampling frequency of the data is 50Hz, the length of the input data is 100 and the length of the output data is 1. Each piece of data has a length of 101, a sliding window with the length of 101 is needed to be adopted on the preprocessed data to generate time continuous data, the data of the first 100 moments are input into the model, and the data of the last moment are output. The characteristics of the sliding window adopted to generate the data set include abundant samples, controllable scale, good continuity, easy processing, high effectiveness and the like, an effective data basis is provided for oil consumption prediction, and the prediction capability and practicality of the model are improved.
Step 302, inputting engine parameter data of a plurality of time steps into an LSTM engine oil consumption simulation model to obtain engine oil consumption prediction data;
in the embodiment of the invention, the method further comprises the step of normalizing the data used for training before the data are input into the LSTM engine oil consumption simulation model so as to eliminate dimension differences among the data and improve the accuracy of the model. The normalization means employed being linear normalization, i.e
Wherein x is input data, x' is normalized data, and min (x) is the minimum value of the input data; max (x) is the maximum value of the input data.
When the data is normalized in the preprocessing stage, the maximum and minimum values of each feature are required to be stored as local files, so that the output of the model is inversely normalized in the data post-processing stage, and the model output is restored to the predicted oil consumption value.
Step 303, measuring the prediction error of the LSTM engine oil consumption simulation model according to the loss function constructed by the engine oil consumption target data and the engine oil consumption prediction data;
and 304, updating parameters of the LSTM engine oil consumption simulation model by using a back propagation algorithm according to the prediction error.
In the embodiment of the invention, an LSTM engine oil consumption simulation model is constructed based on PyTorch, and an output layer of the LSTM engine oil consumption simulation model comprises a full connection layer, wherein the full connection layer is used for reducing the length of output data to 1.
PyTorch is a scientific computation library based on Python and is mainly used for deep learning research and development. The method is characterized by a dynamic graph mechanism, and can provide a flexible and efficient deep learning model construction method. Compared with other deep learning frameworks, such as TensorFlow and the like, the model learning curve constructed by PyTorch is smoother and is widely applied to the scientific research field. The embodiment of the invention adopts the time sequence information of the engine history state, and uses LSTM to learn the time-space characteristics of the engine time sequence information so as to predict the instantaneous oil consumption of the engine at the next moment. An LSTM model was constructed using PyTorch with an input data length of 100 and a feature number of 2. Meanwhile, since the length of the output data is 1 and the feature number is 1, a full connection layer needs to be added behind the LSTM model, and the shape of the output data is reduced to 1.
In the embodiment of the invention, the key idea of the LSTM is to control the flow of information and the updating of memory through a gating unit. It is composed of three gating units: input Gate (Input Gate): it is determined how much information entered at the current time will be added to the memory cell. Forget Gate (Forget Gate): it is decided which information in the memory cell will be forgotten at the current moment. Output Gate (Output Gate): it is determined how much information in the memory cell will be output at the current time. Each gating cell consists of a sigmoid activation function and element-wise multiplication operation, which enables the LSTM to selectively update and pass information based on the input and the state at the last instant. The gating cells and combinations of LSTM are shown in fig. 5. The memory unit of the LSTM can retain and transfer information over a long time frame, enabling it to capture long-term dependencies in the sequence data. This makes LSTM excellent in handling tasks such as natural language processing, speech recognition, time series prediction, etc.
During training, LSTM performs parameter optimization by back propagation algorithm. It can be expanded through multiple time steps and use error back propagation to update weights and offsets to minimize the prediction error of the model.
The traditional method modeling mainly adopts a physical model or a statistical method modeling, and requires a great deal of priori knowledge, characteristic engineering and a higher degree of vehicle expertise. Meanwhile, the problem of great difficulty in parameter estimation exists in modeling of a physical model. The physical model usually involves a plurality of physical processes, and estimation needs to be performed on each parameter, but the problems of insufficient data or insufficient data precision are often faced, so that modeling results are inaccurate. The embodiment of the invention utilizes the LSTM neural network to predict, and does not need a great deal of data, calculation resources and priori knowledge. The adopted data source is closer to the working stage of the engine, and the data is accurate and reliable, so that the oil consumption prediction is more accurate.
The traditional method is often poor in modeling a complex nonlinear system. According to the embodiment of the invention, the LSTM neural network is used for modeling, so that the complex dynamic change of the instantaneous fuel consumption rate of the engine can be effectively captured, and the prediction accuracy is improved.
The engine oil consumption model constructed by the traditional method does not have strong self-adaptive capacity. The embodiment of the invention can automatically learn the characteristics by using the LSTM neural network, has strong self-adaptive capacity, and can predict in different working conditions and vehicle types.
In some embodiments of the present invention, before inputting real-time engine operation data under a current engine operation condition into the LSTM engine oil consumption simulation model corresponding to the current engine operation condition, the method further includes:
performing mean value filtering convolution operation on the real-time operation data of the engine under the current operation condition of the engine to obtain real-time operation stable data of the engine under the current operation condition of the engine;
and inputting the real-time running stability data of the engine under the current running working condition of the engine into an LSTM engine oil consumption simulation model of the corresponding working condition to obtain an engine oil consumption instant oil consumption prediction result under the corresponding working condition.
Applying mean filtering one-dimensional convolution before the LSTM model may help reduce the volatility of the data, smooth the input data, and further improve the stability and accuracy of the prediction results.
In the embodiment of the invention, the vehicle data acquired from the CAN has the problems of noise, abnormal value and the like, the data fluctuation is large, and the direct input network training effect is not ideal. In the network constructed by the scheme, a layer of one-dimensional mean filtering convolution is added to reduce the fluctuation and noise of data so as to improve the stability of input data and the performance of a model.
One-dimensional convolution operations use one convolution kernel (also known as a filter or feature detector) to scan the input data and generate an output by performing a convolution operation between the convolution kernel and the input data. A convolution kernel is a small window or kernel whose parameter values are learned or manually set by a training process. In one-dimensional convolution, the convolution kernel slides over the input data, multiplying by one element at a time with a subsequence of the input data and summing to obtain an element of the convolution output. The formula is as follows
Wherein S (n) is a convolution result sequence with a length of l f(m) +l g(m) -1, f (m) is the convolved vector and g (m) is the convolution kernel. By changing the parameters (weights) of the convolution kernel or using different convolution kernels, one-dimensional convolution can detect different features and patterns in the input data.
The purpose of smoothing the data can be achieved by using the mean filtering convolution kernel, as shown in fig. 6, obvious noise exists in the original data, and the data is smoother after one-dimensional mean convolution. If the length of the convolution kernel is n, the weight values of the average filtering convolution kernel are all
In some embodiments of the present invention, after acquiring the real-time operation data of the engine, the method further includes:
And cleaning the real-time running data of the engine to filter out impurity data, wherein the impurity data comprises at least one of diesel particulate filter regeneration period data, reverse gear data, neutral sliding data and brake data.
In the embodiment of the invention, the acquired data is preprocessed to meet the requirement of the model on the data, and the output of the model is post-processed to improve the prediction precision. The quality of the data directly determines the model effect.
The sampling frequency of the instantaneous oil consumption is inconsistent with the frequency of the rest data, linear interpolation processing is carried out on the instantaneous oil consumption data, and the change frequency is increased to 50Hz. In order to obtain the oil consumption simulation model which is more fit with the characteristics of the engine, reverse gear data, neutral sliding data and braking data in the data need to be removed. Under these three conditions, the collected torque, speed and instantaneous fuel consumption data cannot be mapped by the model. The judging conditions of the three are as follows:
(1) Reverse gear data: data with a gear value of-1.
(2) Neutral coasting data: the gear value is not 0, but data of torque 0 is output.
(3) Brake data: data for a brake pedal position parameter greater than 0.
The data source vehicle of the embodiment of the invention is a diesel vehicle. During engine operation, a Diesel Particulate Filter (DPF) may be periodically regenerated to burn off particulates from the DPF. During this process, the engine operating conditions and emissions characteristics change, and the torque and speed versus engine fuel consumption mapping changes, which may negatively impact the data analysis. These data are not representative of actual engine fuel consumption conditions. Therefore, in order to ensure accuracy and reliability of the data, it is also necessary to remove the data of the DPF regeneration period from the data set. Thus, the data set can be more close to the actual engine working condition.
Based on any of the above embodiments, the LSTM engine fuel consumption simulation model structure is shown in fig. 7, and the engine fuel consumption prediction process is shown in fig. 8, and includes:
(1) Model training
And according to the clustering grouping of the data preprocessing stage, the data set of each class is divided into a training set, a verification set and a test set. The training set is used for training the model, the verification set is used for verifying the effect of the model, and the test set is used for testing the generalization capability of the model. Next, for each sample, historical data and target data for a plurality of time steps are extracted using a sliding window approach. The historical data is input into the LSTM model, which is trained to predict the target data.
During model training, the loss function is used to measure the prediction error of the model and the back propagation algorithm is used to update the parameters of the model. While some optimization algorithm is used to accelerate the training process of the model. Model parameters are saved at regular intervals and training effects and model performance are evaluated using a validation set.
(2) Model testing
In the test part, the test set is input into a trained LSTM engine oil consumption simulation model to obtain a prediction result of the model.
The prediction results of the model are compared with the true values after post-processing, and an evaluation index such as Mean Square Error (MSE) or the like is used to measure the performance of the model.
(3) Model reasoning and data post-processing
In practical applications, as shown in fig. 9, the data acquired in real time needs to be processed using the same preprocessing measures.
The model can be embedded into a real-time system, the instantaneous oil consumption of the engine is predicted in real time, and the prediction result is output to the system for users to use.
The LSTM model adopted by the embodiment of the invention adopts parameters such as output torque, torque loss, rotating speed and the like, creatively adopts KMeans clustering to realize a prediction process of clustering first and then regression, and can predict the instantaneous fuel consumption of the engine in real time with high precision. Compared with the traditional method, the technical effect of the scheme has the following remarkable advantages:
high-precision fuel consumption prediction: by combining the actual torque with the engine speed and adopting the LSTM model to conduct fuel consumption prediction, the scheme can provide a high-precision fuel consumption prediction result. The LSTM model has strong sequence modeling capability and long-term dependency capturing capability, and can better understand the time sequence relation in input data, so that the accuracy of oil consumption prediction is improved.
Personalized model training: by classifying input data by adopting a KMeans clustering algorithm and independently training a corresponding LSTM model for each category, the scheme can realize personalized model training. Data of different categories often have different characteristics and modes, and through personalized model training, the method can be better adapted to the characteristics of the different data categories, and the prediction performance and accuracy of the model are improved.
The universality is strong: the LSTM model construction method adopted by the scheme can be suitable for engines and vehicles of different models. The adopted data only come from internal data, and the support of external condition data is not needed. And the prediction effect can be further improved through continuous accumulation of data sets and continuous training of models. The method has the characteristic of strong universality, and can provide support for practical application in the fields of vehicle management, energy conservation, emission reduction and the like.
Data stability and denoising effect are improved: by introducing mean filtering one-dimensional convolution before the LSTM model, the scheme can reduce the fluctuation and noise of input data and improve the stability and reliability of the data. The mean filtering one-dimensional convolution can smooth data fluctuation and remove high-frequency noise, so that input data is cleaner and more reliable, and the prediction effect and stability of a model are improved.
The data is accurate: the data collected by the scheme can directly reflect the characteristics related to the fuel consumption index of the engine, and the data processing part can effectively reduce interference data, so that training data is accurate and reliable. Meanwhile, the data of the DPF regeneration period is removed, and the accuracy and the effectiveness of the result are further improved.
According to the engine oil consumption prediction method provided by the embodiment of the invention, the adopted method of firstly classifying and then regressing can better adapt to the difference of working conditions, process the fluctuation of the data, construct a working condition specific model and solve the problem of unbalanced data when the working condition data of the engine are processed, so that the accurate prediction capability of the engine on the instantaneous oil consumption is improved, the instantaneous oil consumption of the engine is predicted in real time, and high-efficiency and accurate technical support can be provided for vehicle management, energy conservation, emission reduction and the like.
The engine oil consumption prediction system provided by the invention is described below, and the engine oil consumption prediction system described below and the engine oil consumption prediction method described above can be referred to correspondingly.
Fig. 10 is a schematic diagram of an engine fuel consumption prediction system provided by an embodiment of the present invention, where, as shown in fig. 10, the engine fuel consumption prediction system provided by the embodiment of the present invention includes:
an acquisition module 1001, configured to acquire real-time engine operation data;
in the embodiment of the invention, the data of output torque, engine torque loss, engine speed and instant oil consumption are collected through a CAN bus. In addition, there are vehicle data such as brake pedal, gear, etc.
The classification module 1002 is configured to classify real-time operation data of an engine to obtain a current operation condition of the engine;
A determining module 1003, configured to determine an LSTM engine fuel consumption simulation model corresponding to a current engine operating condition from a plurality of LSTM engine fuel consumption simulation models corresponding to a plurality of engine operating conditions, where each LSTM engine fuel consumption simulation model in the plurality of LSTM engine fuel consumption simulation models is obtained by training based on engine operating data under a corresponding engine operating condition in the plurality of engine operating conditions;
the prediction module 1004 is configured to input real-time engine operation data into the determined LSTM engine fuel consumption simulation model, and obtain an engine fuel consumption instantaneous fuel consumption prediction result under the current engine operation condition.
The embodiment of the invention further comprises a data preprocessing module, which is used for cleaning and normalizing the acquired data, so as to ensure the reliability and accuracy of the data. Meanwhile, the data are pre-clustered and classified, and LSTM training is prepared.
In the embodiment of the invention, the system further comprises an LSTM model training module which is used for constructing an LSTM engine simulation model, and the LSTM model is trained through historical data to obtain model parameters.
The embodiment of the invention further comprises a data post-processing module for carrying out inverse normalization on the output of the LSTM model to obtain a final instantaneous fuel consumption predicted value.
The engine oil consumption prediction system provided by the embodiment of the invention obtains the real-time operation data of the engine; classifying real-time operation data of the engine to obtain the current operation condition of the engine; inputting real-time engine operation data under the current engine operation condition into an LSTM engine oil consumption simulation model corresponding to the current engine operation condition to obtain an engine oil consumption instant oil consumption prediction result under the corresponding condition; the LSTM engine oil consumption simulation model is obtained by training based on engine operation data under a plurality of working conditions, and because the LSTM model has strong sequence modeling capability and long-term dependency capturing capability, the time sequence relation in input data can be better understood, so that the accuracy of oil consumption prediction is improved; by classifying input data and training a corresponding LSTM model for each class independently, accurate prediction of fuel consumption under various working conditions can be achieved.
Fig. 11 illustrates a physical structure diagram of an electronic device, as shown in fig. 11, which may include: processor 1110, communication interface Communications Interface 1120, memory 1130 and communication bus 1140, wherein Processor 1110, communication interface 1120 and Memory 1130 communicate with each other via communication bus 1140. Processor 1110 may invoke logic instructions in memory 1130 to perform an engine fuel consumption prediction method comprising: acquiring real-time operation data of an engine; classifying real-time operation data of the engine to obtain the current operation condition of the engine; inputting real-time engine operation data under the current engine operation condition into an LSTM engine oil consumption simulation model corresponding to the current engine operation condition to obtain an engine oil consumption instant oil consumption prediction result under the corresponding condition; the LSTM engine oil consumption simulation model is obtained by training based on engine operation data under a plurality of working conditions.
Further, the logic instructions in the memory 1130 described above may be implemented in the form of software functional units and sold or used as a stand-alone product, stored on a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the engine fuel consumption prediction method provided by the above methods, the method comprising: acquiring real-time operation data of an engine; classifying real-time operation data of the engine to obtain the current operation condition of the engine; inputting real-time engine operation data under the current engine operation condition into an LSTM engine oil consumption simulation model corresponding to the current engine operation condition to obtain an engine oil consumption instant oil consumption prediction result under the corresponding condition; the LSTM engine oil consumption simulation model is obtained by training based on engine operation data under a plurality of working conditions.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An engine fuel consumption prediction method, comprising:
acquiring real-time operation data of an engine;
classifying the real-time operation data of the engine to obtain the current operation condition of the engine;
determining an LSTM engine oil consumption simulation model corresponding to the current operation condition of the engine from a plurality of LSTM engine oil consumption simulation models corresponding to a plurality of engine operation conditions, wherein each LSTM engine oil consumption simulation model in the plurality of LSTM engine oil consumption simulation models is obtained by training based on engine operation data under the corresponding engine operation condition in the plurality of engine operation conditions;
And inputting the real-time running data of the engine into the determined LSTM engine oil consumption simulation model to obtain an engine oil consumption instant oil consumption prediction result under the current running condition of the engine.
2. The engine fuel consumption prediction method according to claim 1, wherein the classifying the engine real-time operation data includes:
and classifying the engine real-time operation data by using a pre-constructed cluster model, wherein the cluster model is constructed based on a plurality of engine operation data, and a plurality of cluster classes included in the cluster model correspond to the plurality of engine operation conditions.
3. The engine fuel consumption prediction method according to claim 2, characterized in that the cluster model construction method includes:
randomly selecting a plurality of engine operation history data from the engine operation history data set as a mean vector of the initial working condition cluster class;
dividing the remaining engine operation history data in the engine operation history data set into a cluster of conditions nearest to it;
updating the average value vector of the working condition cluster class according to the average value of all engine operation history data in the same working condition cluster;
and (3) until the preset iteration times are reached or the mean value vector of the working condition cluster is not changed any more, completing the construction of the clustering model.
4. The engine fuel consumption prediction method according to claim 1, wherein the training process of the LSTM engine fuel consumption simulation model includes:
extracting engine parameter data of a plurality of time steps from engine operation history data under the engine operation working conditions corresponding to the LSTM engine oil consumption simulation model by using a sliding window, and marking engine oil consumption target data for the engine parameter data of each time step;
inputting the engine parameter data of the time steps into the LSTM engine oil consumption simulation model to obtain engine oil consumption prediction data;
measuring the prediction error of the LSTM engine oil consumption simulation model according to a loss function constructed by the engine oil consumption target data and the engine oil consumption prediction data;
and according to the prediction error, updating parameters of the LSTM engine oil consumption simulation model by using a back propagation algorithm.
5. The engine fuel consumption prediction method according to claim 1 or 4, wherein the output layer of the LSTM engine fuel consumption simulation model includes a fully connected layer for narrowing the output data length to 1.
6. The method for predicting engine fuel consumption according to claim 1, wherein before inputting the real-time engine operation data under the current engine operation condition into the LSTM engine fuel consumption simulation model corresponding to the current engine operation condition, the method further comprises:
Performing mean value filtering convolution operation on the real-time operation data of the engine under the current operation condition of the engine to obtain real-time operation stable data of the engine under the current operation condition of the engine;
and inputting the real-time running stability data of the engine under the current running working condition of the engine into an LSTM engine oil consumption simulation model of the corresponding working condition to obtain an engine oil consumption instant oil consumption prediction result under the corresponding working condition.
7. The engine fuel consumption prediction method according to claim 1, characterized by further comprising, after the acquiring the engine real-time operation data:
and cleaning the real-time running data of the engine to filter out impurity data, wherein the impurity data comprises at least one of diesel particulate filter regeneration period data, reverse gear data, neutral sliding data and brake data.
8. The engine fuel consumption prediction method according to claim 1 or 7, characterized in that the engine real-time operation data includes:
at least one of an actual torque of the engine, an engine speed and instantaneous fuel consumption data, a brake pedal and a gear;
the actual engine torque is calculated from the engine output torque and the engine torque loss.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the engine fuel consumption prediction method of any one of claims 1 to 8 when the program is executed.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the engine fuel consumption prediction method according to any one of claims 1 to 8.
CN202310901984.XA 2023-07-20 2023-07-20 Engine oil consumption prediction method, system, electronic equipment and storage medium Pending CN117150882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310901984.XA CN117150882A (en) 2023-07-20 2023-07-20 Engine oil consumption prediction method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310901984.XA CN117150882A (en) 2023-07-20 2023-07-20 Engine oil consumption prediction method, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117150882A true CN117150882A (en) 2023-12-01

Family

ID=88908879

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310901984.XA Pending CN117150882A (en) 2023-07-20 2023-07-20 Engine oil consumption prediction method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117150882A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117763976A (en) * 2024-02-22 2024-03-26 华南师范大学 method and device for predicting lubricating oil quantity of aero-engine and computer equipment
CN117763976B (en) * 2024-02-22 2024-05-14 华南师范大学 Method and device for predicting lubricating oil quantity of aero-engine and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117763976A (en) * 2024-02-22 2024-03-26 华南师范大学 method and device for predicting lubricating oil quantity of aero-engine and computer equipment
CN117763976B (en) * 2024-02-22 2024-05-14 华南师范大学 Method and device for predicting lubricating oil quantity of aero-engine and computer equipment

Similar Documents

Publication Publication Date Title
CN110675623B (en) Short-term traffic flow prediction method, system and device based on hybrid deep learning
CN111985361A (en) Wavelet denoising and EMD-ARIMA power system load prediction method and system
CN110516305B (en) Intelligent fault diagnosis method under small sample based on attention mechanism meta-learning model
CN110647867B (en) Bearing fault diagnosis method and system based on self-adaptive anti-noise neural network
CN107944648B (en) Large ship speed and oil consumption rate prediction method
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
CN109145516B (en) Analog circuit fault identification method based on improved extreme learning machine
CN110020712B (en) Optimized particle swarm BP network prediction method and system based on clustering
CN111382906A (en) Power load prediction method, system, equipment and computer readable storage medium
AU2021101172A4 (en) Design and implementation of convolution neural network on edge computing smart phone for human activity recognition
CN111127364A (en) Image data enhancement strategy selection method and face recognition image data enhancement method
CN114819054B (en) Power electronic system state monitoring method based on physical information neural network
CN111881954A (en) Transduction reasoning small sample classification method based on progressive cluster purification network
CN112504682A (en) Chassis engine fault diagnosis method and system based on particle swarm optimization algorithm
CN116244647A (en) Unmanned aerial vehicle cluster running state estimation method
CN116702076A (en) Small sample migration learning fault diagnosis method, system, computer and storage medium based on CNN feature fusion
CN111967187B (en) Modeling method and equipment for predicting output data of starting process of gas turbine
CN117111464A (en) Self-adaptive fault diagnosis method under multiple working conditions
CN112287752A (en) Method for extracting early fault characteristics of rotating shaft of hydroelectric generator
CN117113086A (en) Energy storage unit load prediction method, system, electronic equipment and medium
CN117150882A (en) Engine oil consumption prediction method, system, electronic equipment and storage medium
CN115565611B (en) Biological regression prediction method, device, equipment and storage medium
CN117975124A (en) Medical image classification model training method and medical image classification method
Arzamastsev et al. THE METHODOLOGY OF DATA MINING USING ANN MODELS
CN117872127A (en) Motor fault diagnosis method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination