1. Introduction
Fiber optic sensors have transformed temperature measurement, providing benefits such as resistance to electromagnetic interference, reduced dimensions, and multiplexing possibilities. Numerous topologies utilizing optical fiber technology have been proposed over the years, including Fiber Bragg Gratings (FBGs), Long-Period Fiber Gratings (LPFGs), interferometers, and other sophisticated designs [
1,
2,
3,
4,
5,
6]. Among these configurations, LPFGs are distinguished by their simplicity, cost-effectiveness, and capacity to simultaneously monitor various parameters. LPFGs are periodic structures inscribed in optical fibers that couple core and cladding modes at specific wavelengths, producing resonances that are responsive to environmental variations like temperature or strain [
7]. These resonances make LPFGs exceptionally appropriate for temperature-sensing applications.
Traditionally, LPFG-based sensors are analyzed by observing the resonance wavelength shift or transmitted power variations [
7,
8]. Nevertheless, these techniques may exhibit limitations in sensitivity and the ability to differentiate among various variables. Moreover, traditional interrogation methods frequently necessitate intricate optical configurations, elevating system expenses and complexity. Recent advancements in imaging technologies and deep learning algorithms present novel opportunities for improving fiber optic sensor interrogation [
9]. Utilizing near-field imaging techniques to capture the modal distribution of LPFGs and employing advanced image processing allows for extracting significant information from the excited higher-order modes in the fiber. This method utilizes the substantial information included in the modal distribution, which is acutely responsive to variations in temperature. Furthermore, the application of deep learning, particularly convolutional neural networks (CNNs), facilitates the creation of predictive models capable of precisely estimating temperature based on the acquired modal distributions. Numerous research studies have illustrated the efficacy of deep learning in the interrogation of fiber optic sensors [
3,
4,
5,
10]. For example, fiber specklegram sensors (FSSs) have been investigated for temperature measurement, employing modal interference in multimode fibers [
6]. This research demonstrated that deep learning models outperform conventional methods such as image correlation or optical power measurements for accuracy and robustness. CNNs are particularly effective at extracting features from complex speckle patterns, which can then be used for regression tasks such as temperature prediction.
This study introduces an innovative temperature sensor that employs the modal distribution in LPFGs and incorporates deep learning for improved interrogation. The sensor was created by constructing an LPFG with a 450 µm period and a length of 22.5 mm in a few-mode optical fiber, to encourage the mode at 980 nm, which exhibits significant sensitivity to changes in temperature. Near-field images of the mode were acquired and utilized to establish a database for the training and validation of a CNN. The deep learning model attains a high degree of accuracy in temperature prediction with negligible error, illustrating the efficacy of this method. This study presents the novel combination of deep learning with LPFG-based sensors, offering a swift, dependable, and effective solution for real-time temperature monitoring, with prospective applications in diverse sectors including industrial, biomedical, and environmental monitoring.
2. Methods
2.1. Operating Principle
The design of LPFGs is based on a periodic perturbation applied to the refractive index to enable energy transfer between propagation modes. The most used method to analyze this type of waveguide is the Coupled Mode Theory (CMT), which involves solving a set of coupled equations and calculating the coupling coefficients responsible for the transfer of optical power between the different modes supported by the optical fiber.
The electromagnetic field for the interaction between the linearly polarized modes
and
, can be expressed using the coefficients
(where
or
), which represent the amplitude of the electric field.
where
and
are the transversal field distributions, and
and
are the propagation constants.
Since the coefficients
are not constants, this implies that interaction between orthogonal modes can occur, in other words, energy transfer or modal coupling may exist. According to the phase matching condition, significant power exchange in the LPFG happens when
, which can be expressed in terms of the effective refraction indices and the wavelength as:
where
denotes the resonance wavelength of the LPFG.
Thus, changes in temperature can be derived from modifications in the energy coupling between the modes, as temperature variations affect the refractive index and, consequently, the coupling coefficients and resonance wavelength of the LPFG.
2.2. Experimental Setup
The LPFG inscription system utilizing a CO
2 laser (Iradion, model 155) was used, which was described in detail in ref. [
11]. The calculated grating period (Λ) that matches the phase condition between the
and
modes at 980 nm was approximately 450 µm, and 50 periods were inscribed per cycle, controlled via a PC interface.
Figure 1 depicts the experimental configuration employed to obtain modal images at different temperatures. A 980 nm laser (FP-B-980-150, Optilab, Phoenix, AZ, USA) was utilized and connected to a linear polarizer (PC1) to guarantee that the light entering the LPFG was polarized at 0°. The light propagated through a 0.2 m PANDA fiber, which maintained the polarization invariance. The PANDA fiber was spliced to the manufactured LPFG in a single-mode optical fiber (SMF-28, Corning, Corning, NY, USA). A 20x objective lens collected the transmitted light at the output, while an adjustable analyzer (PC2) facilitated the assessment of polarization effects. The modal intensity distribution at the LPFG output was recorded with a WiDy SWIR 640v camera, facilitating an accurate image analysis of the modal structure under varying temperatures. These temperature changes on the LPFG were induced using a ceramic heater.
The laboratory conditions for the experiments were 24 °C and 65% humidity. The temperature perturbances on the fiber were regulated by an Arduino-based system. A ceramic heater and thermistors supplied real-time data via the OptiGUI DataCollector program, guaranteeing thermal uniformity along the LPFG [
12].
2.3. Data Preprocessing and Model Training
The CNN model used in this work is based on the MobileNet architecture, which is a pre-trained model for image classification tasks [
13]. Our dataset, acquired with the SWIR camera, consists of 16-bit grayscale images with
pixels of resolution. Since MobileNet is designed to process three-channel (RGB) inputs, we converted the grayscale images to RGB by replicating the grayscale values across all the channels. Likewise, all images were cropped to
pixels to ensure compatibility with the input requirements of the architecture, and to center the intensity pattern within the field of view.
On the other hand, data augmentation techniques were applied, including contrast adjustment and additive gaussian noise, to increase the diversity of the dataset and improve the model’s ability to generalize. The images were normalized to have pixel values between 0 and 1. The labeled dataset, comprising 1200 images after data augmentation, was randomly divided into 70% for training, 20% for validation, and 10% for testing. This facilitated efficient hyperparameter optimization while ensuring a continuous model evaluation without introducing selection biases.
In this study, the MobileNet architecture was adapted from a classification task to a regression model aimed at predicting temperature values from experimental image data [
6]. By leveraging transfer learning, we used pre-trained weights from the ImageNet dataset, which consists of 1000 image classes [
13]. To customize the architecture for regression, the original classification layer was removed and added three fully connected layers, each one with 1024 neurons and ReLU activations, followed by a dropout layer with a rate of 0.1. The final layer was modified for regression, enabling the model to estimate temperature values based on visual features extracted from the
mode intensity patterns. The model was implemented in Python with the deep learning frameworks Keras and TensorFlow. Hyperparameter optimization and performance enhancement were conducted using the Optuna library [
14].
Additionally, we incorporated a learning rate scheduler with exponential decay, which dynamically adjusts the learning rate throughout training. This method uses an exponential function to gradually reduce the learning rate from its initial value, governed by a decay factor, and applied at predefined intervals, helping ensure more efficient convergence.
3. Results and Discussion
Figure 2 shows several images corresponding to the
mode captured under varying temperature conditions. The variations in intensity distribution signify the alterations in temperature applied to the fiber, demonstrating the consequent changes in mode coupling.
The performance of the MobileNet model adapted for temperature regression using the Mean Squared Error (MSE) was evaluated.
Figure 3 presents the optimization history (using Optuna), illustrating how the MSE fluctuates based on the different hyperparameter combinations tested. Specific regions can be identified where the model achieved a lower MSE, indicating more effective hyperparameter configurations. The points on the graph represent the outcomes of each of the 100 trials conducted. The optimal combination of hyperparameters that yielded the best performance included an initial learning rate of 0.00228, a decay rate of 0.8559, and decay steps of 6480.
In
Figure 4, the main plot illustrates the performance of the model using a scatter plot, where the actual temperature values (
-axis) were compared with the predicted values (
-axis). Most of the points lie close to the line
, indicating that the predictions closely align with the real values. This indicates good model performance. The points are in different colors representing the various data subsets, and their uniform distribution around the diagonal line suggests that the model generalizes well across all partitions. The histograms along the top and right axes reflect the distribution of the real and predicted temperature values confirming a low error dispersion between the predicted and actual distributions, further indicating consistent predictions across the entire range of experimental temperatures. Additionally, the inset graph in the low corner shows the training loss and validation loss over time. Both losses converge to low values, with no significant gap between them, implying minimal overfitting and suggesting that the model generalizes well to unseen data.
The graphical evaluation is further validated by the quantitative results obtained: a prediction accuracy of 98.5%, a maximum error of 3.77 °C, and a root mean square error (RMSE) of 0.94 °C across a temperature range of 24 to 190 °C. Additionally, the model demonstrated an inference time of 0.055 s for a batch of 32 images. These results confirm the effectiveness of the proposed approach, utilizing machine learning to achieve highly accurate and efficient temperature predictions.
4. Conclusions
In this study, a temperature sensor based on the modal distribution of Long-Period Fiber Gratings (LPFG) was developed using a deep learning approach. By inscribing an LPFG in an optical fiber and capturing images of the mode under varying thermal conditions, we trained a convolutional neural network (CNN) based on the MobileNet architecture. Through the integration of image processing techniques and hyperparameter optimization using the Optuna library, we achieved a prediction accuracy of 98.5% and a root mean square error (RMSE) of 0.94 °C.
The graphical results clearly demonstrate the model’s strong predictive capabilities in temperature regression. The tight clustering of data points along the diagonal, the low dispersion in the histograms, and the rapid convergence in the loss plot underline the model’s ability to accurately predict temperature values, with robust generalization across different data subsets.
Furthermore, the model’s fast inference time of 0.055 s for a batch of 32 images highlights its efficiency, making it suitable for real-time applications. Overall, this study confirms the effectiveness of combining LPFG-based sensors with machine learning to develop accurate, reliable, and efficient temperature sensing systems.
Author Contributions
J.S.-P. and J.A.M.: conceptualization, methodology, visualization, investigation, software, data curation, and writing—review and editing. Y.R.M. and J.M.-C.: conceptualization, methodology, investigation, formal analysis, resources, data curation, writing—original draft, writing—review and editing, and funding acquisition. J.M.-C.: investigation, data curation, formal analysis, and writing—review and editing. E.R.-V. and J.H.-R.: investigation, resources, supervision, writing—review and editing, formal analysis, and project administration. All authors have read and agreed to the published version of the manuscript.
Funding
The authors acknowledge the support of the Instituto Tecnologico Metropolitano, through project PE24201.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The raw data supporting the conclusions of this article will be made available by the authors on request.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Reyes-Vera, E.; Cordeiro, C.M.B.; Torres, P. Highly Sensitive Temperature Sensor Using a Sagnac Loop Interferometer Based on a Side-Hole Photonic Crystal Fiber Filled with Metal. Appl. Opt. 2017, 56, 156. [Google Scholar] [CrossRef] [PubMed]
- Reyes-Vera, E.; Jimenez-Durango, C.; Varon, M.; Torres, P. Fourier Scheme for the Fiber Loop Mirror Temperature Sensor Based on Indium-Filled Side-Hole Photonic Crystal Fiber. In Proceedings of the 2018 International Conference on Electromagnetics in Advanced Applications (ICEAA), Cartagena, Colombia, 10–14 September 2018; pp. 199–201. [Google Scholar] [CrossRef]
- Sridevi, S.; Kanimozhi, T.; Ayyanar, N.; Chugh, S.; Valliammai, M.; Mohanraj, J. Deep Learning Based Data Augmentation and Behavior Prediction of Photonic Crystal Fiber Temperature Sensor. IEEE Sens. J. 2022, 22, 6832–6839. [Google Scholar] [CrossRef]
- Gao, X.; Wu, J.; Song, B.; Liu, H.; Duan, S.; Zhang, Z.; Liu, X.; Sun, H. Deep Learning for Temperature Sensing with Microstructure Fiber in Noise Perturbation Environment. IEEE Photonics Technol. Lett. 2023, 35, 1247–1250. [Google Scholar] [CrossRef]
- Pan, R.; Wang, C.; Yang, W.; Liu, J.; Zhang, L.; Yu, S.; Wu, H.; Zhang, M.; Wu, Y. A Deep Learning Assisted Fiber Optic Sensor Capable of Simultaneously Measuring Temperature and Vector Magnetic Field. IEEE Sens. J. 2024, 24, 30128–30135. [Google Scholar] [CrossRef]
- Vélez, F.; Arango, J.; Aristizábal, V.; Trujillo, C.; Herrera-Ramírez, J. Comparative Performance Evaluation of Classical Methods and a Deep Learning Approach for Temperature Prediction in Fiber Optic Specklegram Sensors. Comput. Opt. 2024, 48, 689–695. [Google Scholar] [CrossRef]
- Valencia-Garzón, S.; Reyes-Vera, E.; Galvis-Arroyave, J.; Montoya, J.P.; Gomez-Cardona, N. Metrological Characterization of a CO2 Laser-Based System for Inscribing Long-Period Gratings in Optical Fibers. Instruments 2022, 6, 79. [Google Scholar] [CrossRef]
- Barino, F.O.; de Aguiar, E.P.; de Mello Honorio, L.; Silva, V.N.H.; Lopez-Barbero, A.P.; dos Santos, A.B. A Fuzzy Approach to LPFG-Based Optical Sensor Processing and Interrogation. IEEE Trans. Instrum. Meas. 2022, 71, 2520207. [Google Scholar] [CrossRef]
- Reyes-Vera, E.; Valencia-Arias, A.; García-Pineda, V.; Aurora-Vigo, E.F.; Alvarez Vásquez, H.; Sánchez, G. Machine Learning Applications in Optical Fiber Sensing: A Research Agenda. Sensors 2024, 24, 2200. [Google Scholar] [CrossRef] [PubMed]
- Arango, J.D.; Aristizabal, V.H.; Carrasquilla, J.F.; Gomez, J.A.; Quijano, J.C.; Velez, F.J.; Herrera-Ramirez, J. Deep Learning Classification and Regression Models for Temperature Values on a Simulated Fibre Specklegram Sensor. J. Phys. Conf. Ser. 2021, 2139, 012001. [Google Scholar] [CrossRef]
- Soto-Perdomo, J.; Reyes-Vera, E.; Montoya-Cardona, J.; Torres, P. Experimental Dataset of Tunable Mode Converter Based on Long-Period Fiber Gratings Written in Few-Mode Fiber: Impacts of Thermal, Wavelength, and Polarization Variations. Data 2023, 9, 10. [Google Scholar] [CrossRef]
- Soto-Perdomo, J.; Morales-Guerra, J.; Arango, J.D.; Montoya Villada, S.; Torres, P.; Reyes-Vera, E. OptiGUI DataCollector: A Graphical User Interface for Automating the Data Collecting Process in Optical and Photonics Labs. SoftwareX 2023, 24, 101521. [Google Scholar] [CrossRef]
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017, arXiv:1704.04861. [Google Scholar] [CrossRef]
- Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A Next-generation Hyperparameter Optimization Framework. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, AK, USA, 4–8 August 2019; ACM: New York, NY, USA, 2019; pp. 2623–2631. [Google Scholar] [CrossRef]
| 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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).