Abstract:
A method for compensating for errors in reference current ratios in a multi-slope A-D converter allows determining multiplying factors for correcting the measured digital values of input analog signals that are being measured. The multiplying factors are determined using the components of the A-D converter.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to calibration of an analog-to-digital converter, and especially to calibration of third and higher order integration periods of a multi-slope analog-to-digital (A-D) converter. 
     In A-D conversion, a multi-slope type A-D converter is frequently used for increasing conversion speed and resolution. A simple type of the multi-slope A-D converter is a triple slope type A-D converter. A voltage-to-time diagram of the triple slope A-D converter is shown in FIG. 1. During a first integration period T 1  an input analog signal is integrated, to generate a rising slope at the output of the integrator which begins at t 0  and ends at t 1 . 
     At time t 1  a second integration period T 2  begins, and a first reference current of opposite polarity to the input signal is supplied to the integrator, so that the integrated signal begins to fall linearly at time t 1  as shown in FIG. 1A. When the integrated signal reaches a predetermined reference level at time t 2 , in this case zero voltage, the supplying of the first reference current to the integrator is stopped in synchronism with the first falling edge of a clock signal after t 2 , that is at time t 5 . 
     After the second integration period T 2 , a third integration period T 3  begins, during which a second reference current is integrated for improving conversion resolution. The second reference current has opposite polarity to the first reference current and also has a smaller magnitude than the first reference current. Thus during the third integration period T 3 , the integrated signal has a rising slope at a relatively smaller angle as compared with that of the second integration period T 2 . The third integration period T 3  ends at time t 4  when the integrated signal reaches the reference potential. By measuring the second integration period T 2  and the third integration period T 3  by counting clock signals provided during those periods, a digital signal corresponding to the input analog signal is obtained. 
     Since the second reference current may be selected smaller than the first reference current, for example by a factor of 1000, the slope of the third integration period may be made 1/1000th of the slope of the second integration period, and thus the resolution of the third integration period increases by 1000 times over that of the second integration period. Thus the A-D conversion resolution may be increased by employing a plurality of reference currents. 
     For converting an analog signal to a corresponding digital signal accurately in a multi-slope A-D converter, the first reference current should be adjusted correctly and it should be stable enough to maintain its accuracy for the period of measurement. Further, for achieving conversion accuracy, the ratios of the first, second, third, etc., reference currents should be correct and stable. A deviation from the correct ratio causes error when counting during the third or higher order integration periods because the digital data is calculated on the assumption that the ratios are correct. 
     In the prior art those ratios are adjusted manually, for example, by variable resistors in the reference current generators. Thus it is time consuming to adjust these ratios to be strictly correct. Also in prior art, for keeping those ratios within a high range of accuracy, it is necessary to use expensive parts and circuits. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a calibration method which is capable of compensating for errors caused by the incorrectness of the ratios of the reference currents. 
     It is another object of the present invention to provide a multi-slope A-D converter which is capable of calibrating itself automatically. 
     It is another object of the present invention to provide a multi-slope A-D converter which is capable of providing digital signals with high accuracy even if there exists errors in the ratios of the reference currents. 
     It is a further object of the present invention to provide a multi-slope A-D converter which is capable of A-D conversion with high accuracy while using inexpensive parts and circuits. 
     According to this invention, for calibrating the ratio of the first reference current to the second reference current, for example, at first the first reference current is integrated from ground potential for a predetermined fixed period, and after that the second reference current is integrated in the opposite direction until the integrated signal reaches ground potential. The time period during which the second reference current is integrated is measured by counting the clock pulses provided during this period. Since the actual value of the time period, during which the second reference current is integrated, is known, a multiplying factor may be obtained from the measured value and the actual value. 
     The multiplying factor thus obtained is used to calibrate the data measured during the third integration period of the A-D conversion process by multiplying the factor by the measured data. In the same manner, calibration for higher order integration periods may be achieved. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIGS. 1A-G show waveform illustrating the operation of a triple slope A-D converter of FIG. 2. 
     FIG. 2 is a block diagram of a triple slope A-D converter in accordance with a preferred embodiment of the invention. 
     FIGS. 3A-B, D and G-E are waveforms illustrating the operation of acquiring the multiplying factor in the triple slope A-D converter of FIG. 2. 
     FIG. 4 shows waveforms for explaining the relation between the correct value and the measured value for the calibration process. 
     FIG. 5 is a flowchart of the operation of the A-D conversion process and the calibration process in the triple slope A-D converter of FIG. 2. 
     FIGS. 6A-E and G-H are waveforms illustrating the operation of a multi-slope A-D converter employing four integration periods. 
     FIGS. 7A, C-E and H-I are waveforms illustrating the operation of obtaining the calibrated multiplying factor in a multi-slope A-D converter operating according to the waveforms of FIGS. 6A-E and G-H. 
     FIG. 8 is a flowchart of the operation of an A-D conversion process and a calibration process as performed in a multi-slope A-D converter operating according to the waveforms of FIGS. 6A-E and G-H. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 2 shows a preferred embodiment of the present invention. An input analog voltage V x  is provided at an input terminal 11 and converted to a corresponding current I x  by a voltage to current converter 12. The converted analog current I x  is provided to an integrator 14 through a switch 13 which is controlled by a signal from a switch drive circuit 32. The integrator 14 is comprised, for example, of an operational amplifier 15 and an integrating capacitor 16 which is connected between an output and an inverting input of the operational amplifier 15. 
     The reference current sources 17,18 generate the reference currents I 1 , I 2  which are selectively provided to the integrator 14 through switches 21, 22, respectively. The output signal from the capacitor 14 is compared with a predetermined reference level such as ground potential by a comparator 23. When the integrated output crosses the reference level, the comparator 23 changes its state for use in determining the end of each integration period. An output of the comparator 23 is connected to a gate signal generator 33 which generates gate signals T 2  and T 3  which gate a clock signal p. The gate signals T 2 , T 3  are at high level during the second and third integration periods respectively and are supplied to a switch drive circuit 37 which controls the switches 21, 22 according to the gate signals T 2 , T 3 , respectively. 
     In this embodiment an A-D conversion and a calibration are operated according a program previously stored in a program memory 25. A CPU 24 reads out the instructions of the program stored in the program memory 25 through an address bus 26, and in accordance with the instructions the CPU 24 controls the entire process of the operation of an A-D conversion including the calibration. The CPU 24 controls the writing and reading at random access memory 27 and provides address data to a decoder 28 through the address bus 26. In response to signals from the decoder 28, a control signal generator 29 generates control signals and provides them to the switch drive circuit 32, to the gate signal generator 33 to generate gate signals T 2  and T 3 , and to the counter 34. The CPU 24 also executes all necessary calculations with data stored in the random access memory 27. 
     The output signal from the comparator 23 and clock pulses of the clock signal p from the clock signal generator 35 are provided to the gate signal generator 33. The clock signal generator 35 also provides the clock signal p to the CPU 24 and to a NAND gate 36. The gate signals T 2  and T 3  generated by the gate signal generator 33 are also supplied via an OR gate 38 to the NAND gate 36. Accordingly, during the second integration period T 2  and the third integration period T 3 , the clock signal p is provided to the counter 34 whereby the number of clock pulses is the counted data stored in the random access memory 27 through a buffer 39 under the control of the CPU 24. 
     An A-D conversion procedure is performed as follows with reference to FIGS. 1 and 2. At time t 0  a control signal which indicates the first integration period T 1  as shown in FIG. 1C is generated by the control signal generator 29 and closes the switch 13 through the switch drive circuit 32. Accordingly, the input analog current I x  is applied to the integrator 14 via the switch 13 at time t 0  and thus the integrated output signal begins rising linearly as illustrated in FIG. 1A. 
     At the end of the first integration period T 1  whose time period is fixed, that is at time t 1 , the control signal of FIG. 1C is changed to low level so as to open the switch 13 and to disconnect the input analog current I x  from the integrator 14. 
     Simultaneously, at time t 1  the switch 21 is closed by the gate signal shown in FIG. 1D so as to provide the first reference current I 1  to the integrator 14 and thus the second integration period T 2  is started. Accordingly, from the time t 1  the output from the integrator 14 goes down since the first reference current I 1  has the opposite polarity from that of the input analog current I x . 
     The output of the comparator 23 is at high level until the integrated signal reaches the zero potential at time t 2 , at which time the output of the comparator 24 changes to low level as in FIG. 1E. The gate signal of FIG. 1D is changed to low level by the first falling edge of a clock pulse following the changing of the state of the comparator 23. Thus, the switch 21 opens and the second integration period T 2  is finished at time t 5  by the change of the gate signal of FIG. 1D to low level. 
     During the second integration period T 2 , the clock pulses provided through the NAND gate 36 are counted by the counter 34 and the counted data N 1  is stored in the random access memory 27. After the data is stored in the memory 27, a reset pulse shown in FIG. 1F generated by the control signal generator 29 resets the counter 34 for counting the clock pulses during the third integration period T 3 . 
     In synchronism with the falling edge of the first clock pulse following the reset signal, the third integration T 3  begins, during which the switch 22 is closed and the second reference current I 2  is integrated by the integrator 14. Since the second reference current I 2  has the opposite polarity from that of the first reference current I 1  and is smaller in absolute magnitude than the first reference current I 1 , the integrated signal increases slowly during the third integration period T 3 . 
     The absolute magnitude of the second reference current I 2  is selected to be, for example, 1/1000th of the absolute magnitude of the first reference current I 1 . Thus, during the third integration period T 3 , the slope of the integrated signal is a thousand times less steep than that of the integrated signal of the second integration period T 2 . Thus the number of clock pulses counted by the counter 34 during the third integration period is increased a thousand times over those counted within the second integration period, for the same voltage difference at the output of the integrator 14. 
     When the integrated signal reaches zero voltage the output of the comparator 23 changes from low level to high level and according to this change the gate signal of FIG. 1G is turned to low level, thus completing the third integration period. During the third integration period T 3  the clock pulses are counted by the counter 34 and the count value N 2  is stored in the random access memory 27. 
     From the stored data N 1  and N 2  the converted digital value of the input analog signal is obtained as being proportional to the sum 
     
         N.sub.1 -KN.sub.2                                          (1) 
    
     where K is a multiplying factor which indicates the ratio of the first and second reference currents I 1 , I 2 , in this case 1/1000. When the ratio of the actual reference currents I 1  to I 2  is different from a predetermined nominal value, an error is induced in the converted digital data if K is also not changed. To compute the exact digital value of the analog signal, it is necessary to measure one of the reference currents, for instance, the first reference current I 1  under the present formalism. 
     Thus, in this invention the factor K is calibrated by the calibration process described below. A calibration process according to this invention is performed periodically during the operation of A-D conversions, for example once in every hundred A-D conversions. Waveforms showing the operation of a calibration process are shown in FIGS. 3A-B, D-E and G and 4. A flowchart of the operation of an A-D conversion process and a calibration process as performed in this embodiment is illustrated in FIG. 5. 
     At the beginning of the calibration, that is at time t 0  &#39;, the switch 21 is turned ON by the gate signal shown in FIG. 3D, in synchronism with a clock pulse, and the first reference current I 1  is provided to the integrator 14. Thus, the integrated signal falls linearly from zero voltage as shown in FIG. 3A. 
     This integration period is fixed, for example at 100 microseconds corresponding to a certain number of counts of the clock signal say l 1 , and at the end of the period, that is at time t 1 , the switch 21 is turned OFF and the switch 22 is turned ON instead so as to provide the reference I 2  to the integrator 14. Thus, the output from the integrator 14 begins to rise at time t 1  &#39; and continues to rise until it crosses the reference potential, thus defining the measured period T m , having a corresponding number of counts, say n 2 . When the output from the integrator 14 crosses zero voltage at time t 2  &#39;, the output of the comparator 23 changes to high level so that the switch 22 is opened by the gate signal of FIG. 3G. During this measured period T m  the clock pulses are counted by the counter 34 and the counted data is stored in the memory 27. 
     The frequency of the clock signal p may for instance be 1 MHz, the period of time during which the first reference current I 1  is integrated may be 100 microseconds, and the nominal ratio of the first reference current I 1  to the second reference current I 2  may ideally be 1000 to 1. If the actual ratio of the reference currents I 1  to I 2  is exactly 1000, the number n 2  of counted clock pulses during the period T m  will therefore be 100,000. When the ratio of I 1  to I 2  is different from 1000, the count during period T m  also varies from 100,000, so that an error ΔT arises in the measued period T m . Thus the measured period T m  is the sum of a correct value T 0  and the error ΔT, T m  =T 0  +ΔT. 
     Since the measured time period T m  is inversely proportional to the second reference curent I 2 , the calibrated multiplying factor K is obtained by the following equation. ##EQU1## Namely, the factor K thus obtained is the actual ratio of the counts l 1  /n 2  during the calibration, or of the reference currents I 1  to I 2 , and when the error ΔT is zero the multiplying factor K is exactly 1/1000. The calibrated multiplying factor K is stored in the memory 27 and is used in the A-D conversion process for compensating the data N 2 , obtained during the third integration period of the conversion operation, by multiplying the data N 2  by the factor K. 
     More details of the relation between the calibration process and the second and third integration periods T 2 , T 3  of the A-D conversion process are illustrated in FIG. 4. Namely, the second integration period T 2  (t 2  to t 3 ) and the third integration period T 3  (t 3  to t 4 ) of the A-D conversion process shown in FIG. 1, are superimposed on the fixed period (t 0  &#39; to t 1  &#39;) and the period t m  (t 1  &#39; to t 2  &#39;) of the calibration process for convenience of explanation. Also the period T a  shown in FIG. 1 is excluded for simplicity. 
     In the A-D conversion process, the first reference current I 1  is integrated during the time interval from t 2  to t 5  so that the integrated signal becomes V 1  at time t 5  and after that the second reference current I 2  is integrated during the time interval from t 3  to t 4 . If a difference from the correct value exists in the ratio of the first reference current I 1  to the second reference current I 2 , there exists an error in the measured value of the third integration period T 3 . Thus, the measured period of time T 3 , that is the data N 2  of the equation (1), is the sum of a correct period of time T 30  and the error ΔT 3 , namely T 3  =T 30  +ΔT 3 . 
     In the calibration process, the first reference current I 1  is integrated during the fixed period from t 0  &#39; to t 1  &#39;, so that the integrated signal becomes V 0  at time t 1  &#39; and after that the period T m  starts. 
     Since the same reference currents I 1  and I 2  are integrated both in the A-D conversion process and in the calibration process, the line t 0  &#39;V 0  and the line t 2  V 1  are parallel to each other, the line V 0  t 2  &#39; is parallel to the line V 1  t 4 , and the line V 0  C is parallel to the line V 1  B. Thus, the ratios ΔT/T 0  and ΔT 3  /T 30  have equal values. By multiplying the calibrated multiplying factor K acquired from the equation (2) by the measured period of time T 3  for obtaining KN 2  of equation (1), ##EQU2## Thus regardless of the error ΔT 3 , the correct value of third integration period T 30  is obtained. 
     In the same way as the procedure described above for a triple-slope A-D converter, this invention is applicable to a multi-slope A-D converter employing a higher order integration. 
     FIG. 6 shows a waveform illustrating the operation of a multi-slope A-D converter employing four integrating slopes. In this embodiment a third reference current I 3  which has the opposite polarity of I 2  is provided to be integrated during the fourth integration period T 4 . According to a gate signal shown in FIG. 6H, the fourth integration period T 4  starts at time t 6  and the integration of the third reference current I 3  accumulates in the opposite direction than the direction of the third integration period T 3 . The third reference current I 3  is selected to be smaller in magnitude than the second reference current I 2  for increasing conversion resolution. 
     The pulses of the clock signal p are counted by the counter 34 during the fourth integration period T 4  and the count value N 3  is stored in the memory 27. The A-D converted digital value of the input analog signal is obtained as being proportional to the sum 
     
         N.sub.1 -K.sub.1 N.sub.2 +K.sub.1 K.sub.2 N.sub.3          (4) 
    
     wherein K 1  and K 2  are multiplying factors, that is, K 1  =I 2  /I 1  =l 1  /n 2  and K 2  =I 3  /I 2  =l 2  /n 3 , in which n i  is the respective number of counts for the ith reference current during the count period T m  for each calibration of the two current sources I 2  and I 3  in terms of I 1  and I 2 , respectively, as described above for I 1  and I 2  in connection with equations (1) to (3) above, and l 1  and l 2  are the respective fixed numbers of counts for the respective calibrations, both of which may typically be taken to be 100 microsec, for example. This result can be generalized to the case of an (m+1)- slope A-D converter having m reference currents, for which the digital value of the analog signal is proportional to ##EQU3## wherein K o  =1 and K j  =l j-1  /n h  =I j  /I j-1  is the multiplying factor for the jth reference current. Of course, the coefficient of each count value N i  is a respective function of the multiplying factors K 1  to K m-1 , with the coefficient of N 1  being unity. 
     FIGS. 7A, C-E and H-I are waveforms illustrating the operation of obtaining the calibrated multiplying factors K 1  and K 2  in the multi-slope A-D converter employing four integrating slopes. FIG. 8 shows a flowchart of the operation of the A-D conversion process and of the calibration process performed in the multi-slope A-D converter of FIG. 6. For a fixed time period of for instance 100 microsec, from time t 0  &#39; to t 1  &#39;, the first reference current I 1  is integrated and after the time t 1  &#39; the second reference current I 2  is integrated until the integrated signal reaches ground potential. This period of time T m1  (from t 1  &#39; to t 2  &#39;) is measured by the counter 34 counting the clock pulses p. The calibrated multiplying factor K 1  is then acquired by calculating 100/T m1  or the ratio of the respective counts. 
     Then, during a subsequent fixed time period of for instance 100 microsec also, that is from t 3  &#39; to t 4  &#39;, the second reference current I 2  is integrated, and after the time t 4  &#39; the third reference current I 3  is integrated until the integrated signal reaches ground potential. This time period T m2  (from t 4  &#39; to t 5  &#39;) is measured by the counter counting the clock pulses of the clock signal p. The calibrated multiplying factor K 2  is then obtained by calculating 100/T m2 . Accordingly the desired digital value of the input analog signal can be provided. 
     Many variations and modifications of the present invention will be obvious to a skilled worker in view of the present disclosure. For instance, reference voltages other than ground potential could be utilized to trigger the ending of each integration period for integrating reference, so that the successive reference currents would not have to have alternating polarities. Also the counting of clock pulses during different integration periods can involve halting the counting on crossing different reference voltage levels, as long as the difference in voltage between such different voltage levels is known. Also, it is possible to integrate other than the first (largest absolute magnitude reference current), and for different periods of time, when determining the ratios of counts for the ratios of currents. Thus, the calibration also results with appropriate modification if I 1  is integrated for the predetermined 100 microseconds, followed by counting the pulses while integrating I 3  to bring the integration signal to some reference voltage, although some polarity inversion is needed in the case of alternating polarities in the reference currents.