Modern circuit design is a “mixed signal” endeavor thanks to the availability of sophisticated process technologies that make available bipolar and CMOS (Complementary Metal Oxide Semiconductor), power and signal, passive and active components on the same die. It is then up to the circuit designer's creativity and inclination to assemble these components into the analog and/or logic building blocks necessary to develop the intended system on a chip.
While the digitalization of traditional analog blocks continues, new analog blocks are invented all the time. Examples of new analog functions are charge-pump voltage regulators, MOSFETs, and LED drivers. A contemporary example of digital technology cutting deep into analog core functions is the digitalization of the frequency compensation in the control loop of switching regulators. In this case while the feat has been accomplished — and it can indeed be exhilarating to move 'poles' and 'zeros' (see glossary) around with a mouse click — it is not clear that the feature of digital frequency compensation, and its associated cost in silicon, is always justified. So while digital technology ” circuits and processes- continues to gain ground, analog keeps reinventing itself and rebuilding around a central analog core of functions that is tough to crack: we don't expect to see the digitalization of an analog circuit like the band-gap voltage reference ” namely a digital circuit taking the place of the current analog one – happening any time soon.
In this tutorial we will discuss a number of analog and digital, bipolar and CMOS circuits. It would be hopeless to try to report systematically all the building blocks for mixed-signal circuit design, or even only the main ones. Instead we will adopt the technique of “build as you go.” With this in mind we will start from the single transistor and build up to some complex functions like linear and switching regulators that are at the core of power conversion and management. Part I: Analog Circuits
In this section we will discuss some fundamental analog building blocks for power management. We will review quickly the main properties of the elementary components, the transistors, so that we can use them to build elementary circuits like current mirrors and buffer stages. We will then use these elements and circuits to generate the analog building blocks like operational amplifiers and voltage references. Finally we will combine these analog building blocks into functional circuits. Given the subject of this book, not surprisingly the functions we are interested in are voltage regulators, which are the center of power distribution and management. The process of assembling elementary electrical components into a fully functional electronic product ” namely the system design of an electronic product- can all be implemented on a single die, leading to a monolithic single integrated circuit (IC) , or can be spread over many chips, for example a discrete power transistor chip and a controller IC assembled in a module. Modern circuit design, both at the discrete and IC levels, relies on a mix of bipolar and CMOS elements. Power management integrated circuits can now be built on mixed bipolar CMOS and DMOS processes if the level of performance and complexity justifies it.
System design will mix and match such ICs with external discrete components that will again range from bipolar to CMOS and DMOS with the selection generally being driven by cost first and performance second.
In the rest of this section we often draw bipolar circuits, but every circuit discussed has its counterpart in CMOS. By substituting the NPN with its CMOS dual, the N-Channel MOS transistor, and the PNP with its dual, the P-channel MOS, all the functions discussed in bipolar can be replicated in CMOS.
The NPN transistor (figure 1) is the king of the traditional bipolar analog integrated circuits world. In fact in the most basic and most cost effective analog IC processes, the chip designer has at its disposal just that; a good NPN transistor. The rest, PNPs, resistors and capacitors are just by-products, a notch better than parasites. For intuitive, back-of-the-envelope type analysis, it is sufficient to model the transistor mostly in DC (Direct Current), keeping in mind that the bandwidth of such an element is finite.
When complexity, like small-signal AC (Alternate Current) behavior, is added to the model, computing simulations should be used since the math quickly becomes hopeless. In Figure 1 the NPN transistor is shown with its symbol (a) and its DC model (b). In this component the current flow enters the collector and base and exits the emitter. Simply stated, the transistor conducts a collector current IC which is a copy of the base current IB amplified by a factor of beta (). It follows that the emitter current IE is one plus beta times the base current. A typical value for the amplification factor is 100. NPNs have excellent dynamic performance, or bandwidth, measured by their cutoff frequency (fT); easily above 1GHz. with the current flow entering the emitter and exiting the collector and base
Click to Enlarge
The PNP transistor (fig 2.2) is complementary to the NPN, with the current flow entering the emitter and exiting the collector and base, the opposite of what happens in the NPN. Simplicity dictates that PNPs are a by-product of the NPN construction, hence they often have less beta current gain and are slower than NPNs. A typical value for their amplification factor β is 50 and their cutoff frequency (fT ), is generally above 1MHz.
Click to Enlarge
In addition to current gain, β and bandwidth fT , another important element of the transistor model is its trans-conductance gain gm, namely the amount of current in the emitter as a result of a voltage input in the base-emitter junction. The small signal transistor model in figs.2.1 and 2.2 shows that the base-emitter voltage of a transistor — the infamous 0.7V roughly constant voltage — is modulated by the resistance rE where:
RE = VT /IE 
VT = kT /q = 26mV at temperature ambient of 25C 
where K is the Boltzman constant, T is the temperature in degrees Kelvin, and q is equal to the electron charge in Coulombs.
It follows then that a small signal voltage ΔV applied at the transistor base-emitter junction will act solely on the resistor rE and develop a corresponding current dI.
dI = ΔV/ rE dI/ ΔV= gm= 1/ rE 
Therefore, the trans-conductance gain gm is the exact inverse of rE . Since we deal more easily with resistors than trans-conductors, we will continue to represent the trans-conductance gain with the resistor rE explicitly drawn in the model or simply implied in the transistor symbol.
Transistor as transfer-resistor
A transistor with 1mA of emitter current will exhibit an emitter resistance of 26mV/1mA or 26Ω according to .
This, as any resistance in an emitter, produces an amplified resistance as seen from the base. In fact staying with this numeric example, an emitter current of 1mA, in addition to a 26mV drop in the emitter-base voltage, will produce a base current variation of approximately 10 μA (1mA divided by an amplification of β+1 or 101).
From the base vantage point a 26mV fluctuation in response to a base current fluctuation of 10 μA is interpreted as a resistance of 26mV/10 μA = 2.6KΩ. Naturally such transfer of resistance from low in the emitter to high into the base is the property that gives the name transistor or transfer resistor to the electrical component.
The voltage to current relation in a bipolar transistor follows a logarithmic law given by:
Vbe = VT *ln(I/Io) 
where VT is the thermal voltage and Io is a characteristic current that depends on the specific process. This has some pretty interesting implications; for example, if the transistor from equation  carries a current x times higher, we can write:
Vbe ' = VT *ln(x*I/Io)  The increase in voltage from the factor of x increase in current will be:
ΔVbe = Vbe '-Vbe = VT *ln (x) = (kT/q)ln(x) 
Given that VT = 26mV at ambient temperature, we see easily that doubling the current in a transistor (x = 2) will raise its Vbe by 18mV (say from 700mV to 718mV) and a 10x increase in current will raise the Vbe by 60mV. In gross approximation we can consider the Vbe of a transistor constant around 0.7V, but to be more precise the Vbe shifts logarithmically with the current.
The relative insensitivity of the transistor Vbe to current variations is exploited in building current sources and voltage references.
Naturally the opposite is true for the current variation as a function of voltage. In fact if we invert the previous equation we have:
I = Io*exp(Vbe / VT ) 
Which shows that the current varies exponentially with the Vbe . We already know that a variation of 18mV on the Vbe will double the current in the transistor. For a quick estimate of variations in current due to small voltage variations, we can linearize the exponential law and find that the current will vary at roughly 2%/mV. This strong dependence of current on the Vbe explains why the transistor is normally driven with current, not voltage.
This also explains how difficult it is to deal with offsets, or small voltage variations between identical transistors. Two identical transistors biased at the same identical voltage will have their current mismatched with a 2% error if their Vbe differs by just 1mV.
MOS vs Bipolar transistors
The dual of Bipolar NPN and PNP transistors in CMOS technology are the P-Channel and N-Channel MOS transistors in Figure 3a and 3b. The general function of the transistors is the same independently as their implementation but there are pros and cons to using both technologies. Generally speaking, the base, the emitter, and the collector of the bipolar transistor are analogous to the gate, source and drain of the MOS transistor, respectively. The bipolar transistors' main problem, which is not present in CMOS, is their need for a base current in order to function. Such current is a net transfer loss from emitter to collector. While the base current is small in small signal operation, in power applications, where the transistor is used as a switch, the base current necessary to keep the transistor on can be very high.
This high base current can lead to implementations with very poor efficiency. With the popularity of portable electronics and the need to extend battery life, it is no wonder that CMOS often tends to have the upper hand over bipolar technologies. The advantage of bipolar over CMOS that it has better trans-conductance gain and better matching, leading to better differential input gain stages and better voltage references. The best performance processes are mixed-mode BiCMOS (Bipolar and CMOS) or BCD (Bipolar CMOS and DMOS) processes in which the designer can use the best component for the task at hand.
Click to Enlarge
In this section we will build increasingly complex and thus increasingly functional blocks, leading to some useful power management circuits.
Current mirrors are a very common way to implement current sources or active loads.
Figure 4. PNP Current mirror.
Click to Enlarge
The foundation of a current mirror is the fact that two identical transistors driven by the same Vbe will carry identical currents. In figure 4 the two transistors having a gain of β are connected in a mirror configuration; namely the same base and same emitter potentials. Such configuration yields a virtually perfect unity gain Iout/Iin except for the base currents, which introduce a systematic error of
β /2+ β. For example for β = 100 the error is roughly two percent.
Current sources (figure 5) are a very popular means to set relatively constant bias currents.
Figure 5. NPN Current source.
Click to Enlarge
In figure 5 the relatively constant voltage of the Vbe of T2 is forced across resistor R and the ensuing current is available at the collector of T1. Suppose that the supply V+ changes from 5V up to 10V, the current inside T2 will roughly double, but its Vbe will only increase by 18mV, say from 0.7V up to 0.718mV. Accordingly the current Io will increase by 18mV/R. In conclusion an initial voltage variation of 100% results in an error of only 18mV/700mV or 2.6%.
Differential input stage
In figure 6 an NPN differential stage is illustrated.
Figure 6. NPN differential stage.
Click to Enlarge
The trans-conductance gain dI/dV of this stage is calculated below:
dI1 =dV/2rE 
rE =VT /IE 
Substituting  into  we have:
dI1 /dV=IE /2VT 
For example with IE = 10 μA we have a trans-conductance dI/dV = 10 μA/52mV = 1/5.2k Ω. Notice that the trans-conductance gain of this stage is a simple linear function of its bias current IE .
Differential to single input stage
Figure 7. NPN differential-to-single stage.
Click to Enlarge
The combination of a differential stage and a mirror allows the building of a differential input to single output stage, a fundamental input stage block in operational amplifiers. Thanks to the turn-around effect of the mirror, the gain of this stage is double the one calculated in the previous step:
2dI/dV=1/rE = IE /VT =10μA/26mV=1/ 2.6kΩ 
The function of a buffer is to transfer the voltage transparently from its input to its output while increasing dramatically the current drive. A voltage driven transistor, as discussed above, is an ideal buffer thanks to its property of yielding a current that increases exponentially with the applied voltage. Since an NPN can only source current out of its emitter and a PNP can only sink current into its emitter, if we want to drive a bipolar (source or sink) load, we will have to use both types of transistors in the configuration of figure 8. For example, if the current source I is 0.1mA and the beta gain of each transistor is 100, then the buffer can drive a current of 0.1mA*100 = 10mA.
Figure 8. Buffer.
Click to Enlarge
*This tutorial is based on chapter 2 of “Managing Power Electronics: VLSI and DSP-Driven Computer Systems,” by Reno Rossetti, to be published in 2006 by John Wiley and Sons, Inc.