Chapter 4 System Analysis
Xmath Control Design Module 4-16 ni.com
The maximum time, Tmax, is computed as follows, with vP denoting the
vector of scaled poles and dt the period:
Tmax=abs(log(.05)/...
max(real(vP(find(real(vP)<>0)))))
If Tmax == null # all poles purely imaginary
Tmax=100*dt
endIf
Tmax=max(Tmax,10*dt)
tvec=0:dt:Tmax
Though deftimerange( ) calls minimal( ) to remove any pole-zero
cancellations, it does not consider the location of the system zeros in
computing the time vector. As a result, if Sys has zeros that are more than
a decade beyond its maximum or minimum poles, the effects of these zeros
may not be apparent in a time response calculated using tvec. You should
supply your own time vector to impulse( ), initial( ), and step( )
in these cases.
System Response to Initial Conditions
It is often assumed that the states of a system have zero initial conditions,
and the X0 field of a state-space system object correspondingly defaults to
zero. In many cases, however, you need to examine the system response to
a given set of nonzero initial conditions; a common system design goal is
that this response become zero (or negligibly small) as quickly as possible.
The Xmath function initial( ) allows you to do this. You also can use
superposition to calculate forced initial condition response.

initial( )

Y = initial(Sys,T,{X0})
The initial( ) function computes the unforced response of a system
from its initial conditions. By default it uses the initial conditions stored
with the input system itself, but an alternate set of initial conditions can be
specified as the keyword X0. A time vector (with spacing equal to the
sampling period of the system if it is discrete) also can be specified, or
initial( ) can compute a default time vector internally using
deftimerange( ).