Application of fiber optic sensors using Machine Learning algorithms for temperature measurement of lithium-ion batteries

—Optical fiber sensors using low-coherence interferometry require processing of the output spectrum or interferogram to quickly and accurately determine the instantaneous value of the measured quantity, such as temperature. Methods based on machine learning are a good candidate for this application. The application of four such methods in an optical fiber temperature sensor is demonstrated. Using a ZnO-coated sensing interferometer and spectral detection, the sensor is intended for monitoring lithium-ion rechargeable batteries. While the performance of all methods was good, some of them seem to be better suited for this application.

Rechargeable lithium-ion batteries have become the power source of choice in consumer electronic devices, transportation, and grid-scale energy storage [1].In 2022, there were about 6.6 billion smartphone users worldwide, resulting in about 7 billion lithium-ion battery cells being used in this application only [2][3].E-cigarettes are another popular consumer product using rechargeable lithium-ion batteries, with 68 million users worldwide [4].
In these applications, the key advantages of rechargeable lithium-ion batteries are high energy density, relatively long lifespan, and lack of cadmium, lead, and nickel in the battery cells.Consequently, these batteries are lighter, smaller, and more environment-friendly compared to other rechargeable battery types [5].
Some failure mechanisms of rechargeable lithium-ion batteries can result in an explosion or fire, with material losses, injuries, or even fatalities ensuing [6][7][8][9].Thermal runaway is one of these batteries' most critical catastrophic failure mechanisms, necessitating the monitoring of the temperature of individual battery cells (in any given device) [10][11].
Optical fiber sensors are a good choice for this application, especially in higher-voltage batteries made from non-conductive, chemically inert materials.
The layout of the interferometric optical fiber temperature sensor used in this research is presented in Fig. 1a.The sensor employs a superluminescent diode (SLD) having a central wavelength of 1310 nm as the broadband light source.A microsphere-based sensing * E-mail: kacper.cierpiak@pg.edu.plinterferometer, shown in Fig. 1b, is used.As the detection setup is based on an optical spectrum analyzer (OSA), the sensor's output is a spectral characteristic of intensity, shown in Fig. 1c.Further processing of this spectrum yields the measured temperature.A more detailed description of this sensor is available in [12][13].
When analyzing interferograms created during fiberoptic head measurements, manual methods prove to be insufficient, as they are labor-intensive and error-prone.Machine learning (ML) methods are potentially capable of effectively determining the temperature from the collected data.
The temperature was measured with the system described above.We managed to collect 3710 samples, of which two-thirds were the teaching dataset, and one-third were the test dataset.
The first step was to allow machine learning algorithms to analyze interferograms, determining all the features the future model would consider during learning.For this purpose, the data was de-noised using the IIR (Infinite Impulse Response) filter, and all peaks on the interferogram were determined.In addition to general statistics, features were also determined for the five highest peaks on the interferogram.
Four different machine learning algorithms were compared: KNN (k nearest neighbors)algorithm classifies a new sample based on its k nearest neighbors, assuming they belong to the same class.Decision Tree -It is a tree structure in which internal nodes contain tests on attribute values.The number of branches at each node is equal to the number of possible test results at that node.Leaves store information about the sample's class.The method involves cyclic division of learning vectors according to selected criteria.Random Forest -It is built of multiple decision trees, each tree built on a different, randomly selected subset of the learning dataset.The majority selection decides the searching trees.Neural Network (multi-layer perceptron) -Includes three types of layer input, output, and hidden.Network learning is possible through backward error propagation.
During classification, algorithms using learned models assign successive interferograms to a specific class.The process is based on probability, so assigning the wrong class is possible.The statement that a given interferogram is in the right class is not always sufficient, hence using the following terms.True Positive (TP) -If the model correctly predicts the positive class, i.e., the temperature is within the specified range and has been classified as positive.True Negative (TN) -if the model correctly predicts the negative class, i.e., the temperature is outside the specified range and has been classified as negative.False Positive (FP) -if the model incorrectly predicts the positive class, i.e., the temperature is outside the specified range and has been classified as positive.False Negative (FN) -if the model incorrectly predicts the negative class, i.e., the temperature is within the specified range and has been classified as negative.The following metrics were used to determine the quality of the models: Accuracy A is the ratio of the number of correct predictions to the total number of predictions, calculated as: Recall Rmeasures the ability of the model to detect positive samples and is calculated as the ratio of the number of positive samples correctly classified as Positive to the total number of Positive samples, i.e.: while precision P is defined as: F1 is the harmonic average of R and P, given by [14]: A high F1 score means that the model can detect positive samples, and all the positives found are True Positive [14].
AUC -The higher the AUC, the better the model performs in distinguishing between positive and negative classes.
Two predictive models were created.The first model assumed a lower temperature limit of 35°C and an upper limit of 85°C.The second model differed in the upper limit value, which was 200°C.The data was classified into three classes.The first class is below the lower limit, the second is between the lower and upper limits, and the last is above the upper limit.The results of the individual metrics for each algorithm are comparable for both temperature limits.As seen in Table 1 and Table 2 the Random Forest algorithm has very high accuracy for both cases.In addition, it scores very well in the F1 and AUC metrics.Using the Random Forest algorithm makes it possible to create practical applications using photon sensors to measure temperature.

Figure 2 and
Figure2and Figure3show the results of the TP, TN, FP, FN indicators.The lighter color means that more samples have been classified into a particular class.We are interested in having the bright spots appear only on the diagonal from the upper left corner to the lower right corner.All other fields mean that the model has made a wrong classification.After carefully analyzing both cases, we see that the worst-performing algorithm was KNN, while the best was Random Forest.

Table 1 .
Summary of results for KNN and Decision Tree.

Table 2 .
Summary of results for Random Forest and Neural Network.