<<

Notes for course EE1.1 Circuit Analysis 2004-05 TOPIC 5 – THE , AND TRANSIENT ANALYSIS Objectives • Introduce the capacitor and the inductor • Consider parallel and series connections of and • Consider power and energy for the capacitor and the inductor • Introduce the switch as a circuit element • Introduce transient analysis through a computer clock rate example • Generalise to transient analysis of any 1st order RC or RL circuit

1 THE CAPACITOR A capacitor is a circuit element that stores charge It can be made by sandwiching an insulator between two conducting plates in a structure called a parallel-plate capacitor:

The two conducting plates have area Ac and are separated by a dielectric layer of thickness d As positive charge flows into the capacitor, it begins to accumulate on the plate connected to that terminal, since it cannot continue to flow through the insulating layer This accumulation of positive charge attracts negative charge to the opposite plate This negative charge has to come from somewhere; it can be supplied only by the wire connected to the opposite plate This flow of negative charge constitutes an electrical current oriented out of the opposing plate, which is equal in magnitude to the current flowing into the capacitor From a circuit point of view, it appears that a current is flowing directly through the capacitor Topic 5 – Capacitor, Inductor and Transient Analysis

In order to analyse this capacitor, we define parameters as follows: q Charge on the plates v between plates

Ac Area of the plates D Distance between plates ε Permittivity of the dielectric between the plates It can be shown that the charge stored on each of the capacitor plates depends on the voltage across the capacitor in the following way: εA q = c v d The relationship between these two quantities is linear; q

gradient C 0 v

We call the constant of proportionality the (symbol: C): q = Cv In general capacitance depends on the geometry and construction of the capacitor For the parallel-plate capacitor we have been considering, the capacitance is given by: εA C = c d ε is usually expressed as:

ε = εRε0 –14 where εR is the dielectric constant and ε0 = 8.854 × 10 F/cm is the permittivity of free space Since q has units of coulombs, and v is measured in volts, the fundamental unit of capacitance is Coulomb per Volt (C/V) which is called a Farad (abbreviation: F) Any device capable of storing charge acts as a capacitance, including parasitic capacitance We can derive the terminal current-voltage characteristics of the device by using the definition of current: dq i = dt Differentiating the capacitor q expression results in: dq d dv dC = (Cv) = C + v dt dt dt dt

2 Topic 5 – Capacitor, Inductor and Transient Analysis

For a time-invariant capacitor, C is a constant and therefore dC/dt = 0 Hence, the current-voltage relationship for a capacitor is given by: dq i = dt dv = C dt In this equation, i is the current flowing through the capacitor, C is the capacitance, and v is voltage across the capacitor This expression tells us that the current through a capacitor is proportional to the time derivative of the voltage across it As long as the voltage is changing, there is current flowing through the capacitor It follows that there is zero current through a capacitor if the voltage across it is constant, and vice versa The symbol for a capacitor is as follows:

We have derived an equation for i in terms of v To obtain an expression for v in terms of i, we can integrate both sides of the equation: 1 v = i(t)dt + v(0) C ∫ We have replaced i by i(t) to emphasise that it is a function of time We have also included an arbitrary constant v(0) (v at time t = 0) which is necessary when integrating v(0) is the voltage stored on the capacitor before we apply the current that is integrated by the capacitor to produce a change in voltage Since t is the time at the end of the integration period, it is more correct to plot i as a function of a dummy variable x, ie i(x) against x, which has the same graph as i(t) against t Assuming that we start applying current at t = 0 and are interested in v at time t, we can more correctly say: t 1 v = i(x)dx + v(0) C ∫ 0

If we apply current at time t1 and are interested in the voltage at time t2, then we have: t 1 2 v = i(x)dx + v(1) C ∫ t1

2 THE INDUCTOR Another circuit element which stores energy is the inductor

3 Topic 5 – Capacitor, Inductor and Transient Analysis

A common way of making an inductor is to wind a wire into a coil, as shown:

Passing a current through a conductor results in a magnetic field encirc1ing the wire

A change in the current results in a change in the magnetic field B If the current is time varying, the magnetic field also varies, in step with the current This causes the magnetic lines of force to cut across the conductor which generates a voltage It may be shown that flux linkage is given by: λ = NAB where A is the area of the coil and N is the number of turns For the coil shown, it may be shown that: Nµi B = l l is the axial length of the coil and µ is a constant known as the permeability Hence, N 2Aµ λ = i l Hence, the flux linkage for an inductor is proportional to the current The constant of proportionality is known as the and is given the symbol L λ = Li For this particular form of inductor, we have:

4 Topic 5 – Capacitor, Inductor and Transient Analysis

N 2Aµ L = l The unit of inductance is the Henry (abbreviation: H), which is equivalent to an ohm-second (Ω-s). The inductor equation λ = Li corresponds to the equation q = Cv for the capacitor. The voltage across the inductor terminals is equal to the rate of change of the flux linkage: dλ d di dL v = = (Li) = L + i dt dt dt dt Assuming that the inductance L is time-invariant, we have for the inductor: dt v = L dt This inductor equation corresponds to the equation i = Cdv/dt for the capacitor. Note that a constant current flowing through an inductor corresponds to a zero voltage drop Conversely, if there is zero volts across an inductor, the current through it is constant in time The circuit symbol for an inductor is as follows:

The reference direction arrow for the current encounters the + sign of the voltage first We illustrated the phenomenon of inductance using the coil, but it is important to remember that inductance is an intrinsic property of all conductors, regardless of their shape and it exists whenever current flows; even a straight wire has an inductance, although it is very small. We have derived an equation for v in terms of i for the inductor To obtain an expression for i in terms of v, we can integrate both sides of the equation: t 1 i = v(x)dx + i(0) L ∫ 0 where x is a dummy variable. If we apply voltage starting at time t1 and are interested in the current at time t2, then we have: t 1 2 i = v(x)dx + i(t1) L ∫ t1

5 Topic 5 – Capacitor, Inductor and Transient Analysis

We give a summary of the relationships between i and v for the capacitor and for the inductor: Expression for i Expression for v dv t Capacitor i = C 1 dt v = i(x)dx + v(0) C ∫ 0 t di Inductor 1 v = L i = v(x)dx + i(0) dt L ∫ 0 The fact that capacitors and inductors can differentiate and integrate and currents makes them indispensable circuit components, especially for processing Apart from their use as wanted circuit components, it is the case that other types of components, including and , have unwanted parasitic capacitance and inductance which can be a limiting factor for performance of circuits which operate at high ; hence it is very important to be able to analyze circuits containing capacitors and inductors 2.1 Mechanics analogy The equations describing electronic components can be regarded as direct mappings of the equations governing mechanics. This leads to an electrical–mechanical analogy: Electrical Mechanical Equations dq ds i = v = dt dt

v = iR f = vk1 di dv v = L f = Ma = M dt dt 1 1 1 v = ∫ idt f = ∫ vdt = s C k2 k2 Corresponding parameters current i ≡ v velocity charge q ≡ s distance voltage v ≡ f force

resistance R ≡ k1 damping constant inductance L ≡ M mass

Capacitance C ≡ k2 inverse spring constant

3 THE SWITCH The operation of an electrical switch is familiar to all; it passes current when closed, and does not pass current when open A can acts as a switch

6 Topic 5 – Capacitor, Inductor and Transient Analysis

In fact it is this switching action of a transistor which is exploited in all digital circuits, including the computer The symbol for an ideal switch is as shown

An ideal switch has two states, open and closed The "switching event" takes place at the time indicated; by convention the switch is drawn in the position it assumes before the switching event

The switch shown has a switching event at t = t0 and is shown in the open position; thus, by convention, the switch is open for t < t0, and closed for t> t0 It is also possible to have switches which open at the switching event:

"Open" and "closed" are defined as follows: • an open switch has i = 0, with no restriction on the voltage across it • a closed switch has v = 0, with no restriction on the current through it Upon closer inspection, we see that: • an open switch can be replaced with an open-circuit or current source of value zero • a closed switch is identical to a short-circuit or zero-valued voltage source

Ideal switches neither draw nor supply power regardless of the position of the switch This can be seen from the power relationship p = v × i: • when the switch is open i = 0 • when the switch is closed v = 0 Suppose we have an ideal switch which closes at t = 0 This means that i = 0 for t < 0 and v = 0 for t > 0 This definition does not strictly define the state of the switch exactly at t = 0

7 Topic 5 – Capacitor, Inductor and Transient Analysis

In order to overcome the ambiguity, we denote as: V(0–) – voltage at the instant just before switch closure V(0+) – voltage at the instant just after a switch closure

4 POWER AND ENERGY RELATIONSHIPS FOR R, L AND C An important aspect of electronic circuits is the rate of energy transfer among the various elements In this section we develop relationships between circuit variables (such as voltage and current) and the energy associated with circuit elements 4.1 Power/Energy Relationships for Resistors Using Ohm's law and the general power formula for a circuit element: p(t) = v(t)i(t) we find that the power associated with a , pR(t), is:

2 pR (t) = v(t)i(t) = [i(t)R]i(t) = Ri (t) or, equivalently: ⎡ v(t)⎤ v 2 (t) pR (t) = v(t)i(t) = v(t)⎢ ⎥ = ⎣ R ⎦ R where v(t) is the voltage drop across the resistor and i(t) is the current through the resistor; we have assumed that the positive reference arrow for current encounters the + sign of the voltage reference first

Note that pR(t) is always a positive quantity; hence resistors always absorb power from the remainder of the circuit (and subsequently convert it into heat); they can never act as a source of power At times it is useful to calculate the total amount of energy absorbed by an element We can calculate this energy by integrating power over time For example, the energy absorbed by a resistor from time t = 0 up to time t is given by the expressions: t t t 2 2 ER (t) = ∫ pR (t)dt = ∫ Ri (t)dt =R∫ i (t)dt 0 0 0 or t t t v2 (t) 1 E (t) = p (t)dt = dt = v2 (t)dt R ∫ R ∫ R R ∫ 0 0 0

In either case we see that ER(t) ≥ 0, confirming that resistors always dissipate energy 4.2 Power/Energy Relationships for Capacitors Capacitors are devices which store energy in the form of an electric field, set up by the separation of charges Inserting the current-voltage relationship for a capacitor into the general power relationship, we can express the instantaneous power being delivered to the capacitor as:

8 Topic 5 – Capacitor, Inductor and Transient Analysis

⎡ dv(t)⎤ pC (t) = v(t)i(t) = v(t)⎢C ⎥ ⎣ dt ⎦

Note that there is no restriction on the sign of v(t) or on the sign of dv(t)/dt; therefore pC(t) can be positive or negative; therefore, it is possible for power to flow in or out of the capacitor For a periodic voltage, the average power over a period is zero The amount of energy a capacitor can store is determined by integrating the power over time: t t dv(t) EC (t) = ∫ pC (t)dt = ∫ Cv(t) dt 0 0 dt This can be put into a more useful form by recognizing that the integrand can be written as Cvdv: v(t) v(t) 1 2 EC (t) = C ∫ v(t)dv(t) = Cv (t) v(0) 2 v(0) We further assume that the capacitor is initially uncharged (i.e., v(0) = 0) The final result is that the energy stored in a capacitor of value C with v volts across it is given by: 1 2 EC (t) = Cv (t) 2 Note that, although the instantaneous power associated with a capacitor can be either positive or negative, the energy stored in the capacitor is always a nonnegative quantity 4.3 Power/Energy Relationships for Inductors Inductors store energy in the form of a magnetic field We will derive an expression for the stored energy in an inductor as a function of current Inserting the current-voltage relationship for an inductor into the general power relationship, the instantaneous power being delivered to the inductor is: ⎡ di(t)⎤ pL (t) = i(t)v(t) = i(t)⎢L ⎥ ⎣ dt ⎦ As before, there is no restriction on the sign the value can take; therefore, it is possible for power to flow into or out of the inductor For a periodic current, the average power over a period is zero The energy stored in an inductor is found by integrating the inductor power over time: t t di(t) E L (t) = ∫ p(t)dt = ∫ Li(t) dt 0 0 dt The integrand can be written as L.i.di: i(t) i(t) 1 2 E L (t) = L ∫ i(t)di(t) = Li (t) i(0) 2 i(0) We further assume that the inductor has an initial current of zero; this gives the final result that the energy stored in an inductor of value L, with i amperes of current flowing through it is:

1 2 E L (t) = Li (t) 2

9 Topic 5 – Capacitor, Inductor and Transient Analysis

5 CONTINUITY OF CAPACITOR VOLTAGE AND INDUCTOR CURRENT 5.1 Capacitor voltage continuity An important function in circuit analysis is the step function:

where the stepped variable could be a voltage or a current Note that the gradient of the variable at the step is infinite The branch relationship for a capacitor is: dv(t) i(t) = C dt It follows that the voltage on a capacitor can not be a step function because this would imply an infinite capacitor current, which is physically impossible Hence, capacitor voltages must be continuous functions of time, such that the gradient is finite at all values of time The restriction on capacitor voltage in no way prevents discontinuities in capacitor current; capacitor current can change instantaneously and abruptly without restriction 5.2 Inductor current continuity The branch relationship for an inductor is: di(t) v(t) = L dt Hence, the inductor current must be a continuous function of time and cannot change instantaneously A discontinuity in inductor current would require an infinite amount of voltage which is not possible in actual circuits Although inductor currents must be continuous, inductor voltages can change instantaneously and abruptly without restriction 5.3 Forbidden Element Combinations We showed that the voltage of a capacitor must be a continuous function of time because otherwise the current would have to be be infinite Also the current of an inductor must be a continuous function of time because otherwise the voltage would have to be be infinite Thus another forbidden combination is a voltage source with a step or pulse waveform connected in parallel with a capacitor

v v C t

10 Topic 5 – Capacitor, Inductor and Transient Analysis

Likewise, a forbidden combination is a current source with a step or pulse waveform connected in series with an inductor

L i i

t

6 COMBINING REACTIVE CIRCUIT ELEMENTS 6.1 Elements in Series 6.1.1 Inductors Consider the series connection of two inductors shown:

Using KVL and the inductor current-voltage relationship, we can write:

v = v1 + v2 di di = L 1 + L 2 1 dt 2 dt

Since the currents in the two inductors are the same (i1 = i2 = i) it follows that the rates of change of the currents are also the same, di1/dt = di2/dt = di/dt: di di v = L + L 1 dt 2 dt di = (L1 + L2 ) dt

If we replace the two inductors by an equivalent single inductor Leq, we have: di v = L eq dt Hence,

Leq = L1 + L2 We can treat the series connection of two inductors as a single equivalent inductance, whose value is the sum of the Generalizing, we can replace n inductors in series with an equivalent inductance L equal to the sum of the n individual inductances:

Leq = L1 + L2 + ...+ Ln If all n inductors have the same value L:

Leq = nL Inductors connected in series may be loosely thought of as a single inductor with more turns Note that for inductors, as for resistors, the equivalent element value is always greater than any of the individual element values, assuming positive element values

11 Topic 5 – Capacitor, Inductor and Transient Analysis

6.1.2 Capacitors Consider the circuit shown:

Applying KVL, we find

v = v1 + v2 + v3 Differentiating this expression: dv dv dv dv = 1 + 2 + 3 dt dt dt dt The current-voltage relationship for a capacitor can be expressed as dv 1 = i dt C Apply this to each of the derivative terms: dv i i i = + + dt C1 C2 C3 Note that current i is the same for all capacitors Factoring out i yields: dv ⎛ 1 1 1 ⎞ = ⎜ + + ⎟ i dt ⎝ C1 C2 C3 ⎠

We replace the three series capacitors with an equivalent capacitance Ceq:

This circuit is described by: dv i = dt Ceq Hence: 1 1 1 1 = + + Ceq C1 C2 C3

12 Topic 5 – Capacitor, Inductor and Transient Analysis

For capacitors connected in series, the reciprocal of the equivalent capacitance Ceq is given by the sum of the reciprocals of the individual Generalising to n capacitors in series: 1 1 1 1 = + + ...+ Ceq C1 C2 Cn If all n capacitors have the same value C: 1 n = Ceq C C C = eq n Identical capacitors connected in series may be thought of as a single capacitor where the distance between the plates is the sum of the distances for the individual capacitors Note that the equivalent capacitance of series-connected capacitors is always less than any of the individual capacitors 6.2 Elements in Parallel 6.2.1 Capacitors Elements are in parallel when they are connected between the same two nodes Parallel elements therefore share the same voltage Consider the two-node circuit shown:

Three capacitors C1, C2 and C3 are all connected in parallel with the voltage source v Apply KCL:

i = i1 + i2 + i3 Substitute the current-voltage relationship for the capacitors: dv dv dv i = C + C + C 1 dt 2 dt 3 dt dv = (C1 + C2 + C3 ) dt dv = C eq dt 13

Topic 5 – Capacitor, Inductor and Transient Analysis

Note that since v is the same for all capacitors, dv/dt is also the same; Ceq is a single capacitor equivalent to the three connected in parallel: Hence:

Ceq = C1 + C2 + C3

Ceq is the sum of the individual parallel capacitances Generalizing for n capacitors in parallel: Ceq = C1 + C2 + ...+ Cn If all n capacitors have the same value C, then:

Ceq = nC Capacitors connected in parallel may be loosely thought of as a single capacitor with increased area Note that the equivalent capacitance of parallel-connected capacitors is always more than any of the individual capacitors 6.2.2 Inductors It is a straightforward exercise to show that the equivalent inductance of n inductors in parallel is found using the same rule as for resistors: 1 1 1 1 = + + ...+ Leq L1 L2 Ln If all n inductors have the same value L: 1 n = Leq L L L = eq n Note that the equivalent inductance of parallel-connected capacitors is always less than any of the individual inductors 6.3 ‘Virtually Parallel’ Capacitors We often encounter a configuration where two capacitors have one node in common, while each of the other nodes is held at a different constant voltage:

This arrangement is an approximate representation of the input of a CMOS :

14 Topic 5 – Capacitor, Inductor and Transient Analysis

Applying KCL at node where voltage is vC:

i = i1 + i2 Substitute current-voltage relationship for each capacitor: dv dv i = C 1 + C 2 1 dt 2 dt

The two branch voltages v1 and v2, can be related to the node voltages:

v1 = vC −VS v2 = vC − 0 = vC hence:

d d dvC dVS dvC i = C1 (vC − VS ) + C2 vC = C1 − C1 + C2 dt dt dt dt dt

Since VS is constant, its derivative is zero: d d i = C v + C v 1 dt C 2 dt C

dvC = (C1 + C2 ) dt

Equivalent capacitance Ceq is given by:

Ceq = C1 + C2 Hence, the series combination of a DC voltage source (value VS) and a capacitor (C1), is equivalent to the capacitor alone This is because the current in a capacitor depends on the rate of change of the voltage across it

Since VS is constant with time, the capacitor current is the same as if the capacitor was connected to ground instead The connection of these capacitors is referred to as ‘virtually parallel’ The equivalent capacitance is the same as if the two capacitors were actually in parallel

15 Topic 5 – Capacitor, Inductor and Transient Analysis

6.4 Summary of series and parallel element interconnection rules

Expression for v Expression for i Series Parallel 1 1 1 = v = Ri i = v Req = ∑Ri ∑ R Req Ri Resistor 1 1 1 v = i = G = G i = Gv G ∑ G eq ∑ i G eq i t di 1 2 1 1 = Inductor v = L i = ∫ v(x)dx + i(t1) Leq = ∑Li ∑ dt L Leq Li t1 Voltage v = V i = arbitrary V = V source s eq ∑ i × t 1 dv 1 1 = Capacitor v = ∫ i(x)dx + v(0) i = C ∑ Ceq = ∑Ci C dt Ceq Ci 0 Current v = arbitrary i = I I = I source s × eq ∑ i

6.5 DC steady state models for inductors and capacitors Consider a circuit containing inductors, capacitors and resistors, independent voltage and current sources and some switches. When a switch or some switches change state voltages and currents in the circuit will start to change but they will eventually settle down to the DC steady state values. The DC steady state solution my be found easily by setting d/dt in the inductor and capacitor v-i and i-v relation to zero:

i-v or v-i relation Relation for t → ∞ Description di Inductor v = L v = 0 Short-circuit dt dv Capacitor i = C i = 0 Open-circuit dt Thus we see that the DC steady state model for the inductor is a short-circuit and for the capacitor is an open-circuit. Hence steady state voltages and currents in a circuit may be obtained by replacing inductors by short-circuits and capacitors by open-circuits. We shall use this technique later when we apply transient analysis.

7 DELAY MODEL FOR THE LOGIC INVERTER 7.1 Delays in Logic Circuits Digital systems, including computers, are mainly composed of logic gates

16 Topic 5 – Capacitor, Inductor and Transient Analysis

Logic gates are circuits that implement logical functions of logic variables Logical variables take on one of two values, 0 and 1 There is an unavoidable delay between the time at which an input variable changes, from 0 to 1 or from 1 to 0, and the time at which the output responds It is the cumulative effect of these delays which limits the speed of computers and other digital systems Consider a logic circuit of 3 NAND gates with defined input signals A, B, C and D:

Suppose we were to change the value of input A from 0 to 1 The logic transitions E: 1 → 0 and G: 0 → 1 do not happen instantaneously with A: 0 →1

The time delay between logic transitions is called the transition time or gate delay Transition times limits the clock rate at which circuits containing logic gates can switch Hence, engineers seek to minimize logic transition times In designing a computer it is usual to treat logic signals as digital, with two discrete values we call logic low (0) and logic high (1) However, to understand the fundamental limitations on speed which are imposed by the physical circuit, we need to treat the logic transitions as continuous voltage transitions We could view the signals in a real computer with an oscilloscope, and we might observe the following:

17 Topic 5 – Capacitor, Inductor and Transient Analysis

Since we treat the signals as continuous functions of time, the switching instant is no longer precisely defined We now define what we mean by ‘transition time’ 7.2 Transition Time The most widely used type of logic gates are built using a semiconductor technology called CMOS CMOS stands for Complementary Metal Oxide Semiconductor; 5 V is common Any input voltage between 80% and 100% of the supply voltage (> 4 V and < 5 V) is recognized as logic high Any input voltage between 0% and 20% of the supply voltage (> 0 V and < 1 V) is recognized as logic low A logic transition will occur when the input voltage has increased above 4 V or fallen below 1 V

In this example, 4 V is referred to as the high voltage threshold (Vth) and 1 V is the low voltage threshold (Vtl)

The region between Vtl and Vth ( > 1 V and < 4 V) is logically undefined:

The transition time to go from logic low to logic high is called the rise time The transition time to go from logic high to logic low is called the fall time Our goal is to approximate the rise and fall times of a CMOS inverter, or NOT gate, using a circuit model.

18 Topic 5 – Capacitor, Inductor and Transient Analysis

7.3 Inside the CMOS Inverter The construction of a CMOS inverter is illustrated:

The arrow pointing upward is a connection to a DC voltage source, in this case 5 V with respect to the ground node, whose voltage is 0 V The ‘C’ in CMOS stands for ‘complementary’, which means using both N-type MOS transistors (NMOS in the figure) and P-type MOS transistors (PMOS in the figure) A highly simplified model of the operation of PMOS and NMOS transistors is shown:

Vth stands for Vt(high) and Vtl stands for Vt(low); Vt stands for V(threshold)

For example, if vin rises above Vth the two terminals on the right of the PMOS transistor behave as an open circuit, while the two terminals on the right of the NMOS transistor behave as a closed switch and vout = 0 V

If vin drops below Vth, nothing at all happens to the switches, until vin drops below Vtl; at that point the switch associated with the PMOS transistor closes, and the switch associated with the NMOS transistor opens and vout = 5 V

19 Topic 5 – Capacitor, Inductor and Transient Analysis

The switch models for the PMOS and NMOS transistors can be combined into a dual-switch model for the CMOS inverter:

The two switches move together and simultaneously whenever the input voltage crosses a threshold value Two key aspects of MOS transistors significantly limit the performance of integrated circuits MOS transistors do not behave as ideal switches The path between the two ‘switch contact’ terminals is not a perfect conductor and is better modelled by a resistance, typically of the order of 100 Ω This leads to the dual-resistor-switch model for the CMOS inverter

Separate output resistances Rp and Rn are assumed for the PMOS and NMOS transistors The other key non-ideal aspect of MOS transistors is input capacitance

We account for this effect by including in the inverter model capacitors Cp and Cn which represent the input capacitances of the PMOS and NMOS transistors, respectively:

20 Topic 5 – Capacitor, Inductor and Transient Analysis

Finally, the ganged dual-switch can actually be replaced with a single switch:

This CMOS inverter model operates as follows:

When input voltage vin rises above the high voltage threshold Vth, the switch moves down to position D

When vin falls below the low voltage threshold Vtl, the switch moves up to position U

Rp represents the resistance of the PMOS transistor, which pulls the output voltage Vout up to 5 V

Rn represents the resistance of the NMOS transistor, which, pulls the output voltage down to 0 V The simple circuit model is sufficient to explain many of the limitations of logic-circuit switching 7.4 Interconnected CMOS Inverters Most of the gates inside a computer are connected to other gates

21 Topic 5 – Capacitor, Inductor and Transient Analysis

Gate delay occurs due to the combination of the output resistance (Rp or Rn) of the first gate and the input capacitance (Cp and Cn) of the following gate:

The input stage of the first gate is not shown because there is no significant delay between its input voltage changing and the switch state changing Likewise, the output stage of the second gate is not shown because there is no significant delay between vc crossing the threshold voltage and its switch state changing Delay arises only at the interface between gates

When the switch state changes, the capacitor voltage vC can not change instantaneously The capacitances must be charged or discharged through the resistors tracing out a continuous function of time It is this continuous function of time which determines rise time and fall time which in turn determine delay and hence maximum clock rate. The circuit can be analyzed by considering the two possible switching events: (1) pull-down case when the switch moves down to position D

22 Topic 5 – Capacitor, Inductor and Transient Analysis

(2) pull-up case when the switch moves up to position U

The equivalent circuits to the right are obtained by recognizing that the two capacitors are in the ‘virtually parallel’ configuration and may be replaced by a single equivalent capacitor The two circuits contain one resistor and one capacitor Circuits that contain only resistors and capacitors, along with sources, are called RC-circuits Circuits containing only one capacitor, are known as first-order RC-circuits.

8 TRANSIENT ANALYSIS In circuits containing only resistors and DC voltage and current sources; the currents and voltages are constant with time When a circuit contains energy-storage elements such as a capacitance or inductance and switches the currents and voltages are functions of time To determine the current and voltages in our circuit, we will apply Kirchhoff's laws and the v-i relationships for the elements Consider the pull-down circuit:

Application of KCL at the vc node yields:

iR = iC Substitute the appropriate relations for the branch currents in terms of branch voltages:

0 − vC dvc = (Cn + C p ) Rn dt Rearranging:

dvc vC (Cn + C p ) = − dt Rn Consider the pull-up circuit:

23 Topic 5 – Capacitor, Inductor and Transient Analysis

We have:

iR = iC

5 − vC dvc = (Cn + C p ) Rp dt dvc vC 5 (Cn + C p ) = − + dt Rp Rp To simplify, we let C = Cn + Cp and R = Rn or Rp (as appropriate) Both the pull-down and pull-up equations can be expressed as the single equation: dvc 1 C = − (vc −Vs) dt R

Vs = 0 yields the pull-down case and Vs = 5 V yields the pull-up case Finally, we rearrange the general equation slightly: dv RC c + v = V dt c s This equation describes the series RC-circuit shown:

The equation we have to solve is a 1st order linear ordinary differential equation

. instead of an explicit expression for the variable, vc is expressed in terms of its derivatives (so it is a differential equation).

. only the first derivative of the variable vc is present (hence, 1st order); . there are no partial derivatives (therefore, an "ordinary" rather than a "partial" differential equation);

. variable vc occurs as a linear term, not as an argument of another function (hence, linear); We have taken the case where the switch is closed for both circuits; the equation is valid only for t > 0

9 DIFFERENTIAL EQUATION SOLUTION The solution involves separating the variables of the differential equation to each side of the equation to allow integration

Since we want to determine vc as a function of time, we denote it by vc(t)

24 Topic 5 – Capacitor, Inductor and Transient Analysis

We put all terms containing variable vc on the left and all terms containing variable t on the right:

dvc(t) RC = Vs − vc(t) dt RCdvc(t) = (Vs − vc(t))dt

dvc(t) dt = Vs − vc(t) RC

dvc(t) dt = − vc(t) −Vs RC Next we integrate both sides of this equation

dvc(t) 1 ∫ = − ∫ dt + C vc(t) −Vs RC C is an arbitrary constant of integration We need to use the standard result for integration: 1 dx = ln x + C ∫ x Carrying out the integration: 1 lnvc(t) −Vs = − t + C RC Write C as ln(C’) and rearrange: 1 lnvc(t) −Vs = − t + lnC' RC 1 lnvc(t) −Vs − lnC'= − t RC ⎛ ⎞ vc(t) −Vs 1 ln⎜ ⎟ = − t ⎝ C' ⎠ RC Take the exponential of both sides:

⎛ vc (t)−Vs ⎞ ln⎜ ⎟ 1 C' − t e ⎝ ⎠ = e RC The exponential and natural log are inverse functions:

eln x = x Therefore: 1 t vc(t) −Vs vc(t) −Vs − = = e RC C' C' where C’ takes care of the modulus Hence:

25 Topic 5 – Capacitor, Inductor and Transient Analysis

1 − t RC vc(t) = C'e + Vs We now determine the constant of integration C’

Denote the voltage vc(t) at the time when the switch closes (t = 0) by vc(0) = vc0: vc(0) = vc0 = C'+Vs

C'= vc0 −Vs Hence: 1 − t RC vc(t) = (vc0 −Vs)e + Vs Let us do some simple checks on this expression:

1) When t = 0, then vc(t) = vc0, as we specified; this is the initial voltage on the capacitor before the switch is closed; we can define it depending on the outcome of the previous switching operation

2) When t → ∞, then vc(t) → Vs, the source voltage

This makes sense because the capacitor can not continue to accumulate charge for ever when the source is constant with time; once it is charged, the rate of charge flow must fall to zero which implies the current is zero; since this current flows also in the resistor, the voltage drop across the resistor must fall to zero; this explains why vc(t) approaches Vs as t → ∞ The exponential term in our equation occurs commonly in transient analysis of circuits and is often written: t t − − e RC = e τ The variable τ is called the time constant

For a series RC-circuit τ = RC The time constant is a dividing factor on t and its value dictates how rapidly the voltage vc(t) reacts to the change in the switch position The larger τ is, the slower the response; the smaller τ is, the faster the response Using τ, the general RC circuit solution may be written: t − τ vc(t) = (vc0 −Vs)e + Vs

τ is independent of Vs and vc0 and describes the rate of decay of voltage for the RC circuit obtained with the switch in its closed state and Vs set to zero, ie Vs is replaced by a short-circuit The equation: 1 − t RC vc(t) = (vc0 −Vs)e + Vs is known as the total response of the circuit 26 Topic 5 – Capacitor, Inductor and Transient Analysis

It consists of two terms, of which one depends on t, and the other is independent of t: The first term of the general solution is called the transient response: 1 − t RC (vc0 −Vs)e Just after the switching event at t = 0, the transient response dominates the total response of the circuit The transient response of all first order circuits is a decaying exponential function The transient response decays to zero as t becomes large This can be seen by examining the limiting value of the transient term as t approaches infinity: 1 ⎡ − t⎤ RC limt→∞⎢( vc0 −Vs)e ⎥ = 0 ⎣⎢ ⎦⎥ The second part of the solution is called the DC steady-state response

In this example the DC steady-state response is equal to the value of the voltage source Vs The DC steady-state response is always given by:

limt→∞[vc(t)]

The notation vc(∞), or just vc∞, is used for DC steady-state capacitor voltage We now apply the solution to the 1st-order circuit to calculate the switching speed of cascaded digital inverters

10 CALCULATION OF MAXIMUM COMPUTER CLOCK RATE 10.1 Delays in logic inverters Using a 1st-order RC model of interconnected inverters, we see that the voltage at the input of the second inverter does not change instantaneously when the first inverter switches states In this section, we examine the waveforms at the input of the second inverter Consider first the inverter pull-down action In this case, the second inverter is being pulled down from logic high (5 V) to logic low (0 V):

The input capacitance of the second gate has been given the notation Cin (= Cp + Cn)

We have R = Rn and Vs = 0 Example 2.2 Determine the capacitor voltage as a function of time, given the circuit parameters:

Cin = Cp + Cn = 2 pF

27 Topic 5 – Capacitor, Inductor and Transient Analysis

Rn = 100 Ω

vc0 = 5 V The time constant is given by: -12 -10 τ = RnCin = 100 × 2 × 10 = 2 × 10 = 0.2 ns From the general solution: t − τ vc(t) = (vc0 −Vs)e + Vs For the pull-down switching action:

Vs = 0 V Hence: t − 2×10−10 vc(t) = (5 − 0)e + 0 t − −10 = 5e 2×10 vc(t) is now plotted The initial transient and the approach to the DC steady state solution can be clearly seen Note that vc(t) is very close to its DC steady state value around 1 ns, ie after 5 time constants

Now consider the inverter pull-up action

For this case, we have C = Cin = Cp + Cn, R = Rp, Vs = 5 V The following circuit models the pull-up case of the coupled inverter pair

28 Topic 5 – Capacitor, Inductor and Transient Analysis

Example 2.3 The circuit parameters are:

Cin = 2 pF

Rp = 75 Ω

Vc0 = 1 V The time constant is given by: -12 -10 τ = RpCin = 75 × 2 × 10 = 1.5 × 10 = 0.15 ns

From the general solution, with Vs = 5 V: t − 0.15×10−10 vc(t) = (1− 5)e + 5 t − −10 = −4e 0.15×10 + 5 This equation is plotted below:

Note that at t = 0 vc(t) is 1 V (5 V – 4 V) The capacitor voltage has nearly reached the DC steady-state value (5 V in this case) after 5τ (0.75 ns). In both pull-down and pull-up case it would take an infinite amount of time for the capacitor voltage to reach the DC steady-state value

29 Topic 5 – Capacitor, Inductor and Transient Analysis

We observe, though, that there is little change after a period of approximately 5τ However, it is not necessary for the voltage to completely reach the steady-state value before the next inverter switches

The important parameters involved in gate switching are the threshold voltages: Vth (for the pull-up) and Vtl (for the pull-down) The gate delay is defined by the time it takes for the voltage to reach the appropriate threshold voltage, which is typically much shorter than 5τ in a well-designed system

For example, if Vth = 4 V, the second inverter would switch well before 2τ, ie 0.3 ns

10.2 Maximum Inverter-Pair Switching Speed

We can now calculate the maximum at which a pair of cascaded CMOS inverter gates can be switched We assume that the switch inside the driving inverter changes state at frequency f When frequency f is too high, the next inverter fails to recognise that a changed state has been reached and fails to switch

Our task is to determine the frequency f = fmax at which this occurs

The voltage at the output of the switch inside the driving inverter (Vs in our equivalent circuit) can be assumed to take the form of a square wave, which is typical of signals generated by clock circuitry in computers We assume that the clock is symmetric, spending an equal amount of time at logic high and logic low The ratio of time at the high level to the period expressed as a percentage is called the duty cycle The symmetric clock signals we will deal with have a 50% duty cycle

30 Topic 5 – Capacitor, Inductor and Transient Analysis

In order to calculate the maximum switching frequency, we first assume that the initial conditions for the capacitor voltage (vc0) are either 0 V (logic low) or 5 V (logic high) We will assume the following:

Vth = 3.7 V (therefore vc is logic high if 3.7 ≤ vc ≤ 5)

Vtl = 1 V (therefore vc is logic low if 0 ≤ vc ≤ 1)

Rn = 100 Ω

Rp = 150 Ω

Cin = Cn + Cp = 1 pF We now calculate the transition time for the input voltage of the second inverter to go from 0 V to Vth (pull-up case) and the transition time from 5 V to Vtl (pull-down case) Once this voltage has reached a threshold value, the load inverter will switch, resulting in a forward propagation of the logic signal If the voltage was to switch before threshold had been reached, the logic signal would not trigger the next inverter 10.3 Pull-Up Transition Time The circuit model and the voltage across the capacitor are as follows:

We determine the transition time tl, defined as the time required for vc rise from 0 V to Vth vc is given by: 31 Topic 5 – Capacitor, Inductor and Transient Analysis

t − τ vc(t) = (vc0 −Vs)e + Vs Substituting the given values yields: t 1.5×102 ×10−12 vc(t) = (0 − 5)e + 5 t − −10 = 5 − 5e 1.5×10

At time t = tl the capacitor voltage is at the logic high threshold ∴ vc(t1) = Vth = 3.7 t − 1 −10 3.7 = 5 − 5e 1.5×10

Solving for t1: t − 1 −10 −1.3 = −5e 1.5×10 t − 1 1.3 −10 = e 1.5×10 5 ⎛ 1.3⎞ t ln⎜ ⎟ = − 1 ⎝ 5 ⎠ 1.5 ×10−10 10 ⎛ 1.3⎞ 9 t = −1.5 ×10− × ln⎜ ⎟ = 0.202 ×10− = 0.202ns 1 ⎝ 5 ⎠ It requires 0.202 ns for the inverter to switch from 0 V to the logic high threshold of 3.7 V 10.4 Pull-Down Transition Time The circuit model and the voltage across the capacitor at the input of the second inverter are as follows:

We determine the transition time t2, for vc to fall from 5 V to Vtl From the general solution, we have: t t − 102 ×10−12 10−10 vc(t) = (5 − 0)e + 0 = 5e

32 Topic 5 – Capacitor, Inductor and Transient Analysis

At time t = t2 the capacitor voltage is at the logic low threshold ∴ vc(t2) = Vtl = 1 t − 2 −10 1= 5e 10

Solving for t2: t − 2 1 −10 = e 10 5 ⎛ 1⎞ t ln⎜ ⎟ = − 2 ⎝ 5⎠ 10−10

10 ⎛ 1⎞ 9 t = −10− × ln⎜ ⎟ = 0.161×10− = 0.161ns 2 ⎝ 5⎠ It requires 0.161 ns for the inverter to switch from 5 V to the logic low threshold of 1 V 10.5 Maximum clock rate The pull-up transition time, 0.202 ns, is greater than the pull-down transition time of 0.161 ns In designing a digital system we should allow for the worst case and make the clock period at least twice the longer delay:

T0 = 2t1 = 2 × 0.202 ns = 0.404 ns The clock frequency is equal to the reciprocal of the period; this determines the maximum clock frequency: 1 f = = 2.48 ×109 = 2.48GHz max 0.404 ×10−9 This calculated maximum clock frequency is only an approximation of the coupled inverter pair's true operating limit as we have used many simplifying assumptions

These include a linear circuit model for the inverters and the assumption that the critical vc transitions started from initial conditions of 0 V and 5 V In practice, the initial condition voltage on the capacitor would be the result of the previous transition As a result, the following waveforms are more likely:

On the positive transition, vc passes the Vth by a reasonable margin reaching a maximum of vh

On the negative transition, vc passes the Vtl by a reasonable margin reaching a minimum of vl

33 Topic 5 – Capacitor, Inductor and Transient Analysis

The equations we have developed can be applied to this case also and typically lead to maximum clock rates about 10 % higher than figures produced under the previous assumptions

11 GENERAL RESULT FOR 1ST ORDER RC CIRCUIT The general pull-up/pull-down circuit is:

The general equation for the capacitor voltage we have derived is as follows:: t − τ vc(t) = (vc0 −Vs)e + Vs where vc0 is the initial condition voltage on the capacitor at t = 0

Since for t → ∞ , vc(t) → Vs, the equation may be written t − τ vc(t) = (vc0 − vc∞)e + vc∞ t − τ = vc∞ − (vc∞ − vc0)e t − = Final value – (Range) × e τ where vc(t → ∞) is abbreviated to vc∞:

-t/τ When t = 0, e = 1 and vc(t) = vc0 -t/τ When t → ∞ , e → 0 and vc(t) → vc∞ The equation may be written in the alternative form: t ⎛ − ⎞ v t = v + v − v ⎜1 − e τ ⎟ c( ) c0 ( c∞ c0)⎜ ⎟ ⎝ ⎠ t ⎛ − ⎞ = Initial value +(Range) ×⎜1 − e τ ⎟ ⎜ ⎟ ⎝ ⎠

-t/τ When t = 0, 1 – e = 0 and vc(t) = vc0

-t/τ When t → ∞ , 1 – e → 1 and vc(t) → vc ∞ We can find the slope of vc(t) by differentiating: t − τ vc(t) = vc∞ − (vc∞ − vc0)e t dvc(t) v − v − = c∞ c0 e τ dt τ The initial slope is obtained by setting t = 0:

34 Topic 5 – Capacitor, Inductor and Transient Analysis

dvc(t) v − v = c∞ c0 dt t=0 τ

It follows that if we extrapolate the initial slope with a straight line from vc0 it reaches vc∞ at t = τ:

vc0 > vc vc0 < vc ∞ ∞

The initial slope of vc(t) can also be derived from the circuit:

The capacitor is described by: dv i = C c c dt dv 1 c = i dt c C ic at t=0 depends on the voltage across the resistor at t =0 which is Vs – vc0 = vc∞ – vc0 This predicts an initial gradient for the capacitor voltage of: dv v − v 1 v − v c = c∞ c0 = c∞ c0 dt R C τ which agrees with the result derived above

As vc changes with time from its initial value of vc0 towards vc∞, the resistor current reduces until it eventually falls to zero when vc = Vs = vc∞; as ic falls, dvc/dt reduces accordingly eventually reaching zero at the DC steady state condition

We can evaluate the change in vc from its starting point vc0 and the difference between vc and the end point vc∞:

35 Topic 5 – Capacitor, Inductor and Transient Analysis

t ⎛ − ⎞ v t − v = ⎜1 − e τ ⎟ v − v c( ) c0 ⎜ ⎟( c∞ c0) ⎝ ⎠ t − τ vc∞ − vc(t) = e (vc∞ − vc0)

-t/τ -t/τ (1 – e ) and e are the fractions of the range (vc∞ – vc0) that have been traversed and remain to be traversed at any time Microsoft Excel is a useful means of evaluating these parameters for some key time instants: t/T 1-exp(-t/T) exp(-t/T) 0 0.0000 1.0000 1 0.6321 0.3679 2 0.8647 0.1353 3 0.9502 0.0498 4 0.9817 0.0183 5 0.9933 0.0067

... and also for plotting graphs of functions:

Exponential Curves 1-exp(-t/T), exp(-t/T) 1.0

0.8

0.6

1-exp(-t/T) 0.4 exp(-t/T)

0.2

0.0 0 1 2 3 4 5 t/T

12 GENERALISATION TO ALL 1ST ORDER RC AND RL CIRCUITS 12.1 Alternative output variables We have determined an expression for capacitor voltage in the simple RC-switch circuit:

36 Topic 5 – Capacitor, Inductor and Transient Analysis

We found that the capacitor voltage could be written in two forms: t t ⎛ − ⎞ − v t = v + v − v ⎜1 − e τ ⎟ = v − v − v e τ c( ) c0 ( c∞ c0)⎜ ⎟ c∞ ( c∞ c0) ⎝ ⎠ where vc∞ = Vs We now determine expressions for the capacitor and resistor current and for the resistor voltage: The capacitor and resistor current are the same and are given by: ⎡ t ⎤ t V v t − − s − c( ) Vs 1 τ Vs − vc0 τ i(t) = = − ⎢V s − (Vs − vc0)e ⎥ = e R R R R ⎣⎢ ⎦⎥ The resistor voltage can be written: t t ⎡ − ⎤ − τ τ vR (t) = Vs − vc(t) = Vs −⎢V s − (Vs − vc0)e ⎥ = (Vs − vc0)e ⎣⎢ ⎦⎥ The resistor voltage may be expressed in the form: t − τ vR (t) = vR∞ − (vR∞ − vR0)e where:

vR0 = Vs − vc0 vR∞ = 0 Clearly the voltage across the resistor is Vs – vc0 when the switch closes and decays to zero as t → ∞ The capacitor and resistor current may be expressed in the form: t − τ i(t) = i∞ − (i∞ − i0)e where: V − v i = s c0 i = 0 0 R ∞

Clearly the current is given by (Vs – vc0)/R when the switch closes and decays to zero as t → ∞ These considerations lead us to the conclusion that the previous expressions for capacitor voltage may be generalised to describe the voltage or the current associated with any element in the circuit: t t ⎛ − ⎞ − x t = x + x − x ⎜1 − e τ ⎟ = x − x − x e τ k ( ) k0 ( k∞ k0)⎜ ⎟ k∞ ( k∞ k0) ⎝ ⎠ where k represents an element (R or C) and x represents any branch voltage or branch current

37 Topic 5 – Capacitor, Inductor and Transient Analysis

Once k and x are chosen, it is only necessary to determine by inspection the values of xk at t = 0+ and for t → ∞ and the time constant τ in order to write down the expression for xk(t) If the resistor and capacitor in the circuit are interchanged, the voltages and currents associated with the elements do not change Infact, this approach is valid for any RC circuit topology with a single time constant It also applies to any RL circuit with a single time constant; in this case, the initial condition would be an inductor current rather than a capacitor voltage and the time constant is given by τ = L/R We now consider the case of circuits where there is more that one resistor or capacitor

13 CIRCUITS WITH MORE THAN ONE RESISTOR OR CAPACITOR For an RC circuit to be 1st order, it must be such that the resistors and capacitors may be combined using the rules for parallel and series connection into a single equivalent resistor and single equivalent capacitor defining a single time constant τ = ReqCeq

One has only to determine the values of vc(0), vc(∞), and τ and insert them into the standard equation Consider the RC circuit shown:

The parameters of the equation are determined as follows: vc0 vc0 is simply the initial voltage across the capacitor at t = 0 before the switch is closed vc∞ vc∞ is the DC steady state voltage of the capacitor; it is obtained by replacing the capacitor by an open-circuit; the result is a resistive potential divider connected to voltage source Vs:

R2 vc∞ = Vs R1 + R2 τ τ describes the decay of signals within the circuit in the absence of any source To calculate the time-constant, we consider the switch closed and voltage source Vs set to zero turning it into a short-circuit; the effect of this in this circuit is to connect R1 and R2 in parallel:

R1R2 Req = R1 + R2

There is only one capacitor so Ceq = C; hence:

R1R2 τ = ReqCeq = C R1 + R2

38 Topic 5 – Capacitor, Inductor and Transient Analysis

The capacitor voltage in this circuit is given by substituting these expressions into the general equation:

t(R1+R2 ) ⎛ ⎞ − R2 R2 R1R2C vc (t) = Vs − ⎜ Vs − vc0 ⎟ e R2 + R1 ⎝ R2 + R1 ⎠ If there is more than one switch in the circuit and they close at different times, then the method is used to find the capacitor voltage when the second switch changes state; this can be used as the initial condition for the next switching action and so on 13.1 Worked examples

Example A) In the circuit below, the switch closes at t = 0. vc(0) = 100 V. Find vc(t) and i(t) for t > 0.

vc(t) and i(t) are given by: t t − − τ τ vc(t) = vc∞ − (vc∞ − vc0)e i(t) = i∞ − (i∞ − i0)e vc0 is given as 100 V

When t → ∞, the current in the 16 Ω resistor falls to zero; hence vc∞ = v∞: 60 vc = 300 = 180 V ∞ 60 + 40

We now know vc0 and vc∞. Let us find io and i∞:

We can find i0 from v0; v0 is found by applying KCL to the middle node for t = 0+: v − 300 v v − 100 0 + 0 + 0 = 0 40 60 16 v0 = 132 V Therefore: v 132 i = 0 = = 2.2 A 0 60 60 v 180 i = ∞ = = 3 A ∞ 60 60 Finally, to determine the time constant, we close the switch and short-circuit the voltage source Hence:

Req = 16 + 40 || 60 40 × 60 = 16 + 40 + 60 = 40 Ω

39 Topic 5 – Capacitor, Inductor and Transient Analysis

τ = CReq = 2.5 ×10−3 × 40 = 0.1s

Hence, vc(t) and i(t) are given by the following: v t =180 − 180 −100 e−10t =180 − 80e−10t c( ) ( ) i(t) = 3− (3− 2.2)e−10t = 3− 0.8e−10t Example B) In the circuit below, the switch is left for a long time in position 1 and then thrown to position 2 at time t = 0 Determine an expression for current i(t)

i(t) for t > 0 is given by: −t τ i(t) = i∞ − [i∞ − i0 ]e i0 is established by the position 1 configuration of the circuit For DC steady state conditions, the inductor becomes a short circuit: 50 i0 = = 5 A 4 + 6 i∞ is established by the position 2 configuration of the circuit; again the inductor becomes a short circuit:

20 i = = 1 A ∞ 14 + 6 The time constant (for position 2 configuration) is given by:

Leq 4 τ = = = 0.2 s Req 14 + 6 Hence, we have: i(t) = 1− [1− 5]e−t 0.2 = 1+ 4e−5t A We can see that the currents are predicted correctly for t = 0 and for t → ∞

14 CONCLUSIONS We have considered the transient analysis of 1st order RC and RL circuits with DC sources and switches.

40 Topic 5 – Capacitor, Inductor and Transient Analysis

All voltages and currents in such circuits are exponential functions of time governed by RC or L/R time constants. The coefficients in the equations depend on the initial and final values of a voltage or current. Next we consider analysis of circuits with voltages and currents which are sinusoidal functions of time.

41