Temperature Effects and Compensation-Control Methods

In the analysis of the effects of temperature on the performance of microgyroscopes, it is found that the resonant frequency of the microgyroscope decreases linearly as the temperature increases, and the quality factor changes drastically at low temperatures. Moreover, the zero bias changes greatly with temperature variations. To reduce the temperature effects on the microgyroscope, temperature compensation-control methods are proposed. In the first place, a BP (Back Propagation) neural network and polynomial fitting are utilized for building the temperature model of the microgyroscope. Considering the simplicity and real-time requirements, piecewise polynomial fitting is applied in the temperature compensation system. Then, an integral-separated PID (Proportion Integration Differentiation) control algorithm is adopted in the temperature control system, which can stabilize the temperature inside the microgyrocope in pursuing its optimal performance. Experimental results reveal that the combination of microgyroscope temperature compensation and control methods is both realizable and effective in a miniaturized microgyroscope prototype.


Introduction
In recent years, the silicon microgyroscope has been used as a kind of inertial device for measuring the angular velocity of an object's motion [1][2][3]. As is known, it has the merits of small volume, light weight, high reliability and low cost, and it is easy for digitization and intellectualization and suitable for mass production. However the precision and stability of microgyroscopes are prone to be affected by its material of construction, manufacturing technology and other factors such as the temperature of the ambient environment, which could cause the serious drawbacks of low precision and even errors.
Owing to the expansion and centralization in material dimension over temperature, the stiffness of the silicon microgyroscope will change with temperature variation. According to the kinetic equation of the gyroscope, the resonant frequency of a microgyroscope is relevant to the sensitivity and stability as well as its dynamic characteristics, therefore temperature variation has significant impacts on both the output sensitivity, the stability and the dynamic characteristics of microgyroscopes, potentially resulting in a great temperature drift of the entire system.
In [4], the temperature error mechanism of gyroscope caused by Brownian noise was analyzed in detail; the Brownian noise is engendered by gas molecule collisions and the viscous elastic effects of the supporting structure. In [5,6], the temperature error mechanisms of the tuning type and the angular vibrating types of microgyroscopes were analyzed in terms of systematic Brownian noise, however Brownian noise mainly determines the resolution ratio of the gyroscope but has little impact on the zero bias error. In [7], systematic identification was accomplished through some testing methods, and the mechanism of gyroscope temperature error was mainly analyzed in terms of the structural resonance frequency variation caused by temperature changes. In [8], the temperature model of a silicon gyroscope was deduced from the point of view of the Seebeck effects of the silicon material, but only the temperature error caused by Young's modulus changes over the temperature variation were discussed. In [9], the modeling of detection capacitance analysis for a tuning fork vibratory microgyroscope fabricated by bulk silicon micromachining was presented, and the deviations of the frequencies and dynamic characteristics were accurately calculated, which provides a reference for the design of a temperature compensation method and a robust structural design for microgyroscopes. In [10], the temperature dependent drift and the noise characteristics of the packaged silicon MEMS gyroscopes are thoroughly investigated. The resonant frequency, quality factor, AGC voltage and signal drifts were all subjected to various temperature environments from −60 °C and +60 °C. However, no schemes for effective temperature compensation were suggested.
Above all, the performance of a microgyroscope is greatly affected by the power consumption and ambient temperature variation, and the effect of environmental temperature becomes one of the most important sources of error in microgyroscopes. Therefore some effective measures should be taken to reduce the influence of temperature, including temperature compensation and temperature control, which should be both efficient and feasible for improving the precision and stability of the microgyroscope.
Two different methods are proposed in this paper. The first one is a temperature compensation method, the other one is the temperature control method. For the temperature compensation method, a temperature drift model of the microgyroscope is constructed first. It is then used to estimate the current zero bias which is then subtracted from the actual output to obtain the compensated output of the microgyroscope. As for the temperature control method, a microprocessor is employed to stabilize the temperature inside the gyroscope casing.

Temperature Effects on the Performance of Microgyroscopes
In this paper, the symmetrical and decoupled microgyroscope used is essentially a two linear vibratory gyroscope to detect rotation angular rate with the oscillating components. Its simple model can be described as a total four DOFS system including proof mass, drive component, sense component, and damping elements. Figure 1 shows the package and SEM photos of the structure. The Coriolis dynamic equations of Z-axis microgyroscope is: where m x and m y denote the mass of the driving and sensing segments of the microgyroscope, respectively. D x denotes the damping coefficient of the flexible shaft connecting the substrate and the drive frame, D y denotes the damping coefficient of the flexible shaft connecting the substrate and the sense frame. K x is the spring coefficient of the flexible shaft connecting the substrate and the drive frame, K y is the spring coefficient of the flexible shaft connecting the substrate and the sense frame. ω z is the angular rate around the Z-axis. F e = F d sinω d t and F d represents the amplitude of the electrostatic driving force, ω d indicates its angular frequency. According to the kinetic equations, ignoring the crosstalk interference terms, Equations (1) and (2) can be simplified to the following kinetic equations: where ς x = D x /2m x ω x and ς y = D y /2m y ω y denote the damping ratios of drive axis and the sense axis of the microgyroscope, respectively.
Various factors can impact the performance of microgyroscope, including the changes of the characteristics of its material, and variations of the electrical characteristics of its peripheral circuit.
Noticeably, temperature has a remarkable influence on various aspects, including the resonant frequency, the quality factor and the zero bias.

Temperature Effects on the Resonant Frequency of a Silicon Gyroscope
Considering that the substrate of the microgyroscope is glass, and its supporting beam is made of monocrystalline silicon, the Young's modulus changes with the temperature variation, so their relationship can be expressed as: where K E ≈ −5 × 10 −5 N/MT denotes the temperature coefficient of the silicon material, E 0 is the temperature coefficient of monocrystalline silicon at Kelvin temperature. Meanwhile, a strain exists between the supporting beam and the substrate owing to the difference in thermal dilation coefficient among different materials, thus the strain quantum can be expressed as: where α s , α g are the thermal expansion coefficients of monocrystalline silicon and glass respectively, ΔT is the variable temperature. Therefore the variable quantity of residual stress is: where ν denotes the Poisson ratio of the monocrystalline silicon.
The relationship between the natural frequency and the Young's modulus, as well as the residual stress of the supporting beam, can be expressed as [11]: where E denotes the Young's modulus of the silicon material, σ denotes the residual stress, h and L 1 denote the height and the length of the structure respectively, m denotes its mass, A denotes the area of structure, and W denotes the stability index. From the above analysis, the Young's modulus E and the residual stress σ are proportional to the temperature variation. Moreover it can be seen in Equation (8) that the resonant frequency is positively correlated with E and σ. Therefore it can be deduced that the resonant frequency of a microgyroscope has a proportional relation with temperature changes.

2.2.Temperature Effects on the Quality Factor of a Silicon Gyroscope
According to [12], it is supposed that only a rarefied gas will provide the main damping, thus the quality factor of the system is: where M p = Ahρ is the mass of the electrode plate, A, h, ρ denotes the area, thickness and density of the electrode plate respectively. C γ = 4√(2/π)√(M/RT)·PA is the damping coefficient of the rarefied gas in the free gas molecule mode. M is the gas mol mass. R = 8.31 kg·m 2 /sec 2 /K is the generalized mol constant of gas, P is the gas pressure. In this vacuum packaged microgyroscope, given that the volume of gas is fixed, according to Charles's rule: P/T = Constant, the quality factor of the system is: where C is a given constant, the relationship between quality factor Q and temperature can be seen directly through the Matlab simulation shown in Figure 2.

Temperature Effects on the Sensing Output of a Silicon Gyroscope
The vibrating displacement in drive mode of the microgyroscope is: According to [13], the resonant frequency ω x and damping coefficient b 1 in drive mode of microgyroscope are proportional to the temperature. Thereby the amplitude of vibrating displacement is negatively correlated to the temperature, that is, the amplitude of vibrating displacement in drive mode decreases when temperature increases, which can be seen from the simulation shown in Figure 3. Similarly, the vibrating displacement in sense mode is: (12) where ω y denotes the resonant frequency and b 2 the damping coefficient. Similar to the simulation in drive mode, the vibrating amplitude in sense mode is negatively correlated to temperature.

Temperature Characteristics of a Microgyroscope
In order to determine the actual effects of temperature on the performance of a gyroscope, a vacuum encapsulated microgyroscope named B34 was adopted, and relevant experiments designed and carried out to verify the above theoretical analysis.
First of all, an open-loop driving circuit was adopted to drive the microgyroscope for testing its resonant frequency and the quality factor under the circumstances of the temperature varying from -40 °C to 60 °C. The waveform generator provides the sinusoidal signal to drive the microgyroscope. Figure 4 shows the setup of the temperature experiment. The microgyroscope in the temperature control box is driven by an open-loop driving circuit. Its output is connected to a spectrum analyzer and oscilloscope, respectively. The oscilloscope exhibits the displacement waveform of the vibrating capacitance while the spectrum analyzer shows its corresponding spectrum output. Figure 4 where n d denotes the number of drive combs; ε 0 denotes the dielectric constant; h is the thickness of comb; d denotes the distance between two adjacent combs while L is the length of their overlapping part; x = A x sin(ωt + θ) is the displacement in drive mode. The drive signals V d ± V a sin(ωt) are symmetrically applied on the drive electrodes to get the testing output V td across the feedback resistor R ts at the common electrode. 1 2 In Equation (13), the second part of V td , i.e., the double-times frequency component, is relevant to the vibrating amplitude A x . By sweeping the frequency ω of drive voltage, the frequency response of vibrating amplitude can be recorded, so its peak of the frequency response is just the resonant frequency ω d , and its quality factor Q can be computed by ω d /ω −3db (−3 db declining frequency bandwidth). During the course of measurement, the microgyroscope and the circuit are statically mounted. The temperature value in the temperature control box rises from -40 °C to 60 °C in 10 °C intervals. The temperature at each sampling point is maintained for sixty minutes before testing to ensure that the temperature in the box is uniformly distributed and the microgyroscope is fully heated. In this way, any difference between the inner and outer temperature of the microgyroscope casing can be effectively reduced. The testing results are provided in Table 1. The changing trends of gyroscope's resonant frequency and quality factor with temperature variation can be seen in   According to the data in Table 1 and Figure 5 and 7, the resonant frequency of the microgyroscope descends linearly while the temperature increases, and its variable magnitude is within 10 Hz from -40 °C to 60 °C. It is noticeable in Figures 6 and 8, that the quality factor changes drastically under the low temperature circumstance, much higher than that of normal temperature. Moreover its changing tendency mitigates when the temperature climbs higher than 30 °C. The reason for this phenomenon is that most of the little residual gas is absorbed under low temperature, and it is released when the temperature increases. However, only a little gas is absorbed in the vacuum packaged gyroscope, therefore the quality factor varies slowly as only a little gas is released when temperature increases.
The second step is to test other performances of the same microgyroscope by the closed-loop driving circuit. According to the prior art [14], the closed-loop circuit can realize the automatic tracking of the resonant frequency drift of the microgyroscope with temperature in drive mode. Figure 4(c) shows a schematic of the closed-loop drive circuit. The variation of the vibrating capacitance in the drive-combs is converted to the corresponding voltage V d by C/V converter, and then its amplitude can be stabilized via the automatic gain controller (AGC) module. The feedback signal is further amplified to drive the drive+ combs. In sense mode, the capacitance variations of sense+ and sense-combs are simultaneously converted to voltage, and the differential value is demodulated and filtered through the low-pass filter to get the V out . V d is changed by the phase shifter and used as reference by the demodulator. The thermal features of its vital parameters such as the zero drift and the output amplitude should be the primary consideration. During this phase, when the microgyroscope is held still, the amplitude of drive circuit [testing point A shown in Figure 4(c)] at normal temperature and varying temperature are tested, respectively, and the zero bias of microgyrosocpe [testing point B shown in Figure 4(c)] is tested over temperature changes. Firstly, five groups of zero microgyroscope bias are recorded, respectively, at normal temperature under the same conditions. The test began from the start-up time once the microgyroscope is powered on, and a 30-minute interval is set between each successive group. From the results shown in Figure 9, it is obvious that the drive circuit takes a relatively long time to heat up and reach the thermal equilibrium state. Secondly, the microgyroscope is placed in the temperature control box, and its closed-loop driving amplitude and zero bias are measured, respectively, as the temperature rises from -40 °C to +60 °C in 20 °C steps. The temperature is then kept for one hour at every test point, which can ensure that the microgyroscope is fully heated and the temperature field inside the microgyroscope is homogeneously distributed.  During the temperature experiments, the mirogyroscope is placed still in the temperature control box. At each temperature point it takes one hour to reach thermal balance before the recording of the zero bias of the microgyroscope. Each sampling point is recorded for sixty minutes. Then the average output of the microgyroscope at each temperature point is calculated, so the overall trend of closedloop drive amplitude and zero bias over temperature changes can be shown as in Figures 11 and 13. In general, the testing results agree well with the analysis of Equations (11) and (12). From the above testing experiments, we can acquire some important knowledge about the thermal characteristics of microgyroscope designed in the laboratory, which could provide useful help for further compensation and temperature control.

Temperature Compensation Modelling Methods
According to the analysis discussed in Section 2 and the testing results in Section 3, the temperature variation has multiple effects on the performance of a microgyroscope. Consequently the zero drift and the scale factor of gyroscope's output fluctuate with temperature variation, resulting in impairments of the precision and the stability. Therefore, it is necessary to conduct the research on temperature compensation and temperature control for the microgyroscope. In this paper, the BP neural network model and the polynomial fitting for compensation are proposed, then the former method is simulated by Matlab tools, and the latter one is applied in the actual system because of its simplicity and effectiveness. Finally, considering that the temperature compensation could not suppress the zero bias drift completely, an effective temperature control system is adopted to minimize temperature impacts on the gyroscope's performance.

BP Neural Network Modeling Compensation
BP (Back Propagation) neural networks are widely applied in function approximation, pattern recognition, classification and data compression [15][16][17]. It is a kind of forward neural network with multi layers in the one-way transmission, and generally has the hidden layers and output-layer. BP neural networks have the advantages of nonlinear fitting and mode identification capability, regardless of the mathematical model of the sensors and various nonlinear factors. Its structure is comparatively simpler than other types of artificial neural networks. Moreover it is self-adaptive in constructing a mathematical model after several repetitive learning and testing phases. Thus with the help of BP neural network, it is feasible and effective to obtain a high-precision simulation model without knowing exactly the heat conduction mechanism inside the microgyroscope.
The number of the adopted neurons and the hidden layers mainly depends on the complexity degree of the issue to be solved because BP neural networks require that the transfer function can be differential everywhere. The Sigmoid activation functions (tan-Sigmoid, log-Sigmoid and linear-Sigmoid) are usually adopted as the transfer function, and the linear function is regularly used as the output layer. Furthermore, each node in this structure has close-value function, and the weighted effects of upper layer are transmitted to lower layer through the transfer function.
The essence of nonlinear fitting by BP neural networks is that through self-studying the BP neural network can determine the corresponding relationship between the input and output, which is memorized as a connecting weight value in the network. Therefore the BP neural network structure adopted for temperature modeling and compensation can be selected as follows: first, the original sampled data, i.e., the zero bias over the temperature is normalized. Next, since it aims to build the model between temperature T and zero bias V bias , each input and output layer is selected with only one neuron. To ensure the precision of the curve fitting, more hidden layers with more neurons are required, however, on the contrary, this will add excessive computing to reach the learning and testing phases. Besides, it may affect the convergence rate and cause unintended fitting errors in case of improper training. There is no exact rule governing the selection of a particular number of hidden layers and neurons, and three hidden layers are chosen through various simulation trials and each layer has ten neurons for trade off. The transfer function is connecting input layer with hidden layers, while that connecting hidden layer and output layer are pure linear Sigmoid function. This structure can provide a satisfactory convergence effects while speeding up the training procedure at the same time. The structure is shown in Figure 14, w i (i = 1, 2, …, 10) is the weight value connecting the input layer and the middle layer, w' 1i (i = 1, 2, …, 10) is the weight value connecting the first and second hidden layer; w'' 2i (i = 1, 2, …, 10) is the weight value connecting the second and third hidden layer; v j (j = 1, 2, …, 10) is the weight value connecting the middle layer and the output layer. b ij (i = 1, 2, 3; j = 1, 2, …, 10) is the threshold value. f is the transfer function tan-Sigmoid, F is the transfer function linear-Sigmoid. Secondly, to speed up convergence and reduce the error, the trainlm function is adopted in the training. Taking the temperature as the input and the zero drift of microgyroscope as the output to train this network through the reversal Levenberg-Marquadt algorithm, with the maximum twelve training steps the training target error approaches 0.0001. As shown in Figure 15, the training target error results can basically meet the requirement after only training four times. Finally, all the trained networks weights and offsets are preserved as constant coefficients, thus the BP neural network of temperature model is successfully built up. The final simulation of the model is shown in Figure 16. After the network model is built, the current temperature is used as the input value to get the corresponding zero bias. Then it is subtracted from the actual output to attain the compensated zero bias of the gyroscope. In the Matlab simulation, the original temperature is substituted to get the compensated zero bias curve, which is obviously near zero and almost becomes a straight line approaching zero in Figure 16.
In order to verify the effectiveness of the compensating model, the gyroscope is put in the thermal control box, and the ambient temperature is controlled to increase from -40 °C to 80 °C by 10 °C step. At each temperature point the zero bias is recorded for thirty minutes, thus the compensated zero bias curve is attained through the built up line compensating model in the computer. As can be seen in Figure 17, the maximum absolute value of zero bias stability decreases remarkably, from 12.3310º/s to 0.756º/s, after compensation, which will provide a reference for comparison with other compensating methods.  Theoretically the BP neural networks modeling provides excellent results for the temperature compensation. However in the first place, massive calculation is incorporated so that it requires high processing capability of the microprocessor and a large database. Secondly, the network needs re-trained to update parameters once the input samples increase due to its poor generalization. Moreover it is relatively complex to implement real-time processing in current chosen microprocessors. Another way of building temperature model of microgyroscope is based on the numerical analysis of its actual output and corresponding temperature. Polynomial fitting has been widely applied in terms of numerical analysis, and the least mean square curve fitting is liable to get overall optimal results. Therefore the polynomial fitting method is proposed for simplicity and effectiveness, and compared to the BP network method, it can provide similarly satisfying compensating effects.

Polynomial Fitting
The main idea of the polynomial fitting compensation is as follows: the correlation between the temperature and the zero bias of microgyroscope can be found through experiments, and its mathematical expression can be obtained through polynomial fitting as the temperature is changed from -40 °C to 80 °C. The mathematical function is memorized in the microprocessor. Thus the corresponding compensation value for each real time temperature tested is calculated and subtracted in the actual output of gyroscope. Ultimately the final compensated zero bias of the gyroscope is attained.
While constructing the compensation model, special consideration must be paid to the precision, practicability and complexity of the model to satisfy the engineering requirements. With respect to the real-time performance of the compensating system and the control and operation capability of the C8051F360, the least mean squares (LMS) curve fitting is utilized as it is simple and easy for constituting the temperature model of the zero bias of gyroscope.
Using the high-order polynomial to describe the approximate function (regression equation) relationship of the experimental data (x i , y i ) (where x i denotes the input, and y i denotes the corresponding output, i = 1, 2, …, n), the following expression can be obtained: where V i denotes the error between the tested value and the result calculated by the regression equation. According to the LMS theory, the square of V i should be set to the minimum to obtain the optimum value of the coefficient a j : From which we can deduce the following canonical Equation (16): Then the linear equation for computing a 0 , a 1 , …, a m : The solution for Equation (17) is the optimum value for a j (j = 0, 1, …, m).
In the temperature experiments, the zero bias output of the gyroscope is recorded while the temperature increases from -40 °C to 80 °C in 5 °C intervals, which can be seen in Table 2 and Figure 18.
After fitting the experimental curve with the LMS theory, we can separate it into three segments to reduce the order of polynomial and minimize the error.
The fitted curve is shown in Figure 18: Figure 18. Fitted curve of zero bias of microgyroscope with temperature.

Design of the Temperature Compensation System
The temperature compensation scheme is shown in Figure 19. First of all, the developed miniaturized analog gyroscope works well. The uncompensated analog signal output of the gyroscope is first converted into a digital value by an ADS1251 AD converter (Texas Instruments Company). Meantime, the temperature value is measured by a DS18B20 digital temperature sensor (Dallas Semiconductor) and transmitted to a C8051F360 microprocessor (Silicon Labs Company) which is the core of whole system. The fitting polynomials are previously stored in the flash memory of the C8051F360 and used to calculate the compensation value in terms of the measured temperature, and then the compensated gyroscope signal is converted into analog signal by an AD5060 (Analog Device Company) and transferred out to become a analog gyroscope again. On the other hand, to realize a digital gyroscope, the successful compensated signal can be output to the host computer for further processing via UART (Universal Asynchronous Receiver Transmitter) directly. All the components are low power with high performance, which can provide high precision measurements and compensation. Figure 19. Diagram of the temperature compensation system.

Results of the Compensating System
Firstly the piecewise polynomial fitting equations are memorized in the microprocessor. Secondly the zero bias V bias for each temperature is calculated through the formula using the tested temperature T as the input. Finally the actual output of gyroscope is subtracted from V bias to get the compensated zero bias shown in Figures 20 to 22.   Firstly the uncompensated zero bias is recorded while the ambient temperature rises up from -40 °C to +80 °C. Secondly, the polynomial fitting is accomplished and the programs with the fitting equations are downloaded to the microprocessor. To verify the compensating effects, the same microgyroscope is placed in the temperature control box with no rotation and several groups of temperature experiments are carried out. In the first and second group, the ambient temperature is controlled to rise from -40 °C to +80 °C. Nevertheless in the third group the temperature descends from +80 °C to -40 °C to test the effectiveness of the model in case that ambient temperature decreases, the results show that the model can be effective when the ambient temperature descends. The compensation effects of each group are shown in Figures 20-22, respectively. The average value of the three groups of gyroscope zero bias tested is figured out with a temperature interval of 5 °C, and the processed results are shown in Table 3 and Figure 23. Table 2 and Figure 23, the compensated zero bias of microgyroscope fluctuates mildly around zero. According to Table 2 and Table 3, the maximum absolute value of zero bias decreases from 12.3310º/s before compensation to 0.608º/s after compensation. Therefore the compensation effect of the temperature compensation system is obvious and effective.

Design of the Temperature Control System and Experimental Results
As shown in Figure 23 in Section 5, with the help of the temperature compensation, the zero bias of microgyroscope still fluctuates within a small range with the ambient temperature variation. The temperature compensation system still cannot completely compensate for the temperature effects on the performance of the microgyroscope. Moreover because of the manufacturing errors and influences of peripheral circuit devices in different microgyroscopes, their temperature models are rather different. Therefore it is desirable to find a more universally applicable method to reduce temperature effects.
Through abundant experiments and previous experience, it is found that the optimal working temperature for the microgyroscope is about 55 °C. It is proposed that temperature inside the packaged gyroscope should be controlled around this optimal value in order to achieve the best performance of the microgyroscope. Therefore a temperature controlling system is proposed and its effects are analyzed in detail. The temperature control system adopts a single closed-loop method. The current temperature measured by a DS18B20 temperature sensor is sent to the microprocessor. Next the tested value is compared with the set temperature value to attain the deviation value. Then the PID adjuster calculates the control value, which is subsequently transformed by the driving circuit and applied on the thermoelectric cooler (a semiconductor chip). Finally the temperature inside the gyroscope cavity is controlled around the set value. The block diagram of temperature control system is shown in Figure 24.

System Design
A high-current integrated driving chip OPA548 (Burr-Brown Company) is employed for driving a TEC based on the Peltier effect. Its bipolar power supply mode is used to further amplify the power for the D/A converter AD5060, implementing power driving of the thermoelectric cooler (TEC) chip.

Temperature control algorithms.
The Integral-separated PID algorithm is employed for the temperature control to ensure the integral action and decrease the overshoot. Hence the controlling performance can be improved remarkably [18][19][20]. The sampled-data control of the microprocessor is only capable of calculating the control-value based on the sampling time, therefore the differential coefficient and integral function need dispersing processing before application. Hence the incremental PID control algorithm is utilized in the temperature control system.
To realize an efficient control, a threshold value ξ ＞ 0 is set beforehand, e(k) = c(k) − r(k) denotes the deviation between the actual temperature output c(k) and the set temperature value r(k). When |e(k)| ＞ ξ, PD (Proportion Differential) control mode is operated to avoid excessive overshoot and simultaneously ensure a fast response of this system. Otherwise, when |e(k)| ≤ ξ, PID control mode is operated to reach the system's control precision. In other words, the basic theory of integral-separated PID algorithms is that the integral part starts working only when the casing temperature error is within the set error-band.
In the math expression, the integral part is multiplied by β, which is set to 1 in case of |e(k)| ≤ ξ. Thus the control value can be expressed as: where A = K p (1 + T/T I + T D /T), B = K P (1 + 2T D /T), C = K P T D /T, and K p is the proportional coefficient.
2. Software design. Once the control system starts operation, the microprocessor will first send out the order to read the temperature. Next, the current temperature of the gyroscope T1 measured by the DS18B20 is transmitted to be compared with the set value T. Their difference is transferred in time to the PID controller. Then the control quantity calculated by the PID controller is then transformed to an analog voltage signal, which is subsequently amplified by the high current driving circuit to enhance its driving capability. Ultimately it is applied to the TEC to realize the heating or cooling function. In order to improve the control speed, integral-separated PID control was adopted in the program development. Namely a threshold value ΔT is set beforehand. When the difference between the current temperature tested in the gyroscope is higher than or equal to ΔT (0.5 °C), the PD control method will activate, otherwise the PID control mode is used instead. Figure 25 shows the designed gyroscope casing with the mounted TEC chip and software flow chart of the control system.
Due to the lag effect of the complex thermal inertial properties and inaccurate transfer function of the inner housing of the controlled gyroscope, through lots of experimental trial, the optimal control parameters of the controller module can be decided. In this case, when the proportional coefficient K p approaches 0.48, the integral coefficient K I =K p T/T I approaches 0.32, the differential coefficient K D = K p T D /T approaches 10, and the sampling interval time is set 2 s, the closed-loop temperature control system can performance well. If the temperature in gyroscope casing is lower than the given temperature of 55 °C, the TEC starts to heat up by a positive applied voltage, and heat is transferred from the external environment to the inner housing based on the Peltier effect, while if the temperature is higher than 55 °C, the TEC starts to refrigerate by a negative applied voltage, and cooling is then transferred from the inner housing to the external environment based on the same effect. Figure 25. Gyroscope casing design and system software flow chart.

Effects of Temperature Control System
To validate the effects of the temperature control system, the control circuit is integrated with the microgyroscope B34 investigated previously. The thermoelectric cooler (TEC) is wall-imbedded in the outside shell of the gyroscope. During the experiments, the ambient temperature is controlled by temperature control box, which descends from room temperature (16 °C) to −30 °C before rising up to 45 °C. The actual temperature inside the gyroscope and the environmental temperature are recorded and shown in Figure 26. the gyroscope prototype is placed still in the temperature control box, the ambient temperature is controlled to descend from the room temperature 16 °C to −30 °C before rising up to 45 °C. The zero bias of microgyroscope at each temperature point is recorded for sixty minutes. Figure 27 exhibits one of sixteen groups of compensated zero bias such as section D. Then the average output of the microgyroscope at each temperature point is accurately calculated, so the overall trend of zero bias over temperature changes can be seen in Figure 28.

Conclusions
The performance of a microgyroscope is greatly affected by temperature variations. In this paper the temperature testing results uncover the temperature characteristics of a microgyrocope, and validate the theoretical analysis. To improve the performance of the microgyroscope, two methods are simulated and carried out for comparison, and the experiment results demonstrate that polynominal fitting can meet the performance requirement when its term order is high enough.
In the actual developed miniaturized prototype, due to the simplicity and real-time advantage, the polynomial fitting is adopted to build the zero bias temperature model of the microgyroscope. The microprocessor compensates the actual output with the estimated value calculated by the model. The experimental results show the effectiveness of the temperature compensation system, which reduces the maximum zero bias from 12.3310º/s before compensation to 0.608º/s after compensation, which has the same order of magnitude obtained with the previous BP neural network.
In order to get the ideal working state of microgyroscope, a temperature control system is proposed to stabilize the temperature inside the casing of microgyroscope. Experimental results show that the temperature control method can effectively stabilize the temperature around 55 °C inside the integrated microgyroscope while the ambient is within −20 °C ~ +35 °C, and the maximum stable-state error can be smaller than 0.3 °C. However, to resolve the start-up time issue, a combination of the temperature compensation and controlling methods is used to ensure the overall performance over the full temperature range. By this effective way the gyroscope and its peripheral circuits are not subject to the ambient temperature fluctuations, so the entire output of the microgyroscope can be kept at a relatively stable state. Final experimental results validate the effectiveness of the temperature compensationcontrol methods of the microgyroscope.