Differential circuit calibration apparatus and method
11112481 · 2021-09-07
Assignee
Inventors
Cpc classification
H02M3/07
ELECTRICITY
H03M1/00
ELECTRICITY
H03M1/765
ELECTRICITY
G01R35/005
PHYSICS
H03F2203/45512
ELECTRICITY
H03G1/0088
ELECTRICITY
H03M1/1057
ELECTRICITY
International classification
G01R35/00
PHYSICS
H03M1/00
ELECTRICITY
H02M3/07
ELECTRICITY
Abstract
An apparatus for calibrating a differential circuit that includes a differential integrator having an input, a gain, and an output connected to a comparator. The differential integrator output is chargeable to a threshold prior to an integration period. The differential integrator integrates the input during the integration period such that the differential integrator output goes toward zero from the threshold. The comparator detects the output of the differential integrator reaching zero. The apparatus includes a closed-loop gain trim circuit to perform a coarse calibration to adjust and set the gain of the differential integrator and a reference generator that generates the threshold to which the differential integrator output is pre-charged. The reference generator is trimmable during a fine calibration to adjust and set the threshold to correct for residual gain error in the differential circuit remaining after the coarse calibration is performed.
Claims
1. An apparatus for calibrating a differential circuit that includes a differential integrator having an input, a gain, and an output connected to a comparator, wherein the differential integrator output is chargeable to a threshold prior to an integration period, wherein the differential integrator integrates the input during the integration period such that the differential integrator output goes toward zero from the threshold, wherein the comparator detects the output of the differential integrator reaching zero, the apparatus comprising: a closed-loop gain trim circuit to perform a coarse calibration to adjust and set the gain of the differential integrator; a reference generator that generates the threshold to which the differential integrator output is pre-charged; and wherein the reference generator is trimmable during a fine calibration to adjust and set the threshold to correct for residual gain error in the differential circuit remaining after the coarse calibration is performed.
2. The apparatus of claim 1, wherein the input of the differential integrator senses a current drawn from a voltage source/supply; and wherein the differential circuit is operable to detect the over-threshold condition of an average current drawn from the voltage source/supply if the comparator detects the output of the differential integrator reaches zero.
3. The apparatus of claim 2, wherein after the coarse calibration and fine calibration are performed, the differential circuit is configured to detect the over-threshold condition of the average current drawn from the voltage source/supply with a range of error less than 0.3%.
4. The apparatus of claim 2, wherein the input of the differential integrator senses the current drawn from the voltage source/supply across a sense resistor; wherein a resistance value of the sense resistor is configurable to a plurality of different values; and wherein the threshold generated by the reference generator is scalable to a plurality of different values corresponding to the plurality of different configurable resistance values of the sense resistor.
5. The apparatus of claim 1, wherein the fine calibration is performed by sourcing a known current value to the differential circuit for a known value of the integration period and adjusting the threshold in an iterative manner until successive transitions of the output of the comparator are detected.
6. The apparatus of claim 1, wherein the reference generator comprises a trimmable digital-to-analog converter (DAC).
7. The apparatus of claim 6, wherein the fine calibration applies a successive approximation register (SAR) algorithm to the trimmable DAC.
8. The apparatus of claim 6, wherein the reference generator is programmable to a plurality of different values of the threshold; and wherein the coarse calibration and fine calibration are performed at a single programmed value of the plurality of different values of the threshold.
9. The apparatus of claim 8, wherein resistive elements of the DAC are accurately sized to achieve a range of error less than 0.3% for detection of an over-threshold condition for each of the plurality of different values of the threshold after performance of the coarse calibration and fine calibration at the single value.
10. The apparatus of claim 1, wherein the coarse calibration comprises adjusting and setting a capacitance of an integrating capacitor of the differential integrator or an integrating resistor of the differential integrator.
11. The apparatus of claim 1, wherein single-ended outputs of the differential integrator concurrently cross a common mode reference when the output of the differential integrator reaches the zero value; wherein the reference generator converts the common mode reference to the threshold; and wherein the reference generator is trimmable during the fine calibration to adjust and set the threshold by adjusting and setting the common mode reference.
12. The apparatus of claim 1, wherein the reference generator is adjustable to support a plurality of different values of the integration period.
13. A method for calibrating a differential circuit that includes a differential integrator having an input, a gain, and an output connected to a comparator, wherein the differential integrator output is chargeable to a threshold prior to an integration period, wherein the differential integrator integrates the input during the integration period such that the differential integrator output goes toward zero from the threshold, wherein the comparator detects the output of the differential integrator reaching zero, the method comprising: performing, in a closed-loop manner, a coarse calibration to adjust and set the gain of the differential integrator; and performing a fine calibration of a trimmable reference generator that generates the threshold to which the differential integrator output is pre-charged by adjusting and setting the threshold to correct for residual gain error in the differential circuit remaining after the coarse calibration is performed.
14. The method of claim 13, wherein the input of the differential integrator senses a current drawn from a voltage source/supply; and wherein the differential circuit is operable to detect the over-threshold condition of an average current drawn from the voltage source/supply if the comparator detects the output of the differential integrator reaches zero.
15. The method of claim 14, wherein after the coarse calibration and fine calibration are performed, the differential circuit is configured to detect the over-threshold condition of the average current drawn from the voltage source/supply with a range of error less than 0.3%.
16. The method of claim 14, wherein the input of the differential integrator senses the current drawn from the voltage source/supply across a sense resistor; wherein a resistance value of the sense resistor is configurable to a plurality of different values; and wherein the threshold generated by the reference generator is scalable to a plurality of different values corresponding to the plurality of different configurable resistance values of the sense resistor.
17. The method of claim 13, wherein said performing the fine calibration comprises sourcing a known current value to the differential circuit for a known value of the integration period and adjusting the threshold in an iterative manner until successive transitions of the output of the comparator are detected.
18. The method of claim 13, wherein the reference generator comprises a trimmable digital-to-analog converter (DAC).
19. The method of claim 18, wherein said performing the fine calibration comprises applying a successive approximation register (SAR) algorithm to the trimmable DAC.
20. The method of claim 18, wherein the reference generator is programmable to a plurality of different values of the threshold; and wherein said performing the coarse calibration and the fine calibration are performed at a single programmed value of the plurality of different values of the threshold.
21. The method of claim 20, wherein resistive elements of the DAC are accurately sized to achieve a range of error less than 0.3% for detection of an over-threshold condition for each of the plurality of different values of the threshold after performance of the coarse calibration and fine calibration at the single value.
22. The method of claim 13, wherein said performing the coarse calibration comprises adjusting and setting a capacitance of an integrating capacitor of the differential integrator or an integrating resistor of the differential integrator.
23. The method of claim 13, wherein single-ended outputs of the differential integrator concurrently cross a common mode reference when the output of the differential integrator reaches the zero value; wherein the reference generator converts the common mode reference to the threshold; and wherein said performing a fine calibration by adjusting and setting the threshold comprises adjusting and setting the threshold by adjusting and setting the common mode reference.
24. The method of claim 13, wherein the reference generator is adjustable to support a plurality of different values of the integration period.
25. A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring an apparatus for calibrating a differential circuit that includes a differential integrator having an input, a gain, and an output connected to a comparator, wherein the differential integrator output is chargeable to a threshold prior to an integration period, wherein the differential integrator integrates the input during the integration period such that the differential integrator output goes toward zero from the threshold, wherein the comparator detects the output of the differential integrator reaching zero, wherein the instructions cause or configure the apparatus to perform operations comprising: performing, in a closed-loop manner, a coarse calibration to adjust and set the gain of the differential integrator; and performing a fine calibration of a trimmable reference generator that generates the threshold to which the differential integrator output is pre-charged by adjusting and setting the threshold to correct for residual gain error in the differential circuit remaining after the coarse calibration is performed.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DETAILED DESCRIPTION
(10)
(11) The average current detector 12 includes a differential integrator INT whose output is provided to a comparator COMP whose operation is described in more detail below. A sense resistor R.sub.SNS of the average current detector 12 senses the supply current I.sub.VP. In one embodiment, the sense resistor R.sub.SNS is a resistor whose resistance is highly temperature-insensitive (e.g., tantalum resistor, tantalum nitride resistor, or other low temperature coefficient resistor). The terminals of the sense resistor R.sub.SNS are coupled to respective inputs of the differential integrator INT through a pair of integrating resistors R.sub.INT. A pair of integrating capacitors C.sub.INT connect inputs to outputs of the differential integrator INT. More specifically, a first integrating capacitor C.sub.INT connects the non-inverting input to the inverting output of the differential integrator INT and a second integrating capacitor C.sub.INT connects the inverting input to the non-inverting output, as shown in
(12) The gain for the differential integrator INT is calibrated by the calibration method and apparatus in accordance with embodiments of the present disclosure so that high accuracy requirements for providing the average current are satisfied. The calibration of the gain is performed by both a coarse trim and a fine trim that are applied on the gain of the differential integrator INT. In one embodiment, after the coarse and fine calibration are performed, the average current in the integration period may be known with greater than 1% accuracy.
(13)
(14) As shown in the embodiment of
(15) The magnitude of the integrated value of the supply current I.sub.VP by the differential integrator INT (i.e., excluding output inversion and pre-charging the comparator COMP input) is given by equation (1).
(16)
where F.sub.SW is the switching frequency, which is the reciprocal of the integration period T.
(17)
V.sub.OFF=V.sub.TH+−V.sub.TH− (2)
(18) As shown, the output V.sub.OUT_INT of the differential integrator INT may vary according to the precision of the trimmable integrating capacitors C.sub.INT. In one embodiment, the gain of differential integrator INT may be adjusted by adjusting the capacitance of C.sub.INT such that the zero-crossing of the output V.sub.OUT_INT of the differential integrator INT may be calibrated to within a coarse range of plus or minus 3.5%. In an alternate embodiment, trimmable resistors may be employed in place of the trimmable integrating capacitors C.sub.INT in order to adjust the gain of differential integrator INT.
(19) The output V.sub.OUT_INT of the differential integrator INT is expressed in equation (3)
(20)
where I.sub.DC is the current drawn across the sense resistor, R.sub.SNS is the resistance of the sense resistor, R.sub.INT is the resistance of the integrating resistors, C.sub.INT is the adjusted capacitance of the integrating capacitors, and T is the period over which the differential integrator INT integrates the current I.sub.DC. I.sub.DC and T are known quantities.
(21) By making adjustments to the capacitance value of integrating capacitors C.sub.INT and by, in effect, adjusting the slope of the respective line of the output V.sub.OUT_INT of differential integrator INT, a coarse range for the differential integrator gain is achieved. For example, by making a coarse trim, process variations for the components/elements used in the average current detector 12 are trimmed within a coarse range. However, for purposes of average current going into a charge pump (e.g., from current from a battery to a charge pump), the coarse range and coarse trim may not be enough to satisfy high accuracy requirements. Thus, further adjusting or tuning of the gain of the differential integrator INT may be needed. Therefore, a fine trim is also performed as described below.
(22)
(23) The offset V.sub.OFF is adjusted by adjusting the generated common mode reference V.sub.CM, e.g., as described in more detail below with respect to
(24)
(25) The comparator reference generator 52 includes first and second operational amplifiers AMP1 and AMP2 that receive common mode voltage reference V.sub.CM on their non-inverting inputs. Amplifier AMP1 generates the positive threshold voltage V.sub.TH+, and amplifier AMP2 generates the negative threshold voltage V.sub.TH−. A feedback resistor R.sub.FB connects the output and the inverting input of amplifier AMP1. A stack of eight resistors R.sub.TH in series connect the outputs of AMP1 and AMP2. The inverting input of AMP2 is connected halfway down the stack of series resistors R.sub.TH. An offset resistor R.sub.OFFSET is connected between ground and the inverting input of amplifier AMP1 and is used to set the differential threshold voltage V.sub.TH+−V.sub.TH−, as described in more detail below. Finally, K DAC resistors R.sub.DAC in parallel are connected to the inverting input of amplifier AMP1 and by switches to ground. K specifies the number of closed switches, i.e., the number of connected DAC resistors R.sub.DAC. In the embodiment of
(26) The values of V.sub.TH+ and V.sub.TH− may be expressed by equations (4) and (5).
(27)
In one embodiment, to set a current level of 1.6 A, K=0; to set a current level of 3.6 A, K=40. Additionally, the feedback resistor R.sub.FB value is programmable to adjust the differential thresholds to support multiple switching frequencies, e.g., 1.5 MHz, 1.7 MHz, 2 MHz, 2.4 MHz, 3 MHz, and 4 MHz. In one embodiment, after calibration at 3.6 A, a plus or minus 30 mA accuracy is met at 1.6 A. In one embodiment the differential threshold voltage V.sub.OFF (i.e., V.sub.TH+−V.sub.TH−) may be scaled by factors of 0.75×, 0.5× and 0.25×, as shown in
(28)
(29) The single-ended reference generator 62 includes a fine trim decoder 64 that receives a digital trim code and responsively generates trim selection levels that are provided to a switch block 66 that outputs the single ended reference voltage V.sub.CM. In one embodiment, the trim code is a 6-bit code. The single-ended reference generator 62 also includes a current source connected between a voltage source V.sub.P (e.g., bandgap voltage) and a stack of series resistors that is connected to ground. Between each pair of resistors is a tap, which are denoted tap<0>, tap<1>, tap<2> through tap<n−1>, tap<n>. The taps are provided as inputs to the switch block 66 which selects the taps based on the trim selection levels to produce a summed voltage that is the single ended reference voltage V.sub.CM. The calibration sequence updates the trim code which updates the trim selection level which updates the value of the single ended reference voltage V.sub.CM, e.g., as described in more detail with respect to
(30)
(31)
(32) Ideally, the differential threshold reference needs to be a value given by expression (7) to detect an integrated current at a threshold of 3.6 A, the differential threshold reference needs to be a value given by expression (8) to detect an integrated current at a threshold of 1.6 A, and the differential threshold reference needed to detect an integrated current at intervening threshold values is along the dotted line shown on the graph between these two points, which are given by equation (6).
(33)
(34) As shown on the graph by a line labeled pre-gain calibration, prior to gain calibration the slope and the offset of the line may vary significantly from the ideal line. However, advantageously, the slope and the offset of the line are much closer to the ideal line after the coarse and fine calibration are performed.
(35) Finally, although the current sense system 22 may be programmed to detect an over-threshold condition of the integrated supply current I.sub.VP for multiple current threshold values (e.g., via programmable K of
(36)
(37) At block 802, in a system (e.g., system 10 of
(38) At block 804, a sense resistor path (e.g., of current sense path 22 of
(39) At block 806, a supply voltage (e.g., supply voltage V.sub.P of
(40) At block 808, a current is forced into the supply voltage pin (e.g., current I.sub.DC of
(41) At block 812, a coarse calibration is performed on the sense resistor path, e.g., obtaining a trim code of the variable capacitance integrating capacitors C.sub.INT of
(42) At block 814, a fine calibration is performed on the current sense path 22, e.g., obtaining a trim code of the resistive DAC of the single-ended reference generator 62 of
(43) At block 816, the sense resistor path is turned off.
(44)
(45) At block 902, an initial trim code is set for the resistive DAC of the single-ended reference generator 62 of
(46) At block 904, the comparator reference generator 52 of
(47) At block 906, the differential integrator INT integrates the current I.sub.DC (e.g., 3.6 A) for a full integration period T. Operation proceeds to decision block 908.
(48) At decision block 908, if the output V.sub.OUT_COMP of the comparator COMP is high, operation proceeds to block 912; otherwise, operation proceeds to block 914.
(49) At block 912, the trim code of the resistive DAC is increased to increase the level of the single-ended voltage reference V.sub.CM. Operation proceeds to decision block 916.
(50) At block 914, the trim code of the resistive DAC is decreased to decrease the level of the single-ended voltage reference V.sub.CM. Operation proceeds to decision block 916.
(51) At decision block 916, if there was a transition of the level of the output V.sub.OUT_COMP of the comparator COMP from the current instance of blocks 902 to blocks 908 to the previous instance of blocks 902 to blocks 908, which indicates the desired trim code has been obtained, operation proceeds to block 918; otherwise, operation returns to decision block 908 to continue iterating to search for the desired trim code.
(52) At block 918, the current trim code is saved as the final trim code.
(53) It should be understood—especially by those having ordinary skill in the art with the benefit of this disclosure—that the various operations described herein, particularly in connection with the figures, may be implemented by other circuitry or other hardware components. The order in which each operation of a given method is performed may be changed, unless otherwise indicated, and various elements of the systems illustrated herein may be added, reordered, combined, omitted, modified, etc. It is intended that this disclosure embrace all such modifications and changes and, accordingly, the above description should be regarded in an illustrative rather than a restrictive sense.
(54) Similarly, although this disclosure refers to specific embodiments, certain modifications and changes can be made to those embodiments without departing from the scope and coverage of this disclosure. Moreover, any benefits, advantages, or solutions to problems that are described herein with regard to specific embodiments are not intended to be construed as a critical, required, or essential feature or element.
(55) Further embodiments likewise, with the benefit of this disclosure, will be apparent to those having ordinary skill in the art, and such embodiments should be deemed as being encompassed herein. All examples and conditional language recited herein are intended for pedagogical objects to aid the reader in understanding the disclosure and the concepts contributed by the inventor to furthering the art and are construed as being without limitation to such specifically recited examples and conditions.
(56) This disclosure encompasses all changes, substitutions, variations, alterations, and modifications to the example embodiments herein that a person having ordinary skill in the art would comprehend. Similarly, where appropriate, the appended claims encompass all changes, substitutions, variations, alterations, and modifications to the example embodiments herein that a person having ordinary skill in the art would comprehend. Moreover, reference in the appended claims to an apparatus or system or a component of an apparatus or system being adapted to, arranged to, capable of, configured to, enabled to, operable to, or operative to perform a particular function encompasses that apparatus, system, or component, whether or not it or that particular function is activated, turned on, or unlocked, as long as that apparatus, system, or component is so adapted, arranged, capable, configured, enabled, operable, or operative.