Next Article in Journal
Distributed Robust Optimization Method for Active Distribution Network with Variable-Speed Pumped Storage
Previous Article in Journal
United in Green: A Bibliometric Exploration of Renewable Energy Communities
Previous Article in Special Issue
Remaining Useful Life Prediction of Lithium-Ion Batteries Based on Neural Network and Adaptive Unscented Kalman Filter
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Study of Electric Bicycle Lithium Battery Charging Monitoring Using CNN and BiLSTM Networks Model with NILM Method

by
Jiameng Liu
1,2,
Chao Wang
1,2,
Liangfeng Xu
1,2,
Mengjiao Wang
1,
Dongfang Hu
3,
Weiya Jin
1,2 and
Yuebing Li
1,2,*
1
Institute of Process Equipment and Control Engineering, Zhejiang University of Technology, Hangzhou 310023, China
2
Institute of Innovation Research, Zhejiang University of Technology, Shengzhou 312400, China
3
Beijing Key Laboratory of Health Monitoring and Self-Recovery for High-End Mechanical Equipment, Beijing University of Chemical Technology, Beijing 100029, China
*
Author to whom correspondence should be addressed.
Electronics 2024, 13(16), 3316; https://doi.org/10.3390/electronics13163316
Submission received: 31 July 2024 / Revised: 16 August 2024 / Accepted: 19 August 2024 / Published: 21 August 2024
(This article belongs to the Special Issue Energy Storage, Analysis and Battery Usage)

Abstract

:
Electric bicycles offer convenient short-distance travel, but improper battery charging poses a fire risk, especially indoors, potentially causing significant accidents, property damage, and even threats to life. Recognizing the charging state of electric bicycle batteries is crucial for safety. This paper proposes a novel method to identify the charging process of lithium batteries in electric bicycles. Methods that do not require physical alterations to the equipment are used to acquire users’ electricity consumption data, with current signals preprocessed and input into a combined model integrating convolutional neural networks (CNN) and bidirectional long short-term memory (BiLSTM) networks. The proposed model captures complex patterns and features in the charging data, effectively identifying the charging characteristics of lithium batteries. Validation using NASA’s lithium battery dataset and real experimental data shows that the combined model achieves recognition accuracy of 96% and 97% on training data and 93% and 94% on validation data. Further validation under multiple device loads and comparison with other models indicate that the proposed method is highly accurate, outperforming traditional CNN and LSTM models by 4–9%. This research enhances the safety and regulation of electric bicycle battery charging and provides a reliable method for non-intrusive load identification in smart monitoring systems, contributing to improved safety measures and energy management in residential environments.

1. Introduction

Electric bicycles are a convenient means of transportation for short distances, and their low operating costs have contributed to their rapid growth in China. According to the latest data from the Chinese State Council’s website, as of May 2024, the number of electric bicycles in China had exceeded 350 million. In 2023 alone, China will have manufactured 42.28 million electric bicycles [1].
As one of the most crucial components of electric bicycles, the safe and stable operation of the battery is fundamental to the reliable use of these vehicles. Consequently, the safety of batteries has garnered increasing attention. Reports indicate that approximately 80% of battery fire incidents occur during the charging process [2]. Additionally, the combustion of batteries releases a significant amount of toxic gases, posing severe health risks and potentially leading to fatalities.
In response, many local governments in China have implemented regulations regarding the management of electric bicycles. These regulations stipulate that the charging of electric bicycles must take place in designated areas, prohibiting individuals from bringing electric bicycles into residential building hallways or elevators and from charging batteries at home [3]. Therefore, the intelligent monitoring of residential buildings to identify the charging status of electric bicycle batteries and supervise the process is crucial. This can ensure the safety of residential areas, reduce the likelihood of accidents, and inform the development of appropriate management policies based on battery charging behaviors. Thus, timely and effective identification and supervision of the charging process during the use of electric bicycle batteries are of significant importance for advancing household intelligence and ensuring residential safety.
As an environmentally friendly device that is not subject to climate and geography factors [4], lithium-ion batteries are the most commonly used power source in the field of electric bicycles. Many scholars have conducted extensive research on the materials of lithium batteries, improving their performance. However, during the charging process, lithium-ion batteries can experience thermal runaway due to short circuits within the small internal cells [5]. This occurs when the internal structure of the battery, particularly the separator, is damaged, leading to direct contact between the anode and cathode materials, which causes minor short circuits. These short circuits generate localized high temperatures, which, over time, expand the hotspot area and result in an overall increase in the battery’s temperature.
Experimental studies have shown that the bending state of a battery during operation can influence heat generation [6]. When the bending exceeds a critical point, the heat produced is higher than that of a standard battery. The combination of high temperatures and flammable gases leads to thermal runaway, causing the battery casing to swell and crack, potentially resulting in a fire. Numerical simulations of battery thermal management systems (BTMS) indicate that during overcharging, there is a significant temperature increase before the battery materials undergo phase change [7]. During charging or discharging, inadequate heat dissipation can cause a continuous rise in the internal temperature of the battery. Overheating may trigger the decomposition of the electrolyte, producing flammable gases, which further promote combustion [8].
Experts and scholars have employed various methods to study the behavior of charging batteries, achieving notable results. During the charging process, various phenomena of the battery, such as pulse phenomena [9], capacitive modes [10], thermal behavior [11,12,13], and thermal residues [14], have been experimentally studied, revealing the fundamental principles to a certain extent. From other perspectives, researchers have used numerical simulations and modeling methods to study the performance of batteries during the charging process. Significant progress has been made in several areas, including thermal performance [15,16], spatial chemical performance [17], and system performance [18,19,20], providing detailed analyses of battery performance. Additionally, some scholars have utilized theoretical analysis to explore aspects such as electrochemical effects [21], aging mechanisms [22], battery safety under mechanical stress [23], battery health assessment [24,25], and heterogeneous damage behaviors of batteries [26], achieving notable results.
From the perspective of models and algorithms, current research has also achieved notable progress. An improved Dynamic Time Warping (DTW) algorithm, known as LSS-DTW, has been proposed to enhance the safety of electric bicycle charging [27]. A neural network model has been developed for estimating the state of charge (SoC) of electric bicycles, utilizing inputs such as voltage, current, temperature, and charging cycles to predict battery health and lifespan [28]. Franzese studied wireless charging systems for electric bicycles and found that a sensorless control strategy can be used to track constant voltage and constant current modes, improving both charging efficiency and safety [29]. Xie proposed a trickle charge detection algorithm that helps prevent overcharging of electric bicycle batteries. This algorithm increases safety by cutting off the power supply when trickle charging is detected, thereby extending battery life [30]. An electrochemical model has been developed to identify the degradation state of lithium-ion batteries, providing insights into battery health and longevity for electric vehicles, including bicycles [31]. Various methods for estimating the SoC of electric vehicle batteries have been examined, highlighting the advantages, challenges, and accuracy of each method [32]. Battery management systems designed for electric bicycles using lithium-ion 18650 batteries have been explored, discussing their effectiveness in managing the charging and discharging processes to improve battery life and performance [33]. A virtual sensor method for estimating the SoC of electric vehicle batteries has been introduced, which improves the reliability of SoC estimation using alternative vehicle measurements without direct current measurements [34].
Some scholars have proposed a hybrid CNN-GRU model for estimating the performance of lithium-ion batteries, which has been applied to the estimation of state of health (SOH) [35], dynamic charging warning [36], and the prediction of remaining useful life (RUL) [37]. Similarly, Xia et al. discussed a model that combines CNN and LSTM with a self-attention mechanism to improve the accuracy of RUL predictions for lithium-ion batteries. This approach is particularly robust against noise in battery measurement data, making it highly effective in practical applications [38]. Rastegarpanah et al. introduced a hybrid model optimized using Bayesian methods that combines CNN and CNN-LSTM architectures for predicting the RUL of lithium-ion batteries. This model leverages both spatial and temporal features to enhance prediction accuracy [39].
In recent years, non-intrusive electric behavior analysis methods have been gaining increasing attention. These methods allow for the collection of electrical signal data without altering the existing wiring of the equipment, enabling the detection device to be connected to the system under test without shutting down or powering off the equipment. This approach facilitates a quick and convenient data collection and analysis process. Due to these advantages, many studies in the field of electric behavior testing and analysis have adopted this method.
A recent study employed the Non-Intrusive Load Monitoring (NILM) method and introduced a supervised Fisher classifier-based approach to identify the charging behavior of electric bicycles [40]. This research aims to address abnormal charging behaviors that could potentially lead to severe fire accidents. Luan et al. employed the NILM method to mitigate fire hazards caused by the thermal runaway of electric bicycle batteries, a situation often exacerbated by residents not adhering to regulations prohibiting charging within residential buildings [41]. The study aims to enhance public safety by accurately identifying and assessing electric bicycles (EB) charging loads, particularly those with fire risks. Additionally, an unsupervised method for detecting unsafe charging of electric bicycles using NILM was introduced, which employs bilateral filtering to preprocess active and reactive power signals and identifies charging loads through piecewise linear representation [42]. Liu et al. proposed a non-intrusive method using NILM technology to detect indoor charging of electric bicycles, aiming to improve residential electrical safety by identifying and monitoring charging behaviors [43].
Current research using NILM technology to study battery charging behavior still lacks comprehensive testing and analysis that compares battery behavior under similar conditions. The generalization capability of battery behavior diagnosis methods could be further improved, especially in distinguishing between similar electrical behaviors. To address these issues, this paper proposes a recognition method combining BiLSTM and CNN neural networks. By integrating segmented fitting with data thresholds and slope values, this method achieves the identification and prediction of the electric behavior of lithium batteries in electric bicycles. This approach ensures the safety of the battery charging process by enabling the timely and effective detection of abnormal behaviors.

2. Methods

Numerous scholars have used Long Short-Term Memory (LSTM) networks for processing current data. LSTM is a special type of recurrent neural network (RNN) that effectively learns and remembers long-term dependencies [44,45], addressing the vanishing gradient problem. However, during the charging process of lithium batteries, electrical signals exhibit temporal continuity. For tasks involving sequence labeling of current signals during charging (such as signal segmentation and event detection), LSTM relies solely on forward signal information, which may overlook important backward dependencies.
In recent years, bidirectional long short-term memory (BiLSTM) networks have emerged as a powerful tool for sequence data analysis. BiLSTM extends traditional LSTM networks by incorporating bidirectional processing of data sequences, consisting of two LSTM layers. One layer processes the sequence from start to finish (forward), while the other processes it from end to start (backward) [46]. This bidirectional approach allows the network to capture dependencies and information from both past and future states [47]. BiLSTM has found successful applications in various fields, including natural language processing [48], time series prediction [49], and speech and image recognition [50].
In this study, we employ a method that combines BiLSTM networks and convolutional neural networks (CNN) for data analysis. This approach leverages the robust capabilities of BiLSTM in handling sequential data, along with the flexibility and strong function approximation abilities of CNN. The combination of convolutional and bidirectional recurrent neural networks effectively captures complex patterns and features within the data.
BiLSTM networks are particularly adept at processing time series data due to their ability to consider dependencies from both past and future states. This bidirectional processing is essential for accurately identifying and predicting the charging behavior of lithium batteries, ensuring a safe charging process by detecting abnormal behaviors in a timely and effective manner.
CNNs, on the other hand, excel in feature extraction through their convolutional layers, which capture local patterns in the data, and pooling layers, which reduce dimensionality while retaining essential information. The integration of CNN allows for the extraction of high-level features from the input data, which are then fed into the BiLSTM network for further processing and classification.
This hybrid approach not only enhances the model’s ability to identify complex and subtle patterns in the charging data but also improves its generalization capability, making it more effective in real-world applications where distinguishing between similar electric behaviors is critical. The effectiveness of this method is demonstrated in its ability to ensure battery charging safety and extend battery life by preventing overcharging and detecting potential hazards early.

2.1. Convolutional Neural Networks (CNN)

Convolutional neural networks (CNN) are a type of artificial neural network known for their ability to detect information at various positions with high accuracy. CNNs are particularly effective in solving problems related to image processing, sentiment analysis in natural language processing, question answering, and text summarization. The distinctive feature of CNNs is their specialized architecture, which facilitates learning.
CNNs are multilayer networks where the output of one layer serves as the input for the next. They typically consist of an input layer, one or more hidden layers, and an output layer.
CNNs extract features from input data through convolutional and pooling layers. The core idea is to reduce the number of parameters and improve computational efficiency by utilizing local connections and weight sharing, allowing the network to automatically learn local patterns in the data.
  • Convolutional Layer:
The convolutional layer applies a filter (also known as a convolutional kernel) that slides over the input data to compute local features. For time series data, a one-dimensional convolutional layer (1D convolutional layer) is used to extract local features between time steps. Assuming the input sequence is x and the convolutional kernel is w, the convolution operation can be represented as follows:
y t = i = 0 k 1 x t + i · w i + b
where k is the size of the convolutional kernel and b is the bias term.
  • Batch Normalization Layer:
Batch normalization is used to standardize the output of the convolutional layer, improving training speed and stability by reducing internal covariate shift. The batch normalization layer adjusts and scales the activations of the previous layer.
  • Activation Function Layer:
The activation function introduces non-linearity into the model, enabling it to represent more complex functions. A commonly used activation function is the Rectified Linear Unit (ReLU):
R e L U x = max 0 , x
ReLU activation helps to address the vanishing gradient problem, allowing the network to learn faster and perform better.
By incorporating these layers, the CNN can effectively learn and extract meaningful features from the input data, contributing to improved performance in tasks such as image and time series analysis.
  • Pooling Layer:
The pooling layer reduces the dimensionality of the data through a downsampling operation, extracting key features and preventing overfitting. A commonly used pooling operation is max pooling, which can be represented by the following formula:
y t = max x t : t + p 1
where p is the size of the pooling window.
Max pooling selects the maximum value within the pooling window, effectively summarizing the most prominent features and making the network more robust to small translations in the input data.
By utilizing convolutional layers, batch normalization, activation functions, and pooling layers, CNNs can efficiently process and learn from complex data, making them highly effective for a variety of tasks, including image processing and time series analysis.

2.2. Basic Unit of LSTM

The core of the LSTM is its memory cell (cell state), which controls the flow of information through three gating units: the input gate, forget gate, and output gate. The calculation process for each time step is as follows:
  • Forget Gate:
The forget gate determines how much of the memory cell state from the previous time step should be forgotten in the current time step. The calculation formula is as follows:
f t = σ W f · h t 1 , x t + b f
where: f t is the forget gate’s activation at time step t, σ is the sigmoid function, W f is the weight matrix for the forget gate, h t 1 is the hidden state from the previous time step, x t is the input at the current time step, and b f is the bias term for the forget gate.
  • Input Gate:
The input gate controls the extent to which new information from the current input should be added to the cell state. The calculation formulas are as follows:
i t = σ W i · h t 1 , x t + b i
C t ˜ = tan h W c · h t 1 , x t + b C
where i t is the input gate’s activation at time step t, C t ˜ is the candidate cell state, W i and W c are the weight matrices for the input gate and candidate cell state, respectively, and b i and b C are the bias terms for the input gate and candidate cell state, respectively.
  • Cell State Update:
The cell state is updated using the forget gate and input gate:
C t = f t · C t 1 + i t · C t ˜
where C t is the cell state at time step t, and C t 1 is the cell state from the previous time step.
  • Output Gate:
The output gate controls the amount of information from the cell state to be output as the hidden state. The calculation formula is as follows:
o t = σ W o · h t 1 , x t + b o
The update formula is as follows:
h t = o t · tan h C t
where o t is the output gate’s activation at time step t, h t is the hidden state at time step t, W o is the weight matrix for the output gate, and b o is the bias term for the output gate.

2.3. Bidirectional Long Short-Term Memory (BiLSTM)

BiLSTM is an extended version of LSTM that processes sequences in both directions (forward and backward), capturing more contextual information. BiLSTM is particularly suitable for tasks that require understanding context from both past and future data, such as time series prediction and natural language processing.
BiLSTM captures the complete context by applying LSTM in both directions within the sequence. It consists of two LSTM layers: a forward LSTM layer (processing from beginning to end) and a backward LSTM layer (processing from end to beginning). At each time step, the outputs of the forward and backward LSTM layers are concatenated to form the output of the BiLSTM.
Let the hidden state of the forward LSTM be h t and the hidden state of the backward LSTM be h t . The output of the BiLSTM at time step t is given by the following equation:
y t = h t , h t
where h t is the hidden state of the forward LSTM at time step t, h t is the hidden state of the backward LSTM at time step t, y t is the concatenated output of the forward and backward hidden states at time step t.
By combining information from both directions, BiLSTM provides a richer representation of the input data, making it more effective for capturing dependencies that are important for tasks requiring comprehensive current data process.

2.4. CNN-BiLSTM Model

The combined model built on the CNN and BiLSTM architectures allows for the extraction of a maximum amount of information from the data using CNN convolutional layers. By leveraging the strengths of both CNN and BiLSTM, the model captures features extracted by the CNN and inputs them into the BiLSTM, maintaining the temporal sequence information of the current data in both directions. The process is illustrated in Figure 1.
The entire lithium battery charging recognition process comprises three stages:
a.
Data Cleaning and Preprocessing:
The collected charging data are cleaned and preprocessed, then embedded into a matrix in the form of cells to prepare the convolutional data. The generated vectors are passed as input to the next stage.
b.
Feature Extraction:
Convolutional layers and max-pooling layers are used to extract high-level features. After filtering, a max-pooling layer is applied to update and reduce the data size, and the results of all max-pooling layers are concatenated. The output from this stage serves as the input for the next stage.
c.
Classification:
BiLSTM and fully connected layers are used to classify the current data. The output from this step serves as the input to the fully connected layer, which links each piece of input information to an output. Finally, we apply the softmax function as the activation function, with the output of this stage being the final classification of the current (i.e., whether it is the charging current of an electric bicycle lithium battery).
Through the above steps, the CNN-BiLSTM combined model effectively extracts local features of current signals and captures temporal dependencies during the charging process of electric bicycle lithium batteries, achieving classification of time series data.

3. Experiments

To validate the effectiveness of the proposed lithium battery charging load recognition algorithm, we utilized electrical signal data from the battery charging process. This study employed two distinct datasets for verification.
The first dataset is the NASA lithium battery charging dataset [51]. The NASA battery dataset is a significant publicly available dataset for battery health monitoring and life prediction. It is provided by the NASA Ames Prognostics Center of Excellence (PCoE) and contains performance data for various types of batteries under different operational conditions. The dataset includes batteries of different models and chemical compositions, covering various usage scenarios and experimental conditions, including data on lithium-ion batteries. The data were collected under strictly controlled laboratory conditions, recording the performance during battery charging and discharging processes. The data types include voltage and current data, detailing voltage changes and current variations per second during each charge–discharge cycle. For this experiment, we selected the Current_charge data from NASA datasets #5, 6, 7, and 18. The data collection process involved charging the lithium batteries using a constant current (CC) mode at 1.5 A until the battery voltage reached 4.2 V, followed by a constant voltage (CV) mode until the charging current dropped to 20 mA.
In particular, datasets #5, 6, and 7 each contained 169 charging current data entries, while dataset #18 contained 134 entries, resulting in a total of 641 data entries. Due to the varying number of samples in each entry, interpolation was used to fill each entry with 4000 samples, ensuring consistent dimensions during the training process.
The second dataset was collected through experiments conducted in a laboratory setting. The experiments focused on lithium battery charging and were carried out at the Intelligent Electrical Behavior Analysis Laboratory of the Innovation Research Institute of Zhejiang University of Technology in Shengzhou. This laboratory primarily conducts testing and analysis of the electrical behavior of devices under different operating conditions. For this experiment, a test bench for charging electric bicycle lithium batteries was set up, including various experimental devices for analyzing electrical behavior, such as a high-power programmable power supply, a bus power strip, current and voltage sensors, a power quality recorder, and the lithium batteries being tested.
A high-power AC power supply (Model IT7805, product of ITECH Electronic Co., Ltd., Suzhou, China) was used to provide power, and data were collected using a power quality recorder (Model MW-A600, product of Picohood Co., Ltd., Beijing, China). The power quality recorder features high-precision data collection capabilities suitable for real-time recording and analysis of electrical parameters such as current and voltage, and the current clamp was non-invasively placed on the live wire of the power strip. The experimental subjects were two types of lithium-ion batteries specifically used for electric bicycles (Model XH480-12J, product of Xingheng Co., Ltd., Suzhou, China, rated voltage 48 V; Model DZ48N-12ES, product of Tianneng Co., Ltd., Changxing, China, rated voltage 48 V), as shown in Figure 2.
During the experiment, the programmable power supply delivered 220 V, 50 Hz AC power to the bus power strip, and fully discharged lithium batteries were connected to the bus power strip through model-specific chargers for complete charging. Throughout this process, a non-intrusive method was used to connect the power quality recorder to the bus, recording the electrical signals during the entire charging process. The voltage sensor was connected to the bus power strip to collect voltage signals, while the current sensor sensed and collected current signals from the live wire in the bus. The sensors were connected to the power quality recorder, which saved the collected raw electrical signals. The test bench setup is shown in Figure 3.
The experiments were conducted in a laboratory environment at 25 °C. The batteries were charged using chargers, and the entire charging process was monitored in real-time by the power quality recorder. The recorder’s sampling frequency was 10 kHz, with one sample per second recorded after averaging, covering the entire charging cycle from start to full charge as indicated by the charger. Data collection was repeated for both brands of electric bicycle batteries. Each data collection session took about 7 h, capturing 24,880 data points per session to include the complete current signal process. Figure 4 shows a partial lithium battery charging dataset.
After obtaining the charging data for both types of batteries, GAN (Generative Adversarial Network) was used to augment the training data [52,53,54,55]. The generator in the GAN network employed a classical convolutional neural network structure, as detailed in Table 1. The discriminator used a multi-layer convolutional neural network structure, as detailed in Table 2. The GAN was trained using the Adam optimizer, with learning rates for both the generator and discriminator set at 0.0002. An alternating training strategy was adopted, training the generator and discriminator alternately. The data were normalized, and the quality of the generated data was evaluated using mean squared error (MSE) and mean absolute error (MAE). Table 3 compares the performance of the original and expanded data for two sets.
The augmented current data generated by GAN was used as input for the combined CNN-BiLSTM model, which leverages the strengths of CNN and BiLSTM to effectively capture spatial and temporal features in the data. Table 4 shows the model parameters.

4. Results and Discussion

In the NASA dataset, the combined model achieved a training accuracy of 96%, a validation accuracy of 93%, a training loss of 0.21, and a validation loss of 0.24. In the dataset collected from the laboratory, the combined model achieved a training accuracy of 97%, a validation accuracy of 94%, a training loss of 0.23, and a validation loss of 0.25, as shown in Figure 5 and Figure 6. The use of GAN for data augmentation significantly improved the model’s performance in monitoring data characteristics. The CNN-BiLSTM combined model effectively captured spatial and temporal features, thereby enhancing accuracy and generalization capability.
To further validate the proposed method, two types of validation were conducted:
1.
Multi-Device Composite Validation:
A multi-device mixed simulation experiment was conducted in the laboratory, including various household electrical devices along with the electric bicycle batteries. During the battery charging process, other electrical devices were used at different times. The model was used to determine whether the charging event for the electric bicycle battery could be identified from the collected bus electrical signals. The test bench setup is shown in Figure 7, with device types and their specific operating times listed in Table 5. The detail of devices is shown in Table 6. The complete current signal for low battery charging captured by the experimental platform is shown in Figure 8. The model’s determination indicated consistency with the previously trained data, confirming the inclusion of electric bicycle battery charging signals in the mixed current signal, thus validating the proposed method’s accuracy.
2.
Validation Across Different Models:
We conducted a validation analysis using the current data from the lithium battery charging process across different models. During the validation, the same data collected in the laboratory was augmented using GAN, and the augmented data were then validated using traditional methods, specifically with CNN [56] and LSTM [57] models as controls. The results, shown in Figure 9 and Figure 10, include training accuracy and loss values for the CNN and LSTM models.
The results show that while both models performed relatively well (CNN: training accuracy 92%, validation accuracy 90%, training loss 0.31, validation loss 0.34; LSTM: training accuracy 89%, validation accuracy 85%, training loss 0.36, validation loss 0.39), the CNN-BiLSTM combined model performed better. The analysis indicates that while CNN is adept at extracting spatial features, it may not handle time series data as well as RNN models; conversely, LSTM excels in time series data handling but may be less effective with raw signal data. The BiLSTM model further addresses the issue of sequential data, making the combined CNN-BiLSTM model more effective. Thus, the proposed CNN-BiLSTM model is validated for its effectiveness in recognizing the charging state of electric bicycle lithium batteries.
The increased complexity of this hybrid model results in longer training times and requires more computational resources compared with simpler models. Furthermore, while the dataset used in this study is comprehensive, it may still contain biases. Most of the data were collected under controlled conditions, which may not fully capture the variability encountered in real-world scenarios such as different types of batteries or charging conditions. This could potentially impact the model’s performance when applied to diverse charging environments. In future work, the model can not only improve the accuracy of charging state recognition but also show potential for broader applications in battery management systems.

5. Conclusions

To ensure the safety of the charging process for electric bicycle lithium-ion batteries and to enhance monitoring capabilities, this paper proposes a novel identification model for detecting the charging process. With a non-intrusive method to obtain current signals, the model integrates convolutional neural networks (CNN) with bidirectional long short-term memory (BiLSTM) networks to identify battery charging states. The model effectively captures the complex spatial and temporal patterns present in the charging data. Validation using current signal data from the lithium-ion battery charging process demonstrated the proposed method’s outstanding performance, achieving 96% and 97% training accuracy on the NASA dataset and laboratory-collected dataset, respectively, and 93% and 94% on validation data. Moreover, multi-device mixed simulation experiments showed that the model could still accurately identify the charging state of electric bicycle lithium-ion batteries in a composite appliance environment. Compared with models using only CNN or LSTM, the proposed model’s training and validation accuracy were 4% to 9% higher. This research achieved recognition of the charging status of lithium batteries in electric bicycles based on NILM methods and offers a valuable solution for preventing fire hazards and promoting the sustainable use of energy in electric bicycles, thereby enhancing safety and regulatory oversight. This work lays the foundation for future innovations in battery monitoring and has the potential to impact the broader field of smart energy management.

Author Contributions

Conceptualization, J.L. and Y.L.; methodology, L.X. and W.J.; software, C.W.; validation, M.W. and D.H.; writing—original draft preparation, J.L.; writing—review and editing, J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Scientific Research Fund of Zhejiang Provincial Education Department, GZ23511020004, the National Natural Science Foundation of China, 52105217, and the Natural Science Foundation of Zhejiang Province, LQ22E050020.

Data Availability Statement

The data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Statistical Data for 2024: China Has over 350 mln Electric Bicycles. Available online: https://english.www.gov.cn/archive/statistics/202405/07/content_WS6639648fc6d0868f4e8e6cc3.html (accessed on 31 May 2024).
  2. Shi, Y.; Xu, Q.; Jian, Z. Non-invasive electric bicycle charging identification method based on feature selection and incremental learning. Autom. Electr. Power Syst. 2021, 45, 8–12. [Google Scholar]
  3. The Decision to Amend the Shanghai Non-Motorized Vehicle Safety Management Regulations Will Come into Effect on June 1st of This Year. Available online: https://www.shrd.gov.cn/n8347/n8483/u1ai266310.html (accessed on 4 July 2024).
  4. Wang, L.; Wei, G.; Dong, X.; Zhao, Y.; Xing, Z.; Hong, H.; Ju, Z. Hollow α-Fe2O3 Nanotubes Embedded in Graphene Aerogel as High-Performance Anode Material for Lithium-Ion Batteries. ChemistrySelect 2019, 4, 11370–11377. [Google Scholar]
  5. Christensen, G.; Younes, H.; Hong, H.; Widener, C.; Hrabe, R.H.; Wu, J.J. Nanofluids as Media for High Capacity Anodes of Lithium-Ion Battery—A Review. J. Nanofluids 2019, 8, 657–670. [Google Scholar]
  6. Li, Y.; Gao, C.; Linja-aho, V.; Qu, Z.G.; Jiang, Z.Y.; Wang, Q. Assessment of the complete chain evolution process of LIBs from micro internal short circuit failure to thermal runaway under mechanical abuse conditions. Process Saf. Environ. Prot. 2024, 185, 296–306. [Google Scholar]
  7. Gao, C.; Linja-aho, V.; Qu, Z.G.; Jiang, Z.Y.; Wang, Q. Numerical Study on the Thermal Management of Lithium-Ion Battery Pack Based on Heat Pipes and Phase Change Material. In Proceedings of the 29th International Conference on Computational & Experimental Engineering and Sciences (ICCES2023), Shenzhen, China, 26–29 May 2023; Volume 28, pp. 1–3. [Google Scholar]
  8. Linja-aho, V. Electric Vehicle Charging Safety–State of Art, Best Practices and Regulatory Aspects. IEEE Electr. Saf. Workshop 2024, 150, 150–159. [Google Scholar]
  9. Qu, Z.G.; Jiang, Z.Y.; Wang, Q. Experimental study on pulse self–heating of lithium–ion battery at low temperature. Int. J. Heat Mass Transf. 2019, 135, 696–705. [Google Scholar]
  10. Wang, Y.; Li, M.; Chen, Z. Experimental study of fractional-order models for lithium-ion battery and ultra-capacitor: Modeling, system identification, and validation. Appl. Energy 2020, 278, 115736. [Google Scholar]
  11. Wang, Z.; Jiang, Z.Y.; Wang, Q. Thermal runaway and fire behaviors of large-scale lithium-ion batteries with different heating methods. J. Hazard. Mater. 2019, 379, 120730. [Google Scholar]
  12. Yuan, L.; Jiang, Z.Y.; Wang, Q. Experimental study on thermal runaway and vented gases of lithium-ion cells. Process Saf. Environ. Prot. 2020, 144, 186–192. [Google Scholar]
  13. Fan, Y.; Jiang, Z.Y.; Wang, Q. Experimental study on the thermal management performance of air cooling for high energy density cylindrical lithium-ion batteries. Appl. Therm. Eng. 2019, 155, 96–109. [Google Scholar]
  14. Gong, Z.; Jiang, Z.Y.; Wang, Q. Experimental study on thermal runaway characteristic and residue of Li(Ni0.8Co0.1Mn0.1)O2 lithium-ion batteries induced by overcharge. J. Energy Storage 2023, 68, 107705. [Google Scholar]
  15. Kök, C.; Alkaya, A. Investigation of thermal behavior of lithium-ion batteries under different loads. Eur. Mech. Sci. 2020, 4, 96–102. [Google Scholar]
  16. Giménez, C.S.; Jiang, Z.Y.; Wang, Q. Numerical simulation of the behavior of lithium-ion battery electrodes during the calendaring process via the discrete element method. Powder Technol. 2019, 349, 1–11. [Google Scholar]
  17. Chouchane, M.; Jiang, Z.Y.; Wang, Q. Lithium ion battery electrodes predicted from manufacturing simulations: Assessing the impact of the carbon-binder spatial location on the electrochemical performance. J. Power Sources 2019, 444, 227285. [Google Scholar]
  18. Afzal, A.; Jiang, Z.Y.; Wang, Q. Battery thermal management: An optimization study of parallelized conjugate numerical analysis using Cuckoo search and Artificial bee colony algorithm. Int. J. Heat Mass Transf. 2021, 166, 120798. [Google Scholar]
  19. Choudhari, V.G.; Dhoble, A.S.; Panchal, S. Numerical analysis of different fin structures in phase change material module for battery thermal management system and its optimization. Int. J. Heat Mass Transf. 2020, 163, 120434. [Google Scholar]
  20. Li, J.; Jiang, Z.Y.; Wang, Q. Lithium-ion battery overcharging thermal characteristics analysis and an impedance-based electro-thermal coupled model simulation. Appl. Energy 2019, 254, 113574. [Google Scholar]
  21. Guo, X.; Jiang, Z.Y.; Wang, Q. Vacancy manipulating of molybdenum carbide MXenes to enhance Faraday reaction for high performance lithium-ion batteries. Nano Res. Energy 2022, 1, e9120026. [Google Scholar]
  22. Atalay, S.; Jiang, Z.Y.; Wang, Q. Theory of battery ageing in a lithium-ion battery: Capacity fade, nonlinear ageing and lifetime prediction. J. Power Sources 2020, 478, 229026. [Google Scholar]
  23. Liu, B.; Jiang, Z.Y.; Wang, Q. Safety issues and mechanisms of lithium-ion battery cell upon mechanical abusive loading: A review. Energy Storage Mater. 2020, 24, 85–112. [Google Scholar]
  24. Sui, X.; Jiang, Z.Y.; Wang, Q. A review of non-probabilistic machine learning-based state of health estimation techniques for Lithium-ion battery. Appl. Energy 2021, 300, 117346. [Google Scholar]
  25. Li, X.; Yuan, C.; Wang, Z. State of health estimation for Li-ion battery via partial incremental capacity analysis based on support vector regression. Energy 2020, 203, 117852. [Google Scholar]
  26. Xu, R.; Jiang, Z.Y.; Wang, Q. Heterogeneous damage in Li-ion batteries: Experimental analysis and theoretical modeling. J. Mech. Phys. Solids 2019, 129, 160–183. [Google Scholar]
  27. Shuai, C.; Jiang, Z.Y.; Wang, Q. Intelligent Diagnosis of Abnormal Charging for Electric Bicycles Based on Improved Dynamic Time Warping. IEEE Trans. Ind. Electron. 2022, 70, 7280–7289. [Google Scholar]
  28. Xu, M.; Jiang, Z.Y.; Wang, Q. State of Charge Estimation of Low-speed Electric Vehicle Battery using Back Propagation Neural Network. In Proceedings of the 2020 IEEE Intl Conf on Parallel & Distributed Processing with Applications, Big Data & Cloud Computing, Sustainable Computing & Communications, Social Computing & Networking (ISPA/BDCloud/SocialCom/SustainCom), Exeter, UK, 17–19 December 2020. [Google Scholar]
  29. Franzese, P.; Jiang, Z.Y.; Wang, Q. Wireless Battery Charger based on Sensorless Control for E-bike Station. In Proceedings of the 2019 21st European Conference on Power Electronics and Applications (EPE’19 ECCE Europe), Genova, Italy, 3–5 September 2019. [Google Scholar]
  30. Xie, J.; Jiang, Z.Y.; Wang, Q. An algorithm for detecting trickle charge of electric bicycle charging. In Proceedings of the 2019 International Conference on Intelligent Computing, Automation and Systems (ICICAS), Chongqing, China, 6–8 December 2019. [Google Scholar]
  31. Xiong, R.; Li, L.; Li, Z.; Yu, Q.; Mu, H. An electrochemical model based degradation state identification method of Lithium-ion battery for all-climate electric vehicles application. Appl. Energy 2018, 219, 264–275. [Google Scholar]
  32. Zhang, M.; Fan, X. Review on the State of Charge Estimation Methods for Electric Vehicle Battery. World Electr. Veh. J. 2020, 11, 23. [Google Scholar] [CrossRef]
  33. Soeprapto, S.; Hasanah, R.N.; Taufik, T. Battery management system on electric bike using Lithium-Ion 18650. Int. J. Power Electron. Drive Syst. 2019, 10, 1529. [Google Scholar]
  34. Gruosso, G.; Jiang, Z.Y.; Wang, Q. A virtual sensor for electric vehicles’ state of charge estimation. Electronics 2020, 9, 278. [Google Scholar] [CrossRef]
  35. Zheng, Y.; Jiang, Z.Y.; Wang, Q. State of health estimation for lithium battery random charging process based on CNN-GRU method. Energy Rep. 2023, 9, 1–10. [Google Scholar]
  36. Gao, D.; Jiang, Z.Y.; Wang, Q. A Dynamic Warning Method for Electric Vehicle Charging Safety Based on CNN-BiGRU Hybrid Model. Int. J. Control Autom. Syst. 2024, 22, 1077–1089. [Google Scholar]
  37. Jafari, S.; Jiang, Z.Y.; Wang, Q. A CNN-GRU Approach to the Accurate Prediction of Batteries’ Remaining Useful Life from Charging Profiles. Computers 2023, 12, 219. [Google Scholar] [CrossRef]
  38. Xia, T.; Jiang, Z.Y.; Wang, Q. An accurate denoising lithium-ion battery remaining useful life prediction model based on CNN and LSTM with self-attention. Ionics 2023, 29, 5315–5328. [Google Scholar]
  39. Rastegarpanah, A.; Jiang, Z.Y.; Wang, Q. Hyperparameter-optimized CNN and CNN-LSTM for Predicting the Remaining Useful Life of Lithium-Ion Batteries. In Proceedings of the 2023 Eleventh International Conference on Intelligent Computing and Information Systems (ICICIS), Cairo, Egypt, 21–23 November 2023. [Google Scholar]
  40. Zhou, Y.; Jiang, Z.Y.; Wang, Q. Identification of Charging Behavior for Electric Bicycles based on Supervised Fisher Classifier. In Proceedings of the 2021 IEEE Sustainable Power and Energy Conference (iSPEC), Nanjing, China, 23–25 December 2021. [Google Scholar]
  41. Luan, W.; Jiang, Z.Y.; Wang, Q. Unsupervised identification and status assessment for electric bicycle charging load. Electr. Power Syst. Res. 2022, 210, 108130. [Google Scholar]
  42. Ma, C.; Jiang, Z.Y.; Wang, Q. An unsupervised non-intrusive electric bicycle charging detection method. In Proceedings of the 2021 6th Asia Conference on Power and Electrical Engineering (ACPEE), Chongqing, China, 8–11 April 2021. [Google Scholar]
  43. Liu, Y.; Jiang, Z.Y.; Wang, Q. Detection of electric bicycle indoor charging for electrical safety: A nilm approach. IEEE Trans. Smart Grid 2023, 14, 3862–3875. [Google Scholar]
  44. Graves, A.; Graves, A. Long short-term memory. In Supervised Sequence Labelling Recurrent Neural Networks; Springer: Berlin/Heidelberg, Germany, 2012; pp. 37–45. [Google Scholar]
  45. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar]
  46. Graves, A.; Schmidhuber, J. Framewise phoneme classification with bidirectional LSTM and other neural network architectures. Neural Netw. 2005, 18, 602–610. [Google Scholar] [PubMed]
  47. Schuster, M.; Paliwal, K.K. Bidirectional recurrent neural networks. IEEE Trans. Signal Process. 1997, 45, 2673–2681. [Google Scholar]
  48. Huang, Z.; Xu, W.; Yu, K. Bidirectional LSTM-CRF models for sequence tagging. arXiv 2015, arXiv:1508.01991. [Google Scholar]
  49. Siami-Namini, S.; Tavakoli, N.; Siami Namin, A. A comparison of ARIMA and LSTM in forecasting time series. In Proceedings of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA, 17–20 December 2018; pp. 1394–1401. [Google Scholar]
  50. Graves, A.; Mohamed, A.R.; Hinton, G. Speech recognition with deep recurrent neural networks. In Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, Vancouver, BC, Canada, 26–31 May 2013; pp. 6645–6649. [Google Scholar]
  51. Saha, B.; Goebel, K. Battery Data Set; NASA Prognostics Data Repository, NASA Ames Research Center: Moffett Field, CA, USA, 2007. Available online: https://www.nasa.gov/intelligent-systems-division/discovery-and-systems-health/pcoe/pcoe-data-set-repository/ (accessed on 15 August 2024).
  52. Goodfellow, I.; Jiang, Z.Y.; Wang, Q. Generative adversarial nets. In Proceedings of the Advances in Neural Information Processing Systems, Montreal, QC, Canada, 8–13 December 2014; Volume 27. [Google Scholar]
  53. Rather, I.H.; Kumar, S. Generative adversarial network based synthetic data training model for lightweight convolutional neural networks. Multimed. Tools Appl. 2024, 83, 6249–6271. [Google Scholar]
  54. Wang, Q.; Luo, L.; Xie, H. A deep data augmentation framework based on generative adversarial networks. Multimed. Tools Appl. 2022, 81, 42871–42887. [Google Scholar]
  55. Wong, K.L.; Chou, K.S.; Tse, R.; Tang, S.-K.; Pau, G. A Novel Fusion Approach Consisting of GAN and State-of-Charge Estimator for Synthetic Battery Operation Data Generation. Electronics 2023, 12, 657. [Google Scholar] [CrossRef]
  56. Durmus, F.; Karagol, S. Lithium-Ion Battery Capacity Prediction with GA-Optimized CNN, RNN, and BP. Appl Sci. 2024, 14, 5662. [Google Scholar]
  57. Chung, D.W.; Ko, J.H.; Yoon, K.Y. State-of-charge estimation of lithium-ion batteries using LSTM deep learning method. J. Electr. Eng. Technol. 2022, 17, 1931–1945. [Google Scholar]
Figure 1. Flowchart of three parts of model.
Figure 1. Flowchart of three parts of model.
Electronics 13 03316 g001
Figure 2. Two types of lithium-ion batteries used for experiment.
Figure 2. Two types of lithium-ion batteries used for experiment.
Electronics 13 03316 g002
Figure 3. Lithium battery charging electrical signal acquisition experiment.
Figure 3. Lithium battery charging electrical signal acquisition experiment.
Electronics 13 03316 g003
Figure 4. Partial lithium battery charging dataset.
Figure 4. Partial lithium battery charging dataset.
Electronics 13 03316 g004
Figure 5. The accuracy and loss of CNN-BiLSTM model with NASA data.
Figure 5. The accuracy and loss of CNN-BiLSTM model with NASA data.
Electronics 13 03316 g005
Figure 6. The accuracy and loss of CNN-BiLSTM model with lab experiment data.
Figure 6. The accuracy and loss of CNN-BiLSTM model with lab experiment data.
Electronics 13 03316 g006
Figure 7. The mixed-device simulation test bench set up.
Figure 7. The mixed-device simulation test bench set up.
Electronics 13 03316 g007
Figure 8. Full current signal of mixed-device simulation test.
Figure 8. Full current signal of mixed-device simulation test.
Electronics 13 03316 g008
Figure 9. CNN model training accuracy and loss.
Figure 9. CNN model training accuracy and loss.
Electronics 13 03316 g009
Figure 10. LSTM model training accuracy and loss.
Figure 10. LSTM model training accuracy and loss.
Electronics 13 03316 g010
Table 1. Generator configuration.
Table 1. Generator configuration.
LayerTypeInput DimensionsOutput DimensionsNumber of FiltersFilter SizeStrideActivation Function
1Fully Connected1001024 × 60---ReLU
2Transposed Convolution1024 × 60512 × 12051242ReLU
3Transposed Convolution512 × 120256 × 24025642ReLU
4Transposed Convolution256 × 240128 × 48012842ReLU
5Transposed Convolution128 × 48064 × 9606442ReLU
6Transposed Convolution64 × 9601 × 24,880142Tanh
Table 2. Discriminator configuration.
Table 2. Discriminator configuration.
LayerTypeInput DimensionsOutput DimensionsNumber of FiltersFilter SizeStrideActivation Function
1Convolution1 × 24,88064 × 12,4406442Leaky ReLU
2Convolution64 × 12,440128 × 622012842Leaky ReLU
3Convolution128 × 6220256 × 311025642Leaky ReLU
4Convolution256 × 3110512 × 155551242Leaky ReLU
5Convolution512 × 15551024 × 777102442Leaky ReLU
6Fully Connected1024 × 7771---Sigmoid
Table 3. The performance of GAN.
Table 3. The performance of GAN.
DataAcc (%)MSEMAE
NASA DatasetsOriginal Data95.3--
Expanded Data99.10.0120.003
Experiments DatasetsOriginal Data96.9--
Expanded Data99.70.0090.001
Table 4. CNN and BiLSTM combined model parameters.
Table 4. CNN and BiLSTM combined model parameters.
LayerTypeInput DimensionsOutput DimensionsNumber of Filters/UnitsFilter Size/KernelsStrideActivation Function
1Convolution1 × 24,88064 × 12,4406442ReLU
2Convolution64 × 12,440128 × 622012842ReLU
3Convolution128 × 6220256 × 311025642ReLU
4Convolution256 × 3110512 × 155551242ReLU
5MaxPooling512 × 1555512 × 778-22-
6BiLSTM512 × 778128 × 7781280.2-Tanh
7Dropout128 × 778128 × 778-0.2--
8BiLSTM128 × 77864 × 778640.2-Tanh
9Dropout64 × 77864 × 778-0.2--
10Fully Connected64 × 7781---Softmax
Table 5. Types and switch-on/off times of devices.
Table 5. Types and switch-on/off times of devices.
TimeEvent
9:20Start recording
9:23Turn on refrigerator
9:26Turn on laptop
9:45Start battery charging
9:56Turn off refrigerator
10:00Turn on air conditioner (cooling to 25 °C)
10:10Turn on washing machine
11:14Turn off washing machine
12:05Turn on kettle
12:10Turn off kettle
14:03Turn on hairdryer
14:08Turn off hairdryer
14:52Turn on washing machine
15:11Turn off washing machine
15:30Turn on microwave
15:45Turn on kettle
15:48Turn off microwave
15:50Turn off kettle
16:45End battery charging
16:51Turn off laptop
16:55Turn off air conditioner
17:00End recording
Table 6. Detail of devices used in the experiment.
Table 6. Detail of devices used in the experiment.
DevicesBrandModelCompanyPlace of Origin
RefrigeratorMideaBCD-213TM(E)Hefei Midea Refrigerator Co., Ltd.Hefei, China
Air conditionerHaierKFR-35GW/01KBB81U1Qingdao Haier Air Conditioner Co., Ltd.Qingdao, China
Washing machineLittleSwanTG100VT616WIADY-T1BWuxi LittleSwan Electric Appliance Co., Ltd.Wuxi, China
KettleHaierHKT-K6S17BQingdao Haier Complete Home Appliance Co., Ltd.Qingdao, China
HairdryerAUXAH76001Ningbo Shenjian Electric Appliance Co., Ltd.Ningbo, China
LaptopHuaweiBohL-WFQ9Huawei Technology Co., Ltd.Shenzhen, China
MicrowaveGalanzP70D20TL-D4Guangdong Galanz Microwave Home Appliance Co., Ltd.Guangzhou, China
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, J.; Wang, C.; Xu, L.; Wang, M.; Hu, D.; Jin, W.; Li, Y. A Study of Electric Bicycle Lithium Battery Charging Monitoring Using CNN and BiLSTM Networks Model with NILM Method. Electronics 2024, 13, 3316. https://doi.org/10.3390/electronics13163316

AMA Style

Liu J, Wang C, Xu L, Wang M, Hu D, Jin W, Li Y. A Study of Electric Bicycle Lithium Battery Charging Monitoring Using CNN and BiLSTM Networks Model with NILM Method. Electronics. 2024; 13(16):3316. https://doi.org/10.3390/electronics13163316

Chicago/Turabian Style

Liu, Jiameng, Chao Wang, Liangfeng Xu, Mengjiao Wang, Dongfang Hu, Weiya Jin, and Yuebing Li. 2024. "A Study of Electric Bicycle Lithium Battery Charging Monitoring Using CNN and BiLSTM Networks Model with NILM Method" Electronics 13, no. 16: 3316. https://doi.org/10.3390/electronics13163316

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop