Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Feedback loop calculation for offline flyback...problems.

cupoftea

Advanced Member level 5
Joined
Jun 13, 2021
Messages
2,611
Helped
54
Reputation
108
Reaction score
115
Trophy points
63
Activity points
13,685
Hi,
Why is it that the Feedback loop books/docs do not properly explain how to do feedback loop
calculation for eg an offline flyback?
The first job is to convert the Flyback to its "equivalent buckboost".
Best to "refer everything to secondary" in this process. (will not explain why here)

So basically you find that buckboost which has the ......
a) same duty cycle
b) same vout
c) same iout (max)

The inductor of this "equivalent buckboost" will be equal (in inductance) to the secondary inductance of the flyback.

You simply find the "effective input voltage" of the buckboost which allows you these requirements.
Then you have your "equivalent buckboost". You can then shovel its values into the Power Stage transfer function
of the feedback loop.

So, Supposing its in CCM, You then subject it to the power stage transfer function on page 9, fig 8 of TN203...


....But in fig 8, we are told that "RMAP" is "PWM ramp voltage divided by the corresponding sensed current".
-But This just isnt a good explanation, its not just the amplitude of the "ramp" bit...its the actual peak current
value that goes into the calculation of RMAP.

Also, we have to remember that we converted our flyback to a (equivalent) buckboost, and in many cases the amplitide of the sensed current will now be much bigger than it
was when we had the original flyback. However (and this isnt explained anywhere on the web)...you must still calculate this bit as if you were still
working with the original flyback, and not the "buckboost equivalent". So in other words, the RMAP will be actually be the value of the
primary sense resistance
used in the flyback's FET source connection. But the docs dont tell you this....they leave students for dead by telling them to convert to the
"equivalent buckboost", and then leaving them lost from there on.

The docs also dont tell you that you must put in the attenuation factor that is exhibited by the attenuation that the output voltage of the error
amplifier gets exposed to in order to give the peak voltage into the PWM comparator. (usually about 0.3 or so) And of course, this is from the original flyback situation, since
this situation didnt really exist at all with the "equivalent buckboost" situation, because there never really was an "equivalent buckboost" on the
bench.

Obviously your optocoupled error amp calculation will take the form of page 19 of the TND381 App note...


So we see students getting well lost with all this, and we have no texts or docs to refer them to...do you know of any?
 
Basso.

You need to understand the main plant 1st, i.e. the flyback in this case, desired Fsw, Lpri, Lleak, max peak current in pri, DCM or CCM ( RHP ), output capacitance and max load ( = power really )
Once you know all these things, and the layout is tight, and there is good decoupling on the pri side ( and sec ) - and the turn off snubber is correct, ( and a bit of snubbing on the output diode )

then you can compute a feedback ckt that will run it stably - easy peasy, a lot slower for CCM, obviously.

If you have some unknowns ( really long output wires with some C at the end, not enough C on the sec side, poor decoupling on pri side, a lot of Lleak, dumping a battery on as a load ) then issues arise.
--- Updated ---

also - read this - it is not wholly correct - but pretty close most of the time - and highly readable
--- Updated ---

. . . oops - file too large perhaps - even zipped ?
 
Last edited:
Thanks, yes i have both of Basso Books...great books.....no regrets buying them.
I will seek in there where the above questions are answered. I am not sure if Basso does this kind of "low level" stuff in his books, but will check.
I know he does the derivations of the transfer functions etc.
 
Here is the complete solution for CCM flyback's - to compute your feedback values:
Thanks, that doc is very good at investigating the CTR of the opto.

Thankyou for providing it, i know you didnt write it, and its typical of all other docs on the web about calculation of flyback feedback loop....
Thankyou though for finding a relevant doc, one that just gives the usual "hand-waving", incomplete procedure, as this amplifies the top post here.
I appreciate that you likely havent had time to read the doc yourself, since you already know how to do this stuff, so had no need to read it. I did read it...and found the following.......

As far as the feedback loop goes, i'd say that the wuerth document is interesting but not adequate to actually calculate the open loop transfer function of any given flyback on the bench.
The document unfortunately just gives a "form" of the power stage transfer function of a flyback.
That wouldnt be much use to someone.
And they dont give the equation for G0.

The attached from Basso is what is needed. Basso gives here the Transfer function for the buckboost...which brings us to the other shortcoming of the wuerth document....it doesnt , in any page, tell that the flyback must first be converted to the equivalent buckboost converter before any power stage transfer function can be done....the document does not even mention this.

As you know, its best to refer to the secondary side, since then its more straightforward to do the auxiliary calculation for the effect of the LC post filter which flybacks often have. Then , one needs to know how to deal with the referral of the primary side sense resistor to the secondary side......the wuerth document does not even speak of this. The wuerth doc is like all other docs on feedback loop for flyback...sadly lacking in information.

On the first page of the document it says
QUOTE>>>
This application note provides an example procedure for designing the compensator circuit of a flyback converter with current mode
control and optocoupler-based feedback
<<<<UNQUOTE

...I am afraid this is pretty well not really the case...the document kind of generally, hand-wavingly, tells you what kind of things you kind of would do, if you had the right equations, and the full explanation. But as you know, any new graduate into Power supplies would be left wondering "where's the rest?"
 

Attachments

  • Buckboost Trans func.zip
    1.1 MB · Views: 36
Last edited:
I understand you yourself Easy Peasy already know all this stuff, so the document will be of little interest to yourself.

Thanks, though it doesnt say for example, how to incorporate the divider which divides down the error amplifier output signal.
Also, as discussed, i have read the whole doc, but nowhere does it say the equivalent buckboost must be first derived.

I think you are saying that they incorporate this into their calculations(?)

They need to explain that the primary side sense resistor value no longer applies (dur to referring stuff effectively to secondary side)......the sense resistor value becomes VREF/[equivalent Buckboost fet current peak at max load]
...where vref is the sense ref, eg 1v in a ucc38c42.

(or whatever the max sense voltage is when you are at max load with your equivalent buckboost.)

...if it doesnt say this, and just wants the reader to number crunch some blind formulas that they throw in without explanation, then that is very poor.

There is a generic way to do this, and they have washed right over it.
Sorry, but really , the equivalent buckboost is needed, ,and they dont even mention it.

I understand you yourself Easy Peasy already know all this stuff, so the document will be of little interest to yourself.
 
Last edited:
Feedback Loop Calculation for 24W offline flyback SMPS:

Anyway, its good to do a proper feedback loop example here of a 24V, 24W offline flyback from
90-265VAC.
At 90vac, 60Hz, the primary bus sinks to 90V, and its just inside CCM there, so we'll take that
as the start point.
Here , first of all, we show the flyback with its "equivalent" buckboost.
As you know, this is the first stage of any feedback loop calculation with flybacks.
We have "referred to the secondary side", since our LC post filter is on the secondary side,
and we can add in the calc for that later much more easily with all referred to sec.

More to follow soonest. (if i may be permitted)..
 

Attachments

  • Flyback and its Buckboost _1.pdf
    180 KB · Views: 41
  • Flyback _CCM_with bukboost_1.zip
    3.1 KB · Views: 32
  • Flyback example _1.zip
    10.1 KB · Views: 37
I know Christophe would forgive me as I forgive his web design skills. http://powersimtof.com/perso.htm even though his son is a wiz at it.


The zip of files are here. Book Collection.zip using Simplis simulation.

 
Hi ,
Page 45 of the TND381-D document gives all the poles and zeros for a type 3, opto/TL431
feedback compensator.


The pole and zero is of the following form..."1+s/w0"
The Zero goes in the numerator, the pole goes in the denominator.
So , that page 45 is all that anybody needs to calculate the transfer function in excel.
Why does this document not allude to this?
Why does no document alude to this?
All thats needed is the pole/zero frequencies, and any gain terms, and thats it "job done".
Why does the document not call this out?
 
The attached shows the steps for calculating the gain and phase margins
of a CCM Flyback. (using the UCC28C43 chip, or any other chip if you put in the right modulator gain)

The attached can be used to get the gain and phase margins of any Flyback in CCM, as it can be used as a template if you
put in your component values. However, i still need to append this by doing the version which includes the
slope compensation.

It shows the calculation for Type 3 compensation with flyback in CCM. But if you
only want to do type 2, then just make R3=1E20 and C3 = 1E-20 in the error amp page.
(effectively disconnecting the R3 and C3).
Its result has been checked with the equation in TND381-D, and conforms with it, so is correct.

Interestingly, it gives a crossover frequency of 130Hz, but LTspice, set up the same
gives a 700Hz crossover, (as seen by the ringing after start up). So there is some disagreement between
LTspice and the given calcs.) Ltspice also shows much ringing meaning that the phase margin isnt
what the equations give. (At least in LTspice).

I always find that on the bench, the stability margins are quite a bit more than what the actual equations give. (and thats even taking into account the real, low opto CTR.)

The Power stage transfer function was calc'd using fig 9, page 8 of TN-203 by Microsemi.
The TL431/Opto based error amplifier calc was done using Equation 7.103 of Page 420 Of the
Basso Book called "Designing control loops for linear and switching power supplies".

The Modulator transfer function was gotten from reading the UCC28C43 datasheet
(LT1243 is pin4pin with UCC28C43).

I will add in the bits for taking account of the slope compensation and append them
herewith, if it is OK.
 

Attachments

  • Feedback_example _2.zip
    5 MB · Views: 41

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top