Abstract:
Method and circuits enable measuring output current in DC/DC converters operating in pulse frequency modulation (PFM) mode and in pulse width modulation (PWM) mode. The method is applicable to DC/DC converters using an inductor at the output. Current is sampled on one pass transistor only. The DC/DC converter disclosed turns a PMOS transistor off when the output current reaches its current limit.

Description:
TECHNICAL FIELD 
       [0001]    This disclosure relates generally to DC-to-DC converters and relates specifically to a method to measure output current in buck converters operating in pulse frequency modulation (PFM) mode and in pulse width modulation (PWM) mode. 
       BACKGROUND 
       [0002]    Buck converters typically run in one of two modes: PFM (pulse frequency modulation) or PWM (pulse width modulation). 
         [0003]    PFM mode is typically used for low load currents. In PFM mode the buck turns on a PMOS high-side switch when the output voltage falls below a reference voltage. The PMOS high-side switch is then turned off when the current in the coil reaches a threshold value (sleep current limit). A NMOS low-side switch is turned on when the PMOS high-side switch is turned off. The NMOS low-side switch is then turned off when the current in the coil is fully discharged. PFM mode is typically not used for large currents as the current limit is normally set low to maximize efficiency. 
         [0004]    There is a general requirement for buck converters to have the output current measured—this measurement is often needed by the system in which the converter is integrated. Typically a buck only measures current only either on the PMOS or the NMOS. This means that the output current may only be measured either when the PMOS is on, or when the NMOS is on, and not all the time. 
         [0005]    In prior art the output current of buck converters is measured in PWM mode only. A prior art sensing scheme is as follows: an LX voltage at a coil terminal is sensed during on-time of the PMOS high side-switch. The voltage is averaged over this time and, when the NMOS low-side switch is on, this average voltage is sampled instead of the LX voltage. Then the current is calculated from this sense voltage. 
         [0006]    This current calculation is valid and no error is introduced in PWM mode. A long-term average of this current sense waveform correctly averages the output current of the buck. 
         [0007]    The scheme discussed above does NOT apply during discontinuous PFM mode. Here the current waveform takes the form of a series of triangular pulses, with large periods of no-current between them. 
         [0008]    If the average is taken during the PMOS on time, and is it then assumed whenever the PMOS is off, the average current will be much too high, as during a large period the coil current is actually zero. 
         [0009]    Other schemes can be created where the current is sampled during the PMOS on-time, zero current is sampled during the time when neither pass-device is on, and then the average is used during the NMOS on-time. These schemes either add an error during the NMOS on-time, or are complex to implement. 
         [0010]    In general, measuring the output current in DCM PFM is not practical with existing solutions. 
         [0011]    It is a challenge to designers of DC-to-DC converters to find a method to measure the output current of a buck converter during PFM mode. 
       SUMMARY 
       [0012]    A principal object of the present disclosure is to measure an output current of a buck converter during operating in continuous mode PWM as well as in discontinuous mode PFM. 
         [0013]    A further object of the present disclosure is to achieve a buck converter which samples the output current on one pass device only. 
         [0014]    In accordance with the objects of this disclosure a buck converter enabled for output current measurement in CCM PWM mode as well as in DCM PFM mode has been achieved. The buck converter disclosed firstly comprises: a main output stage comprising a PMOS pass transistor and an NMOS pass transistor both connected in series, wherein the PMOS pass transistor is connected to supply voltage VDD and a gate of the PMOS pass transistor is connected to a gate of a transistor of a first circuit branch, and the NMOS pass transistor is connected to ground, a coil, wherein a first terminal of the coil is connected to a mid-node between the PMOS pass transistor and the NMOS pass transistor and a second terminal of the coil is connected to an output port of the buck converter, and an output capacitor connected between the output port and ground. Furthermore the buck converter comprises said first circuit branch, configured to generating a first reference current comprising a first PMOS device, which is scaled to the PMOS pass transistor and to providing via a first voltage node a voltage representing an output current limit of the buck converter, a second circuit branch, configured to generating a second reference current, which is scaled to the first reference current, comprising a second PMOS device, which is scaled relative the first PMOS device, and to providing a second voltage node to be sampled in PFM mode, whenever either the PMOS pass device or the NMOS pass device is on, and a switch, wherein a first terminal of the switch may contact three contact points and a second terminal of the switch is connected to a filter, wherein a first contact point is connected to the second voltage node, a second contact point is connected to the mid-node between the PMOS pass transistor and the NMOS pass transistor, and a third contact point is connected to supply voltage, wherein the switch is configured in PFM mode to either sampling via the first contact point the second voltage node or to being connected via the third contact point to the supply voltage and in PWM mode either sampling via the second contact point the mid-node voltage between the PMOS pass transistor and the NMOS pass transistor or being connected to open circuit, wherein the buck converter is configured to switch the PMOS pass transistor off when an output current through the coil reaches a maximum current limit, which is indicated by the first voltage node, and then the current through the coil falls linearly until the coil is completely discharged. 
         [0015]    In accordance with the objects of this disclosure a method for output current measurement of a buck converter in CCM PWM mode as well as in DCM PFM mode has been achieved. The method disclosed comprises, firstly, the steps of: (1) providing a buck converter operating in PWM mode or in PFM mode, comprising a PMOS and an NMOS pass transistor connected in series between VDD voltage and ground and a coil connected between a midpoint between both pass transistors and an output port of the buck converter, and a filter, (2) creating a voltage representing an output current limit reference against which a voltage at the midpoint is compared, and (3) creating a dummy midpoint voltage which is sampled to provide an average output current during an output current pulse. Furthermore the method disclosed comprises the steps of (4) checking if buck converter is in PWM mode and, if it so, sample by a switch between a mid-point voltage between both pass transistors or being connected to open circuit and pass the sampling result through the filter to get a long-term average of the output current and repeat step (4), else go to step 5, and (5) checking if buck converter is in PFM mode and, if it so, sample by a switch between the dummy midpoint voltage and supply voltage and pass the sampling result through the filter to get a long-term average of the output current and go to step 4. 
         [0016]    In accordance with the objects of this disclosure a method for digital output current measurement of a buck converter in CCM PWM mode as well as in DCM PFM mode has been achieved. The method disclosed comprises, firstly, the steps of: (1) providing a buck converter operating in PWM mode or in PFM mode, comprising a PMOS and an NMOS pass transistor connected in series between VDD voltage and ground and a coil connected between a midpoint between both pass transistors and an output port of the buck converter, a filter, and a digital controller and (2) measuring during on-time of the PMOS pass transistor the output current of the buck converter. Furthermore the method disclosed comprises the steps of: (3) accumulating the measurement results during on-time of the PMOS pass transistor by the digital controller and adding to the accumulation a constant value equal to half of the sleep current limit value during on-time of the NMOS pass transistor wherein this constant value is identified by peak detection on the PMOS measurement in PFM mode, and (4) achieving a complete measurement of the output current of the buck converter in PWM and PFM mode by adding to the accumulation also zero codes for times when both PMOS and NMOS pass transistors are off. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0017]    In the accompanying drawings forming a material part of this description, there is shown: 
           [0018]      FIG. 1  shows an exemplary circuit of the buck converter disclosed. 
           [0019]      FIG. 2  show time charts of the coil current with the true long-term average indicated and of the pulses that would be used instead of sampling the actual LX voltage. 
           [0020]      FIG. 3  shows three time chart traces of the voltage at the LX node, of the current through the coil Lout and the position of switch S 1  during the various phases. 
           [0021]      FIG. 4  depicts a flowchart of a method to measure an output current of a buck converter during DCM PFM mode and CCM PWM mode. 
           [0022]      FIG. 5  depicts a flowchart of the method to measure digitally an output current of a buck converter during DCM PFM mode and CCM PWM mode. 
           [0023]      FIG. 6 a    illustrates an alternative embodiment of the disclosure wherein the gate of device P 2  is controlled so that P 2  is either always on whenever the NMOS pass transistor is on 
           [0024]      FIG. 6 b    shows time charts of the current through the coil Icoil and the current sensed Isense in case of the PFM mode during different phases 
       
    
    
     DETAILED DESCRIPTION 
       [0025]    Disclosed are embodiments of methods and circuits to measure an output current of a buck converter during continuous mode operation and discontinuous mode operation. It should be noted that the method disclosed is applicable to voltage controlled buck converters as well as to current controlled buck converters. 
         [0026]    The buck converter may be implemented in a Power Management Integrated Circuit (PMIC). 
         [0027]      FIG. 1  shows an exemplary circuit of the buck converter disclosed. The current in the coil Lout is charged up linearly to a current limit, the PMOS pass transistor  1  is then turned off and the current through the coil Lout falls linearly until the coil Lout is completely discharged. The current then remains zero until the cycle is restarted. 
         [0028]    The pass devices PMOS  1  and NMOS  2  are connected to the coil Lout and to the output capacitor Cout. 
         [0029]    Two scaled matched devices P 1  and P 2  are shown. Device P 1  and the bias current I 1  are used to create the current limit reference, against which the voltage at node LX is compared with the voltage drop across the device P 1 . 
         [0030]    The scaled device P 2  and current I 2  are then used to generate a dummy LX voltage, that is the voltage across device P 2 , which is sampled to give the average current during the output current pulse. This circuit is arranged so that either device P 2  is twice as wide as device P 1  or current I 2  is half that of current I 1 . 
         [0031]    The gate of P 2  is controlled in a way that it is either always on or that it is on whenever the NMOS pass transistor is on. 
         [0032]    In PWM mode the switch S 1  is either sampling LX or is connected to open-circuit. In PFM mode the switch S 1  is either sampling the drain voltage of P 2  or is connected to supply voltage (or is connected alternatively to the drain voltage of P 2  while current I 2  is not sampling). Current I 2  is left on all the time for setting purposes but I 2  is not sampling when the NMOS is off. 
         [0033]    A filter  3 , connected to the node Vsense, then creates the long-term average. 
         [0034]    It should be noted that a state machine controls if the system operates in PFM or in PWM mode. 
         [0035]    The average current is half the peak current because the coil current is triangular, and the average current through the coil Lout can be accurately described by a pulse of half the peak current for the duration of both the PMOS and NMOS on-times. The long term average output current is then the long term average of this rectangular pulse over several cycles. This can be achieved using a simple, long-time-constant low-pass filter. 
         [0036]    As the peak current is known, and is equal to the current limit, the half-peak-current pulse can be easily re-created inside the buck converter. 
         [0037]    The current limit is e.g. implemented inside the buck converter by providing the scaled reference PMOS device P 1 , through which a reference current is passed. The LX voltage is then directly compared to the voltage across this scaled device P 1 . When the LX voltage falls below this reference voltage across device P 1 , the current limit is reached and the PMOS is turned off. 
         [0038]    The disclosure therefore proposes to provide the second scaled reference PMOS device P 2 , to match the device P 1  that creates the current limit. A reference current I 2 , matched to current I 1  is used to create the current limit and flows through this second scaled device P 2 . Either the scaled device P 2  has twice the effective width of the current limit device P 1 , or the matched current I 2  is half of current I 1 . In a preferable embodiment of the disclosure device P 2  should be 50% larger than device P 1 . 
         [0039]    The device P 2  needs to be larger than device P 1  so that the voltage drop across device P 2  is half the voltage drop of device P 1 . The device P 2  has not to be 50% larger than device P 1 , e.g. 30-40% larger. Since the voltage drop across device P 2  should be half the voltage drop across device P 1 —so either device P 2  having 2×the width of P 1  (with currents I 1  and I 2  being the same) or having both devices P 1  and P 2  the same size and having current I 2  half of the amount of current I 1 . 
         [0040]    The gate of device P 2  is controlled so that P 2  is either always on, when the switch S 1  is sampling its drain voltage, or that it is on whenever the NMOS pass transistor is on in another embodiment as shown in  FIG. 6 . 
         [0041]      FIG. 6 a    shows a time chart of the current through the PMOS pass transistor wherein the actual current  60  through the PMOS pass transistor is measured. 
         [0042]    It should be noted that he measurement during the PMOS on-time is done directly by measuring the voltage drop across the PMOS pass transistor. During the NMOS pass transistor on-time the current value is only an estimate. However, the estimate during the NMOS pass transistor on-time has nothing to do with the measured value during the PMOS pass transistor on-time. Instead we use half the current limit value. It is known that the current in the coil must be linear, it must start at the current limit value (because that is when we would have turned off the PMOS pass transistor) and must end at zero (because the current hits zero in this mode). So the mathematical mean value must be half the current limit value. As the current limit information internally is known, we can use this knowledge to estimate the average current during the NMOS on-time. Consequently the device P 2  is ON whenever the NMOS pass transistor is ON. 
         [0043]    In PWM mode the switch S 1  is either sampling LX node or is open-circuit. The open circuit position  4  is shown in  FIG. 1 . Alternatively switch S 1  may be in PWM mode left attached to LX node or to open circuit. 
         [0044]    In PFM mode the switch S 1  is either sampling the drain voltage of P 2 , whenever the NMOS or the PMOS pass transistor is on, or is connected to supply voltage VDD when none of the pass transistors is on, hence creating the rectangular pulses that equal the average current in the coil. Alternatively, instead of connecting to supply voltage VDD, the drain voltage of P 2  can be used, while current I 2  is turned ON/OFF. 
         [0045]      FIG. 6 b    shows time charts of the current through the coil Icoil and the current sensed sense in case of the PFM mode during different phases (PMOS is on, NMOS is on, neither pass device is on—HIZ). S 1  selects whether the circuit is measuring the drop across the PMOS pass transistor (the actual coil current if the PMOS pass transistor is on), the estimated coil current (a static estimate of half the current limit value) or the supply voltage (which is equivalent to zero current). When neither pass-device is on (when the output is high impedance “Hiz” and the output current is zero) the circuit must sample a zero value. It can do this in one of two ways. The first is to sample the supply voltage. This can be done by setting se switch S 1  to the top connection and sampling the supply directly. The other way is to set the current I 2  to zero. As the PMOS P 2  is held on, this is essentially the same thing. With no current through P 2  there is no voltage drop across P 2  and the voltage on its drain is the same as supply. 
         [0046]    The time charts of  FIG. 2  show the method disclosed. Trace  20  shows the coil current, with the true long-term average  21  indicated. Trace  22  shows the pulses that would be used instead of sampling the actual LX voltage. The coil current, correspondent to trace  20 , is also shown by dotted line in order to demonstrate the conversion of the triangle shaped current wave to the rectangular pulses of trace  22 . 
         [0047]    After filtering the pulses of trace  22  with a long time-constant, an average current measurement in DCM PFM mode is available. 
         [0048]      FIG. 4  depicts a flowchart of a method to measure an output current of a buck converter during DCM PFM mode and CCM PWM mode. A first step  40  depicts provision of a buck converter operating in PWM mode or in PFM mode, comprising a PMOS and an NMOS pass transistor connected in series between VDD voltage and ground and a coil connected between a midpoint between both pass transistors and an output port of the buck converter, and a filter. The next step  41  shows creating a voltage representing an output current limit reference against which a voltage at the midpoint is compared. Step  42  describes creating a dummy midpoint voltage which is sampled to provide an average output current during an output current pulse. Step  43  illustrates checking if buck converter is in PWM mode and, if it so, sample by a switch between the midpoint voltage and open circuit and pass the sampling result through the filter to get a long-term average of the output current and repeat step  43 , else go to step  44 . The last step  44  depicts checking if buck converter is in PFM mode and, if it so, sample by a switch between the dummy midpoint voltage and supply voltage and pass the sampling result through the filter to get a long-term average of the output current and go to step  43 . 
         [0049]    The method disclosed may be digitally implemented. In one embodiment of this digitally implemented method the current through the PMOS pass transistor would be measured on-time using an analog-to digital converter (ADC). This current measurement would then be digitally accumulated, and a constant value equal to half of the sleep current limit value during the NMOS on-time would be used. This constant value could be identified by peak-detect on the PMOS measurement in PFM. The digital control would also accumulate a zero code for times when the PMOS and NMOS are both off.  FIG. 3  shows three time chart traces of the voltage at the LX node, of the current through the coil Lout and the position of switch S 1  during the various phases. 
         [0050]      FIG. 5  depicts a flowchart of the method to measure digitally an output current of a buck converter during DCM PFM mode and CCM PWM mode. A first step  50  depicts provision of a buck converter operating in PWM mode or in PFM mode, comprising a PMOS and an NMOS pass transistor connected in series between VDD voltage and ground and a coil connected between a midpoint between both pass transistors and an output port of the buck converter, a filter, and a digital controller. The next step  51  shows measuring during on-time of the PMOS pass transistor the output current of the buck converter. Step  52  illustrates accumulating the measurement results during on-time of the PMOS pass transistor by the digital controller and adding to the accumulation a constant value equal to half of the sleep current limit value during on-time of the NMOS pass transistor wherein this constant value is identified by peak detection on the PMOS measurement in PFM mode. The last step  53  depicts achieving a complete measurement of the output current of the buck converter in PWM and PFM mode by adding to the accumulation also zero codes for times when both PMOS and NMOS pass transistors are off. 
         [0051]    While the disclosure has been particularly shown and described with reference to the preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the disclosure.