Professional Documents
Culture Documents
Labsheet Exp2
Labsheet Exp2
Objectives:
To verify the effect of input waveform, loop gain, and system type upon steady-state
errors
Software requirements:
MATLAB
Theory:
The difference between the input and output of a control system as the time tends to infinity,
i.e. the system has reached a steady state is called the steady state error. The steady-state error
depends on the type of input (step, ramp, parabolic etc.) and the type of system (0, I or II).
System Type:
The system type depends on the open loop transfer function (G(s)). The number of pure
integrations in the forward path of a system is called the type of a system. Let us consider the
following systems:
1
𝐺(𝑠) = 𝑠2 +2𝑠+5 is a type-0 system.
1
𝐺(𝑠) = 𝑠(𝑠2 +2𝑠+5) is a type-I system.
1
𝐺(𝑠) = 𝑠2 (𝑠2 +2𝑠+5) is a type-II system.
1
Now if the system is provided with unit step input, R(s)=
𝑠
1
𝑠. 𝑠 1 1 1
∴ 𝑒(∞) = lim = lim = =
𝑠→0 1 + 𝐺(𝑠) 𝑠→0 1 + 𝐺(𝑠) 1 + lim 𝐺(𝑠) 1 + 𝑘𝑝
𝑠→0
Relationships between input, system type, static error constants, and steady-state
errors:
clc;
clear all;
close all;
s=tf('s');
G0=(100*(s+3)*(s+5))/((s+7)*(s+8)); %Type 0 System
G1=(100*(s+3)*(s+5))/(s*(s+7)*(s+8)); %Type I System
G2=(100*(s+3)*(s+5))/(s*s*(s+7)*(s+8)); %Type II System
ts0 = feedback(G0,1);
ts1 = feedback(G1,1);
ts2 = feedback(G2,1);
t = 0:0.1:10;
R0=(t>=0); %Unit Step
R1=t; %Unit Ramp
R2=0.5.*t.*t; %Parabola
[y0,t,x0] = lsim(ts0,R0,t); %Response of Type 0 system to Step input
e0=R0'-y0; %Error of Type 0 system to Step input
[y1,t,x1] = lsim(ts1,R0,t); %Response of Type I system to Step input
e1=R0'-y1; %Error of Type I system to Step input
[y2,t,x2] = lsim(ts2,R0,t); %Response of Type II system to Step input
e2=R0'-y2; %Error of Type II system to Step input
figure;
subplot(311),plot(t,y0,'r',t,R0,'b', t,e0 ,'k'),xlabel('Time
(sec)'),ylabel('Amplitude'),ylim([0,1.5])
subplot(312),plot(t,y1,'r',t,R0,'b', t,e1 ,'k'),xlabel('Time
(sec)'),ylabel('Amplitude'),ylim([0,1.5])
subplot(313),plot(t,y2,'r',t,R0,'b', t,e2 ,'k'),xlabel('Time
(sec)'),ylabel('Amplitude'),ylim([0,1.5])
1. What is the type of the system? Comment by analyzing the error corresponding to step,
ramp and parabolic input.
2. Show the step response of the system and find the step information of the system. Show
the same for the other two types. Find the steady state error in each cases.
3. Show the ramp response of the system. Show the same for the other two types. Find the
steady state error in each cases.
4. Show the parabolic response of the system. Show the same for the other two types. Find
the steady state error in each cases.
5. What are the theoretical values of errors in each case? Do the steady state error in each
case match the theoretical value?