1. Introduction
Optical sensors are used in many fields of science and technology. They enable online measurements at a distance by using optical fibre as a transmission medium. One of the most important physical quantities measured using fibre optic sensors is the refractive index [
1]. The surrounding refractive index (SRI) is the ratio of light velocity in the air to the velocity in the liquid that surrounds the optical fibre. Determining the relationship between the value of the desired quantity and the sensor’s response is performed using the calibration process. On its basis, the sensor’s properties, such as linearity or resolution, can be determined. One of the most popular optical sensors is the fibre optic Bragg gratings. Such sensors are based on changing a specific parameter of the optical spectrum under the influence of an interacting physical quantity. The optical spectrum of the sensor can be measured using the reflection or transmission method. Bragg gratings are periodic structures created in the fibre core. Classic FBGs have a Gaussian shape spectrum. Information about the measured quantity is encoded in the position of this shape on the wavelength axis. Therefore, it is an encoding in the wavelength domain, as opposed to the classic analysis of spectra, in which the information is contained in the intensity of the transmission spectrum. Full use of the information contained in the spectrum requires the use of an appropriate demodulation method. A periodic structure with a tilted refractive index modulation in the core, called TFBG (Tilted fibre Bragg grating), is a universal optical fibre measurement element that can be used to determine temperature, stress, fibre curvature, polarisation angle, and, above all, the refractive index of the fluid surrounding the fibre. In terms of measurement properties, FBGs and TFBGs differ significantly [
2]. The measurement capabilities are the result of the excitation of several dozen cladding modes. The transmission spectrum parameters can be converted into the refractive index value using various mathematical operations. It is mainly SRI measurements that lead to the creation and research of new structures and applications of TFBGs. The development of measurement methods for TFBGs also uses special types of optical fibres [
3]. Unlike other fibre optic methods for determining SRI, TFBGs do not require removing the fibre cladding or implementing a special sensor head [
4].
Changes in SRI values determined using TFBGs are used in measurements in many areas. They include, for example, biomedical measurements such as the detection of rheumatoid arthritis biomarkers [
5] or solution concentration measurement [
6]. By applying an appropriate coating, a TFBG can be used to monitor transformer oils [
7]. In such practical applications, a data processing method must be developed, selected or modified. This is done in order to improve the metrological parameters obtained from the measurements. Many methods using the transmission amplitude changes of the TFBG optical spectrum have been developed. Most of them use the envelope created by the cladding modes. The entire spectrum is then represented only as an envelope. It changes under the influence of interacting factors. Such algorithms do not use the possibilities offered by advanced methods such as pre-processing, signal enhancement and feature extraction. Methods other than the mode envelope are much less frequently used. Algorithms calculating the amplitude parameters of the spectrum are susceptible to the unfavourable influence of changes in the background spectrum as well as measurement noise. The determined spectrum parameters are often limited to identifying the graphical relationship between a specific spectrum parameter and an influencing quantity. Taking into account the literature reports, it can be concluded that there is a lack of studies obtaining information from local spectrum parameters. Most quantitative measurements of SRI values use the envelope parameter of the cladding modes [
8]. The cladding mode envelope was also used to determine the cross-correlation function and calculate its statistical parameters [
9]. One of the recently proposed methods is to determine the most sensitive mode and then use it to determine the SRI value [
10]; another method is to calculate the length of the optical spectrum [
11]. To avoid selecting the single most sensitive resonance, a method of tracking 27 cladding mode resonances to distinguish two slightly different SRI values was proposed [
12]. Differences in the shift of four resonances allowed distinguishing the simultaneous influence of temperature, stress and SRI on the TFBG spectrum [
13].
The structure of the cladding mode comb of the optical spectrum of the TFBG depends on the tilt angle. For larger angles, the cladding mode comb shifts towards shorter wavelengths [
14]. The most common approach to determining SRI from TFBG spectra is to look for changes related to the disappearance of cladding modes. Therefore, gratings with a tilt angle of 6–8 are typically used. Gratings with smaller angles have not been presented in the literature for SRI measurements so far. The method of analysing optical spectra proposed in this article uses a TGBG with a smaller tilt angle than those commonly used for measurement. The developed algorithm allows the use of a specific spectrum range containing a group of cladding modes. The proposed idea is relatively simple and involves determining the shift of the group of cladding modes in the wavelength domain.
2. Cross-correlation, Phase Correlation and Their Modifications
The cross-correlation method has many applications for signals analysed in the time domain. It is useful in cases where the measurement resolution is high and when the determined shift is much larger than the length of the analysed signal shape. Detecting the maximum of such a correlation function is possible, in principle, with accurate resolution of the signal measurement. Some increase in accuracy can be achieved by interpolating the correlation function at additional points. In the case of the analysis of optical spectra, the limitation is the spectral resolution of the optical measurement. If
S1(
λ) is the spectrum measured in reference conditions, then in the event of the influence of a specific physical quantity, the spectrum will be shifted by the value Δ
λ:
The single measured spectrum S1(λ) is a vector of length N, the individual values corresponding to the appropriate wavelengths λn where n varies from 0 to N − 1. The spectral resolution of the measurement is the difference between subsequent values δλ = λn−λn−1.
The cross-correlation of the reference spectrum and the shifted spectrum can be written as follows:
The maximum of the cross-correlation function occurs for the sought shift . However, we can only know its value with an accuracy up to the measured spectral resolution . High accuracy of the method can only be achieved when . Accuracy can be improved by approximating the cross-correlation function with a polynomial or by calculating its maximum using the centroid method.
The correlation operation can also be performed in the Fourier transform domain. The optical spectrum can be represented as the amplitude and phase of the Fourier spectrum:
where
k are the frequency indices in the Fourier domain. The values of individual frequencies are as follows:
From the properties of the Fourier transform, it is known that the correlation and convolution of two sequences can be replaced by their multiplication in the Fourier domain:
The product of the Fourier transform:
being the Fourier transform of the cross-correlation function is referred to as cross-power spectral density.
The phase correlation method uses the phase of the Fourier transform to determine the shape shift in both one-dimensional and two-dimensional images. The method is known primarily for its ability to determine the shift with an accuracy better than the distance between pixels. The algorithm also deals with the intensity difference between the two compared images. It is also immune to noise in the data. Phase correlation exploits the fact that the shift in the fundamental domain (usually time or space) is represented in the phase of the individual components of the Fourier transform of a given signal. Phase correlation uses the Fourier domain shift calculated for the normalised cross-power spectrum, which can be determined by the following formula:
Correlation methods for images use two ways to improve the accuracy of shift estimation [
15]. The first is a better interpolation of the cross-correlation function in the fundamental domain [
16]. The second is the processing of the cross-power spectrum itself. It is also possible to pre-amplify specific signal features through bandpass filtering. Various weighting functions are also used for selected signal types. Such an algorithm can be written mathematically as [
17]:
where in the simplest formula (normalized cross-power spectrum), the weight function will take the form:
The weight function is intended to sharpen the peak generated in the fundamental correlation domain as well as reduce the influence of noise. The algorithm using weight functions is called generalised cross-correlation [
18]. For shift estimation in the field of images, computationally fast methods are also sought.
The correlation computed in the Fourier domain using the fast Fourier transform is a computationally efficient algorithm. Analysis of the result in the fundamental domain gives good results in the case of large shifts in the signal shape. For shifts comparable to the measurement resolution and smaller, more accurate information will be obtained based on the Fourier transform phase if we write the Fourier transforms of both spectra as
Multiplication in the Fourier domain means the product of the transform modules and the product of the exponents related to the phase. Therefore, if both modules are identical:
There is only a phase difference between both signal spectra:
The phase difference can be calculated for each frequency with index
k:
For each frequency with index
k, the shift associated with the phase change is
This principle is used by the fast-phase correlation method [
19]. Because the measurement data contain noise and the signal shape itself may be slightly distorted, the shifts calculated for each frequency will differ. Therefore, to determine the correct shift value, the median of several M initial frequencies is used [
19]:
In all methods using the Fourier transform phase, the problem is the uniqueness of the determined phase. The phase value can range from −π to +π. A method to reduce ambiguity is to rotate the measured signal so that the difference in shifts is less than one sample in the wavelength domain. The total shift is, therefore, equal to the integer and fractional parts of
δλ [
20]. A similar method called shifted phase correlation has also been recently proposed for shape from focus measurements [
21].
After calculating the cross-correlation function, an important element is to precisely determine its maximum. These methods can be called post-processing. The main lobe of cross-correlation (peak) can be determined similarly to peaks determined for other types of signals as a centroid:
In the case of an asymmetric shape, the resonance peak does not have to coincide with the place of the lowest transmission value. Modifications of the basic centroid method have been proposed for spectroscopic measurements of surface plasmons [
22,
23].
The cross-correlation function can be further processed by the Hilbert transform. It has the additional property of reducing noise in the case of a slowly changing signal [
24]. The Hilbert transform of the signal
x(
t) can be written as follows:
which corresponds to the convolution of the input signal with the formula 1/(
π·
t):
The peaks of the x(t) signal correspond to the zeros of the Hilbert transform.
3. Analysis of Measurement Data
The spectra of TFBG gratings are measured in the transmission system because cladding modes are not visible in the reflection spectrum. The modes propagating in the cladding decay quickly due to the high value of cladding attenuation. The cladding modes are transferred from the core to the cladding due to the tilt of the changes in the refractive index in the core. For cladding modes, the propagation takes place in the cladding and at the boundary of the cladding and its surroundings in the direction opposite to the propagation of light in the fibre core. For these modes, total internal reflection occurs at the boundary of the cladding and the surroundings. The effective refractive index of individual cladding modes depends on the refractive index of the surroundings. For gratings with a medium tilt angle of the refractive index, increasing the SRI value causes the cladding modes to switch from total internal reflection to leakage. Subsequent modes at shorter wavelengths decrease in amplitude and are broadened. A mode that becomes leaky decreases in amplitude and stops shifting. Measurements were made using a grating with a tilt angle of 4 degrees. The cladding modes of such a grating are not subject to full leakage. In the range above 1520 nm, a shift of individual modes can be observed (
Figure 1).
Before exceeding the leakage limit, individual modes only shift towards longer wavelengths under the influence of the increased SRI value. The mode presented in
Figure 2 (1520.6 nm) for the 1.3994 refractive index value decreases its intensity compared to lower SRI values. This means that it is nearing the leakage limit. This is, therefore, the wavelength range with the greatest sensitivity to mode shift as a function of SRI.
The spectra of TFBGs can only be measured in transmission mode. FBGs are measured mainly in the reflection mode. If the local shifts of individual modes or groups of modes need to be analysed, it is better to transform the spectrum in such a way that it corresponds to the reflection spectrum. Such a simple transformation highlights the characteristic features of the TFBG spectrum much better. This intensity transformation can be written as follows:
In a sense, the absorption spectrum is calculated in a similar way to the analysis of spectra in spectroscopy. The A(λ) spectrum allows for better use of further signal transformations. It is also possible to calculate the shift of individual cladding modes using methods used in the analysis of the shift of FBG spectra.
Figure 3 shows the autocorrelation function of a part of the spectrum A(
λ) in the 1510–1524 nm range. This part of the optical spectrum has 4000 points. The spectrum can be moved relative to itself by this number of points, which creates the shape shown in
Figure 3. As can be seen, the correlation has the highest value with a zero shift, and its envelope decreases with increasing shifts. The individual cladding modes create an almost periodic signal, which is reflected in the shape of the autocorrelation function. Autocorrelation has repeating lobes (peaks), which are the result of the repeatability of the shapes of cladding modes. The decrease in the amplitude of subsequent autocorrelation side lobes (peaks) results from the decrease in the common area of the product of both functions when calculating it for larger shifts
δλ.
If instead of autocorrelation, we calculate the cross-correlation of the spectrum for SRI = 1.334, with the spectra for subsequent SRI values, we will obtain the functions shown in
Figure 4. What is characteristic here is the shifting of the main and other lobes.
Various methods can be used to determine the position of the main lobe of individual cross-correlation functions. The simplest method is to determine the wavelength for maximum intensity. However, this is a low-resolution method limited by the spectral resolution of the measurement. To improve this resolution, the centroid method can be used to determine the maximum. The shift of the main lobe of the cross-correlation function calculated in this way depending on the SRI value is presented in
Figure 5.
More points of the cross-correlation function can be used by computing the Hilbert transformation of the function. It is presented in
Figure 6.
The following
Figure 7 and
Figure 8 present fragments of the Hilbert transformation of the cross-correlation function for shifts between the correlated functions from −4 to 1 nm, respectively.
The part of the Hilbert transform with the highest slope can be approximated using a linear function (
Figure 9). The zero of such an approximation is a parameter indicating the location of the main lobe peak of the cross-correlation function. The dependence of the Hilbert transform shift on SRI is presented in
Figure 10.
Determination of the cladding mode group shift using the Fourier transform phase is characterised by good metrological properties. Direct determination of the cross-correlation function phase will not bring good results due to the pseudo-periodicity of the optical spectrum. The solution to this problem may be to calculate the correlation function over a limited range of shifts. Because the cross-correlation function shapes repeat and overlap, an additional anodization function was used to reduce the intensity of the optical spectrum at its ends (
Figure 11).
For the processed part of the cross-correlation function, the mode group shifts were determined using fast phase correlation (
Figure 11). The shift was determined as the median of the phase shifts of the first few dozen frequencies of the Fourier transform of the cross-correlation function presented in
Figure 12.
The previously presented methods are modifications of determining the shift of the main lobe peak of the cross-correlation function. They amount to a precise analysis of the main lobe peak, for which methods known from FBG analysis can be used. Phase correlation can also be used in a slightly different way. The considered part of the optical spectrum (
Figure 13a) has a Fourier spectrum, shown in
Figure 13b. The optical signal consists of a constant component and several main harmonic components: first, second, third, fourth and fifth harmonic components related to the regularity of the cladding modes. The bandwidth of individual harmonics in the frequency spectrum indicates that the distance between modes is not constant. The distance between modes successively located towards longer wavelengths decreases slightly. The phase of the frequency from the first harmonic group corresponding to the fundamental distance between modes can be used to determine the shift of the cladding mode group.
Figure 13b shows the main harmonic (1.0625 1/nm) related to the occurrence of cladding modes. In the range from 1517 to 1526 nm (
Figure 13a), the maxima of the sinusoid coincide with the resonances of the cladding mode comb. The shift determined on the basis of the first harmonic frequency phase is shown in
Figure 14a.
The local cladding mode shift calculation methods are sensitive to TFBG temperature. The measured spectrum may also be subject to slow wavelength fluctuations associated with the spectrum analyser. Unfavourable shifts can be eliminated by using the second part of the spectrum; cladding modes in the 1535–1550 nm range experience much smaller shifts under the influence of SRI than modes in the 1515–1530 nm range (
Figure 14b). They can, therefore, be used to correct the fundamental shift of the considered wavelength range. Analysing the same number of points allows the use of the same frequency in the Fourier transform domain.
Figure 14a, in addition to the TFBG spectrum, shows the component associated with the same frequency for which the shift was determined for the 1511–1527 nm range. Since the modes in this range are closer to each other, this component has a smaller amplitude.
The cross-correlation of the part of the spectrum used to correct the shift of the basic spectrum part is shown in
Figure 15. The shift of this part of the spectrum is much smaller than the shift of the basic fragment. The difference in both shifts will eliminate the shift component of the entire TFBG spectrum related, for example, to the influence of temperature. Like any differential method, this will improve the parameters for determining the value of the measured quantity.
To compare the presented methods, the resolution of SRI determination was determined as the standard deviation of SRI determination for 15 of its measured values. The resolution determination results for each of the four methods are presented in
Table 1 and in
Figure 16.
All presented algorithms are characterised by a similar resolution value calculated on the basis of repeated measurements. For all four algorithms, resolution improvement occurs with offset shift correction from another optical spectrum part. This is consistent with the general property of differential methods. For direct methods without correction, the method of calculating the phase change for the selected Fourier frequency has a slightly lower standard deviation value. At the same time, it is a computationally efficient method. After selecting the appropriate frequency, the direct phase method only requires calculating the Fourier transform value for one frequency. This reduces the number of calculations to two scalar products of the optical spectrum and basis functions. These are the sine and cosine functions, respectively, for the previously selected frequency. Based on these functions, the phase of the signal can be determined. This method is, therefore, the simplest computationally. Similar resolution values for all methods result from the fact that they determine the same parameter of shifting part of the spectrum.