Page 153 - MATLAB an introduction with applications
P. 153
138 ——— MATLAB: An Introduction with Applications
[y, x, t] = impulse (num, den) ...(3.52)
[y, x, t] = impulse (num, den, t) ...(3.53)
[y, x, t] = impulse (A, B, C, D) ...(3.54)
[y, x, t] = impulse (A, B, C, D, iu) ...(3.55)
[y, x, t] = impulse (A, B, C, D, iu, t) ...(3.56)
The command in Eq. (3.50) impulse (num, den) shows the plots of the unit impulse response on the monitor
(screen). The command in Eq. (3.51), impulse (A, B, C, D) produces a series of unit impulse-response plots
one for each input and output combination of the system defined in Eq. (3.39) with the time vector
automatically obtained. The vector t in Eqs. (3.53) and (3.56) is the user supplied time vector, which specifies
the times at which the impulse response is to be obtained. The scalar iu in Eqs. (3.55) and (3.56) is an index
into the inputs of the system and specifies which input is to be used for the impulse response. The matrices
x and y in Eqs. (3.52) to (3.56) contain the state responses of the system and the output respectively, evaluated
at the time points t.
3.20.3 Unit Ramp Response
Consider the system described in state space as
x = Ax + Bu
y = Cx + Du ...(3.57)
where u is the unit ramp function.
When all the initial conditions are zeros, the unit ramp response is the integral of the unit step response.
Therefore, the unit ramp response is given by
t
z = ∫ ydt ...(3.58)
0
or
z = y = x 1 ...(3.59)
Defining
z = x 3 ...(3.60)
Equation (3.59) can be written as
x = x 1 ...(3.61)
3
Combining Eqs. (3.57) and (3.61), we can write
x = AAx + BBu
z = CCx + DDu ...(3.62)
The MATLAB command
[z, x, t] = step (AA, BB, CC, DD) ...(3.63)
can be used to obtain the unit-ramp response curve z (t).
3.20.4 Response to Arbitrary Input
The response to an arbitrary input can be obtained by using the following MATLAB commands:
lsim (num, den, t) ...(3.64)
lsim (A, B, C, D, u, t) ...(3.65)
F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09