# Temperature Drift Compensation for High-G MEMS Accelerometer Based on RBF NN Improved Method
## 3 Model and Algorithm
### The Algorithm of RBF NN  
RBF is a non-negative and non-linear function with local distribution of center points and symmetric attenuation of radial center points. The local distribution of center point means that when the input is in a specified small area, the RBF of the hidden unit will achieve a meaningful non-zero response. Radial symmetric attenuation means that the response of RFB depends on the input point closer to the center of the RBF. The closer the input point is to the center of RBF, the more sensitive the output variable is, and the stronger the generated output signal can be.  
A hidden layer of neural work is introduced into the RBF, and then RBF NN is established. RBF NN has a similar neural network structure as other forward neural networks. The RBF neural network has only three layers, and each layer structure has its own unique characteristics. As shown in Figure 5, it has a perceptual-associative-response structure. Compared with other neural networks, RFB neural network has advantages of strong classification ability, simple optimization process, and  
Figure 4: The framework of the temperature drift model.  
fast learning speed. When the RBF NN has more hidden layer neuron nodes, it has a stronger computing ability, mapping ability, and better function approximation ability, so it can approach a complex function curve with arbitrary precision [20].  
The basis function of RBF NN is shown in Equation (3).  
\[\alpha_{j}(x)=\psi_{j}(\left\|x-c_{j}\right\|/\sigma_{j}) \tag{3}\]  
where \(a_{j}\left(x\right)\) is a radial basis function, \(\mid\mid\mid\mid\mid^{2}\) is an exemplary number, usually taken as the Euclidean norm, \(c_{j}\) is the center point of the function in \(j\), \(\sigma_{j}\) is the breadth of the hidden layer neuron around the basis function, \(\mid\mid x-c_{j}\mid\mid\) is the Euclidean distance from x to \(c_{j}\), \(\psi_{j}\) has a maximum value at \(c_{j}\), which is a radially symmetric function. When \(\mid\mid x-c_{j}\mid\mid\) increases, \(\psi_{j}\) decreases to zero quickly. For the determined value of \(x\), only a few processing elements that is near the center can be activated.  
Generally, there are three types of radial basis functions: Gaussian functions, multiple quadratic functions, and wavelet functions. Gaussian functions are the most commonly used, shown in Equation (4).  
\[a_{j}(x)=\psi_{j}(\left\|x-c_{j}\right\|/\sigma_{j})=e^{-\frac{\left\|x-c_{j} \right\|^{2}}{2\sigma_{j}^{2}}} \tag{4}\]  
The network output of the RBF NN is shown in Equation (5).  
\[y=W\alpha(x)\text{ or }y_{i}=\sum_{j=1}^{m}w_{ij}\alpha_{j}(x),i=1,2,\cdots,r \tag{5}\]  
where \(w_{ij}\) is the connection weight between the _i-th_ hidden layer node and the _j-th_ output layer node.  
The learning algorithm with weights is shown in Equation (6).  
\[w_{ij}(l+1)=w_{ij}(l)+\beta[y_{i}^{d}-y_{i}(l)]\alpha_{j}(x)/\alpha^{T}(x) \alpha(x) \tag{6}\]  
where \(\beta\) is the learning rate. In order to improve the convergence performance of the iterative learning algorithm, the range of \(\beta\) is 0 to 2.  
During the training process of the algorithm NN, when \(x\) is far away from \(c_{j}\), the output of \(\alpha_{j}(x)\) is also nearly close to 0 when passing through the linear nerve of the second layer. The value of the corresponding weight will also be affected, if the value of \(\alpha_{j}(x)\) is more than a value such as 0.06.  
Figure 5: Model of radial basis function neural network.  
When \(x\) and \(c_{j}\) become very close (almost nearly zero), the output of the layer is almost equal to 1, and when passing through the second layer, the output value is almost equal to the weight value of the second layer. After such training, RBF NN was found to offer fast learning speed on the local network.