The error amplifier is the most important building block in a regulated power supply, be it linear or switching. It is the device actually doing the regulation. But what does an error amplifier actually do and why the name?
If you know anything about the use of operational amplifiers in audio, inverting and non-inverting configurations, forget it now. What an error amplifier does is act as a comparator. Let's have an example. For the sake of simplicity assume that the opamp is ideal. Real-world devices cannot swing rail to rail, but in our application it doesn't matter anyway.
It can be seen that when the positive input is higher, the output is positive, when the negative input is higher, the output is negative. Since the negative rail is connected to ground in this example, when the negative input is higher, the output is zero volts. There is no "inverting" or "non-inverting" configuration. What input you choose as reference is determined by what you want the error amp to do - if you want the output to be normally high and go low when the sensed voltage is higher than the reference, you put the reference on the positive input, if you want the output to be normally low and go high when the sensed voltage is higher than the reference, you put the reference on the positive input.
But what exactly is a reference anyway? Well, a reference is a very stable voltage source. A very common reference is the TL431 which in its default configuration produces 2.5 volts. One thing to note here is that in a regulated power supply, the output voltage can never be lower than the reference voltage. On the other hand, if the ratio between the output voltage and the reference voltage is very high, regulation will start to suffer due to component imprecisions. So a power supply designed to deliver high output voltage will benefit from a higher reference voltage.
When the loop is closed, the error amplifier attempts to keep both inputs at the same voltage by swinging the output back and forth and controlling the drive signal to the power transistors. So how do you exactly stabilize, say, 15 volts, when the reference is 2.5 volts? You use a resistive divider to divide the desired voltage down to 2.5 volts. Here you have a calculator.
"So that's how i make a regulated power supply. All i need is a resistive divider and reference connected to the controller's error amp and all is fine and dandy..."
The above would be true if the output were straight DC. And it is indeed true for linear regulators. But, a switching power supply does not output DC. It outputs a high frequency AC signal which needs to be rectified and filtered before it can be useful. Filtering is done using an inductor and capacitor. Inductors and capacitors create phase shifts in AC. And feedback theory tells you: In a negative feedback system, if the total phase shift reaches 360 degrees at any frequency where gain is 1 or greater, the feedback becomes positive and the system will oscillate at that frequency. Negative feedback is by definition 180 degrees out of phase, so we have another 180 degrees to play with. In theory that is.
Since in a SMPS we have to be controlling the AC source to generate the DC voltage, we need to consider the phase shift of the filtering elements and adjust the gain and phase of the error amplifier accordingly so the overall system gain is always less than 1 when the phase shift approaches 360 degrees. This is called compensation.
Now, if the phase never hits 360 degrees it doesn't mean that the system is stable. Outside influences or component tolerances can make the phase hit 360 degrees under certain circumstances. So it is good design practice to leave some extra degrees in - this is called phase margin and it is usually selected as 45 degrees or more. Therefore, for a system that is unconditionally stable, the total phase shift must be 315 degrees or less whenever the gain is 1 or greater.
Next up, i delve into practical compensation... stay tuned.
If you know anything about the use of operational amplifiers in audio, inverting and non-inverting configurations, forget it now. What an error amplifier does is act as a comparator. Let's have an example. For the sake of simplicity assume that the opamp is ideal. Real-world devices cannot swing rail to rail, but in our application it doesn't matter anyway.
It can be seen that when the positive input is higher, the output is positive, when the negative input is higher, the output is negative. Since the negative rail is connected to ground in this example, when the negative input is higher, the output is zero volts. There is no "inverting" or "non-inverting" configuration. What input you choose as reference is determined by what you want the error amp to do - if you want the output to be normally high and go low when the sensed voltage is higher than the reference, you put the reference on the positive input, if you want the output to be normally low and go high when the sensed voltage is higher than the reference, you put the reference on the positive input.
But what exactly is a reference anyway? Well, a reference is a very stable voltage source. A very common reference is the TL431 which in its default configuration produces 2.5 volts. One thing to note here is that in a regulated power supply, the output voltage can never be lower than the reference voltage. On the other hand, if the ratio between the output voltage and the reference voltage is very high, regulation will start to suffer due to component imprecisions. So a power supply designed to deliver high output voltage will benefit from a higher reference voltage.
When the loop is closed, the error amplifier attempts to keep both inputs at the same voltage by swinging the output back and forth and controlling the drive signal to the power transistors. So how do you exactly stabilize, say, 15 volts, when the reference is 2.5 volts? You use a resistive divider to divide the desired voltage down to 2.5 volts. Here you have a calculator.
"So that's how i make a regulated power supply. All i need is a resistive divider and reference connected to the controller's error amp and all is fine and dandy..."
The above would be true if the output were straight DC. And it is indeed true for linear regulators. But, a switching power supply does not output DC. It outputs a high frequency AC signal which needs to be rectified and filtered before it can be useful. Filtering is done using an inductor and capacitor. Inductors and capacitors create phase shifts in AC. And feedback theory tells you: In a negative feedback system, if the total phase shift reaches 360 degrees at any frequency where gain is 1 or greater, the feedback becomes positive and the system will oscillate at that frequency. Negative feedback is by definition 180 degrees out of phase, so we have another 180 degrees to play with. In theory that is.
Since in a SMPS we have to be controlling the AC source to generate the DC voltage, we need to consider the phase shift of the filtering elements and adjust the gain and phase of the error amplifier accordingly so the overall system gain is always less than 1 when the phase shift approaches 360 degrees. This is called compensation.
Now, if the phase never hits 360 degrees it doesn't mean that the system is stable. Outside influences or component tolerances can make the phase hit 360 degrees under certain circumstances. So it is good design practice to leave some extra degrees in - this is called phase margin and it is usually selected as 45 degrees or more. Therefore, for a system that is unconditionally stable, the total phase shift must be 315 degrees or less whenever the gain is 1 or greater.
Next up, i delve into practical compensation... stay tuned.
Comment