Experiment Name:: Analysis of Effect of Input Waveform, Loop Gain, and System Type Upon Steady-State Errors
Experiment Name:: Analysis of Effect of Input Waveform, Loop Gain, and System Type Upon Steady-State Errors
Analysis of Effect of Input Waveform, Loop Gain, and System Type upon Steady-State
Errors
Objective:
To verify the effect of the input waveform, loop gain, and system type upon steady-state
errors
Apparatus:
MATLAB software
Code:
clc;
clear all;
close all;
s=tf('s');
% System type
G1=((100*s^3+1500*s^2+6200*s+4800)/
(s^5+32*s^4+367*s^3+1776*s^2+3024*s)); %Type I System
ts1 = feedback(G1,1,-1);
% Input definition
t = 0:0.1:20;
R0=(t>=0); %Unit Step
R1=t; %Unit Ramp
R2=0.5.*t.*t; %Parabola
figure(1)
subplot(311),plot(t,y1,'r',t,R0,'b',
t,e1 ,'k'),xlabel('Time(sec)'),ylabel('Amplitude'),ylim([0,1.5]),legend(
'Output','Input','Error'),title('Step response - type 1')
subplot(312),plot(t,yy1,'r',t,R1,'b', t,ee1 ,'k'),xlabel('Time
(sec)'),ylabel('Amplitude'),legend('Output','Input','Error'),title('Ramp
response - type 1')
subplot(313),plot(t,yyy1,'r',t,R2,'b', t,eee1,'k'),xlabel('Time
(sec)'),ylabel('Amplitude'),legend('Output','Input','Error'),title('Para
bolic response - type 1')
Output:
• For a step input, the error is becoming close to zero, so we can count it as zero.
• For a ramp input, the error is approximately 0.63 (constant) along the time axis.
• for a parabolic input, the error is increasing continuously and it will become
infinity.
So, after observing these steady-state errors from the graph, we can confirm that it is a
type-1 system.
Code:
clc;
clear all;
close all;
s=tf('s');
% System type
G0=((100*s^3+1500*s^2+6200*s+4800)/(s^4+32*s^3+367*s^2+1776*s+3024));
%Type 0 System
G1=((100*s^3+1500*s^2+6200*s+4800)/
(s^5+32*s^4+367*s^3+1776*s^2+3024*s)); %Type I System
G2=((100*s^3+1500*s^2+6200*s+4800)/
(s*(s^5+32*s^4+367*s^3+1776*s^2+3024*s))); %Type II System
ts0 = feedback(G0,1,-1);
ts1 = feedback(G1,1,-1);
ts2 = feedback(G2,1,-1);
% Input definition
t = 0:0.1:20;
R0=(t>=0); %Unit Step
Output:
Step Info
Type-0 system:
Rise Time: 0.5937
Settling Time: 22.4531
Settling Min: 0.6135
Settling Max: 0.8266
Overshoot: 34.7374
Undershoot: 1.8097e-14
Peak: 0.8266
Peak Time: 2
Steady-State Error: 0.3865
Type-1 system:
Rise Time: 0.5937
Settling Time: 22.4531
Settling Min: 0.6135
Settling Max: 0.8266
Overshoot: 34.7374
Undershoot: 1.8097e-14
Peak: 0.8266
Peak Time: 2
Steady-State Error: ~0
Type-2 system:
Rise Time: 0.5937
Settling Time: 22.4531
Settling Min: 0.6135
Settling Max: 0.8266
Overshoot: 34.7374
Undershoot: 1.8097e-14
Peak: 0.8266
Peak Time: 2
Steady-State Error: ~0
Code:
clear all;
close all;
s=tf('s');
% System type
G0=((100*s^3+1500*s^2+6200*s+4800)/(s^4+32*s^3+367*s^2+1776*s+3024));
%Type 0 System
G1=((100*s^3+1500*s^2+6200*s+4800)/
(s^5+32*s^4+367*s^3+1776*s^2+3024*s)); %Type I System
G2=((100*s^3+1500*s^2+6200*s+4800)/
(s*(s^5+32*s^4+367*s^3+1776*s^2+3024*s))); %Type II System
ts0 = feedback(G0,1,-1);
ts1 = feedback(G1,1,-1);
ts2 = feedback(G2,1,-1);
% Input definition
t = 0:0.1:20;
R1=t; %Unit Ramp
Output:
• Type-0 system: Steady-State Error: ~∞
• Type-1 system: Steady-State Error: 0.63
• Type-2 system: Steady-State Error: ~0
Question :4
The system’s parabolic response for each of the three type is given below:
Code:
clear all;
close all;
s=tf('s');
% System type
G0=((100*s^3+1500*s^2+6200*s+4800)/(s^4+32*s^3+367*s^2+1776*s+3024));
%Type 0 System
G1=((100*s^3+1500*s^2+6200*s+4800)/
(s^5+32*s^4+367*s^3+1776*s^2+3024*s)); %Type I System
G2=((100*s^3+1500*s^2+6200*s+4800)/
(s*(s^5+32*s^4+367*s^3+1776*s^2+3024*s))); %Type II System
ts0 = feedback(G0,1,-1);
ts1 = feedback(G1,1,-1);
ts2 = feedback(G2,1,-1);
% Input definition
t = 0:0.1:20;
R2=0.5.*t.*t; %Parabola
Output:
• Type-0 system: Steady-State Error: ~∞
• Type-1 system: Steady-State Error: ~∞
• Type-2 system: Steady-State Error: 0.63
Question: 5
We can find the theoretical values of steady state errors from the lab sheet of software
experiment 2:
So, we can say the theoretical value of steady state error for each type of the system match
the value we obtained.