A SYSTEM AND METHOD FOR PRECISION COMPENSATION FOR THE NONLINEAR OFFSET AND SENSITIVITY VARIATION OF A SENSOR WITH TEMPERATURE

Abstract: The method and system provide a digital compensation circuit for calibrating a sensor. The compensation circuit comprises an interface circuit for receiving data relating to a plurality of parameters, and a circuit coupled to the interface circuit for providing polynomial compensation of a temperature coefficient (TC). The polynomial compensation circuit further comprises a circuit for providing a first output. The first output is a first value multiplied with a digital temperature. An adder/accumulator (232'/234') is coupled to the first output circuit and the interface circuit to add a second value using the first output.

Description: A SYSTEM AND METHOD FOR PRECISION COMPENSATION FOR THE NONLINEAR OFFSET AND SENSITIVITY VARIATION OF A SENSOR WITH TEMPERATURE FIELD OF THE INVENTION The present invention relates generally to sensors and more particularly to improving the calibration of such sensors. BACKGROUND OF THE INVENTION Piezoresistive and capacitive sensors are being used in increasingly higher accuracy applications for sensing various changes in pressure and the like in a variety of environments. Because the output of these sensors typically varies over temperature, the sensors require compensation and calibration in order to achieve the accuracy and temperature stability requirements of these applications. The calibration of sensors typically requires the adjustment of four parameters to achieve optimum output performance over temperature - offset, offset temperature coefficient (OTC), signal gain, and gain temperature coefficient (GTC). In general the transfer function of a sensor is given by : Vsens = Offset 0 -(l + a T + a 2 - T 2 +...+a n - T n ) + S 0 -(\ + β λ - T + β 2 - T 2 +...+β n - r)- Q Equation 1 where: Vsens is the sensor output voltage Offset^ is the sensor offset (output with zero excitation) at a reference temperature (e.g. 25°C) a, is the first order temperature coefficient of the sensor offset a 2 is the second order temperature coefficient of the sensor offset a„ is the n ώ order temperature coefficient of the sensor offset 7 is the temperature difference from the reference temperature S o is the sensor sensitivity or span at the reference temperature (e.g. 25°C) β, is the first order temperature coefficient of the sensor sensitivity β 2 is the second order temperature coefficient of the sensor sensitivity β n is the n* order temperature coefficient of the sensor sensitivity Q is the physical parameter being sensed (e.g. pressure, acceleration, etc.) For most sensor applications, all but the first order terms can be ignored so that Equation 1 becomes: Vsens = Offset, • (l + a ■ f) + S 0 • (l + β ■ f) ■ Q Equation 2 However, for high accuracy sensor applications, the second order terms are usually included so that Equation 1 becomes: Vsens = Offset ϋ ■ ( l + ( χ l - T+ 2 - T 2 ) + S 0 - l + β t - T + 2 - T 2 )- Q Equation 3 To compensate this signal, a signal conditioning circuit is required which must subtract out the offset terms over temperature and provide amplification which varies with temperature to counteract the effect of the sensor span (TC). Traditionally, the signal conditioning has been done with opamps and laser trimmed resistors. However, this type of signal conditioning circuit is usually limited to providing first order correction of the temperature dependent terms. In addition this method is expensive as it requires the use of a laser and the solution is typically not monolithic (on a single integrated circuit) as the opamps and resistors are usually built on separate substrates. An embodiment of a conventional digital compensation circuit 100 is shown in Figure 1. In this embodiment, the differential signal from the sensor 5' is fed into an amplifier 102 which may have a gain of 1 or greater depending on the application. The output of this amplifier is fed into another amplifier stage 104 whose gain is controlled by the contents of a gain register 106. In addition, the offset and offset TC terms are added at summation point 114 in this stage using DACs 108, 110, 112 controlled by digital parameters. The compensation of the sensor sensitivity TC is done in the third stage 116 after the offset, offset TC and gain compensation. The third stage 116 may also have a gain of 1 or greater depending on the application. The final stage is an output buffer 111. In this circuit, the temperature, T, is sensed using an on-chip proportional to absolute temperature (PTAT) circuit 122. The analog signal representing Tis digitized using an analog-to-digital converter 124. The digital word representing T is then used to control two DACs 110 and 120, one for the offset TC compensation and the other for the gain TC compensation. Digital information representing the values of the compensation terms, is serially fed into an on-chip control unit 125. The individual bits are decoded and sent to the various DACs 108, 110, 112, 118 and 120. Once the correct binary code has been selected to center the sensor characteristic in the specified range, the code is stored using a digital storage method such as zener-zap, EEPROM or fuse link. The transfer function of this circuit 100 is given by Equation 4. Vout = (Vsens + Voff + Vote ■ f) ■ Gain 0 - (1 + δ - T) Equation 4 Combining equations 3 and 4 gives: Vout = S 0 - Q-(l + β l - T+β 2 - T 2 ) + Offset 0 -(l + a l - T+ a 2 - T 2 )- +Voff + Votc- T- ■ Gain 0 - (\ + δ- T) Equation 5 where: Vout is the calibrated sensor output voltage (output of conditioning circuit) Gain 0 is the gain of the compensating amplifier at the reference temperature Voff is the offset added by the conditioning circuit Votc-T is the temperature dependent component of the offset added by the conditioning circuit δ is the temperature dependent component of the gain of the compensating amplifier which counteracts the temperature dependent component of the sensor sensitivity. The calibration of the sensor involves making measurements of Vout at various values of Q and various temperatures and thereby deducing the values of Voff Vote, Gain 0 and δt minimize the error between Vout and the ideal sensor characteristic. Ideally the Voff, and Gain 0 terms would be found first using measurements at the initial calibration temperature at minimum and maximum Q. The temperature dependent terms would then be found by an additional set of measurements at high (or low) temperature. By setting: Voff = -Offset, Votc = -Offset 0 -a, and S= -β, equation 5 becomes: Vout = S 0 ■ Q - Gain 0 *[l + T 2 + δ - T) - T 2 Equation 6 The desired term is simply S 0 -Q-Gain 0 . All the other terms arise because this circuit only corrects for linear variations of the sensor offset and sensitivity with temperature. In high accuracy applications these extra terms may limit the usability of the sensor since it may be impossible to calibrate the sensor within the desired specification. Accordingly, what is needed is a system and method to allow for more accurate calibration of sensors. The system and method should be easy to implement and cost effective. The present invention addresses such a need. SUMMARY OF THE INVENTION The method and system provide a digital compensation circuit for calibrating a sensor. The compensation circuit comprises a serial communication circuit for receiving data relating to a plurality of parameters, and means coupled to a serial communication circuit for providing polynomial compensation of a temperature coefficient (TC). The polynomial compensation means further comprises means for providing a first output. The first output is a first value multiplied with a digital temperature. Adder means are coupled to the first output providing means and the serial communication circuit. The adder means add a second value to the first output. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a diagram of a conventional sensor calibration circuit. Figure 2 is a block diagram of a high accuracy calibration system 200 in accordance with the present invention. Figure 3 shows typical sensor offset behavior together with a linear approximation and a polynomial approximation using the present invention. Figure 4 illustrates the residual errors in the offset term for both the linear approximation and the polynomial approximation method. Figure 5 is a block diagram of a second embodiment of a high accuracy 5 calibration system in accordance with the present invention. Figure 6a depicts one embodiment of the functionality of a multiply add block for calibrating the temperature offset and temperature coefficient of offset. Figure 6b illustrates one embodiment of a multiply-add block to calibrate the o temperature offset and temperature coefficient of offset. Figure 7 depicts a third embodiment of a high accuracy calibration system in accordance with the present invention. Figure 8a depicts one embodiment of the functionality of a multiply add block for calibrating the sensitivity and temperature coefficient of sensitivity. 5 Figure 8b depicts one embodiment of a multiply-add block to calibrate the sensitivity. Figure 9a depicts one embodiment of the functionality of a multiply add block for calibrating the temperature offset. Figure 9b illustrates one embodiment of a multiply-add block to calibrate the o temperature offset. Figure 10 illustrates one embodiment of a multiply-add block to calibrate both temperature offset and sensitivity. Figure 11 depicts a timing diagram of the switching phases for the embodiment of the multiply-add block shown in Figure 9a and 9b. DETAILED DESCRIPTION The present invention relates to an improvement of a calibration system for a sensor. The following description is presented to enable one of ordinary skill in the art to make and use the invention and is provided in the context of a patent application and its requirements. Various modifications to the preferred embodiment will be readily apparent to those skilled in the art and the generic principles herein may be applied to other embodiments. Thus, the present invention is not intended to be limited to the embodiment shown but is to be accorded the widest scope consistent with the principles and features described herein. The present invention is an improvement over conventional calibration schemes. In the present invention the higher order behavior of sensor offset and sensitivity with temperature are approximated by polynomial functions. In one embodiment of the present invention, the offset and sensitivity behavior is approximated by a second order approximation. In so doing a highly accurate sensor calibration is provided. To more particularly describe the features of the present invention refer now to the following discussion in conjunction with the figures. U.S. Patent Application Serial No. 08/674,028, entitled "A SYSTEM AND METHOD FOR HIGH ACCURACY CALIBRATION OF A SENSOR FOR OFFSET AND SENSITIVITY VARIATION WITH TEMPERATURE" filed on July 1, 1996, which is assigned to the assignee of the present invention, discloses a system and method for calibration of a sensor using a piece-wise linear approximation. The above identified application is incorporated by reference herein. The present invention addresses calibration for higher order terms in the offset temperature coefficient and sensitivity temperature coefficient. Figure 2 is a block diagram of a high accuracy calibration system 200 in accordance with the present invention. As is seen system 200 has many of the common components as those shown in system 100 of Figure 1. Those components are given similar designations as described in Figure 1. The transfer function of Figure 2 is given by: Vout = (Vsens + Voff+ (Votcl + Votc2*T)*T)*Gain 0 *(l + (GTC1 + GTC2*T)*T) Equation 7 Combining equations 3 and 7 gives: Vou t J s o - Q- tβ 1 - T + β 2 - i ) + Offset 0 - (l + 1 - T + a 2 - ^) Λ I- +Vof£ + ( Votcl + Votc2T ) * T* J - Gaιn ° - U + I GTC1 + GTC2 - T ) ■ T ) Equation 8 Votcl *T is the temperature dependent component of the offset added by the conditioning circuit Votc2*T^ is the second order temperature dependent component of the offset added by the conditioning circuit GTC1 is the temperature dependent component of the gain of the compensating amplifier which counteracts the temperature dependent component of the sensor sensitivity GTC2 is the second order temperature dependent component of the gain of the compensating amplifier which counteracts the temperature dependent component of the sensor sensitivity. The calibration of the sensor involves making measurements of Vout at various values of Q and various temperatures. The values of Voff, Votc j , Vote-), Gαing, GTC1 , GTC2 are utilized to minimize the error between Vout and the ideal sensor characteristic. Ideally, the Voff and Gαinø terms would be found first using measurements at the initial calibration temperature and minimum and maximum Q. The temperature dependent terms would then be found by an additional set of measurements at high and/or low temperature. The embodiment of Figure 2 provides a second order approximation to the sensor behavior. By setting: Voff= -Offset0 Vote] = -Offset g*α j Votc2 = -Offset 0 *a 2 GTC1 = βj GTC2 = - βjGTCl - β 2 equation 8 becomes: Vout = Vou t=S 0 ■ Q - Gain 0 ■ [l + T 2 ( β 2 • GTCl +βi • GTC2 ) + T 4 ( β 2 • GTC2)] Equation 9 Consequently, the embodiment depicted in Figure 2 provides second order corrections to the offset temperature and sensitivity with temperature. However, the concepts and intent of calibration circuit 200 can be extended to provide polynomial correction of higher order errors. The second order approximation for offset TC correction is implemented in the calibration system 200 of Figure 2 by providing a multiplier 230 for multiplying the digital temperature with a second offset temperature coefficient, OTC2, with the digital temperature. Coupled to the multiplier is an adder 220, for adding the output of multiplier 230 to a first offset temperature coefficient, OTC1. Figure 3 shows typical sensor offset behavior 302 together with a linear approximation 304 such as that provided by the circuit 100 in Figure 1. and a polynomial, in this embodiment second order, approximation 306 such as that provided by the circuit 200 of Figure 2 of the present invention. As is seen, the polynomial approximation more closely follows the sensor offset behavior. Similarly, a polynomial approximation can be used for correcting the behavior of the temperature coefficient of the sensitivity of the sensor. To further illustrate this point, Figure 4 contains waveforms that show the residual errors in the offset term for both the linear approximation 402, the piecewise linear approximation 404, and polynomial approximation 406. As is seen, the polynomial approximation error is clearly smaller thus allowing for higher accuracy sensor compensation. In one embodiment of the system 200 of Figure 2, the temperature T is represented as a ten (10) bit digital word. However, another form for the temperature T is the digital pulse density of a serial bit stream. For example, the midscale temperature of the ten bit digital word is 512. This midscale also corresponds to a pulse density of bit serial temperature equal to 50%. Thus, for each 1024 counts, there would be 512 ones (l's) and 512 zeroes (0's). Figure 5 depicts one embodiment of a calibration system 200' utilizing pulse density to represent the temperature for at least some calculations. The embodiment of Figure 5 contains many of the elements of Figures 1 and 2. Consequently, these elements are given similar designations as in Figures 1 and 2. In order to digitize the temperature, the temperature is first sensed with PTAT circuit 122'. Using a reference voltage, Vref and the analog to digital converter 124' the temperature is converted to a pulse density proportional to the actual temperature minus the room temperature, i.e., T-25 °C, where 25°C is assumed to be the room temperature. This pulse density is used in multiply-add block s 250 and 260. Digital low pass filter 201 then converts the pulse density to an N bit digital word representing the temperature. Because the calibration system 200' shown in Figure 5 uses a serial representation for the temperature, the multiply-add block 260, as well as multiply-add block 250, can be constructed very efficiently using conventional adders. Figure 6a depicts the functionality provided by multiply-add block 250. As is apparent from Figure 6a, multiply-add block 250 provides the same functions as blocks 220 and 230 of Figure 2. Figure 6b depicts the components used to construct multiply-add block 250 in one embodiment of the calibration system 200'. Multiply-add block 250 includes multiplier 230', constructed of adder 232', accumulator 234', and adder 220'. These components supply the same functions as multiplier 230 and adder 220 of Figure 2. In addition, multiply-add block 250 contains OTC register 215'. Register 215' is coupled to DAC 210'. In one embodiment of calibration system 200', accumulator 234' (see Figure 6b) begins at zero. In this embodiment, OTC2 is added to the increase in accumulator 234' if the digital temperature is a logical 1 and subtracted from the sum in accumulator 234' if the temperature is a logical 0. In one embodiment, this step is repeated for M serial bits of the digital temperature. M is typically 512 or 1024. The final sum in the accumulator 234' is the product of OTC2 and the pulse density of the digital temperature. This product is then added to OTC1 by adder 220'. Finally, the sum of OTC1 and OTC2*T is latched to the OTC register 215' which controls the DAC 210'. This method and system can also be used for calibrating the gain using the multiply-add block 260. Note that an embodiment of the method and system could calibrate offset and offset coefficient (TC) temperature only, calibrate sensitivity and sensitivity TC only, or calibrate both offset TCs and sensitivity TC. Figure 7 displays a third embodiment of the calibration system 200". Many of the elements of the calibration system 200" are the same as for Figures 1, 2, and 5. These components are designated similarly as in Figures 1, 2, and 5. The calibration system 200" uses only one DAC 298 for offset and offset TC compensation. In addition, the calibration system 200" replaces the filter 201 shown in Figure 5, with additional logic. Thus, the multiply-add blocks 250' and 260' of calibration system 200" output the full second order temperature correction to offset and gain, respectively, rather than outputting a first order correction which is later multiplied by the temperature, as in Figure 5, system 200'. Figure 8a displays the functionality of multiply-add block 260'. Similarly, Figure 9a displays the functionality of multiply-add block 250'. Figures 8b and 9b display block diagrams of multiply-add blocks 260' and 250', respectively. As in calibration system 200' of Figure 5, the calibration system 200" of Figure 7 utilizes both a digital word representation and a pulse stream density representation of temperature. Consequently, the multiply-add blocks 250' and 260' can be constructed using conventional adders, as is shown in Figures 9b and 8b, respectively. This structure permits a significant saving of logic complexity, resulting in a smaller die area, lower cost implementation. Both multiply-add blocks 250' and 260' output a second order correction to the temperature offset and gain, rather than a first order correction which later undergoes an additional multiplication. Because the temperature of the environment typically changes significantly more slowly than a calibration can be performed, a single multiply-add block may be used to calibrate both offset temperature and sensitivity. Use of a common time multiplexed multiply-add block further reduces the amount of hardware required to calibrate offset and gain TCs. Another advantage of such a multiply-add block is that as the scaling down of silicon chips continues as technology advances, reducing size of the hardware. A block diagram of one embodiment of such a multiply-add block 500 is depicted in Figure 10. The adder 504 and the accumulator 506 perform the multiply operation. Adder 502 performs the add operation. When control signal PI is active, switches 510, 520, and 540 are closed, the output of the multiply-add block 500 is an offset temperature correction coefficient and is routed to register 530. Register 530 outputs the quantity OTC1+ OTC2*T. This quantity can later be again multiplied by the temperature to produce a second order correction term. When the P2 signal is active, switches 512, 522, and 542 are closed, and the multiply-add block 500 performs a sensitivity TC correction which is routed to register 532. The correction coefficient is GTC1 + GTC2*T. This quantity may later be again multiplied by temperature to provide second order corrections. When the P3 signal is active, switches 514, 524, and 544 are closed, the multiply-add block 500 performs a s second order offset temperature correction which is output to register 524. The correction when the P3 switches are closed is (OTC1 + OTC2*2)*T. Finally, when the P4 signal is active, switches 516, 526, and 544 are closed, a second order gain TC correction is performed. The correction is (GTCI + GTC2*T)*T, and is output to register 536. One timing diagram 600 for the phases for each set of control switches is o shown in Figure 11. Although the preferred embodiment discussed here only includes means for providing second order compensation for sensor offset TC and sensitivity TC, one of ordinary skill in the art will know that the present invention can be extended to higher order polynomial corrections. It should also be clear that the present invention can also 5 be used to correct for the temperature coefficient of the sensor linearity error. The sensor linearity error is the deviation of the sensor transfer characteristic (that is, sensor output versus Q where Q is the parameter being sensed) from an ideal straight line. In addition, one of ordinary skill in the art will recognize that a particular sensor may require polynomial compensation of offset TC or of sensitivity TC or of linearity TC or o PSRR and PSRR TC or other performance variables and it would be within the spirit and scope of the present invention to provide polynomial compensation only of those parameters requiring it to meet the accuracy requirements. Although the present invention has been described in accordance with the embodiments shown, one of ordinary skill in the art will readily recognize that there could be variations to the embodiments and those variations would be within the spirit and scope of the present invention. Accordingly, many modifications may be made by one of ordinary skill in the art without departing from the spirit and scope of the appended claims.

Claims: CLAIMS 1. A digital compensation circuit for calibrating a sensor comprising: an interface for receiving data relating to a plurality of parameters; and means coupled to interface circuit for providing polynomial compensation of a temperature coefficient (TC). 2. The compensation circuit of claim 1 in which the polynomial compensation means further comprises: means for providing a first output, the first output being a first value multiplied with a digitized temperature; and means coupled to the first output providing means and the interface circuit for adding a second value using the first output. 3. The circuit of claim 2 in which the TC is a temperature coefficient of the sensitivity of a sensor. 4. The circuit of claim 2 in which the TC is a temperature coefficient of the offset of a sensor. 5. A digital compensation circuit for calibrating a sensor comprising: an interface circuit for receiving data relating to a plurality of parameters; first means coupled to the interface circuit for providing polynomial compensation of a first temperature coefficient (TCI); and 5 second means coupled to the interface circuit for providing polynomial compensation of a second (second order) temperature coefficient (TC n ). 6. The circuit of Claim 5 further wherein the first polynomial compensation means further comprise: o means for providing a first output, the first output being a first value multiplied with a digitized temperature, and first adder or multiplier accumulator means coupled to the first output providing means and the interface circuit for adding a second value with the first output; and wherein the second polynomial compensation means further comprise: means for providing a second output, the second output being a third value multiplied with a digitized temperature; and second adder means coupled to the second output providing means and the interface circuit for adding a fourth value to the second output. 7. The circuit of Claim 6 in wherein the TCI is a temperature coefficient of the sensitivity of the sensor; and the TC n is a temperature coefficient of the sensor offset. 8. The circuit of claim 1 in which the means for providing polynomial compensation further comprise: 5 means for providing a first output, the first output being a first value multiplied with a digitized temperature; means coupled to the first output providing means for providing a second output, the second output being a second value added with the first output; and second multiplying means coupled to the adder means and the interface o circuit for multiplying the second output with the digital temperature. 9. The circuit of Claim 8 wherein a digital temperature is represented by a digital data word or is indicated by a pulse density of a serial bit stream. 5 10. The circuit of claim 9 in which the TC is a temperature coefficient of the sensitivity of a sensor. 0 1 1. The circuit of claim 10 in which the TC is a temperature coefficient of the offset of a sensor. 12. The circuit of claim 2 further comprising: means coupled to the first output providing means and to the adder and multiply accumulator means for multiplexing a plurality of input signals to the first output providing means and to the adder means. 13. The circuit of claim 12 wherein the plurality of signals further comprise: a plurality of temperature coefficient of the sensor offset calibration values; and a plurality of temperature coefficient of the sensor sensitivity values. 14. The circuit of claim 13 wherein the plurality of signals further comprise: a first temperature coefficient of the sensor offset calibration value plus a digitized temperature multiplied by a second temperature coefficient of the sensor offset calibration value; and s a first temperature coefficient of the sensitivity of the sensor value plus a digitized temperature multiplied by a second temperature coefficient of the sensitivity of the sensor value. 15. A method for calibrating a sensor comprising the steps of: o (a) receiving data relating to a plurality of parameters; and (b) providing polynomial compensation of a temperature coefficient (TC). 16. The method of claim 12 in which the polynomial compensation step further comprises: 5 (bl) providing a first output, the first output being a digital temperature multiplied by a first value; (b2) adding a second value to the first output. 17. The method of claim 16 in which the polynomial compensation step 0 further comprises: (bl) providing a first output, the first output being a digital temperature multiplied by a first value; (b2) providing a second output, the second output being a second value added to the first output; and (b3) multiplying the second output by the digital temperature. 18. The method of claim 17 wherein the digital temperature is represented either by a digital word or is indicated by a pulse density of a serial bit stream. 19. A method for calibrating a sensor comprising the steps of: a) receiving data relating to a plurality of parameters; b) providing polynomial compensation of a first temperature coefficient (TCI); and c) providing polynomial compensation of a second temperature s coefficient (TC n ) and higher order. 20. The method of claim 19 in which the polynomial compensation step of the first temperature coefficient further comprises: bl) providing a first output, the first output being a digital o temperature multiplied by a first value; b2) adding a second value to the first output; and wherein the step of providing polynomial compensation to a second temperature coefficient comprises: cl) providing a first output, the first output being a digitized 5 temperature multiplied by a first value; c2) adding a second value to the first output.

Inventors: YUNUS MOHAMMAD, YUNUS, MOHAMMAD
Applicants: INTEGRATED SENSOR SOLUTIONS
Application year: 1998
Main classification: G01P21
IPC codes: G01D3