Primary-side control of a switching power converter with feed forward delay compensation

An electronic system includes controller to control a switching power converter to provide power to a load. To control the amount of power provided to the load, in at least one embodiment, the controller senses a current value representing a current in the switching power converter and detects when the current value reaches a target peak value. However, due to delays in the controller and/or the switching power converter, the detected target peak value will not be the actual current peak value generated by the switching power converter. In at least one embodiment, the controller adjusts the detected target peak value with a post-detection delay compensation factor to generate a delay compensated current value that more accurately represents an actual peak current value associated with the current in the switching power converter.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates in general to the field of electronics, and more specifically to a method and system for exercising primary-side control of a switching power converter with feed-forward delay compensation.

2. Description of the Related Art

Many electronic systems utilize switching power converters to efficiently convert power from one source into power useable by a device (referred to herein as a “load”). For example, power companies often provide alternating current (AC) power at specific voltages within a specific frequency range. However, many loads utilize power at a different voltage and/or frequency than the supplied power. For example, some loads, such as light emitting diode (LED) based lamps operate from a direct current (DC). “DC current” is also referred to as “constant current”. “Constant” current does not mean that the current cannot change over time. The DC value of the constant current can change to another DC value. Additionally, a constant current may have noise or other minor fluctuations that cause the DC value of the current to fluctuate. “Constant current devices” have a steady state output that depends upon the DC value of the current supplied to the devices.

LEDs are becoming particularly attractive as main stream light sources in part because of energy savings through high efficiency light output, long life, and environmental incentives such as the reduction of mercury. LEDs are semiconductor devices and are best driven by direct current. The brightness of the LED varies in direct proportion to the DC current supplied to the LED. Thus, increasing current supplied to an LED increases the brightness of the LED and decreasing current supplied to the LED dims the LED.

FIG. 1depicts an electronic system100that converts power from voltage source102into power usable by load104. Load104is a constant current load that includes, for example, one or more LEDs. A controller106controls the power conversion process. Voltage source102can be any type of voltage source such as a public utility supplying a 60 Hz/110 V input voltage VINor a 50 Hz/220 V input voltage VINin Europe or the People's Republic of China, or a DC voltage source supplied by a battery or another switching power converter.

The controller106provides a pulse width modulated (PWM) control signal CS0to current control switch108in a flyback-type, switching power converter110to control the conversion of input voltage VINinto a primary-side voltage VPand secondary voltage VS. The switch108is, for example, a field effect transistor (FET). When control signal CS0causes switch108to conduct, a primary-side current iPRIMARYflows into a primary coil114of transformer116to energize the primary coil114. When control signal CS0opens switch112, primary coil114deenergizes. Energizing and deenergizing the primary coil114induces a secondary voltage VSacross a secondary coil118of transformer116. Primary voltage VPis N times the secondary voltage VS, i.e. VP=N·VS, and “N” is a ratio of coil turns in the primary coil114to the coil turns in the secondary coil118. The secondary-side current iSECONDARYis a direct function of the secondary voltage VSand the impedance of diode120, capacitor122, and load104. Diode120allows the secondary-side current iSECONDARYto flow in one direction. The secondary-side current iSECONDARYcharges capacitor120, and capacitor120maintains an approximately DC voltage VLOADacross load104. Thus, secondary-side current iSECONDARYis a DC current.

The load104has a certain power demand, and the controller106generates the switch signal CS0in an attempt to cause the switching power converter110to meet the power demand of the load104. Ideally, the power PPRIMARYprovided by the primary-side of the switching power converter110equals the power PLOADthat is provided to the load104. However, power losses due to non-idealities in the electronic system100result in the power PPRIMARYprovided by the primary-side being greater than the power PLOADdelivered to the load104, i.e. PPRIMARY>PLOAD. To meet the power demand of the load104, controller106utilizes feedback to determine the amount of power actually delivered to the load104. The controller106attempts to generate the control signal CS0to control the primary-side current iPRIMARYso that the power PPRIMARYmeets the power demand of the load104.

Controller106utilizes a feedback control loop to control the power PLOADdelivered to the load104. To control the power PLOAD, the controller106controls the control signal CS0and thereby controls the primary-side current iPRIMARY. Controlling the primary-side current iPRIMARYcontrols the primary-side power PPRIMARYprovided by the primary-side of the switching power converter110. The controller106adjusts the primary-side current iPRIMARYso that the primary-side power PPRIMARYis sufficient to transfer enough power PLOADto the load104to meet the power demand of the load104.

To generate the primary-side power PPRIMARY, controller106utilizes either secondary-side, feedback-based control via a secondary-side feedback path124or primary-side control via sense resistor126. The secondary-side, feedback path124is shown with a ‘dashed’ line to indicate use in the alternative to primary-side feedback. For secondary-side, feedback-based control, the controller106senses the secondary current iSECONDARYvia the signal iS_SENSE. The secondary-side feedback path124generally includes components, such as an opto-isolator or optocoupler, that provide electrical isolation between the controller106and the secondary-side of the transformer110. Since the controller106knows the primary-side voltage VPand the turns ratio N, the controller106also knows the secondary side voltage VSand knows the secondary-side current iSECONDARYfrom the feedback signal iS_SENSE. Thus, the controller106can directly determine the power PLOADdelivered to the load104. The controller106generates the control signal CS0to generate the primary-side current iPRIMARYto meet the power demand of the load104so that the power demand of the load equals the power provided to the load104.

The actual peak value of the primary-side current iPRIMARYis directly proportional to the amount of power delivered to the load104. Thus, for primary-side only control, determination of the actual peak value iPKof the primary-side current iPRIMARYdominates the accuracy of the determination of the amount of power delivered to the load104. The foregoing statement is especially the case during low power applications since the range of the primary-side current iPRIMARYis reduced. The switch108does not turn OFF instantaneously upon detection of a target peak value iPKof the primary-side current iPRIMARYby the controller106. Once the controller106senses that the primary-side peak current iPK_SENSEequals a target peak value iPKand turns switch108OFF, the actual primary-side current iPRIMARYhas already overshot the sensed peak current iPK_SENSE.

To compensate for the delay in turning switch108OFF, the electronic system100introduces a feed forward, scaled voltage compensation factor

VINRSENSE×R130R128+R130
to boost the current conducted by the sense resistor126. RSENSEis the resistance value of the sense resistor126, R128is the resistance value of the resistor128, R130is the resistance value of the resistor130. Boosting the current across the sense resistor126prior to the controller106sensing the primary-side current causes the controller106to determine a higher peak current iPK_SENSEthat can compensate for the delay in turning off the switch108. Equation [1] represents the value of the estimated peak current iPK_ESTusing the fixed, feed forward compensation factor:

VINRSENSE×R130R128+R130
tracks well with the input voltage VIN, for a given inductance value L of the primary-side coil114, the compensation factor

VINRSENSE×R130R128+R130
effectively cancels out delays in turning the switch108OFF.

However, secondary-side sensing requires additional, potentially relatively expensive components. Using primary-side sensing and applying the compensation factor

VINRSENSE×R130R128+R130,
which equals

VINL×tDELAY,
works for a particular inductance value L of the primary-side coil114. However, the inductance value L of the primary-side coil114can vary from transformer to transformer by, for example, at least +/−10%. Thus, if the inductance value L used by the controller106differs from the actual inductance value L for the primary-side coil114, then the estimation of the peak value of the primary-side current iPRIMARYcan result in errors providing power to the load104. Additionally, altering the primary-side current value across the sense resistor RSENSEprior to sensing a representative value of the primary-side current iPRIMARYutilizes external components, which increase the cost of the electronic system100.

SUMMARY OF THE INVENTION

In one embodiment of the present invention, a method includes sensing a value of a current in a switching power converter during a switching cycle of the switching power converter. The method also includes detecting a target peak value of the current value and adjusting the detected target peak value of the current value with a post-detection delay compensation factor to generate a delay compensated current value. The method further includes determining an amount of current provided to a load coupled to the switching power converter based on the delay compensated current value and generating a switch control signal to control the value of the current in the switching power converter to provide energy to the load in accordance with the delay compensated current value.

In another embodiment of the present invention, an apparatus includes a controller a controller having an input to sense a value of a current in a switching power converter during a switching cycle of the switching power converter. The controller is capable to detect a target peak value of the current value and adjust the detected target peak value of the current value with a post-detection delay compensation factor to generate a delay compensated current value. The controller is further capable to determine an amount of current provided to a load coupled to the switching power converter based on the delay compensated current value and generate a switch control signal to control the value of the current in the switching power converter to provide energy to the load in accordance with the delay compensated current value.

In a further embodiment of the present invention, an apparatus includes a switching power converter, wherein the switching power converter includes a transformer having a primary-side and a secondary-side. The apparatus also includes a controller having an input to sense a value of a current in a switching power converter during a switching cycle of the switching power converter. The controller is capable to detect a target peak value of the current value and adjust the detected target peak value of the current value with a post-detection delay compensation factor to generate a delay compensated current value. The controller is further capable to determine an amount of current provided to a load coupled to the switching power converter based on the delay compensated current value and generate a switch control signal to control the value of the current in the switching power converter to provide energy to the load in accordance with the delay compensated current value. The apparatus further includes a load coupled to the secondary-side of the transformer of the switching power converter.

DETAILED DESCRIPTION

An electronic system includes a controller to control a switching power converter to provide power to a load. To control the amount of power provided to the load, in at least one embodiment, the controller senses a current value representing a current in the switching power converter and detects when the current value reaches a target peak value. However, due to delays in the controller and/or the switching power converter, the detected target peak value will not be the actual current peak value generated by the switching power converter. In at least one embodiment, the controller adjusts the detected target peak value with a post-detection delay compensation factor to generate a delay compensated current value that more accurately represents an actual peak current value associated with the current in the switching power converter. In at least one embodiment, the controller utilizes the delay compensated current value to determine an amount of current provided to the load and to determine a subsequent target peak current value.

one embodiment, the post-detection delay compensation factor models an extrapolation of the value of the current that changes as a result of delays in the controller and/or the switching power converter. Exemplary delays occur between detecting the approximate peak value of the current value by the controller and discontinuing the current by the switching power converter. In at least one embodiment, the current value increases linearly as delay increases and, thus, is modeled using a linear extrapolation. However, the particular model is a matter of design choice and depends on the characteristic effects of delays on the current value. In at least one embodiment, the post-detection delay compensation factor represents a dynamically determined, approximate delay between the detected peak value of the current and an actual peak value of the current.

FIG. 2depicts an electronic system200that includes a controller202to control switching power converter204using peak current control and a delay compensation factor. Voltage supply206supplies an input voltage VINto the switching power converter204. The voltage supply206can be any type of voltage supply and is, for example, the same as voltage supply102(FIG. 1). The controller202generates a switch control signal CS1that controls the conductivity of switch208and the flow of input current iIN. Switch208can be any type of switch, such as a field effect transistor (FET). When the switch208conducts, the input current iINflows into components210and through switch208. The input current iINmay equal to a current entering the switching power converter204or may be less than the current entering the switching power converter204. The switching power converter204uses the input current iINand the input voltage VINto generate a secondary-side voltage VSand an output current iOUTfor the load212. In at least one embodiment, the controller202regulates the output current iOUT. The load212can be any type of load, such as one or more lamps, each having one or more light emitting diodes (LEDs).

In at least one embodiment, the controller202targets a particular output current iOUT_TARGETto provide to the load212. The target output current iOUT_TARGETrepresents the amount of charge provided to the load212during a period of time. In at least one embodiment, the target output current iOUT_TARGETis a target amount of charge provided to the load212over a cyclic period, (for example, “TT” inFIG. 5) of the switch control signal CS1. The manner in which the controller202determines the amount of output current iOUT_TARGETto target is a matter of design choice. In at least one embodiment, the targeted output current iOUT_TARGETis entered as data into an optional memory214. In at least one embodiment, the targeted output current iOUT_TARGETindicates a single amount of current or a single amount of charge to be delivered within a period of time. In at least one embodiment, the targeted output current iOUT_TARGETis entered as one time programmable data. In at least one embodiment, the targeted output current iOUT_TARGETindicates multiple levels of current or multiple amounts of charge to be delivered within a period of time. In at least one embodiment, the multiple values correspond to multiple output settings for the load212such as different dimming level settings indicated by the DIM signal. In at least one embodiment, the controller202receives the DIM signal from a dimmer (not shown) or from another input source (not shown).

FIG. 3depicts an exemplary control process300for controlling the switching power converter using a delay compensation factor. Referring toFIGS. 2 and 3, the controller202includes a sensor217that receives the current value CV in operation302. The current value CV represents a value of the input current iINflowing through the switch208. The current value CV can represent the input current iINin any manner, such as a scaled or unscaled current or voltage. In operation304, the sensor217compares the received current value CV with a then-current target peak current value iPK_TARGET(n) for the input current iINto detect when the current value CV equals the target peak current value iPK_TARGET(n). “(n)” is an index reference. If the current value CV does not equal the target peak current value iPK_TARGET(n), operations302and then304repeat. When the current value CV equals the target peak current value iPK_TARGET(n), the sensor217sends a “peak reached signal” PKR to the switch control signal generator218indicating that the switch control signal generator218should turn the switch208OFF. In operation306, the switch control signal generator218responds by generating the control signal CS1to turn the switch208OFF. In at least one embodiment, the control signal CS1is a pulse width modulated signal.

Delays occur between the time the sensor217detects that the current value equals the target peak current value iPK_TARGETand when the switch208turns OFF. The delays can arise from any number of sources such as:Delay in operation304determining whether the current value CV equals the iPTARGET(n);Delay in propagating the control signal CS1to the switch208; andDelay in the response of switch208to the control signal CS1to turn the switch208OFF.

During the delays, the input current iINcontinues to increase. Thus, the delays result in the switching power converter204providing an additional amount of current iOUTto the load212after the sensor217detects that the current value CV has reached the target peak current value iPK_TARGET(n). The sensor217also provides the peak reached signal PKR to the delay compensator216. To compensate for the delays, in operation308, the delay compensator216receives the peak reached signal PKR and adjusts the detected target peak current value iPK_TARGET(n) with a delay compensation factor DELAY_COMP to generate an estimated peak current iPK_EST. In at least one embodiment, the adjustment of the target peak current value iPK_TARGET(n) by the delay compensation factor DELAY_COMP models the increase in the input current iINthat occurs due to the delays. The particular model depends on the characteristics of the input current iINand a desired degree of accuracy in estimating the actual peak value of the input current iIN. In at least one embodiment, the input current iINincreases linearly over time, and the adjustment of the target peak current value iPK_TARGET(n) by the delay compensation factor DELAY_COMP represents a linear extrapolation of the input current iINthat occurs during the delays.

Once the delay compensator216determines the estimated peak current iPK_EST, and, based on the estimated peak current iPK_EST, operation310determines the amount of output current iOUTprovided to the load212. In at least one embodiment, the particular quantification of the value of the output current iOUTprovided to the load212is a matter of design choice. In at least one embodiment, operation310quantifies the current iOUTprovided to the load212as an amount of charge provided to the load212during a period TT of the control signal CS1.

Operation312sets the next target peak current value iPK_TARGET(n+1) to minimize a difference between the amount of estimated actual output current iOUTprovided to the load212and the target output current iOUT_TARGET. In at least one embodiment, operation312sets the value of the target peak current value iPK_TARGET(n+1) by responding to any difference between the output current iOUTprovided to the load212, as determined using estimated peak current iPK_EST, and the target output current iOUT_TARGETfor provision to the load212. If the estimated actual output current iOUTis greater than the target output current iOUT_TARGET, then operation312reduces the value of the target peak current value iPK_TARGET(n+1). If the estimated actual output current iOUTis less than the target output current iOUT_TARGET, then operation312increases the value of the target peak current value iPK_TARGET(n+1). In at least one embodiment, operation312adjusts the target peak current value iPK_TARGET(n+1) every cycle of the control signal CS1to minimize the difference between the estimated output current iOUTprovided to the load212and the target output current iOUT_TARGET. The particular convergence algorithm used to select the values of each subsequent target peak current value iPK_TARGET(n+1) so that the output current iOUTconverges to the target output current iOUT_TARGETis a matter of design choice and can be any custom or well-known convergence algorithm. The delay compensator216provides the target peak current value iPK_TARGET(n+1) to the sensor217. The target peak current value iPK_TARGET(n+1) then becomes the current target peak current value iPTARGET(n) for the next cycle of control process300.

In operation314, the switch control signal generator218generates the switch control signal CS1to turn the switch208ON. The particular time at which the switch control signal generator218turns the switch208ON is a matter of design choice and, in at least one embodiment, depends on the operational mode of the switching power converter204. In at least one embodiment, the switching power converter204operates in quasi-resonant mode and/or discontinuous conduction mode as described, for example, in U.S. patent application Ser. No. 13/486,625, filed Jun. 1, 2012, entitled “Control Data Determination From Primary-Side Sensing of a Secondary-Side Voltage in a Switching Power Converter”, assignee Cirrus Logic, Inc., and inventors Robert T. Grisamore and Zhaohui He, which is hereby incorporated by reference in its entirety (referred to herein as “Grisamore-He”).

FIG. 4depicts an electronic system400, which represents one embodiment of the electronic system200.FIG. 5depicts exemplary operational waveforms500for the electronic system400. Referring toFIGS. 4 and 5, electronic system400includes a controller402that generates a control signal CS2to control a flyback-type switching power converter404. The switch control signal generator218generates a pulse width modulated, current switch control signal CS2to control the conductivity of an n-channel metal oxide semiconductor field effect transistor (NMOSFET) switch406, which represents one embodiment of switch208. During a pulse, such as pulse502, of the control signal CS2, the primary-side current iPRIMARYlinearly increases through the primary-side coil408of transformer410and develops a primary-side voltage VPacross the primary-side coil408. The primary-side voltage VPinduces a secondary voltage VSacross the secondary-side coil414. Because of the dot configuration of the transformer410, the secondary voltage VSis inverted from the primary-side voltage VPand reverse biases a diode412during each pulse of the control signal CS2. While the diode412is reverse biased, capacitor416provides current to the load208.

In at least one embodiment, the electronic system400operates in accordance with an embodiment of the exemplary control process300. During the pulse502, the primary-side current iPRIMARYflows through the switch406and develops a voltage across sense resistor417. In operation302, the comparator418receives the current sense signal iCS, which represents one embodiment of the current value CV inFIGS. 2 and 3, and compares the current sense signal iCSwith the then-current target peak current value iPK_TARGET(n) value in operation304. The peak reached signal PKR is a logical 1 until the current sense signal iCSreaches the target peak current value iPTARGET, then the peak reached signal PKR transitions to a logical 0. The comparator418provides the logical zero value of the peak reached signal PKR to the switch control signal generator218and delay compensator422. In operation306, the switch signal control generator218causes the switch control signal CS2to transition to a logical 0 at time t0, which turns the FET406OFF. The duration of the pulse502of switch control signal CS2is referred to as T1.

The delay compensator422conceptually includes two functional units, the secondary output current and peak primary current estimator with post-target current detection delay compensation423(referred to as the “currents estimator423”) and the peak target current generator425. In operation308, the currents estimator423adjusts the target peak current value iPK_TARGET(n) by a delay compensation factor DELAY_COMP to generate an estimated peak current iPK_ESTin order to determine the amount of secondary-side current iSECONDARYdelivered to the load208. As previously discussed, various delays occur between the time when the comparator418detects that the current sense signal iCSreaches the target peak current value iPK_TARGET(n) and when the FET406stops conducting the primary-side current iPRIMARY.

FIG. 6depicts an exemplary primary-side current iPRIMARYand delay effects graph600. Referring toFIGS. 4, 5, and 6, one of the delays is the delay by the comparator418in comparing the current sense voltage VCSwith the target peak current value iPK_TARGET(n). With finite gain and bandwidth, the current sense comparator418incurs a detection delay dT_cscmp_dly between when the comparator418actually detects that the current sense voltage VCSequals the target peak current value iPTARGET(n), as indicated by the “ACTUAL CROSSOVER POINT iPK_TARGET”, when the comparator418transitions the state of the peak reached signal PKR. During the detection delay dT_cscmp_dly, the primary-side current iPRIMARYcontinues to linearly increase. In at least one embodiment, Equation [3] represents change in the peak value ΔiPKof the primary-side current iPRIMARYdue to the detection delay dT_cscmp_dly:

Δ⁢⁢iPK=VINL×dT_cscmp⁢_dly.Equation⁢[3]
VINis the input voltage, L is the inductance value of the primary-side coil408, and a dT_cscmp_dly is the detection delay between when the comparator418actually detects that the current sense voltage VCSequals the target peak current value iPTARGET(n).

A further delay is a propagation delay dT_logic_dly from an output of the comparator418to the transition of the control signal CS2at the gate of the FET406. The propagation delay dT_logic_dly is due to, for example, delays in inverters, flip-flops, level shifters, etc., which allow the primary-side current to continue to linearly increase. In at least one embodiment, Equation [4] represents change in the peak value ΔiPKof the primary-side current iPRIMARYdue to the propagation delay dT_logic_dly:

VINis the input voltage, L is the inductance value of the primary-side coil408, and a dT_logic_dly is the propagation delay from an output of the comparator418to the transition of the control signal CS2at the gate of the FET406.

Another delay is the delay in turning OFF the FET406. Turning the FET406involves, for example, removing charge from the gate of the FET406and depleting charge in the conducting channel of the FET406. In at least one embodiment, Equation [5] represents change in the peak value ΔiPKof the primary-side current iPRIMARYdue to the turn OFF delay of FET406:

Δ⁢⁢iPK=VINL×dT_gdrv⁢_dly.Equation⁢[5]
VINis the input voltage, L is the inductance value of the primary-side coil408, and a dT_gdrv_dly is the delay in turning the FET406OFF.

By summing Equations [3], [4], [5], Equation [6] represents the estimated peak current iPK_ESTof the primary-side current iPRIMARY.

iPK⁢⁢_⁢⁢EST=VINL×(T⁢⁢1⁢_meas+dT_cscmp⁢_dly+dT_logic⁢_dly+dT_gdrv⁢_dly),⁢which⁢⁢rearranges⁢⁢to⁢:⁢⁢iPK⁢⁢_⁢⁢EST=iPK⁢⁢_⁢⁢TARGET×(1+dT_dly⁢_totalT⁢⁢1⁢_meas).Equation⁢[6]
dT_dly_total=dT_cscmp_dly+dT_logic_dly+dT_gdrv_dly is the estimated delay duration of the primary-side current iPRIMARYduring a cycle of the control signal CS2. The quantity

(1+dT_dly⁢_totalT⁢⁢1⁢_meas)
represents an embodiment of a delay compensation factor DELAY_COMP. T1_meas is a measured value of T1since the actual value of T1is unknown. The measured value also incurs a delay error. However, dT_dly_total is much smaller than the actual T1, so the delay due to measuring T1is not included in the delay compensation factor. In at least one embodiment, the value of the delay compensation factor DELAY_COMP equal to

(1+dT_dly⁢_totalT⁢⁢1⁢_meas)
is empirically or analytically predetermined based on knowledge of the components used on the electronic system400and is stored in the memory424. The delay compensation factor DELAY_COMP is used by the currents estimator423to determine the estimated peak current iPK_ESTafter detection of the target peak value of the primary-side current. In at least one embodiment, this “post-detection” delay compensation factor DELAY_COMP reduces external components and is flexible to represent multiple delay types. Additionally, in at least one embodiment, the delay compensation factor DELAY_COMP is not sensitive to variations in inductance values of the primary-side coil408.

In at least one other embodiment, the value of the delay compensation factor DELAY_COMP is measured as dT_meas by measuring changes in the drain to source VDSvoltage of FET406as shown in waveform602. However, this measurement also incurs a delay that is, in at least one embodiment, accounted for by adding dT_cscmp_dly to dT_meas.

In operation310, in accordance with Equation [7], the currents estimator423uses the estimated peak current iPK_ESTof Equation [6] to determine the secondary current iSECONDARYdelivered to the load208during the period TT of the control signal CS2. The area beneath the secondary-side current iSECONDARYrepresents the amount of charge delivered to the load208. Equation [7] represents the amount of charge provided to the load208during the period TT of the control signal CS2;

iSECONDARY=QTT=12×iPK⁢⁢_⁢⁢EST×T⁢⁢2TT.Equation⁢[7]
Q is the charge provided to the load208, TT is the period of the control signal CS2, iPK_ESTis the estimated peak value of the primary-side current iPRIMARYas adjusted by the delay compensation factor DELAY_COMP, and T2is the duration of the secondary-side current iSECONDARYfrom the end of the period T1until the secondary-side current iSECONDARYdecays to zero. Grisamore-He describes an exemplary system and method to determine the values of T2and TT.

The currents estimator423provides a peak primary-side current target adjustment signal TARG_ADJ to the peak target current generator425. In operation312, the delay compensator422sets the next value of the target peak current value iPTARGET(n+1) based on how the amount of secondary-side current iSECONDARYprovided to the load208as determined by Equation [7] compares to the targeted amount of secondary-side current iSECONDARY_TARGET. The peak target current generator425increases the target peak current value iPK_TARGET(n+1) if the comparison indicates a desired increase in the amount of energy provided to load208and decreases the target peak current value iPK_TARGET(n+1) if the comparison indicates a desired decrease in the amount of current provided to the load208. The peak target current generator425provides the next target peak current value iPK_TARGET(n+1) to a digital-to-analog converter426to provide an analog version of the target peak current value iPK_TARGET(n+1) to the comparator418for the next cycle of process300. Thus, the target peak current value iPK_TARGET(n+1) then becomes the current target peak current value iPK_TARGETfor use by the comparator418. The peak target current generator425also provides the next target peak current value iPK_TARGET(n−1) to the currents estimator423for use in conjunction with Equation [6].

FIG. 7depicts an exemplary delay compensated and uncompensated comparison graph700using a ratio of the actual primary-side peak current “iPK_ACTUAL” to a peak primary-side current “iPK_TARGET” to determine the current provided to the load208having 9 LEDs and 3 LEDs. For the compensated primary-side peak current, iPK_TARGET represents the estimated peak current iPK_EST. Because graph700depicts a ratio, the ideal value is 1 with less ideal values varying further from 1. The delay compensator422, utilizing a post-detection delay compensation factor DELAY_COMP and the post-detection delay compensated estimated peak current iPK_ESTclearly results in a closer estimate of the peak value of the primary-side current iPRIMARY. Having a close estimate can be particularly important in certain embodiments of the electronic system300such as in a multiple color, multiple LED lamp load208when precise provision of energy to the LEDs has a noticeable effect on the color of light produced by this embodiment of the load208.

FIG. 8depicts an electronic system800, which represents another embodiment of the electronic system300. The method of sampling the primary-side current iPRIMARYis a matter of design choice. The electronic system800utilizes an auxiliary winding802to generate an auxiliary voltage VAUXthat is proportional to the secondary-side voltage VS. Resistors804and806form a voltage divider to generate the current sense signal iCS. The auxiliary current iAUXflows through resistor807and diode808when the diode808is forward biased and charges capacitor810to generate the VDDoperating voltage for the controller402.

Thus, an electronic system includes controller to control a switching power converter to provide power to a load. In at least one embodiment, the controller adjusts a detected target peak value with a post-detection delay compensation factor to generate a delay compensated current value that more accurately represents an actual peak current value associated with the current in the switching power converter. In at least one embodiment, the controller utilizes the delay compensated current value to determine an amount of current provided to the load and to determine a subsequent target peak current value.