Extras: Type 1 Systems Examples
Let's say that we have a unity-feedback system as shown below
where G(s) is the following.
(1)
Let's look at the closed-loop response for this system when we use different inputs.
Step Input
s = tf('s'); G = 1/(s*(s+2)*(s+3)); sys_cl = feedback(G,1); [y,t] = step(sys_cl); u = ones(size(t)); plot(t,y,'b',t,u,'m') axis([0,29,0,1.1]) xlabel('Time(secs)') ylabel('Amplitude') title('Input-purple, Output-blue')
Our steady-state error is a zero.
Ramp Input
s = tf('s'); G = 1/(s*(s+2)*(s+3)); sys_cl = feedback(G,1); t = 0:0.1:100; u = t; [y,t,x] = lsim(sys_cl,u,t); plot(t,y,'b',t,u,'m') xlabel('Time(secs)') ylabel('Amplitude') title('Input-purple, Output-blue')
Our steady-state error is a constant.
Parabolic Input
num = 1; s = tf('s'); G = 1/(s*(s+2)*(s+3)); sys_cl = feedback(G,1); t = 0:0.1:150; u = 0.5*t.*t; [y,t,x] = lsim(sys_cl,u,t); plot(t,y,'b',t,u,'m') xlabel('Time(secs)') ylabel('Amplitude') title('Input-purple, Output-blue') %
Our steady-state error is infinite (the error grows unbounded as time increases toward infinity).