|
|
|||||||||||||||||||||||
Basso SMPS Book#2 Comment 1 (revised) Chris Basso Generic Averaged Controller modelsAbout the writer: Harvey Morehouse is a contractor/consultant with many years of experience using circuit analysis programs. His primary activities are in Reliability, Safety, Testability and Circuit Analysis. He may be reached at harvey.annie@verizon.net. Simple questions for which I know the answer are free. Complex questions, especially where I am ignorant of the answers, are costly!!! Summary:
Christophe Basso's new book, SWITCH-MODE POWER SUPPLIES, SPICE Simulations
and Practical designs, features B2SPICE among SPICE vendors. Included
with the book are several circuits. Overall, the book is excellent!!
There are, however, some minor difficulties with this book, one of which
is the subject of this article. While not a major error, and arguably
not even an error in the strictest sense, it could present difficulties
in understanding, hence this article was written. Chris Basso felt that the original article had some errors in it, and to the extent it was not clear what I was intending to say, I agree. Also, there were a couple of things that needed to be said. Revisions
are provided to the original article in red. Chapter 1-2, FLYBACKVM.CPM CIRCUIT: One circuit model on the CD provided with the book is for a flyback converter, voltage mode. The circuit provided (which was created by the makers of B2SPICE, converted from another version of SPICE into B2SPICETM format), is shown in the following circuit of Figure 1: Assuming that the reader has some familiarity with the subject book, or of averaged SMPS modeling, the explanations will be rather brief. First, in examination of the circuit, we can see that it is set up to determine a phase-gain output graph. In this case, the plot is from the error amplifier output to the output, of the 'plant', as it might be called in the nomenclature sometimes used for feedback control systems. The switching device is shown as X2. The model for this device is based on a paper from the Colorado Power Electronics Conference. Basically, it is an ideal transformer with a turns ratio, from primary to secondary, of 1: d1/(d1 + d2). In Constant Conduction Mode (CCM), d2 = 1 - d1, and clearly d1 +d2 equals 1. Now d1 is the fraction of the time the switch is conducting, and d2 is the fraction of time the switch is not conducting. In Discontinuous
Conduction Mode (DCM) the output current 'dries up'. It decays to zero
before the full switching period has elapsed. This causes the average
Now the averaged current transformation must be lower, hence this is reflected by the equivalent internal transformer turns ratio INCREASING. In CCM, d1 + d2 = 1, and the internal transformer equivalent turns ratio is equal to 1:d1. But when d1 + d2 is less than unity, the effective turns ratio increases. Now all the above is meant for background to what will follow.
Pitfall #1: The error
amplifier is shown with a maximum voltage output of 4V. X1 is created
with the assumption that that the maximum error voltage input, or d1,
will be unity. When performing
an AC analysis, SPICE first determines the DC operating point
Whereas,
if the error amplifier voltage maximum excursion was changed to equal
approximately 1, to conform to a 1V ramp, then the gain of the error
amplifier would have to be multiplied by a factor of 4 were the original
error amp model correct.
Pitfall #2: The circuit will simulate and produce a phase-gain plot, as shown in Figure 2 following: The Figure 2 graph duplicates that shown in the book. So far so good. This is a proper phase gain plot from the input of the modulator to the output. There is NO ERROR in the circuit for this usage. Now, looking at the circuit, one would suspect that one could remove the inductor and the capacitor as well as Vstim and perform a transient analysis. Let us do so. Also, we will add ammeters in the transistor source and also to measure the load current. This results in the circuit of Figure 3 following: When this is done, and a transient analysis is performed, the graph of Figure 4 following results: Now this is interesting!! The error voltage peaks at 4V. The output voltage shows peak-to-peak variations of 11V!! And, it never reaches a steady state voltage of 5V as expected! Note the magnitude of the peak load and transistor currents also. Also, the output ripple occurs with a period of about 5ms, but the parameter fs passed to device X1 is 100kHz, implying a period of 10uS. 5ms corresponds to a frequency of about 200Hz!!!!! Now this does NOT mean that the circuit is switching at 200Hz! As Chris Basso pointed out in comments to me, this is an envelope of the switched circuit variations. Chris objected to me that it was not switching at a 200Hz frequency as I stated. I cannot see where I stated it was switching at a 200Hz frequency, although it might have been inferred. Now the
book does NOT say that the Well, the circuit represents a transformer coupled flyback circuit. In the configuration shown, energy is stored in the magnetizing inductance of the transformer during the transistor ON time, and delivered to the output during the transistor off time. The circuit is trying to do exactly that, but with the compensation present, or lack thereof, a steady state value cannot be reached. Chris replied to me that the circuit could be compensated and gave an example. I had no doubt that could be done. But therein is the problem. If the error amplifier maximum voltage was 4V, as in the original circuit he provided, implying a 4 V ramp, there should have been a 1:4 divider between the error amplifier and the modulator. Whereas, were the error amplifier maximum voltage output changed to 1 V, inplying a 1 V ramp, as Chris suggested it be changed to, then the original circuit is wrong. One cannot have it both ways. The SPICE engine is solving for what it determines to be the proper ON and OFF times. Okay, but what does this mean for the AC analysis? Will it be accurate? Assuming that a DC operating point is found, and that point corresponds to the expected output voltage of 5V, yes. But does it? The answer can be found by performing a DC operating point analysis. When that is done, one finds that the output voltage is at 5V, the output current is at 5A, while the input current is at 0.5A. The power out is 25W, and the input power is at just slightly more. Hence it seems that the proper operating point is determined for linearization. And the topology is correct. And so the answer is yes. Summary: One cannot really fault Chris for not including more detail in his book regarding this circuit. It is impossible to give all the details on every SMPS device model, used with every possible converter application. He did a great job overall. I doubt I could do as well. Flyback circuits are problematic when used with averaged models in a transient analysis, especially when transformers are used. The ONLY error in this instance one could fault him on is not including a modulator gain term. My reason for mentioning this is to save possible confusion for a reader, as elsewhere he mentions the modulator gain function. Now I do not like his modeling of the COPEC X1 device, as I believe it could better incorporate ideal diodes or ITE expressions, or a min() function to simplify the clamping function, without having to use real diode models, however even this is a 'druther' item, and it results in little major change in either case. And, one could argue that the diode function would be 'smoothed' and less abrupt, hence better converging in some instances. Thanks to Christophe Basso for his comments (This is not to imply that agreement has been reached on all of the items of contention.) References:
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||