0% found this document useful (0 votes)
41 views

(I) The Unit Step Matlab Code:: Problem - 1

The document presents Matlab code to simulate and analyze the step response, impulse response, rise time, settling time, and percentage overshoot of a unity feedback system as the parameter eta is varied from 0 to 1. The code generates plots of the unit step response, unit impulse response, rise time, settling time, and percentage overshoot versus eta. It also produces 3D surface plots of the step response and impulse response over time and eta.

Uploaded by

crazyrmr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

(I) The Unit Step Matlab Code:: Problem - 1

The document presents Matlab code to simulate and analyze the step response, impulse response, rise time, settling time, and percentage overshoot of a unity feedback system as the parameter eta is varied from 0 to 1. The code generates plots of the unit step response, unit impulse response, rise time, settling time, and percentage overshoot versus eta. It also produces 3D surface plots of the step response and impulse response over time and eta.

Uploaded by

crazyrmr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Problem 1.

(i)

The unit step


Matlab code:
ti=0:0.001:10;
for eta = 0:0.2:1
num =[25];
den= [1 10*eta 0];
sys=tf(num,den);
T=feedback(sys,1);
step(ti,T);
hold on;
end

(ii)

The unit impulse

Matlab code:
ti=0:0.001:10;
for eta = 0:0.2:1
num =[25];
den= [1 10*eta 0];
sys=tf(num,den);
T=feedback(sys,1);
impulse(ti,T);
hold on;
end

(iii) Rise time, settling time, % maximum overshoot


eta = 0:0.01:1;
tr=(2.16*eta+0.6)/5;
ts=4./(eta*5);
po=100*exp((-eta*pi)./(sqrt(1-eta.^2)));
figure;
plot(eta,tr,'LineWidth',4,'MarkerEdgeColor','k',...
'MarkerFaceColor','g','MarkerSize',10);
hold on
ylabel('Rise Time (in secs) -->');
xlabel('eta -->');

hold off
figure;
plot(eta,ts,'LineWidth',4,'MarkerEdgeColor','k',...
'MarkerFaceColor','g','MarkerSize',10);
hold on
ylabel('Settling Time (in secs) -->');
xlabel('eta -->');
hold off
figure;
plot(eta,po,'LineWidth',4,'MarkerEdgeColor','k',...
'MarkerFaceColor','g','MarkerSize',10);
hold on
ylabel('Peak Overshoot (in %) -->');
xlabel('eta -->');
hold off

(iv) Three Dimentional Diagram

clear all; clc


ti=0:0.01:4;
eta=0:0.01:1.5;
l = length(ti);
for n=1:151
num =25;
den= [1 10*eta(n) 0];
sys=tf(num,den);
T=feedback(sys,1);
y(n, 1:l)=step(ti,T);
z(n, 1:l)=impulse(ti,T);
end
figure ; mesh(ti,eta,y);
figure ; mesh(ti,eta,z);

Step response

Impulse Response

You might also like