Friday, August 27, 2010

FLYBACK CALCULATIONS - PART VI



In this part we will calculate the RMS current ripple in the main output filter capacitor.

First we need to calculate the main output secondary current using the following data:

Idrms = 0.2 A
Dmax = 0.85
VRO = 350 volts
KL = 1.0
VF1 = 1.0 volt
Vo1 = 14 volts

where Idrms is the rms transistor switch current, Dmax is the maximum allowable duty cycle (usually limited by the main PWM control IC), VRO is the secondary voltage reflected to the primary side, Vo1 is the nominal output voltage, VF1 is the forward voltage of the output diode, and KL is the load occupying factor for the main output (1.0 if there is only one output winding.)

The equation for the secondary RMS current is

Isecrms = Idsrms * (((1 - Dmax) / Dmax )^0.5) * VRO * KL / (Vo1 + VF1)

Isecrms = 1.96 A

The output current Io is specified as 0.3 amps, so now we can calculate the output capacitor ripple current. This current is usually inconveniently large for flyback converters and cheap converters are sometimes found to have an output filter capacitor that is under-rated for ripple current. The risk is that the capacitor will overheat, dry-out too fast and the converter will fail to operate as intended. The ripple current is calculated as follows:


Icaprms = ( Isecrms^2 - Io^2 )^0.5

Icaprms = 2.28 A

Note that a continuous current mode (CCM) converter will have a lower secondary RMS current for a given output current load.

So we will need to have a capacitor that is rated at 2.3 amps or better for this design. It is better to use one large capacitor instead of smaller capacitors in parallel to meet the current requirement as parallel capacitors will not necessarily share ripple current equally and one or more of them could overheat. It is usually good though to put small capacitors in parallel such as ceramic chip caps for filtering high frequency noise.

Assume that we have the additional data as follows:


Co = 330UFD

Rc = 0.07 ohm

Idspeak = 0.3 A

Fs = 100KHZ

where Co is the output filter capacitance total, Rc is the equivalent series resistance of the capacitance, Idspeak is the peak transistor switch current, and Fs is the converter switching frequency.

Now we can calculate the theoretical output ripple or noise voltage using the equation

dVo1 = Io * Dmax / (Co * Fs ) + Idspeak * VRO * Rc * KL / (Vo1 + VF1 )

dVo1 = 0.498 volts

On an output voltage of 14 volts, 0.498 volts is about 3.6%. This value is probably OK for a battery charger converter, but probably too high if the voltage is to be used to power some electronic circuit. For a lower output ripple voltage, it would be necessary to increase capacitance value, reduce the equivalent series resistance of the capacitor, or both. Notice that the above calculation ignores the effects of the capacitor series inductance and the inductance of the circuit wires or circuit board traces. A low inductance layout is very important to keep noise low.

Wednesday, August 18, 2010

AC-DC FLYBACK CALCULATIONS - PART V



One of the most important things to determine on the AC-DC flyback converter are the RMS secondary winding currents. The RMS current must be filtered by a capacitor which is usually an aluminum electrolytic capacitor or some type of large capacitance high ripple current capable capacitor. One of the main failure modes of poorly designed flyback converters is an inadequate current rating for the filter capacitors. If the output capacitor is over-stressed with ripple current beyond its ratings it will run hot, dry out if it is a wet electrolytic, and otherwise fail casuing converter failure.

We can calculate the RMS current for each secondary winding according to a simple formula as follows:

Isecrms = Idsrms * (( 1 - Dmax ) / Dmax )^0.5 * VRO * KL / ( Vo1 + Vf1 )

where we have previously calculated the rms switch current Idsrms = 0.234 A, VRO = 349 volts, and we have specified Vo1 = 14 volts, Vf1 = 1 volts, and the load occupying factor KL has been set to 0.8 or 80% of the total load on the Vo1 output.

The answer is then that Isecrms = 1.8 amps. This is not a trival amount of ripple current to deal with and it will require a large electroylitic capacitor or several capacitors in parallel to handle the current. Note that it is difficult to parallel capaciotrs to handle the total load because one capacitor will more than likely try to handle most of the load and overheat while the other ones are not handling their share.

Another thing to be concerned about in flyback converters is the rating of the diode that feeds current to the filter capacitor from the secondary winding (see Fig. 1 -click on the figure for a larger view.) The current rating of the diode must be able to handle the RMS current we just calculated above and it must have a high enough voltage rating to handle the reverse spikes which are present on every switch cycle of the converter. We can calculate the reverse voltage on the diode from the following formula:

Vdr = Vo1 + Vdcmax * ( Vo1 + Vf1 ) / VRO

where Vo1 is the output DC voltage, 14V, Vdcmax is the max input voltage, 1000V,
Vf1 is the forward diode voltage, 1 volt, and VRO is the voltage reflected from secondary to primary on each switch cycle, 349 volts.

Vdr = 56.9 volts

is the peak reverse voltage on the diode.

It is customary to comput the VRRM (the voltage rating reverse maximum value) as

VRRM = 1.3 * Vdr = 74 volts

The VRRM value we computed is beyond the normal max for schottky diodes of 45 volts but there are some hybrid schottkys that will rate higher. The advantage of schottky diodes is that they have a lower forward voltage drop and therefor dissipate less heat and power for a given current load. If the output voltage had been 5 volts instead of 14, we could then have used a 35V or 45V schottky diode as VRRM would have calculated to 29 volts.

Thursday, August 12, 2010

FLYBACK CALCULATIONS - PART IV


In all switchmode converters that use a high frequency switching inductor or transformer, such as the typical AC-DC flyback converter shown if Fig. 1, it is of critical importance to avoid saturation of the inductor or transformer. If saturation occurs, the inductance of the transformer or inductor will decrease greatly so that the windings will no longer support the applied voltage. If saturation occurs when the transistor switch is in the on-state, the switch current is theoretically unlimited and this could lead to destruction of the converter. Even when current mode control is used, the initial turn-on spike will be so large that it most likely will cause the switch to fail.

To avoid going into saturation, the transformer must be designed so that at maximum current (set by the current limit), the transformer or inductor will not saturate. Therefore we need to determine the maximum magnetic field density (flux density) that the transformer core material will support (carefully the core manufacturer's data sheet), the effective cross-sectional area of the core, the inductance of the inductor or the primary of the transformer, and the maximum current set by the current limit. Then we must calculate the minimum number of inductor or primary turns that will be required to avoid saturation. The number of turns required is directly proportional to the product of the inductance and the maximum current and inversely proportional to the product of the maximum flux density and the core area.

Npmin = Lm * Ilim * 10^6 / ( Bsat * Ae )

Let

Lm = 0.007 Henry

Ilim = 0.200 Ampere

Ae = 31.5 mm^2

Bsat = 0.25 Tesla ( 2500 Gauss )

Then

Np = 187 turns ( rounded up to the nearest full turn )

The actual design might use 225 turns to provide a safety factor of approximately 20%.

Once we have set the primary turns, we can then calculate the turns ratio that is needed to achieve the required main output (the controlled output) voltage as


n = VRO / ( Vo1 + vf1 )


Let

VRO = 350 volts

Vo1 = 15 volts

Vf1 = 1 volt

where VRO is the reflected voltage from secondary to primary (previously calculated in the post, Flyback Calculations - Part I), Vo1 is the required main output voltage, and Vf1 is the forward voltage of the output rectifier diode at maximum output current. Then

n = 22 (rounded to an integer)

Now it is easy to compute the required turns of the main secondary, as


Ns1 = Np / n = 10 (rounded to the closest integer)

The other secondary output turns can now be computed using the values from the equation

Nox = ( Vox + Vfx ) * Ns1 / ( Vo1 + Vf1 )

where Nox is the required secondary turns, Vfx is its diode forward voltage at the winding's maximum current. For example if Vox is 125 volts and Vfx is 1.2 volts, we have

Nox = 81 turns (rounded up to the nearest integer )

We can also note here that secondaries in this transformer design are roughly 1.5 volts per turn. This is a reasonable value for the design. A practical range for secondary volts per turn is usually 1 to 2 volts per turn.

Tuesday, August 3, 2010

FLYBACK CALCULTIONS - PART III


This post will calculate the current ripple factor from the peak current step IEDC,
the smaller ramp on top of the current pulse which we will call dl, and the RMS current. Fig. 1 shows the general topology of the converter.

First we calculate IEDC

IEDC = Pin / ( Vdcmin * Dmax )

Assume that Pin is 5.8 watts, Vdcmin is 50 volts and Dmax is 86% or 0.86. Calculating IEDC we get

IEDC = 0.135 Amp

This is the first component or major step of the peak current pulse.

The above calculation is the worst case value at maximum duty cycle, maximum input power required, and the worst case minimum input voltage. Note that you will get higher peak currents as D is reduced and Vdcmin is reduced for a given power input value.

We will also calculate the equivalent RMS current, which we will consider below.

Now we need to calculate the second component or ramp of the current pulse, dl

dl = Vdcmin * Dmax / ( Lm * Fs )

Assume that Lm is 0.007 Henry, and Fs is 100KHZ. Then


dl = 0.058 Amp


We can now calculate the Current Ripple Factor, KRF as

KRF = dl / ( 2 * IEDC ) = 0.215

The point of the above calculations is to determine whether the converter will operate in Discontinuous Current Mode (DCM) or in Continuous Current Mode (CCM). When KRF is less than unity, the converter is operating in CCM at minimum voltage input and maximum duty cycle with the specified maximum power input required.

With the results of the above calculations, we can also calculate the equivalent peak current in the transistor switch as

Idspeak = IEDC + ( dl / 2 ) = 0.164 Amp

Next we calculate the theoretical RMS current for the inductor and transistor from


Idsrms = ( 3 * IEDC^2 + dl^2 * ( Dmax / 12 ) )^0.5 = 0.234 watt


This is the current to use when calculating RMS current in the transistor and switching transformer.

Saturday, July 24, 2010

DESIGNING AN AC-DC FLYBACK CONVERTER - PART II



One important thing to know about your flyback converter is whether it will mainly operate in continuous current mode (CCM) or discontinuous current mode (DCM.) For the highest power output per cubic inch, lowest noise, and lower peak currents, CCM is the choice (and most commercial converters are CCM.)

The advantage of DCM is that their is no right-half plane zero in the gain vs. frequency response which is difficult to compensate for. In the CCM condition there is a right-half zero so the bandwidth of the converter must be limited so that the zero does not cause instability.

The use of current limiting in modern converters helps to maintain stability and simplifies design of the feedback compensation network. We will discuss the feedback compensation and design of the feedback network in a later post.

Most practical flyback converters will operate in both CCM and DCM (but not at the same time) if conditions are allowed to put the converter into one mode or the other. Some converters are designed to operate right on the boundary between CCM and DCM.

You can find the operating point of your converter under operating conditions by calculation of the value of the minimum input voltage to maintain DCM which is also the maximum input to maintain CCM operation. This point depends on primary inductance, operating frequency, power required at the input, and the reflected voltage on the primary from the secondary, as well as other factors which we will ignore in this calculation:

Vdccm = ( ( 1 / ( 2 * Lp * Fs * Pin )) - ( 1 / VRO) )^-1

As a practical example, suppose that

VRO = 350 volts

Lp = 0.007 H

Fs = 100000HZ

Pin = 5.8 watts

Then

Vdccm = 126 volts approximately.

So 126 volts is the minimum input voltage to maintain DCM operation. A lower input voltage will force this converter design into CCM operation.

Or conversely, if the input voltage is higher than 126 volts, you cannot maintain CCm operation and you will be operating in DCM mode.

Wednesday, July 21, 2010

AC-DC FLYBACK CONVERTER CALCULATIONS, PART I



Fig. 1 shows a simplified schematic of a typical flyback converter topology. Not shown is the feedback loop components and the source of VCC power for the PWM IC, which will not be discussed in this article. A brief description of the circuit is as follows: V1 is the main source of AC power. The AC power is rectified by the diodes D1 - D4 and filtered into a DC voltage by the input capacitor C1. L1 and L2 make up the switching transformer, with L1 being the primary and L2 being the secondary (isolated form the primary side high voltage.) There can be several secondaries with either a low voltage output of high voltage output or combination of both. M1 is a NMOS mosfet usually used for switching current through L1. This semiconductor could also be an IGBT or other type of high frequency solid state switch. R1 senses the peak switch current and allows the PWM IC to turn off the M1 switch if the current reaches the maximum setting allowed determined by the value of R1 and the voltage threshold level in the IC, usually approximately 1 volt. When the switch M1 turns off, the current in the inductance L1 causes a high voltage spike to appear on the drain of M1 which is due to the leakage inductance of the transformer. The best made switching transformers usually have less than 3% leakage inductance between the primary and secondaries. The voltage spike is "snubbed" by the diode D5 and the snubbing elements R2 and C2. R2 will dissipate power during the snubbing period and so can have a major effect on the efficiency of the converter. Following the "spike", energy is transferred to the secondaries, rectified by D6 and filtered by C3. R3 represents the load. A feedback signal is usually taken from one of secondaries to feedback to the PWM IC. The feedback components are not shown in Fig. 1. There are many "gotchas" in a design like this if the designer is not careful in his selection of circuit values and components. This article will start with a few basic calculations to get started.

Required input power is calculated from the required output power as

Pin = Po / Eff

where Po is the required output power and Eff is the required efficiency of the converter. These values are usually in the unit specifications.

Minimum and maximum DC voltage after rectification (ignoring losses in the diodes and traces, etc.)

Vdcmin = 2^0.5 * Vacmin

Vdcmax = 2^0.5 * Vacmax

An important calculation is the reflected voltage seen at the switch M1 from the secondary of the transformer:

VRO = Np * (( Vo + Vf ) / Ns )

where Np is the number of primary turns and Ns is the number of secondary turns (see my previous posts on transformer design), and Vf is the diode forward voltage.

We can make a calculation to see if the design will work with the minimum AC voltage input from the following equation:

Vdcmin = ( 2 * Vacmin^2 - Pin * ( 1 - Dch ) /( C1 * Fl ) ) ^0.5

where Dch is the DC link charging ratio (refer to Fairchild semiconductor application note AN-4138) Dch is usually approximately 0.2 for a quick estimate. Fl is the AC line frequency. If Vdcmin comes out to be an imaginary number this means that Vacmin is too low, or Pin is too high, or C1 is too low, Dch is too high, or all of the above.

The nominal voltage on the drain of the switch (not including the leakage inductance spike) is

Vdsnom = Vdcmax + VRO

The base value of the peak current in L1 and M1 is given by

IEDC = Pin / (Vdcmin * Dmax )

where Dmax is the maximum allowed duty cycle on switch on-time. This value is usually determined by the specifications of the PWM IC but it is also affected by the current limit set by R1 in the circuit.

An additional component of the current in continuous current mode (CCM) is given by

dI = Vdcmin * Dmax / (L1 * Fs )

where Fs is the switching frequency determined by the PWM IC and sometimes some external RC timing components (not shown if Fig.)

The maximum peak current is then

Idspeak = IEDC + ( dI / 2 )

We can also calculate the RMs switch current in L1 and M1. This information is good to determine so that switch and transformer power dissipation can be calculated.

Idsrms = ( 3 * IEDC^2 + dI^2 * (Dmax / 12 ) ) ^0.5

Idsrms is the RMS value of switch current at minimum DC voltage input.

Wednesday, July 7, 2010

DESIGNING SECONDARY WINDINGS OF A FLYBACK TRANSFORMER

In a previous post we discussed the design of the primary of a switchmode transformer for a flyback converter. In the last post we described the basic topology of a flyback converter with one output. Now we want to design the secondary winding of the converter. We will use the specifications we discussed in the just before the one immediately preceding this one. In that post we described a 100 watt converter with a maximum input voltage of 1000V and a 70% efficiency. A 150 watt input power was required to provide the 100 watt output. The primary was 90 turns with an inductance of 5 mH.

Lets assume the following basic specifications for the secondary side output circuit;

12 volt output at 8.333 amps (100 watts). We will shoot for 8.5 amps for a very slight margin over 100 watts to 102 watts.

First we recognize that in a flyback converter, energy is stored in the primary side inductor and air gap during switch-on time, is then transferred to the secondary circuit, less the energy lost in lossy elements in the primary side circuit, when the switch turns off, and the core resets. Lossy elements are the transistor switch, snubber circuit, the primary winding resistance, and other lossy elements including parasitics. By conservation of energy we can write the equation for the energy balance:

Ef * Lp * Ip^2 = Ls * Is^2

where Ef if the efficiency of the primary side circuit in this simplified equation, Lp is the inductance of the primary, Ip is the primary current, Ls is the secondary winding inductance, and Is is the secondary current. From that equation we can use a little algebra to find the inductance of the secondary winding. We will use input current for a 1000v input that would be 0.15 amps for a 150 watt input capability:

Ls = Ef * Lp * ( Ip / Is )^2 = 0.7 * 0.005 * ( 0.150 / 8.5 )^2 = 1.09 * 10^-6 H

or approximately 1 microhenry for the secondary inductance.

We also have the standard transformer equations which are not totally accurate for a flyback converter but they will serve well enough for preliminary calculations:

Np / Ns = sqrt ( Lp / Ls )

In other words, the turns ratio is equal to the square root of the inductance ratio. We can use the above equation, adding the efficiency factor into the equation to solve for the number of secondary turns:

Ns = Np / sqrt ( Ef * Lp / Ls ) = 90 / sqrt ( 0.7 * 0.005 / 10^-6 ) = 1.52 turns

In the construction of a prototype sample we would probably round up the turns to 2 although there are methods of winding the equivalent of fractional turns. This winding would probably be made of copper foil instead of wire for better coupling with the primary winding.

We have now have a preliminary calculation of the secondary inductance and number of turns, but there is a lot of work left to do. Now it would be a good idea to simulate the transformer and power switching stage using SPICE or some other simulation software. You might find that the secondary inductance and number of turns needs some change in values, especially when parasitic and lossy elements are introduced.

In the above calculation we did not consider the condition of minimum input voltage. If the minimum input is say 200 volts, we would get much different answers in the above calculations and it would be necessary to use the values for the minimum input voltage to make sure we will have enough output power and voltage.

In another post we will discuss design of the remainder of the secondary circuit elements (refer to Fig. 1 in the previous post.)