Designing your own power supply: The Error Amplifier

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Th3_uN1Qu3
    Believe in
    • Jul 2010
    • 6031
    • Romania

    #1

    Designing your own power supply: The Error Amplifier

    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.
    Last edited by Th3_uN1Qu3; 03-01-2011, 08:58 AM.
    Originally posted by PeteS in CA
    Remember that by the time consequences of a short-sighted decision are experienced, the idiot who made the bad decision may have already been promoted or moved on to a better job at another company.
    A working TV? How boring!
  • Th3_uN1Qu3
    Believe in
    • Jul 2010
    • 6031
    • Romania

    #2
    Re: Designing your own power supply: The Error Amplifier

    Okay, let me drop some corrections. First, the error amp is actually an inverting amplifier. The reason behind it is that the inverting configuration can produce an output signal of lower value than the input, while the non-inverting cannot. A pulse skipping controller does indeed only require a comparator, and it doesn't need any compensation, but only if it skips entire cycles (see LinkSwitch series). This is called a "bang-bang" controller.

    Second, oscillation only happens if phase is 360 deg and gain is equal to 1. This may seem counter-intuitive but if you do the math that's how it is. So if you have gain, it doesn't matter if the phase hits 360 degrees... but it shouldn't do that nevertheless.

    The best reference i have found so far is "Switching Power Supplies A to Z". Most practical-oriented SMPS books explain only how not why. This one explains everything you need to know. There's quite a bit of math involved but it's worth spending some time on. If you don't feel like doing the math yourself, i'll be making some cheat sheets later.
    Originally posted by PeteS in CA
    Remember that by the time consequences of a short-sighted decision are experienced, the idiot who made the bad decision may have already been promoted or moved on to a better job at another company.
    A working TV? How boring!

    Comment

    • Pyr0Beast
      Badcaps Veteran
      • Feb 2009
      • 406

      #3
      Re: Designing your own power supply: The Error Amplifier

      One thing to note here is that in a regulated power supply, the output voltage can never be lower than the reference voltage.
      No ?

      Reference voltage in PSU SMPS is 5V for TL494, yet, we have 3.3V line

      (Well. 3.3V line usually has Tl431 on it)

      Actually, it can be lower - Unworkable PSU with no output )

      Or you can split reference voltage Tl431 with a 1kOhm, 1kOhm resistor divider would give 1.25V 'reference'.

      Comment

      • Th3_uN1Qu3
        Believe in
        • Jul 2010
        • 6031
        • Romania

        #4
        Re: Designing your own power supply: The Error Amplifier

        Of course you can split the output of the reference regulator too. But in that case the reference becomes the split voltage not the voltage the reference itself is operating at.
        Originally posted by PeteS in CA
        Remember that by the time consequences of a short-sighted decision are experienced, the idiot who made the bad decision may have already been promoted or moved on to a better job at another company.
        A working TV? How boring!

        Comment

        • ben7
          Capaholic
          • Jan 2011
          • 4059
          • USA

          #5
          Re: Designing your own power supply: The Error Amplifier

          Well?

          You gonna teach us about practical compensation?

          (I'm interested in SMPS design, and I have been reading your threads about it)
          Muh-soggy-knee

          Comment

          • Th3_uN1Qu3
            Believe in
            • Jul 2010
            • 6031
            • Romania

            #6
            Re: Designing your own power supply: The Error Amplifier

            Will do, but imma need to make some measurement equipment of my own before i can be 100% sure of my results. Nowhere to borrow a network analyzer from, i'm afraid.

            One thing i can say now - for a quick and dirty test, put a 1uF capacitor on the compensation pin of a SMPS. It should behave and be quiet, even though the transient response will be crap. If it behaves, then you can go on and design a proper compensation scheme. If it still makes weird noises and oscillates, it's not a compensation issue, instead you should carefully check the entire feedback path for noise sources and ground loops.
            Originally posted by PeteS in CA
            Remember that by the time consequences of a short-sighted decision are experienced, the idiot who made the bad decision may have already been promoted or moved on to a better job at another company.
            A working TV? How boring!

            Comment

            Related Topics

            Collapse

            • Document Archive
              ISL6556ACB ISL6556ACBZ ISL6556ACR ISL6556ACRZ PWM Controller Datasheet
              by Document Archive
              ISL6556ACB ISL6556ACBZ ISL6556ACR ISL6556ACRZ PWM Controller Datasheet

              Optimized Multi-Phase PWM Controller
              with 6-Bit DAC for VR10.X Application
              The ISL6556A controls microprocessor core voltage
              regulation by driving up to 4 synchronous-rectified buck
              channels in parallel. Multi-phase buck converter architecture
              uses interleaved timing to multiply channel ripple frequency
              and reduce input and output ripple currents. Lower ripple
              results in fewer components, lower component cost, reduced
              power dissipation, and smaller implementation...
              11-05-2024, 03:10 PM
            • MrCommunistGen
              Polk Audio RTi100 Plate Amplifier won't power on and intermittently honks and buzzes
              by MrCommunistGen
              My childhood best friend was killed about 9 years ago. His parents are finally letting go of his things, and they offered me his Polk RTi100 tower speakers. The Polk RTi100 towers are one of a handful of designs from the early 2000s that is a full range 3-way tower with a built-in self-powered subwoofer. This is accomplished with a plate amp integrated into the speaker input panel.

              I think they used them for a while, but they've been sitting for at least a few years now. After about 40 hours of driving to their house and back (both they and I have moved in the last 9 years) I got...
              07-12-2021, 05:11 PM
            • SavaBogdan
              Help disabling a vcore phase on a MSI X570 Carbon - I have schematics + boardview
              by SavaBogdan
              Hello.
              Does anyone have any experience with disabling a power phase on the CPU vrm?
              The controller is IR35201 6+2 phases. It only uses 5 phases and the pins for pwm and feedback on the 6'th phase are not populated (no traces).
              I got the board with a burned mosfet which I removed along with a part of the pcb. I dremelled away the short as best I could and the board started up fine without the vrm heatsink.
              I then put some sealant and left it for two days to completely dry. I suspect the pressure from the thermal pads on the heatsink compressed the layers so when I started...
              10-21-2022, 10:05 AM
            • jinu_j
              How to test Subwoofer Amplifier with only a multimeter
              by jinu_j
              Hi Folks

              Need some advice on how to test a subwoofer amplifier if i have access to only a multimeter.

              Problem
              I have a Boston Acoustics active Subwoofer (soundware S). Its rated output is 200W. But the output i am getting is very low i can barely hear/feel it even if put the gain at max. I replaced all the capacitors in the Subwoofer amplifier but still no change.

              Is there anyway to test this without getting an oscilloscope/Function generator to see if the fault is with amplifier, driver or the source??

              Any advice would be appreciated...
              08-29-2024, 02:05 AM
            • UserXP
              Mackie CR4 amplifier no sound
              by UserXP
              Hi, people.

              I've got an amplifier assembly from Mackie CR4 parts. It's just an amplifier, there was no speaker housing, so I used my set of CR4s to test it.

              Anyway, upon connecting everything and hooking the "new" amplifier to an audio source, the sound played clearly and strongly for the first ten seconds. I was happy it was working. Then the sound started to fade out during the playback until it was no more. After it had "dropped to zero", there were two very short intervals of sound playing at the normal volume, as if the amplifier was trying to...
              10-17-2020, 05:06 PM
            • Loading...
            • No more items.
            Working...