Friday, October 3, 2014

Understanding Linear Regulator Design Parameters

Understanding Linear Regulator Design Parameters
by Michael Delany

Introduction

All electrical systems need to have one or more power rails to power components or use as references. Depending on the application, some characteristics can be more desirable than others. It is common that one wishes to take some voltage level and regulate it down to a lower level and filter the signal to have clean DC output. One way to accomplish this is to use a linear voltage regulator. This segment will discuss when to use and when not to use a linear voltage regulator. In the same manner this segment will also explain what characteristics will be more important in one linear regulator versus another.

Why Use A Linear Voltage Regulator?

The linear voltage regulator is a device which uses output feedback to correct its output and makes it as stable as possible to the reference. This is done with a differential amplifier and a transistor to regulate the output (in this case a FET). In this segment, we’re going to use a low-dropout (LDO) linear regulator. In this device a FET is used rather than a BJT to minimize losses when the BJT is in the active region.

So why would we consider using a linear regulator? Why not just put a battery into a system and use the output of the battery? Well, it turns out that a battery’s voltage drops linearly as time goes on.

In addition, one would would also like to remove the effect of load transients on the output of the regulator.  That is, when the device loading the regulator suddenly needs more current, this has only a small affect on the output voltage. Another reason includes the rejection of noise and voltage ripple at the input. The linear regulator is not the only type of regulator either. The other most common voltage regulation techniques are switch-mode regulators and switch capacitor regulators.

So in which applications would it be preferrable to use a linear regulator? Considering a linear regulator requires very few external components, it is very simple to set up. In addition, they are usually much cheaper than another type of regulator like a switch-mode power supply.

The linear regulator is most suited for an application where the regulated output will be very close to the input voltage. The reason being because of better efficiency, something that’ll also be discussed. Also, unlike a switch mode power supply, there is considerably less noise since the regulator isn’t constantly switching.

Modeling An LDO

The following is how one can model a linear voltage regulator along with some of its internal characteristics.

is the load resistance
is the load capacitance
is the equivalent series resistance of the capacitor
is the bypass capacitor placed across the regulator’s output terminals
is the capacitance of the PMOS pass transistor
is the output resistance of the error amplifier
is the gain of the error amplifier

For output feedback the output voltage is scaled for comparison against a reference via a voltage divider. A typical reference voltage for a TI part for example is = 1.192 [V]. First, let’s define a parameter β known as the feedback gain of the system as the ratio of the output voltage is scaled by for the controller (op amp).

    β =

The following is an approximation when the open loop gain is much greater than 1 and we can solve this equation for β using the code below: (Note is the gain of the error amplifier in V/V)

    

The above value 0.134921 corresponds to the gain in the feedback loop and above we can see the ratio of resistors needed.

Note: In Mathematica, (the computational package I’m using) one can use subscripted variables by holding ctrl and pressing - . However, if the subscript name is the same as another variable defined, Mathematica will try and expand the subscript to its evaluated form. The following are variables that are used to model the low-dropout regulator, including the poles and zeros needed to model the open-loop transfer function.

[s] above is the open loop transfer function. So to get the closed loop transfer function we just compute . It’s also a good exercise to plot the open loop transfer function versus the closed loop transfer function. When doing this one notices there is a tradeoff. The gain of the system will decrease, but the overall bandwidth increases when we switch to the closed loop gain.

Also another thing we could do if we like is calculate the gain and phase margins for the open-loop transfer function.

There is infinite gain margin in this case with None corresponding to the frequency and ∞ being the gain. Next the unity gain happens at 43,062.6 radians/sec and the phase margin is 1.07188 radians or 61.4142 degrees. According to the criteria of stability, this is a stable system.

Typical datasheet parameters

Included in this section are some of the most basic parameters noted in a typical datasheet:

Quiescent current is an undesirable parasitic of any linear regulator, and is defined as the difference in the output and input current. The components in the regulator are not ideal and therefore they require some bias current. For example, the current draw by the op amp, gate drive current for the pass transistor, and feedback resistors.

One thing to check for when looking for an LDO is to see if the efficiency will work for your application. To compute the efficiency of an LDO, the following equation can be used:

    η = * 100%
    
where is the output current, is the output voltage, is the input voltage and is the quiescent current. There are some applications where linear regulators won’t work well for efficiency. If for rough calculations, one assumes the quiescent current is relatively low, then the efficiency is approximately:

    η ≈
    
So if one were doing voltage regulation with a 12V input going to 3.3V output, the efficiency would be approximately 27.5%... Not so great.

One of the other parameters for designing a system with an LDO is knowing the line regulation. Or in other words, how much the output changes versus a step change in input. Line regulation is a steady-state parameter which is independent of frequency contributions, unlike Power Supply Ripple Rejection (PSRR) noted later in this text.

Line regulation is defined the following way:

    line regulation =

Another design parameter is the load regulation. The load regulation is the amount that the output voltage will change for a given output current change. Just like line regulation, load regulation is a stead state parameter so this should be taken into account during design.

    load regulation =

The following is the gain plot for the Power Supply Ripple Rejection (PSRR). PSRR is very similar to line regulation except it takes into account the entire frequency spectrum. It is worth while to note that this model for PSRR doesn’t take into consideration the load of the power supply. The higher the load, the more exaggerated the PSRR and vice versa.

Output Voltage Noise

Next, we’ll go over the noise at the output of the regulator and what causes it and how we can try and minimize its impact. One of the reasons there is noise at the output of the regulator is because the reference voltage inherently will have some noise which is amplified. This noise can be minimized greatly by using something known as a feedforward capacitor. This feedforward capacitor is placed between the output and feedback pin on the regulator.

The use of the feedforward capacitor will divert the noise across the reisistor such that the reference noise is not amplified. There is a parameter called the RMS noise which is typically in units of and this value is dependent on the value of . As can be seen below, the RMS noise is also dependent on the output voltage and is computed as an average over a frequency range:

This is not the only way to reduce noise due to the reference voltage. Looking at the schematic above, we can see that a capacitor can be added to the NR (noise reduction) pin to filter out reference voltage noise.

Conclusion

The linear regulator isn’t just a three pin device where the input is connected and voila there is an output. It’s more delicate than that and deserves some real thought (even the models I’ve used are simplified versions of the real models). When selecting components, it makes sense to be sure the component you’re choosing now will work well for for your application under its operating conditions.This isn’t an all encompassing text of linear regulators either. There are other topics that can be explored such as transient response and accuracy, which I encourage you to look at. This was hopefully a bit of an insight to remind you as an engineer to be meticulous with component selection and your particular application.



Download:

Sources

1.    Lee, Bang. “Understanding the Terms and Definitions of LDO Voltage Regulators.” Texas Instruments Application Report. 1 Oct. 1999. Web. 19 Sept. 2014. <http://www.ti.com/lit/an/slva079/slva079.pdf>.

2.    Rogers, Everett. “Stability Analysis of Low-dropout Linear Regulators with a PMOS Pass Element.” Texas Instruments Power Management. 1 Aug. 1999. Web. 19 Sept. 2014. <http://www.ti.com/lit/an/slyt194/slyt194.pdf>.

3.    Teel, John. “Understanding Power Supply Ripple Rejection in Linear Regulators.” Texas Instruments Power Management. 1 Apr. 2005. Web. 19 Sept. 2014. <http://www.tij.co.jp/jp/lit/an/slyt202/slyt202.pdf>.

4.    Nogawa, Masashi. “LDO Noise Examined in Detail.” Texas Instruments Power Management. 1 Oct. 2012. Web. 19 Sept. 2014. <http://www.ti.com/lit/an/slyt489/slyt489.pdf>.

5.    Antunes Fernandes, Pedro Miguel. “High PSRR Low Drop-out Voltage Regulator (LDO).” Universidade Technica De Lisboa. 1 Apr. 2009. Web. 19 Sept. 2014.     <https://fenix.tecnico.ulisboa.pt/downloadFile/395138344001/LDO.pdf>.

6.    Zhang, Henry. “Basic Concepts of Linear Regulator and Switching Mode Power Supplies.” Linear Technology Application Note. 1 Oct. 2013. Web. 19 Sept. 2014.     <http://cds.linear.com/docs/en/application-note/AN140fa.pdf>.

Sunday, August 31, 2014

Butterworth Filter Design

Untitled (Wolfram Mathematica 9.0 for Students - Personal Use Only : www.wolfram.com)
by Michael Delany
With download included in conclusion

Introduction

Its very common to want to develop a filter that has a response similar to an ideal low pass filter. With the ideal low pass filter, frequencies less than some value are allowed to pass, while others are rejected. This is the idea behind use of the Butterworth filter.



The image above is the ideal low pass filter that we would like to have, but realistically you can’t always get what you want. So, with that said we’ll design something that’s “close enough” according to engineering design specifications. First, we need to go over some concepts used for filter design in general.

Filter Design Specifications

Since the ideal filter isn’t realizable, there will be some design parameters we will design against. The first one is the parameter known as the passband ripple. This is the maximum allowable peak to peak ripple in the passband in decibels (dB). Between the passband and stopband there is a section called the transition band. The transition band is where the attenuation is starting to occur, but hasn’t reached the minimum desired stopband attenuation . The frequency where the passband stops is and where the stopband starts is .

One thing to note about the Butterworth filter is that it’s an all pole filter. In addition, there are a certain number of stages of cascaded filters needed to realize entire filter design. Once the design parameters , , , and are determined by the designer, the order (number of poles) of the filter is set.

Regardless of the number of poles in the Butterworth filter, at frequency , the value of the transfer function will be



where ε is computed from . For example, lets say we want to design a filter that only varies by 1 dB in the passband region. Then using the following equation we can calculate ε:

In the above equation, using 1 dB as the passband ripple value we get ε as 0.508847. Now we must set some other design parameters. In addition, we need to determine what we want for . Lets say that in the stopband, we want the attenuation to be 12 dB; therefore, is 12 dB.

Referring to Figure 2, we want the attenuation at noted greater than or equal to to fulfill our design considerations.

In this case, is the cutoff frequency of the filter and is a value that we choose, noting that it will be more difficult to realize the filter as gets close to .

As an example let’s use the following numbers.

= 1 dB
= 12 dB
= 10 kHz * 2π rad
= 15 kHz * 2π rad

Using the slide bar above, we can read off the order (press the + button to see the order) until the value for becomes greater than = 12 dB. This value happens to be five (5), which means that the Butterworth filter is going to need five poles to meet our design specifications.

Constructing the Filter Design

The Butterworth filter is going to place all of the poles at the same location . Using the following code we can compute the normalized filter transfer function. Later, we’ll use the normalized design as a template for filters of different impedances and our cutoff frequency . As can be seen in the pole diagram below, is currently normalized to 1 [rad/s].

Good. So now that we have the transfer function, let’s take a look at the poles and what their values are.

The Butterworth filter employs poles at the same frequency which are spaced evenly around the left-hand side of the s-plane. Let’s extract the poles and see what they look like. It should be noted that when the order of the filter is odd, there will be one real pole and the others will be complex conjugates. If the order of the filter is even, then all the poles will be complex conjugates. Using a For[ ] loop to iterate over the List, the poles are:

From here, we’ll take all of the poles and convert them to combination of second order and single pole transfer functions.

As a sanity check, let’s take a look at the tranfer function

One thing to note at this point are the poles of the transfer function. Right now there are five poles and as said earlier, this is an all pole filter. We also said that the final transfer function for the entire filter is a combination of 2nd order transfer functions and a single pole is added if the order of the transfer function is odd. The following is the standard form for a second order transfer function. Something we discussed in blog post 1, Plotting Transfer Functions with Mathematica.

T(ω) =

For the the fifth order filter contructed above, we see that taking to be normalized to 1 [rad/s] yields the coefficient attached to the s term equal to 2ζ. Let’s just call this number d:

d = 2ζ

So, in the example above, the d coefficients are =1.61803 and =0.61804. We’ll use a well known active filter topology called the unity gain Sallen-Key topology, which when normalized looks like:

Now that we have the normalized filter design, all we have to do is scale the impedance and the frequency to match our use. Following the steps in Don Lancaster’s Active Filter Cookbook...

TO SCALE IMPEDANCE:

Multiply all resistors and divide all capacitors by the new value expressed in units of 10k

TO SCALE FREQUENCY:

Keep the ratio of both frequency determining capacitors constant. Double the capacitors to halve the frequency and vice versa. If the 1-kHz capacitor value is 0.016 μF, changing to 1600pF will raise the frequency to 10kHz. Similarly, a 0.16 μF capacitor will lower the frequency to 100Hz.

As you can see, the cutoff frequency for the filter will be 1/2πRC when you ignore the factor of 2/d and d/2. Now all we have to do is change the capacitors to reflect our design specifications originally of a cutoff frequency of 10kHz. To do this, we’ll decrease our capacitor values by a factor of 10 to increase the cutoff frequency by a factor of 10.

Therefore, once we’ve picked all of our component values, all we need to do is multiply by the factors of d/2 and 2/d. Each stage will realize a complex conjugate pair and a single active low pass filter could be used for the single pole. All of these stages can then be cascaded to achieve the desired filter.

Conclusion

From the books I’ve read, I’ve noticed not all books contain all of the information necessary to truly design a Butterworth filter. Hopefully the combination of sources used for this post bridge these gaps. The filter we designed was used to overcome the problem of realizing an ideal low pass filter. We determined the order of the filter based on some design parameters known as the passband ripple, stopband attenuation, cutoff frequency and stopband starting frequency.

Once we determined the order of the filter, we broke it down into stages that were cascaded together. Some stages were second order filters that used the unity Sallen-Key topology and others were active filter low pass circuits. Each of these stages are known as normalized filters, whereby just the component values can be changed to achieve the functionality required.

With that said, the Mathematica notebook file is also available for download. So if you ever need to do a Butterworth filter design, you can use this as a quick template for building one.

Download: ()

Sources

1. Lancaster, Don. “Low-pass Filter Circuits.” Active-filter Cookbook. Indianapolis: H.W. Sams, 1975. 121-27. Print.

2. Lancaster, Don. “First and Second-Order Networks” Active-filter Cookbook. Indianapolis: H.W. Sams, 1975. 43-47. Print.

3. Sedra, Adel S., and Kenneth C. Smith. “Filters and Tuned Amplifiers.” Microelectronic Circuits. 6th ed. New York: Oxford UP, 1998. 1254-267. Print.