Page 293 - Applied Numerical Methods Using MATLAB
P. 293
282 ORDINARY DIFFERENTIAL EQUATIONS
where
∞ m m
A T
=
(m + 1)!
m=0
AT
AT
AT AT
∼
= I + I + I +· · · + I + ··· for N 1
2 3 N − 1 N
(6.5.19)
Now, we apply these discretization formulas for the continuous-time state
equation (6.5.3)
x (t) 0 1 x 1 (t) 0
1 = + u s (t)
x (t) 0 −1 x 2 (t) 1
2
x 1 (0) 1
with = and u s (t) = 1 ∀ t ≥ 0
x 2 (0) −1
to get the discretized system matrices and the discretized state equation as
−1 −t
s −1 (6.5.9) 11 − e
−1
−1
−1
φ(t) = L {[sI − A] }= L = −t
0 s + 1 0 e
(6.5.20a)
−T
(6.5.17a) (6.5.20a) 11 − e
A d = φ(T ) = −T (6.5.20b)
0 e
T
(6.5.17b)
B d = φ(τ) dτB
0
T −τ −T
(6.5.20a) 11 − e 0 T − 1 + e
= −τ dτ = −T (6.5.20c)
0 0 e 1 1 − e
(6.5.16)
x[n + 1] = A d x[n] + B d u[n]
−T −T
x 1 [n + 1] 11 − e x 1 [n] T − 1 + e
= + u[n] (6.5.21)
x 2 [n + 1] 0 e −T x 2 [n] 1 − e −T
We don’t need any special algorithm other than an iterative scheme to solve
this discrete-time state equation. The formulas (6.5.18a,b) for computing the
discretized system matrices are cast into the routine “c2d_steq()”. The pro-
gram “nm652.m” discretizes the continuous-time state equation (6.5.3) by using
the routine and alternatively, the MATLAB built-in routine “c2d()”. It solves
the discretized state equation and plots the results as in Fig. 6.6. As long as
the assumption that u[n] = u(nT ) for nT ≤ t< (n + 1)T is valid, the solution
(x[n]) of the discretized state equation is expected to match that (x(t)) of