Tải bản đầy đủ (.pdf) (5 trang)

DISCRETE-SIGNAL ANALYSIS AND DESIGN- P35 potx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (157.69 KB, 5 trang )

156 DISCRETE-SIGNAL ANALYSIS AND DESIGN
N := 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
T .
+
0
1
L
−1
C
R
L

1
0
0
1
x(n − 1) if n > 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
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 V
C
= 1.5, I
L
= 1.
0
C
L
R
I
L
V
C
V
L
+
+
+



u(t)
V
OUT

T := 0.1
Figure A-2 LCR Circuit differential equation solution for initial values
of V
C
and I
L
, I
gen
=0.
i
C
= C
dv
C
dt
= u − i
L
v
L
= L
di
L
dt
= v
C
− Ri
L
(A-3)
v
OUT

= Ri
L
ADDITIONAL DISCRETE-SIGNAL ANALYSIS AND DESIGN INFORMATION 157
Rewrite Eq. (A-3) in state-variable format:
v
·
C
= 0v
C

1
C
i
L
+
1
C
u
õ
·
L
=
1
L
v
C

R
L
i

L
+ 0u (A-4)
v
O
= 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
L
(i
L
+ I
L0
) +0u (A-5)
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 X
1
,andI
L
is now called X
2
.

˙
X
1
˙
X
2

=


0
−1
C
1
L
−R
L

X
1
X
2

+

1
C
0

(u) (A-6)
V
O
= RX
2
158 DISCRETE-SIGNAL ANALYSIS AND DESIGN
Now write the (A-6) equations as follows:
˙
X
1

= 0X
1

1
C
X
2
+
1
C
u
˙
X
2
=
1
L
X
1

R
L
X
2
+ 0u (A-7)
V
O
= RX
2
Next, we will solve Eq. (A-6) [same as Eq. (A-7) for X

1
( =v
c
), X
2
( =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
y = Cx + Du
(A-8)
in which A, B, C,andD 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. Equations (A-6), (A-7), and (A-9) can be
Laplace-transformed. In this process the unit matrix [I] =

10
01

,and
this work must be in accordance with the rules of matrix algebra and the
ADDITIONAL DISCRETE-SIGNAL ANALYSIS AND DESIGN INFORMATION 159
Laplace 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]
−1
x(0) + [sI − A]
−1
BU(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 discrete-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
−1
C
1
L
−R
L

+

10
01

(A-10)
×

x
0
(n −1)
x
1
(n −1)

+ T

b
0
b

1

u(n)
Figure A-3 shows this equation in Mathcad program form. We can imme-
diately use three options:
1. Initial conditions x
0
(0) and x
1
(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)] b
0
=1, b
1
=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.
160 DISCRETE-SIGNAL ANALYSIS AND DESIGN
N
:= 1000 n := 0,1 N
b := u(n) := 100 sin
x(n) : =
if n = 0
T
+
0
1
L
−1

C
R
L
1
0
0
1
.x(n − 1) + T b u(n) if n > 0
T := 0.01 R := 0.01 L := 0.5 C := 0.5
1
0
2 π 4mA
n
N
0
0
0 200 400 600 800 1000
−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
,andu(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, b
0
=1.0, b
1
=0. The buildups from zero of x
1
(capacitor
volts) and x
2
(inductor amperes) are plotted. The lag of I
L
(peaks at a
later time) can be noticed.

×