445lab1 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

SFSU - ENGR 445 ANALOG IC DESIGN LAB

LAB #1: EFFECT OF ROOTS ON THE TIME AND FREQUENCY RESPONSES


(Updated Dec. 23, 2002)

Objective:
To investigate the effect of root location in the complex plane upon the step and frequency responses of
1st-order and 2nd-order circuits. To use op amps to control root location and observe its impact upon
stability. To see how instability can be exploited to generate oscillations. To compare experimental
results with theory and PSpice simulations, and account for possible differences. To review Bode plots.

Components:
1 741 op amp, 2 1N4148 diodes, 1 2N2222 npn BJT, 2 22 nF capacitors, 2 0.1 F capacitors,
1 10-k potentiometer, and resistors: 1 100 , 1 1.5 k, 1 3.3 k, 1 6.8 k, 4 10 k, and
1 33 k (all 5%, W).

Instrumentation:
A dual 15-V regulated power supply, a digital multi-meter (DMM), a signal generator (sine wave and
square wave), and a dual-trace oscilloscope.

References:
1. Sergio Franco, Electric Circuits Fundamentals, Oxford University Press, 1995 (Chs. 8, 9, and 14).
2. Sergio Franco, Design with Op Amps and Analog ICs, 3rd Edition, McGraw-Hill, 2002 (Chs. 3 & 10)

PART I THEORETICAL BACKGROUND


The behavior of a circuit is uniquely determined by its transfer function H(s) = Vo(s)/Vi(s), where
Vi(s) and Vo(s) are the Laplace transforms of the circuits input vI(t)and output vO(t), and s is the complex
frequency, in complex Np/sec. For physical circuits, H(s) takes on the form of a rational function of s,
that is, H(s) = N(s)/D(s), where N(s) and D(s) are polynomials of degrees m and n m, respectively. In
this lab we are particularly interested in 1st-order (n = 1) and 2nd-order (n = 2) circuits. The roots of N(s) =
0 and those of D(s) = 0 are called, respectively, the zeros and the poles of H(s). Roots can be real or
complex; when complex, the roots of a physical system always occur in conjugate pairs.
The response of a circuit to an external impulse, aptly called the impulse response, offers an
indication of how the circuit does on its own, using the energy stored internally in its energy-storage
elements as a consequence of the applied impulse. Such a response is found mathematically as hO(t) =
L-1{H(s)}, where L-1 stands for inverse Laplace transform. We identify two significant cases:
H(s) contains a real pole at s = + j0, or
A
H (s) =
s
where A is a suitable scaling factor, j2 = 1, and is the Neper frequency, in Np/s. The impulse
response is found to be

hO(t) = L-1{H(s)} = Ae t u (t ) (1)

where u(t) is the unit step function (u = 0 for t < 0, u = 1 for t > 0). We note that this response is (a)

2002 Sergio Franco Engr 445 Lab #1 Page 1 of 12


an exponential decay if < 0, (b) a constant or sustained response if = 0, or (c) a diverging
exponential if > 0. A diverging response indicates an unstable system. Such a response will grow
until limited by some inherent circuit nonlinearity, such as op amp saturation. It is apparent that for a
1st-order system to be stable, its pole must lie on the negative real axis, where < 0.
H(s) contains a complex-conjugate pole pair at s = j, indicating that it can be expressed as

A
H ( s) =
[ s ( + j )] [ s ( j )]

where A is a suitable scaling factor, is the Neper frequency (in Np/s), and is the angular
frequency (in rad/s). The impulse response is now found to be

hO(t) = L-1H(s)} = Be t u (t ) cos( t + ) (2)

where B and are suitable constants. We note that the impulse response is (a) an exponentially
decaying or damped sinusoid if < 0, (b) a sustained or undamped sinusoid if = 0, and (c) a
diverging sinusoid if > 0. A diverging sinusoid indicates again an unstable system. Such a
response will grow until limited by some inherent circuit nonlinearity, such as op amp saturation. It is
apparent that for a 2nd-order system to be stable, its pole pair must lie in the left of the complex plane,
where < 0. A circuit whose pole pair lies right on the imaginary axis, for which = 0, is aptly
called an oscillator. In this laboratory we shall use an op amp to control the location of poles in the
complex plane.

1st-Order Circuit
To develop physical insight for the case of a 1st-order circuit, consider the simple R-C network of Fig. 1.
We know from basic circuit theory that if C is initially charged at some voltage v(0) 0, its energy will be
dissipated by R, causing C to discharge exponentially with the time constant = RC, according to

v(t 0) = v(0)e t / RC (3a)

This is also known as the natural or source-free response of the circuit. As we know, the R-C network
exhibits a pole on the negative real axis,

1 1
= = (3b)
RC

Fig. 1 Basic R-C circuit, its natural response, and s-plane location of its pole.

2002 Sergio Franco Engr 445 Lab #1 Page 2 of 12


Fig. 2 Using an op amp for single-pole control.

Consider now the addition of a noninverting op amp to amplify the capacitor voltage v and then
re-inject energy into the R-C network via R1, as shown in Fig. 2. With the component designations
shown, the op amp amplifies v by 1 + kR2/R2 = 1 + k. The re-injected energy will make up for some of
the energy dissipated by R, effectively resulting in a longer time constant , or, equivalently, in a smaller
. We still have a pole lying on the negative real axis, but closer to the origin. If the re-injected energy
happens to equal the dissipated energy, then the capacitor voltage will remain constant, indicating = ,
or, equivalently, = 0. Clearly, the pole now lies right at the origin of the complex plane. If, on the
other hand, the re-injected energy happens to exceed the dissipated energy, then the capacitor voltage will
diverge, indicating < 0, or, equivalently, > 0. We now have a pole in the right-half of the complex
plane, and the circuit is unstable.
The circuit can be analyzed quantitatively by observing that the op amp and associated resistors
form a negative resistance converter synthesizing a resistance whose value, with the component
designations shown, is R1(R2/kR2) = R/k. As depicted in Fig. 3a, the equivalent resistance seen by the
capacitor is then Req = R//(R/k) = R/(1 k), indicating a time constant = ReqC = RC/(1 k), or a pole at

1 k 1
= = (4a)
RC

(a) (b)
Fig. 3 Using the concept of negative resistance to illustrate pole location control.

2002 Sergio Franco Engr 445 Lab #1 Page 3 of 12


Consequently, the natural response is

v(t 0) = v(0)e( k 1)t / RC (4b)

Depending on whether k < 1, k = 1, or k > 1, this response decays, remains constant, or diverges,
respectively. Figure 3b shows the root locus, that is, the trajectory of the pole as we vary k.

R2 R3

10k {Rv al}


VEE

4
15Vdc 2 1

V-
- OS1
uA741 U1 6
OUT
15Vdc 3 5
V+
+ OS2

VCC
7

R R1

10k V
10k

C
100n Fig. 4 PSpice circuit to visualize the
three response types of a 1st-order system.
0

The three response types are readily visualized via PSpice. The required circuit is shown in Fig.
4, where the initial condition v(0) = 1 V has been imposed. The responses are depicted in Fig. 5. You
can duplicate this PSpice example on your own by downloading its appropriate files from the Web. To
this end, go to http://online.sfsu.edu/~sfranco/CoursesAndLabs/Labs/445Labs.html, and once there, click
on PSpice Examples. Then, follow the instructions contained in the Readme file. In fact, you are urged
to run this example and modify the simulation profile by extending the run time by a few more ms. This
will allow you to observe that the diverging response keeps increasing until the op amp saturates, at which
point the response stabilizes at half the output saturation voltage of the op amp. Can you explain why?

Fig. 5 Responses for the


PSpice circuit of Fig. 4.

2002 Sergio Franco Engr 445 Lab #1 Page 4 of 12


Fig. 6 Using an op amp for pole-pair control.

2nd-Order Circuit
Proceeding along a similar line of reasoning, we can develop physical insight also for the 2nd-order circuit
of Fig. 6. This circuit consists of two R-C stages in cascade (R1-C1 and R2-C2), along with a non-
inverting amplifier designed to amplify the voltage v across C2 by 1 + kR3/R3 = 1 + k, and then re-inject
energy upstream of the R2-C2 stage via C1. By adjusting the amplifiers gain we can control the amount
of re-injected energy and have the natural response take on the form of a damped, a sustained, or a
diverging sinusoid, respectively. As we shall see below, the three cases correspond, respectively, to k < 2,
k = 2, and k > 2.
We can again visualize the three cases via PSpice. The necessary circuit is shown in Fig. 7,
where we are imposing initial voltages of 1 V across C1 and 0 V across C2. The three response types are

R3 R4

10k {Rv al}


VEE
4

15Vdc 2 1
V-

- OS1
uA741 U1 6
OUT
3 5
V+

15Vdc + OS2

VCC
7

R1 R2

10k 10k V
C1 100n C2 100n
Fig. 7 PSpice circuit to visualize the
three response types of a 1st-order system.
0

2002 Sergio Franco Engr 445 Lab #1 Page 5 of 12


Fig. 8 Responses for the
PSpice circuit of Fig. 7.

shown in Fig. 8. You are again encouraged to replicate this simulation on your own, but with an extended
run time in order to observe the effect of op amp saturation upon the diverging sinusoid. Can you justify
quantitatively what you see?
The effect of k upon the pole location can again be visualized via the root locus, representing the
trajectory described by the pole pair as k is varied from k = 0 to k > 2. This locus is shown in Fig. 9a.

Frequency Response of Stable Circuits:


Stable circuits are often characterized via their frequency response, that is, the manner in which the circuit
processes the amplitude and phase of an ac input as a function of frequency. Systems theory tells us that
once the transfer function H(s) is known, such a response is obtained by letting s j (or s j2f) in the
expression for H(s). Conversely, the frequency response can be found experimentally as

Vom
|H(jf)| = H(jf) = o i (5)
Vim

(a) (b)
Fig. 9 (a) Root locus as a function of k, and (b) pole pair for the case of a damped response.

2002 Sergio Franco Engr 445 Lab #1 Page 6 of 12


where |H(jf)| and H(jf) represent magnitude and phase of H(jf), and Vim, Vom, i and o are the amplitudes
and phases of the input and output signals, vI = Vimcos(2ft + i) and vO = Vomcos(2ft + o). As we
know, the plots of |H(jf)| (in decibels) and of H(jf) (in degrees) versus f (in decades) are referred to as
the Bode Plots of H.

PART II EXPERIMENTAL PART


Most measurements shall be performed using the circuits of Figs. 10 and 12, which each lab
group should assemble simultaneously in separate areas of the proto-board before coming to the lab. This
will allow using the allotted lab time efficiently, primarily to perform the required measurements and
observations. Refer to the Appendix for useful tips on how to construct op amp circuits. In particular,
use two 0.1-F capacitors to bypass the 15-V power supplies, and always turn off power before making
any changes in a circuit. Failure to do so may destroy the op amps as well as other delicate components.
Henceforth, steps shall be identified by letters as follows: P for prelab work, C for calculations,
M for measurements, and S for SPICE simulation.

1st-Order Circuits:
PC1: Show that for the circuit of Fig. 10 we have

H0
H(s) = (6a)
1 + s / 0
1+ k 1 k
H0 = 0 = (6b)
1 k RC

As we know, this system has a pole at

Fig. 10 Circuit to investigate 1st-order frequency responses.

2002 Sergio Franco Engr 445 Lab #1 Page 7 of 12


k 1
s = 0 = (7)
RC

MC2: With power off, assemble the circuit of Fig. 10 and set the wiper all the way to the left to make
kR2 = 0, or k = 0. Also, while monitoring vI with Ch. 1 of the oscilloscope set on DC, adjust the
waveform generator so that vI is a sine wave with 0-V DC and a peak-to-peak amplitude of 2 V.
Next, apply power, and while monitoring vO with Ch. 2 of the oscilloscope (also set on DC),
measure the magnitude response as per Eq. (5) as a function of frequency. To this end, first find the
3-db frequency f-3db of the circuit, that is, the frequency at which Vom drops to 70.7% of its low-
frequency value; then, while keeping Vim constant, vary frequency and measure Vom at a few other
significant frequency points using your judgment to economize on the number of measurements while
still extracting all significant information.
Finally, turn power off, pull R out of the circuit, measure its value with the ohmmeter, and find
the actual value of C from f-3db = 1/2RC. How does it compare with the nominal value?

C3: Using the data of Step M2, plot |H(jf)| (in decibels) versus f (in decades). Hence, verify that within
measurement errors, the low- and high-frequency asymptotes meet at f-3db, and that for f >> f-3db the gain-
bandwidth product GBP = |H(f)| f is constant.

MC4: Repeat Steps MC2 and C3, but with the potentiometer set for kR2 = R2/2, or k = 0.5. (For an
accurate setting, you may want to use the ohmmeter to measure both R2 and kR2; pull your resistors out of
the circuit as you measure them!). How does the Bode plot change as you change k from 0 to 0.5?

S5: Using the component values measured in Step MC2, perform a PSpice simulation of the circuit of
Fig. 10 for k = 0, 0.5, 0.9, and 1.0. Display the magnitude Bode plots, and sketch and label the complex-
plane locations of the corresponding poles.

M6: We are now going to use the circuit of Fig. 11 to observe the time-domain behavior. Here, the
voltage divider made up of the 1.5-k and 100- resistances is designed to force a DC input of about 1 V
to the RC network, and the BJT switch is used to periodically reset the capacitor voltage to 0 V in order to
ensure a repetitive trace on the oscilloscope. Thus, proceed as follows:
Assemble the circuit with power off, and while monitoring vReset with Ch.1 of the oscilloscope set on
DC, adjust the waveform generator so that vReset is a pulse train alternating between 1 V and +5V
with an initial frequency of about 1 kHz and a pulse width of several microseconds (as you progress
through the experiment, you may find it necessary to alter these initial recommended setting for best
visualization on the scope.)
Next, while monitoring vO with Ch.2 of the oscilloscope ( also set on DC), slowly vary the wiper from
the left to the right to see how the response changes from a converging exponential (k < 1), to a ramp
(k = 1) to a diverging exponential (k > 1), in a manner similar to Fig. 5. Show your results to the lab
instructor.
Record the waveform of vO for three different values of k, namely, k < 1, k = 1, and k > 1. The first
and last values of k are of your own choice, so make sure that once you are finished, you measure the
corresponding values of kR2 and R2 in order to compute the actual values of k (pull them out of the
circuit to measure them!)
For the cases k = 1 and k > 1, record vO also with the frequency of vReset adjusted until the op amp just
begins to saturate. Comment on all of your results

S7: Simulate the circuit Step M5 via PSpice for each of the three chosen values of k. Hence, compare
with Step M6, and account for possible differences.

2002 Sergio Franco Engr 445 Lab #1 Page 8 of 12


Fig. 11 Circuit to investigate 1st-order transients.

C8: For each of the three values of k above: (a) develop a mathematical expression for vO(t), and (b)
sketch and label on graph paper the s-plane location of the corresponding pole.

2nd-Order Circuits:
PC9: Show that for the circuit of Fig. 12 we have

H0
H(s) = (8a)
( s / 0 ) + 2 ( s / 0 ) + 1
2

1
H0 = 1 + k 0 = = 1 0.5k (8b)
RC

where 0 is the undamped natural frequency and is the damping ratio. Hence, show that for 0 < < 1
the poles of H(s) are complex conjugate and occur at

s1,2 = j = 0 j 1 2 0 (9)

Figure 9b depicts the pole location for this particular but important case.

MC10: With power off, assemble the circuit of Fig. 12 and adjust the wiper for = 1/ 2 , or k =

2002 Sergio Franco Engr 445 Lab #1 Page 9 of 12


Fig. 12 Circuit to investigate
2nd-order responses.

2 2 . This will set up the circuit for what is known as the maximally-flat, or Butterworth frequency
response. Then, using a procedure similar to that for the 1st-order circuit, measure the frequency
response, and sketch and label the experimental magnitude Bode plot.

MC11: Repeat Step MC10, but for = 0.2, which corresponds to a much less damped response. You
will also notice that in the frequency region near of 0 the response now exhibits a significant amount of
peaking, an effect that is absent in the maximally-flat case of the previous step.

S12: Simulate the circuits of Steps M8 and M9 via PSpice, display their magnitude Bode plots, compare
with the experimental ones of Steps MC10 and MC11, and account for possible differences between
measurement and simulation.

M13: We are now going to observe the time-domain behavior of the circuit of Fig. 12. To this end,
adjust the waveform generator so that vI is a square wave alternating between 1 V and +1V with an
initial frequency of a few hundred Hz. Then slowly vary the wiper from the left to the right to see how
the response changes from non-oscillatory (k = 0), to a damped sinusoid (0 < k < 2), to a sustained
sinusoid (k = 2 exactly), to a diverging sinusoid (k > 2). Note that in the latter case the sinusoid will
diverge until the saturation limits of the op amp are reached, thus preventing any further amplitude
growth. Moreover, the circuit will continue to oscillate irrespective of vI, something you can actually
verify by letting vI 0. Show your results to the lab instructor.
Record the waveform of vO for three different values of k, namely, k < 2, k = 2, and k > 2. The
first and last values of k are of your own choice, so make sure that once you are finished, you measure the
corresponding values of kR3 and R3 in order to compute the actual values of k (pull them out of the circuit
to measure them!) Comment on all of your results

S14: Simulate the circuit of Step M13 via PSpice for each of the three values of k. Hence, compare with
Step M13, and account for possible differences.

C15: For each of the three values of k above: (a) develop a mathematical expression for vO(t) (for the

2002 Sergio Franco Engr 445 Lab #1 Page 10 of 12


case k > 2, such an expression would hold only up to the onset of op amp saturation), and (b) sketch and
label on graph paper the s-plane location of the corresponding pole pair.

Sinusoidal Oscillator:
Instability can be exploited on purpose to implement sine wave oscillators. With k > 2, the circuit of Step
M13 is indeed an oscillator, but a rather crude one because of the abrupt clipping due to op amp
saturation. Figure 13 shows an automatic amplitude-control mechanism that uses a diode network to
ensure rounder edges for the sine wave, and, thus, much less distortion.
We can get the circuit to start oscillating on its own, without any externally applied input vI, by
letting k > 2. Indeed, just the noise present at the input of the op amp will suffice to initiate oscillations.
As the oscillations builds up, the diodes will finally start conducting (D1 on the positive alternations, D2
on the negative alternations), effectively placing R4 in parallel with kR3 and thus decreasing the effective
value of k. You should be able to convince yourself that the circuit will stabilize itself at the amplitude
that makes k = 2 exactly. We can visualize the process in the s-plane by saying that we are starting out
with the pole pair in the right-half of the s-plane to ensure oscillation buildup, and then use nonlinear
amplitude control to pull the pole pair back right on the imaginary axis to maintain sustained oscillation.

M16: With power off, assemble the circuit of Fig. 13 (note the absence of any input!) Apply power, and
starting with the wiper all the way to the left, vary it gradually until oscillation just starts to build up, and
then stabilizes at a sine wave. With the oscilloscopes time scale set to display about a couple of cycles,
fiddle with the wiper until you empirically find the setting that makes your sine wave as pure as possible.

Fig. 13 Sinusoidal oscillator.

2002 Sergio Franco Engr 445 Lab #1 Page 11 of 12


What is its frequency f0? How does it compare with the theoretical value f0 = 1/2RC, R = R1 = R2, C =
C1 = C2?

S17: Simulate the circuit of Step M16 via PSpice, and display two versions of the output waveform: (a)
a coarse one showing how it builds up, and (b) a finer one showing just a couple of cycles after the
oscillation has stabilized. Compare the frequency with that measured in Step M16, and account for
possible differences.

2002 Sergio Franco Engr 445 Lab #1 Page 12 of 12

You might also like