MUCLecture 2021 1210271
MUCLecture 2021 1210271
MUCLecture 2021 1210271
0 1 0 0 0
#
x1 M + m x1 1
# g 0 0 0 -
x Ml x2 Ml
D # 2T = F VD T + F Vu (3–22)
x3 0 0 0 1 x3 0
#
x4 m x4 1
- g 0 0 0
M M
x1
y1 1 0 0 0 x
B R = B R D 2T (3–23)
y2 0 0 1 0 x3
x4
Equations (3–22) and (3–23) give a state-space representation of the inverted-pendulum system.
(Note that state-space representation of the system is not unique. There are infinitely many such
representations for this system.)
Basic laws governing electrical circuits are Kirchhoff’s current law and voltage law.
Kirchhoff’s current law (node law) states that the algebraic sum of all currents entering and
leaving a node is zero. (This law can also be stated as follows: The sum of currents enter-
ing a node is equal to the sum of currents leaving the same node.) Kirchhoff’s voltage law
(loop law) states that at any given instant the algebraic sum of the voltages around any loop
in an electrical circuit is zero. (This law can also be stated as follows: The sum of the volt-
age drops is equal to the sum of the voltage rises around a loop.) A mathematical model
of an electrical circuit can be obtained by applying one or both of Kirchhoff’s laws to it.
This section first deals with simple electrical circuits and then treats mathematical
modeling of operational amplifier systems.
LRC Circuit. Consider the electrical circuit shown in Figure 3–7. The circuit con-
sists of an inductance L (henry), a resistance R (ohm), and a capacitance C (farad).
Applying Kirchhoff’s voltage law to the system, we obtain the following equations:
di 1
L + Ri + i dt = ei (3–24)
dt C 3
1
i dt = eo (3–25)
C 3
L R
ei C eo
Figure 3–7 i
Electrical circuit.
A state-space model of the system shown in Figure 3–7 may be obtained as follows: First,
note that the differential equation for the system can be obtained from Equation (3–26) as
$ R # 1 1
eo + eo + eo = e
L LC LC i
Then by defining state variables by
x1 = eo
#
x2 = e o
and the input and output variables by
u = ei
y = eo = x1
we obtain
# 0 1 0
x1 x1
B # R = C 1 R S B R + C 1 Su
x2 - - x2
LC L LC
and
x1
y = [1 0] B R
x2
These two equations give a mathematical model of the system in state space.
R1 R2
ei C1 C2 eo
Figure 3–8 i1 i2
Electrical system.
Ai - i2 B dt + R1 i1 = ei
1
(3–27)
C1 3 1
and
Ai2 - i1 B dt + R2 i2 +
1 1
i dt = 0 (3–28)
C1 3 C2 3 2
1
i2 dt = eo (3–29)
C2 3
Taking the Laplace transforms of Equations (3–27) through (3–29), respectively, using
zero initial conditions, we obtain
Eliminating I1(s) from Equations (3–30) and (3–31) and writing Ei(s) in terms of I2(s),
we find the transfer function between Eo(s) and Ei(s) to be
Eo(s) 1
=
Ei(s) AR1 C1 s + 1B AR2 C2 s + 1B + R1 C2 s
1
=
R1 C1 R2 C2 s + AR1 C1 + R2 C2 + R1 C2 Bs + 1
2
(3–33)
The term R1 C2 s in the denominator of the transfer function represents the interaction
of two simple RC circuits. Since AR1 C1 + R2 C2 + R1 C2 B 7 4R1 C1 R2 C2 , the two roots
2
Eo(s) Z2(s)
=
Ei(s) Z1(s) + Z2(s)
1
Z1 = Ls + R, Z2 =
Cs
1
Eo(s) Cs 1
= =
Ei(s) 1 LCs + RCs + 1
2
Ls + R +
Cs
Z1
i i i
Z1 Z2
ei Z2 eo
e1 e2
Figure 3–9 e
Electrical circuits. (a) (b)
Z2 I1 = AZ3 + Z4 BI2 , I1 + I2 = I
we obtain
Z3 + Z4 Z2
I1 = I, I2 = I
Z2 + Z3 + Z4 Z2 + Z3 + Z4
Noting that
Z2 AZ3 + Z4 B
Ei(s) = Z1 I + Z2 I1 = c Z1 + dI
Z2 + Z3 + Z4
Z2 Z4
Eo(s) = Z4 I2 = I
Z2 + Z3 + Z4
we obtain
Eo(s) Z2 Z4
=
Ei(s) Z1 AZ2 + Z3 + Z4 B + Z2 AZ3 + Z4 B
Substituting Z1=R1 , Z2=1/AC1 sB, Z3=R2 , and Z4=1/AC2 sB into this last equation, we get
1 1
Eo(s) C1 s C2 s
=
R1 a b + a R2 + b
Ei(s) 1 1 1 1
+ R2 +
C1 s C2 s C1 s C2 s
1
=
R1 C1 R2 C2 s2 + AR1 C1 + R2 C2 + R1 C2 Bs + 1
I
Z1
I2
Z3
Z1 Z3 I1
Ei(s) Z2
Figure 3–10 Ei(s) Z2 Z4 Eo(s) Z4
(a) The circuit of Eo(s)
Figure 3–8 shown in
terms of impedances;
(b) equivalent circuit
diagram. (a) (b)
(a) (b)
Figure 3–11
(a) System consisting of two nonloading cascaded elements; (b) an equivalent system.
= a b (K) a b
Eo(s) 1 1
Ei(s) R1 C1 s + 1 R2 C2 s + 1
K
=
AR1 C1 s + 1B AR2 C2 s + 1B
Isolating
ei C1 amplifier C2 eo
(gain K)
Figure 3–12
Electrical system.
e2 +
eo
Figure 3–13
Operational
amplifier.
eo = KAe2 - e1 B = -KAe1 - e2 B
where the inputs e1 and e2 may be dc or ac signals and K is the differential gain (volt-
age gain). The magnitude of K is approximately 105 ~ 106 for dc signals and ac signals
with frequencies less than approximately 10 Hz. (The differential gain K decreases with
the signal frequency and becomes about unity for frequencies of 1 MHz ~ 50 MHz.)
Note that the op amp amplifies the difference in voltages e1 and e2 . Such an amplifier is
commonly called a differential amplifier. Since the gain of the op amp is very high, it is
necessary to have a negative feedback from the output to the input to make the ampli-
fier stable. (The feedback is made from the output to the inverted input so that the feed-
back is a negative feedback.)
In the ideal op amp, no current flows into the input terminals, and the output volt-
age is not affected by the load connected to the output terminal. In other words, the
input impedance is infinity and the output impedance is zero. In an actual op amp, a
very small (almost negligible) current flows into an input terminal and the output can-
not be loaded too much. In our analysis here, we make the assumption that the op amps
are ideal.
i2 R2
i1 R1
–
e9
+
ei
eo
Figure 3–14
Inverting amplifier.
eo = K a ei - eo b
R1
R1 + R2
where K is the differential gain of the amplifier. From this last equation, we get
ei = a be
R1 1
+
R1 + R2 K o
eo = a 1 + b ei
R2
R1
This equation gives the output voltage eo . Since eo and ei have the same signs, the op-amp
circuit shown in Figure 3–15(a) is noninverting.
+
R2
R1 –
– R2
ei
eo
Figure 3–15 +
(a) Noninverting eo R1
ei
operational
amplifier;
(b) equivalent
circuit. (a) (b)
ei - e¿ dAe¿ - eo B e¿ - eo
i1 = , i2 = C , i3 =
R1 dt R2
Noting that the current flowing into the amplifier is negligible, we have
i1 = i2 + i3
Hence
ei - e¿ dAe¿ - eo B e¿ - eo
= C +
R1 dt R2
Since e¿ ⯐ 0, we have
ei deo eo
= -C -
R1 dt R2
Taking the Laplace transform of this last equation, assuming the zero initial condition, we have
Ei(s) R2 Cs + 1
= - Eo(s)
R1 R2
Eo(s) R2 1
= -
Ei(s) R1 R2 Cs + 1
The op-amp circuit shown in Figure 3–16 is a first-order lag circuit. (Several other circuits involving
op amps are shown in Table 3–1 together with their transfer functions. Table 3–1 is given on
page 85.)
i2 C
i3
R2
i1 R1
–
e9
+
ei eo
Figure 3–16
First-order lag circuit
using operational
amplifier.
I (s)
Z 1(s) –
E9(s)
+
Ei (s)
Eo(s)
Figure 3–17
Operational-
amplifier circuit.
Eo(s) Z2(s)
= - (3–34)
Ei(s) Z1(s)
EXAMPLE 3–9 Referring to the op-amp circuit shown in Figure 3–16, obtain the transfer function Eo(s)/Ei(s) by
use of the impedance approach.
The complex impedances Z1(s) and Z2(s) for this circuit are
1 R2
Z1(s) = R1 and Z2(s) = =
1 R2 Cs + 1
Cs +
R2
Eo(s) Z2(s) R2 1
= - = -
Ei(s) Z1(s) R1 R2 Cs + 1
C2
C2 C1
Z1 Z2 R4
R2
C1 – R3
R2 R1 –
+
i1 E9(s) i2 +
– Ei (s)
R1 E(s) Eo(s)
+
Ei(s) E(s)
(a) (b)
Figure 3–18
(a) Operational-amplifier circuit; (b) operational-amplifier circuit used as a lead or lag compensator.
Notice that
R4 C1 R2 C2 R2 R4 R2 C2
Kc a = = , a =
R3 C2 R1 C1 R1 R3 R1 C1
E(s) Z2
= -
Ei(s) Z1
where
R1 R2 C2s + 1
Z1 = , Z2 =
R1 C1s + 1 C2s
Thus
R2 C2 s + 1 R1 C1 s + 1
= -a ba b
E(s)
Ei(s) C2 s R1
Noting that
Eo(s) R4
= -
E(s) R3
Z2
Z1 C2
R2
C1
R4
– R3
R1 –
+
+
Ei (s) E(s)
Eo(s)
Figure 3–19
Electronic PID
controller.