Basso SMPS Book#2 Comment 1– Chris Basso Generic Averaged Controller models

About 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. Even so, IF you are serious about learning the details of SMPS supplies, this book should be in your library.

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:


Figure 1
Flyback circuit averaged model

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 before the full switching period has elapsed. This causes the average
transistor current to be a bit less than one would expect in CCM.

Now the averaged current transformation must be lower, hence this is reflected by the equivalent transformer turns ratio INCREASING. In CCM, d1 + d2 = 1, and the 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.

ERROR #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. Clearly missing from the circuit is a modulator gain block with a gain of ¼ volt/volt.

When performing an AC analysis, SPICE first determines the DC operating point by shorting all inductors and opening all capacitors (transformers retain their turns ratios). When this is done, SPICE linearizes the analysis about that DC operating point to create an AC model, which is the basis for the AC analysis, constant or swept in frequency.

So, the gain reported is 400% too large.

Maybe ERROR #2:

The circuit will simulate and produce a phase-gain plot, as shown in Figure 2 following:


Figure 2
Flyback circuit averaged model test graph 1

The Figure 2 graph duplicates that shown in the book. So far so good.

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:


Figure 3
Flyback averaged circuit2

When this is done, and a transient analysis is performed, the graph of Figure 4 following results:


Figure 4
Flyback circuit averaged circuit2 transient test graph 1

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 the book does NOT say that the model will work in a transient analysis. So in fairness, it is not an error, yet one might come to the impression that a transient analysis could work. So what is happening?

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. 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.

References:

  1. Christophe Basso Web site, http://perso.wanadoo.fr/cbasso/Spice.htm
  2. Switch-Mode Power Supply SPICE Cookbook, by Christophe Basso
  3. SWITCH-MODE POWER SUPPLIES, SPICE Simulations and Practical designs, by Christophe Basso

 

 

 


Beige Bag Software, Inc., 623 W. Huron, Suite 2, Ann Arbor, MI, 48103
(phone) 734.332.0487 (fax) 734.332.0392 (email) info@beigebag.com
© 2005-2008 Beige Bag Software, Inc