Analysis of the Input Current Distortion and Guidelines for Designing High Power Factor Quasi-Resonant Flyback LED Drivers

: Nowadays, LED lamps have become a widespread solution in di ﬀ erent lighting systems due to their high brightness, e ﬃ ciency, long lifespan, high reliability and environmental friendliness. The choice of a proper LED driver circuit plays an important role, especially in terms of power quality. In fact, the driver controls its own input current in addition to the LED output current, thus it must guarantee a high power factor. Among the various LED drivers available on the market, the quasi-resonant (QR) ﬂyback topology shows interesting beneﬁts. This paper aims at investigating and analyzing the di ﬀ erent issues related to the input current distortion in a QR ﬂyback LED driver. Several e ﬀ ects, such as the distortion caused by the ringing current, crossover distortion due to transformer leakage inductance and crossover distortion due to the input storage capacitor have been experimentally reported. These e ﬀ ects, not previously studied for a high power factor (Hi-PF) QR ﬂyback, have been analyzed in depth. Finally, some practical design guidelines for a Hi-PF QR ﬂyback driver for LED applications are provided.

No active control is developed, so a significant current ripple can occur. The switching drivers can strongly reduce the current distortion and improve the PF with the additional advantage of being suitable for high frequency operations, thus enabling reduced size. On the other hand, switching LED drivers are less reliable than passive ones.

Passive LED Drivers
Passive LED drivers are characterized by the exclusive use of passive components (e.g., resistors, capacitors, magnetic components). The insertion of an impedance between the ac line and the LED lamp load to limit the current is mandatory. One of the main drawbacks of these topologies is the low PF and high THD, which are sometimes not enough to meet the standards [16].
Passive LED drivers can be classified into lossy and lossless impedance drivers. The strength and simplicity of the lossy impedance driver is due to the use of a resistor RL or a linear regulator on the dc side, as depicted in Figure 1. In many practical applications, it is widespread to use a bulky step-down transformer from high to low voltage. It has two-fold benefits-it reduces the voltage drop on the resistor with an increase in the overall system efficiency and, at the same time, guarantees galvanic isolation. A large electrolytic capacitor CS is typically used in order to avoid flickering.
A passive driver with a lossless impedance (an inductor, capacitor or their combinations), usually placed in the ac side to limit the LED output current, is shown in the example in Figure 2. An inductor Lin is usually adopted with the aim of replacing the less efficient and low-frequency transformer. The Lin usually behaves as an additional input filter (by means of Cin) which smooths the input current and leads to advantages such as reducing the input current distortion [17][18][19]. Instead of using a bulky electrolytic capacitor (E-CAP) that ensures a constant output current, a non-E-CAP is often used on the dc side, still achieving a higher PF with respect to the lossy counterpart. This solution can ensure a longer lifetime and smaller size of the overall system, although there is a small output current ripple in the LED load. Notwithstanding, lossless passive drivers can reach high efficiency, above 90% [18].
Passive drivers can be easily employed in outdoor applications and they are very cost effective, especially for low-power applications. The main drawbacks of passive LED drivers are their lack of a proper output current control and their having an input current THD that does not always meet the standards target.  A passive driver with a lossless impedance (an inductor, capacitor or their combinations), usually placed in the ac side to limit the LED output current, is shown in the example in Figure 2. An inductor L in is usually adopted with the aim of replacing the less efficient and low-frequency transformer. The L in usually behaves as an additional input filter (by means of C in ) which smooths the input current and leads to advantages such as reducing the input current distortion [17][18][19]. Instead of using a bulky electrolytic capacitor (E-CAP) that ensures a constant output current, a non-E-CAP is often used on the dc side, still achieving a higher PF with respect to the lossy counterpart. This solution can ensure a longer lifetime and smaller size of the overall system, although there is a small output current ripple in the LED load. Notwithstanding, lossless passive drivers can reach high efficiency, above 90% [18].

Switching LED Driver
Switching LED drivers bring various advantages arising from the use of the switching devices. Moreover, switching LED drivers can embed into a single electronic ballast with various functionalities, such as circuit fault protection and active and high PFC [20]. They are especially employed in indoor applications, since the whole circuit control is compact, reliable and effective with a low and controllable ripple output current. Another strength point of switching LED drivers is their higher efficiency in comparison to the passive ones. Switching LED driver topologies can be classified into two main categories, SS and TS, as shown in Figure 3. The SS drivers consist of a single power stage that acts as both a dc-dc regulator and PFC, shown in Figure 3a, with a storage capacitor Cs. On the other hand, the TS drivers are used for high-power applications. The aforementioned drivers comprise two power conversion stages that can perform different functions. In general, the first stage acts as a PFC and the second one as a dc-dc regulator and filter [21], as depicted in Figure  3b. In the following section, there is a brief focus on SS LED drivers with the main advantages of different topologies adopted in the literature.
SS drivers usually have a low component count and among them a power switch that controls a power conversion stage. However, it is often difficult for a SS driver to simultaneously ensure good performance in many respects, such as high efficiency, high PF, constant current output and so on. SS drivers are suitable for low and medium power class applications (below 70 W) where size and cost are usually more critical than PF and efficiency. The storage capacitor is usually placed downstream from the dc-dc converter, that is on the high frequency side, as shown by the red capacitor in Figure 4, to obtain a high PF. Notwithstanding, another approach can be found in some embedded LED drivers where the capacitor is placed on the low frequency side, as shown by the blue capacitor in Figure 4. More specifically, such an approach has sometimes been used in very low power applications (below 5 W) [22]. Indeed, nowadays, in this power range, passive LED drivers are adopted to guarantee an inexpensive cost. Figure 5a shows the waveforms of the current drawn Passive drivers can be easily employed in outdoor applications and they are very cost effective, especially for low-power applications. The main drawbacks of passive LED drivers are their lack of a proper output current control and their having an input current THD that does not always meet the standards target.

Switching LED Driver
Switching LED drivers bring various advantages arising from the use of the switching devices. Moreover, switching LED drivers can embed into a single electronic ballast with various functionalities, such as circuit fault protection and active and high PFC [20]. They are especially employed in indoor applications, since the whole circuit control is compact, reliable and effective with a low and controllable ripple output current. Another strength point of switching LED drivers is their higher efficiency in comparison to the passive ones. Switching LED driver topologies can be classified into two main categories, SS and TS, as shown in Figure 3. The SS drivers consist of a single power stage that acts as both a dc-dc regulator and PFC, shown in Figure 3a, with a storage capacitor C s . On the other hand, the TS drivers are used for high-power applications. The aforementioned drivers comprise two power conversion stages that can perform different functions. In general, the first stage acts as a PFC and the second one as a dc-dc regulator and filter [21], as depicted in Figure 3b.

Switching LED Driver
Switching LED drivers bring various advantages arising from the use of the switching devices. Moreover, switching LED drivers can embed into a single electronic ballast with various functionalities, such as circuit fault protection and active and high PFC [20]. They are especially employed in indoor applications, since the whole circuit control is compact, reliable and effective with a low and controllable ripple output current. Another strength point of switching LED drivers is their higher efficiency in comparison to the passive ones. Switching LED driver topologies can be classified into two main categories, SS and TS, as shown in Figure 3. The SS drivers consist of a single power stage that acts as both a dc-dc regulator and PFC, shown in Figure 3a, with a storage capacitor Cs. On the other hand, the TS drivers are used for high-power applications. The aforementioned drivers comprise two power conversion stages that can perform different functions. In general, the first stage acts as a PFC and the second one as a dc-dc regulator and filter [21], as depicted in Figure  3b. In the following section, there is a brief focus on SS LED drivers with the main advantages of different topologies adopted in the literature.
SS drivers usually have a low component count and among them a power switch that controls a power conversion stage. However, it is often difficult for a SS driver to simultaneously ensure good performance in many respects, such as high efficiency, high PF, constant current output and so on. SS drivers are suitable for low and medium power class applications (below 70 W) where size and cost are usually more critical than PF and efficiency. The storage capacitor is usually placed downstream from the dc-dc converter, that is on the high frequency side, as shown by the red capacitor in Figure 4, to obtain a high PF. Notwithstanding, another approach can be found in some embedded LED drivers where the capacitor is placed on the low frequency side, as shown by the blue capacitor in Figure 4. More specifically, such an approach has sometimes been used in very low power applications (below 5 W) [22]. Indeed, nowadays, in this power range, passive LED drivers are adopted to guarantee an inexpensive cost. Figure 5a shows the waveforms of the current drawn In the following section, there is a brief focus on SS LED drivers with the main advantages of different topologies adopted in the literature.
SS drivers usually have a low component count and among them a power switch that controls a power conversion stage. However, it is often difficult for a SS driver to simultaneously ensure good performance in many respects, such as high efficiency, high PF, constant current output and so on. SS drivers are suitable for low and medium power class applications (below 70 W) where size and cost are usually more critical than PF and efficiency. The storage capacitor is usually placed downstream from the dc-dc converter, that is on the high frequency side, as shown by the red capacitor in Figure 4, to obtain a high PF. Notwithstanding, another approach can be found in some embedded LED drivers where the capacitor is placed on the low frequency side, as shown by the blue capacitor in Figure 4. More specifically, such an approach has sometimes been used in very low power applications (below 5 W) [22]. Indeed, nowadays, in this power range, passive LED drivers are adopted to guarantee an inexpensive cost. Figure 5a shows the waveforms of the current drawn by LED lamps when the capacitor is placed on the low and high frequency side. The waveforms confirm that the dc-dc converter can guarantee PFC only when the storage capacitor is placed downstream from the dc-dc converter itself. Although the input current drawn by the LED lamp has a better THD when the capacitor is placed at the high frequency side, a higher output current ripple occurs in comparison to the previous solution, as shown in Figure 5b. However, the required storage capacitance is not always able to handle both the low and the high frequency ripple [23].
Energies 2020, 4, x FOR PEER REVIEW 5 of 24 by LED lamps when the capacitor is placed on the low and high frequency side. The waveforms confirm that the dc-dc converter can guarantee PFC only when the storage capacitor is placed downstream from the dc-dc converter itself. Although the input current drawn by the LED lamp has a better THD when the capacitor is placed at the high frequency side, a higher output current ripple occurs in comparison to the previous solution, as shown in Figure 5b. However, the required storage capacitance is not always able to handle both the low and the high frequency ripple [23]. (a) (b) Figure 5. Simulation of the current Iac drawn by the LED lamp (a), and the output LED load current ILED (b). The blue represents the case when the storage capacitor is directly connected on the low frequency side and the red on the high frequency side.
The SS LED drivers can be roughly classified on the bandwidth of the feedback control systems. In the case of a narrow bandwidth (e.g., boost, buck-boost and flyback) the storage capacitor must be located at the output of the converter. Instead, in the case of a wide bandwidth system (e.g., quadratic or single-stage single-switch input current shaper topologies) the storage capacitor is placed between the two semi-stages. In the following, the narrow bandwidth systems have been analyzed. In detail, a huge number of conventional LED drivers are widely discussed in literature, such as buck [24][25][26], buck-boost [27], SEPIC [28,29], flyback [30,31], half-bridge [32][33][34] and push-pull converters [35,36]. Furthermore, PFC can be achieved with valley-fill circuits [37]. Other approaches, such as coupledinductor modified converters [38][39][40][41] and valley-fill modified converters [42], show a simple solution to the step-down ratio requirement without compromising the efficiency and system complexity.
The flyback converter has been widely adopted in LED driver lamps because of its simple structure and high PF. One of the strengths is its efficiency, which can be improved by using the leakage energy or using soft-switching techniques [43]. In spite of the flyback LED driver having various advantages, in many practical applications the QR mode operation has become one of the most familiar methods in LED driver applications. It is worth noting the decrease in switching losses with respect to a flyback converter operated with a fixed frequency. Moreover, the QR driver has an  by LED lamps when the capacitor is placed on the low and high frequency side. The waveforms confirm that the dc-dc converter can guarantee PFC only when the storage capacitor is placed downstream from the dc-dc converter itself. Although the input current drawn by the LED lamp has a better THD when the capacitor is placed at the high frequency side, a higher output current ripple occurs in comparison to the previous solution, as shown in Figure 5b. However, the required storage capacitance is not always able to handle both the low and the high frequency ripple [23]. (a) (b) Figure 5. Simulation of the current Iac drawn by the LED lamp (a), and the output LED load current ILED (b). The blue represents the case when the storage capacitor is directly connected on the low frequency side and the red on the high frequency side.
The SS LED drivers can be roughly classified on the bandwidth of the feedback control systems. In the case of a narrow bandwidth (e.g., boost, buck-boost and flyback) the storage capacitor must be located at the output of the converter. Instead, in the case of a wide bandwidth system (e.g., quadratic or single-stage single-switch input current shaper topologies) the storage capacitor is placed between the two semi-stages. In the following, the narrow bandwidth systems have been analyzed. In detail, a huge number of conventional LED drivers are widely discussed in literature, such as buck [24][25][26], buck-boost [27], SEPIC [28,29], flyback [30,31], half-bridge [32][33][34] and push-pull converters [35,36]. Furthermore, PFC can be achieved with valley-fill circuits [37]. Other approaches, such as coupledinductor modified converters [38][39][40][41] and valley-fill modified converters [42], show a simple solution to the step-down ratio requirement without compromising the efficiency and system complexity.
The flyback converter has been widely adopted in LED driver lamps because of its simple structure and high PF. One of the strengths is its efficiency, which can be improved by using the leakage energy or using soft-switching techniques [43]. In spite of the flyback LED driver having various advantages, in many practical applications the QR mode operation has become one of the most familiar methods in LED driver applications. It is worth noting the decrease in switching losses with respect to a flyback converter operated with a fixed frequency. Moreover, the QR driver has an The SS LED drivers can be roughly classified on the bandwidth of the feedback control systems. In the case of a narrow bandwidth (e.g., boost, buck-boost and flyback) the storage capacitor must be located at the output of the converter. Instead, in the case of a wide bandwidth system (e.g., quadratic or single-stage single-switch input current shaper topologies) the storage capacitor is placed between the two semi-stages. In the following, the narrow bandwidth systems have been analyzed. In detail, a huge number of conventional LED drivers are widely discussed in literature, such as buck [24][25][26], buck-boost [27], SEPIC [28,29], flyback [30,31], half-bridge [32][33][34] and push-pull converters [35,36]. Furthermore, PFC can be achieved with valley-fill circuits [37]. Other approaches, such as coupled-inductor modified converters [38][39][40][41] and valley-fill modified converters [42], show a simple solution to the step-down ratio requirement without compromising the efficiency and system complexity.
The flyback converter has been widely adopted in LED driver lamps because of its simple structure and high PF. One of the strengths is its efficiency, which can be improved by using the leakage energy Energies 2020, 13, 2989 6 of 24 or using soft-switching techniques [43]. In spite of the flyback LED driver having various advantages, in many practical applications the QR mode operation has become one of the most familiar methods in LED driver applications. It is worth noting the decrease in switching losses with respect to a flyback converter operated with a fixed frequency. Moreover, the QR driver has an enhanced transient response in DCM operation [44,45] and it may have a smaller EMI filter [46]. In fact, in applications operated from the mains, the switching frequency is modulated at twice the mains frequency due to the voltage ripple appearing across the input capacitance. The switching frequency span depends on the amplitude of this input voltage ripple. This causes the spectrum to be spread over some frequency bands, rather than being concentrated on single frequency values.
In addition, the QR driver has a higher safety degree under short circuit conditions, since the switch is not enabled until the primary windings are fully demagnetized. Therefore, transformer saturation is not possible. On the other hand, the QR flyback LED driver may have a high ripple output current and high conduction losses in comparison to the fixed frequency driver.
It is important to point out that the difference between a DCM flyback and a QR flyback is in the turn-on mechanism. In a DCM flyback converter, the gate driver provides a constant switching frequency, while in a QR flyback a variable frequency is used, where the off time depends on the resonant valley detection of the drain-to-source voltage ringing that follows transformer demagnetization. Figure 6 depicts the drain-to-source voltage waveforms in the case of a DCM flyback, shown in Figure 6a, and a QR flyback, shown in Figure 6b, thus highlighting the benefit in terms of reduced switching losses.
Energies 2020, 4, x FOR PEER REVIEW 6 of 24 enhanced transient response in DCM operation [44,45] and it may have a smaller EMI filter [46]. In fact, in applications operated from the mains, the switching frequency is modulated at twice the mains frequency due to the voltage ripple appearing across the input capacitance. The switching frequency span depends on the amplitude of this input voltage ripple. This causes the spectrum to be spread over some frequency bands, rather than being concentrated on single frequency values. In addition, the QR driver has a higher safety degree under short circuit conditions, since the switch is not enabled until the primary windings are fully demagnetized. Therefore, transformer saturation is not possible. On the other hand, the QR flyback LED driver may have a high ripple output current and high conduction losses in comparison to the fixed frequency driver.
It is important to point out that the difference between a DCM flyback and a QR flyback is in the turn-on mechanism. In a DCM flyback converter, the gate driver provides a constant switching frequency, while in a QR flyback a variable frequency is used, where the off time depends on the resonant valley detection of the drain-to-source voltage ringing that follows transformer demagnetization. Figure 6 depicts the drain-to-source voltage waveforms in the case of a DCM flyback, shown in Figure 6a, and a QR flyback, shown in Figure 6b, thus highlighting the benefit in terms of reduced switching losses. A simplified schematic of a QR flyback LED driver (not for Hi-PF applications) is shown in Figure 7. The primary current Ip starts to flow into Lp when the power switch is turned on. The voltage at the secondary is such that the diode is reverse biased, hence the capacitance Cout supplies the LED string. Once the switch is turned off, the current Ip goes to zero and the voltage across both windings reverses, so that the output diode is forward-biased. Then, the current starts flowing in the secondary winding and Cout can be charged by the energy stored in the transformer. It is worth noting that, while the current flows on the secondary side, the drain-source voltage is equal to the rectified input Vin(t) plus the reflected output voltage VR at the primary windings. The transformer takes a time TFW to demagnetize, and as soon as the energy transfer is completed, the drain-source voltage starts ringing. The main reason for this energy exchange phenomenon is due to a resonant tank between the inductance Lpp and the capacitance Cpp. The inductance Lpp is the sum between the leakage inductance of the copper paths and the primary winding Lp. The latter it is the prevalent contribution, hence Lpp can be simply approximated as Lp. The capacitance Cpp can be expressed as the sum of the parasitic capacitances on the primary circuit and the capacitances of the secondary circuit referred to the primary one. The latter are due to the parasitic capacitances of the secondary circuit and to the output capacitance Cout. The primary circuit capacitance includes various contributions: the output parasitic capacitance Coss of the MOSFET; the junction capacitance of the diode; the package capacitance; the intra-winding capacitance of the transformer; plus other stray contributors together and so on [47][48][49][50][51]. Coss is a strongly nonlinear capacitance and, especially in the latest MOSFET generations, it increases dramatically (100 times or more) when the drain-source voltage, vDS, falls below few tens volt; i.e., Cpp is a function of vDS: Cpp(vDS). In the following, this capacitance will be considered constant A simplified schematic of a QR flyback LED driver (not for Hi-PF applications) is shown in Figure 7. The primary current I p starts to flow into L p when the power switch is turned on. The voltage at the secondary is such that the diode is reverse biased, hence the capacitance C out supplies the LED string. Once the switch is turned off, the current I p goes to zero and the voltage across both windings reverses, so that the output diode is forward-biased. Then, the current starts flowing in the secondary winding and C out can be charged by the energy stored in the transformer. It is worth noting that, while the current flows on the secondary side, the drain-source voltage is equal to the rectified input V in (t) plus the reflected output voltage V R at the primary windings. The transformer takes a time T FW to demagnetize, and as soon as the energy transfer is completed, the drain-source voltage starts ringing. The main reason for this energy exchange phenomenon is due to a resonant tank between the inductance L pp and the capacitance C pp . The inductance L pp is the sum between the leakage inductance of the copper paths and the primary winding L p . The latter it is the prevalent contribution, hence L pp can be simply approximated as L p. The capacitance C pp can be expressed as the sum of the parasitic capacitances on the primary circuit and the capacitances of the secondary circuit referred to the primary one. The latter are due to the parasitic capacitances of the secondary circuit and to the output capacitance C out . The primary circuit capacitance includes various contributions: the output parasitic capacitance C oss of the MOSFET; the junction capacitance of the diode; the package capacitance; Energies 2020, 13, 2989 7 of 24 the intra-winding capacitance of the transformer; plus other stray contributors together and so on [47][48][49][50][51]. C oss is a strongly nonlinear capacitance and, especially in the latest MOSFET generations, it increases dramatically (100 times or more) when the drain-source voltage, v DS , falls below few tens volt; i.e., C pp is a function of v DS : C pp (v DS ). In the following, this capacitance will be considered constant or, at least, not significantly impacting the overall C DS . Hence, the resonant frequency f r can be represented as: Energies 2020, 4, x FOR PEER REVIEW 7 of 24 or, at least, not significantly impacting the overall CDS. Hence, the resonant frequency fr can be represented as: In applications, the inductance Lp is measured with an impedance meter or by measuring the di/dt when a voltage square wave is applied, while CDS is esteemed by Equation (1)   Bearing in mind that, in a conventional QR topology a feedback voltage loop is used, and this loop controls the average value of the secondary current Is, it follows that the switching frequency is continuously adjusted depending on the output current load. In this way the switching device turns on when necessary, provided that the inner controller is able to detect a valley in the ringing drainsource voltage. The switching period T can be expressed as: where Ton is the on time of the power switch, TFW is the time interval where the current flows on the secondary side and Tring is the time interval during which the drain-source voltage rings. Ton is reduced as the load reduces, hence at very light load the frequency is high. Therefore, the maximum switching frequency imposes a minimum Ton. In this case, a further load reduction involves an increment of Tring. In detail, Tring strictly depends on the load level and it is imposed by keeping off the switch for some valley points in the drain-source voltage. In other terms, it depends on the number of the valley points k "skipped" by the controller. More specifically, k increases as the load level decreases. The term k is equal to 1 until Ton is greater than its minimum value, i.e. the switch is turned on at the fist valley on the drain-source voltage waveform (one-half of the resonant period). Thus, the QR mode operation of the converter represents the condition k = 1.
The reason behind the turn-on during a valley point of the drain-source voltage is the achievement of lower capacitive switching losses: This mechanism is able to minimize in a significant way the switching losses. It is worth noting that the bill of material of a QR driver contains only a few simple components, which implies an inexpensive solution [51,52]. In applications, the inductance L p is measured with an impedance meter or by measuring the di/dt when a voltage square wave is applied, while C DS is esteemed by Equation (1) from the measurement of the drain-source voltage ringing.
Bearing in mind that, in a conventional QR topology a feedback voltage loop is used, and this loop controls the average value of the secondary current I s , it follows that the switching frequency is continuously adjusted depending on the output current load. In this way the switching device turns on when necessary, provided that the inner controller is able to detect a valley in the ringing drain-source voltage. The switching period T can be expressed as: where T on is the on time of the power switch, T FW is the time interval where the current flows on the secondary side and T ring is the time interval during which the drain-source voltage rings. T on is reduced as the load reduces, hence at very light load the frequency is high. Therefore, the maximum switching frequency imposes a minimum T on . In this case, a further load reduction involves an increment of T ring . In detail, T ring strictly depends on the load level and it is imposed by keeping off the switch for some valley points in the drain-source voltage. In other terms, it depends on the number of the valley points k "skipped" by the controller. More specifically, k increases as the load level decreases. The term k is equal to 1 until T on is greater than its minimum value, i.e. the switch is turned on at the fist valley on the drain-source voltage waveform (one-half of the resonant period). Thus, the QR mode operation of the converter represents the condition k = 1.
The reason behind the turn-on during a valley point of the drain-source voltage is the achievement of lower capacitive switching losses: Energies 2020, 13, 2989

of 24
This mechanism is able to minimize in a significant way the switching losses. It is worth noting that the bill of material of a QR driver contains only a few simple components, which implies an inexpensive solution [51,52].

Generic Control Method Obtaining High Power Factor
Although the QR flyback converter topology is extremely popular since it is a very cost-effective solution with high performance, the converter features inherent distortion of the input current [48]. Normally, this distortion is not a concern for compliance with the IEC61000-3-2, however, some input current THD targets (e.g., <10% at full power) are becoming market requirements that are very difficult to achieve, especially when working with lighting equipment over 25 W [53].
As shown in Figure 7, the storage capacitor of the QR flyback is placed on the low frequency side of the dc-dc converter. With the aim to reduce the input current THD, the capacitor should be placed downstream from the converter, according to the waveform simulations in Figure 5a (red trace) related to the capacitor position of Figure 4. In this perspective, the converter can be considered as a Hi-PF QR flyback, which has a rectified voltage in input and the storage capacitor downstream of the power stage. The aforementioned solution strongly reduces the harmonics distortions of the input current drawn by the LED lamp.
The control gear in a Hi-PF QR flyback converter has a twofold task: firstly, it is responsible for regulating the output voltage or current and, simultaneously, it has to maintain a low THD of the input current. For the sake of completeness, the characteristics and proprieties of the control method that have to be considered to achieve a Hi-PF QR flyback converter will be briefly discussed.
The control method, shown in Figure 9, is responsible for the turn on and turn off of the switch. Henceforth, the quantities depending on the instantaneous line voltage will be considered as a function of the term θ = 2πflinet.
The target of the control method is to obtain an input current very similar to a sinusoid in-phase with the input voltage to achieve high-PF. Regardless of the specific control method, the previous target can be partially converted into obtaining a primary current, as shown by Ip in Figure 7, whose peak envelope, detailed by the green elements in Figure 9, leads to a sinusoid in-phase with the input voltage. To obtain such an envelope, the control method must turn off the switch when the current on the primary side reaches one of the (green) peaks in Figure 9. To obtain a similar result for the secondary current, shown by the red elements in Figure 9, a similar control must be adopted for the switch turn on. The turn on must occur when the transformer is fully demagnetized, thanks to a zerocurrent detector. In other terms, the combination of these switching rules, which result in a variable

Generic Control Method Obtaining High Power Factor
Although the QR flyback converter topology is extremely popular since it is a very cost-effective solution with high performance, the converter features inherent distortion of the input current [48]. Normally, this distortion is not a concern for compliance with the IEC61000-3-2, however, some input current THD targets (e.g., <10% at full power) are becoming market requirements that are very difficult to achieve, especially when working with lighting equipment over 25 W [53].
As shown in Figure 7, the storage capacitor of the QR flyback is placed on the low frequency side of the dc-dc converter. With the aim to reduce the input current THD, the capacitor should be placed downstream from the converter, according to the waveform simulations in Figure 5a (red trace) related to the capacitor position of Figure 4. In this perspective, the converter can be considered as a Hi-PF QR flyback, which has a rectified voltage in input and the storage capacitor downstream of the power stage. The aforementioned solution strongly reduces the harmonics distortions of the input current drawn by the LED lamp.
The control gear in a Hi-PF QR flyback converter has a twofold task: firstly, it is responsible for regulating the output voltage or current and, simultaneously, it has to maintain a low THD of the input current. For the sake of completeness, the characteristics and proprieties of the control method that have to be considered to achieve a Hi-PF QR flyback converter will be briefly discussed.
The control method, shown in Figure 9, is responsible for the turn on and turn off of the switch. Henceforth, the quantities depending on the instantaneous line voltage will be considered as a function of the term θ = 2πf line t.
The target of the control method is to obtain an input current very similar to a sinusoid in-phase with the input voltage to achieve high-PF. Regardless of the specific control method, the previous target can be partially converted into obtaining a primary current, as shown by I p in Figure 7, whose peak envelope, detailed by the green elements in Figure 9, leads to a sinusoid in-phase with the input voltage. To obtain such an envelope, the control method must turn off the switch when the current Energies 2020, 13, 2989 9 of 24 on the primary side reaches one of the (green) peaks in Figure 9. To obtain a similar result for the secondary current, shown by the red elements in Figure 9, a similar control must be adopted for the switch turn on. The turn on must occur when the transformer is fully demagnetized, thanks to a zero-current detector. In other terms, the combination of these switching rules, which result in a variable switching frequency, shown in Figure 9, ensures that the peaks of the primary current, in a half period of the rectified voltage V in (θ), can be enveloped by a rectified sinusoid. The primary current I p (θ) in a switching cycle is triangular shaped and flows only during the switch on-time, as sketched by the green triangles shown in Figure 9. During the off time, the secondary current I s (θ) flows and it is represented by the red triangles. Therefore, the switching frequency SW is variable, where the T ON (θ) and T OFF (θ) are modulated to achieve a sinusoidal current envelope.
Energies 2020, 4, x FOR PEER REVIEW 9 of 24 switching frequency, shown in Figure 9, ensures that the peaks of the primary current, in a half period of the rectified voltage Vin(θ), can be enveloped by a rectified sinusoid. The primary current Ip(θ) in a switching cycle is triangular shaped and flows only during the switch on-time, as sketched by the green triangles shown in Figure 9. During the off time, the secondary current Is(θ) flows and it is represented by the red triangles. Therefore, the switching frequency SW is variable, where the TON(θ) and TOFF(θ) are modulated to achieve a sinusoidal current envelope. However, the primary current Ip(θ) flows only during the on-time of the power switch, and this means that the average value of the primary current deviates significantly from an ideal sinusoid. To ensure good performance and low THD input current for a Hi-PF driver LED, the quantity D 2 T (D is the duty ratio) must be constant along each line half-cycle, thus a unity PF is obtained [54].
In this paper, it is assumed that the generic control method implements the previous features. For the sake of simplicity to obtain a quantitative expression of the input current Iin, the following assumptions have been considered: 1. The line voltage is sinusoidal, and the input bridge rectifier is ideal, thus the voltage at the bridge output terminal is a rectified sinusoid. 2. The voltage drop across the power switch in the on-state is negligible and there is negligible energy accumulation on the dc side of the bridge. 3. The transformer windings are perfectly coupled (i.e., no leakage inductance). 4. The turn-off transient of the power switch has negligible duration so that TFW immediately follows TON. 5. The converter is operated so the power switch is turned on in each cycle after the secondary current becomes zero, therefore in either QR-mode (i.e., on the first valley of the ringing in the drain-source voltage) or DCM. 6. The output voltage is constant along a line half-cycle. 7. During the time interval elapsing from the instant when the transformer demagnetizes to the instant when the power switch is turned on, the transformer current is zero; consequently, the initial current during the on-time is zero too. This time interval is equal to Tr/2 in the case of the converter being used in QR mode.
It is worth generalizing the relation to D 2 T when a variable switching frequency is used, in particular: However, the primary current I p (θ) flows only during the on-time of the power switch, and this means that the average value of the primary current deviates significantly from an ideal sinusoid. To ensure good performance and low THD input current for a Hi-PF driver LED, the quantity D 2 T (D is the duty ratio) must be constant along each line half-cycle, thus a unity PF is obtained [54].
In this paper, it is assumed that the generic control method implements the previous features. For the sake of simplicity to obtain a quantitative expression of the input current I in , the following assumptions have been considered:

1.
The line voltage is sinusoidal, and the input bridge rectifier is ideal, thus the voltage at the bridge output terminal is a rectified sinusoid.

2.
The voltage drop across the power switch in the on-state is negligible and there is negligible energy accumulation on the dc side of the bridge.

4.
The turn-off transient of the power switch has negligible duration so that T FW immediately follows T ON . 5.
The converter is operated so the power switch is turned on in each cycle after the secondary current becomes zero, therefore in either QR-mode (i.e., on the first valley of the ringing in the drain-source voltage) or DCM. 6.
The output voltage is constant along a line half-cycle. 7.
During the time interval elapsing from the instant when the transformer demagnetizes to the instant when the power switch is turned on, the transformer current is zero; consequently, the initial current during the on-time is zero too. This time interval is equal to T r /2 in the case of the converter being used in QR mode.
It is worth generalizing the relation to D 2 T when a variable switching frequency is used, in particular: where the dependences of T ON and T on θ point out that they are a function of the instantaneous line voltage V ac . Assuming that the rectified voltage V in is sinusoidal in 0 ≤ θ ≤ π, according to assumption 1, it can be written as: where V in,pk is the amplitude of the rectified voltage. By considering the current flowing in the primary windings during the time interval T ON , and bearing in mind the inductance current-voltage differential relation, the peak value of primary current I pkp (θ) can be expressed as: The generic control method must ensure that the height of the triangles depicted in Figure 9 varies along a line cycle as expressed by Equation (6). To reach this target, the control method must properly vary the width of T ON (θ) as well as T OFF (θ). The input current I in (θ) is the average value of each triangle over a switching cycle, hence, taking Equation (6) into account: It is worth noting that, if the ratio T on (θ) 2 /T(θ) is maintained constant by the controller, the input current I in (θ) can be assumed sinusoidal. Figure 10 summarizes the key current waveform in the Hi-PF driver LED.  T  T  D T  T  T T where the dependences of TON and T on θ point out that they are a function of the instantaneous line voltage Vac. Assuming that the rectified voltage Vin is sinusoidal in 0 ≤ θ ≤ π, according to assumption 1, it can be written as: where Vin,pk is the amplitude of the rectified voltage. By considering the current flowing in the primary windings during the time interval TON, and bearing in mind the inductance current-voltage differential relation, the peak value of primary current Ipkp(θ) can be expressed as: The generic control method must ensure that the height of the triangles depicted in Figure 9 varies along a line cycle as expressed by equation 6. To reach this target, the control method must properly vary the width of TON(θ) as well as TOFF(θ). The input current Iin(θ) is the average value of each triangle over a switching cycle, hence, taking Equation (6) into account: It is worth noting that, if the ratio Ton(θ) 2 /T(θ) is maintained constant by the controller, the input current Iin(θ) can be assumed sinusoidal. Figure 10 summarizes the key current waveform in the Hi-PF driver LED. Despite the fact that a suitable control method leads to a Hi-PF QR flyback driver according to the previous features, there are different inherent causes of distortion in the input current to be faced. The distortion due to these causes is reported in the next section where the THD has been experimentally evaluated. After that, in the following subsections, these causes, due to the power processing mechanism of the QR flyback converter that are not ascribable to the specific control method (although the control method may mitigate them), are described.

Experimental Verification of the Input Current Distortion in a Hi-PF QR Flyback LED Driver
A prototype of a Hi-PF QR flyback LED driver was set up to highlight the distortion occurring, even when a control method implementing the previous features is adopted. The main parameters of the converter are summarized in Table 1. Despite the fact that a suitable control method leads to a Hi-PF QR flyback driver according to the previous features, there are different inherent causes of distortion in the input current to be faced. The distortion due to these causes is reported in the next section where the THD has been experimentally evaluated. After that, in the following subsections, these causes, due to the power processing mechanism of the QR flyback converter that are not ascribable to the specific control method (although the control method may mitigate them), are described.

Experimental Verification of the Input Current Distortion in a Hi-PF QR Flyback LED Driver
A prototype of a Hi-PF QR flyback LED driver was set up to highlight the distortion occurring, even when a control method implementing the previous features is adopted. The main parameters of the converter are summarized in Table 1. The prototype was built and its performance evaluated on the bench. The PF was greater than 0.98 over the input voltage range at full load. At 50% load, at low line it was nearly equal to that at 100% load, but at high line it dropped to about 0.97 at 230 V ac . Figure 11 depicts the experimental waveforms of the input current I ac (θ) (blue trace), the output voltage (red trace), the drain current of the MOSFET (green trace) and the current sense voltage reference for the controller (purple trace). The measurements were carried out at full load both at 110 V ac (60 Hz) and 230 V ac (50 Hz). From the experimental evidence, the shape of the measured I ac (θ) was very close to an ideal sinusoid waveform. It is worth noting that the harmonic contribution the prototype boards met the European norm EN61000-3-2 Class-C and Japanese norm JEITA_MITI Class-C, both of which are relevant to lighting equipment, at full load and nominal input voltage mains, as depicted in Figure 11.
A small distortion in the input current is apparent in Figure 11 (blue trace) by looking at the zero crossing of the waveform. Therefore, as previously mentioned, notwithstanding the enhanced performance of a Hi-PF QR flyback LED driver, there are still different inherent causes of distortion in the input current that are not ascribable to the specific control method. The causes are the ringing current, the crossover distortion due to transformer leakage inductance and crossover distortion due to the input storage capacitor. Generally speaking, being the converter in a nonlinear system, the overall THD of the input current cannot be the sum of each individual distortion contribution. Due to the number and the complexity of the distortion causes and, above all, due to the complexity of their mutual multi-interactions, the only way to have a sensible estimate of the overall result in terms of input current THD is to resort to simulations.
It is worth noting that the distortion of the input current I ac (θ) caused by the ringing effect has already been studied theoretically for boost PFC [55][56][57], while in the case of a Hi-PF QR flyback it has not yet been treated. Furthermore, the crossover distortion due to the input storage capacitor in the case of a Hi-PF flyback LED driver has never been studied. Finally, the crossover distortion due to transformer leakage inductance has also been theoretically analyzed in depth.

Distortion Caused by the Ringing Current
In a flyback, the drain-to-source voltage rings as soon as the secondary winding is fully demagnetized. The energy is exchanged between the total capacitance CDS of the drain node and the primary inductance of the flyback transformer Lp. For the sake of simplicity, assumption 3 has been assumed, and consequentially it has been carried out an equivalent circuit of the QR flyback during the time interval Tneg, which is the duration of the negative portion of the primary current, Ip. The duration of the positive portion, Tpos, of the primary current is equal to TON when the current in the turn-on instant of the power switch is zero. The simplified circuit model and the key waveforms are depicted in Figure 12.
In Figure 12a, the voltage across Lp is equal to the reflected output voltage VR, which is almost constant during TFW, according to the previous assumption 6. After that, the voltage across Lp and CDS and the current trough them start to oscillate. More specifically, the analytical expressions of VDS(t) and Ip(t) in the time interval Tneg, can be written as:

Distortion Caused by the Ringing Current
In a flyback, the drain-to-source voltage rings as soon as the secondary winding is fully demagnetized. The energy is exchanged between the total capacitance C DS of the drain node and the primary inductance of the flyback transformer L p . For the sake of simplicity, assumption 3 has been assumed, and consequentially it has been carried out an equivalent circuit of the QR flyback during the time interval T neg , which is the duration of the negative portion of the primary current, I p . The duration of the positive portion, T pos , of the primary current is equal to T ON when the current in the turn-on instant of the power switch is zero. The simplified circuit model and the key waveforms are depicted in Figure 12.
In Figure 12a, the voltage across L p is equal to the reflected output voltage V R , which is almost constant during T FW , according to the previous assumption 6. After that, the voltage across L p and C DS and the current trough them start to oscillate. More specifically, the analytical expressions of V DS (t) and I p (t) in the time interval T neg , can be written as: Energies 2020, 13, 2989 13 of 24 where Y L is the characteristic admittance of the C DS -L p tank circuit and T z is the time interval needed for the V DS to fall zero when V in < V R ; that is: When QR-mode is adopted, the device can be turned on, but according to assumption 5, the current must reach zero. T zz is the time interval needed for the primary current I p to ramp linearly until zero from the current value I p (T z ). In DCM operation, considering that I p oscillates around zero, and that ringing is damped, after a few ringing cycles, assumption 7 can be considered exactly true; with QR operation, the negative current just after demagnetization is not compensated by subsequent positive contributions as in DCM. Considering zero the average value of I p , as per assumption 7, is already a better approximation as compared to totally neglecting T R (i.e., assuming the operation is exactly at the boundary between DCM and CCM). However, in this context, assumption 7 is just a simplification, whose impact on the shape of the input current, quantitatively expressed by its THD, needs to be assessed. Being the ringing current at the turn-on instant of the power switch equal to the initial current during the on-time interval, this current may or may not be zero, which has an impact on the shape of the input current and, consequently, on its THD too.
When V in > V R , in QR-mode, the turn on occurs at the first valley of the ringing in the drain voltage that follows the transformer demagnetization. Therefore, in this case, T neg is equal to T r /2.
where YL is the characteristic admittance of the CDS-Lp tank circuit and Tz is the time interval needed for the VDS to fall zero when Vin < VR; that is: When QR-mode is adopted, the device can be turned on, but according to assumption 5, the current must reach zero. Tzz is the time interval needed for the primary current Ip to ramp linearly until zero from the current value Ip(Tz). In DCM operation, considering that Ip oscillates around zero, and that ringing is damped, after a few ringing cycles, assumption 7 can be considered exactly true; with QR operation, the negative current just after demagnetization is not compensated by subsequent positive contributions as in DCM. Considering zero the average value of Ip, as per assumption 7, is already a better approximation as compared to totally neglecting TR (i.e., assuming the operation is exactly at the boundary between DCM and CCM). However, in this context, assumption 7 is just a simplification, whose impact on the shape of the input current, quantitatively expressed by its THD, needs to be assessed. Being the ringing current at the turn-on instant of the power switch equal to the initial current during the on-time interval, this current may or may not be zero, which has an impact on the shape of the input current and, consequently, on its THD too.
When Vin > VR, in QR-mode, the turn on occurs at the first valley of the ringing in the drain voltage that follows the transformer demagnetization. Therefore, in this case, Tneg is equal to Tr/2. By neglecting the input capacitor Cs from the QR flyback schematic in Figure 7, the following considerations are valid: during Ton a charge Qpos is provided from the input source and stored in the transformer; during TFW, the energy is mostly delivered to the output; finally, in Tneg, a negative charge By neglecting the input capacitor C s from the QR flyback schematic in Figure 7, the following considerations are valid: during T on a charge Q pos is provided from the input source and stored in the transformer; during T FW , the energy is mostly delivered to the output; finally, in T neg , a negative charge Q neg is returned to the input source. The average input current during a switching cycle can therefore be expressed as: Energies 2020, 13, 2989

of 24
As shown in Figure 9, the positive charge Q pos is clearly given by: To evaluate the absolute value of the negative charge Q neg , it is necessary to consider Equations (8)- (10), that describe the V DS (t) and I p (t) variations in the time interval T neg (when QR operation is only considered) and distinguish two cases.

1.
V in > V R . In the time interval (0, T neg ) V DS (t) is always greater than zero and the current I p (t) is sinusoidal; T neg equals half the ringing period. The average value of I p (t) during T neg is 2/π times the negative peak value |I vyp | = Y L V R , therefore: 2. V in ≤ V R . The current I p (t) is sinusoidal in the subinterval (0, T z ). T z can be expressed as: 15) and the current Ip(t) evaluated when t = Tz is: As depicted in Figure 12b, in the time interval T zz , I p (t) ramps up linearly to zero. Hence, T zz can be expressed as: Since T neg is the sum of T z and T zz , it can be written: which is always greater than T r /2, except when V in = V R . Finally, Q neg is given by the sum of the two contributions, Q neg1 during the subinterval (0, T z ) and Q neg2 during the subinterval (T z , T neg ). After some mathematical steps, Q neg can be evaluated as: Considering Equation (12), the overall input current I in (θ) can be found by adding the contributions obtained in Equations (7) and (13), which also takes into account the ringing oscillations along each line half-cycle. Hence it can be written as: It is evident that the positive term in Equation (20) does not introduce any distortion, provided that the generic control method provides I pkp (θ), as in Equation (6), and satisfies Equation (4). The contribution of the ringing current, related exclusively to the negative terms, takes into account the ringing contributions derived in Equations (14) and (19). They represent a twofold effect: they downwards offset the input current waveform, which produces crossover distortion and, considered that the offset is a function of the instantaneous line voltage, they distort its shape as well. It is worth noting that the distortion contribution is not ascribable to the control method; that is, it is not due to the control but is inherent in the power processing mechanism of any Hi-PF QR flyback converter. On the other hand, the control method may compensate or mitigate it. First of all, the contribution of the ringing current can be reduced by lowering the switching frequency (i.e., a longer T(θ), obtained with a larger L p value) and using a low reflected voltage V R . However, a larger L p value implies a bigger flyback transformer, and a lower V R increases the primary rms current and, consequently, the conduction losses. A trade-off is therefore required. A smaller C DS also helps to reduce the ringing contribution, however, it is important to underline that a tradeoff between switching losses and EMI should be found. In fact, the lower the C DS , the faster the V DS transient at turn-off, and this faster transient may adversely affect both the efficiency of the power switch, as well as the EMI.
LED driver applications are typically specified to accommodate a certain range of output voltages V out to power different types and lengths of LED string. Thus the contribution of the ringing current is expected to be maximum at the upper end of the V out range and minimum at the lower end of the V out range. In fact, lowering V out will simultaneously reduce V R and increase T(θ).

Crossover Distortion Due to the Input Capacitor
The storage capacitor Cs placed downstream of the input bridge, as depicted in Figure 7, is part of the EMI filter, which is always needed in an SMPS connected to the power line to restrict the conducted emission within the limits envisaged by the relevant EMI regulations. The capacitor has a twofold effect: it contributes to the voltage-current phase-shift and worsens the THD by maintaining a residual voltage on the dc side of the input bridge rectifier. The latter causes a non-conduction zone as the line voltage approaches zero, therefore, assumption 2 is no longer valid for the following analysis. This phenomenon also occurs for systems without a PFC and is an additional source of crossover itself, which interacts with the other distortion mechanisms. A quantitative analysis of this crossover distortion can be carried out independently from the topology employed in a PFC.
In these terms, any PFC and, consequently, the Hi-PF QR flyback converter can be modeled with an equivalent resistor (R eq ) that can be expressed as: where V PK is the peak of the rectified line voltage V in (θ) and P in is the input power of the converter. Generally speaking, the dead zone in I ac (θ) increases at large C S values, high line voltage and low load (large R eq ). In quantitative terms, the dead zone starts, near the zero-crossing, when the rate of fall in the line voltage V ac (θ) exceeds the rate of the voltage V in (θ) across C S , limited by the time constant R eq C S , so that from that instant on it is V ac (θ) < V in (θ), as shown in Figure 13.
Focusing on the V ac (θ) and V in (θ) near the zero-crossing zone, shown in Figure 13a, and neglecting the voltage drop across the input bridge rectifier, the phase angle α at which the slope of the two voltages are equal can be found with the following relation: Solving for α: tan α = 2π f L R eq C s From π-α on, Vin(θ) follows an exponential decay until the phase θ is equal to π + β, where it is again |Vac(θ)| ≥ Vin(θ), which marks the end of the dead zone. In this interval the expression of Vin(θ) can be assumed as: Beyond the angle π + β, Vac(θ) and Vin(θ) are again both sinusoidal and overlapping until they have a phase shift equal to α away from the next zero-crossing. The duration of the dead zone is clearly α + β.
The phase angle β can be found at the intersection of an exponential curve with a sinusoidal one, which results in a transcendental equation with no closed-form solution. Since β is small, it is possible to find an approximate solution βa, substituting the last part of the exponential function (from θ = π to θ = π + β) with its expansion in Taylor series to the first order (e −θ ≈ 1−θ). In a similar way it can be done for the rectified sinusoid (sin θ ≈ θ). Therefore, the value Λ of the input voltage, evaluated when the phase angle is π, can be computed as follows: As shown in Figure 13b, at the intersection of the two straight lines, the phase angle is π + βa.
The truncation of the exponential Equation (24) to the first order introduces an underestimation, as depicted in Figure 13b, hence Equation (26) provides an approximated value βa < β. On the other hand, if Equation (24) is approximated to the second order, which provides a better approximation of equation 24, an overestimation will result and the approximated value βa > β is less than 4% larger than the value provided by Equation (26), which proves that the accuracy of the first assumption is valid anyway.
The previous analysis shows that the storage capacitor CS can be assumed as a source of crossover distortion, even if Req is a real resistor. The key point is the inability of Vin(θ) to keep pace with Vac(θ) on the falling edge of the sinusoid, due to the maximum discharge rate of CS through Req. However, its net impact is the result of the interaction with the other sources of distortion, previously analyzed. From π-α on, V in (θ) follows an exponential decay until the phase θ is equal to π + β, where it is again |V ac (θ)| ≥ V in (θ), which marks the end of the dead zone. In this interval the expression of V in (θ) can be assumed as: Beyond the angle π + β, V ac (θ) and V in (θ) are again both sinusoidal and overlapping until they have a phase shift equal to α away from the next zero-crossing. The duration of the dead zone is clearly α + β.
The phase angle β can be found at the intersection of an exponential curve with a sinusoidal one, which results in a transcendental equation with no closed-form solution. Since β is small, it is possible to find an approximate solution β a , substituting the last part of the exponential function (from θ = π to θ = π + β) with its expansion in Taylor series to the first order (e −θ ≈ 1−θ). In a similar way it can be done for the rectified sinusoid (sin θ ≈ θ). Therefore, the value Λ of the input voltage, evaluated when the phase angle is π, can be computed as follows: As shown in Figure 13b, at the intersection of the two straight lines, the phase angle is π + β a .
The truncation of the exponential Equation (24) to the first order introduces an underestimation, as depicted in Figure 13b, hence Equation (26) provides an approximated value β a < β. On the other hand, if Equation (24) is approximated to the second order, which provides a better approximation of Equation (24), an overestimation will result and the approximated value β a > β is less than 4% larger than the value provided by Equation (26), which proves that the accuracy of the first assumption is valid anyway.
The previous analysis shows that the storage capacitor C S can be assumed as a source of crossover distortion, even if R eq is a real resistor. The key point is the inability of V in (θ) to keep pace with V ac (θ) on the falling edge of the sinusoid, due to the maximum discharge rate of C S through R eq . However, its net impact is the result of the interaction with the other sources of distortion, previously analyzed.
In fact, it has been assumed that a resistor R eq that represents the whole converter, which implicitly means that the ratio of V in (θ) to I in (θ) is constant in (0, π); i.e., I in (θ) is pure sinusoidal in (0, π). Actually, the distortion of the current shape, caused by all the previously considered sources, tends to reduce I in (θ) with respect to the undistorted case. Instead, considering the same model approach, if it can be assumed that the R eq changes along the sinusoid, then R eq = R eq (θ) = V in (θ)/I in (θ). Figure 14 shows R eq (θ) obtained by dividing a sinusoidal input voltage and the current drawn that takes into account the distortion caused by the ringing current in Equation (20).
Energies 2020, 4, x FOR PEER REVIEW 17 of 24 In fact, it has been assumed that a resistor Req that represents the whole converter, which implicitly means that the ratio of Vin (θ) to Iin(θ) is constant in (0, π); i.e., Iin(θ) is pure sinusoidal in (0, π). Actually, the distortion of the current shape, caused by all the previously considered sources, tends to reduce Iin(θ) with respect to the undistorted case. Instead, considering the same model approach, if it can be assumed that the Req changes along the sinusoid, then Req = Req(θ) = Vin(θ)/Iin(θ). Figure 14 shows Req(θ) obtained by dividing a sinusoidal input voltage and the current drawn that takes into account the distortion caused by the ringing current in Equation (20). Req(θ) is almost flat for a wide range of the sinusoid except when the current is approaching the zero crossings. The increase in Req(θ) produces an early dead zone with respect to the case with a fixed Req. The corresponding value of α would be the solution of the equation: The solution of Equation (27) must be defined in the interval (π/2, π), where tan α has a finite value and consequentially also Req(α). As a result, the dead zone caused by the input capacitor Cs starts before Req(θ) diverges, and Iac(θ) must cross zero before Iin(θ). In other words, as long as the bridge rectifier conducts, Iac(θ) is the sum of Iin(θ) and the current through CS, which is essentially a sinusoid leading by 90 degrees. This causes Iac(θ) to lead Iin(θ), whereas without CS they would be essentially coincident.
Within the dead zone, the relation Req(θ) = Vin(θ)/Iin(θ) is no longer the one shown in the diagram of Figure 14 because of both the voltage Vin(θ) and the Iin(θ) are not sinusoidal. Besides, the voltage retained by Cs, which makes Vin(θ) > |Vac(θ)|, and TON(θ) and T(θ) will be much smaller than those predicted during the control method design, which was carried out assuming a sinusoidal input voltage, as per Equation (5). The resulting switching frequency may be higher. As long as some energy is delivered to the output, CS (which is the only source of energy, since no current comes from the reverse-biased bridge rectifier), keeps on discharging and as long as Iin(θ) > 0. If the peak current becomes lower than the critical peak primary current for no energy transfer, the energy is no longer transferred to the output and bounces back and forth between CS and Lp, except for the energy dissipated during this process. As a consequence, CS is discharged at a lower rate. Instead, if the peak current does not go below that critical value, the discharge rate of CS has no change.
When |Vac(θ)| ≥ Vin(θ) and the dead zone ends at θ = β, it is possible to observe an abrupt variation in Iac(θ). This is caused by the bridge rectifier that is forward-biased, as Iac(θ) has to transition from zero to Iac(β), which is already greater than zero because of the leading phase of Iac(θ).
It is worth mentioning that, near the zero crossing interval, the input voltage is far from constant in a switching cycle and the switching frequency may come close to the frequency related to the resonance between CS and Lp. So, the Vin(θ) has sinusoidal behavior, rather than constant. Additionally, the resonance of the inductors and capacitors in the EMI filter can also be stimulated, R eq (θ) is almost flat for a wide range of the sinusoid except when the current is approaching the zero crossings. The increase in R eq (θ) produces an early dead zone with respect to the case with a fixed R eq . The corresponding value of α would be the solution of the equation: The solution of Equation (27) must be defined in the interval (π/2, π), where tan α has a finite value and consequentially also R eq (α). As a result, the dead zone caused by the input capacitor C s starts before R eq (θ) diverges, and I ac (θ) must cross zero before I in (θ). In other words, as long as the bridge rectifier conducts, I ac (θ) is the sum of I in (θ) and the current through C S , which is essentially a sinusoid leading by 90 degrees. This causes I ac (θ) to lead I in (θ), whereas without C S they would be essentially coincident.
Within the dead zone, the relation R eq (θ) = V in (θ) / I in (θ) is no longer the one shown in the diagram of Figure 14 because of both the voltage V in (θ) and the I in (θ) are not sinusoidal. Besides, the voltage retained by C s , which makes V in (θ) > |V ac (θ)|, and T ON (θ) and T(θ) will be much smaller than those predicted during the control method design, which was carried out assuming a sinusoidal input voltage, as per Equation (5). The resulting switching frequency may be higher. As long as some energy is delivered to the output, C S (which is the only source of energy, since no current comes from the reverse-biased bridge rectifier), keeps on discharging and as long as I in (θ) > 0. If the peak current becomes lower than the critical peak primary current for no energy transfer, the energy is no longer transferred to the output and bounces back and forth between C S and L p , except for the energy dissipated during this process. As a consequence, C S is discharged at a lower rate. Instead, if the peak current does not go below that critical value, the discharge rate of C S has no change.
When |V ac (θ)| ≥ V in (θ) and the dead zone ends at θ = β, it is possible to observe an abrupt variation in I ac (θ). This is caused by the bridge rectifier that is forward-biased, as I ac (θ) has to transition from zero to I ac (β), which is already greater than zero because of the leading phase of I ac (θ).
It is worth mentioning that, near the zero crossing interval, the input voltage is far from constant in a switching cycle and the switching frequency may come close to the frequency related to the resonance between C S and L p . So, the V in (θ) has sinusoidal behavior, rather than constant. Additionally, the resonance of the inductors and capacitors in the EMI filter can also be stimulated, so that different resonance phenomena may coexist. This means that the modeling approach used throughout the present discussion is not always valid in describing the practical behavior.

Crossover Distortion Due to Transformer's Leakage Inductance
In practical cases, the real transformer's windings are not perfectly coupled. This phenomenon causes a crossover distortion that affects the input current shape and degrades the THD. Therefore, in the following subsection, the analysis of the distortion no longer takes into account assumptions 3 and 4.
In a real transformer, a portion of the energy stored in the primary winding cannot be transferred to the secondary winding because of imperfect magnetic coupling. In other words, this can be modeled by considering the primary inductance L p split into two distinct elements: the magnetizing inductance L M perfectly coupled to the secondary winding and the leakage inductance L lk (uncoupled). In these terms, it is useful to define the coupling coefficient σ such that L M = σ L p and L lk = (1− σ) L p . Typical values of σ range from 0.95 to 0.99.
The energy stored in the leakage inductance is not transferred to the output and this energy would overcharge C DS well over V in (θ) + V R , in most cases exceeding the voltage rating of the power switch. A typical solution is to use a clamp circuit which limits V DS (t) at a well-defined and properly selected value V CL (> V R ) above V in (θ). Figure 15 shows the equivalent circuit of the Hi-PF QR flyback converter during the off time and the current waveforms underlining the effect of L lk .
so that different resonance phenomena may coexist. This means that the modeling approach used throughout the present discussion is not always valid in describing the practical behavior.

Crossover Distortion Due to Transformer's Leakage Inductance
In practical cases, the real transformer's windings are not perfectly coupled. This phenomenon causes a crossover distortion that affects the input current shape and degrades the THD. Therefore, in the following subsection, the analysis of the distortion no longer takes into account assumptions 3 and 4.
In a real transformer, a portion of the energy stored in the primary winding cannot be transferred to the secondary winding because of imperfect magnetic coupling. In other words, this can be modeled by considering the primary inductance Lp split into two distinct elements: the magnetizing inductance LM perfectly coupled to the secondary winding and the leakage inductance Llk (uncoupled). In these terms, it is useful to define the coupling coefficient σ such that LM = σ Lp and Llk = (1− σ) Lp. Typical values of σ range from 0.95 to 0.99.
The energy stored in the leakage inductance is not transferred to the output and this energy would overcharge CDS well over Vin(θ) + VR, in most cases exceeding the voltage rating of the power switch. A typical solution is to use a clamp circuit which limits VDS(t) at a well-defined and properly selected value VCL (> VR) above Vin(θ). Figure 15 shows the equivalent circuit of the Hi-PF QR flyback converter during the off time and the current waveforms underlining the effect of Llk.
When the power switch is turned off, the primary current firstly charges the capacitance CDS, thus the VDS(t) evolves until the voltage of the magnetizing inductance LM, VM, equals -VR. During this time interval Tps, the primary current Ip is flowing through LM and Llk, so there is an inductive voltage divider. Therefore: In the instant when the voltage VM equals -VR, the voltage Vp across the primary winding can be expressed as: Immediately after the time interval Tps, the current starts flowing through D1 and the energy starts being transferred to the output. VDS(t) keeps on ramping up until it reaches Vin (θ) + VCL in a time TLK. After that, VDS(t) is clamped, Llk starts being demagnetized with a rate equal to (VR−VCL)/Llk and the current through D1 reduces at the same rate. The portion of the primary current Ip(t) of the leakage inductance varies from the peak value, Ipkp(θ), until zero in a time interval equal to TLK(θ). Hence: When the power switch is turned off, the primary current firstly charges the capacitance C DS , thus the V DS (t) evolves until the voltage of the magnetizing inductance L M , V M , equals -V R . During this time interval T ps , the primary current I p is flowing through L M and L lk , so there is an inductive voltage divider. Therefore: In the instant when the voltage V M equals -V R , the voltage V p across the primary winding can be expressed as: Immediately after the time interval T ps , the current starts flowing through D1 and the energy starts being transferred to the output. V DS (t) keeps on ramping up until it reaches V in (θ) + V CL in a time T LK . After that, V DS (t) is clamped, L lk starts being demagnetized with a rate equal to (V R −V CL ) / L lk and the current through D1 reduces at the same rate. The portion of the primary current I p (t) of the leakage inductance varies from the peak value, I pkp (θ), until zero in a time interval equal to T LK (θ). Hence: As soon as I p (t) is equal to zero, it can be written in the analytical expression of T LK : Bearing in mind the current that flows in L M can be written as: Meanwhile, the secondary current reaches its peak value I pks (θ): After that, the magnetizing inductance on the secondary side starts being demagnetized at a rate V R/ L M until it zeroes in a time T DEM , as shown in Figure 15. The presence of L lk splits the time interval T FW in a first subinterval T LK needed to demagnetize the leakage inductance (and magnetize the secondary winding) and a second subinterval T DEM needed to demagnetize the secondary winding. It is possible to prove that the resulting T FW can be expressed as: (i.e., the one calculated neglecting the leakage inductance multiplied by the coupling coefficient σ).
The presence of L lk clearly compromises the input-to-output transfer energy, thus the dead zone where there is no energy transfer is expected to occur over a wider phase angle range of the line voltage. In fact, the "no energy transfer" condition concerns only the portion of the primary voltage V p across the magnetizing inductance L M . Combining Equations (8), (9) and (28), it is possible to find that the condition for no energy transfer, solved for I pkp (θ), yields: The critical peak primary current for no energy transfer, expressed by Equation (35), is larger than the ideal case (σ = 1), thus confirming the forecast of a wider dead zone related to this phenomenon.
It is noteworthy to compare the critical value of I pkp (θ) in Equation (35) to that determined by the ringing current after demagnetization and the relative positions of the dead zones they generate.
Bearing in mind that the on time can be written as: The region around zero crossings where there is no input-to-output energy transfer (I in (θ) = 0), can be written by considering the combination of the input current in Equation (20) in the case of V in < V R , and Equation (36): Combining Equations (10)- (37), the ringing current after demagnetization related to the dead zone can be expressed as: Figure 16 shows the ratio of the critical value of I pkp (θ) for no input-to-output energy transfer, as in Equation (35), to that caused by the ringing current, as in Equation (38). The ratio is expressed as a function of the parameter K v : where V PK is the peak value of the rectified line voltage V in (θ). The dashed blue line represents the ideal case. As is evident from Figure 16, the dead zone becomes even larger near the zero crossings. Therefore, the lack of input-to-output energy transfer may override the dead zone caused by the ringing current needed for the demagnetization of the secondary winding in a time T DEM .
Energies 2020, 4, x FOR PEER REVIEW 20 of 24 where VPK is the peak value of the rectified line voltage Vin(θ). The dashed blue line represents the ideal case. As is evident from Figure 16, the dead zone becomes even larger near the zero crossings. Therefore, the lack of input-to-output energy transfer may override the dead zone caused by the ringing current needed for the demagnetization of the secondary winding in a time TDEM.

Conclusions
The standard limitations regarding the input current distortion in LED driver applications may be stringent, especially in large lighting systems. Therefore, the choice of a proper LED driver aiming at current harmonics reduction is crucial. At the same time, the solution must be economical, compact and reliable.
The QR flyback shows the highest figure of merit (FOM) among the different LED driver solutions analyzed in the literature. With this aim, this work has investigated and has analyzed the different inherent causes of distortion in the input current and the power processing mechanism of the proposed QR flyback converter that are not ascribable to the control method.
Several effects, such as the distortion caused by the ringing current, crossover distortion due to transformer leakage inductance and crossover distortion due to the input storage capacitor, have been analyzed in depth. It is important to point out that the converter is a nonlinear system and, consequentially, the overall THD of the input current cannot be evaluated as a simple sum of the THD associated to each individual contribution, where the aforementioned issues are mutually interacting or partly overlapping, such as those creating a dead zone in the line current.
Some useful design hints have been extracted and discussed in order to provide some suggestions for an optimized design of a QR flyback LED driver converter. In detail, the following list summarizes all the possible precautions to bear in mind.
1. The impact of the ringing current after transformer demagnetization can be mitigated by lowering the switching frequency, using a low reflected voltage VR or choosing a power MOSFET with a RDS(on) with an optimized RDS(on)/Coss FOM. These criteria also help to reduce the phenomenon of the lack of input-to-output energy transfer near the zero crossings of the line voltage. 2. The leakage inductance of the transformer should be kept as low as practically possible. This choice essentially optimizes the converter efficiency but does not impact the reduction in the Figure 16. Ratio of the critical value of I pkp (θ) for no input-to-output energy transfer in dead zone, caused by leakage inductance, as in Equation (35), to that caused by ringing current, as in Equation (38), as a function of Kv for σ = 0.95.

Conclusions
The standard limitations regarding the input current distortion in LED driver applications may be stringent, especially in large lighting systems. Therefore, the choice of a proper LED driver aiming at current harmonics reduction is crucial. At the same time, the solution must be economical, compact and reliable.
The QR flyback shows the highest figure of merit (FOM) among the different LED driver solutions analyzed in the literature. With this aim, this work has investigated and has analyzed the different inherent causes of distortion in the input current and the power processing mechanism of the proposed QR flyback converter that are not ascribable to the control method.
Several effects, such as the distortion caused by the ringing current, crossover distortion due to transformer leakage inductance and crossover distortion due to the input storage capacitor, have been analyzed in depth. It is important to point out that the converter is a nonlinear system and, consequentially, the overall THD of the input current cannot be evaluated as a simple sum of the THD associated to each individual contribution, where the aforementioned issues are mutually interacting or partly overlapping, such as those creating a dead zone in the line current.
Some useful design hints have been extracted and discussed in order to provide some suggestions for an optimized design of a QR flyback LED driver converter. In detail, the following list summarizes all the possible precautions to bear in mind.

1.
The impact of the ringing current after transformer demagnetization can be mitigated by lowering the switching frequency, using a low reflected voltage V R or choosing a power MOSFET with a R DS(on) with an optimized R DS(on) /C oss FOM. These criteria also help to reduce the phenomenon of the lack of input-to-output energy transfer near the zero crossings of the line voltage.

2.
The leakage inductance of the transformer should be kept as low as practically possible. This choice essentially optimizes the converter efficiency but does not impact the reduction in the dead zones near the zero crossings of the line voltage caused by other phenomena (essentially, the input capacitor CS). 3.
The input storage capacitor CS should be minimized to reduce the dead zone near the line voltage zero crossings and the current leap occurring in the proximity of the dead zone. However, particular attention should be paid to the following points.
a. The diodes of the input bridge rectifier are usually slow-recovery ones, so the primary current at the switching frequency may require an enhanced filter on the ac side of the bridge and may cause the diodes of the bridge to overheat. b.
Close to the zero crossings, the switching frequency can be very low. If the ringing frequency related to C S and L p is comparable with the switching one, it may generate current spikes that would degrade the current THD.

4.
Class-X capacitors are generally used along with inductors for EMI filtering, necessary for the certification of the final product. Class-X capacitors can degrade the PF, although they do not contribute to the THD. From this perspective, on the one hand, the design of the filter must make the device compliant with the standards. On the other hand, there is a degree of freedom that can be exploited to minimize PF lowering at high line and light load. The filters should be designed with the largest inductance and the smallest capacitance practically possible.