Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Error-amp

Status
Not open for further replies.

PWM

Electrical
Nov 6, 2002
8
0
0
PH
How does the error-amp of a switch mode power suply work? I know a lot about it already, but:
- I don't know at which frequencies to place the poles and zeros;
- how much should the phase shift be?
- how to choose the component values?

thanx again
 
Replies continue below

Recommended for you

Your questions are of a general nature, but good answers require detailed information on your application.

General answers:

How does the error-amp of a switch mode power suply work?

They adjust the operation (usually duty cycle or frequency, sometimes firing phase) of the output stage to obtain the desired output (usually voltage or current).

I know a lot about it already, but:
- I don't know at which frequencies to place the poles and zeros;
Place them so that they don't make your power supply oscillate.

- how much should the phase shift be?

Maintain between 45 and 90 degrees phase margin (at the frequency at which closed loop gain crosses unity) for most supplies. If it isn't oscillating and the load transient response it good, they you probably have sufficeint phase margin.

- how to choose the component values?
Carfully.

The reason you haven't received much in the way of a response is that to answer you questions properly would take a book.

I recommend you find a book that deals with the kind of power supply you are interested in. Manufacturer's application notes, many of which are online, are excellent sources of practical design information.

RickF

 
As mentioned by RickF, your questions are pretty general. Instead of making the operation of switchmode power supplies more complex than it has to be, try this book by John D. Lenk, "Simplified Design of Switching Power Supplies". It is an EDN publication, Butterworth-Heinemann publishers. The ISBN of the book in paperback is: 0-7506-9507-7. If you prefer hardcover, it is 0-7506-9821-7. Also, you can go on the websites of major semiconductor manufacturers and they usually have a number of SPICE models for their devices. National Semiconductor and Linear Technology are just two of them. National has a great design tool that allows you to design a SMPS right on their website complete with thermal analyses, schematic, bill of materials, layouts and everything necessary to produce a finished design. They also give you a complete set of files in PROTEL format so you can even generate your own PCB. For around $30, they will send you a prototype PCB and all the components by Fedex next day air to build your design after you have finished.

Otherwise, I completely concur with RickF as far as the details of operation. Designing a switching power supply from scratch can be a daunting task fraught with all kinds of problems. If you want extensive in-depth information beyond Lenk's book, check out the application notes at the Linear Technology Website, .

Best of luck
Bill
 
Good advice from RickF and Bill.
In general, the error amp must roll-off to zero db at a frequency less than the frequency of the output inductor-capacitor resonant frequency, so place your zero accordingly.
There is a difference in current feedback and voltage feedback versions. VFB is easier to work with initially, but CFB helps to keep the magnetics operating point centered.

There are some things that are not covered well in most PS design application notes. If you are working from a 120 volt 60 Hz line, the input can go as low as 100 volts RMS. The input hold-up capacitors must be sized for this low voltage and must have enough energy capacity (1/2 CV^2) to ride through nearly 1/2 cycle of 60Hz. (Use I=CdV/dT everywhere) Additionally the capacitor must account for losses in the secondary wiring and rectifiers.
My suggestionis to use one of the already designed circuits from Linear Tech or National. Another possible source is Texas Instruments, expecially if you are designing DC-DC. The Benchmarc application notes were very good for small designs, and surpassed the others in some aspects.
Good Luck!
LCM
 
Thanx for the tips! I will surely buy that book.

Okay, here is a detailed question.
I have modelled an error-amp, consisting of an opamp with +2,5V reference at V+. At V- there is the compensation consisting of C1 + R//C2. The input of the system is a normal voltage divider, like in most SMPS. The output voltage of the SMPS is simulated by a 4V DC voltage with a small ripple current on it (20 mV, but I changed it to 250 mV for testing purposes). Now here comes the question: why does the transfer function start with +180 phase shift (yes, PLUS), then +90 degrees, then at 2 kHz going up again to +135 degrees and finally rests at +90 degrees? And why does the gain start at almost 100 dB? After the first pole there is a zero, then a pole again. I am talking about the transfer function (output/input). Those are my buring questions.
I am using 20-Sim, which is an extremely good easy to use program, because you can enter the graphical circuit (opamp, C, R etc) and it will produce complete transfer function in S-domain, state space, zero/poles and show bode, step, nyquist, nichols and other diagrams instantly with 1 touch of the button. You can also switch to w/time/Z-domain or export to Matlab and it also shows symbolically solved equations for the entire circuit plus the transfer function. What more could a man want?
 
"What more could a man want?"

Not much more, really. I can think of a cool beer and a nice person (my wife - of course) bringing it to him.

 
Dear PWM,

One of the things I have found out (the hard way) throughout my 30+ year career is that no matter what happens, no matter what the design or its complexity, the overriding principle that you should always keep foremost in your mind is the K.I.S.S. principle. I think you are making this more complex than it has to be. I use Protel, Multisim, P-Cad or ORcad, whichever a given company for whom I might work happens to use. These programs use some derivative of a SPICE engine for simulation, and every one of them has a problem that is inherent with ANY computer modeling program, and that is the problem of CONVERGENCE. What you are describing sounds like that to me. When it comes to analog electronics, computer modeling does NOT always work. I went to a seminar by National Semiconductor where I met their senior scientist, Bob Pease. His original degree is a B.S.E.E. from M.I.T. He has worked for National for many years and is one of the most brilliant analog people I know of in the industry in general. When this man says not to depend on computer modeling, I tend to sit up and take notice. That was EXACTLY what he said at this seminar. He showed numerous examples of how erroneous computer modeling can be. In many instances of analog design, computer modeling is INHERENTLY INCAPABLE of producing a correct answer! It is like the dog chasing its tail. Rather than try to give you direct technical advice, I prefer to refer you to resources that can help you on a more general level. If you cannot produce the results you are looking for on a piece of paper using relatively simple equations that the manufacturers usually include with the datasheets on their products, then you most likely do have a convergence problem. The various engines are fine when designing simple circuit blocks like your standard op-amp circuits or 555 timer circuits, but when you combine them together, you wind up with results that are skewed due to the interaction of the stages and therefore, cannot converge. They do a fine job of simulating digital results but that is only because the computer happens to be digital and speaks ONLY that language. Computer simulation can only approximate analog results. Keep in mind that the world, although getting much better digitally, is truly an analog world outside the realm of pure logic.

Here is another book I own that has proved invaluable when putting analog electronic design and troubleshooting into perspective. I bought it at the seminar. It keeps me from "chasing my tail" and take two steps back before resorting to the often painful road to software simulation dependance. The book is "Troubleshooting Analog Circuits" by Robert A. Pease. It is one of the EDN Design Series by National Semiconductor, published by Butterworth/Heinemann, ISBN 0-7506-9499-8. Bob Pease is a legend in the world of analog design. I think that reading this book from cover to cover would put you on the right path toward solving your problems. (Notice I inferred solving your problems, not someone else solving them for you--you learn nothing for yourself that way.) Another book I find invaluable in my work is a rather extensive book and its lab companion called "The Art of Electronics" by Horowitz and Hill. If you cannot find your answers between these two books, you should give up electronics and take up underwater basketweaving or some other equally useful trade. My copies are in the office so I cannot give you the ISBN's, but the books are published by Cambridge University Press. They were written as an adjunct course for physics students so they would be able to create their own electronic instrumentation for their physics curricula. They are VERY popular books in the industry.

Just remember the K.I.S.S. principle: Keep It Simple ______ (Fill in the blank.) Let me know how you make out. I will be monitoring this thread.
 
Hi Electron,
thanx for the tips. I will surely buy that book too, because analog design is my passion.
Actually, I solved everything by hand, and used Maple to check those really long equations for me. And believe me... this simple 2nd order system gets REALLY difficult.... I did not know about the convergence problem. I will read that book to see what Rob has to say on this topic. I have a translated version of "The art of electronics", which is a very good book. They also describe an entire switch mode power supplies, but they don't zoom in on the error amp. I thought myself that the reason why the phase shift is +180 degrees, is because there needs to be an entire loop: from error-amp, to PWM, to MOSFET, to coil, to output and back to the error-amp. BUT!! The error-amp is compensated (feedback), which means it is a closed loop by itself! So the phase shift should be negative. Yeah, it's pretty mysterious indeed. Tell Rob I'm going to buy his book soon.
Thanx for your help amigo!
 
Hey PWM,

The book "The Art of Electronics" covers operational amplifiers in GREAT detail WITHOUT going into absurdly complex math to do so. It expects you to be thoroughly familiar with their operation BEFORE you go on to PWM's.

Anyway, now that I think about it, I want to ask you to energize your brain cells again. What have you stated? You said you have a 180 degree phase shift, right? Well this is equivalent to a complete inversion of the signal. What you really want to do is to have the circuit respond to load changes quickly enough to not affect the powered circuit while preventing it from responfing TOO fast to instantaneous occurrences to prevent overshoot. At the same time, you do not want it to respond too slowly to changes to keep the voltage output within the range required by the powered circuit. In other words, you want an amplifier that "rolls off" to the -3dB point (.707 x Vpeak) at the frequency above which you want to reject. So you want a low-pass filter (integrator).

So at that point, you can use a program you can get from the TI website called "Filter Pro" (for free). All you do is input the circuit parameters you want for the amplifier and you can tell it whether you want Butterworth, Bessel, Chebyshev or whatever transfer function you want it to respond to, select the type of circuit you want (in this case a low-pass filter, the best and simplest being the Sallen-Key configuration), tell it how much gain you want, and it will give you a schematic and a circuit simulation that will work perfectly, complete with plots to show the response. And you can even tell it how many poles you want!

Essentially, there is a response dependence of a PWM circuit on the frequency of the pulse rate. In the standard PWM you want to vary the pulse rate such that the DC output of the entire circuit remains constant throughout the load range, and the pulse start and stop trigger points are on the rising and falling of the ramp. As the voltage would drop, the pulse width would get wider and turn on the MOSFET longer. When you are defining poles and zeroes, poles are easy, but because it is an asymptotic function, zero might not really be zero.

At a company I used to work for, we had a real simple circuit that does exactly what you are looking for. All you need to do is to determine the maximum rate of change you want from the circuit output, change the rate to the frequency domain (1/rate in sec), quadruple it (4 x Nyquist), and this is your PWM frequency. The next step is to make an amplifier for feedback that REJECTS the actual PWM frequency COMPLETELY. That is the point at which you set your zero point. THEN you use the Filter Pro program and it will determine the exact circuit values you need to make an amplifier that will give you the response you want. THEN you do a temperature characterization that will give you the component tolerance and thermal coefficient for those components you must have in order to keep the ouput within the limits required by the powered circuit across the operating temperature range.

All this goes back to my last response where I mentioned the K.I.S.S. principle. Why reinvent the wheel? Basically you pick the response type you want from the amp based on the characteristics of that response type (Butterworth=constant amplitude but varying phase across the domain, etc.) You want to see a LEVEL change at the input of the PWM that is INVERSELY proportional to the change in voltage. In other words, you want it to turn on LONGER as the voltage goes DOWN, and the polarity of that signal is determined by the type of power device you wish to use (N-channel, P-channel, Enhancement, Depletion mode, all dependent on your output polarity with respect to ground.

And at this point I would incorporate the comments by lcsjk (above). Experiment with both modes, current mode AND voltage mode.

What I would do is to get the parts and build ONLY the PWM portion. Then I would place a DC voltage on the input to the PWM while watching a 2-channel scope connected to the ramp and to the pulse output. As the voltage goes down, the width of the pulse should INCREASE and vice-versa. THEN I would build the amplifier using the component values determined by Filter Pro. Make a divider that scales the voltage (or current) down to the level the amp needs and connect the amp to the input of the PWM. Vary the voltage throughout the range you expect to see, and the ramps and pulse widths should change accordingly. NOW attach the rest of the output circuit with a variable load and vary the load. You should see no change at the the output. If you do see a change, then your gain is not correct on the amplifier. You can simulate all this beforehand with Filter-Pro.

I THINK I got all this right. I did it on the fly, so check out the details. I DO know that I have the general process right, though.

I hope this helps in some way. Just remember, in any engineering design, it is just a matter of knowing the parameters within which you need to operate. Think through the process, then plug in the values and then EXPERIMENT. And I cannot repeat myself enough times, K. I. S. S.

Bill
 
Status
Not open for further replies.
Back
Top