1. Introduction
EVs have completely revolutionized conventional vehicles worldwide due to their benefits, e.g., decarbonization, being eco-friendly, and low maintenance costs. Immense burning of fossil fuels in conventional gasoline or diesel vehicles can generate a high amount of harmful greenhouse gases that are detrimental to the greener environments of metro cities. The aforementioned disadvantages of conventional or gasoline vehicles have led to an increased usage of EVs, especially in urban areas. Based on the current momentum, the International Energy Agency (IEA) estimated that the number of EVs on the road will increase by 120 million in the near future [
1,
2]. However, despite the low energy consumption and decarbonization features of EVs, they seem to exhibit high complexities due to their involvement in highly intricate core components along with several sensors and actuators that can deteriorate their performances, which can discourage people who want to travel longer routes. Therefore, an individual’s journey can be worsened or life-threatening due to various effecting parameters, such as fluctuating battery levels, temperature levels, and air tire pressure ranges of EVs. These parameters need to be considered to deal with increasing faults in EVs [
3].
Many researchers have discussed persuasive solutions to perform reliable and efficient fault detections in EVs. For example, the authors in [
4] investigated a Takagi-Sugeno EV sensor fault diagnosis system based on an observer strategy. The fault diagnosis system in the aforementioned research study only highlighted the detection of sensor faults while ignoring the other types of faults in the EVs. Later, to monitor the battery faults in EVs, which was not considered by the authors in [
4], Yuan et al. [
5] applied a voltage prediction method to implement the fault diagnosis for internal short circuits in the lithium–ion batteries of EVs. Similarly, Li et al. [
6] performed the battery fault detection highlighting the two-dimensional residual signals. A LiFePO4 battery is chosen for implementing fault detection, which is more resilient in overheating and safety than lithium–ion batteries. Then, the authors of [
7] implemented both voltage sensor fault and battery fault detection in the lithium–ion batteries of EVs, considering their aging effects.
Later, Selvaraj et al. [
8] contemplated a fault-tolerant power converter system for EV propulsion. The main objective of their work was to provide real-time and reliable fault control by implementing the test using hardware-in-the-loop for EVs. On the other hand, the authors of [
9] discussed an online signal fault diagnosis and detection system for EV inverters, which was simulated as per the world harmonized light-duty vehicle test driving cycle. Nevertheless, the fault detection system proposed in the aforementioned literature [
5,
6,
7] mainly emphasized battery fault diagnoses in EVs while ignoring thermal and air pressure faults, which could also affect EV efficiency. Thus, to accomplish an efficient and reliable EV fault diagnosis, researchers have provided effective solutions considering other types of faults in EVs. For example, Klink et al. [
10] considered lithium–ion cells to perform thermal fault detection by observing the fluctuations in electrical behavior. They simulated the fault detection using a standardized WLTP procedure similar to the experiment in [
9].
Sun et al. [
11] investigated an online fault diagnosis approach by warning about the thermal runaway that could be triggered by high fluctuations in the voltage and battery temperature. However, the research works mainly highlighted the thermal fault detection and diagnosis approaches, neglecting the air pressure fault. Therefore, it can be observed from the literature that researchers did not consider the combination of three types of fault detection, i.e., thermal, air tire pressure, and battery level to improve the safety and reliability of EVs during any journey, especially traveling the longer one [
12]. Moreover, most of the aforementioned research works are vulnerable to various security and privacy issues that are being handled by some of the authors to ensure secure and transparent EV fault detection.
Li et al. [
13] discussed a thermal anomaly detection system similar to the fault diagnosis system of [
11]. Moreover, the authors of [
13] overcame the security and privacy issues of the above-mentioned identical fault diagnosis system with the help of an unsupervised shape clustering machine learning algorithm. Erfanian et al. [
14] applied a bidirectional LSTM algorithm to enable protected fault detection in unmanned aerial vehicles (UAV). Later, the authors of [
15] considered a hybrid EV to perform an event-based anomaly detection implemented with a support vector machine (SVM). The fault detection system proposed by the authors applied various machine learning models to make the EV fault-free with strengthened privacy. However, the applied AI models could not maintain data integrity or confidentiality in the EV fault detection system. Due to this, malicious attackers can easily forge the components of EVs, which can cause several types of faults, such as air tire pressure, temperature, and batteries, which further deteriorate the performance of the fault detection. Therefore, to strengthens the security of EV fault detection, in this paper, we propose a blockchain and deep learning-based EV fault detection approach for safe journeys. A blockchain platform incorporated with deep learning models strengthen the security and confidentiality during fault detection in EVs. Once data are appended to the blockchain network, they cannot be manipulated by malicious attackers, which can predict faults in EVs correctly without any delay (with the high data rates and a low latency 5G wireless network). Moreover,
Table 1 shows the comparative analysis of several trending technologies, such as blockchain, 4G, 5G, and IoT, along with their associated benefits and challenges. Based on the benefits, i.e., high security, high data rate, and low latency features of blockchain and 5G networks, EV fault detection using deep learning models is proposed for the safety of users during the journey. Additionally,
Figure 1 shows the evolution of blockchain technology, which started with the release of Bitcoin Whitepaper, released by Satoshi Nakamoto in 2009, and the deployment of cryptocurrency in 2011. Then, in 2013, smart contracts were deployed to overcome the security issues of IoT and machine learning models. Then, blockchain evolved by facilitating the deployment of decentralized applications in various sectors. Therefore, the evolution of blockchain technology impacts EVs in terms of better security, privacy, and reliability by modernizing the transportation system, which also helps to perform fault detection without any malicious attacks. For fault identification, we considered various types of faults (i.e., air tire pressure, temperature, and battery) to perform the prediction using CNN and LSTM anomaly detection models with higher accuracy. Blockchain combined with IPFS and a 5G network is advantageous for EV fault detection in terms of high security, reduced data storage costs, high reliability, and improved efficiency.
1.1. Motivation
The objectives of this research work can be defined as follows:
Most of the existing AI-based EV fault detection frameworks mainly emphasize strengthening the privacy of EVs. However, there is no discussion on maintaining the integrity and confidentiality of EV data while considering diverse faults.
Considering the outlook of the literature, researchers [
4,
5,
6,
7,
8,
9] have highlighted the integrity and transparency challenges arising in EV fault detection systems. To overcome these issues, authors [
13,
14,
15] have applied various AI models to ensure protected EV fault detection. However, they are still vulnerable to various security attacks due to the easy forging of data in AI models. Additionally, no literature discusses the combination of faults for EVs.
Thus, deep learning and blockchain-based EV fault detection frameworks are persuasive solutions to tackle multiple faults (air tire pressure, temperature, and battery) arising due to the intricate components of EVs. Moreover, the inclusion of 5G and IPFS strengthen EV fault detection in terms of reliability, storage costs, and scalability.
1.2. Research Contributions
The contributions of this research work can be explained as follows:
We propose a deep learning and blockchain-based EV fault detection framework considering faults, such as air tire pressure, temperature, and battery, which can occur due to the intricacy of components. Moreover, the inclusion of IPFS with the 5G network improves the scalability and reliability of fault detection for EVs.
Furthermore, the fault detection was performed considering the various EV faults using CNN and LSTM deep learning models to predict the output, which can be further classified as faulty or not.
The performance evaluation of the EV fault detection was estimated by implementing CNN and LSTM with the help of metrics, i.e., F1-score, precision, and recall. Then, we depicted the accuracy and loss curves for the various fault predictions of EVs.
1.3. Organization
The rest of the paper is organized as follows.
Section 2 introduces the system model and problem formulation.
Section 3 presents the proposed deep learning and blockchain-based EV fault detection framework.
Section 4 presents the simulation result analysis. Finally,
Section 5 presents the concluding remarks.
2. Related Works
Many researchers have proposed convincing solutions for EV fault detection (for safer journeys). For example, the authors of [
16] presented a charging pile error detection mechanism based on the machine learning technique. Unlike the standard charging pile fault detection approach, the proposed mechanism generates data for common charging pile traits and builds a classification prediction framework based on the extreme machine learning algorithm. However, they needed to focus on the optimal charging aspect to perform the multiple faults detection for EVs’ safety. Then, Basnet et al. [
17] discussed the performance of the applied deep learning-based ransomware detection in supervisory control and data acquisition system (SCADA) for EVs. They enhanced the data integrity and privacy of the system by protecting EV data from malicious attacks, which were not discussed in [
16]. Later, to address the data loss issues of [
17], Li et al. [
13] studied a data-driven approach for detecting battery thermal anomalies in EVs. However, identification of air tire pressure fault and data security issues were not discussed to that extent, which could cause hazardous situations for EVs when traveling longer. Then, the authors of [
18] discussed a machine learning technique to perform sensor fault detection in an electric motor. The main aim of the proposed scheme is to attain improved accuracy by implementing various classifiers. However, the setup of the proposed scheme was not implemented in a dynamic real-time environment.
Furthermore, Javed et al. [
19] presented a combinatorial framework of LSTM and a CNN deep learning model for anomaly detection in automated vehicles. Despite their improved performances, they need to identify multiple faults in automated vehicles, such as air tire pressure, battery, thermal, etc., for efficient fault detection. To overcome the security and privacy issues, which were not the main focus of the proposed scheme by authors in [
19], Sani et al. [
20] studied a survey on privacy preservation techniques for EVs with the help of machine learning and deep learning techniques. They also discussed various research challenges and future opportunities for privacy preservation of EVs. Further, a hybrid EV paradigm based on renewable energy resources was proposed in [
21] to regulate the power supply and demand by utilizing various renewable energy sources, such as wind energy, solar energy, a supercapacitor, and a fuel cell. Then, the authors of [
22] implemented an AI-based approach to perform fault detection for an electric powertrain to achieve a moderate accuracy for fault diagnosis. They should add detailed information on multiple features to improve the accuracy of the fault detection in the electric powertrain. Considering the outlook, most of the aforementioned researchers have incorporated machine learning or deep learning techniques for secure and accurate fault detection and diagnosis in EVs. However, they did not mention the identification of multiple types of fault detection in EVs (to ensure safe journeys for the users). Moreover, deep learning and machine learning techniques do not guarantee high security, privacy, and confidentiality during fault detection in EVs. Therefore, we propose a blockchain and deep learning-based fault detection framework for EVs. Blockchain technology overcomes the security and privacy data storage issues of the deep learning model by securing data transactions in an immutable and decentralized manner. Moreover, we predicted and identified three types of faults, i.e., air tire pressure, temperature, and battery, using CNN and LSTM models, which attain higher accuracies for efficient fault detection.
Table 2 presents the comparative analysis of various state-of-the-art EV fault detection schemes with the proposed framework to highlight the research gaps, such as multiple faults, i.e., air tire pressure, temperature, and battery fault, security issues, and high data storage issues associated with the literary work, which motivated us to propose a blockchain and deep learning-based fault detection framework for EVs.
4. Proposed Framework
Figure 2 shows the proposed framework consisting of three layers, i.e., EV fault layer, data analytics layer, and blockchain layer. The detailed descriptions of these layers are described as follows.
4.1. EV Fault Layer
This layer involves several EVs embedded with various sensors to acquire the relevant data to identify faulty data. EV data are initially processed, then feature extraction is conducted based on the kind and frequency of data flow from the specific data. We employed three sensors for each type of problem in our model. TPMS as a tire-pressure monitoring system sensor is used to measure the air pressure in the tires. This information allows us to identify whether the tire is flat or full of pressure. To monitor the thermal state of EVs, we employ a temperature sensor that produces a temperature measurement at regular intervals. Finally, for the battery, we employ current and voltage sensors to use the output of these values after a predetermined time interval to pre-process the relevant data.
The TPMS gives the output
of air pressure in the unit of pressure per square inch (PSI). The minimum threshold for the data to be in the normal range is considered to be 45 PSI. Here, the input parameter for the model is taken as
, and it is the data frame for the readings of TPMS after the specified time interval. The above-mentioned association can be represented as follows.
The temperature sensor output is given in either Fahrenheit or Celsius units. The EV temperature is utilized as an output and turned into a time series data frame
, which is then used to train the proposed model.
where
. Finally, for the battery fault detection, we obtain value from the voltage and current sensors associated with the battery for the specific time interval. The units for the current and voltage measured are in amperes and volts, respectively. The incoming data are then converted into a data frame containing the values of the voltage
V and current
I for specific time stamps. The collections of data are represented by
, as follows:
The data obtained from these sensors should be passed to the data analytics layer for further pre-processing and training using deep learning models. Prior to that, the data should be approved by an authority who assigns them the token, which can be used to prove one’s identity before data are pre-processed at the data analytics layer. Moreover, the security and privacy issues associated with the EV fault layer arises the need for the data analytics layer to perform the prediction of several faults in EVs. The main reason for security issues is due to the different sensors involved in extracting the information of faulty data from EVs that need to be tackled to ensure secure fault prediction.
4.2. Data Analytics Layer
Based on the type of EVs fault, the data analytics layer is separated into three stages, i.e., air tire pressure, temperature, and battery. We applied different deep learning models to the EV faulty data extracted from the EV fault layer. Therefore, we can consider three types of EV faults to apply CNN and LSTM to the data, which can be explained as follows:
4.2.1. Air Tire Pressure
We employ a CNN model to predict the air tire pressure for the detection of faults in EVs (as shown in
Figure 3). CNN has been proven to produce the best results based on the considered image dataset [
24]. The considered image dataset utilizes the images of tires for which the pressure is measured in PSI. It is trained on the image dataset, and subsequent predictions are produced for the prediction. Dataset
D can be expressed as follows:
where dataset
D consists of each example
E, which is labeled with the appropriate label
L, which is then fed as an input to the CNN model.
Table 3 shows the parameters considered to train the aforementioned model for the air tire pressure fault.
4.2.2. Temperature Fault Analysis
We consider the anomaly detection technique to identify the temperature fault in EVs. Unsupervised learning is used to train the model for this prediction, and we utilize the LSTM model to predict the data as faulty or not. EV temperature fault data are first preprocessed based on the requirement. The min–max scaler is used to preprocess the relevant parameters for training and testing the datasets for temperature fault detection. It transforms the temperature dataset
T into a value range of
. The dataset
T is [22,695, 5] in size. This dataset is then split into two parts, i.e., a training dataset and a testing dataset.
and
are created using different variables, such as prediction time, unroll-length, and test data size, which can be denoted by
ℜ,
ℑ(50), and
(1000), respectively. The above associations can be described as follows.
where the value of
⅁ is calculated for splitting the dataset into train and test values. The trained values of the temperature fault data are then passed to the LSTM model with the considered parameters.
Table 4 depicts the parameters used for temperature fault prediction in EVs using the LSTM model.
The learning rate is defined as the root mean square propagation (RMSProp). It eliminates the requirement for learning rate adjustment by choosing it automatically for each parameter. Moreover, the RMSProp selects a different learning rate each time for different numbers of parameters. The detailed procedure for the RMSProp optimizer can be explained in the following steps.
where
is the initial learning rate,
is the exponential average of squares of gradients and
is the gradient at time t along with
. For each wrong prediction, the loss penalized can be defined as the mean squared error loss. The mean squared error (MSE) for each parameter can be calculated as follows.
The square element of the MSE ensures that no outlier prediction and error can occur in the trained model while detecting the anomalies in the EVs.
4.2.3. Battery Fault Analysis
The model deployed for EV battery fault analysis is the LSTM model. After preprocessing the input training data, the data
are provided to the LSTM model for training and testing the data. The input sizes of the data, i.e.,
, are considered (34,866, 7) and
Table 5 shows the relevant parameters considered for training the considered LSTM model along with the input data
(34,866, 7).
For the Adam optimizer, the parameters values, i.e.,
and
, are considered. Furthermore, the activation function used for the dense layer of the model is the rectified linear activation function (ReLU) activation, which can be defined as follows:
Each parameter in the dataset has an input value of
x. If the input value is less than zero, the function returns to 0; if the input value is larger than 0, then the function returns
x. The loss for the applied LSTM model on the battery fault data is determined using the mean absolute error loss function
to minimize the loss function. Therefore, the function can be defined as follows.
where
x is the real value and
x’ is the predicted value of the LSTM model.
Finally, the CNN and LSTM models can be applied to the air tire pressure, temperature, and battery fault for predicting the data as faulty or no-fault. Algorithm 1 shows the detailed procedure of three types of EV fault detection along with their input parameters that can be predicted with the time complexities of O(a), O(t), and O(on). Moreover, based on the output of faulty data, EVs can be warned beforehand to prevent any kind of severe accident beforehand. However, applied deep learning models cannot prevent various security attacks, such as data manipulation, data spoofing, and cyber attacks against the output of prediction of faulty data. For example, some malicious attackers can forge the output, which can transfer false information about the fault to EVs leading to the cause of an accident. Therefore, the blockchain layer is introduced to overcome the aforementioned security and privacy issues that occur while predicting the output of faulty data for EV safety.
Algorithm 1: Prediction model algorithm. |
Input: Air pressure data , temperature data , battery data |
Output: Prediction P- 1:
Take input data from three sensors - 2:
Load the input data for data preprocessing - 3:
for All EV() do - 4:
for do - 5:
Generate input parameter for the CNN prediction model - 6:
- 7:
Feed data to the CNN ( ) model
- 8:
end for - 9:
for do - 10:
Create input parameter for the Anomaly detection model - 11:
Data pre-processing(D) = change units, remove NaN/NULL values - 12:
- 13:
Feed data to the anomaly detection mode( )
- 14:
end for - 15:
for do - 16:
Create input parameter for the LSTM detection model - 17:
Data pre-processing() = Feature extraction, min–max scaling - 18:
- 19:
Feed data to the LSTM model( )
- 20:
end for - 21:
end for - 22:
Return Prediction
|
4.3. Blockchain Layer
The data extracted from the sensors in the EV fault layers are passed through the data analytics layer after applying CNN and LSTM models to perform the various types of fault detection analyses, i.e., air tire pressure, temperature, and batteries on EVs. Now, the predicted data of the data analytics layer may be vulnerable to various security and privacy attacks, which can disrupt the transparency of the system. Hence, to strengthen the security and transparency of fault detection in EVs, we introduced a blockchain layer to protect the predicted data from the data analytics layer to reduce the probability of EV accidents. The blockchain platform stores data in the form of a chain of blocks in an unalterable way to maintain the data integrity of the network. Furthermore, the blockchain utilizes a consensus mechanism, which ensures that all the nodes in the network should agree to add to that particular transaction. Otherwise, the transaction can be discarded, further maintaining the security of the system. Initially, EV fault analysis data can be secured by registering with an authority that assigns a token to the EVs to detect the faulty parameters of their components (e.g., battery, tire, or thermal).
Then, the IPFS is involved in the blockchain layer to validate EVs data, which are preserved by an authority. Now, EVs can issue a request to store their fault analysis data in the IPFS instead of a blockchain to ensure low-cost data access in a distributed manner for EVs. The data storage in an IPFS smart contract is written as a self-executable code that needs to be executed to check the authenticity of the EV data predicted from the data analytics layer. The data predicted from the data analytics layer seem to have security and privacy issues for data storage, which can be resolved with blockchain and IPFS. Furthermore, to allow the data storage of EV data in the IPFS, they need to return the respective hash keys to the EVs. Now, after attaining the data storage through IPFS in a cost-efficient manner, EVs can take advantage of the blockchain decentralized network to accomplish a secure journey (and preserve fault detection analyses for a safer journey). Blockchain as a distributed network provides a secure platform for EV fault detection by accessing the corresponding hash keys
generated from the IPFS protocol. To attain secure fault detection for EVs, asymmetric cryptography can be applied to authorize the EV data during the fault detection using public and private EV keys
, which can be described as follows [
25].
where
denotes the hash digest to perform fault detection for EVs.
signifies the decryption of EV with its public key
and
represents the digital signature of EV with the help of private key
.