100% found this document useful (3 votes)
864 views21 pages

Sol 2

The document discusses modeling power supply noise in integrated circuits. It provides an example circuit with a current source representing circuit current consumption, resistor for supply and wiring resistance, and capacitor added to minimize noise on the supply voltage. It asks to sketch the supply voltage over time for different capacitor values, and derives expressions to calculate the voltage for piecewise constant current sections.

Uploaded by

Candice Xie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
864 views21 pages

Sol 2

The document discusses modeling power supply noise in integrated circuits. It provides an example circuit with a current source representing circuit current consumption, resistor for supply and wiring resistance, and capacitor added to minimize noise on the supply voltage. It asks to sketch the supply voltage over time for different capacitor values, and derives expressions to calculate the voltage for piecewise constant current sections.

Uploaded by

Candice Xie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Homework 2 @ 2019-09-17 [Link]-07:00 1

EECS 16B Designing Information Devices and Systems II


Fall 2019 UC Berkeley Homework 2
This homework is due on Monday, September 16, 2019, at 11:59PM.
Self-grades are due on Wednesday, September 18, 2019, at 11:59PM.

1. IC Power Supply
Digital integrated circuits (ICs) often have very non-uniform current requirements which can cause voltage
noise on the supply lines. If one IC is adding a lot of noise to the supply line, it can affect the performance
of other ICs that use the same power supply, which can hinder performance of the entire device. For this
reason, it is important to take measures to mitigate, or “smooth out”, the power supply noise that each IC
creates. A common way of doing this is to add a “supply capacitor” between each IC and the power supply.
(If you look at a circuit board, and the supply capacitor is the small capacitor next to each IC.)
Here’s a simple model for a power supply and digital circuit:

The current source is modeling the “spiky,” non-uniform nature of digital circuit current consumption. ‘The
resistor represents the sum of the source resistance of the supply and any wiring resistance between the
supply and the load.
The capacitor is added to try to minimize the noise on VDD . Assuming that Vs = 3V, R = 1Ω, i0 = 1A,
T = 10ns, and t p = 1ns,

(a) Sketch the voltage VDD vs. time for one or two periods T assuming that C = 0.
Solution:
If C = 0, then this circuit will respond instantaneously to changes in the current; thus we may break this
down into two segments, wherein the current source IIC (t) equals 0 (and thus Vdd = Vs ), and where the
current source IIC (t) equals i0 (and thus Vdd = Vs − i0 R = 2V). These will follow the current source’s
flips precisely. With that in mind, your sketch should look something like this:

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 1
Homework 2 @ 2019-09-17 [Link]-07:00 2

Sketch of transient current drawn by IC


1.5

IIC (t) (A) 1


0.5
0
−0.5
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
t (ns)
Sketch of transient IC supply voltage
3.5
VDD (t) (V)

3
2.5
2
1.5
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
t (ns)

In the above sketch, we have the first current spike at t = 10 ns. Yours doesn’t have to align with that:
for example, if you had the first current spike at t = 0, that’s okay. However, what does matter is that
you have the timing between the current spikes drawn correctly.
(b) Give expressions for and sketch the voltage VDD vs. time for one or two periods T for each of three
different capacitor values for C: 1pF , 1nF, 1µF. (1pF = 10−12 F, 1nF = 10−9 F, 1µF = 10−6 F)
Solution:
Since the current through the source is a series of pulses, it will be easiest if we solve for Vdd (t)
assuming a piecewise constant IC . Starting with KVL:

VS = VR +Vdd (1)
d
VS = (IC +C Vdd )R +Vdd (2)
dt
d 1
Vdd = (VS − RIC −Vdd ) (3)
dt RC
Where IC is the piecewise constant value of the current flowing through the digital circuit. At this point
we can use substitution with Ve = (VS − RIC −Vdd ).

de d
V = − Vdd (4)
dt dt
d Ve
Vdd = (5)
dt RC
de Ve
V =− (6)
dt RC
t
− RC
V (t) = Ae
e (7)

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 2
Homework 2 @ 2019-09-17 [Link]-07:00 3

Substituting back to solve for Vdd (t) we get the following general expression for the voltage during
any one piecewise constant time slice:
t
Vdd (t) = VS − RIC − Ae− RC (8)

From here, based on the value of the piecewise current IC and the initial conditions imposed by previous
time segments we can simplify the Vdd expression and solve for A. At the start, we will assume a
convenient initial condition which corresponds with the behavior of Vdd if IC = 0 for a long time
before t = 0. In this case, Vdd = VS and there is zero current flowing through the circuit. Things get
exciting once the first current pulse starts such that IC = i0 . The initial condition for this piecewise
section is the final voltage Vdd from the previous section, VS .

VS = VS − Ri0 − Ae0 (9)


A = −Ri0 (10)
t
− RC
Vdd (t) = VS − Ri0 (1 − e ) (11)

You can compute the voltage at the end of the pulse by plugging in t = t p and the R and C values
for your scenario. This voltage will serve as the initial condition for the next piecewise constant
section. The process of simplifying the general piecewise differential equation and solving for A can
be performed repeatedly to determine the shape of the plot for further pulses.
In general: each of the three curves will tend towards a final value Vdd = Vs , growing exponentially
slower towards this goal as time progresses. However, on each time interval t p , the current source will
start drawing charge from both Vs –whose current decreases as time proceeds–and C–whose charge,
and therefore whose potential to contribute voltage, tends to increase with time. With each t p , Vdd
decreases nonlinearly, as there are both exponential and linear factors contributing to the rise and fall
of the voltage.

With a lower capacitance, we will see the capacitor charge and discharge faster with time–this means
that Vdd will fluctuate more/change more drastically on t p ; as you increase capacitance, this fluctuation
is less evident, as C has more charge to pull from, and will thus be less affected by the change of charge
incurred by the current source.
The final sketches should look something like this:

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 3
Homework 2 @ 2019-09-17 [Link]-07:00 4

Sketch of transient current drawn by IC


1.5

IIC (t) (A) 1


0.5
0
−0.5
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
t (ns)
VDD (t) with 1 pF capacitor
3.5
VDD (t) (V)

3
2.5
2
1.5
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
t (ns)
VDD (t) with 1 nF capacitor
3.5
VDD (t) (V)

3
2.5
2
1.5
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
t (ns)
VDD (t) with 1 µF capacitor
3.5
VDD (t) (V)

3
2.5
2
1.5
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
t (ns)

Note that if your solutions contain just the correct plots without much verbose, textual explanation of
the plots, then you still deserve full credit.
The idea here is to see the effect that the capacitors have on VDD (t) when viewed at the time scale of
the current spikes.
• the 1 pF capacitor causes the RC circuit to have a time constant of τ = RC = 1ps, that is 1picosecond =
10−12 seconds, and the effect that this has on VDD (t) is invisible at the nanosecond time scale. For
this reason, we can conclude that the 1 pF capacitor would not be adequate to mitigate the noise
that the IC will put on the power supply.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 4
Homework 2 @ 2019-09-17 [Link]-07:00 5

• the 1 nF capacitor causes the RC circuit to have a time constant of τ = RC = 1ns. This is a long
enough time scale that the effect on VDD (t) will be visible. At the end of the 1 ns current spike,
VDD (t) will have dropped from 3 V to 2 + exp(−1) ≈ 2.37 V. This means that the 1 nF capacitor
is actually reducing the power supply noise a little bit, but not much.
• the 1 µF capacitor causes the RC circuit to have a time constant of τ = RC = 1µs. This time
constant is 1000 times longer than the duration of the current spike. At the end of the current
spike, VDD (t) will have dropped by only one millivolt, so at the scale at which these sketches
are drawn, there is no visible change. The 1 µF capacitor has almost totally removed the power
supply noise.
(c) Launch the attached Jupyter notebook to interact with a simulated version of this IC power supply. Try
to simulate the scenarios outlined in the previous parts. For one of these scenarios, keep the RC time
constant fixed, but vary the relative value of R vs. C (e.g. compare R = 1,C = 2e − 9 to the case where
R = 2,C = 1e − 9). Is it better to have a lower R or lower C value for a fixed RC time constant
when attempting to minimize supply noise? Give an intuitive explanation for why this might be
the case.
Solution: A lower resistance and higher capacitance leads to smaller variation in the supply voltage
with each current spike. One intuitive way to see this is to think about where the charge comes from
whenenver the current source turns on. The charge comes from the capacitor and from the voltage
source through the resistor. By Q = CV for a constant amount of charge drawn, a larger capacitor
results in lower voltage change. By V = IR for a constant amount of current drawn through the resistor,
a larger resistor leads to a larger voltage drop.
In the case where R = 1 and C = 2e − 9, we get the following plot:

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 5
Homework 2 @ 2019-09-17 [Link]-07:00 6

In the case where R = 2 and C = 1e − 9, we get the following plot:

Notice that the shape of the Vdd curves is the same becuase the RC constant is the same. However they
drop to different voltages by the end of each pulse.

2. Simple scalar differential equations driven by an input


In class, you learned that the solution for t ≥ 0 to the simple scalar first-order differential equation
d
x(t) = λ x(t) (12)
dt
with initial condition
x(t = 0) = x0 (13)
is given for t ≥ 0 by
x(t) = x0 eλt . (14)
In an earlier homework, you proved that these solutions are unique– that is, that x(t) of the form in (14) are
the only possible solutions to the equation (12) with the specified initial condition (13).
In this question, we will extend our understanding to differential equations with inputs.
In particular, the scalar differential equation
d
x(t) = λ x(t) + u(t) (15)
dt
where u(t) is a known function of time from t = 0 onwards.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 6
Homework 2 @ 2019-09-17 [Link]-07:00 7

(a) Suppose that you are given an xg (t) that satisfies both (13) and (15) for t ≥ 0.
Show that if y(t) also satisfies (13) and (15) for t ≥ 0, then it must be that y(t) = xg (t) for all t ≥ 0.
(HINT: You already used ratios in an earlier HW to prove that two things were necessarily equal. This
time, you might want to use differences. Be sure to leverage what you already proved earlier instead
of having to redo all that work.)
Solution: We had already used ratios in the earlier homework, and so the natural thing to look at is
the difference. Consider z(t) = y(t) − xg (t). We know that

z(0) = y(0) − xg (0) (16)


= x0 − x0 (17)
= 0. (18)

Furthermore,
d d d
z(t) = y(t) − xg (t) (19)
dt dt dt
= λ y(t) + u(t) − (λ xg (t) + u(t)) (20)
= λ (y(t) − xg (t)) + (u(t) − u(t)) (21)
= λ z(t) (22)

By (22) and (18), we know that z(t) satisfies the exact conditions for which we proved uniqueness
in an earlier homework. (This is why we cared so much about getting the zero initial condition case
correct without handwaving.) So we know that z(t) = 0eλt = 0 for all t ≥ 0.
This means that y(t) − xg (t) = 0 and hence y(t) = xg (t). This successfully proves the uniqueness of
solutions to simple scalar differential equations with inputs.
(b) Suppose that the given u(t) starts at t = 0 (it is zero before that) and is a nicely integrable function
(feel free to assume bounded and continuously differentiably with bounded derivative — whatever
conditions you assumed in your calculus course when considering integration and the fundamental
theorem of calculus). Let Z t
xc (t) = x0 eλt + u(τ)eλ (t−τ) dτ (23)
0
for t ≥ 0.
Show that the xc (t) defined in (23) indeed satisfies (15) and (13).
Note: the τ here in (23) is just a dummy variable of integration. We could have used any letter for that
local variable. We just used τ because it visually reminds us of t while also looking different. If you
think they look too similar in your handwriting, feel free to change the dummy variable of integration
to another symbol of your choice.
(HINT: Remember the fundamental theorem of calculus that you proved in your calculus class and
manipulate the expression in (23) to get it into a form where you can apply it along with other basic
calculus rules.)
Solution:
Checking (13) just involves plugging in t = 0 into (23).
Z 0
0
xc (0) = x0 e + u(τ)eλ (0−τ) dτ = x0 + 0 = x0 . (24)
0
The real action is in checking that this satisfies the differential equation with the given input. To do this,
there are many approaches. One would be to use the big hammer of the full Fundamental Theorem of

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 7
Homework 2 @ 2019-09-17 [Link]-07:00 8

Calculus in Leibniz form. However, in this case, we can do this in a simpler way by first simplifying
the integral by pulling out factors that do not vary with the variable of integration. Notice that:
Z t
xc (t) = x0 eλt + u(τ)eλ (t−τ) dτ (25)
0
Z t
= x0 eλt + eλt u(τ)e−λ τ dτ. (26)
0

Taking a derivative we have:


d
Z t d
Z t
xc (t) = λ x0 eλt + λ eλt u(τ)e−λ τ dτ + eλt u(τ)e−λ τ dτ (27)
dt 0 dt 0
Z t
λt d −λ τ
= λ xc (t) + e u(τ)e dτ (28)
dt 0
= λ xc (t) + eλt u(t)e−λt (29)
= λ xc (t) + u(t) (30)
where we used the product rule in (27) and the basic fundamental theorem of calculus in (29).
Because we have checked that the solution satisfies the conditions of the differential equation, and we
have shown uniqueness in the previous part, we know that this must be the only solution.
The discussion and the supported course notes show how an argument building from approximating
by piecewise constant functions and then Reimann integration lets you naturally guess this form of the
solution. But we thought that this HW was already too long to include redoing that part here. It is
important to prove that it works however, so that is what you did.
(c) Use the previous part to get an explicit expression for xc (t) for t ≥ 0 when u(t) = est for some
constant s, when s 6= λ and t ≥ 0.
Solution: In this part we are given input u(t) = est . We have to solve a differential equation of the
form:
d
x(t) = λ x(t) + est (31)
dt
In the previous part we were given equation (23) to solve for xc (t) for t ≥ 0, for a nonhomogeneous
ode of the form (15) with any input u(t).
Plugging into equation (23) we get:
Z t
xc (t) = x0 eλt + esτ eλ (t−τ) dτ (32)
0
Z t
= x0 eλt + eλt eτ(s−λ ) dτ (33)
0
h 1 iτ=t
= x0 eλt + eλt e(s−λ )τ (34)
s−λ τ=0
h 1 1 (s−λ )0 i
λt λt (s−λ )t
= x0 e + e e − e (35)
s−λ s−λ
h 1 1 i
= x0 eλt + eλt e(s−λ )t − (36)
s−λ s−λ
1 1
= x0 eλt + eλt e(s−λ )t − eλt (37)
s−λ s−λ
1 1
= x0 eλt + est − eλt (38)
s−λ s−λ
1 est
= (x0 − )eλt + (39)
s−λ s−λ

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 8
Homework 2 @ 2019-09-17 [Link]-07:00 9

1 e st
Thus we get xc (t) = (x0 − s−λ )eλt + s−λ .
(d) Similarly, what is xc (t) for t ≥ 0 when u(t) = eλt for t ≥ 0.
(HINT: Don’t worry if this seems too easy.)
Solution:
Similar to the previous part here we are given another exponential est as an input. However here s = λ .
Just like the previous part we will proceed by plugging our new input into (15):

Z t
xc (t) = x0 e + λt
eλ τ eλ (t−τ) dτ (40)
0
Z t
= x0 eλt + eλt eτ(λ −λ ) dτ (41)
0
Z t
= x0 eλt + eλt 1dτ (42)
0
h iτ=t
= x0 eλt + eλt τ (43)
τ=0
= x0 eλt + teλt (44)

Thus we get xc (t) = x0 eλt + teλt .


This basic pattern can be continued. We can plug in teλt as an input and get further polynomials in t
multiplying the same exponential.

3. Uniqueness Counterexample
This problem explores an example of a differential equation that does not have a unique solution. The
purpose is to show that uniqueness cannot always be assumed. There is a reason we are making you prove
uniqueness to trust solutions.
Along the way, this problem will also show you a heuristic way to guess the solutions to differential equa-
tions that is often called “separation of variables.” The advantage of the separation of variables technique
is that it can often be helpful in systematically coming up with guesses for nonlinear differential equations.
However, as with any technique for guessing, it is not a proof and the guess definitely needs to be checked
and uniqueness verified before proceeding.
The idea of separation-of-variables is to pretend that dtd x(t) = dx
dt is a ratio of quantities rather than what
it is — a shorthand for taking the derivative of the function x(·) with respect to its single argument, and
then writing the result in terms of the free variable “t” for that argument. This little bit of make-believe
(sometimes euphemistically called “an abuse of notation”) allows one the freedom to do calculations.
d
To demonstrate, let’s do this for a case where we know the correct solution: dt x(t) = λ x(t). This is how a

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 9
Homework 2 @ 2019-09-17 [Link]-07:00 10

separation-of-variables approach would try to get a guess:


d
x(t) = λ x(t) (45)
dt
dx
= λx (46)
dt
dx
= λ dt separating variables to sides (47)
x
dx
Z Z
= λ dt integrating both sides (48)
x
ln x +C1 = λt +C2 (49)
x = Keλt exponentiating both sides and folding constants (50)

With the above guess obtained, x(t) = Keλt can be plugged in and seen to solve the original differential
equation because the steps above are vaguely reversible, if a bit hallucinatory in nature. Then of course, a
uniqueness proof is required, but you did that in the previous homework.
To see why this technique is a bit fraught, we will consider the following nonlinear differential equation
involving a third root. (If we had more time in making this problem, we would have showed you how this
sort of differential equation can arise from a toy physical setting of a inverted pyramidal container that had
x(t) liters of water in it, where the rate of water being poured in is proportional to the height of the water
1
x 3 . This fractional power arises since volume is a cubic quantity while the water is being poured in at a rate
governed by a one-dimensional quantity of length. Similar equations can arise in microfluidic dynamics.)
Anyway, consider the differential equation
d 1
x(t) = αx 3 (51)
dt
with the initial condition
x(0) = 0.

Let’s take the “separation-of-variables pill” and see what trip it takes us on:

d 1
x(t) = αx 3 (52)
dt
dx 1
= αx 3 (53)
dt
1
x− 3 dx = αdt (54)
Z Z
1
x− 3 dx = αdt (55)
3 2
x 3 +C1 = αt +C2 (56)
2
2 3
x = ( αt +C3 ) 2 (57)
3
That didn’t seem like too wild a ride. Let’s see what rabbit hole we have actually landed in.

(a) Given our separation-of-variables based calculation, let us guess a solution of the form
  32
2
x(t) = αt + c
3

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 10
Homework 2 @ 2019-09-17 [Link]-07:00 11

Show that this is a solution to the differential equation (51), and find the c that satisfies the initial
condition.
Solution: We check that this is a solution by differentiating the guess for x(t), and showing that it
satisfies (51).
 
  32
d d 2
x(t) =  αt + c 
dt dt 3
  12
3 2 2
= · αt + c · α
2 3 3
  21
2
=α αt + c
3
 1
  32 3
2
= α  αt + c 
3
1
= αx 3

We thus satisfy (51).


To solve for the initial condition, we evaluate
  32
2
0 = x(0) = α ·0+c
3
2 3
= ( · c) 2
3
−→ c = 0

This is the only solution to the found form that satisfies the initial condition.
3
The equation x(t) = 23 (αt) 2 thus satisfies the differential equation and the initial value condition.
(b) Let us guess a second solution:
x(t) = 0 (58)
Show that this new guess also satisfies (51), and the initial condition (x(0) = 0).
Solution:
d d
x(t) = 0 = 0 = α · 0 = α · x(t) (59)
dt dt
Furthermore, x(0) = 0.
So this second solution also satisfies the differential equation and the initial value condition.
(c) Show that any solution of the form

0,
 if t < t0
x(t) =   32 (60)
 23 α (t − t0 ) , t ≥ t0

also satisfies (51) and the initial condition x(0) = 0, for any t0 > 0.
So this actually has infinitely many solutions.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 11
Homework 2 @ 2019-09-17 [Link]-07:00 12

Solution:
To see if this is a solution, we see if it satisfies (51). We handle the two cases separately:
For t < t0 :
d d 1
x(t) = 0 = 0 = α · 0 = α · 0 3 = α · x(t)
dt dt
For t ≥ t0 :
 
  32
d d 2
x(t) =  α (t − t0 ) 
dt dt 3
  12
3 2 2
= · α (t − t0 ) · α
2 3 3
  31
  32
2
= α  α (t − t0 ) 
3
1
= αx 3

At the boundary t = t0 , we see that


  32
2 2 3
x(t0 ) = α (t0 − t0 ) = (0) 2 = 0
3 3

Thus, x(t) is a continuous function.


We also can verify that dtd x(t) is continuous at the boundary t = t0 :

d 1
x(t)|t=t0 = α α(t − t0 ) 2 |t=t0
dt
3
= α α(t0 − t0 ) 2
=0

The derivative also continuous.


The initial condition holds, as t0 > 0, so x(t = 0) will always be 0.
(d) One of the actual sufficient conditions for the uniqueness of solutions to differential equations of the
form dtd x(t) = f (x(t)) is that the function f (x) be continuously differentiable with a bounded derivative
at the initial condition x(0) and everywhere that the solution purports to go. (You will understand the
importance of this condition and where it comes from better when we are in Module 2 of 16B.)
Does this differential equation problem satisfy this condition that would let us trust guessing and
checking?
1
Solution: No. To see this, consider our differential equation (51) at t = 0. In this case, f (x) = αx 3 .
 1 2
d
We see that dx d
f (x) = dx αx 3 = α3 x− 3 = α2 .
3x 3
Note that at x(t = 0) = 0, our initial condition, the derivative becomes discontinuous in an unbounded
fashion. It blows up. Thus this differential equation does not satisfy the uniqueness condition that we
have provided.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 12
Homework 2 @ 2019-09-17 [Link]-07:00 13

(e) In this particular case, there is a little bit of a warning in the separation-of-variables trip (you can
consider it a dream sequence if you’d like — it has a logic to it, just not a logic that you can rely upon
in the real world). Explain why (54) might be a bit problematic in this case.
−1
Solution: The problem with (54) is that there is x 3 on the left hand side. If x = 0, this results in
division by 0. As x(0) = 0 is the initial condition, this unbounded point becomes a problem for the
separation-of-variables technique.
(f) To see that separation of variables can actually give you reasonable guesses even for equations with
interesting solutions, try to use it to solve the following differential equation dtd x(t) = 12 x2 for initial
condition x(0) = 1. Sketch your solution. Describe anything interesting that happens. Does this
problem satisfy the uniqueness conditions for t ∈ [0, 1]?
Solution: Applying separation of variables:
d 1 2
x(t) = x
dt 2
dx 1 2
= x
dt 2
1
x−2 dx = dt
2
t
−x−1 = +C1
2
−1
x(t) = t
2 +C1
−2
=
t +C2
−2
To satisfy the initial condition x(0) = 1: 1 = x(0) = 0+C2 −→ C2 = −2 Thus
−2
x(t) =
t −2

x(t)
10

5
x(t)

−5

−10
−1 0 1 2 3
t

Figure 1: Notice that this function escapes to infinity at a finite time t = 2. While a computer will happily
plot it after that point, such a plot is meaningless there since there is no reason to come down from +∞.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 13
Homework 2 @ 2019-09-17 [Link]-07:00 14

To check whether the uniqueness condition holds over t ∈ [0, 1], we need to check that f (x) = 12 x2 is
continuously differentiable with a bounded derivative over t ∈ [0, 1].
First, note that f 0 (x) = dx
d
f (x) = x exists.
For t ∈ [0, 1], we see that the solution moves smoothly from x(t = 0) = 1 to x(t = 1) = 2. Thus we
must check that f 0 (x) is continuous and bounded for x ∈ [1, 2].
Indeed this is the case, as f 0 (x) = x is a smooth function that varies from 1 to 2 for x ∈ [1, 2].
Thus, the solution is unique.
Note that at t = 2, the solution becomes unbounded. Beyond that point, our differential equation ceases
to have meaning.
However, as t = 2 is outside the range over which we are trying to find a solution, it does not impact the
uniqueness criteria question we asked. For any interval that is on the left side of t = 2, the uniqueness
criteria are satisfied so this solution indeed must run off to infinity in finite time.
In practice, such finite-time-escape behavior is an indication that whatever physical model we are using
is breaking down.

4. Op-Amp Stability
In this question we will revisit the basic op-amp model that was introduced in EE16A and we will add a
capacitance Cout to make the model more realistic (refer to figure 2). Now that we have the tools to do so, we
will study the behavior of the op-amp in positive and negative feedback (refer to figure 3). Furthermore, we
will begin looking at the integrator circuit (refer to figure 4) to see how a capacitor in the negative feedback
can behave. In the next homework, you will see why it ends up being close to an integrator.

V_ Rout

V+ + Cout

G∆V

Figure 2: Op-amp model: ∆V = V+ −V−

Vin

Vout

Vin Vout +
+
a Buffer in negative feedback b “Buffer” in positive feedback that doesn’t actually work
as a buffer.

Figure 3: Op-amp in buffer configuration

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 14
Homework 2 @ 2019-09-17 [Link]-07:00 15

C
+ -

Vin + - − Vout
R
+

Figure 4: Integrator circuit

C
i1
+ −
R
+ − − i2 Rout
Vin Vout
∆V= V+-V- + −
i +i
+ + Cout +1 2
G∆V −

Figure 5: Integrator circuit with Op-amp model

(a) Using the op-amp model in figure 2 and the buffer in negative-feedback configuration in figure 3a,
draw a combined circuit. Remember that ∆V = V+ −V− , the voltage difference between the positive
and negative labeled input terminals of the op-amp.
(HINT: Look at figure 5 to see how this was done for the integrator. That might help.)
Note: here, we have used the Thevenin-equivalent model for the op-amp gain to be compatible with
what you have seen in 16A. In more advanced analog circuits courses, it is traditional to use a controlled
current source with a resistor in parallel instead.
Solution: Please refer to Figure 6 for the completed circuit.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 15
Homework 2 @ 2019-09-17 [Link]-07:00 16

− Rout

Vin ∆V Vout
+ Cout
+

G∆V

Figure 6: Negative-feedback buffer configuration using given op-amp model

(b) Let’s look at the op-amp in negtive feedback. From our discussions in EE16A, we know that the buffer
in figure 3a should work with Vout ≈ Vin by the golden rules. Write a differential-equation for Vout
by replacing the op-amp with the given model and show what the solution will be as a function
of time for a static Vin . What does it converge to as t → ∞? Note: We assume the gain G > 1 for all
parts of the question.
Solution: We have ∆V = Vin −Vout . Next, we can write the following branch equations:

d
i = Cout
Vout
dt
G∆V = VR +Vout
d
G(Vin −Vout ) = RC Vout +Vout
dt
Simplifying the last line, we get:

d
GVin = RC Vout + (1 + G)Vout
dt
d 1+G G
Vout + Vout − Vin = 0
dt RC RC

G
Solving the above differential equation, with the substitution Veout = Vout − G+1 Vin , we get
G+1
Veout (t) = ke− RC t .

Substituting for the initial condition Vout (0) = 0, we get:

GVin  G+1

Vout = 1 − e− RC t .
G+1
G
Since G > 1, the exponent is negative, hence as t → ∞, the solution will converge to Vout → G+1 Vin .
(c) Next, let’s look at the op-amp in positive feedback. We know that the configuration given in figure 3b
is unstable and Vout will just rail. Again, using the op-amp model in figure 2, show that Vout does

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 16
Homework 2 @ 2019-09-17 [Link]-07:00 17

not converge and hence the output will rail. For positive DC input Vin > 0, will Vout rail to the
positive or negative side? Explain.
Solution: This time, we have ∆V = Vout −Vin . Next, we can write the following branch equations:

d
i = CoutVout
dt
G∆V = VR +Vout
d
G(Vout −Vin ) = RC Vout +Vout
dt
Simplifying the last line, we get:

d
− GVin = RC Vout + (1 − G)Vout
dt
d 1−G G
Vout + Vout + Vin = 0
dt RC RC

G
Solving the above differential equation, with the substitution Veout = Vout − G−1 Vin , we get:
1−G
Veout = ke− RC t
G−1
= ke RC t

Substituting for the hypothetical initial condition Vout (0) = 0, we get:

GVin  G−1 t 
Vout = − e RC − 1
G−1

Since G > 1, the exponent is positive, hence as t → ∞, the solution will be unbounded, and Vout → −∞.
Of course, it can’t grow to negative infinity, and so we can conclude that Vout will rail to the negative
side if Vout had started at zero. The same exact story would hold if Vout started anywhere below Vin .
The case of Vout starting out significantly greater than Vin deserves some mention, although not neces-
sary for full credit on this question. In this case, the initial condition for Veout would be positive, and
would proceed to unstably attempt to run away to positive infinity. It would be stopped at the positive
rail, where it would stay.
Essentially, all that matters is the initial condition of Veout — start out positive, then we rail to a positive
rail for Vout . Start out negative, then we rail to the negative rail for Vout . An op-amp in positive feedback
retains its comparator-like character.
(d) For an ideal op-amp, we can assume that it has an infinite gain, i.e., G → ∞. Under these assumptions,
show that the op-amp in negative feedback behaves as an ideal buffer, i.e., Vout = Vin .
Solution: Taking the limit of our solution in part (a),
GVin  G+1

Vout = lim 1 − e− RC t
G→∞ G + 1
= Vin

The coeffecient of the exponent goes to 1 whereas the exponent itself goes to −∞, and hence 1−e−∞ →
1.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 17
Homework 2 @ 2019-09-17 [Link]-07:00 18

(e) Let’s extend our analysis to the integrator circuit shown in figure 4. Simplifying all the equations, we
get a system of differential equations in two variables VC and Vout , where VC and Vout are the voltage
drops across the capacitors C and Cout . Fill in the missing term in the following matrix differential
equation.
" #      " # " #
G+1 1 1 G 1
d Vout (t) − + − + V out (t)
= Rout Cout RCout RCout Rout Cout  + RC1out Vin (t) (61)
dt VC (t) − RC 1
? VC (t) RC

(HINT: We picked an easier term to hide. You don’t have to write out all the equations and do a lot of
algebra to figure out what the missing term is.)
Solution: We can define a convenient variable as follows:

∆V = 0 − (Vin − i1 R) (62)
d 1
i1 = C VC = (Vin −VC −Vout ) (63)
dt R
1
i2 = (G∆V −Vout ) (64)
Rout
GR G 1
= i1 − Vin − Vout (65)
Rout Rout Rout
Next, we can write the branch equations as follows:

Vout = Vin − i1 R −VC


d
Cout Vout = i1 + i2
dt
Substituting from equations (62), (63) and (65)
d 1 1 1
VC = − Vout − VC + Vin
dt RC RC RC
d 1 G G 1
Cout Vout = (Vin −VC −Vout ) + (Vin −VC −Vout ) − Vin − Vout
dt R Rout Rout Rout
   
1 1 G 1 G 1
= Vin − + VC − + + Vout
R R Rout Rout Rout R
Hence, we can write the matrix differential equation as follows:
" #      " # " #
G+1 1 1 G 1
d Vout − Rout Cout + RCout − RCout + Rout Cout  V out RC
= + 1out Vin
dt VC −1 −1 VC RC
RC RC

5. Digital-Analog Converter (16A Review Material)


A digital-analog converter (DAC) is a circuit for converting a digital representation of a number into a
corresponding analog voltage. These circuits are crucial to enabling electrical hardware to interface with
the outside world; you will be using them in lab very soon. The digital number is represented as a series of
high or low voltages, which map to 1’s or 0’s. These high and low voltages may be generated using CMOS
logic gates similar to those you’ve seen mentioned in lecture, and which you will see a lot more of in 61C.
For simplicity we’ve represented the digital value with static voltage sources V0 , V1 , V2 . In this problem, we
will consider a DAC made out of resistors called the R-2R ladder.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 18
Homework 2 @ 2019-09-17 [Link]-07:00 19

R R
Vout

2R 2R 2R 2R

+ V0 + V1 + V2
− − −

LSB MSB

Each of the voltage sources V0 , V1 , and V2 can be either 0V or 1V . The specific combination of values
(V2 ,V1 ,V0 ) represents a 3-bit binary (unsigned) number where each of Vi is a binary bit. We will now
explore how this DAC can convert this digital number into different analog voltages.

(a) When the digital voltage sources are configured to (V2 ,V1 ,V0 ) = (1V, 0V, 0V ), what is the output
voltage Vout ?
Solution: There are several ways to solve this problem. For this solution set, we are going to solve
for the generic solution rather than solve for each specific case of (a), (b), (c), and (d).

VA R VB R
Vout

2R 2R 2R 2R

+ V0 + V1 + VB
− − −

Applying KCL at nodes VA , VB , and Vout , we get


VA VA −V0 VA −VB
+ + =0
2R 2R R
VB −V1 VB −VA VB −Vout
+ + =0
2R R R
Vout −V2 Vout −VB
+ =0
2R R
Solving this system of equations leads to
V2 V1 V0
+ + = Vout
2 4 8
Plugging in 1, 0, 0 gives the answer.
1
Vout =
2

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 19
Homework 2 @ 2019-09-17 [Link]-07:00 20

(b) If (V2 ,V1 ,V0 ) = (0V, 1V, 0V ), what is Vout ?


Solution: Plugging into the equation from part (a), we get
1
Vout = .
4

(c) If (V2 ,V1 ,V0 ) = (0V, 0V, 1V ), what is Vout ?


Solution: Plugging into the equation from part (a), we get
1
Vout = .
8

(d) If (V2 ,V1 ,V0 ) = (1V, 1V, 1V ), what is Vout ?


Solution: Plugging into the equation from part (a), we get
7
Vout = .
8

(e) Finally, solve for Vout in terms of the binary voltage values V2 ,V1 , and V0 .
Solution: From part (a),
V2 V1 V0
+ + = Vout .
2 4 8

(f) Explain how your results above show that the resistive DAC converts the 3-bit binary number
(V2 ,V1 ,V0 ) to the output analog voltage Vout .
Solution: Every increment of 18 represents an increment of 1 to the 3-bit binary number (V2V1V0 ).
For example, if Vout = 58 , the input was 5 in binary (1 0 1)→ (V2 = 1 V1 = 0 V0 = 1).

6. Write Your Own Question And Provide a Thorough Solution.


Writing your own problems is a very important way to really learn material. The famous “Bloom’s Tax-
onomy” that lists the levels of learning is: Remember, Understand, Apply, Analyze, Evaluate, and Create.
Using what you know to create is the top level. We rarely ask you any homework questions about the lowest
level of straight-up remembering, expecting you to be able to do that yourself (e.g. making flashcards). But
we don’t want the same to be true about the highest level. As a practical matter, having some practice at
trying to create problems helps you study for exams much better than simply counting on solving existing
practice problems. This is because thinking about how to create an interesting problem forces you to really
look at the material from the perspective of those who are going to create the exams. Besides, this is fun. If
you want to make a boring problem, go ahead. That is your prerogative. But it is more fun to really engage
with the material, discover something interesting, and then come up with a problem that walks others down
a journey that lets them share your discovery. You don’t have to achieve this every week. But unless you try
every week, it probably won’t ever happen.

7. Homework Process and Study Group


Citing sources and collaborators are an important part of life, including being a student! We also want to
understand what resources you find helpful and how much time homework is taking, so we can change
things in the future if possible.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 20
Homework 2 @ 2019-09-17 [Link]-07:00 21

(a) What sources (if any) did you use as you worked through the homework?
(b) Who did you work on this homework with? List names and student ID’s. (In case of homework
party, you can also just describe the group.)
(c) How did you work on this homework? (For example, I first worked by myself for 2 hours, but got
stuck on problem 3, so I went to office hours. Then I went to homework party for a few hours, where I
finished the homework.)
(d) Roughly how many total hours did you work on this homework?

Contributors:

• Sanjit Batra.

• Kris Pister.

• Alex Devonport.

• Pavan Bhargava.

• Anant Sahai.

• Nikhil Shinde.

• Sidney Buchbinder.

• Aditya Arun.

• Edward Wang.

© UCB EECS 16B, Fall 2019. All Rights Reserved. This may not be publicly shared without explicit permission. 21

You might also like