# FPGA-based Novel Adaptive Scheme Using PN Sequences for Self-Calibration and Self-Testing of MEMS-based Inertial Sensors

## Authors

- First Online:

- Received:
- Accepted:

DOI: 10.1007/s10836-012-5336-x

- Cite this article as:
- Sarraf, E.H., Kansal, A., Sharma, M. et al. J Electron Test (2012) 28: 599. doi:10.1007/s10836-012-5336-x

- 305 Views

## Abstract

We propose a novel adaptive technique based on pseudo-random (PN) sequences for self-calibration and self-testing of MEMS-based inertial sensors (accelerometers and gyroscopes). The method relies on using a parameterized behavioral model implemented on FPGA, whose parameters values are adaptively tuned, based on the response to test pseudo-random actuation of the physical structure. Dedicated comb drives actuate the movable mass with binary maximum length *pseudo*-*random sequences* of small amplitude, to keep the device within the linear operating regime. The frequency of the stimulus is chosen within the mechanical spectral operating range of the micro-device, such that the induced response leads to the identification of the mechanical transfer function, and to the tuning of the associated digital behavioral model. In case of a micro-gyroscope, experimental results demonstrate the adaptive tracking of the damping coefficient from 5.57 × 10^{−5}
*Kg*/*s* to 7.12 × 10^{−5}
*Kg*/*s* and of the stiffness coefficient from 132 *N*/*m* to 137.7 *N*/*m*. In the case of a MEMS accelerometer, the damping and stiffness coefficients are correctly tracked from 3.4 × 10^{−3}
*Kg*/*s* and 49.56 *N*/*m* to 4.57 × 10^{−3}
*Kg*/*s* and 51.48 *N*/*m*, respectively—the former values are designer-specified target values, while the latter are experimentally measured parameters for fabricated devices operating in a real environment. Hardware resources estimation confirms the small area the proposed algorithm occupies on the targeted FPGA device.

### Keywords

PN sequencesImpulse-responseFPGAMEMSAccelerometerGyroscopeSelf-testingSelf-calibration## 1 Introduction

In today’s MEMS’s world, highly sensitive MEMS-based microsystems are made possible by incorporating complex fabrication methodologies and high resolution readout electronics, combined with costly packaging assemblies. The challenge for low-cost and increased functionality marks a growing interest in built-in-self-test (BIST) and built-in-self-calibration (BISC) for MEMS-based inertial sensors, where functional aspects can be verified and calibrated at rest and/or in operation.

- i.
From the manufacturer’s perspective, BIST is an advantageous solution for an overall reduced fabrication cost and increased reliability. Failure-sources in the micro-manufacturing process (such as over-etching, stiction and packaging-induced stress) may contribute to microsystems malfunctioning, or induce changes in the operating characteristics. Functional testing costs less and is significantly faster than calibration. Therefore, the typical approach for large volume manufacturing is to perform functional testing before packaging (to avoid the high cost of packaging for known-bad sensors), followed by a calibration procedure after the microsystem has been packaged.

- ii.
From the user perspective, BIST is an essential component in crucial, usually safety applications, which require continuous monitoring, such as airbag deployment. BISC, on the other hand, is important for maintaining high accuracy in demanding applications, such as adaptive path prediction systems, in particular for recalibrating the mechanical performance when the equivalent stiffness and/or damping coefficients are affected by changes in the operating environment (temperature, humidity and pressure). This is also crucial in micro-g measurement applications such as oil explorations, earthquake detection, bridge monitoring and non-invasive surgery.

Testing provides only a yes/no answer to decide if the device satisfies basic functional threshold operating requirements. Moreover, according to Deb and Blanton [5], the testing process has limitations which sometimes can cause good micro-devices to be rejected (aspect known as the *yield loss*), or bad micro-devices to be accepted (aspect known as *test escape*). The testing scheme needs to provide the right compromise between reliability and overall cost. The BIST can help identify unstable defects [5], provide adequate mechanisms for improving device reliability and ensure its correct performance [3, 11]. Nevertheless, a simple functional test is not sufficient in many cases (e.g. for high sensitivity inertial sensors), where the specifications are so tight that a periodic re-calibration of the microsystem is necessary. Variations in the mechanical sensor characteristics can be compensated through the correlated tuning of the subsequent electronic stages. Difficulties arise when, once calibrated at the manufacturing site, the devices change their behavior at the user side, while in operation. This happens due to large variations in the operating conditions, such as temperature and humidity. This aspect generates the need for low-cost calibration schemes applicable at the user side, to guarantee the continuous reliability and accuracy of the measured data. Failure in reliability and accuracy could lead to catastrophic consequences in the case of the aforementioned applications.

Most of the micro-accelerometers and micro-gyroscopes available on the market today, such as Analog Devices© [2] and ST Microelectronics© [15], have a self-testing feature: an applied test voltage generates an electrostatic force (testing stimulus) that causes a predetermined movement of the movable structure. This force should activate the device to its full working range, i.e. maximum output, and failure to demonstrate a full output operating range within a prescribed tolerance level reflects that the device is faulty, as stated by Xiong et al. [16].

Pseudorandom (PN), or maximum length sequences, have been popular for testing and calibration of electronic systems [10], and have been recently applied as well to the test and calibration of MEMS-based microstructures. They offer several advantages, both theoretical and in terms of hardware implementation, as they are similar to white noise-like input stimuli [10], and avoid generation of complex and device-dependent test signals. PN sequences for MEMS testing have been employed for instance for on-chip measurement of both the thermal and mechanical dynamics of piezoresistive cantilever beams [6, 13]; one of the authors has further extended the methodology to accelerometers, and used it for instance to evaluate the static and dynamic response of ADXL103 [2] devices. Dumas et al. [7] used this methodology to ensure that the output test signal from the accelerometer was not degraded by noise—they were able to achieve 20 *dB* of noise rejection and 2.55 s test time.

The present paper^{1} reports the use of PN sequences as actuating voltages that induce small perturbation in the dynamics of the MEMS structures, in order to *adaptively* extract their *time*-*varying* damping and stiffness coefficients. The whole calibration algorithm is efficiently implemented on FPGA. The method is an extension along the testing concepts presented in [6]. Xiong et al. [16] mentioned that very soon MEMS devices will be fabricated on the same chip with digital analog, memory, and FPGA circuit technologies. An efficient, reliable and low cost system-level solution can be then obtained by integrating the sensor with BISC and BIST schemes targeted on cheap, reconfigurable and efficient technologies such as FPGAs.

- i.
Implementation of a model-based adaptive identification method based on PN sequences for self-testing and self-calibration of MEMS-based accelerometers and gyroscopes. A reference behavioral model of the device (DUT-R), implemented on FPGA, is initialized with factory default values, and the difference between its response and the real device response to PN sequences excitation is used to adjust the stiffness and the damping coefficients. This self-calibration mechanism ensures maintaining high measurement accuracy over larger environment-induced changes in sensor characteristics, for the parameter values of the behavioral model can be used to adjust the calibration of the subsequent electronic subsystem.

- ii.
Beside the reference model, the entire self-calibration module is implemented in reconfigurable hardware (FPGA), with a low occupancy area, suitable for limited computational resources.

Our longer-term goal is to apply the technique to a three degrees-of-freedom (DOFs) inertial measurement unit, for the independent self-calibration of the two accelerometers and the gyroscope MEMS devices.

This paper is organized as follows. Section 2 describes the functioning principle of the proposed scheme and its FPGA implementation. The experimental setup and the results for the micro-accelerometer and micro-gyroscope, along with the necessary hardware resources, are presented and thoroughly discussed in Section 3. Future work is outlined in Section 4, with some final conclusions elaborated in Section 5.

## 2 Proposed Adaptive Technique and Implementation

As time-varying operating environment conditions (temperature, pressure, humidity, etc.) modify the sensitivity of the MEMS sensors, maintaining a desired high-accuracy in the measurement process requires a periodic re-calibration of the system sensitivity. An adaptive, on-board, real-time self-calibration scheme is able to track and adjust the changes in sensor characteristics. We propose in the present work an adaptive error-correction scheme based on a digital behavioral reference model, and demonstrate its implementation on FPGA.

### 2.1 System Architecture and FPGA-based Hardware Blocks

*h*[

*n*] as the impulse response of the LTI system, its output to an input signal

*x*[

*n*] is given by the convolution:

*x*[

*n*], we can recover the unknown impulse response from the cross correlation between the test input (

*x*[

*n*]) and measured output (

*y*[

*n*]) signals, \( {\varPhi_{xy }}\left[ n \right]=x\odot y\left[ n \right] \), for it will be proportional to the impulse response

*h*[

*n*]of the system:

_{xx}[

*n*] of a MLS (PN) is, except for a small DC level (dependent on the length of MLS), a good delta function approximation:

*k*we get the associated signature

*h*[

*k*], representing the value of the impulse response at the sample time

*t*=

*k*⋅

*T*

_{s}. With corresponding added delays in the hardware, the coefficients can be identified from the post-processing of the output signal. For an MLS of length

*N*= 2

^{M}−1, we have an N-length signature pattern (

*k*= 0, 1,..,

*N*−1). When used for identifying the parameter values of a reference model, only the first coefficients will carry most of the relevant information in practical cases.. The width of the significant portion is equal to

*F*

_{s}/

*BW*, where

*F*

_{s}= 1/

*T*

_{s}is the sampling rate (the clock rate of MLS here) and

*BW*is the 3 dB bandwidth of LTI system [10]. This relation reflects two important points:

- i.
For a high value of

*F*_{S}or a low value of*BW*, the information is spread over a large number of redundant coefficients*h*[*k*] in the signature. - ii.
To standardize the proposed approach, we choose the MLS chip rate as a function of 3-dB frequency of the LTI system.

Using Nyquist criterion, the chip rate for MLS was chosen to be twice the 3-dB frequency. From the simulation results it was observed that is usually sufficient to use only the first 10−15 coefficients in the signature. In fact, it has been shown [10] that for an LTI system with *p* poles and *q* zeros, only {*p*+*q*+1} arbitrary impulse response terms are sufficient to characterize the system.

*x*(

*t*) is the displacement of the proof mass (with

*X*(

*s*) as its Laplace Transform pair),

*γ*is the damping coefficient,

*k*is the spring constant,

*ω*

_{0}is the natural resonant frequency of the device,

*Q*is the quality factor,

*C*is the readout gain constant and

*f*(

*t*) (or

*F*(

*s*) in its Laplace form) is the excitation force. Based on the values of the parameter

*γ*the system can be under-damped, critically-damped or over-damped. From (5) we can see that under constant actuation (

*s*= 0) the output depends on the effective stiffness constant of the inertial sensor and on the applied

*dc*force (static regime), while the effect of damping and inertia become noticeable only in dynamic mode (the structure is operated at atmospheric pressure), at higher frequencies [14]. The linear model of the reference resonator (DUT-R) was implemented digitally in FPGA using a discretized state-space representation (Fig. 2e), with velocity and displacement as internal state variables. In order to adjust the values of the parameterized reference model knowing the measured impulse response of the device, it is important to know how do the variations in

*m*,

*k*and

*γ*reflect in changes of the

*h*[

*n*] samples. While the proof mass will remain constant in operation,

*k*and

*γ*may vary in time, reflecting environment changes. The sensitivity analysis, illustrated in Fig. 3, shows that the reconstructed digital impulse response

*h*[

*n*]=

*h*

_{n}depends indeed on both

*γ*and

*k*, with different

*h*[

*n*] coefficients having distinct sensitivities to their independent variation. We have analyzed the sensitivity of the impulse response terms

*h*

_{1},

*h*

_{2},

*h*

_{3}… to induced variations in the damping and stiffness coefficients, \( \frac{{\partial {h_i}}}{{\partial \gamma }},\frac{{\partial {h_i}}}{{\partial k}} \), concluding that only the first samples

*h*

_{i}are significant.

While both the equivalent elastic and damping coefficients can vary in time due to changes in operating conditions (e.g. operating temperature), the mass is taken as an invariant parameter for a given device. The self-calibration procedure has two distinct phases: the *dc* response is firstly used to determine the equivalent spring constant, while the dynamic response to the MLS excitation is used for recalibrating the value of the damping coefficient in the digital reference model.

The *model*-*based recalibration technique* uses a replica of the behavioral model (DUT-R) of the device. It is stored on FPGA and coupled to an adaptive algorithm that compares its response with the one of the device under test (DUT). The differences are used to recalibrate the DUT-R parameters (initially set to the values estimated after the fabrication) to current operating values.

*a priori*values used for the damping and stiffness parameters of the gyroscope are 5.57 × 10

^{−5}

*Kg*/

*s*and 132

*N*/

*m*, respectively, and 3.4 × 10

^{−3}

*Kg*/

*s*and 49.56

*N*/

*m*for the accelerometer. They have been determined from experimental measurements on different sample devices using Polytec MSA-500 video-stroboscopy equipment and associated planar motion analysis software, as illustrated in Fig. 4.

The self-calibration block is the processing engine that adaptively computes and stores the values of the stiffness and damping coefficients. It contains the correlation cells for damping control, along with the damping and stiffness controllers. The output of the PN sequence generator acts as test input for both the DUT and DUT-R (FPGA model). The proposed technique allows the use of the same binary generator, with proper initialization, as stimulus towards extracting both stationary and dynamic response (as quantified by the error in most sensitive impulse response coefficients) of the micro-device.

- i.
Starting with the equivalent spring constant, a

*dc*force is applied to the DUT. This is achieved by initializing the state of the test generator with all ones, stored as initial values in a linear feedback shift register (LFSR). The approximate settling time of DUT serves as a guide for choosing the order of the test PN sequence. - ii.
For the first 10 clock cycles (10 being the order of PN sequence used), the difference in static response between the DUT and the DUT-R is computed and fed to the stiffness controller. The binary actuation test signal will remain “1” during this time interval.

- iii.
Using the steady state error (difference between the experimentally measured response and the output of the reference model), the stiffness parameter

*k*of the DUT-R is adjusted by the stiffness controller for a maximum matching between the responses of DUT and DUT-R. - iv.
The counter starts counting from the initial state, up to the total length of PN sequence.

- v.
For the damping coefficient adjustment, the complete responses

*y*[*k*],*y*_{R}[*k*] of the DUT and DUT-R respectively, corresponding to the entire length of PN sequence*x*[*k*], are fed into the correlation cells. The algorithm computes through digital cross-correlation the significant coefficients of {*h*_{DUT}[*n*],*h*_{DUT−R}[*n*]}, in order to perform the adaptive correction on*γ*_{DUT-R}. - vi.
The damping coefficient of the DUT-R,

*γ*_{DUT−R}, is being adjusted by the damping controller such that the error between the two signatures is minimized. - vii.
The iteration cycle for the stiffness and damping coefficients (

*κ*_{DUT−R}and*γ*_{DUT−R}) of the reference model repeats until the resulting error falls below a desired threshold, imposed by the accuracy constraints. At this point, the self-calibration is achieved, and the reference model parameters reflect the values of the real device.

The *stiffness controller* (see Fig. 2(c)) (responsible for recalibrating the spring constant parameter) is active only during the first few clocks of every test sequence cycle, when the actuation signal is constant. Because for the physical DUT the test sequence maps to binary actuation voltages (one-bit DAC), while it can directly digitally interface with DUT-R model, it is necessary to use a scaling constant *A* for the actuation term on DUT-R. Its value is chosen to correspond to the equivalent displacement-to-voltage gain of the MEMS device response. A gain of *A* = *7,000* is used in our case. The final output of the controller is the sum of the *a priori* stiffness coefficient and the output of an accumulator block.

The correlation block, illustrated in Fig. 2(d), contains the cells for computing the cross-correlation expression∑*x*[*n*]⋅*y*[*n*−*k*] between the binary PN input sequence *x*[*n*] and the measured (DUT) or digitally computed (DUT-R) output *y*[*n*]. The PN sequence is associated in the mechanical domain with two actuation force levels, {±*F*_{0}} (left or right actuation with forces of constant magnitude). The binary nature of the sequence means that the convolution sum reduces to a sequence of multiplications of *y*[*n*] (or delayed versions) by {+1} or {−1} (a multiplexer selects *y*[*n*] or −*y*[*n*] based on the input *x*[*n*]), followed by the accumulation of the partial result. An adaptive scheme implements the error correction: the operating value of the damping coefficient to be stored in the behavioral model is iteratively adjusted, proportional with the accumulated difference (cumulated error) between the reconstructed impulse responses {*h*_{DUT}[*n*], *h*_{DUT−R}[*n*]} of the DUT and DUT-R for a full PN cycle (every 1,023 clock cycles).

## 3 Experimental Results and FPGA Hardware Resources

The proposed adaptive technique for self-calibration and self-testing has been experimentally verified for tuning the stiffness and damping coefficients of fabricated accelerometers, and for the sensing mode of a MEMS gyroscope. This is a complete system and comprises MEMS-based components, FPGA board, readout electronics, DAQ; each individual component has been verified separately, in order to decrease the probability of erroneous signals.

### 3.1 Calibration of the Reference Model DUT-R

The proposed scheme relies on the accuracy of the reference model, responsible for providing the appropriate time-varying damping and stiffness coefficients. To address the range of the quantization error, a fixed/floating point study was performed on the DUT-R model, to identify a suitable word length representation in binary format. For this, considering a single DOF system, the dynamic range has been fixed according to the targeted sensitivity. It should be noted that the chosen dynamic range also affects the limitation of the BIST/BISC, as the reference model should be tuned or programmed to match the DUT. Since we target high sensitivity and low-g measurements, the dynamic range has been fixed to [−1 *g*, 1 *g*]. In this section the model parameters (mass, stiffness and damping coefficients) are discussed for a MEMS accelerometer. The same study was separately performed for the MEMS gyroscope.

*0*.

*05 s*). A second case considered a sine-like input, as in Fig. 6(b), with a frequency of

*90 Hz*. The acceleration magnitude is within the interval of [−

*1 g*,+

*1 g*] in both test cases.

As the resolution of the reference model is of utmost importance, the chosen word-length for the fixed point FPGA computation varies from one arithmetic block to another, depending on the magnitude of the input signal. The word-length is represented by two numbers, one for the number of bits representing the real part (left), and the other (right) for the number of bits representing the fraction part of the signal. For low magnitude input signals the used word-length is (32, 30), with a large amount of bits is reserved for the fractional portion of the signal, while for large magnitudes a word-length of (24, 6) is used, where the large portion of bits is reserved for the real part of the signal. Additionally, the resolution of the DUT-R strongly depends on the resolution of the two digital integrators (one for velocity and the other for position). Figure 6 shows that the proposed hardware fixed-point implementations, highly concurrent, match well the generic floating point models.

### 3.2 Experimental Set Up

*100 kHz*, well outside the mechanical bandwidth, a transimpedance amplifier and a demodulator. The output voltage is proportional with the differential change in the capacitance and thus implicitly with the relative displacement of the proof mass, for small displacement values. An analog-to-digital converter (ADC) maps the voltage into a digital signal supplied as input to the FPGA module, where it is used for the tuning the digital reference model. The digital binary sequence generated in FPGA is converted into the two electrostatic actuation forces, {±

*F*

_{0}}, applied on a dedicated pair of actuation comb capacitors. This is accomplished using a multifunctional DAQ from Measurement Computing© [9] (USB-1208 Series), with

*1*.

*2ksample*/

*s*to

*1Msample*/

*s*sampling rate for DAC and ADC operations.

The DUT is excited with maximal length sequences of small amplitude, with a frequency within the mechanical bandwidth of the movable structure. The input–output cross correlation gives an estimate of the impulse response (whose digitized values *h*[*n*] will be referred to as ‘*coefficients*’) of the micro-device. The analysis and simulation results have indicated that knowing the static response to a constant actuation voltage and the few first *h*[*n*] coefficients is sufficient to tune the reference model parameters to match the DUT, and to subsequently perform the calibration of the microsystem. Tests were carried out by imposing a *dc* voltage of 15 *V* and varying the *ac* signal amplitude for a fixed frequency of 8.5 *kHz* for the gyroscope, and a *dc* voltage of 20 *V* and varying the *ac* signal amplitude for a fixed frequency of 4.8 *kHz* for the accelerometer.

### 3.3 Self-calibration of Micro- accelerometer and Gyroscope

Both micro-devices have been designed and simulated using COVENTORWARE© software tools, fabricated in MEMSCAP© SOIMUMPs® technology (25 *μm* thickness for the structural layer), packaged in 40-DIP ceramic packages and experimentally characterized using a POLYTEC MSA-500 (Micro-System Analyzer) equipment. The planar motion analysis module of the Polytec MSA-500 was used to detect (*0x*) and (*0y*) motions down to 2 *nm* resolution, based on video-stroboscopy techniques.

Actuation of the proof mass (mimicking an external acceleration input) is achieved by applying *ac* voltages between the moving and the fixed fingers of the actuators and a bias *dc* voltage to the proof mass of the sensor, in order to linearize the effect of the electrostatic forces. The experimental tests on the MEMS-FPGA closed loop self-calibration were carried out by actuating the MEMS-based accelerometer with the PN sequences. The essential parameters, such as resonant frequency, damping coefficient and quality factor, have been estimated from the experimental measurements performed on the MEMS devices using Polytec MSA-500 micro-motion analyzer. The measured frequency responses for the accelerometer and for the sensing mode of the micro-gyroscope are shown in Fig. 4.

The value of the damping coefficient *γ* is obtained by half power method. That is, we use \( \gamma =\varDelta {f_0}/2{f_0}=1/2Q \) where ∆*f*_{0} is 3 dB-bandwidth in *Hz* and *f*_{0} is the resonant frequency. The stiffness coefficient is given by *k*=*m*(2*πf*_{0})^{2}, where the mass *m* of the structure is a given data, estimated from the layout and material properties.

The resonant frequency and quality factor for each resonant mode are \( {\omega_0}=\sqrt{{{k \left/ {m} \right.}}} \) and \( Q=\sqrt{{{km \left/ {\gamma } \right.}}} \) respectively, where the mass *m* is assumed invariant to external variations, while *k* and *γ* can be time-varying parameters.

Performance characteristics of the micro-accelerometer

Parameter | Value |
---|---|

Proof mass [nKg] | 50.43 |

Stiffness coefficient [N/m] | 49.5627 |

Damping coefficient [Kg/s] | 0.0034 |

Nominal capacitance [pF] | 1.3 |

Vibratory gyroscopes have two coupled modes, a driving and a sensing one. The driving mode is electrostatically excited, and in the absence of an external angular rate, the mechanical energy of its vibratory motion remains confined into the driven mode. A non-zero external angular rate will generate a non-inertial Coriolis force proportional to it, which couples the two resonant modes, and converts a part of the energy of the driving mode into an oscillation of the sensing mode. The external angular rate value is therefore determined by measuring the amplitude of the sensing mode vibration. The typical MEMS gyroscope structures use linear motions for the driven (*0x*) and the sensing (*0y*) coupled resonant modes [1].

*KHz*, with a forced amplitude of the (

*0x*)-driven displacement of 5

*μm*. The quality factors for the drive and sense mode are

*Q*

_{x}≈129and

*Q*

_{y}≈44, respectively. Table 2 illustrates the physical characteristics of the fabricated gyroscope [8].

Performance characteristics of the micro-gyroscope

Parameter | Actuation | Sensing |
---|---|---|

Stiffness coefficient [N/m] | 122.28 | 132.23 |

Damping coefficient [Kg/s] | 18.9 μ | 57 μ |

Proof mass [nKg] | 48.67 | 48.67 |

Quality factor | 128.8 | 43.63 |

Nominal capacitance [pF] | 0.36 | 0.6 |

*0y*) (sense) displacement amplitudes of 143.7

*nm*for 1 deg/

*s*external angular rate. For a 0.05

*rad*/sec mismatch (see Fig. 9) between the driven and sensing modes, the sensitivity will drop by 50 % (displacement will drop from 4.623

*μm*to 1.791

*μm*). The tuning of the two resonant modes (driving, sensing) is crucial in high performance gyroscopes, where any mismatch could lead to a fast decrease in the sensitivity to external angular rates [14].

*F*_{actuation} is the electrostatic force that puts the gyroscope in motion in the *0x* direction, directly proportional to the square of applied voltage. The Coriolis force \( -2m{\varOmega_Z}{dy \left/ {dt } \right.} \) induces the motion in the (*0y*) direction; a reciprocal Coriolis force, \( 2m{\varOmega_Z}{dy \left/ {dt } \right.} \), will be induced by the (*0y*) motion of the sense mode, but this is negligible relative to the electrostatic actuation. The two resonant modes may have different equivalent spring constants and damping coefficients.

Here *C*_{0} is the initial capacitance, *V* is the actuation voltage, *d* is the initial distance between the gap-varying plates, and *y* is the displacement due to the applied electrostatic force. For convenience, the damping and stiffness coefficients are renamed from *γ*_{y} to *γ* and *k*_{y} to *k*, respectively, since they are the only one to be determined in this case.

The experimental tests on the MEMS-FPGA closed loop adaptive reference model tuning were carried out by actuating the MEMS-based device with the generator sequence, as described earlier. It should be noted that the capacitive readout electronics introduces its own noise, adding a strong limitation in terms of displacement measurement resolution.

The *a priori* values used for the damping and stiffness parameters for the accelerometer (in the virtual model implemented on FPGA) are 3.4 × 10^{−3}
*Kg*/*s* and 49.56 *N*/*m* respectively. The same parameters for the gyroscope are 5.57 × 10^{−5}
*Kg*/*s* and 132 *N*/*m*, respectively, as estimated from measurements performed on different devices (from the same fabrication batch).

*a priori*stiffness coefficient (accelerometer/gyroscope) and the output of the accumulator block. This tuning process of the adaptive scheme led to the new values of stiffness coefficients, 51.48

*N*/

*m*and 137.7

*N*/

*m*for the accelerometer and gyroscope respectively. The dynamic response to the MLS excitation is used for recalibrating the value of the damping coefficient in the digital reference model. The adaptation of the damping coefficient, as illustrated in Figs. 10(b) and (b), requires more clock cycles than the stiffness coefficient tuning. This adaptive tuning process led to the new values of damping coefficients, 4.57 × 10

^{−3}

*Kg*/

*s*and 7.12 × 10

^{−5}

*Kg*/

*s*for the accelerometer and gyroscope respectively.

### 3.4 Hardware Resources and Trade-Off

Hardware resources of the proposed scheme (for the MEMS accelerometer)

Slices | FF | LUT | MULT | |
---|---|---|---|---|

Hardware Resources (for MEMS accelerometer) | ||||

Block | ||||

PN Sequence generator | 12 | 11 | 1 | 0 |

Stiffness Controller | 248 | 58 | 484 | 0 |

Damping Controller | 207 | 99 | 365 | 0 |

Correlation Cells | 424 | 127 | 811 | 0 |

DUT-R | 2618 | 1495 | 4865 | 21 |

Overall System | 3547 | 1857 | 6461 | 21 |

| ||||

BISC Percentage of occupation for accelerometers (%) | ||||

Device | ||||

XC2VP2 | N/A | 65.94 | N/A | N/A |

XC2VP7 | 71.97 | 18.84 | 65.55 | 47.72 |

XC2VP30 | 25.89 | 6.77 | 23.58 | 15.44 |

XC2VP70 | 10.71 | 2.80 | 9.76 | 6.40 |

XC2VP100 | 8.04 | 2.10 | 7.32 | 4.72 |

Hardware resources of the proposed scheme (for the MEMS gyroscope)

Slices | FF | LUT | MULT | |
---|---|---|---|---|

Hardware Resources (for MEMS gyroscope) | ||||

Block | ||||

PN Sequence generator | 12 | 11 | 1 | 0 |

Stiffness Controller | 252 | 58 | 492 | 0 |

Damping Controller | 175 | 98 | 293 | 0 |

Correlation Cells | 1694 | 2536 | 2827 | 0 |

DUT-R | 2533 | 934 | 4646 | 35 |

Overall System | 4686 | 3646 | 8275 | 35 |

| ||||

BISC Percentage of occupation for gyroscope (%) | ||||

Device | ||||

XC2VP2 | N/A | N/A | N/A | N/A |

XC2VP7 | 95.08 | 36.9 | 83.95 | 79.54 |

XC2VP30 | 34.21 | 13.31 | 30.2 | 25.73 |

XC2VP70 | 14.16 | 5.5 | 12.5 | 10.67 |

XC2VP100 | 10.62 | 4.13 | 9.38 | 7.88 |

The proposed scheme is massively parallel and is suitable for fixed-point FPGA implementation. With the exception of the DUT-R hardware implementation, an average of (16,12) word-length has been used for the stiffness and damping controllers, and for the correlation cells. The implementation shown in Fig. 2 has been verified through end-to-end VHDL simulations along with actual hardware implementation, to determine the device resources and speed. All blocks have the same throughput, with quite similar latencies. The circuit has a maximum speed of 14.217 *MHz* for the BIST/BISC (accelerometer) and 17.727 *MHz* for the BIST/BISC (gyroscope). The achieved clock frequency in both implementations (accelerometer/gyroscope) is acceptable. Pipelining techniques can be used to increase the speed, if necessary.

The hardware resources, illustrated in Tables 3 and 4, show the percentage of occupation of the proposed adaptive methodology for BISC, for several FPGAs from the Xilinx family. The one used for the experiments is a Virtex-II pro XC2VP100, which contains relatively small hardware resources compared to the state-of-the-art FPGA on the market today. Nevertheless, the proposed methodology has low hardware resources demands even in this case. Therefore, with the tremendous FPGA development following Moore’s law, area occupancy trade-off has become less critical than other trade-offs, such as speed and resolution. In our work, resolution was not compromised in the reference model, due to its importance in the proposed methodology. We can conclude, based on these values, that the methodology is suitable for the self-calibration of a more complex 3-DOF inertial measurement unit (IMU), using a cheap and small FPGA like XC2VP30. In this case the PN sequence generator can be a shared resource, and three reference models, for the 0x and 0y accelerometers and the 0z angular rate sensors, respectively, will be implemented to operate concurrently on the same FPGA chip.

## 4 Future Work

A future challenge is to be able to perform online self-calibration and self-tuning, when the test actuation with PN sequences superimposes over the natural mechanical actuation given by an external acceleration or angular rate.

## 5 Conclusion

We have developed a novel, adaptive, self-testing and self-calibration scheme for MEMS inertial sensors and resonators. The algorithm relies on the use of a digital reference behavioral model implemented on FPGA, whose parameters (stiffness and damping coefficients) are tuned based on the accumulated error between the reconstructed impulse responses of the device under test and the reference model. The impulse responses are reconstructed using low amplitude PN sequences as actuation signals (so that the sensor remains within its linear operating regime), and subsequently computing the input–output cross-correlation. A low-cost capacitive readout circuit, together with ADC and DAC blocks, interface between the MEMS device under test and the digital module. The self-calibration procedure implemented on FPGA requires low hardware resources, and it is easy extensible to MEMS systems for multiple degrees of freedom.

## Acknowledgment

The authors would like to thank CMC Microsystems, MITACS, Auto21 Network of Centres of Excellence, and the Natural Sciences and Engineering Research Council of Canada (NSERC) for making this research possible.