initial
(sys, x0)(sys1, sys2, …, sysN, x0)(sys1, 'style1', …, sysN, 'styleN', x0)(sys1, …, x0, t)(sys1, …, x0, tfinal)(sys1, …, x0, tfinal, dt)[y, t, x] = initial (sys, x0)[y, t, x] = initial (sys, x0, t)[y, t, x] = initial (sys, x0, tfinal)[y, t, x] = initial (sys, x0, tfinal, dt)Initial condition response of a state-space model. If no output arguments are given, the response is printed on the screen.
Inputs
LTI system in state-space representation.
Vector of initial conditions for each state.
Optional time vector. Should be evenly spaced. If not specified, it is calculated by the poles of the system to reflect adequately the response transients.
Optional simulation horizon. If not specified, it is calculated by the poles of the system to reflect adequately the response transients.
Optional sampling time. Be sure to choose it small enough to capture transient phenomena. If not specified, it is calculated by the poles of the system.
Line style and color, e.g. ’r’ for a solid red line or ’-.k’ for a dash-dotted
black line. See help plot for details.
Outputs
Output response array. Has as many rows as time samples (length of t) and as many columns as outputs.
Time row vector.
State trajectories array. Has length (t) rows and as many columns as states.
Example
Consider a continuous- or a discrete-time system of the form
Continuous Time: $$\dot{x}(t) = A\,x(t) + B\,u(t),\quad x(0)=x_0,\quad y(t) = C\,x(t) + D\,u(t)$$
Discrete Time: $$x(k+1) = A\,x(k) + B\,u(k),\quad x(0)=x_0,\quad y(k) = C\,x(k) + D\,u(K)$$
The dynamic behavior of the system for u=0 and only driven by the initial system state x(0) is given by
sys = ss (A, B, C, D); initial (sys, x0);
Remark
For a SISO input-output model G and initial values for the output y and its derivatives up to order n-1 the corresponding state space represetaiton is computed by:
[A,b,c,d] = ssdata (G); T = obsv (A, c); G_ss = ss2ss (ss (G), T); initial (G_ss, x0);
Note that, in general, the states of G_ss are only equal to the output y and its first n-1 time derivaties if u=0, which is the case for the initial condition response.
Source Code: initial