Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2021 Nov 10.
Published in final edited form as: Measurement (Lond). 2020 Jan 23;155:107533. doi: 10.1016/j.measurement.2020.107533

Fitting analysis and research of measured data of SAW micro-pressure sensor based on BP neural network

Yuanyuan Li a,*, Jitong Li a, Jian Huang a, Hua Zhou b
PMCID: PMC8580376  NIHMSID: NIHMS1752478  PMID: 34764527

Abstract

Sensor technology plays an important role in modern information and intelligence. The accuracy of sensor measurement becomes more challenging in complex working environment. In this paper, we studied relationship between output frequency difference data and corresponding loading pressure in SAW (Surface Acoustic Wave) micro-pressure sensor. Then using frequency difference as input and pressure as output, we construct BP (Back Propagation) neural network which is trained using experimental data and used to predict output pressure of the sensor. We also calculate error with actual loading pressure, same in the least squares method commonly used. Through multiple comparisons of same set of sample data in overall and local accuracy of predicted results, we verified that the output error predicted by BP neural network is much smaller than least squares method. For example, one set of data is only about 2.9%. It provided a new method for data analysis in SAW micro-pressure sensor.

Keywords: Surface acoustic wave, Micro-pressure sensor, Least squares method, BP neural network

1. Introduction

SAW micro-pressure sensor is a new type of sensor that combines surface acoustic wave technology, thin film technology and electronic technology [1]. It can sense micro-pressure according to the sensitive component, generate the change of frequency and realize the measurement of micro-pressure, which has high precision, quasi-digital output, miniaturization, strong anti-interference ability, wireless passive, multi-parameter sensitivity and good structural process [23]. SAW micro-pressure sensors are increasingly applied in multiple fields [45]. Therefore, the demand for performance is also increasing. However, measurement accuracy is the core parameter of the sensor [6], which directly reflects the its performance. The improvement of accuracy is not only reflected in the process of designing the sensor itself, but also by choosing the appropriate algorithm to fit the relationship between the variables of sensor.

To select the appropriate algorithm to fit the relationship between sensor variables, researchers have applied the least squares method to establish a linear regression model and plot the fitting curve of frequency and pressure. Least squares solution is readily available using numerical linear algebra, however the prediction performance accuracy can be further improved.

According to the previously studies, delayed linear SAW micro-pressure sensor has high sensitivity, good stability, passive and expandable wireless functions [7]. This paper proposed the BP neural network to model the relationship between the micro-pressure and the frequency difference of the sensor. After tuning the learning rate, convergence speed and system stability, we made predictions on the sample points, and compared the overall and local error of the BP neural network with the least squares method. Results demonstrated the superior prediction performance the BP neural network over the least squares method.

2. Related work

The linear regression model has been used to obtain the functional relationship in various sensor fields [8]. Akhlaq M and Sheltami T R etc used the least squares method to estimate the offset and skewness of communication time in wireless sensor networks, and they also implemented a more accurate global time synchronization with compensation algorithm [9]. Sun Lei obtained the noise parameters by the least squares method for the spectral sensor, which solved the problem of noise estimation in hyperspectral remote sensing images [10].

However, linear regression is based on the angular analysis of the linear relationship between variables [11]. Least squares method is used to investigate the relationship between the input and output variables of SAW micro-pressure sensor, which may have a large predictive error. Extrapolation outside the range of sample points leads to large errors in practical applications. Multi-layer feed forward neural network allows nonlinearity in the relationship and finds more applications than linear regression analysis. For the response prediction of multiple fiber optic pH sensors, Suah FBM and Ahmad M etc. analyzed the input and output variables of the sensor through a BP neural network model, and predicted the pH value of the unknown buffer solution with higher accuracy [12]. F, Wang L etc. used BP neural network to process the signals collected by the acceleration sensor in the WBAN (Wireless Body Area Network) and applied to the recognition of the human body posture, which has a great improvement in the recognition rate [13]. BP neural network is widely used to model the relationship between variables from the above sensors, found general applicability and high reliability.

The main principle of surface acoustic wave micro-pressure sensor is to use the SAW technology theory and the performance of piezoelectric materials to experiment with passive wireless transmission functions. The SAW micro-pressure sensor is mainly composed of two interdigital transducers, a piezoelectric substrate, a metal base, and wires [14]. The working mechanism is: when the surface piezoelectric material of the SAW micro-pressure sensor is subject to an external force, the stress at each point of the material changes. Through the nonlinear elastic behavior of piezoelectric material, the elastic constants and densities of materials change with the external forces, forcing the surface wave velocity of the acoustic surface to change [15]. Meanwhile, after the piezoelectric material is subject to an external force, the structural size of the surface acoustic wave device is changed, resulting in a change in the wavelength of the surface acoustic wave. Thus, the speed of propagation and the change in wavelength together cause a change in frequency. The size of the external force can be measured by the frequency of the piezoelectric material [16]. In this paper, the BP neural network is applied to model the relationship between the micro-pressure and the frequency difference of the SAW micro-pressure sensor.

3. BP neural network training sample data

3.1. Data measurement

According to the characteristics of the SAW micro-pressure sensor, a testing platform was established in the laboratory to analyze the functional relationship between the input and output parameters. In this experiment, a network analyzer was used to test three different sizes of previously-designed SAW micro-pressure sensors. The testing scheme was shown in Fig. 1. The network analyzer in (a) connected the input and output wires to the testing base in (b). The base was composed of circuit modules, which connected the pins of the SAW micro-pressure sensor to establish the path between the sensor and network analyzer.

Fig. 1.

Fig. 1.

Measurement of SAW micro-pressure sensor.

The loading force of the SAW micro-pressure sensor ranges from 0 g to 20 g. In order to realize the simulation of the loading force of the micro-pressure sensor in practical application, the loading force is exerted on the center line of the surface of the substrate, and the weights of the corresponding mass are added according to the magnitude of the exerted loading force. The initial value is 0 g, with 2 g added each time, and the maximal loading force is 20 g. The value of the loading force and the corresponding difference of the frequency of the SAW micro-pressure sensor are recorded. Multiple simulations performed on the same SAW micro-pressure sensor must have the same experimental conditions, especially temperature. At the same time, increasing the number of testing can enrich the sample capacity, and the derivation of the conversion relationship between the output frequency difference and the loading force of the SAW micro-pressure sensor is more accurate. Since the SAW micro-pressure sensor’s parameters read by the network analyzer are dynamic, the maximum and minimum output frequency of the same substrate under the same loading force need to select a relatively stable value. Then, after 10 measurements, the average is taken. Finally, get the frequency difference signal. The testing data are showed in Table1.

Table 1.

Experimental data of frequency and pressure.

Micro-pressure Maximum frequency Minimum frequency Frequency difference

Fm(g) F(MHz) F(MHz) ΔF(kHz)
0 40.781286 40.715051 66
2 40.790326 40.712172 78
4 40.788554 40.704233 84
6 40.791441 40.698579 93
8 40.790431 40.690578 100
10 40.790587 40.677066 114
12 40.78973 40.669366 119
14 40.791827 40.727559 122
16 40.788616 40.669884 127
18 40.788630 40.653306 135
20 40.786386 40.647694 139

3.2. Network training

The essence of BP neural network is multi-layer feedforward neural network [17], which is fitted using the steepest descent method and its variants. It is highly adaptive and can directly learn and store a large number of input–output mapping relationships. It is suitable for solving various intrinsic complex problems and can adapt to complex nonlinear mapping. Based on the sample data, the relationship between data is summarized in the output layer. The weights and thresholds of each layer are continuously adjusted and modified by back-propagation to bring the error between the output result and the expected value down to less than a preset value [18].

BP neural network is suitable for analyzing sample data of SAW micro-pressure sensors. The model topology of the BP neural network consists of the output Layer, the input Layer, and the hidden Layer [19]. Fig. 2 shows the basic model of a typical three-layer BP neural network.

Fig. 2.

Fig. 2.

Model structure of BP neural network.

In the forward propagation process of BP neural network, Pmeans the input information and Q represents the output information in each layer. The corresponding connection weight between the input layer and the hidden layer is Wih. The corresponding connection weight between the hidden layer and output layer is Who. The threshold of inner neurons in the hidden layer is represented byKm and the activation function isf (.). The threshold of inner neurons in the output layer is represented byKnand the activation function isg(.). The input information of input layer I is the amount of frequency variation when the sensor is under load and also the input information of the entire network.

It is the same as the output information of the input layer and can be expressed as:

Pi=Qi=(Δf1,Δf2,Δf3,,ΔfA) (1)

The input and output information of the hidden layerHare the set of frequency variation:

Pih=i=1AWih×QiKmh=1,2,,B (2)
Qh=f(Pih)h=1,2,,B (3)

Through the weight coefficient of the frequency variation between the input layer and the hidden layer and the relationship with the threshold, the output of the hidden layer is obtained. That is the input of the output layer. According to the basic principle of BP neural work, set the weight coefficient and the threshold [20].

Similarly, the input and output information of output layer O are:

Pho=h=1BWhoQhKn0=1,2,,C (4)
Qo=g(Pho)o=1,2,,C (5)

Similarly, in this process, the output layer output is obtained by the weight coefficient of the frequency variation between the hidden layer and the output layer and the relationship with the threshold. That is the entire output of the network.

On the basis of the actual testing data of the SAW micro-pressure sensor, we select a total of 10 nodes in the loading range of 0–20 g. That is, the number of training sample m is equal to 10. So let the desired output d of the network structure equal to (d1, d2, d3, ···, dC). The actual output is Fo = Qo = (F1, F2, F3, ···, FC).

Where the output parameter F0 of the output layer is the load force of the sensor.

The error function E of the entire network can be expressed as:

E=12o=1C(doFo)2 (6)

During the back propagation of the error signal, the network derives the steepest descent direction, so that after weight each update the actual output of the network approaches the expected output. Therefore, it is necessary to solve the error value from the output of each layer with neurons network.

The local error signal for output layer O is defined as:

δo=EPho=EFoFoPho (7)

According to formulas (4) and (6), we can get:

EFo=o=1C(doFo) (8)
FoPho=g(Pho) (9)

The local error signal of the output layer O can be expressed as:

δo=g(Pho)o=1C(doFo) (10)

The local error signal of hidden layer H is defined as:

δh=EPih=EQhQhPih (11)

From the formula (3), (6), we can get:

EQh=Qh[12o=1C(doFo)2]=o=1C(doFo)FoQh (12)
FoQh=FoPhoPhoQh=g(Pho)Who (13)

Therefore, the local error signal of hidden layer H can be expressed as:

δh=EPih=g(Pho)Whaf(Pih)o=1C(doFo)=δoWhaf(Pih) (14)

Adjust the weight of BP neural network of neurons in each layer. According to error gradient descent method, the positive direction of the weight modified method is equal to the negative direction of error gradient. That is to say: there is a positive correlation between the negative gradient of the error and the modified amount of the weight. According to the formula (5), (9), (12), the modified formula of the weight of the hidden layer H and output layer O, can be respectively represented as:

ΔWho=ηEWho=ηEPhoPhoWho=ηδoQh (15)
ΔWih=ηEWih=ηEPihPihWih=ηδhQi=ηQiδoWhof(Pih) (16)

where η > 0 is the learning rate. The weight modified amount iterates and updates the BP neural network, the weight update formula of which is as follows:

Who(n+1)=Who(n)+ΔWho (17)
Wih(n+1)=Wih(n)+ΔWih (18)

where Who(n + 1), Wih(n + 1) represent the modified value of each layer of neurons in the (n + 1)th iteration. Who(n) and Wih(n)represent the modified value of each layer of neurons in the n-th iteration calculation. Due to the continuous forward-propagation and back-propagation of signal, the weight and threshold are modified multiple times. When the error of the output result is reduced in the desired range, or the number of training steps meets the anticipation, finishing the learning process.

4. Fitting analysis

4.1. Least squares method for solving linear regression model

This paper sets experimental data sample (Fi, Δf i,i = 1, 2...n) according to the previous linear regression analysis. Based on the results of previous studies, let n be equal to six. The mathematical model between the input and the output parameters of SAW micro-pressure sensor can be expressed as:

Fi=k0+k1Δfi+k2Δfi2+k3Δfi3+k4Δfi4+k5Δfi5+k6Δfi6 (19)

Using the least squares method to solve the unknown parameters inside the model can be calculated in an easier way. Minimizing the sum of the squares of the errors between these calculated parameters and the actual parameters can reach the lowest value within the range of sample data [21]. Further, we can obtain the regression coefficient k0 - k6. Using Polyfit function in MATLAB to achieve it and calculating the average value obtained by multiple measurements of the sample data, the fitted curve of the loading force and frequency difference of the SAW micro-pressure sensor is shown in Fig. 3.

Fig. 3.

Fig. 3.

Result of least squares method fitting.

The red hollow points represent the experimental data of the frequency difference and pressure in the coordinate system. And the blue segment is the fitted polynomial curve. The red hollow points in the figure are distributed around the curve. The more accurate fitting curve can be obtained.

4.2. Training and prediction of BP neural network

The calculation of BP neural network runs through the entire path from the input layer to the output layer. The training step size of the network is the core link in the model fitting process. The larger the step size, the faster convergence rate; otherwise, oscillation can happen, resulting slower convergence. In order to prevent the network from falling into the local optimal solution prematurely, we add a “Momentum Item” while setting the number of training steps reasonably. According to the connection weight update theory of the weight adjustment amount iterating and updating BP neural network, the momentum term is expressed as:

Who(n+1)=Who(n)+ΔWho+α[Who(n)Who(n1)] (20)
Wih(n+1)=Wih(n)+ΔWih+α[Wih(n)Wih(n1)] (21)

where the term including parameter α in the formula is the momentum term. In the process of weight correction, the momentum term can introduce stability, which accelerates the rate of error back propagation under standard conditions. And α is the smoothing factor. The value range is 0 < α < 1.

According to the actual data measured in the testing data of SAW micro-pressure sensor, select the more stable and regular data as the training sample. The sample input is the frequency variationΔf of the output signal of the SAW micro-pressure sensor. The sample output target value is the external micro-pressure F carried by the sensor. Therefore, the curve represents the two-dimensional graph with point coordinates, which is (Δf, F). The number of neurons in the input and output layers is 1. The number of neurons in the hidden layer is 11. The function tansig is used as the activation function of the hidden layer. The function purelin is used as the activation function of the output layer. The trainbr algorithm set in the training function is modified based on the trainlm algorithm to strengthen the generalization ability of network. The network error target is set to 0.1 for the least squares method for the fitting results of multiple sets of sample data, and multiple sets of sample data are used to train the network continuously. The error signal of back-propagation ensures the network to continuously adjust the weight and the threshold. When the output result maximizes the approximation to the target value, the training process could be ended. The training results are shown in Fig. 4.

Fig. 4.

Fig. 4.

Result of BP neural network fitting.

The convergence of the training samples is due to the components of the weight vector running in the direction of descent gradient. Considering the capacity of the sample data, the number of training steps is set to 500. And in Fig. 5, when the number of training steps reaches the 22nd step, the error is 0.071251. The network model achieves convergence.

Fig. 5.

Fig. 5.

Convergence steps of BP neural network.

4.3. Numerical comparison

This paper uses the MATLAB software to compare and analyze the same set of sample data through BP neural network and the least squares method. The curve fitting results are showed in Figs. 3 and 4. The frequency difference corresponding to the loading force is discretely distributed. On one hand, it describes the trend of the output variable of the SAW micro-pressure sensor in the sample interval. On the other hand, it presents the output variable of the sensor corresponding to any point in the sample interval. By comparing the two figures, we conclude that the BP neural network and the least squares method display similar trend in the fitted curve. Therefore, it is reasonable to set the parameters of the neural network model and select fitting times of the least square method. However, the local trends of the fitting curve obtained by the two methods are different.

The predicted value of the sample point can be obtained from the fitting results. Based on the mean square error expression, we can calculate the global error between the predicted value and the expected value of the sample points. The global error is:

MSE=1Ni=1N(diFi)2 (22)

In the formula, the parameter N is the sample size, di is the expected output value of the SAW micro-pressure sensor and Fi is actual output value. MSE is a way to evaluate the performance across whole change of data. After the sum of the squares of the difference between the predicted and actual values of the data, it calculates mean. MSEmeans the degree of similarity between the actual value and the predicted value of the data. The larger the value of MSE, the worse the accuracy of the model for the data prediction, and vice versa. BP neural network is MSEBP = 0.0713, Least squares method hasMSEL = 0.1476. It can be seen that the BP neural network predicts the overall error of the output variable of the SAW micro-pressure sensor, which is smaller than the least squares method.

To further verify the accuracy of the BP neural network trained, we can carry out local error analysis of the predicted values in the same sample data. Let Fa be the sample output predicted value and F is the sample output expected value. The predicted output error percentage RE obtained from the two methods is calculated as:

RE=(FFa)Fa×100% (23)

The error and error percentage of the two methods are shown in Table 2 and the error distribution curve is shown in Fig. 6.

Table 2.

Prediction local error of BP neural network and least square method.

Pressure F(g) Least squares predicted error (g) RE 100% BP neural network predicted error (g) RE 100%

0 0.0169 1 −0.2733 1
2 1.8475 −8.26 2.0880 4.22
4 4.1520 3.66 3.7531 −6.58
6 6.3413 5.38 6.2956 4.70
8 7.3519 −8.82 7.6684 −4.32
10 10.5162 4.91 10.1217 1.20
12 12.3475 2.81 12.2066 1.69
14 13.5539 −3.29 13.7369 −1.92
16 15.5873 −2.65 15.9453 −0.34
18 18.4913 2.66 18.4177 2.27
20 19.7941 −1.04 19.6274 −1.90

Fig. 6.

Fig. 6.

Prediction error and percentage of BP neural network and least square method.

Researching on the relationship between the input and output variables data of the SAW micro-pressure sensor, the smaller the relative error of the sample point prediction, the higher the accuracy of the micro-pressure sensor. As can be seen from Fig. 6 and Table 2, the absolute value of the percentage of the least squares local error reaches more than 8% in many places, indicating that the predicted error in this range is large. Although there are many areas with a small percentage of error, the stability is insufficient and the mean is above 4.3%. In contrast, for the BP neural network, there is only one place reaching 6% within the error percentage of the predicted output and the mean is only about 2.9%. Through that sample data, compared with the least squares method, BP neural network has higher precision, which is used to predict the SAW micro-pressure sensor.

With BP neural network model constructed and the least squares method in the same term, this paper predicted and analyzed multiple sets of sample. The conclusions obtained are completely consistent with the above analysis. It turns out that the least squares method achieved the minimum predictive error by solving the linear regression model. The errors are in the range of the algorithmic limitation. At the same time, the BP neural network model constructed can simulate the expert’s empirical thinking and predict the output micro-pressureFcarried by the SAW micro-pressure sensor. It is superior to the least squares method whether the overall error aspect of the fitting curve or the accuracy of the predicted output. For the SAW micro-pressure sensor, there is a significant improvement in accuracy. In addition, the model constructed can quickly converge during the training process, which meets the needs of practical applications.

5. Conclusion

In this paper, BP neural network was used to predict the SAW micro-pressure sensor’s loading force corresponding to the frequency difference. On the basis of the actual measuring data, the BP neural network and the least squares method were applied to fit the function relationship and predict the output variable in MATLAB software. Due to the capability of BP neural network, including nonlinear printing capability, strong self-learning, self-organization and fault tolerance, the network training has strong stability and the predicted results are more precise. At the same time, the change of the state of the sensor’ frequency variation in the network is closely related to the setting of the network parameters, which is also the core link in the design process. The fitting results of the sensor’ input and output variables by two methods showed that the model constructed by the BP neural network method was better than the least squares method in the overall error and local error, which has better accuracy and fast convergence speed. It is of great significance to explore the functional relationship between input and output data of the SAW micro-pressure sensor.

Acknowledgments

The authors would like to express their gratitude to the National Natural Science Foundation of China (61803254) for the financial support provided for this work.

Footnotes

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References

  • [1].Smm Q, Swo F, Takahashi VL, et al. , Passive downhole pressure sensor based on surface acoustic wave technology, Sensors 17 (7) (2017) 1635-. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [2].Vu N, Corinna K, Ulrich S, et al. , Single interdigital transducer approach for gravimetrical SAW sensor applications in liquid environments, Sensors 17 (12) (2017) 2931. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [3].Li Y, Lu W, Zhu C, et al. , Finite element analysis of surface acoustic wave based on a micro force sensor, Measurement 65 (2015) 112–119. [Google Scholar]
  • [4].Liu B, Zhang C, Ji X, et al. , An improved performance frequency estimation algorithm for passive wireless SAW resonant sensors, Sensors 14 (12) (2014) 22261–22273. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [5].Zheng Z, Han T, Qin P, Maximum measurement range and accuracy of SAW reflective delay line sensors, Sensors 15 (10) (2015) 26643–26653. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [6].Mohankumar P, Ajayan J, Yasodharan R, et al. , A review of micromachined sensors for automotive applications, Measurement 140 (2019) 305–322. [Google Scholar]
  • [7].Della Lucia F, Zambrozi P, Frazatto F, et al. , Design, fabrication and characterization of SAW pressure sensors for offshore oil and gas exploration, Sens. Actuators A Phys. 222 (2015) 322–328. [Google Scholar]
  • [8].Cakir Süleyman, Measuring logistics performance of OECD countries via fuzzy linear regression, J. Multi-Criteria Decis. Anal. (2016). [Google Scholar]
  • [9].Akhlaq M, Sheltami TR, RTSP: an accurate and energy-efficient protocol for clock synchronization in WSNs, IEEE Trans. Instrum. Meas. 62 (3) (2013) 578–589. [Google Scholar]
  • [10].Sun Lei, Signal-dependent noise parameter estimation of hyperspectral remote sensing images, Spectrosc. Lett. 48 (10) (2015) 717–725. [Google Scholar]
  • [11].Hongzhi T, Michael N, Analysis of regularized least squares for functional linear regression model, J. Complexity (2018:), S0885064X18300633-. [Google Scholar]
  • [12].Suah FBM, Ahmad M, Taib MN, Optimisation of the range of an optical fibre pH sensor using feed-forward artificial neural network, Sens. Actuators B Chem. 90 (1–3) (2003) 175–181. [Google Scholar]
  • [13].Hu F, Wang L, Wang S, et al. , A human body posture recognition algorithm based on BP neural network for wireless body area networks, China Commun. 13 (8) (2016) 198–208. [Google Scholar]
  • [14].Sujan Y, Uma G, Umapathy M, Design and testing of piezoelectric resonant pressure sensor, Sens Actuators A 250 (2016) 177–186. [Google Scholar]
  • [15].Jagannath D, Paul O, David GSAW, Sensors for chemical vapors and gases, Sensors 17 (4) (2017) 801-. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [16].Elhosni M, Elmazria O, Petit-Watelot S, et al. , Magnetic field SAW sensors based on magnetostrictive-piezoelectric layered structures: FEM modeling and experimental validation[J], Sens. Actuators A 240 (2016) 41–49. [Google Scholar]
  • [17].Li Z, Zhao X, BP artificial neural network based wave front correction for sensor-less free space optics communication, Opt. Commun. 385 (2017) 219–228. [Google Scholar]
  • [18].Li J, Zhang W, Zeng W, et al. , Estimation of stress distribution in ferromagnetic tensile specimens using low cost eddy current stress measurement system and BP neural network, PLoS ONE 12 (11) (2017), e0188197. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [19].Mahani M, Sepehrian H, Shaikhghomi H, et al. , Determination of the surface area of mesoporous silicates by X-ray diffraction patterns using partial least squares and multiple linear regressions, Part. Sci. Technol. (2015), 150904041047004. [Google Scholar]
  • [20].Ma L, Wang B, Yan S, et al. , Temperature error correction based on BP neural network in meteorological wireless sensor network, Int. J. Sens. Net. 23 (4) (2017) 265. [Google Scholar]
  • [21].Yang W, Wang Y, Hu S, Some probability inequalities of least squares estimator in nonlinear regression model with strong mixing errors, Commun. Stat. Theory Methods (2016). [Google Scholar]

RESOURCES