
Example 8.9
Obtain difference equations for simulating the unit step response of the system
dx
dt
¼ lx þ u, l ¼0:25 (8:339)
using the real-time compatible integrators
(a) Modified Euler.
(b) AB-2.
(c) Real-time predictor–corrector.
(d) Choose the step size T, so that lT ¼0.25, 1 for the modified Euler and real-time
predictor–corrector and lT ¼0.125, 0.5 for the AB-2 integrator. Graph the step
responses along with the exact solution and comment on the results.
(a) From Equation 8.323 for modified Euler, the estimated state at the halfway point is
^
x
nþ1=2
¼ x
n
þ 0:5Tf
n
(8:340)
¼ x
n
þ 0:5T(lx
n
þ u
n
)(8:341)
¼ (1 þ 0:5lT)x
n
þ 0:5Tu
n
(8:342)
and the second pass produces ...