1.29 Determine the response of a system to only initial conditions in state space

Problem: Given a system represented by state space, how to determine the response \(y(t)\) due some existing initial conditions in the states. There is no input forces.

Mathematica

Remove["Global`*"]; 
a = {{-0.5572, -0.7814}, {0.7814, 0}}; 
c = {{1.9691, 6.4493}}; 
sys=StateSpaceModel[{a,{{1},{0}},c,{{0}}}]
 

pict

x0 = {1,0};  (*initial state vector*) 
y  = OutputResponse[{sys,x0},0,{t,0,20}]; 
Plot[y,{t,0,20}, 
  PlotRange->All, 
  GridLines->Automatic, 
  GridLinesStyle->Dashed, 
  Frame->True, 
  ImageSize->300, 
  AspectRatio->1, 
  FrameLabel->{{"y(t)",None}, 
     {"t","system response"}}, 
  RotateLabel->False,PlotStyle->Red]
 

pict

 

Matlab

clear all; 
 
A = [-0.5572  -0.7814; 
     0.7814  0]; 
B = [1;0]; 
C = [1.9691  6.4493]; 
x0 = [1 ; 0]; 
 
sys = ss(A,B,C,[]); 
 
[y,t,x]=initial(sys,x0,20); 
plot(t,y); 
title('y(t) plant response'); 
xlabel('t (sec)'); 
ylabel('y(t)'); 
grid 
set(gcf,'Position',... 
   [10,10,320,320]);
 

pict