State Space Analysis

Modern Control Theory

Classical Control Theory

// laplace domain
s = %s;

//simulation time period
dt = 0.1;
t = 0:dt:1;

//classical control theory
c1 = syslin('c', 1,s);
c2 = syslin('c',1,s^2);
vc = csim('step',t,c1);
pc = csim('step' , t,c2);
yc = [pc' vc']


//modern control theory
A = [0 dt ; 0 0];
B = [0 ; dt];
C = [1/(dt*dt) 0 ; 0 1/dt];
D = [0 ; 0];
m = syslin('c' , A,B,C,D);
ym = csim('step' , t, m);
ym = ym'


//plot
clf;
subplot(211);
plot(t',yc);
subplot(212);
plot(t' ,ym);
For executing above code
click HERE