Convolutional neural network vehicle fuel consumption detection method based on ultrasonic sensor

By installing an ultrasonic sensor array on the vehicle and analyzing the fluid level changes of the fuel tank using a convolutional neural network, the problem of insufficient accuracy in complex operating conditions is solved, and high-precision and reliable fuel consumption detection is achieved.

CN120105018APending Publication Date: 2025-06-06浙江邦泰氢能科技有限公司
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510312486.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Traditional fuel consumption detection methods are difficult to accurately reflect the actual fuel consumption of the vehicle under complex operating conditions, and the sensors are susceptible to mechanical wear and environmental impacts, resulting in a decrease in measurement accuracy.

Method used

The convolutional neural network method based on ultrasonic sensors is adopted to monitor the fluid level changes of the fuel tank by installing an ultrasonic sensor array, and analyze the data using the convolutional neural network model to obtain the vehicle fuel consumption.

Benefits of technology

It realizes high-precision fuel consumption detection under complex operating conditions, reduces mechanical wear and environmental impact, and improves measurement reliability and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120105018A_ABST
    Figure CN120105018A_ABST
Patent Text Reader

Abstract

The invention discloses a convolutional neural network vehicle fuel consumption detection method based on ultrasonic sensors, and relates to the technical field of vehicle fuel consumption detection, and the method comprises the steps: 1, installing a plurality of ultrasonic sensor arrays on a vehicle, and monitoring the liquid level change of a fuel tank through the ultrasonic sensors; step 2, performing normalization processing on data acquired by the ultrasonic sensor, and eliminating differences caused by different measuring devices and measuring environments; and step 3, analyzing the preprocessed data through a convolutional neural network model to obtain the vehicle fuel consumption. According to the convolutional neural network vehicle fuel consumption detection method based on the ultrasonic sensor, the ultrasonic sensor is adopted, non-contact measurement is achieved, mechanical abrasion is reduced, key parameters related to fuel consumption, such as the fuel oil liquid level and the distance from a fuel spray nozzle to a combustion chamber can be accurately measured, and the fuel consumption can be accurately detected through accurate measurement of the parameters. And the actual fuel consumption of the diesel engine can be calculated more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle fuel consumption detection, and in particular to a convolutional neural network vehicle fuel consumption detection method based on an ultrasonic sensor. Background Art

[0002] Commercial vehicles with diesel engines, such as trucks and buses, undertake a large number of cargo and passenger transport tasks. They have long mileage and long working hours, so they consume a lot of energy. Accurate detection of vehicle fuel consumption is crucial to controlling operating costs and is directly related to the profitability of transportation and logistics companies. Through accurate monitoring and optimization of fuel consumption, companies can reasonably arrange transportation tasks and choose more economical and efficient routes, thereby reducing fuel consumption and improving economic benefits. Diesel engine exhaust emissions are one of the important sources of air pollution, among which greenhouse gas emissions such as carbon dioxide have a serious impact on global climate change. In the current context of global advocacy of sustainable development, reducing the energy consumption of diesel engines will not only help reduce the operating costs of enterprises, but also contribute to environmental protection. Accurate fuel consumption detection can provide data support for government departments and enterprises to formulate reasonable emission reduction targets, and promote green logistics and sustainable development.

[0003] Traditional fuel consumption detection methods mainly rely on sensors installed in the fuel system, such as fuel level sensors and fuel flow sensors. These sensors are easily affected by mechanical wear, corrosion, carbon deposition and other factors during long-term use, resulting in reduced measurement accuracy. Moreover, sensors of different brands and models have a certain error range. In the complex commercial vehicle operating environment, these errors may be further amplified, affecting the accuracy of fuel consumption detection results; the driving conditions of commercial vehicles with diesel engines are complex and diverse, including urban congested road conditions, highway driving, mountain climbing and other conditions. Under different working conditions, the vehicle's fuel injection strategy, combustion efficiency, etc. will change. Traditional fuel consumption detection methods are difficult to accurately adapt to various complex working conditions and cannot reflect the actual fuel consumption of the vehicle in real time and accurately; traditional fuel consumption detection systems usually use simple algorithms for data processing and analysis, and can only perform conventional statistics and analysis on limited data, making it difficult to mine deep information in the data. For example, it is impossible to analyze the impact of different driving behaviors, road conditions and other factors on fuel consumption based on a large amount of historical data and real-time driving data, so it is difficult to provide effective energy-saving and emission reduction guidance. Therefore, a convolutional neural network vehicle fuel consumption detection method based on ultrasonic sensors is proposed. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor, which solves the problems raised in the above-mentioned background technology.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: A vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor comprises the following steps: Step 1: Install several ultrasonic sensor arrays on the vehicle to monitor the change of the fuel tank liquid level through ultrasonic sensors; Regularly measure the tank level: determine the time interval and frequency of measurement to ensure the validity of the data; Correlation analysis between liquid level change and fuel consumption Assume the initial liquid level is , after a period of time The liquid level after The vehicle's mileage is , then the fuel consumption It can be approximately expressed as:

[0006] in, is the total volume of the oil tank, derivation process: the height of the liquid level drop Multiply by the total volume of the tank Get the consumed oil volume , divided by the mileage It is the fuel consumption per unit mileage; Step 2: First, normalize the data collected by the ultrasonic sensor to eliminate the differences caused by different measuring equipment and measuring environment; Step 3: Finally, the pre-processed data is analyzed through the convolutional neural network model to obtain the vehicle fuel consumption; The convolutional neural network model consists of an input layer, a convolution layer, an activation function layer, a pooling layer, a fully connected layer and an output layer; The input layer: input feature vector ,in Indicates characteristics (liquid level, speed, acceleration, throttle opening, intake air temperature, intake air pressure); The convolution layer: through the convolution kernel Perform convolution operation on the input to obtain features ; Assume the convolution kernel size is , the step length is , then the convolution operation can be expressed as:

[0007] The activation function layer: applies an activation function to the output of the convolutional layer , get the activated feature map :

[0008] The pooling layer: performs a pooling operation on the activated feature map, such as maximum pooling or average pooling, to obtain a pooled feature map ; Taking the maximum pooling as an example, set the pooling window size to , then the maximum pooling operation can be expressed as:

[0009] Multiple convolutional layers, activation function layers, and pooling layers can be stacked to gradually extract more advanced features; The fully connected layer: flattens the output of the pooling layer into a one-dimensional vector, and then performs a linear transformation through the fully connected layer. The weight matrix of the fully connected layer is , the bias vector is , then the output of the fully connected layer can be expressed as:

[0010] The output layer: outputs the predicted fuel consumption rate .

[0011] Optionally, the system based on the convolutional neural network vehicle fuel consumption detection method is composed of a sensor layer, a data processing layer, a CNN model layer and an output layer, and the sensor layer is composed of an ultrasonic sensor and a CAN bus; The ultrasonic sensor is used to monitor the change of the oil tank liquid level; The CAN bus is used to obtain vehicle status data such as vehicle speed, rotation speed, and load; The data processing layer includes signal preprocessing and data fusion; The signal preprocessing includes filtering and noise reduction, time-frequency analysis, and FFT to generate a spectrum diagram; The data fusion is used to align the ultrasonic data with the vehicle status data; The CNN model layer, input: 2D feature map: image converted from spectrum map / time series data, structure: convolution layer: extract local features + fully connected layer: regression prediction of fuel consumption; The output layer is used to send the real-time fuel consumption prediction value, which can be fed back to the vehicle system or the cloud platform.

[0012] Optionally, the training process of the convolutional neural network model includes: S1: data preparation stage, S2: model training stage, S3: deployment and iteration stage, and S4: performance evaluation and optimization stage.

[0013] Optionally, the S1: data preparation phase includes: S11: Data collection and synchronization; S111: Ultrasonic sensor data collection: During vehicle operation, the ultrasonic sensor measures the tank level every second and records the measurement timestamp; S112: CAN bus data acquisition: obtain the real-time status data of the vehicle through the CAN bus, including vehicle speed, speed, load, throttle opening, intake temperature, intake pressure, and record the timestamp; S113: Data synchronization: aligning the ultrasonic sensor data with the CAN bus data according to the timestamp to generate a synchronized data set; S12: Data cleaning and preprocessing; S121: Ultrasonic data cleaning and preprocessing; Filtering and noise reduction: Filter the liquid level data collected by the ultrasonic sensor to remove high-frequency noise and abnormal values; Normalization: Normalize the liquid level data to a range between 0 and 1 to eliminate differences caused by different measuring equipment and environments; S122: CAN bus data cleaning and preprocessing; S1221: Standardization cleaning process: standardize the CAN bus data to make its mean value 0 and standard deviation 1, and eliminate the influence of different data dimensions and ranges; S1222: Missing value preprocessing: interpolate or fill in missing data to ensure data integrity; S113: Data conversion and enhancement; S1131: Timing signal conversion: The synchronized timing signal is converted into a two-dimensional spectrum map (2D spectrum map) through short-time Fourier transform (STFT), and finally matched with the fuel injection amount of the vehicle ECU map; S1132: Data enhancement: Add noise: Add random noise to the spectrum to simulate interference in actual operation; Flip and rotate: horizontally flip and randomly rotate the spectrum graph to increase data diversity; Time warping: Randomly stretch and compress time series data on the time axis to simulate data changes at different driving speeds.

[0014] Optionally, the S2: model training phase includes: S21: Network structure construction S211: Input layer: input feature vectors, including liquid level, vehicle speed, rotation speed, load, throttle opening, intake air temperature, intake air pressure, coolant temperature, oil temperature, and engine operating mode; S212: Convolutional layer: Multiple convolutional layers are used to extract local features, with a convolution kernel size of 3×3 and a step size of 1; S213: Activation function layer: Use ReLU activation function to increase the nonlinear expression ability of the model; S214: Pooling layer: Use the maximum pooling layer with a pooling window size of 2×2 and a step size of 2 to reduce the size of the feature map; S215: Fully connected layer: Flatten the output of the pooling layer into a one-dimensional vector and perform linear transformation through the fully connected layer; S216: Output layer: output predicted fuel consumption rate; S22: Model initialization S221: Weight initialization: Use the Xavier initialization method to initialize the weights of the network to ensure the stability of the gradient during training; S222: Bias initialization: Initialize the bias to 0; S23: Training process S231: Forward propagation: input the preprocessed data into the network and calculate the predicted value of the output layer; S232: Loss calculation: Use mean square error (MSE) as the loss function to calculate the error between the predicted value and the actual value; S233: Back propagation: The gradient of the loss function with respect to the weights and biases of each layer is calculated through the back propagation algorithm; S234: Parameter update: Use the stochastic gradient descent (SGD) algorithm to update the weights and biases of the network with a learning rate of 0.01; S24: Verification and Adjustment S241: Validation set evaluation: After each training cycle, the validation set is used to evaluate the performance of the model and calculate the loss value and accuracy on the validation set; S242: Early stopping mechanism: If the loss value on the validation set does not decrease significantly within several consecutive cycles, the training is stopped to prevent overfitting; S243: Learning rate adjustment: Dynamically adjust the learning rate based on the performance on the validation set, such as halving the learning rate every 10 cycles.

[0015] Optionally, in the S3: deployment and iteration phase: S31: Model Lightweight S311: Depthwise Separable Convolution: Use depthwise separable convolution (DepthwiseSeparableConv) instead of standard convolution to reduce the amount of computation and model size; S312: Model pruning: remove unimportant weights and connections in the network to further compress the model; S32: Model deployment S321: Vehicle hardware adaptation: Deploy the lightweight model to the vehicle hardware device to ensure that the model can process data in real time; S322: Real-time data processing: The model receives ultrasonic sensor and CAN bus data in real time, makes fuel consumption predictions, and feeds back the results to the vehicle system or cloud platform; S323: Code conversion: Finally, the production deployment code (C++ code and weight data) is generated based on the training model, conversion model, weight and bias model and other data codes, distributed and edge deployment, effectively reducing computing power requirements; S33: Model iterative update S331: New data collection: During the actual operation of the vehicle, new data is continuously collected, including fuel consumption data under different working conditions; S332: Model retraining: Use newly collected data to retrain the model, optimize model parameters, and improve the accuracy and generalization ability of the model; S333: Regular update: Update the model regularly based on the collection of new data to ensure that the model can adapt to changes in vehicle operating conditions.

[0016] Optionally, the S4: performance evaluation and optimization phase: S41: Performance Evaluation S411: Accuracy evaluation: In the actual vehicle operating environment, compare the fuel consumption predicted by the model with the actual fuel consumption and calculate the error range; S412: Adaptability evaluation: Test the detection accuracy of the model under different road conditions (highways, mountain roads, ground roads, urban roads), working conditions (overload, heavy load, light load, standard load, no load) and weather (rainy days, snowy days, low temperature, high temperature, normal temperature); S413: Real-time evaluation: evaluate the real-time processing capability of the model to ensure that the model can provide real-time fuel consumption information during vehicle operation; S42: Optimization and Improvement S421: Feature extraction optimization: further optimize the feature extraction capability of the convolutional neural network and improve the adaptability of the model to complex working conditions; S422: Algorithm optimization: Introduce advanced algorithms such as reinforcement learning to optimize the model's adaptive capabilities and improve its ability to handle small sample data; S423: Hardware optimization: Optimize the performance of on-board hardware devices according to actual needs to ensure that the model can run efficiently.

[0017] The present invention provides a vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor, which has the following beneficial effects: 1. The vehicle fuel consumption detection method based on the convolutional neural network of ultrasonic sensors realizes non-contact measurement and reduces mechanical wear by adopting ultrasonic sensors. This ensures that mechanical wear will not be caused to the measured parts during the measurement process, reduces the possibility of sensor failure, and also avoids the impact on the structure of the vehicle itself. In commercial vehicles with diesel engines, frequent starts and stops and long-term operation can easily cause damage to traditional contact sensors. The non-contact measurement characteristics of ultrasonic sensors make their application in vehicles more reliable. Ultrasonic sensors have high measurement accuracy and can accurately measure key parameters related to fuel consumption, such as fuel level and the distance from the injector to the combustion chamber. By accurately measuring these parameters, the actual fuel consumption of the diesel engine can be calculated more accurately. In addition, the use of ultrasonic sensors can ensure the accuracy of measurement in various complex working environments due to their good adaptability and anti-interference ability.

[0018] 2. The convolutional neural network vehicle fuel consumption detection method based on ultrasonic sensors. The ultrasonic sensor can collect data in real time, and quickly process and analyze it through reasonable algorithms. It can calculate the remaining fuel through the fuel tank liquid level reflection signal, and provide drivers and managers with real-time fuel consumption information. This helps drivers to reasonably arrange driving strategies according to actual conditions, avoid unnecessary fuel consumption increases, and use deep separable convolution to reduce the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the system structure of the present invention; Figure 2 This is a flow chart of the convolutional neural network model training of the present invention. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0021] See also Figure 1 to Figure 2 The present invention provides a technical solution: a vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor, comprising the following steps: Step 1: Install several ultrasonic sensor arrays on the vehicle to monitor the change of the fuel tank liquid level through ultrasonic sensors; Step 2: First, normalize the data collected by the ultrasonic sensor to eliminate the differences caused by different measuring equipment and measuring environment; Step 3: Finally, the pre-processed data is analyzed through the convolutional neural network model to obtain the vehicle fuel consumption; Calculation principle of sound speed formula: Assume that the propagation speed of ultrasonic wave in the medium is (For the oil in the tank, the speed of sound is related to the properties of the oil). The time it takes for the ultrasonic wave to be transmitted and received is , then the liquid level in the tank is It can be calculated by the following formula:

[0022] Derivation process: The ultrasonic wave is emitted from the sensor to the oil surface, and then reflected from the oil surface back to the sensor. The total distance is , according to the formula that speed equals distance divided by time

[0023] Available

[0024] The convolutional neural network model consists of an input layer, a convolution layer, an activation function layer, a pooling layer, a fully connected layer, and an output layer; Input layer: input feature vector ,in Indicates characteristics (liquid level, speed, acceleration, throttle opening, intake air temperature, intake air pressure); Convolution layer: through the convolution kernel Perform convolution operation on the input to obtain features ; Assume the convolution kernel size is , the step length is , then the convolution operation can be expressed as:

[0025] Activation function layer: applies an activation function to the output of the convolutional layer , get the activated feature map :

[0026] Pooling layer: Perform a pooling operation on the activated feature map, such as maximum pooling or average pooling, to obtain the pooled feature map ; Taking the maximum pooling as an example, set the pooling window size to , then the maximum pooling operation can be expressed as:

[0027] Multiple convolutional layers, activation function layers, and pooling layers can be stacked to gradually extract more advanced features; Fully connected layer: Flatten the output of the pooling layer into a one-dimensional vector, and then perform a linear transformation through the fully connected layer. Let the weight matrix of the fully connected layer be , the bias vector is , then the output of the fully connected layer can be expressed as:

[0028] Output layer: Output predicted fuel consumption rate ; Loss function: The mean square error (MSE) is selected as the loss function to measure the error between the predicted value and the actual value:

[0029] in is the sample size, is the actual fuel consumption rate, is the predicted fuel consumption rate.

[0030] Optimization algorithm: The stochastic gradient descent (SGD) algorithm is used to update the weights and biases of the network. The learning rate is set to , then the update rules for weights and biases are:

[0031]

[0032] The gradient of the loss function to the weights and biases of each layer is calculated through the back-propagation algorithm, and then iterative optimization is performed according to the above update rules until the loss function converges or the preset number of training rounds is reached; The training process of the convolutional neural network model includes: S1: data preparation stage, S2: model training stage, S3: deployment and iteration stage, and S4: performance evaluation and optimization stage.

[0033] S1: Data preparation stage, including: S11: Data collection and synchronization; S111: Ultrasonic sensor data collection: During vehicle operation, the ultrasonic sensor measures the tank level every second and records the measurement timestamp; S112: CAN bus data acquisition: obtain the real-time status data of the vehicle through the CAN bus, including vehicle speed, speed, load, throttle opening, intake temperature, intake pressure, and record the timestamp; S113: Data synchronization: aligning the ultrasonic sensor data with the CAN bus data according to the timestamp to generate a synchronized data set; S12: Data cleaning and preprocessing; S121: Ultrasonic data cleaning and preprocessing; Filtering and noise reduction: Filter the liquid level data collected by the ultrasonic sensor to remove high-frequency noise and abnormal values; Normalization: Normalize the liquid level data to a range between 0 and 1 to eliminate differences caused by different measuring equipment and environments; S122: CAN bus data cleaning and preprocessing; S1221: Standardization cleaning process: standardize the CAN bus data to make its mean value 0 and standard deviation 1, and eliminate the influence of different data dimensions and ranges; S1222: Missing value preprocessing: interpolate or fill in missing data to ensure data integrity; S113: Data conversion and enhancement; S1131: Timing signal conversion: The synchronized timing signal is converted into a two-dimensional spectrum map (2D spectrum map) through short-time Fourier transform (STFT), and finally matched with the fuel injection amount of the vehicle ECU map; S1132: Data enhancement: Expand the data set by flipping, rotating, adding noise, etc. to improve the generalization ability of the model; Add noise: Add random noise to the spectrum to simulate interference in actual operation; Flip and rotate: horizontally flip and randomly rotate the spectrum graph to increase data diversity; Time warping: Randomly stretch and compress the time series data on the time axis to simulate data changes at different driving speeds; S2: Model training phase includes: S21: Network structure construction S211: Input layer: input feature vectors, including liquid level, vehicle speed, rotation speed, load, throttle opening, intake air temperature, intake air pressure, coolant temperature, oil temperature, and engine operating mode; S212: Convolutional layer: Multiple convolutional layers are used to extract local features, with a convolution kernel size of 3×3 and a step size of 1; S213: Activation function layer: Use ReLU activation function to increase the nonlinear expression ability of the model; S214: Pooling layer: Use the maximum pooling layer with a pooling window size of 2×2 and a step size of 2 to reduce the size of the feature map; S215: Fully connected layer: Flatten the output of the pooling layer into a one-dimensional vector and perform linear transformation through the fully connected layer; S216: Output layer: output predicted fuel consumption rate; S22: Model initialization S221: Weight initialization: Use the Xavier initialization method to initialize the weights of the network to ensure the stability of the gradient during training; S222: Bias initialization: Initialize the bias to 0; S23: Training process S231: Forward propagation: input the preprocessed data into the network and calculate the predicted value of the output layer; S232: Loss calculation: Use mean square error (MSE) as the loss function to calculate the error between the predicted value and the actual value; S233: Back propagation: The gradient of the loss function with respect to the weights and biases of each layer is calculated through the back propagation algorithm; S234: Parameter update: Use the stochastic gradient descent (SGD) algorithm to update the weights and biases of the network with a learning rate of 0.01; S24: Verification and Adjustment S241: Validation set evaluation: After each training cycle, the validation set is used to evaluate the performance of the model and calculate the loss value and accuracy on the validation set; S242: Early stopping mechanism: If the loss value on the validation set does not decrease significantly within several consecutive cycles, the training is stopped to prevent overfitting; S243: Learning rate adjustment: Dynamically adjust the learning rate based on the performance on the validation set, such as halving the learning rate every 10 cycles; S3: Deployment and iteration phase: S31: Model Lightweight S311: Depthwise Separable Convolution: Use depthwise separable convolution (DepthwiseSeparableConv) instead of standard convolution to reduce the amount of computation and model size; S312: Model pruning: remove unimportant weights and connections in the network to further compress the model; S32: Model deployment S321: Vehicle hardware adaptation: Deploy the lightweight model to the vehicle hardware device to ensure that the model can process data in real time; S322: Real-time data processing: The model receives ultrasonic sensor and CAN bus data in real time, makes fuel consumption predictions, and feeds back the results to the vehicle system or cloud platform; S323: Code conversion: Finally, the production deployment code (C++ code and weight data) is generated based on the training model, conversion model, weight and bias model and other data codes, distributed and edge deployment, effectively reducing computing power requirements; S33: Model iterative update S331: New data collection: During the actual operation of the vehicle, new data is continuously collected, including fuel consumption data under different working conditions; S332: Model retraining: Use newly collected data to retrain the model, optimize model parameters, and improve the accuracy and generalization ability of the model; S333: Regular update: Update the model regularly based on the collection of new data to ensure that the model can adapt to changes in vehicle operating conditions; S4: Performance evaluation and optimization stage: S41: Performance Evaluation S411: Accuracy evaluation: In the actual vehicle operating environment, compare the fuel consumption predicted by the model with the actual fuel consumption and calculate the error range; S412: Adaptability evaluation: Test the detection accuracy of the model under different road conditions (highways, mountain roads, ground roads, urban roads), working conditions (overload, heavy load, light load, standard load, no load) and weather (rainy days, snowy days, low temperature, high temperature, normal temperature); S413: Real-time evaluation: evaluate the real-time processing capability of the model to ensure that the model can provide real-time fuel consumption information during vehicle operation; S42: Optimization and Improvement S421: Feature extraction optimization: further optimize the feature extraction capability of the convolutional neural network and improve the adaptability of the model to complex working conditions; S422: Algorithm optimization: Introduce advanced algorithms such as reinforcement learning to optimize the model's adaptive capabilities and improve its ability to handle small sample data; S423: Hardware optimization: Optimize the performance of on-board hardware devices according to actual needs to ensure that the model can run efficiently.

[0034] Specific application of this method in fuel consumption detection: 1. Regularly measure the tank level: determine the time interval and frequency of measurement to ensure the validity of the data; Correlation analysis between liquid level change and fuel consumption Assume the initial liquid level is , after a period of time The liquid level after The vehicle's mileage is , then the fuel consumption It can be approximately expressed as:

[0035] in, is the total volume of the oil tank, derivation process: the height of the liquid level drop Multiply by the total volume of the tank Get the consumed oil volume , divided by the mileage It is the fuel consumption per unit mileage; 2. Its role in preventing oil theft; (1) Abnormal liquid level detection: real-time monitoring of the tank liquid level to promptly detect abnormal drops; (2) Alarm mechanism: When possible oil theft is detected, an alarm is triggered to protect vehicle fuel.

[0036] The system of vehicle fuel consumption detection method based on convolutional neural network consists of sensor layer, data processing layer, CNN model layer and output layer. The sensor layer consists of ultrasonic sensor and CAN bus. Ultrasonic sensor to monitor changes in tank level; CAN bus: used to obtain vehicle status data such as speed, rotation speed, load, etc. The data processing layer includes signal preprocessing and data fusion; Signal preprocessing: filtering and noise reduction, time-frequency analysis, and FFT to generate spectrum diagram; Data fusion: used to align ultrasonic data with vehicle status data; CNN model layer, input: 2D feature map: image converted from spectrum map / time series data, structure: convolution layer: extract local features + fully connected layer: regression prediction of fuel consumption.

[0037] Example 1: A case of applying the vehicle fuel consumption detection method based on ultrasonic sensor and convolutional neural network in a logistics vehicle; Example 2: A case of applying the vehicle fuel consumption detection method based on ultrasonic sensor and convolutional neural network to a dump truck; Example 3: A case study of applying the ultrasonic sensor-based convolutional neural network vehicle fuel consumption detection method to a sanitation vehicle; The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor, characterized in that: The following steps are involved: Step 1: Install several ultrasonic sensor arrays on the vehicle to monitor the change of the fuel tank liquid level through ultrasonic sensors; Regularly measure the tank level: determine the time interval and frequency of measurement to ensure the validity of the data; Correlation analysis between liquid level change and fuel consumption Assume that the initial liquid level is h0, and the liquid level after a period of time T is h T , the vehicle's mileage is S, then the fuel consumption V can be approximately expressed as: Among them, V tank is the total volume of the tank, derivation process: the height of the liquid level drop (h0-h T ) multiplied by the total volume of the fuel tank V tank Obtain the consumed oil volume V, and then divide it by the mileage S to get the fuel consumption per unit mileage; Step 2: First, normalize the data collected by the ultrasonic sensor to eliminate the differences caused by different measuring equipment and measuring environment; Step 3: Finally, the pre-processed data is analyzed through the convolutional neural network model to obtain the vehicle fuel consumption; The convolutional neural network model consists of an input layer, a convolution layer, an activation function layer, a pooling layer, a fully connected layer and an output layer; The input layer: input feature vector X = [x 1, x2,…,x n ], where x i represents the i-th feature (liquid level, speed, acceleration, throttle opening, intake temperature, intake pressure); The convolution layer: through the convolution kernel W (1) Perform convolution operation on the input to obtain feature y (1) ; Assuming the convolution kernel size is k×k and the step size is s, the convolution operation can be expressed as: The activation function layer: applies the activation function f to the output of the convolutional layer to obtain the activated feature map z (1) : The pooling layer: performs a pooling operation on the activated feature map, such as maximum pooling or average pooling, to obtain the pooled feature map p (1) ; Taking maximum pooling as an example, assuming the pooling window size is p×p, the maximum pooling operation can be expressed as: Multiple convolutional layers, activation function layers, and pooling layers can be stacked to gradually extract more advanced features; The fully connected layer: flattens the output of the pooling layer into a one-dimensional vector, and then performs a linear transformation through the fully connected layer. Let the weight matrix of the fully connected layer be W (2) , the bias vector is b (2) , then the output of the fully connected layer can be expressed as: y (2) =W (2) ·z (flattened) +b (2) The output layer: outputs the predicted fuel consumption rate Q.

2. The vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor according to claim 1 is characterized in that: The system based on the convolutional neural network vehicle fuel consumption detection method is composed of a sensor layer, a data processing layer, a CNN model layer and an output layer, wherein the sensor layer is composed of an ultrasonic sensor and a CAN bus; The ultrasonic sensor is used to monitor the change of the oil tank liquid level; The CAN bus is used to obtain vehicle status data such as vehicle speed, rotation speed, and load; The data processing layer includes signal preprocessing and data fusion; The signal preprocessing includes filtering and noise reduction, time-frequency analysis, and FFT to generate a spectrum diagram; The data fusion is used to align the ultrasonic data with the vehicle status data; The CNN model layer, input: 2D feature map: image converted from spectrum map / time series data, structure: convolution layer: extract local features + fully connected layer: regression prediction of fuel consumption; The output layer is used to send the real-time fuel consumption prediction value, which can be fed back to the vehicle system or the cloud platform.

3. The vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor according to claim 1 is characterized in that: The training process of the convolutional neural network model includes: S1: data preparation stage, S2: model training stage, S3: deployment and iteration stage and S4: performance evaluation and optimization stage.

4. The vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor according to claim 1 is characterized in that: The S1: data preparation phase includes: S11: Data collection and synchronization; S111: Ultrasonic sensor data collection: During vehicle operation, the ultrasonic sensor measures the tank level every second and records the measurement timestamp; S112: CAN bus data acquisition: obtain the real-time status data of the vehicle through the CAN bus, including vehicle speed, speed, load, throttle opening, intake temperature, intake pressure, and record the timestamp; S113: Data synchronization: aligning the ultrasonic sensor data with the CAN bus data according to the timestamp to generate a synchronized data set; S12: Data cleaning and preprocessing; S121: Ultrasonic data cleaning and preprocessing; Filtering and noise reduction: Filter the liquid level data collected by the ultrasonic sensor to remove high-frequency noise and abnormal values; Normalization: Normalize the liquid level data to a range between 0 and 1 to eliminate differences caused by different measuring equipment and environments; S122: CAN bus data cleaning and preprocessing; S1221: Standardization cleaning process: standardize the CAN bus data to make its mean value 0 and standard deviation 1, and eliminate the influence of different data dimensions and ranges; S1222: Missing value preprocessing: interpolate or fill in missing data to ensure data integrity; S113: Data conversion and enhancement; S1131: Timing signal conversion: The synchronized timing signal is converted into a two-dimensional spectrum through short-time Fourier transform (STFT), and finally matched with the fuel injection amount of the vehicle ECU map; S1132: Data enhancement: Add noise: Add random noise to the spectrum to simulate interference in actual operation; Flip and rotate: horizontally flip and randomly rotate the spectrum graph to increase data diversity; Time warping: Randomly stretch and compress time series data on the time axis to simulate data changes at different driving speeds.

5. The vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor according to claim 1 is characterized in that: The S2: model training phase includes: S21: Network structure construction S211: Input layer: input feature vectors, including liquid level, vehicle speed, rotation speed, load, throttle opening, intake air temperature, intake air pressure, coolant temperature, oil temperature, and engine operating mode; S212: Convolutional layer: Use multiple convolutional layers to extract local features, with a convolution kernel size of 3×3 and a step size of 1; S213: Activation function layer: Use ReLU activation function to increase the nonlinear expression ability of the model; S214: Pooling layer: Use the maximum pooling layer with a pooling window size of 2×2 and a step size of 2 to reduce the size of the feature map; S215: Fully connected layer: Flatten the output of the pooling layer into a one-dimensional vector and perform linear transformation through the fully connected layer; S216: Output layer: output predicted fuel consumption rate; S22: Model initialization S221: Weight initialization: Use the Xavier initialization method to initialize the weights of the network to ensure the stability of the gradient during training; S222: Bias initialization: Initialize the bias to 0; S23: Training process S231: Forward propagation: input the preprocessed data into the network and calculate the predicted value of the output layer; S232: Loss calculation: Use mean square error (MSE) as the loss function to calculate the error between the predicted value and the actual value; S233: Back propagation: The gradient of the loss function with respect to the weights and biases of each layer is calculated through the back propagation algorithm; S234: Parameter update: Use the stochastic gradient descent (SGD) algorithm to update the network weights and biases with a learning rate of 0.01; S24: Verification and Adjustment S241: Validation set evaluation: After each training cycle, the validation set is used to evaluate the performance of the model and calculate the loss value and accuracy on the validation set; S242: Early stopping mechanism: If the loss value on the validation set does not decrease significantly within several consecutive cycles, the training is stopped to prevent overfitting; S243: Learning rate adjustment: Dynamically adjust the learning rate based on the performance on the validation set, such as halving the learning rate every 10 cycles.

6. The vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor according to claim 1 is characterized in that: The S3: deployment and iteration phase: S31: Model Lightweight S311: Depthwise Separable Convolution: Use depthwise separable convolution (DepthwiseSeparableConv) instead of standard convolution to reduce the amount of calculation and model size; S312: Model pruning: remove unimportant weights and connections in the network to further compress the model; S32: Model deployment S321: Vehicle hardware adaptation: Deploy the lightweight model to the vehicle hardware device to ensure that the model can process data in real time; S322: Real-time data processing: The model receives ultrasonic sensor and CAN bus data in real time, makes fuel consumption predictions, and feeds back the results to the vehicle system or cloud platform; S323: Code conversion: Finally, the production deployment code (C++ code and weight data) is generated based on the training model, conversion model, weight and bias model and other data codes, distributed and edge deployment, effectively reducing computing power requirements; S33: Model iterative update S331: New data collection: During the actual operation of the vehicle, new data is continuously collected, including fuel consumption data under different working conditions; S332: Model retraining: Use newly collected data to retrain the model, optimize model parameters, and improve the accuracy and generalization ability of the model; S333: Regular update: Update the model regularly based on the collection of new data to ensure that the model can adapt to changes in vehicle operating conditions.

7. The vehicle fuel consumption detection method based on a convolutional neural network of an ultrasonic sensor according to claim 1 is characterized in that: S4: Performance evaluation and optimization stage: S41: Performance Evaluation S411: Accuracy evaluation: In the actual vehicle operating environment, compare the fuel consumption predicted by the model with the actual fuel consumption and calculate the error range; S412: Adaptability evaluation: testing the detection accuracy of the model under different road conditions, working conditions and weather conditions; S413: Real-time evaluation: evaluate the real-time processing capability of the model to ensure that the model can provide real-time fuel consumption information during vehicle operation; S42: Optimization and Improvement S421: Feature extraction optimization: further optimize the feature extraction capability of the convolutional neural network and improve the adaptability of the model to complex working conditions; S422: Algorithm optimization: Introduce advanced algorithms such as reinforcement learning to optimize the model's adaptive capabilities and improve its ability to handle small sample data; S423: Hardware optimization: Optimize the performance of on-board hardware devices according to actual needs to ensure that the model can run efficiently.

Citation Information

Cited By

  • Oil press multi-mode feeding data analysis and decision-making system based on AI optimization

    CN121117466A

  • An ai optimization-based oil press multi-modal feeding data analysis and decision system

    CN121117466B

  • Liquid level measurement method and device, electronic equipment and storage medium

    CN121230842A

  • Open-pit mine truck energy consumption online prediction method based on edge calculation

    CN121435176A