EURASIP Journal on Applied Signal Processing 2005:4, 558–574 c ○ 2005 Hindawi Publishing Corporation Neural-Network-Based Smart Sensor Framework Operating in a Harsh Environment

We present an artificial neural-network- (NN-) based smart interface framework for sensors operating in harsh environments. The NN-based sensor can automatically compensate for the nonlinear response characteristics and its nonlinear dependency on the environmental parameters, with high accuracy. To show the potential of the proposed NN-based framework, we provide results of a smart capacitive pressure sensor (CPS) operating in a wide temperature range of 0 to . Through simulated experiments, we have shown that the NN-based CPS model is capable of providing pressure readout with a maximum full-scale (FS) error of only over this temperature range. A novel scheme for estimating the ambient temperature from the sensor characteristics itself is proposed. For this purpose, a second NN is utilized to estimate the ambient temperature accurately from the knowledge of the offset capacitance of the CPS. A microcontroller-unit- (MCU-) based implementation scheme is also provided.


INTRODUCTION
In many practical application areas of avionics, automobiles, robotics, missile guidance, oil drilling, and industrial measurements, sensors operate in harsh environments such as extreme ambient temperature, pressure, humidity, and so forth. In such situations, the response of the sensors depends not only on the measurand but also on the environmental parameters in a nonlinear manner. Usually, an exact mathematical model of a sensor showing the relationship between the measurand and its response, and its dependency on the environmental parameters, is not available. Further, since most of the sensors exhibit some amount of nonlinear response characteristics, and the environmental parameters influence the sensor behavior nonlinearly, the problem of obtaining an accurate readout and its calibration becomes more complex.
Some of the ideal properties of a sensor include linear response characteristics, autocorrection of the adverse effects of nonlinear environmental parameters, high sensitivity and accuracy, and low power consumption. However, in practical situations, it is not easy to achieve ideal sensor characteristics, especially when the sensor is operating in a harsh environment. In order to compensate for some of the nonidealities and to obtain accurate readout, several digital and analog interface circuits have been proposed in the past with some success [1,2,3,4,5,6,7]. These techniques include both iterative and noniterative algorithms, and involve complex analog and/or digital signal processing to model the sensor characteristics. They provide a limited solution to the complex problem under the assumptions that the range of variation of environmental parameters is small and that the influence of the environmental parameters on the sensor characteristics is linear.
Recently, artificial neural networks (NNs) have emerged as a powerful learning technique to perform complex tasks in dynamic environments. These networks are endowed with certain unique characteristics such as the capability of universal approximation, generalization, and fault tolerance. Because of these characteristics, there have been numerous successful applications of NNs in various fields of science, engineering, and industry [8,9,10]. It has been shown that the NN-based approximations to measurement data perform better than those of the classical methods of data interpolation and least mean square regression [11]. Application of NNs with superior performance for several instrumentation and measurement applications have been reported [12,13,14,15,16,17,18].
The main objective of this paper is to demonstrate the potential of NNs in the development of smart sensors capable of mitigating adverse effects of environmental parameters on the response characteristics of any type of sensor. For this purpose, we propose a multilayer perceptron (MLP)based scheme to provide linear response characteristics with accurate pressure readout, and to compensate for the nonlinear temperature dependency of a capacitive pressure sensor (CPS) operating in a harsh environment with temperature variations from 0 to 250 • C. We have assumed that the temperature influences the sensors's response characteristics nonlinearly and have performed simulation studies with three types of nonlinear dependencies.
An inverse model of the CPS is obtained by training a small-sized MLP using the popular backpropagation (BP) learning algorithm [8]. A small-sized MLP is preferable as the training time, computational complexity, and memory requirements decrease with the size of the MLP. To obtain ambient temperature information, a separate temperature sensor is usually embedded with the pressure sensor. An important contribution of this paper is that we have proposed a novel scheme to estimate the ambient temperature from the sensor characteristics itself, using a second MLP, thus eliminating the need of a separate temperature sensor. The performance of the NN-based scheme is compared with a polynomial-based interpolation scheme, and it is shown that the NN-based scheme outperforms the interpolation scheme.
The rest of the paper is arranged as follows. Section 2 presents a brief theoretical background of the CPS and the switched-capacitor interface (SCI). Section 3 provides details of the proposed MLP-based sensor modeling scheme. The simulated experiments are detailed in Section 4. Section 5 provides performance evaluation and discussions on results of these experiments. The performance comparison with a polynomial-based interpolation scheme is presented in Section 6. A microcontroller-unit-(MCU-) based implementation scheme is provided in Section 7, and finally, conclusions of the present study are drawn in Section 8.

CPS AND SCI
A CPS senses the applied pressure in the form of elastic deflection of its diaphragm. The capacitance of a CPS resulting from the applied pressure P at the ambient temperature T is given by where ∆C(P, T) is the change in capacitance and C 0 (T) is the offset capacitance, that is, the zero-pressure capacitance, both at the ambient temperature T. The above capacitance may be expressed in terms of capacitances at the reference temperature T 0 as where C 0 is the offset capacitance and ∆C(P, T 0 ) is the change in capacitance, both at the reference temperature T 0 . The nonlinear functions f 1 (T) and f 2 (T) determine the effect of the ambient temperature on the sensor characteristics [3]. This model provides sufficient accuracy in determining the influence of temperature on the sensor's response characteristics. When pressure is applied to the CPS, its change in capacitance at the reference temperature T 0 is given by where τ is the desensitivity parameter, P N is the normalized applied pressure given by P N = P/P max , and P max is the maximum permissible applied pressure. The parameters τ and P max depend on the geometrical structure and physical dimensions of the CPS. In this study, in conformance with practical conditions, we have considered that the ambient temperature influences the CPS characteristics nonlinearly. The nonlinear functions involved are given by where T n = (T − T 0 )/T max . The coefficients κ i j , i = 1, 2, j = 1, 2, 3, determine the extent of nonlinear influence of the temperature on the sensor characteristics. Note that when κ i j = 0 for j = 2 and 3, the influence of the temperature on the CPS response characteristics is linear. The maximum permissible temperature at which the sensor may be operated is denoted by T max . Let the normalized temperature T N be given by T N = T/T max . The normalized capacitance C N may be expressed as Using (2) and (3), this may be rewritten as where γ = P N (1 − τ)/(1 − P N ). Because of the requirement of the NN modeling, C N in (7) is divided by a scale factor (SF) of 2, so as to keep its maximum value within 1. If the applied Figure 1: The switched-capacitor interface circuit.
pressure is zero, then γ becomes zero. Therefore, the normalized zero-pressure capacitance, that is, the normalized offset capacitance is given by SCI for the CPS is shown in Figure 1, where the CPS is represented by C(P). The SCI output provides a voltage signal proportional to the capacitance change in the CPS due to the applied pressure. The SCI operation can be controled by a reset signal θ. Whenθ = 1 (logic 1), C(P) charges to the reference voltage V R while the capacitor C S is discharged to ground. On the other hand, when θ = 1, the total charge C(P)V R stored in C(P) is transferred to C S producing an output voltage given by where K = V R /C S . By choosing proper values of C S and V R , the normalized SCI output V N may be obtained in such a way that The unnormalized and normalized SCI outputs at zeroapplied pressure are denoted by V 00 and V N0 , respectively. Therefore, if P N = 0, then V N0 = C N0 .

THE MLP-BASED CPS MODEL
We propose an NN-based technique to obtain an inverse model of a CPS to provide accurate pressure readout under the nonlinear influence of the ambient temperature. The proposed scheme of the NN-based CPS model for the estimation of the applied pressure is shown in Figure 2. This scheme is analogous to the channel equalization scheme used in a digital communication receiver to cancel the adverse effects of the channel on the data being transmitted [8]. To obtain an accurate digital readout of the applied pressure, an MLPbased inverse model of the CPS is used to compensate for the adverse effects of the nonlinear characteristics and its variations due to the influence of the ambient temperature.
In this NN-based CPS model, all the signals used for training and testing are scaled by appropriate SFs to keep their range between 0 and 1. The model operates in two SF Desired pressure + phases: the training phase and the test phase. In the training phase, the NNs used in the model are trained to learn the sensor characteristics and the environmental dependency. The pressure-NN (P-NN) is used to learn the sensor's response characteristics and its nonlinear dependency on the ambient temperature, whereas the temperature-NN (T-NN) is used to learn the nonlinear function representing variations in the ambient temperature. We have used MLPs for both the P-NN and the T-NN. Several datasets are needed to train the NNs. An input pattern and its corresponding desired, or target pattern constitute one pair of data in the dataset. The available datasets are segregated into two parts. The first part, called training set, is used for training of the NNs, and the other part, called test set, is used to verify the effectiveness of the model.

Training phase: pressure
An MLP (P-NN) is used to learn the CPS response characteristics. The scheme for this is shown in Figure 2a. The inputs to the P-NN consist of the normalized temperature (T N ) and the normalized SCI output (V N ). The desired output is the normalized applied pressure (P N ). One dataset for a specific temperature is obtained by recording the SCI output (V N ) for different values of applied pressure, covering the operating range of the sensor. Next, at different temperature values, covering the full operating range, several datasets are generated. The P-NN is trained by taking the patterns from the training set, and its weights are updated by using the popular BP algorithm [8]. After training, the weights of the NN are frozen and stored in an electrically erasable programmable read-only memory (EEPROM). In what follows, the final weights are denoted by W P .

Training phase: temperature
A scheme to estimate the ambient temperature, by using another MLP (T-NN), only from the knowledge of the sensor characteristics is shown in Figure 2b. From (8), it may be seen that C N0 contains temperature information. However, since the influence of the temperature on the CPS characteristics is considered to be nonlinear, the temperature information cannot be obtained correctly from the knowledge of C N0 , using (8). The T-NN is trained by inputting the values of V N0 (the normalized SCI output corresponding to C N0 , that is, the SCI output at zero-applied pressure). The desired output is the normalized temperature T N . Using the BP algorithm, the weights of the T-NN are updated. After the training is completed, the final weights are stored in an EEPROM. In what follows, the final weights are denoted by W T .

Test phase: complete model
The complete scheme of the MLP-based model is shown in Figure 2c. In spite of the variation of the environmental temperature and its nonlinear influence on the CPS characteristics, this model can estimate the applied pressure accurately. During the test phase and actual use of the sensor, the weights W P and W T , stored in the EEPROM, are loaded into the P-NN and T-NN, respectively. The P-NN has learned the inverse characteristics of the CPS at different values of temperature, while the T-NN has learned the nonlinear function representing variations of the ambient temperature. The temperature information needed for the P-NN is obtained from the T-NN. The T-NN gets its input from the value of V N0 . Next, the input patterns from the test set are applied, and the model output ( P N ) is computed. If the model output matches closely with the actual applied pressure (P N ), then it may be said that the NN has learned the CPS characteristics correctly. Thereafter, the model can be used along with the CPS to estimate the pressure and to obtain its readout.

SIMULATION STUDIES
We carried out extensive simulation studies to evaluate performance of the proposed NN-based CPS model. In the following, we describe the details of the simulated experiments.

Preparation of datasets
All parameters of the CPS, such as, ambient temperature, applied pressure, and the SCI output voltage, used in the simulation study were suitably normalized to keep their values between 0 and 1. The datasets needed for training and testing of the NN were generated as follows. The SCI output voltage (V N ) was recorded at the reference temperature (25 • C) at different known values of normalized pressure (P N ) chosen between 0.0 and 0.6 at an interval of 0.05. Thus, these 13 pairs of data (P N versus V N ) constitute one dataset at the reference temperature. To study the influence of temperature on the CPS characteristics, we have considered three forms of nonlinear functions denoted by NL1, NL2, and NL3, and a linear form denoted by NL0. These were simulated by choosing proper values of κ i j in (5). The corresponding values of κ i j are provided in Table 1. Next, with the knowledge of the dataset at the reference temperature, and the chosen values of κ i j , the response characteristics of the CPS for a specific ambient temperature were generated using (7). The response characteristics consist of 13 pairs of data (P N versus V N ), and correspond to a dataset at that temperature. For a temperature range from 0 • C to 250 • C, at an increment of 10 • C, twenty-six such datasets, each containing 13 data pairs, were generated. Next, these datasets were divided into two groups: the training set and the test set. The training set, used for training the NNs, consists of only five datasets corresponding to 0, 60, 120, 180, and 240 • C, and the remaining twenty one datasets were used as the test set. Let the number of the datasets used for training and the number of data points in a dataset be denoted by N trgset and N datpts , respectively. In the following experiments, N trgset = 5 and N datpts = 13, and thus, the total number of training data points is 65 (13 × 5).
The response characteristics of the CPS for different values of temperature (0, 25, 80, 150, and 250 • C) are shown in Figure 3. It may be observed that wide variation in the sensor characteristics occurs when the ambient temperature changes from 0 • C to 250 • C. Further, the sensor's response characteristics change differently for the linear form (NL0) and the three nonlinear forms (NL1-NL3) of temperature dependencies.

Training and testing of the P-NN
A 2-layer MLP with {2−4−1} architecture was chosen in this modeling problem (see Figure 2a). Initially, all the weights of the P-NN were set to some random values within ±1.0. During training, a dataset was randomly selected from the five datasets, and a pattern from the selected dataset was also selected randomly. The initial values of the learning parameter α and the momentum factor β of the BP algorithm were chosen as 0.3 and 0.5, respectively. The MLP architecture and the values of α and β were selected after several experiments to provide optimum results.
Completion of weight adaptation of the 13 data pairs of all the five training sets constitute one iteration. For effective learning, 100 000 iterations were made to train the MLP model. To improve the learning, a variable learning  parameter was used in the BP algorithm. The learning parameter was varied as where ni is the current iteration number, and NITR is the total number of iterations used (in this case, NITR = 100 000). Using a Pentium 4, 2.8 GHz machine, it took only 13 seconds to train the MLP with 100 000 iterations. Finally, the weights of the P-NN (W P ) were stored for later use. This procedure was repeated for the linear (NL0) and the three nonlinear forms of temperature influences (NL1-NL3).
The four sets of the final weights (W P ) of the P-NN model are provided in Table 2.
Performance evaluation of the model was carried out by loading the final stored weights into the MLP. It is important to note that during the testing and actual use of the CPS model, updating of the weights does not take place. The NN estimates the applied pressure from the knowledge of the stored weights when the inputs are applied to the model. For the testing purpose, the SCI output voltage was varied from 0.35 to 0.90 with an increment of 0.001, and then applied to the model along with the temperature information. To evaluate the effectiveness of the model, the NN output ( P N ) was  computed and then compared with the true value of the applied pressure (P N ).

Training and testing of the T-NN
The T-NN was used to estimate the ambient temperature from the knowledge of C N0 at different temperatures. For the chosen values of κ i j (see Table 1), the variation of C N0 with the change in temperature for the linear (NL0) and the three forms of nonlinear dependencies (NL1-NL3) are shown in Figure 4. The T-NN was employed to learn these nonlinear functions for estimating the ambient temperature. An MLP with {1 − 4 − 1} architecture was chosen for this purpose. During training, the values of V N0 corresponding to 0, 60, 120, 180, and 250 • C were chosen as the training set (the same temperature values were also used for training the P-NN). The input and desired output of the T-NN were the values of V N0 and T N , respectively (see Figure 2b).
The initial values of both α and β were chosen as 0.7. The updating of the weights was carried out using the BP algorithm with a variable learning parameter over 200 000 iterations. Using a Pentium 4, 2.8 GHz machine, it took only 2 seconds to train the MLP with 200 000 iterations. The four sets of the final weights (W T ) corresponding to the linear and the three nonlinear forms of interaction are tabulated in Table 3.
Testing of the T-NN was carried out after loading the stored weights into the network. The V N0 was varied from 0.35 to 0.55 with an increment of 0.001 and then fed to the MLP. The output of the T-NN and the true value of the normalized temperature were compared to verify effectiveness of the model.

RESULTS AND DISCUSSIONS
Here, we provide the performance results of the simulation study for the estimation of the applied pressure and the ambient temperature.

Estimation of pressure
The true pressure and the pressure estimated by the MLP model at different values of temperature taken from the test set for the linear (NL0) and the three nonlinear forms (NL1-NL3) are plotted in Figure 5. Here, different symbols represent the true normalized pressure, while the dotted lines denote the estimated pressure. It may be noted that the P-NN has not seen the sensor characteristics for the temperature values of the test set. From this figure, it may be observed  that the MLP is capable of estimating the applied pressure accurately for the full range of applied pressure from 0.0 to 0.6. It is also capable of predicting the applied pressure for the range beyond 0.6, although the network was not trained for this range of P N .
The full-scale (FS) percent error was computed as one hundred times the difference between the true pressure and the estimated pressure. The FS error at 0 • C, 80 • C, 150 • C, and 250 • C with the applied pressure varying from 0.0 to 0.6 for the four forms of temperature dependencies are plotted in Figure 6. Next, in Figure 7, we plotted the FS error for the whole temperature range from 0 • C to 250 • C, at specific values of applied pressure (i.e., P N = 0.1, 0.4, and 0.6), for NL0 and NL1-NL3. The maximum FS error for the linear form NL0 remains within ±0.75%, whereas, in the case of the three nonlinear forms, the maximum FS error remains within ±1.0%.

Estimation of temperature
Plots of true temperature and the estimated temperature as a function of V N0 for the linear (NL0) and the three nonlinear forms (NL1-NL3) are shown in Figure 8. Here, the "dark dots" represent the true temperature and the dotted lines represent the temperature estimated by the T-NN model. Close agreement between the two values is evident from these plots. The FS percent error in estimation of the temperature for the four cases are plotted in Figure 9. For the whole range of temperature variation from 0 • C to 250 • C, the maximum FS error remains within ±1% for NL0, NL2, and NL3, and within ±2% for NL1. From these observations, effective performance of the T-NN is evident. Even though C N0 varies nonlinearly with temperature in different forms of nonlinear dependencies, the T-NN is able to estimate the ambient temperature accurately.
From the above findings, it may be concluded that the performance of the MLP model for the estimation of the applied pressure is excellent for the linear form of influence, and satisfactory for the three forms of nonlinear influences of temperature. In a similar application reported by Arpaia et al. [18], an MLP with 43 hidden layer nodes was used and a maximum error of ±2.4% was obtained. In the present study, we have achieved a maximum error of only ±1.0% with a small-sized MLP of {2 − 4 − 1} architecture (with only 17 weights). This is possible due to careful training of the MLP with the following strategies: (i) proper selection of initial learning rate and the momentum factor, (ii) use of a variable learning parameter (11), and (iii) application of randomly selected patterns from the training set.
The novelty of the proposed scheme is that even though the MLP was trained with patterns taken from only five temperature values (0, 60, 120, 180, and 240 • C), it is capable of estimating the applied pressure accurately when the ambient temperature varies from 0 • C to 250 • C. Thus, the model is capable of effectively nullifying the nonlinear influence of the temperature on the CPS characteristics.

AN INTERPOLATION SCHEME
Pereira et al. [11] have made extensive study on the relative performance of different methods in fitting a curve to sensor's dataset. Their dataset is one dimensional, that is, the sensor output (pressure readout) is a function of the SCI output. Using different interpolation methods, for example, Newton's, splines, polynomial, and NNs, they showed that the NN-based interpolation scheme outperforms other methods. When the data set is highly nonlinear, the NN-based scheme usually performs much better than the other methods. The main advantage of the NN-based curve fitting is its excellent extrapolation capa-bility due to nonlinear processing of multivariate data. After successful training of the NN, it provides lower errors outside the calibration range of the sensor than the polynomial extrapolation. Relative performance of different methods of curve-fitting techniques are provided in Table 4 (taken from [11]). Here, the "Poly. Degree" values for the NN row correspond to the number of hidden layer nodes.
We present a polynomial-based interpolation scheme of data fitting of 2D sensor data, and compare its performance with the NN-based model. Here, the sensor data has two independent variables: ambient temperature (x 1 ) and normalized SCI output (x 2 ), and the output variable is the estimated where J is the polynomial degree, and a j , b j , and c jk are the coefficients of the model to be determined. The dataset consists of 13 × 5 measurement points corresponding to 13 measurements for each of the five temperature values of 0, 60, 120, 180, and 240 • C. Using Gauss-Newton method, the training data was fitted with the polynomial model. The coefficients of the model are estimated by least squares method.
The average mean square error (MES) between the true and estimated pressures is defined as where N td = N trgset × N datpts , N trgset = 5 for the five temperature values, N datpts = 13 for the thirteen measurements, P tru is the true pressure, and P est is the estimated pressure by the model. The MSE avg in dB for different degrees of polynomial model and the P-NN model (using Table 2) were computed and are tabulated in Table 5. The values in the last row of this table indicate the number of coefficients/weights in the model. It can be seen that the MSE avg improves as the   degree of the polynomial model is increased. However, for J > 5, there is no substantial improvement in the MSE avg of the polynomial model. The MSE avg for the P-NN model is found to be less than that of the polynomial model for the linear (NL0) and the three nonlinear temperature dependencies (NL1-NL3).
The estimated coefficients for the linear (NL0) and the three nonlinear temperature dependencies (NL1-NL3) for the polynomial model of degree of five (J = 5 with 21 coefficients) are provided in Table 6. All subsequent comparisons are made based on this polynomial model.
The FS percent error for the polynomial model (J = 5) at specific normalized pressure values covering the entire temperature range are plotted in Figure 10. Similar plots for the P-NN model are shown in Figure 7. Comparing these two figures, one can see that the FS percent error for the P-NN model is less than that of the polynomial model for the linear (NL0) and the three nonlinear dependencies (NL1-NL3).
As stated earlier, the prime advantage of the NN model is its superior extrapolation capability compared to other models. To study the extrapolation capability, we carried out several experiments with the NN model and the polynomial interpolation model using the linear (NL0) and nonlinear (NL1-NL3) temperature dependencies. From the original training dataset, the 13 data points corresponding to 240 • C were removed. Thus, the training data consists of 13 × 4 data points corresponding to 13 data points from each of 0, 60, 120, and 180 • C (N trgset = 4). The NN model, P-NN, was trained with these datasets and a set of weights were obtained for each of the linear (NL0) and nonlinear dependencies (NL1-NL3). Similarly, with a polynomial degree of 5 (J = 5), a set of coefficients of the polynomial model were estimated by using Gauss-Newton method with least squares (for NL0-NL3). The applied pressure was estimated by the P-NN model and the polynomial model using P-NN weights and polynomial coefficients, respectively. The FS error between the true and the estimated pressures at specific temperature values of 210, 220, 230, and 240 • C for the linear (NL0) and nonlinear temperature dependencies (NL1-NL3) are plotted in Figure 11. In this figure, the top row corresponds to the NN model and the bottom row corresponds to the polynomial model.
It may be noted that both the P-NN model and the polynomial model have seen data covering only temperatures from 0 • C to 180 • C. From Figure 11, superior performance of the P-NN model over the polynomial model for temperature range of 210 • C-240 • C is evident. In particular, for the linear dependency (NL0), the FS error of the P-NN model remains within ±1% (similar to that of the previous case). However, for nonlinear dependencies (NL1-NL3), the maximum FS error remains between +5% and −2%. On the other hand, in the case of the polynomial model, as the tempera-ture increases from 210 • C to 240 • C, the FS error increases from −3% to −10% for the linear dependency (NL0). The performance for NL1 is the worst for the polynomial model. As the temperature increases from 210 • C to 230 • C, the FS error increases from −5% to −12%, and it becomes more than −15% at 240 • C. For NL2 and NL3, the maximum FS error remains within −13% and −8%, respectively.
Performance comparison between the P-NN model and the polynomial model for the entire range of temperature at specific values of normalized pressure are plotted in Figure 12. In this figure, the top row corresponds to the P-NN model while the bottom row corresponds to the polynomial model. Superior extrapolation capability of the P-NN model is evident in this figure. For the entire range of temperature (0 • C − 250 • C), the FS error for linear dependency (NL0) remains within ±1% for the P-NN model. For the temperature range from 0 • C to 200 • C, the FS error is larger in the polynomial model compared to that in the P-NN model. Beyond 200 • C, the performance of the polynomial model is much worse than the P-NN model for the linear and nonlinear dependencies (NL0-NL3).
The average MSE, MSE avg , in dB was computed for the P-NN model and the polynomial interpolation model (N trgset = 4 and J = 5) and are provided in Table 7. For the temperature range from 0 • C−250 • C, in comparison to Table 5 (N trgset = 5 and J = 5), a substantial degradation of MSE avg can be seen for the polynomial model. On the other hand, although there is a degradation for the NN model, it is not severe. In particular, in the case of the P-NN model there is not much change in the MSE avg for the linear dependency (NL0) compared with the previous case (Table 5).
For the temperature range from 0 • C − 200 • C, the MSE avg is comparable to that of Table 5 for both the P-NN and polynomial models. This fact indicates that the performance of the polynomial model is satisfactory for interpolation, but its performance severely deteriorates in the case of extrapolation, whereas the performance of the NN model is found to be superior than the polynomial model for both interpolation and extrapolation of the sensor data.

AN IMPLEMENTATION SCHEME
Due to the rapid decrease in unit cost and fast increase in onchip capabilities, MCUs have been used in various intelligent embedded systems. An implementation scheme of the MLPbased CPS model using an MCU is depicted in Figure 13. The SCI converts the change in capacitance of the CPS due to the applied pressure into an equivalent voltage level. This analog SCI output voltage is passed through an analog-todigital converter (ADC). The digital temperature information is similarly obtained from the knowledge of V N0 (i.e., the SCI output when the applied pressure is zero). During the training phase, the CPS is operated at a controled temperature and the data pairs are collected for the training set data. These training data are fed to a personal computer (PC) connected to the MCU for the training of the MLP-based model. After completion of the training, the weights of the MLP are stored in the EEPROM of the MCU. With the available hardware, such as adders and multipliers of the MCU, the MLP-based model can be implemented and the digital readout of the applied pressure can be displayed through the bus interface circuit.
To estimate the ambient temperature from the sensor characteristics itself, we propose the following scheme. In practical use of a CPS, there is only one output signal (the SCI output V N ) corresponding to the measurand (applied pressure). Therefore, appropriate provisions are to be made to obtain the signals separately for estimation of the temperature and the pressure. The online estimation of pressure using the NN-based scheme can be carried out in a measure-ment phase which consists of one t est and one p est cycle. In the t est cycle, the ambient temperature is estimated, whereas in the p est cycle the applied pressure is estimated.
During t est cycle, provision is made to separate the CPS from the applied pressure, and the SCI output V N0 corresponding to the zero pressure is then recorded. From the knowledge of V N0 , the ambient temperature can be estimated using the T-NN. Next, during the p est cycle, the pressure is applied to the CPS, and the SCI output V N is recorded. Now, using the recorded values of V N0 and V N , the applied pressure can be estimated using the NN models as shown in Figure 2c. Appropriate control and logic circuits are to be incorporated with the MCU for this measurement scheme. However, if the environmental temperature variation is not frequent, then the t est cycle need not be carried out in each measurement phase, but only at regular intervals. The estimated temperature of the preceding t est cycle (saved in the RAM of the MCU) can be used to estimate the applied pressure in the current measurement phase.

CONCLUSIONS
Smart sensors operating in harsh environments should be capable of providing accurate readout and autocompensation of the nonlinear influence of the environmental parameters on its response characteristics. For this purpose, we have proposed a novel NN-based technique for mod-eling a CPS operating in a harsh environment in which the temperature can vary from 0 to 250 • C. Using a variable learning rate BP algorithm and taking random samples during training, a highly effective NN-based CPS model was obtained. A compact MLP of {2 − 4 − 1} architecture (with only 17 weights) is capable of providing accurate pressure readout. Using a second MLP, we presented a novel scheme to estimate the ambient temperature from the knowledge of the sensor characteristics itself, thus, eliminating the need for a separate temperature sensor. We have shown the effectiveness of the model in different forms of nonlinear influence of the ambient temperature on the pressure sensor characteristics with computer-simulated experiments.   Figure 13: A scheme of a MCU-based implementation of the pressure sensor NN model. especially for extrapolation of data. A scheme for an MCUbased implementation of the proposed NN-based models is also provided. Such NN-based models may be applied to other types of sensors to incorporate intelligence in terms of mitigating the nonlinear dependency of their response characteristics on the environmental parameters.