Description of ßow-graph methods in [Dorf and Bishop, 2004, Chaps.. This general idea applies to a wide variety of practical problems see [Dorf and Bishop, 2004, Chap.. The meth-ods of m
Trang 1N := 8 n := 0,1 N
V C := 1.5 IL := 1.0 R := 3 L := 1 C := 0.5
x(n) :=
V C
IL
if n = 0
0
1
L
−1
C
R L
1 0 0 1
x(n − 1) if n > 0
0
0.3
0.6
0.9
1.2
1.5
V(C) I(L) x(n)0
x(n)1
n.T
Solution to matrix differential equation for initial conditions of VC = 1.5, IL = 1.0
C
L
R
IL
VC
VL +
+
+
−
−
−
T := 0.1
Figure A-2 LCR Circuit differential equation solution for initial values
of V C and I L , Igen= 0
i C = C dv C
dt = u − i L
v L = L di L
vOUT= Ri L
Trang 2Rewrite Eq (A-3) in state-variable format:
v C· = 0v C − 1
C i L+ 1
C u
õ·L = 1
L v C −R
vO = Ri L
A nodal circuit analysis conÞrms these facts for this example R, L, and C are constant values, but they can easily be time-varying and/or
nonlinear functions of voltage and current The discrete analysis method deals with all of this very nicely
We now add in the initial conditions at time zero, V C0 and I L0:
v C· = 0(v C + V C0 )− 1
C (i L + I L0 )+ 1
C u
õ·L = 1
L (v C + V C0 )− R
v O = Ri L
The two derivatives appear on the left side Note that if (v C + V C0) is
multiplied by zero, the rate of change of v C does not depend on that term,
and the rate of change of i L does not depend on u if the u is multiplied
by zero The options of Eqs (A-4) and (A-5) can easily be imagined Description of ßow-graph methods in [Dorf and Bishop, 2004, Chaps
2 and 3] and in numerous other references are excellent tools that are commonly used for these problems We will not be able to get deeply into that subject in this book, but Fig A-4 is an example
The next step is to rewrite Eq (A-5) in matrix format Also, v C is now
called X1, and I L is now called X2
˙X1
˙X2
=
0 −1C
1
L
X1
X2
+
1
C
0
V O = RX2
Trang 3Now write the (A-6) equations as follows:
˙X1 = 0X1− 1
C X2+ 1
C u
˙X2 = 1
L X1− R
VO = RX2
Next, we will solve Eq (A-6) [same as Eq (A-7) for X1 (= v c ), X2
(= i L ), and V O ] Component u is the input signal generator.
This general idea applies to a wide variety of practical problems (see [Dorf and Bishop, 2004, Chap 3] and many other references) The meth-ods of matrix algebra and matrix calculus operations are found in many handbooks (e.g., [Zwillinger, 1996])
The general format for state-variable equations, similar to Eqs (A-4) and (A-5), is
˙x = Ax + Bu
in which A, B, C, and D are coefÞcient matrices whose numbers may
be complex and varying in some manner with time, voltage, or current,
u pertains to complex signal sources, and y is the complex output for a
complex input signal u The boldface letters denote matrices speciÞcally.
Comparing Eq (A-6) with Eq (A-5), the general idea is clear At any
time t, x is the collection (vector) of voltages v and currents i in the
circuit, and ˙x is the collection (vector) of their time derivatives.
Matrix algebra or matrix calculus, using Mathcad, Þnds all the values
of x and y at each value of time t with great rapidity, and plots graphs
of the results Starting at t = 0, from a set of initial values of V and I , we
can trace the history of the network through the transient period and into the steady state
We will look more closely at the general method of matrix construc-tion for our speciÞc example Equaconstruc-tions (A-6), (A-7), and (A-9) can be
Laplace-transformed In this process the unit matrix [I ] = 1 0
, and this work must be in accordance with the rules of matrix algebra and the
Trang 4Laplace transform:
1 sX(s) − x(0) = AX(s) + BU(s)
2 sX(s) − AX(s) = x(0) + BU(s)
3 X(s)[sI − A] = x(0) + BU(s)
4 X(s) = [sI − A]−1x(0) + [sI − A]−1BU (s)
(A-9)
This can be inverse-Laplace-transformed to get x(t), a function of time for each X (s) [Dorf and Bishop, 2004, Sec 3], but we want to use the
dis-crete derivative of Eq (A-2) as an alternative for disdis-crete-signal analysis and design [Dorf and Bishop, 2004, Sec 3]
USING THE DISCRETE DERIVATIVE
We now replace the ˙x matrix in Eq (A-6) by incorporating Eq (A-2).
Using the intermediate steps in Eq (A-10) and using the sequence index
x(n) method that we are already very familiar with produces the following
Mathcad program, expressed in Word for Windows format
1 (if n = 0)
x 0(n)
x 1(n)
=
V C0
I L0
2 (if n > 0)
x 0(n)
x 1(n)
=
T
0 −1C
1
L
+
1 0
0 1
(A-10)
×
x 0(n − 1)
x 1(n − 1)
+ T
b0
b1
u(n)
Figure A-3 shows this equation in Mathcad program form We can imme-diately use three options:
1 Initial conditions x0(0) and x1(0) can be zero, u(n) can have a dc
value or a time function such as a step or sine wave, and in this
example [Eqs (A-6) and (A-7)] b0= 1, b1= 0, T = 0.1, u(n) = 1.0.
2 u(n) can be zero, and the transient response is driven by x(0), an
initial value of capacitor voltage or inductor current or both
Trang 5N := 1000 n := 0,1 N
x(n) : = if n = 0
0
1
L
−1
C R L
1 0
0 1
.x(n − 1) + T b u(n) if n > 0
1 0
2 π 4 mAn N
0 0
−400
−200
0 200
400
V(C) I(L)
n
Figure A-3 Time response of the LCR network with zero initial
condi-tions and sine-wave current excitation
3 x(0) and u(n) can both be operational at t= 0 or later than zero There are a lot of options for this problem
The Mathcad worksheet Fig A-2 shows option 2 for initial condition
values of V C and I L , and u(n) = 0 The values of x(n)0 and x(n)1 are plotted
Figure A-3 uses zero initial conditions and u(n)= 100 mA sine wave, frequency= 4, b0= 1.0, b1= 0 The buildups from zero of x1 (capacitor
volts) and x2 (inductor amperes) are plotted The lag of I L (peaks at a later time) can be noticed