1. Introduction
The development of fiber-optic sensors has rapidly grown in recent decades due to the advantages of these devices, such as small size, light weight, low cost, high sensing sensitivity, and ability to operate in harsh environments [
1,
2,
3]. Fiber-optic sensors have become a viable alternative to traditional electronic sensors in many research and industrial areas because of their outstanding chemical corrosion immunity and electromagnetic insensitivity [
4,
5]. In many application scenarios of fiber-optic sensing, the signal-to-noise ratio (SNR) is an important means of validating the sensor performance. A fiber-optic sensing system usually includes optical and electronic modules, both of which can introduce noise during processes such as light transmission, sensing, and signal processing [
6,
7,
8]. Furthermore, fiber-optic sensors fabricated from specialty materials, such as single-crystal sapphire fiber and plastic fiber, are being used in special scenarios like high-temperature, corrosive environments or when there are lightweight requirements [
9,
10]. Although these fibers have outstanding physical and chemical properties, most of them are unable to operate in the single-mode transmission state, resulting in a significant effect of the mode noise. To obtain a higher SNR in fiber-optic sensing systems, scientists have made efforts to reduce noise. One of the most common methods is using a filter algorithm, such as a digital bandpass filter or wavelet-based noise reduction [
11,
12,
13]. Many researchers have also explored methods of improving the fiber-optical sensing system design, for example, using a multi-channel system to build a noise signal compensation schematic; reducing the fiber diameter by acid-etching the fiber; or directly writing the radial waveguide around the fiber center to generate single-mode transmission in the multimode fiber [
14,
15,
16]. Most of the noise reduction approaches require additional technical or denoising procedures in fiber processing to achieve a high SNR signal. The denoising algorithms also have limitations in terms of frequency and type of noise. This has an adverse impact on the reliability and practicality of fiber-optic sensors, consequently hindering their widespread adoption.
In recent years, deep learning has become one of the most prominent technologies in both research and industrial domains. By leveraging different types of deep learning algorithms, researchers have achieved remarkable progress in areas such as computer vision, natural language processing, and image processing [
17,
18,
19]. Deep learning also shows exceptional application potential in application areas such as medical, financial, agriculture, and industrial manufacturing [
20,
21,
22,
23]. In the optical sensing field, some researchers have used deep learning algorithms to enhance sensing signals and classify sensing events. For instance, in 2021, Safati proposed a shape sensing and position estimation method of a surgical continuum manipulator [
24], utilizing data collected from fiber-optic sensors and processed by a machine learning model. In 2024, Roodsari introduced a high spatial resolution fiber shape sensing method based on the deep learning model [
25].
In this paper, we propose an algorithm to reduce the different types of spectrum noises from fiber-optic sensors based on a cycle-consistent generative adversarial network (Cycle-GAN) [
26]. Compared to the ordinary noise reduction methods, the Cycle-GAN-based denoising algorithm demonstrates superior generalizability and adaptability to different fiber sensor types and spectrum characteristics. It also exhibits a better denoising accuracy and real-time processing ability compared to the traditional sensing noise reduction algorithm. Ultimately, this denoising algorithm not only offers a novel approach to noise reduction on the fiber-optic sensors but also enhances the current fiber-optic sensing system in research and industrial applications.
2. Noise Reduction Algorithm for Fiber-Optic Sensor Spectra
The denoising procedure can be divided into two main steps: spectrum training and spectrum denoising training. In the spectrum training, the noise and clear fiber sensor spectra are input to the computer for training. This training is performed individually based on different spectrum characteristics and noise types. In this part, the computer is trained to identify the required spectrum and discard all the noise that does not belong to the high-SNR sample spectrum.
2.1. Spectrum Pre-Processing
Fiber-optical sensor spectra consist of one-dimensional data, whereas image processing algorithms typically operate on two-dimensional (2D) or higher-dimensional datasets. Although an original spectrum picture can be employed as the input of a Cycle-GAN, the picture is too large for the training, takes too much time, and requires too many resources. Hence, 1D spectrum data should be resized into a 2D picture before training and transforming. In our demonstration, all the data were pre-processed using MATLAB, including the simulation and experimental data.
Figure 1a illustrates a regular high-reflection fiber Bragg grating (FBG) structure, where periodic refractive index (RI) modulation is applied along the silica fiber axis. As the incident light propagates to the grating area, it generates partial reflection across a specific wavelength range. The FBG is simulated by using the
transfer matrix
of the uniform FBG, as described in the following function [
27]:
where
denotes the self-coupling coefficient, and
is the coupling coefficient as a function of wavelength
and RI modulation. The
and
correspond to the grating length and wave vector detuning parameter, respectively. Both
and
are the functions of
and
, while
is related to the central Bragg wavelength,
, which is considered as a constant for a given FBG. As a result, for each FBG with distinct central Bragg wavelength, the total reflectivity can be expressed as the following function:
Figure 1b presents a spectrum of a simulated high-reflectivity FBG obtained using the transfer matrix method. The spectrum comprises
data points within the wavelength range from
to
.
In this paper, three fiber-grating-based sensor types and a fiber Fabry–Perot Interferometer (FPI) sensor are presented to demonstrate the denoising capability of our algorithm. The numerical approaching of the FPI with its total reflectivity
can be described as a function of wavelength
as:
where
represents the reflectivity at the interface between the fiber core and FP cavity medium, while
and
are the RI and cavity length of the FP cavity, respectively. For a specific FPI with a fixed FP cavity medium, both
and
are constant. The spectrum can be modified by varying the cavity length.
It should be considered that the chosen data range may vary for different types of spectra. For example, the FPI spectrum interception range is broader than the FBG-related spectrum, which is generally concentrated around the central grating wavelength. Since the original data are recorded using decibel or linear scales, they cannot be directly transferred to the picture data. Thus, normalization should be performed before training or transferring. On the other hand, the different ranges of the input data affect the evaluation and discrimination procedures during the training, generating an error that reduces the output accuracy. The normalization optical intensity employed in this study, denoted by
, can be expressed as follows:
where
,
, and
are the original, maximum, and minimum power intensities along the wavelength, respectively. The above equation maps the original intensity to the range between
and
while maintaining the original data relations. The normalized data were reshaped to a 2D grayscale image. For each pixel on the 2D reshaped picture, the grayscale-level values vary from
to
, containing sufficient information for further data processing while keeping the required spectrum and noise for reconstructing the spectrum after noise reduction. Hence, the FBG spectrum was reshaped to a
grayscale picture as shown in
Figure 1c. In the following tests, the simulation test group included
data points, while the experimental data only contained
data points due to the interrogator limitation.
2.2. Spectrum Denoising Training
The Cycle-GAN-based denoising algorithm needs unsupervised training to recognize the signal and noise prior to its application in denoising the fiber-optical sensor spectrum. The training procedure requires two classes of dataset, one containing the source low-SNR spectrum reshaped images with a high noise level and another containing the high-SNR spectrum reshaped images, called the original and target data domains and denoted by
and
, respectively. The overall training flow is shown in
Figure 2.
The denoising algorithm operates through two end-to-end generators, and , along with two discriminators, and . Each generator contains four main components: three convolutional (Conv) layers, a residual neural network consisting of nine residual blocks (9-block ResNet), two deconvolutional (Deconv) layers, and a final Conv layer. The initial three Conv layers are used to extract low-level features from the input image while reducing its spatial dimensions and increasing its depth. The 9-block ResNet serves as the core of the generator within the Cycle-GAN model, playing a crucial role in residual learning and feature extracting, thereby enhancing the generator’s performance and stability. After passing through the residual blocks, the data are sent to the Deconv layers for up-sampling to a higher resolution and transforming back to the original image dimensions of the target domain. Finally, the additional Conv layer reduces the output image depth to match the desired channel configuration.
The discriminator structure in the Cycle-GAN model is relatively simple, containing three Conv layers, a batch normalization layer, a Leaky ReLU activation function, and an output layer. The first three Conv layers function similarly to those in the generators, extracting essential features from the images. The normalization layer stabilizes the training process by normalizing the outputs of each Conv layer, helping to reduce internal covariate shift and improve convergence speed. The Leaky ReLU activation function is applied after each normalization layer to enhance the gradient flow. The final layer is a single Conv layer that outputs a feature map with a single channel, facilitating classification decision regarding the input image.
These generators and discriminators engage in a competitive process throughout the training phase. The generators aim to generate fake examples that resemble data from the opposing domain. In contrast, the discriminators are attempting to discern whether the input data are authentic or fabricated. In our denoising model, the generator
is used to transform the low-SNR source data into the same data as in the high-SNR target domain. The generated data,
, which represents the mapping from the low-SNR domain to the high-SNR domain, are sent to the discriminator
for classification.
contains both the real data from the high-SNR domain and the fake data generated by
, and its function is to distinguish between them. The incurred loss during the generation and discrimination can be described as the adversarial loss with the following function [
28]:
where
and
represent the expectations of data distribution for the high-SNR and low-SNR spectra.
and
denote the data from the real high-SNR domain and the generated data, respectively.
On the other hand, the generated data
are sent to another generator
to map the data back to the low-SNR domain. The output data
are compared to the original low-SNR data to confirm whether
remains consistent during the process. The loss in this procedure can be expressed as the function below:
In this function, the output
is called cycle consistency loss.
represents the data from the low-SNR domain, and
denotes the
transform procedure across the two generators. The entire training process includes another opposite path as described before. Thus, the opposite loop also generates the adversarial loss and cycle consistency loss as below:
Ultimately, the overall loss function used to evaluate the entire transformation effect throughout the training cycle can be expressed by the following equation:
where
is the sum of the cycle consistency losses from two directions, and
represents the relative importance value that balances the weights of
and
. In the adversarial process, the overall loss is used to evaluate the accuracy of generation, and the aim of the training program is to minimize the loss. The training cycle is repeated thousands of times to self-modify the denoising parameters, ultimately leading to a zero-sum game where the discriminators can only make a 50% guess.
The training iteratively enhances the reliability of the fake output spectrum data generated by , ultimately achieving a high-SNR spectrum without additional noise. Notably, the training and denoising processes are based on the characteristics of the images. This procedure involves feature extraction from the low-SNR spectrum images and reconstructing them with the features from the high-SNR data domain. Consequently, critical information essential for further analysis, such as the free spectrum range, wavelength, or spectrum shape, is preserved. As a result, the training process empowers the denoising model with the capability to effectively eliminate noise from its corresponding spectrum type. Depending on the computer configuration, the denoising procedure utilizing a pre-trained Cycle-GAN model only takes a few seconds.
4. Denoising Results and Discussion
Both the simulation and experimental spectra were pre-processed and subsequently fed into the Cycle-GAN model for training. After sufficient training with thousands of data points and epochs, each type of sensor spectrum had its own specific denoising parameters and was ready for denoising. We applied the algorithm to different simulated spectra as mentioned above to evaluate the denoising capabilities of Cycle-GAN-based denoising for various spectra. Two classic spectrum denoising algorithms were also utilized to compare their denoising results with ours. Additionally, using the spectra obtained in the modal noise reduction experiment setup as shown in
Figure 2, we conducted a series of temperature response tests to validate the practical applicability of the denoising algorithm.
The denoising results of the four simulation spectra are shown in
Figure 6. The denoised spectra and their remaining noise difference are presented for each sensor type. In the four simulated sensor denoising tests, the low-finesse FPI has the slightest difference between the original high-SNR and the denoised spectrum. Once the spectrum detail increases, the remaining spectrum difference level grows, while the regular and chirped FBG sensors have similar spectrum differences. In the FBG spectrum, more remaining noises are located at the side-band peaks, while most of the noises remain at the central range of the flat peak in the chirped FBG test. The sharp interference valleys in the FBG pair have different depths due to the wavelength resolution of the simulated spectrum, causing a relatively high spectrum difference in the denoising spectrum generation. However, the denoised spectrum still shows ideal performance and is similar to the original high-SNR spectrum. The denoising results can be improved by increasing the data resolution. Another
high-SNR spectra were simulated for each sensor to evaluate the performance of the spectra obtained from the Cycle-GAN-based algorithm. Random and periodic noises were added to the test high-SNR spectrum and sent to the pre-trained denoising model. To determine the time efficiency of the proposed denoising algorithm, the denoising process was run several times, and the average processing time for the entire
spectra was calculated. With an Nvidia 4090 graphics card, the average data processing time was around
, and the longest processing time was less than
, indicating a significant improvement in the denoising efficiency compared to the traditional digital filter methods.
The denoising effectiveness was evaluated by comparing the denoised spectrum with the original high-SNR spectrum.
Table 1 presents the SNR values for the four types of sensors before and after denoising. Since all noises were manually added at the same power level, the three FBG-based sensors provided similar SNR values ranging from
to
before applying the denoising algorithm. The simulated low-finesse FPI sensor had a spectrum shape close to a sinusoidal waveform, resulting in a relatively high SNR of
dB even before denoising. After denoising, the low-finesse FPI, regular FBG, and chirped FBG achieved an SNR of around
dB. With the spectrum intensity maintained at a relatively consistent rate, the noise power is reduced by
,
, and
. Similarly, the SNR of the FBG pair is relatively high for the reasons mentioned before, while its average SNR increases by
dB, corresponding to an
noise power reduction with the same signal power.
The correlation coefficient (
) and root mean square error (RMSE) between the denoised and original high-SNR spectra were also calculated. The average
values reached
,
,
, and
for the low-finesse FPI, regular FBG, chirped FBG, and FBG pair sensors, respectively. The average RMSE of the four types of sensors also demonstrated excellent results. With the reflectivity normalized to 1, the highest RMSE, from the FBG pair, was 0.0275, while the lowest RMSE, from the regular FBG, was only 0.0067. These values indicate an outstanding ability to preserve the original spectral characteristics during the denoising procedure.
Table 1 presents the results of a comparison of the sensing spectrum SNR before and after applying the denoising algorithm, along with the overall
and RMSE between the denoised spectrum and the original high-SNR spectrum.
Wavelet thresholding (WT) and empirical mode decomposition (EMD) are two of the most used denoising techniques in fiber-optic sensing due to their advantages, such as effective noise reduction, broad applicability, and the ability to preserve the original signal characteristics. Both the WT and EMD algorithms were applied to these simulated noisy spectra to further evaluate the performance of the Cycle-GAN-based denoising algorithm in comparison to these traditional methods.
Table 2 presents the results, where the first three rows show the SNRs,
values, and RMSEs from the denoising spectra using the WT algorithm, while rows four to six display the corresponding values obtained using the EMD algorithm. Adjacent to each SNR,
value, and RMSE, we also list the differences between these values and those obtained using the Cycle-GAN-based algorithm. These difference values are calculated by directly subtracting the values from
Table 1. Hence, a negative value of SNR and
or a positive value of RMSE indicates an improvement of our denoising algorithm over the traditional methods.
The SNR,
, and RMSE of the low-finesse FPI obtained from the WT are very close to those obtained using the Cycle-GAN-based algorithm, differing by only
dB in SNR,
in
, and
in RMSE. However, when examining the denoising performance on spectra with more detail, the output differences between WT and the Cycle-GAN-based algorithm dramatically increase. In the case of the regular FBG and FBG pair sensors, most of the remaining noise from the WT is located on the sideband. The interferences in the FBG pair sensor introduce additional narrow valleys and fringe repetitions in the spectrum, resulting in an SNR of only
dB and a
after applying the WT method. The FBG pair also provides the highest RMSE, nearly double the value in
Table 1. Although the regular FBG demonstrates a relatively high SNR compared to the FBG pair, it still shows an SNR difference of over
dB and an RMSE three times larger than the value from the Cycle-GAN-based denoising algorithm. The results from the chirped FBG show an SNR of over
dB and an RMSE value close to that of the regular FBG after the WT, which may be attributed to the relatively flat spectrum. The results for the denoised parameters from EMD show a similar tendency. Due to the different algorithm characteristics, EMD gives better results for FBG and chirped FBG compared to WT. Its
for the chirped FBG spectrum reaches
, which is almost the same value as that obtained by our algorithm. Meanwhile, it demonstrates the worst values with the FPI and FBG pair sensor spectra. Accordingly, the comparative results indicate that the noise reduction output of the Cycle-GAN-based denoising algorithm is superior to that of both classical algorithms. The distinction is particularly evident when the original signal has a complex spectrum containing a higher proportion of high-frequency components.
After data collection from the setup shown in
Figure 4, both SMF-FPI and MMF-FPI spectra were pre-processed and trained within the Cycle-GAN-based algorithm.
Figure 7a displays the original MMF-FPI spectrum collected with MMF and its corresponding denoised spectrum processed by the algorithm.
Figure 7b,c illustrate the 2D reshape images of the input and output spectra of the pre-trained denoising model. The FSR calculated for both noisy and denoised spectra is approximately
, indicating a close distribution of spectrum peaks and valleys. The results demonstrate excellent FSR maintenance, facilitating further wavelength analysis.
The setup was also employed to perform a temperature-detection test to validate the temperature response of the denoised MMF-FPI. The spectrum was recorded for both the SMF-FPI and MMF-FPI at the same temperature. After applying the denoising algorithm, the wavelength shift was obtained by tracking one of the peaks in the spectrum. The temperature test exhibits a good linearity of the denoised FPI wavelength shift versus temperature variations, as shown in
Figure 8a. The
of the denoised data and its linear fit is approximately
as the temperature changes from
to
in steps of
. The overall selected wavelength peak shift during the temperature change is
, indicating a temperature sensitivity of
. This is compatible with the theoretical temperature response value of
obtained from the literature [
29]. The small disparities between the denoised MMF-FPI test and the theoretical value may be attributed to the equipment and operational errors during the experiment. On the other hand, the denoised MMF-FPI exhibits a very similar wavelength shift to the data acquired from the SMF-FPI, as shown in
Figure 8b. The temperature sensitivity for the SMF-FPI is
, and the
between the SMF and the denoised MMF temperature responses is
. As a result, the denoised spectrum from the Cycle-GAN-based algorithm achieves the desired temperature response linearity and sensitivity, demonstrating its superior temperature sensing capability compared with the regular SMF-FPI sensor.
A low-pass filter (LPF) was applied to process the same temperature response data to further compare the differences between the Cycle-GAN-based denoising algorithm and traditional algorithms in the testing of the MMF-FPI.
Figure 9a shows the spectra of the same MMF-FPI obtained via different denoising methods. The spectrum from the LPF demonstrates a periodic wave similar to a sinusoidal function when compared to the original SMF-FPI, MMF-FPI, and denoised spectrum from the Cycle-GAN-based algorithm. Please note that the silicon wafer has a refractive index of
at the wavelength around
, corresponding to about 30% reflectivity with air. Therefore, the spectrum processed by the LPF loses some characteristics of the high-finesse FPI, whereas these features are preserved in the spectrum obtained via the Cycle-GAN-based approach.