# Application of a Multiple Regression Model for the Simultaneous Measurement of Refractive Index and Temperature Based on an Interferometric Optical System

Authors: Ana Dinora Guzman-Chavez; Everardo Vargas-Rodriguez
Journal: Journal of Sensors
 (2023)

---

## Abstract

Interferometric optical systems have been proposed for implementing dual-parameter optical sensors. For this type of sensors, the sensitivity matrix equation is generally used to determine the parameters to be measured based on the sensitivity of each parameter to one particular feature of the output reflective spectrum of the interferometric system. One of the disadvantages of this method is that the measurement ranges will be very short if the sensitivities are not linear or if these present cross-sensitivity. In this work, a multiple regression model for the simultaneous detection of refractive index and temperature based on an interferometric optical sensor is proposed. Here, the mathematical model is a weighted sum of features used to estimate the values of two response variables. These features are functions of an initial set of 27 explanatory variables whose values were extracted of the output reflective spectrum of the interferometric system. Besides, in order to sustenance the model application, the sensor was modeled and experimentally carried out. Three cases were studied: the estimation of temperature at different refractive indices, the estimation of temperature when refractive index is equal to one, and the estimation of refractive index at different temperatures. For each one of these cases, an optimal basis of functions was founded with the algorithm proposed and used to estimate the values of the response variables. Besides, a technique to reduce the initial set of variables was implemented. Finally, for the experimental data, For each one of these cases, an optimal basis of functions was founded with the algorithm 1 proposed and used to estimate the values of the response variables.


---

## Body

## 1. Introduction

Optical sensors have attracted a lot of attention among researches due to their considerable applications and advantages over other types of sensors. These advantages relate to small size, immunity to electromagnetic interference, high sensitivities, high measurement ranges, and low cost. Specifically, interferometric optical sensors have been used to measure different parameters, as for example, temperature, refractive index, curvature, and strain [1–3]. Many of these sensing structures have been proposed as two-parameter optical sensors, for which one of the parameters is temperature; this is because the main fiber optic material, silica, has thermal properties. For example, Zhao et al. [4] reported a Michelson interferometer based on a waist-enlarged fiber bitaper for measuring temperature and refractive index in the measurement ranges between 11–98°C and 1.351–1.402 RIU, respectively. In that work, the changes of both parameters were reflected in variations in wavelength and reflected intensity of one interference peak. Moreover, the linear sensitivities were estimated and used to calculate the sensor’s parameters values. Another example is the temperature and salinity water in seawater sensor based on a tapered fiber Mach-Zehnder interferometer reported by Liu et al. [5]. These authors reported the temperature and refractive index sensitivities for the two variables, which were obtained from the spectral shifting of two peaks of the fringe pattern of the interferometer. For that sensor, the measurement ranges were 18.9–39.6°C and 0–49%. Due to that the thermooptic and thermal-expansion coefficients of silica are small, this type of sensors presents very low temperature sensitivities. Besides, in this type of sensors, the sensitivity matrix equation can be used to determine the values of the two variables since it can help to minimize errors in the calculation of the values of the measured parameters but requires that the sensitivities must be linear in the measurement ranges with a quasinegligible cross-sensitivity. Additionally, dual-parameter interferometric optical sensors based on materials with considerable thermal properties have been reported [6–8]. For example, Tan et al. [7] reported a UV-curable polymer microhemisphere-based fiber-optic Fabry-Perot interferometer for simultaneous measurement of refractive index and temperature in the measurement which ranges from 1.38 to 1.42 RIU and from 25 to 65°C, respectively. Here, the thermal properties of the polymer were considerably higher than those of silica. The authors reported that the fringe contrast was mainly sensible to refractive index changes, and wavelength shifting was sensible to temperature changes. For this optical sensor, the refractive index sensitivity is not linear, and authors mentioned that due to the cross-sensitivity of the sensor to temperature and refractive index, a measurement error of refractive index is induced.On the other hand, in many optical sensors based on interferometric systems, the shift of the peak of one of the interference fringes is tracked. Here, the maximum measurement range is limited by the free spectral range (FSR) of the interference spectrum of the sensor due to the 2π ambiguity. In this sense, in order to expand the measurement range or to counteract the cross-sensitivity, other techniques different to the sensitive matrix equation have been reported. For example, the empirical mode decomposition algorithm [8], the method of intensity-modulated [9], and the use of neural network algorithms [10, 11] have been reported. In these last works, the mathematical models are based on different features of the output signal of the optical sensor utilized to predict the correct value of the measured parameter. Besides, it is important to highlight that nowadays, the application of different mathematical models that relate one independent variable with several explanatory variables is being proposed in different areas [12–15]. As an example in the medical area, Rajput et al. [13] applied different machine learning models as logistic regression and support vector machine, among others to develop a reference model in assisting rural people suffering from diabetes. These models were used to list the risks factors and correlation that exist among these. Another interesting example, in the communications networks area, Lakshmanna et al. [12] designed a model to achieve maximum energy utilization and lifetime in a wireless sensor network. This model was based on the teaching-learning-based optimization algorithm-based multihop routing technique which was applied to optimize the selection of routes of destinations.In this work, a multiple regression model was applied to simultaneously measure temperature and refractive index (RI) over wide measurement ranges with a dual-parameter sensor based on an interferometric system. Here, the values of the model variables depend on the wavelength and the amplitude of fringes of the interference pattern of the optical sensor. Besides, these values were transformed by using a basis of functions. With experimental and theoretical data obtained using a sensor model based on three layers, three case studies based on an initial set of variables were analyzed. In addition, these cases were analyzed with a reduced set of variables selected by means a variable reduction technique. Finally, the efficiency of the regression equation obtained by applying the proposed model was evaluated with the root mean square error and the multiple determination coefficient.


## 2. Experimental Setup and Interferometric Sensor Model

In Figure1(a), it showed the dual-parameter optical sensor model utilized to measure simultaneously refractive index and temperature. This sensor is based on an interferometric arrangement of three layers (L1, L2, and L3) deposited at the tip of an optical fiber. The details of the sensor head element fabrication are explained in [16]. The measured reflected spectra were obtained with the experimental setup shown in Figure 1(b). Here, the circulator was used to guide the light of a broadband source through its ports. The fiber-coupled interferometric arrangement was spliced to the port 2, and its reflected signal is monitored by an optical spectrum analyzer (OSA) at the port 3. Finally, a digital hot plate was used to control the temperature, and a digital refractometer and a calibrated sensor were used to corroborate the values of refractive index and temperature.Figure 1
(a) Model of the multilayer optical sensor and (b) experimental setup of the interferometric sensor.
(a)(b)Regarding the theoretical results, the relative reflected intensity spectra were simulated by using a mathematical model that takes into account the main rays reflected between layers [16]. In this model, the refractive index (n), the thickness (d), the thermoexpansion coefficient (γ), and the thermooptic coefficient (ρ) are considered. The characteristics of the layers of our interferometer are as follows: for L1, n1=1.42,d1=322.900μm, γ1=0, and ρ1=0 K-1; for L2, n2=1.45,d2=36.466μm, γ2=198 μm/mK, and ρ2=−0.4×10−4 K-1; and for L3, n3=3.41696+0.138497/λ+0.013924/λ2−2.09×10−5λ2+1.48×10−7λ4+1.5×10−4T−300, where λ is the wavelength, T is the temperature, d3=84.943μm, γ3=2.6μm/mK, and ρ3=1.88×10−4K−1.The reflection spectrum caused by one layer is a pattern of periodic fringes with anFSR (separation between fringes) that depends on the refractive index and the thickness of the layer. Here, as the filter is formed by a set of layers, the resulting reflected intensity spectrum is a fringe pattern formed by the superposition of the different generated spectra. In this way, due to the different FSRs of each superimposed spectra, the overall spectrum will present a modulated periodic fringe pattern, showing a variation in amplitudes of the fringes. For instance, the spectrum of the fabricated filter presented two FSRs, one of 3.5 nm and another of 25 nm, which are due to the silicon layer (L2) and the polymer layer (L3), respectively. In Figure 2(a), it can be seen both, the experimental and the simulated, reflected spectra at different external RIs (n4) and at the same temperature. Here, it can be observed that the maximum amplitude of the fringes (A) decreases when the external RI increases while their wavelength positions remains almost constant. Now, the behaviour of the spectrum when the temperature increases and the refractive index is fixed is shown in Figure 2(b). Here, the wavelength is shifted toward the right, and the amplitude is changed. This behaviour was described in detail in [8].Figure 2
Experimental and simulated reflected spectra at different (a) refractive indices and (b) temperatures and (c) peaks, valleys, and spectral ranges used to determine the explanatory variables.The sensitivities that present our interferometric sensor are the refractive index sensitivities to the amplitudesA,n4 and to the wavelength position sλ,n4, the temperature sensitivities to the amplitude sA,T, and the wavelength position sλ,T. Here, if the amplitude and the wavelength position of a fringe peak are used to determine changes in temperature and refractive index, then sλ,n4~0, sA,n4, is linear in the whole measurement range, and sλ,T is quasilinear in the measurement range needed to spectrally shift the fringe peak over 1 FSR =3.5 nm. This range is limited by the 2π ambiguity that the interferometric sensors present. Moreover, sA,T is nonlinear in the measurement range limited by 1 FSR, and there exists linearity only within small measurement ranges. Besides, there exists a strong cross-sensitivity to n4 and T since two of the layers are sensitive to temperature provoking changes in the amplitude of the fringes. This implies that the dual-parameter sensing matrix [4, 5], ∆n4∆T=sA,n4sA,Tsλ,n4sλ,T−1∆A∆λ, cannot be used to determine the values of the parameters without errors for broad measurement ranges. Hence, we implemented a method with which the response variable depends linearly on several features that are explanatory variables transformed with a basis of functions. Here, a set of explanatory variables will be formed with different features of the reflection spectrum taking into account changes in wavelength and amplitude. Finally, n4 and T will be taken as the response variables.


## 3. Implemented Model Theory

The multiple regression expresses a relationship between more than one explanatory variable (X=x1,x2,..,xq) and one response variable (y). Here, when the response data are not well fitted with a conventional linear model [13], these can be modeled by including additional features via a function φ applied to the independent variables, being expressed as the model as follows:
(1)y=bo+b1φx1+b2φx2+..+biφxi,where bii=1,2,..,q is the regression coefficient associated to the i-th explanatory variable, q is the coefficients number, and bo is a constant of regression. As the model is linear with respect to the parameters bi, therefore, the vector Bq+1×1, that contains the values of the regression coefficients, can be found by using a ridge regression with L2 regularization of the weights, which can be expressed by the following equation:
(2)B=X~TX~+μI−1X~TY,where X~N×q+1 is the matrix for which each column has the transformed values of each one of the explanatory variables except for the first column that have ones, YN×1 is a vector that contains the N observed values of the response variable, Iq+1×q+1 is an identity matrix, and μ is a penalty term. Here, it is important to mention that the values of the explanatory variables can be transformed with a function φ formed by a basis of j functions ∅jt. When more than one function is used, the transformed data matrix is expressed as
(3)X~N×j∙q+1=1∅1X∅2X⋯.∅jX⋮⋮⋮1∅1X∅2X⋯∅jX.The basis of functions that were used are∅pt=tm,∅st=sinmt, ∅ct=cosmt, ∅et=expmt, and ∅lt=logemt, where m is a constant and t is a variable. Besides, it can be observed in Eq. (3) that the dimensions of matrix X~ increases when more than one function is used in the data transformation. Here, when j∙q+1>N, it is convenient to use the matrix inversion lemma (Eq. (4)) in order to perform the inverse of Eq. (2) in the smallest space, the dimension of the number of data cases.
(4)X~TX~+μI−1X~T=X~TX~X~T+μI−1.Finally, the regression equation to estimate the values of the response variable,yest, can be expressed as
(5)yest=bo+b1∅1x1+..+bi∅1xi+..+bj−1∙i+1∅jx1+..+bj∙i∅jxi+ε,where ε is the estimation error. In this case, the response variable is a linear weighted sum of functions of each variable to model the outcome.Additionally, thek-fold crossvalidation technique [17] was implemented to find the value of μ that optimizes the regression equation obtained with the proposed model. Here, in general, first, a set of values of μ was proposed, and for each value of μ, kRMSE values were calculated and averaged to obtain a RMSEk value. In this way, the optimal value of μ was the one that generated the smallest RMSEk. Finally, in order to measure how well the proposed model predicts the values of the response variable, we used the coefficient of multiple determination R2=∑m=1ny∧m−y¯2/∑m=1nym−y¯2 and the root mean square error RMSE=∑m=1nym−yest2/n1/2, where yest is the estimated value of the response variable ym and y¯ is the mean of the values of ym.


### 3.1. Selection of the Basis of Functions

The regression equation obtained with the proposed model is based on a basis of five functions that are applied to the set of explanatory variables. These functions are∅pt=tm,∅st=sinmt, ∅ct=cosmt, ∅et=expmt, and ∅lt=logemt. Now, in order to find the functions that make the regression equation efficient, the algorithm 1 was implemented.Algorithm 1
Stage 1: to propose the first functions of the model, a basis of power functions,∅pt, is used. Each time a power function is added, the next steps are carried out:(a) A set of values ofm is proposed(b) For anm value, the data matrix M that contains the explanatory variables values is transformed, by using a power function (tm), into M~.(c) The data matrixM~ is standardized by using M~Nqest=M~Nq−μq/maxM~q, where μq is the mean of the N values of the q-th column. Here, it is important to mention the matrix X~= 1M~Nqest (see Eq. (3))(d) Thek-fold crossvalidation technique is applied in order to find the optimal value of μ that will be used to find the regression coefficients of the equation (Eq. (2)). Afterwards, with the estimated values obtained with the regression equation (Eq. (5)), the RMSE related to the value of m is calculated(e) Steps (b)–(d) are repeated for the entire set of values ofm proposed in the step (a)(f) The exponentm of the power function will be the value of m for which the value of RMSE is the smallest (RMSEr)It is important to note that with respect to step (a), for the first power function, the dimensions of the transformed dataset are unchanged,M~N×q, where N is the data number and q is the variable number. After this first function, features are added to the matrix, so its dimensions increases. Besides, when the matrix is transformed with the next added function, the optimal value of m found for the previous function is fixed, and the steps to find the optimal value of m of the added function are performed. Besides, each time a power function is added to transform the data matrix, a value of RMSEr is calculated. Additionally, the total number of power functions, f, to be used in the model will be chosen taking into account a criterion related to all the RMSEr values. In this stage, the transformed matrix is expressed as M~N×f∙q.Stage 2: It is started with a transformed dataset with a basis off power functions proposed in stage 1. The purpose of this stage is to add features based on a function other than the power function that improves the estimation of the values of the response variable. In this way, each one of the remaining functions (∅ct,∅st,∅et,∅lt) is added separately to the proposed model in order to find the best next function. Here, each time a function is added, the steps (a)–(e) of the stage 1 are implemented. As step (f), the function that is chosen to be added to the model proposed in stage 1 will be the one with the smallest RMSE (RMSEr). Here, the transformed matrix is expressed as M~N×f+1∙q.Stage 3: It is started with a transformed dataset with a basis off+1 functions proposed in stages 1 and 2. The purpose of this stage is to add a function different from the power function and to the one proposed in stage 2 that improves the estimation of the values of the response variable. Here, each one of the remaining 3 functions is added separately to the proposed model in stage 2, and the steps (a)–(e) and step (f) described in stage 2 are again implemented. In this stage, the transformed matrix is expressed as M~N×f+2∙q.Further stages: to add another function, the steps of stage 3 are repeated. The total number of stages that can be carried out is five, and this implies that by using thef power functions of stage 1 and the other four functions (∅ct,∅st,∅et,∅lt), the transformed matrix can be expressed as M~N×f+4∙q. Finally, the number of functions that will be taken into account is determined based on the a criterion of the smallest RMSEr obtained with the added functions in each one of the stages


### 3.2. Selection of the Variables and Reduction of the Size of the Variables Set

As the spectra of the used optical filter are dependent from temperature and refractive index, the explanatory variables were obtained from features affected by these two parameters. Here, valleys (Vi), peaks (Pi), and spectral windows (ERi) (see Figure 2(c)) were considered in order to define the criterions of the proposed explanatory variables (see Table 1).Table 1
Variables and the corresponding used criterions to obtain their values.
VariablesCriterionX1–X4Wavelengths ofP1–P4X5–X6Wavelengths ofV1 and V2X7Wavelength of the fringe with the greatest amplitudeX8Amplitude ofV2X9Amplitude of the fringe with the greatest amplitudeX10Mean amplitude of the spectrum in the region from 1500 to 1595 nmX11–X14Area under the curve within spectral regions ER1, ER2, ER3, and ER4X15Full area of the spectral region between 1500 and 1595 nmX16–X20Amplitude ofP1–P5X21–X25Area of the fringes covering1FSR=3.5nmX26Root mean square value of the spectral region from 1500 to 1595 nmX27Centroid of the spectral region from 1500 to 1595 nmLater, a technique to reduce the number of explanatory variables used in the proposed model was implemented [17]. Briefly, this technique initiates with an equation based on the s functions obtained after applying the algorithm 1 and taking into account all the explanatory variables. The variables were eliminated one by one, and at each time that a variable was removed, the new regression equation was used to calculate the RMSEr value. Here, it is important to mention that the algorithm initiates with a transformed data matrix expressed as M~N×s∙q, and the transformed data matrix of the optimal regression equation is expressed as M~N×s∙q−z, where z is the number of explanatory variables removed.


## 3.1. Selection of the Basis of Functions

The regression equation obtained with the proposed model is based on a basis of five functions that are applied to the set of explanatory variables. These functions are∅pt=tm,∅st=sinmt, ∅ct=cosmt, ∅et=expmt, and ∅lt=logemt. Now, in order to find the functions that make the regression equation efficient, the algorithm 1 was implemented.Algorithm 1
Stage 1: to propose the first functions of the model, a basis of power functions,∅pt, is used. Each time a power function is added, the next steps are carried out:(a) A set of values ofm is proposed(b) For anm value, the data matrix M that contains the explanatory variables values is transformed, by using a power function (tm), into M~.(c) The data matrixM~ is standardized by using M~Nqest=M~Nq−μq/maxM~q, where μq is the mean of the N values of the q-th column. Here, it is important to mention the matrix X~= 1M~Nqest (see Eq. (3))(d) Thek-fold crossvalidation technique is applied in order to find the optimal value of μ that will be used to find the regression coefficients of the equation (Eq. (2)). Afterwards, with the estimated values obtained with the regression equation (Eq. (5)), the RMSE related to the value of m is calculated(e) Steps (b)–(d) are repeated for the entire set of values ofm proposed in the step (a)(f) The exponentm of the power function will be the value of m for which the value of RMSE is the smallest (RMSEr)It is important to note that with respect to step (a), for the first power function, the dimensions of the transformed dataset are unchanged,M~N×q, where N is the data number and q is the variable number. After this first function, features are added to the matrix, so its dimensions increases. Besides, when the matrix is transformed with the next added function, the optimal value of m found for the previous function is fixed, and the steps to find the optimal value of m of the added function are performed. Besides, each time a power function is added to transform the data matrix, a value of RMSEr is calculated. Additionally, the total number of power functions, f, to be used in the model will be chosen taking into account a criterion related to all the RMSEr values. In this stage, the transformed matrix is expressed as M~N×f∙q.Stage 2: It is started with a transformed dataset with a basis off power functions proposed in stage 1. The purpose of this stage is to add features based on a function other than the power function that improves the estimation of the values of the response variable. In this way, each one of the remaining functions (∅ct,∅st,∅et,∅lt) is added separately to the proposed model in order to find the best next function. Here, each time a function is added, the steps (a)–(e) of the stage 1 are implemented. As step (f), the function that is chosen to be added to the model proposed in stage 1 will be the one with the smallest RMSE (RMSEr). Here, the transformed matrix is expressed as M~N×f+1∙q.Stage 3: It is started with a transformed dataset with a basis off+1 functions proposed in stages 1 and 2. The purpose of this stage is to add a function different from the power function and to the one proposed in stage 2 that improves the estimation of the values of the response variable. Here, each one of the remaining 3 functions is added separately to the proposed model in stage 2, and the steps (a)–(e) and step (f) described in stage 2 are again implemented. In this stage, the transformed matrix is expressed as M~N×f+2∙q.Further stages: to add another function, the steps of stage 3 are repeated. The total number of stages that can be carried out is five, and this implies that by using thef power functions of stage 1 and the other four functions (∅ct,∅st,∅et,∅lt), the transformed matrix can be expressed as M~N×f+4∙q. Finally, the number of functions that will be taken into account is determined based on the a criterion of the smallest RMSEr obtained with the added functions in each one of the stages


## 3.2. Selection of the Variables and Reduction of the Size of the Variables Set

As the spectra of the used optical filter are dependent from temperature and refractive index, the explanatory variables were obtained from features affected by these two parameters. Here, valleys (Vi), peaks (Pi), and spectral windows (ERi) (see Figure 2(c)) were considered in order to define the criterions of the proposed explanatory variables (see Table 1).Table 1
Variables and the corresponding used criterions to obtain their values.
VariablesCriterionX1–X4Wavelengths ofP1–P4X5–X6Wavelengths ofV1 and V2X7Wavelength of the fringe with the greatest amplitudeX8Amplitude ofV2X9Amplitude of the fringe with the greatest amplitudeX10Mean amplitude of the spectrum in the region from 1500 to 1595 nmX11–X14Area under the curve within spectral regions ER1, ER2, ER3, and ER4X15Full area of the spectral region between 1500 and 1595 nmX16–X20Amplitude ofP1–P5X21–X25Area of the fringes covering1FSR=3.5nmX26Root mean square value of the spectral region from 1500 to 1595 nmX27Centroid of the spectral region from 1500 to 1595 nmLater, a technique to reduce the number of explanatory variables used in the proposed model was implemented [17]. Briefly, this technique initiates with an equation based on the s functions obtained after applying the algorithm 1 and taking into account all the explanatory variables. The variables were eliminated one by one, and at each time that a variable was removed, the new regression equation was used to calculate the RMSEr value. Here, it is important to mention that the algorithm initiates with a transformed data matrix expressed as M~N×s∙q, and the transformed data matrix of the optimal regression equation is expressed as M~N×s∙q−z, where z is the number of explanatory variables removed.


## 4. Results

A model of an interferometric optical sensor based on thermal sensitive layers was used to obtain simulated data. These data were obtained by simulating changes in the temperature and in the external refractive index. Besides, these data were used to apply the proposed mathematical model. Reflected spectra at different external refractive indices and temperatures were simulated. Here, the temperature range was from 0 to 100°C, and the refractive index range was from 1.0 to 2.0 RIU with steps of 1°C and 0.02 RIU, respectively. All the variables (X1–X27) listed in Table 1 were obtained for each simulated spectrum. Here, it is important to mention that the temperature sensor and the external refractive index were the response variables. The mathematical model was implemented taken into account three sensing cases. For the first and second cases, the estimation of temperature at different refractive indices and when the refractive index was equal to one were considered as different cases. The third case was the estimation of refractive index at different temperatures.


### 4.1. Estimation of Temperature at Different External Refractive Indexes

The mathematical model was applied to a synthetic dataset (SNC) that was formed with features of 5151 simulated spectra. In this way, the dataset SNC is a matrix with N=5151 rows (observations) and C=27 columns (variables) that contains the values of the explanatory variables. This dataset was transformed with a basis of functions in order to find an optimal regression equation (Eq. (5)). In this way, the stages of the algorithm 1 were implemented (see Figure 3).Figure 3
Evolution of theRMSE as a function of m for the different functions. Results of the stages (a) 1, (b) 2, (c) 3, and (d) 4. The solid circles indicates the RMSEr value.
(a)(b)(c)(d)The results of the stage 1 are shown in Figure3(a). Here, the RMSE values, as a function of m obtained at each time that a power function was added, can be seen. The set of values of m were from 1 to 100 with steps of 1 for all the functions of this stage. The solid circle indicates the RMSEr value. Moreover, in this stage, the matrix was transformed four times, and the optimal values of m of the power functions were 1, 3, 6, and 10. Furthermore, as can be observed, the RMSEr values decrease each time that a power function is added. Here, the RMSEr values were 7.650°C, 3.225°C, 2.488°C, and 1.956°C which correspond to the power functions F1=t1, F2=F1+t3, F3=F2+t6, and F4=F3+t10, respectively. This means that for the first power function, tm, the smallest RMSE value (RMSEr=7.650°C) was for m=1; for the second added function, t1+tm, the RMSEr was 3.225°C for m=3, and so on for the next two added functions. Here, it is important to mention that all the functions are potential as was mentioned in the algorithm, and no more of four functions were added because there was no significant decrement in the RMSEr value. For this stage, they selected the first three functions (F3=t1+t3+t6) because of the change in RMSEr (0.5325°C) which is small when the fourth function is added. Finally, the transformed matrix in this stage was S~5151×3∙27.Regarding step (d) of the stage 1 of the algorithm1, the k-fold crossvalidation technique was implemented to find the optimal value of μ used to find the regression coefficients of the regression equations. Here, each time the matrix was transformed with an additional function and standardized, it was divided in 5 groups; thus, each training and test group had 80% and 20% of data. Here, it is important to mention that for the added function, each time a value of m was used, the matrix was divided. The set of values of μ were 0≤μ≤2×10−5 with steps of 2×10−6. The optimal values of μ were 0, 2×10−6, and 1×10−5, which correspond to the functions F1, F2, and F3, respectively.In Figure3(b), it showed the results obtained with the stage 2 of the algorithm 1. Here, m was set as 1≤m≤5, with steps of 0.1, for the sine, the cosine, and the logarithm functions. Additionally, it was set −0.5≤m≤0.5 with steps of 0.01 for the exponential function. At this stage, the RMSEr values were 1.2452°C, 1.0053°C, 1.6684°C, and 1.6558°C for the functions F5=F3+sin2t, F6=F3+cos5t, F7=F3+loge−0.42t, and F8=F3+exp1.1t, respectively. Here, the cosine was selected as the added function, since the regression equation based on F6=t1+t3+t6+cos5t presented the lowest RMSEr value. Afterwards, for the stage 3 for which the results are shown in Figure 3(c), the power and cosine functions were not considered because these functions were selected in the previous stages. Besides, for the stage 3, the set of values of m were defined within 1≤m≤100 for the sine and the logarithm functions; moreover, it was set as −0.5≤m≤0.5 for the exponential function. In this way, the obtained RMSEr values were 0.8626°C, 0.9623°C, and 1.0093°C for the functions F9=F6+sin14t, F10=F6+exp−0.30t, and F11=F6+loge91t, respectively. Based on these results, the proposed function at this stage was F9=t1+t3+t6+cos5t+sin14t. Finally, the results of stage 4 are shown in Figure 3(d). In this stage, the set of values of m were the same that were used in stage 3. Here, the RMSEr values were 0.9135°C for F12=F9+exp−0.29t and 1.3584°C for F13=F9+loge23.5t. Here, as the change in RMSEr(0.0509°C) was not significant with respect to that obtained in the previous stage (0.8626°C), no function of this stage was added. In this way, the final basis of functions to estimate temperature was F9, and the transformed matrix was S~5151×5∙27. A summary of the optimal values of m and RMSEr of the mentioned stages are listed in Table 2.Table 2
RMSEr and m values obtained by implementing the algorithm 1.
FunctionStage 1m;RMSErStage 2m;RMSErStage 3m;RMSErStage 4m;RMSErtm1; 7.6503———t1+tm3; 3.2258———t1+t3+tm6; 2.4886———t1+t3+t6+tm10; 1.9561———sinmt—5; 1.245214; 0.8626—cosmt—2; 1.0053——expmt—-0.42; 1.6558-0.30; 0.9623-0.29; 0.9135logemt—1.1; 1.668491; 1.009323.5; 1.3584Regarding step (d) of the stages 2–4 of the algorithm1, the set of values of μ were also 0≤μ≤2×10−5 with steps of 2×10−6. The optimal values of μ were 8×10−6, 1×10−5, and 1×10−5 which correspond to the functions F4,F6, and F9, respectively. Finally, the regression equation based on F9 was used to calculate the estimated temperature values. These were compared with the real temperature values, as shown in Figure 4(a). Here, the values of each diagonal correspond to a refractive index value between 1.00 and 2.00 RIU. It is observed that the estimated values presents a high fit to the real values. Based on these results, the values of RMSEr and R2 achieved were 0.8626°C and 0.9991, respectively.Figure 4
(a) Comparison between simulated (real) and predicted temperature values obtained by using all the variables set. (b) Evolution of theRMSE in the process of reducing variables number. (c) Comparison between simulated (real) and predicted temperature values obtained by using the reduced set of variables. (d) Comparison between experimental and predicted temperature values obtained by using the reduced set of variables at different external refractive indices.
(a)(b)(c)(d)After finding the functions with their coefficientsm with which the best estimates were obtained, the technique to reduce the size of the explanatory variables set was implemented. In Figure 4(b), the evolution of RMSEr as a function of the number of eliminated variables is presented. The numbers listed in the figure show the number and order in which each one of the variables was eliminated. Here, the dash means that the first RMSEr is calculated by using all the explanatory variables. Later, it showed the RMSEr obtained when the first variable (X23) was removed. In this way, the RMSEr is evolving as another variable is removed until these are finished; in our case, the last removed variable was X10. Here, it can be observed that the RMSEr increases as more explanatory variables are removed. The criterion to choose which variables to eliminate was that the RMSEr value obtained with the reduced variables subset was ≤0.15 with respect to the value obtained with all the variables set. In this way, we removed the first 7 variables listed in Figure 4(b), and the size of the new subset of explanatory variables was 20. With this variables subset the resulting transformed matrix was S~5151×5∙20. The real temperature values and estimated temperature values with the regression equation, based on 20 variables and the functions F9, are shown in Figure 4(c). It is observed that the fit is practically the same as that observed in Figure 4(a) that was obtained considering 27 variables. Moreover, for this later case in which a reduced number of variables was used, the reached RMSErand R2 were 0.9868°C and 0.9989, respectively.The proposed mathematical model was also evaluated using experimental data. Here, the reduced subset of variables and the functionF9 were used, and the optimal value of μ was 1×10−5. The experimental data were obtained from 96 reflected spectra, which were recorded with the OSA when the interferometric sensor was submerged in liquids at different temperatures and refractive indices. In our experiments, temperature was varied between 22°C and 26°C, and liquids with refractive indices between 1.000 RIU and 1.497 RIU were used. The comparison between measured and estimated temperature values is shown in Figure 4(d). The RMSEr and R2 values were 0.0887°C and 0.9958, respectively.


#### 4.1.1. Estimation of Temperature when External Refractive Index Is Equal to One

Many optical temperature sensors are used to detect temperature when these are not submerged in liquids; for this reason, we decided to simulate and characterize our proposed interferometric system for the case when onlyn4=1. The mathematical model is applied using a synthetic dataset SNC that is formed with features of 101 simulated spectra for which the external refractive index is equal to one. In this way, the dataset SNC is a matrix with N=101 rows (observations) and C=27 columns (variables) that contains the values of the explanatory variables. This dataset was also transformed with a basis of functions in order to find an optimal regression equation (Eq. (5)). In this way, the stages of the algorithm 1 were also implemented.The results of all the stages are presented in Figure5 and summarized in Table 3. In the stage 1 (Figure 5(a)), the set of values of m were from 1 to 100 with steps of 1 for all the functions. In this stage, the matrix was transformed five times, and the optimal values of m of the power functions were 15, 29, 93, 73, and 3, resulting in the following functions F1=t15, F2=F1+t29, F3=F2+t93, F4=F3+t73, and F5=F4+t3. The RMSEr values obtained by using F1, F2, F3, F4, and F5 were 1.5704°C, 0.3318°C, 0.1553°C, 0.0870°C, and 0.0644°C, respectively. For this stage, we decided the first four power functions (F4=t15+t29+t93+t73), because the variation in RMSEr was also small (0.0226). Finally, for this stage, the transformed matrix is expressed as S~101×4∙27.Figure 5
Evolution of theRMSE as a function of m for different functions. Results of the stages (a) 1, (b, c) 2, (d, e) 3, and (f) 4. The solid circles indicates the RMSEr value.
(a)(b)(c)(d)(e)(f)Table 3
RMSEr and m values obtained by implementing the algorithm 1.
FunctionStage 1m;RMSErStage 2m;RMSErStage 3m;RMSErStage 4m;RMSErtm15; 1.5704———t15+tm29; 0.3318———t15+t29+tm93; 0.1553———t15+t29+t93+tm73; 0.0870———t15+t29+t93+t73+tm3; 0.0644———sinmt—61; 0.0370——cosmt—76; 0.038953; 0.0154—expmt—-0.34; 0.06730.08; 0.03120.29; 0.0081logemt—0.36; 0.05590.79; 0.03110.74; 0.0079The results obtained in the other stages are shown in Figures5(b)–5(e). Here, the set of values of m were 1≤m≤100 with steps of 1 for the sine and cosine functions, −0.5≤m≤0.5 with steps of 0.01 for the logarithm function, and 0≤m≤1 with steps of 0.01 for the exponential function. In the stage 2 (Figures 5(b) and 5(c)), the optimal values of mwere 61, 76, -0.34, and 0.36 for the functions F6=F4+sinmt, F7=F4+cosmt, F8=F4+expmt, and F9=F4+logemt, respectively. The RMSEr values obtained with these functions were 0.0370°C, 0.0389°C, 0.0673°C, and 0.0559°C, respectively. Based on these results, the chosen function was F6=t15+t29+t93+t73+sin61t. Now, for the stage 3 (Figures 5(d) and 5(e)), the implemented functions and the RMSEr values were F10=F6+cos53t, F11=F6+exp0.08t, and F12=F6+loge0.79t and 0.0154°C, 0.0312°C, and 0.0311°C, respectively. In this stage, the chosen function was F10=t15+t29+t93+t73+sin61t+cos53t. And for the last stage (Figure 5(f)), the tested functions were F13=F10+exp0.29t and F14=F10+loge0.74t, and the resulting RMSEr values were 0.0081°C and 0.0079°C, respectively. Finally, the functions proposed to estimate temperature were F14=t15+t29+t93+t73+sin61t+cos53t+loge0.74t with which the transformed matrix was expressed as S~101×7∙27.The process to obtain the optimal values ofμ was the same. In this way, using the functions F1, F2, F3, F4, F6, F10, and F14, the optimal values of μ were 2×10−6, 2×10−6, 1×10−5, 4×10−6, 6×10−6, 4×10−6, and 2×10−6, respectively. The regression equation based on F14 was used to calculate the estimated temperature values. The comparison between real and estimated temperature values is shown in Figure 6(a). It is observed that the estimated values present a high fit to the real values. Based on these data, the reached values of RMSEr and R2 were 0.0079°C and 0.9999, respectively. The algorithm to reduce the size of the set of explanatory variables was also implemented. The evolution of the RMSE as a function of the number of eliminated variables is shown in Figure 6(b). It is observed in the list that the first and last variables removed were X3 and X12, respectively. The criterion to choose the variables was that the variation in RMSEr was ≤0.005. In such manner, the first 12 variables listed were removed, leaving a subset of 15 explanatory variables. Here, the resulting transformed matrix was S~101×7∙12. The comparison between real and estimated temperature values, calculated with the regression equation based on the 15 chosen variables and F14, is shown in Figure 6(c). It is observed that the fit is practically the same as that observed in Figure 6(a). The RMSEr and R2 values were 0.0498°C and 0.9999, respectively.Figure 6
(a) Comparison between simulated (real) and predicted temperature values obtained by using all the variables set. (b) Evolution of theRMSE in the process of reducing variables number. (c) Comparison between simulated (real) and predicted temperature values obtained by using the reduced set of variables. (d) Comparison between experimental and predicted temperatures values obtained by using the reduced set of variables.
(a)(b)(c)(d)The proposed mathematical model was also evaluated using experimental data. Here, the reduced subset of variables andF10 was used; the optimal value of μ was 1×10−5. The experimental reflected spectra were obtained when the interferometric sensor was no submerged in a liquid. Then, from the 96 experimental reflected spectra, there were considered only the corresponding to an external refractive index equal to one. Here, the temperature of the interferometric sensor was varied from 22°C to 26°C. The comparison between measured and estimated temperature values is shown in Figure 6(d). The RMSEr and R2 values were 0.0138°C and 0.9999, respectively.


### 4.2. Estimation of Refractive Index at Different Temperatures

The mathematical model was applied with the same synthetic dataset used to estimate refractive index at different temperatures (SNC). The values of refractive index (n4) were taken as values of the response variable. The dataset was also transformed with a basis of functions in order to find an optimal regression equation to estimate external refractive index without taking temperature into account. In this way, the stages of the algorithm 1 was implemented.The results obtained in each one of the stages can be seen in Figure7. For the stage 1, the set of values of m was from 1 to 100 with steps of 1 for all the power functions. The matrix was transformed four times, and the optimal values of m of each one of the added functions were 1, 3, 9, 13, and 87. In this way, the tested functions were F1=t1, F2=F1+t2, F3=F2+t9, F4=F3+t13, and F5=F4+t87. In Figure 7(a), it showed the evolution of the RMSEr as a function of m for these four functions. The RMSEr values obtained using F1, F2, F3, F4, and F5 were 0.0063 RIU, 0.0031 RIU, 0.0020 RIU, 0.0016 RIU, and 0.0014 RIU, respectively. For this stage, we decided a basis of functions with the first three power functions (F3=t1+t2+t9), resulting a transformed matrix as S~5151×3∙27.Figure 7
Evolution of theRMSE as a function of m for the different functions. Results of the stages (a) 1, (b) 2, (c) 3, and (d) 4. The solid circles indicates the RMSEr value.
(a)(b)(c)(d)For the other stages, the values ofm were 1≤m≤100 with steps of 1 for the sine, cosine, and logarithm functions and −0.5≤m≤0.5 with steps of 0.01 for the exponential function. The optimal values of m obtained in the stage 2 (Figure 7(b)) were 11, 16, 76, and 0.34 for the functions F6=F3+sinmt, F7=F3+cosmt, F8=F3+logemt, and F9=F3+expmt, respectively. The RMSEr values obtained with these functions were 0.0015 RIU, 0.0014 RIU, 0.0016 RIU, and 0.0017 RIU, respectively. Then, the chosen function was F7=t1+t2+t9+cos16t. Now, for the stage 3 (Figure 7(c)), the implemented functions with their optimal value of m were F10=F6+sin20t, F11=F6+exp70t, and F12=F6+loge−0.14t. The RMSEr values obtained with these functions were 0.0012 RIU, 0.0013 RIU, and 0.0016 RIU, respectively. In this stage, the chosen function was F10=t1+t2+t9+cos16t+sin20t. Moreover, for the fourth and last stage (Figure 7(d)), the optimal values of m were 80 and 0.1 for the functions F13=F10+loge80t and F14=F10+exp0.1t for which the resulting RMSEr values were 0.0042 RIU and 0.0061 RIU, respectively. Here, as the RMSEr values increased with any of the functions tested in this stage, it was decided not to add any function to F10. Thus, the reached values of RMSEr and R2 with F10 function were 0.0012 RIU and 0.9999, respectively. Finally, the optimal values of m and RMSEr obtained at each one of the stages for each one of the functions are listed in Table 4.Table 4
RMSEr and m values obtained by implementing the algorithm 1.
FunctionStage 1m;RMSErStage 2m;RMSErStage 3m;RMSErStage 4m;RMSErtm1; 0.0063———t1+tm2; 0.0031———t1+t2+tm9; 0.0020———t1+t2+t9+tm13; 0.0016———t1+t2+t9+t87+tm87; 0.0014———sinmt—11; 0.001520; 0.0012—cosmt—16; 0.0014——expmt—0.34; 0.0017-0.14; 0.00130.1; 0.0040logemt—76; 0.001670; 0.001680; 0.0042The optimal values ofμ were 1×10−5, 4×10−6, 1×10−5, 1×10−5, and 1×10−5 for the functions F1, F2, F3, F6, and F10, respectively. In Figure 8(a), the real and estimated refractive index values obtained with the regression equation based on F10 can be seen. Here, each vertical line of the figure corresponds to a temperature value, and the RMSEr and R2 values were 0.0012 RIU and 0.9999, respectively. Now, regarding to the process for reducing the number of variables, the evolution of RMSE is presented in Figure 8(b). For this case, the criterion was that the variation in RMSEr was ≤0.05. Here, the first 15 variables listed in the figure were removed, leaving a subset of 12 explanatory variables. The RMSEr and R2 values with this subset of variables were 0.0020 RIU and 0.9999, respectively. Finally, the real and estimated refractive index values based on these 15 variables and F10 are shown in Figure 8(c).Figure 8
(a) Comparison between simulated (real) and predicted refractive index values obtained by using all the variables set. (b) Evolution of theRMSE in the process of reducing variables number. (c) Comparison between simulated (real) and predicted refractive index values obtained by using the reduced set of variables. (d) Comparison between experimental and predicted refractive index values at different temperatures obtained by using the reduced set of variables.
(a)(b)(c)(d)As in the previous cases, the mathematical model was also evaluated by using experimental data in order to validate the regression equation obtained with simulated data. Here, the same experimental spectra used in the case to estimate temperature at different refractive indices were utilized. In this case, the response variable had the values of refractive indices of the liquids. Besides, the optimal value ofλ used in the regression equation was 1×10−5, and the reached values of RMSEr and R2 were 0.0007 RIU and 0.9999, respectively. Finally, the comparison between measured and estimated temperature values is shown in Figure 8(d).As can be seen in the results of the three cases, the simultaneous measurement of temperature and refractive index and their measurement ranges was not limited by the proposed algorithm, and all the values of the response variable were estimated with high precision for the measurement ranges used. These measurement ranges are larger than those achieved with the analysis of the output signals of interferometric sensors with conventional methods such as the use of the sensitivities matrix equation for the case of two-parameter sensors. In addition, these results were achieved because several characteristics of the output spectrum were taken into account and not just one or two as in conventional methods. The mathematical method that was proposed in this work relates a weighted sum of features, which are functions of an initial set of explanatory variables, with two response variables.


## 4.1. Estimation of Temperature at Different External Refractive Indexes

The mathematical model was applied to a synthetic dataset (SNC) that was formed with features of 5151 simulated spectra. In this way, the dataset SNC is a matrix with N=5151 rows (observations) and C=27 columns (variables) that contains the values of the explanatory variables. This dataset was transformed with a basis of functions in order to find an optimal regression equation (Eq. (5)). In this way, the stages of the algorithm 1 were implemented (see Figure 3).Figure 3
Evolution of theRMSE as a function of m for the different functions. Results of the stages (a) 1, (b) 2, (c) 3, and (d) 4. The solid circles indicates the RMSEr value.
(a)(b)(c)(d)The results of the stage 1 are shown in Figure3(a). Here, the RMSE values, as a function of m obtained at each time that a power function was added, can be seen. The set of values of m were from 1 to 100 with steps of 1 for all the functions of this stage. The solid circle indicates the RMSEr value. Moreover, in this stage, the matrix was transformed four times, and the optimal values of m of the power functions were 1, 3, 6, and 10. Furthermore, as can be observed, the RMSEr values decrease each time that a power function is added. Here, the RMSEr values were 7.650°C, 3.225°C, 2.488°C, and 1.956°C which correspond to the power functions F1=t1, F2=F1+t3, F3=F2+t6, and F4=F3+t10, respectively. This means that for the first power function, tm, the smallest RMSE value (RMSEr=7.650°C) was for m=1; for the second added function, t1+tm, the RMSEr was 3.225°C for m=3, and so on for the next two added functions. Here, it is important to mention that all the functions are potential as was mentioned in the algorithm, and no more of four functions were added because there was no significant decrement in the RMSEr value. For this stage, they selected the first three functions (F3=t1+t3+t6) because of the change in RMSEr (0.5325°C) which is small when the fourth function is added. Finally, the transformed matrix in this stage was S~5151×3∙27.Regarding step (d) of the stage 1 of the algorithm1, the k-fold crossvalidation technique was implemented to find the optimal value of μ used to find the regression coefficients of the regression equations. Here, each time the matrix was transformed with an additional function and standardized, it was divided in 5 groups; thus, each training and test group had 80% and 20% of data. Here, it is important to mention that for the added function, each time a value of m was used, the matrix was divided. The set of values of μ were 0≤μ≤2×10−5 with steps of 2×10−6. The optimal values of μ were 0, 2×10−6, and 1×10−5, which correspond to the functions F1, F2, and F3, respectively.In Figure3(b), it showed the results obtained with the stage 2 of the algorithm 1. Here, m was set as 1≤m≤5, with steps of 0.1, for the sine, the cosine, and the logarithm functions. Additionally, it was set −0.5≤m≤0.5 with steps of 0.01 for the exponential function. At this stage, the RMSEr values were 1.2452°C, 1.0053°C, 1.6684°C, and 1.6558°C for the functions F5=F3+sin2t, F6=F3+cos5t, F7=F3+loge−0.42t, and F8=F3+exp1.1t, respectively. Here, the cosine was selected as the added function, since the regression equation based on F6=t1+t3+t6+cos5t presented the lowest RMSEr value. Afterwards, for the stage 3 for which the results are shown in Figure 3(c), the power and cosine functions were not considered because these functions were selected in the previous stages. Besides, for the stage 3, the set of values of m were defined within 1≤m≤100 for the sine and the logarithm functions; moreover, it was set as −0.5≤m≤0.5 for the exponential function. In this way, the obtained RMSEr values were 0.8626°C, 0.9623°C, and 1.0093°C for the functions F9=F6+sin14t, F10=F6+exp−0.30t, and F11=F6+loge91t, respectively. Based on these results, the proposed function at this stage was F9=t1+t3+t6+cos5t+sin14t. Finally, the results of stage 4 are shown in Figure 3(d). In this stage, the set of values of m were the same that were used in stage 3. Here, the RMSEr values were 0.9135°C for F12=F9+exp−0.29t and 1.3584°C for F13=F9+loge23.5t. Here, as the change in RMSEr(0.0509°C) was not significant with respect to that obtained in the previous stage (0.8626°C), no function of this stage was added. In this way, the final basis of functions to estimate temperature was F9, and the transformed matrix was S~5151×5∙27. A summary of the optimal values of m and RMSEr of the mentioned stages are listed in Table 2.Table 2
RMSEr and m values obtained by implementing the algorithm 1.
FunctionStage 1m;RMSErStage 2m;RMSErStage 3m;RMSErStage 4m;RMSErtm1; 7.6503———t1+tm3; 3.2258———t1+t3+tm6; 2.4886———t1+t3+t6+tm10; 1.9561———sinmt—5; 1.245214; 0.8626—cosmt—2; 1.0053——expmt—-0.42; 1.6558-0.30; 0.9623-0.29; 0.9135logemt—1.1; 1.668491; 1.009323.5; 1.3584Regarding step (d) of the stages 2–4 of the algorithm1, the set of values of μ were also 0≤μ≤2×10−5 with steps of 2×10−6. The optimal values of μ were 8×10−6, 1×10−5, and 1×10−5 which correspond to the functions F4,F6, and F9, respectively. Finally, the regression equation based on F9 was used to calculate the estimated temperature values. These were compared with the real temperature values, as shown in Figure 4(a). Here, the values of each diagonal correspond to a refractive index value between 1.00 and 2.00 RIU. It is observed that the estimated values presents a high fit to the real values. Based on these results, the values of RMSEr and R2 achieved were 0.8626°C and 0.9991, respectively.Figure 4
(a) Comparison between simulated (real) and predicted temperature values obtained by using all the variables set. (b) Evolution of theRMSE in the process of reducing variables number. (c) Comparison between simulated (real) and predicted temperature values obtained by using the reduced set of variables. (d) Comparison between experimental and predicted temperature values obtained by using the reduced set of variables at different external refractive indices.
(a)(b)(c)(d)After finding the functions with their coefficientsm with which the best estimates were obtained, the technique to reduce the size of the explanatory variables set was implemented. In Figure 4(b), the evolution of RMSEr as a function of the number of eliminated variables is presented. The numbers listed in the figure show the number and order in which each one of the variables was eliminated. Here, the dash means that the first RMSEr is calculated by using all the explanatory variables. Later, it showed the RMSEr obtained when the first variable (X23) was removed. In this way, the RMSEr is evolving as another variable is removed until these are finished; in our case, the last removed variable was X10. Here, it can be observed that the RMSEr increases as more explanatory variables are removed. The criterion to choose which variables to eliminate was that the RMSEr value obtained with the reduced variables subset was ≤0.15 with respect to the value obtained with all the variables set. In this way, we removed the first 7 variables listed in Figure 4(b), and the size of the new subset of explanatory variables was 20. With this variables subset the resulting transformed matrix was S~5151×5∙20. The real temperature values and estimated temperature values with the regression equation, based on 20 variables and the functions F9, are shown in Figure 4(c). It is observed that the fit is practically the same as that observed in Figure 4(a) that was obtained considering 27 variables. Moreover, for this later case in which a reduced number of variables was used, the reached RMSErand R2 were 0.9868°C and 0.9989, respectively.The proposed mathematical model was also evaluated using experimental data. Here, the reduced subset of variables and the functionF9 were used, and the optimal value of μ was 1×10−5. The experimental data were obtained from 96 reflected spectra, which were recorded with the OSA when the interferometric sensor was submerged in liquids at different temperatures and refractive indices. In our experiments, temperature was varied between 22°C and 26°C, and liquids with refractive indices between 1.000 RIU and 1.497 RIU were used. The comparison between measured and estimated temperature values is shown in Figure 4(d). The RMSEr and R2 values were 0.0887°C and 0.9958, respectively.


### 4.1.1. Estimation of Temperature when External Refractive Index Is Equal to One

Many optical temperature sensors are used to detect temperature when these are not submerged in liquids; for this reason, we decided to simulate and characterize our proposed interferometric system for the case when onlyn4=1. The mathematical model is applied using a synthetic dataset SNC that is formed with features of 101 simulated spectra for which the external refractive index is equal to one. In this way, the dataset SNC is a matrix with N=101 rows (observations) and C=27 columns (variables) that contains the values of the explanatory variables. This dataset was also transformed with a basis of functions in order to find an optimal regression equation (Eq. (5)). In this way, the stages of the algorithm 1 were also implemented.The results of all the stages are presented in Figure5 and summarized in Table 3. In the stage 1 (Figure 5(a)), the set of values of m were from 1 to 100 with steps of 1 for all the functions. In this stage, the matrix was transformed five times, and the optimal values of m of the power functions were 15, 29, 93, 73, and 3, resulting in the following functions F1=t15, F2=F1+t29, F3=F2+t93, F4=F3+t73, and F5=F4+t3. The RMSEr values obtained by using F1, F2, F3, F4, and F5 were 1.5704°C, 0.3318°C, 0.1553°C, 0.0870°C, and 0.0644°C, respectively. For this stage, we decided the first four power functions (F4=t15+t29+t93+t73), because the variation in RMSEr was also small (0.0226). Finally, for this stage, the transformed matrix is expressed as S~101×4∙27.Figure 5
Evolution of theRMSE as a function of m for different functions. Results of the stages (a) 1, (b, c) 2, (d, e) 3, and (f) 4. The solid circles indicates the RMSEr value.
(a)(b)(c)(d)(e)(f)Table 3
RMSEr and m values obtained by implementing the algorithm 1.
FunctionStage 1m;RMSErStage 2m;RMSErStage 3m;RMSErStage 4m;RMSErtm15; 1.5704———t15+tm29; 0.3318———t15+t29+tm93; 0.1553———t15+t29+t93+tm73; 0.0870———t15+t29+t93+t73+tm3; 0.0644———sinmt—61; 0.0370——cosmt—76; 0.038953; 0.0154—expmt—-0.34; 0.06730.08; 0.03120.29; 0.0081logemt—0.36; 0.05590.79; 0.03110.74; 0.0079The results obtained in the other stages are shown in Figures5(b)–5(e). Here, the set of values of m were 1≤m≤100 with steps of 1 for the sine and cosine functions, −0.5≤m≤0.5 with steps of 0.01 for the logarithm function, and 0≤m≤1 with steps of 0.01 for the exponential function. In the stage 2 (Figures 5(b) and 5(c)), the optimal values of mwere 61, 76, -0.34, and 0.36 for the functions F6=F4+sinmt, F7=F4+cosmt, F8=F4+expmt, and F9=F4+logemt, respectively. The RMSEr values obtained with these functions were 0.0370°C, 0.0389°C, 0.0673°C, and 0.0559°C, respectively. Based on these results, the chosen function was F6=t15+t29+t93+t73+sin61t. Now, for the stage 3 (Figures 5(d) and 5(e)), the implemented functions and the RMSEr values were F10=F6+cos53t, F11=F6+exp0.08t, and F12=F6+loge0.79t and 0.0154°C, 0.0312°C, and 0.0311°C, respectively. In this stage, the chosen function was F10=t15+t29+t93+t73+sin61t+cos53t. And for the last stage (Figure 5(f)), the tested functions were F13=F10+exp0.29t and F14=F10+loge0.74t, and the resulting RMSEr values were 0.0081°C and 0.0079°C, respectively. Finally, the functions proposed to estimate temperature were F14=t15+t29+t93+t73+sin61t+cos53t+loge0.74t with which the transformed matrix was expressed as S~101×7∙27.The process to obtain the optimal values ofμ was the same. In this way, using the functions F1, F2, F3, F4, F6, F10, and F14, the optimal values of μ were 2×10−6, 2×10−6, 1×10−5, 4×10−6, 6×10−6, 4×10−6, and 2×10−6, respectively. The regression equation based on F14 was used to calculate the estimated temperature values. The comparison between real and estimated temperature values is shown in Figure 6(a). It is observed that the estimated values present a high fit to the real values. Based on these data, the reached values of RMSEr and R2 were 0.0079°C and 0.9999, respectively. The algorithm to reduce the size of the set of explanatory variables was also implemented. The evolution of the RMSE as a function of the number of eliminated variables is shown in Figure 6(b). It is observed in the list that the first and last variables removed were X3 and X12, respectively. The criterion to choose the variables was that the variation in RMSEr was ≤0.005. In such manner, the first 12 variables listed were removed, leaving a subset of 15 explanatory variables. Here, the resulting transformed matrix was S~101×7∙12. The comparison between real and estimated temperature values, calculated with the regression equation based on the 15 chosen variables and F14, is shown in Figure 6(c). It is observed that the fit is practically the same as that observed in Figure 6(a). The RMSEr and R2 values were 0.0498°C and 0.9999, respectively.Figure 6
(a) Comparison between simulated (real) and predicted temperature values obtained by using all the variables set. (b) Evolution of theRMSE in the process of reducing variables number. (c) Comparison between simulated (real) and predicted temperature values obtained by using the reduced set of variables. (d) Comparison between experimental and predicted temperatures values obtained by using the reduced set of variables.
(a)(b)(c)(d)The proposed mathematical model was also evaluated using experimental data. Here, the reduced subset of variables andF10 was used; the optimal value of μ was 1×10−5. The experimental reflected spectra were obtained when the interferometric sensor was no submerged in a liquid. Then, from the 96 experimental reflected spectra, there were considered only the corresponding to an external refractive index equal to one. Here, the temperature of the interferometric sensor was varied from 22°C to 26°C. The comparison between measured and estimated temperature values is shown in Figure 6(d). The RMSEr and R2 values were 0.0138°C and 0.9999, respectively.


## 4.1.1. Estimation of Temperature when External Refractive Index Is Equal to One

Many optical temperature sensors are used to detect temperature when these are not submerged in liquids; for this reason, we decided to simulate and characterize our proposed interferometric system for the case when onlyn4=1. The mathematical model is applied using a synthetic dataset SNC that is formed with features of 101 simulated spectra for which the external refractive index is equal to one. In this way, the dataset SNC is a matrix with N=101 rows (observations) and C=27 columns (variables) that contains the values of the explanatory variables. This dataset was also transformed with a basis of functions in order to find an optimal regression equation (Eq. (5)). In this way, the stages of the algorithm 1 were also implemented.The results of all the stages are presented in Figure5 and summarized in Table 3. In the stage 1 (Figure 5(a)), the set of values of m were from 1 to 100 with steps of 1 for all the functions. In this stage, the matrix was transformed five times, and the optimal values of m of the power functions were 15, 29, 93, 73, and 3, resulting in the following functions F1=t15, F2=F1+t29, F3=F2+t93, F4=F3+t73, and F5=F4+t3. The RMSEr values obtained by using F1, F2, F3, F4, and F5 were 1.5704°C, 0.3318°C, 0.1553°C, 0.0870°C, and 0.0644°C, respectively. For this stage, we decided the first four power functions (F4=t15+t29+t93+t73), because the variation in RMSEr was also small (0.0226). Finally, for this stage, the transformed matrix is expressed as S~101×4∙27.Figure 5
Evolution of theRMSE as a function of m for different functions. Results of the stages (a) 1, (b, c) 2, (d, e) 3, and (f) 4. The solid circles indicates the RMSEr value.
(a)(b)(c)(d)(e)(f)Table 3
RMSEr and m values obtained by implementing the algorithm 1.
FunctionStage 1m;RMSErStage 2m;RMSErStage 3m;RMSErStage 4m;RMSErtm15; 1.5704———t15+tm29; 0.3318———t15+t29+tm93; 0.1553———t15+t29+t93+tm73; 0.0870———t15+t29+t93+t73+tm3; 0.0644———sinmt—61; 0.0370——cosmt—76; 0.038953; 0.0154—expmt—-0.34; 0.06730.08; 0.03120.29; 0.0081logemt—0.36; 0.05590.79; 0.03110.74; 0.0079The results obtained in the other stages are shown in Figures5(b)–5(e). Here, the set of values of m were 1≤m≤100 with steps of 1 for the sine and cosine functions, −0.5≤m≤0.5 with steps of 0.01 for the logarithm function, and 0≤m≤1 with steps of 0.01 for the exponential function. In the stage 2 (Figures 5(b) and 5(c)), the optimal values of mwere 61, 76, -0.34, and 0.36 for the functions F6=F4+sinmt, F7=F4+cosmt, F8=F4+expmt, and F9=F4+logemt, respectively. The RMSEr values obtained with these functions were 0.0370°C, 0.0389°C, 0.0673°C, and 0.0559°C, respectively. Based on these results, the chosen function was F6=t15+t29+t93+t73+sin61t. Now, for the stage 3 (Figures 5(d) and 5(e)), the implemented functions and the RMSEr values were F10=F6+cos53t, F11=F6+exp0.08t, and F12=F6+loge0.79t and 0.0154°C, 0.0312°C, and 0.0311°C, respectively. In this stage, the chosen function was F10=t15+t29+t93+t73+sin61t+cos53t. And for the last stage (Figure 5(f)), the tested functions were F13=F10+exp0.29t and F14=F10+loge0.74t, and the resulting RMSEr values were 0.0081°C and 0.0079°C, respectively. Finally, the functions proposed to estimate temperature were F14=t15+t29+t93+t73+sin61t+cos53t+loge0.74t with which the transformed matrix was expressed as S~101×7∙27.The process to obtain the optimal values ofμ was the same. In this way, using the functions F1, F2, F3, F4, F6, F10, and F14, the optimal values of μ were 2×10−6, 2×10−6, 1×10−5, 4×10−6, 6×10−6, 4×10−6, and 2×10−6, respectively. The regression equation based on F14 was used to calculate the estimated temperature values. The comparison between real and estimated temperature values is shown in Figure 6(a). It is observed that the estimated values present a high fit to the real values. Based on these data, the reached values of RMSEr and R2 were 0.0079°C and 0.9999, respectively. The algorithm to reduce the size of the set of explanatory variables was also implemented. The evolution of the RMSE as a function of the number of eliminated variables is shown in Figure 6(b). It is observed in the list that the first and last variables removed were X3 and X12, respectively. The criterion to choose the variables was that the variation in RMSEr was ≤0.005. In such manner, the first 12 variables listed were removed, leaving a subset of 15 explanatory variables. Here, the resulting transformed matrix was S~101×7∙12. The comparison between real and estimated temperature values, calculated with the regression equation based on the 15 chosen variables and F14, is shown in Figure 6(c). It is observed that the fit is practically the same as that observed in Figure 6(a). The RMSEr and R2 values were 0.0498°C and 0.9999, respectively.Figure 6
(a) Comparison between simulated (real) and predicted temperature values obtained by using all the variables set. (b) Evolution of theRMSE in the process of reducing variables number. (c) Comparison between simulated (real) and predicted temperature values obtained by using the reduced set of variables. (d) Comparison between experimental and predicted temperatures values obtained by using the reduced set of variables.
(a)(b)(c)(d)The proposed mathematical model was also evaluated using experimental data. Here, the reduced subset of variables andF10 was used; the optimal value of μ was 1×10−5. The experimental reflected spectra were obtained when the interferometric sensor was no submerged in a liquid. Then, from the 96 experimental reflected spectra, there were considered only the corresponding to an external refractive index equal to one. Here, the temperature of the interferometric sensor was varied from 22°C to 26°C. The comparison between measured and estimated temperature values is shown in Figure 6(d). The RMSEr and R2 values were 0.0138°C and 0.9999, respectively.


## 4.2. Estimation of Refractive Index at Different Temperatures

The mathematical model was applied with the same synthetic dataset used to estimate refractive index at different temperatures (SNC). The values of refractive index (n4) were taken as values of the response variable. The dataset was also transformed with a basis of functions in order to find an optimal regression equation to estimate external refractive index without taking temperature into account. In this way, the stages of the algorithm 1 was implemented.The results obtained in each one of the stages can be seen in Figure7. For the stage 1, the set of values of m was from 1 to 100 with steps of 1 for all the power functions. The matrix was transformed four times, and the optimal values of m of each one of the added functions were 1, 3, 9, 13, and 87. In this way, the tested functions were F1=t1, F2=F1+t2, F3=F2+t9, F4=F3+t13, and F5=F4+t87. In Figure 7(a), it showed the evolution of the RMSEr as a function of m for these four functions. The RMSEr values obtained using F1, F2, F3, F4, and F5 were 0.0063 RIU, 0.0031 RIU, 0.0020 RIU, 0.0016 RIU, and 0.0014 RIU, respectively. For this stage, we decided a basis of functions with the first three power functions (F3=t1+t2+t9), resulting a transformed matrix as S~5151×3∙27.Figure 7
Evolution of theRMSE as a function of m for the different functions. Results of the stages (a) 1, (b) 2, (c) 3, and (d) 4. The solid circles indicates the RMSEr value.
(a)(b)(c)(d)For the other stages, the values ofm were 1≤m≤100 with steps of 1 for the sine, cosine, and logarithm functions and −0.5≤m≤0.5 with steps of 0.01 for the exponential function. The optimal values of m obtained in the stage 2 (Figure 7(b)) were 11, 16, 76, and 0.34 for the functions F6=F3+sinmt, F7=F3+cosmt, F8=F3+logemt, and F9=F3+expmt, respectively. The RMSEr values obtained with these functions were 0.0015 RIU, 0.0014 RIU, 0.0016 RIU, and 0.0017 RIU, respectively. Then, the chosen function was F7=t1+t2+t9+cos16t. Now, for the stage 3 (Figure 7(c)), the implemented functions with their optimal value of m were F10=F6+sin20t, F11=F6+exp70t, and F12=F6+loge−0.14t. The RMSEr values obtained with these functions were 0.0012 RIU, 0.0013 RIU, and 0.0016 RIU, respectively. In this stage, the chosen function was F10=t1+t2+t9+cos16t+sin20t. Moreover, for the fourth and last stage (Figure 7(d)), the optimal values of m were 80 and 0.1 for the functions F13=F10+loge80t and F14=F10+exp0.1t for which the resulting RMSEr values were 0.0042 RIU and 0.0061 RIU, respectively. Here, as the RMSEr values increased with any of the functions tested in this stage, it was decided not to add any function to F10. Thus, the reached values of RMSEr and R2 with F10 function were 0.0012 RIU and 0.9999, respectively. Finally, the optimal values of m and RMSEr obtained at each one of the stages for each one of the functions are listed in Table 4.Table 4
RMSEr and m values obtained by implementing the algorithm 1.
FunctionStage 1m;RMSErStage 2m;RMSErStage 3m;RMSErStage 4m;RMSErtm1; 0.0063———t1+tm2; 0.0031———t1+t2+tm9; 0.0020———t1+t2+t9+tm13; 0.0016———t1+t2+t9+t87+tm87; 0.0014———sinmt—11; 0.001520; 0.0012—cosmt—16; 0.0014——expmt—0.34; 0.0017-0.14; 0.00130.1; 0.0040logemt—76; 0.001670; 0.001680; 0.0042The optimal values ofμ were 1×10−5, 4×10−6, 1×10−5, 1×10−5, and 1×10−5 for the functions F1, F2, F3, F6, and F10, respectively. In Figure 8(a), the real and estimated refractive index values obtained with the regression equation based on F10 can be seen. Here, each vertical line of the figure corresponds to a temperature value, and the RMSEr and R2 values were 0.0012 RIU and 0.9999, respectively. Now, regarding to the process for reducing the number of variables, the evolution of RMSE is presented in Figure 8(b). For this case, the criterion was that the variation in RMSEr was ≤0.05. Here, the first 15 variables listed in the figure were removed, leaving a subset of 12 explanatory variables. The RMSEr and R2 values with this subset of variables were 0.0020 RIU and 0.9999, respectively. Finally, the real and estimated refractive index values based on these 15 variables and F10 are shown in Figure 8(c).Figure 8
(a) Comparison between simulated (real) and predicted refractive index values obtained by using all the variables set. (b) Evolution of theRMSE in the process of reducing variables number. (c) Comparison between simulated (real) and predicted refractive index values obtained by using the reduced set of variables. (d) Comparison between experimental and predicted refractive index values at different temperatures obtained by using the reduced set of variables.
(a)(b)(c)(d)As in the previous cases, the mathematical model was also evaluated by using experimental data in order to validate the regression equation obtained with simulated data. Here, the same experimental spectra used in the case to estimate temperature at different refractive indices were utilized. In this case, the response variable had the values of refractive indices of the liquids. Besides, the optimal value ofλ used in the regression equation was 1×10−5, and the reached values of RMSEr and R2 were 0.0007 RIU and 0.9999, respectively. Finally, the comparison between measured and estimated temperature values is shown in Figure 8(d).As can be seen in the results of the three cases, the simultaneous measurement of temperature and refractive index and their measurement ranges was not limited by the proposed algorithm, and all the values of the response variable were estimated with high precision for the measurement ranges used. These measurement ranges are larger than those achieved with the analysis of the output signals of interferometric sensors with conventional methods such as the use of the sensitivities matrix equation for the case of two-parameter sensors. In addition, these results were achieved because several characteristics of the output spectrum were taken into account and not just one or two as in conventional methods. The mathematical method that was proposed in this work relates a weighted sum of features, which are functions of an initial set of explanatory variables, with two response variables.


## 5. Conclusions

In this work, it was demonstrated that a multiple regression model based on explanatory variables, transformed by means a basis of functions, can be implemented to use a thermosensitive interferometric system for simultaneous measurement of temperature and refractive index. The model is based on variables that depend on the wavelength and the amplitude of peaks and fringes of the output signal of the interferometric sensor that change when the interferometer is subjected to changes in temperature and refractive index. Here, as not all sensor sensitivities are linear, therefore, it is not possible to use the sensitivity matrix equation to obtain simultaneously the temperature and refractive index values over wide measurement ranges. In this way, it was shown that transforming the variables of the model with a basis of functions (power, exponential, logarithmic, sine, and cosine), it is possible to ideally measure refractive index values between 1.00 and 2.00 RIU and temperature values between 0 and 100°C. Besides, with the proposed mathematical model, it was possible to overcome the ambiguity 2π, being able to measure in a temperature measurement range greater than the typical limited by 1 FSR. The proposed model was experimentally supported by using liquids with refractive index values between 1.00 and 1.49 RIU and temperature values between 22°C and 26°C achieving a root mean square error and a multiple determination coefficient of 0.0012 RIU/0.9999 and 0.0887°C/0.9958. Finally, it is important to note that since the estimation of the values of the response variables is based on multiple features, multiple machine learning models can be used for this type of applications, which will be aborded in future work.



---

*Source: 2820062-2023-01-19.xml*