0% found this document useful (0 votes)
21 views2 pages

Mat Lab

The document contains MATLAB code that models different transfer functions using feedback and series connections and plots the step response for various parameter values. The code defines multiple transfer functions, connects them in series and feedback configurations, and sweeps a parameter k through a range of values to observe the effect on the step response.

Uploaded by

Saud Mudassar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Mat Lab

The document contains MATLAB code that models different transfer functions using feedback and series connections and plots the step response for various parameter values. The code defines multiple transfer functions, connects them in series and feedback configurations, and sweeps a parameter k through a range of values to observe the effect on the step response.

Uploaded by

Saud Mudassar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

5a

clc;close all;clear all


k=10 %assuming k=10
sys1=tf([11 k],[1]);
sys2=tf([1],[1 1 0]);
sys3=series(sys1,sys2);
sys4=feedback(sys3,[1])
5b
clc;close all;clear all
k=10 %assuming k=10
sys1=tf([1],[1 1 0]);
sys2=tf([11 k],[1]);
sys4=feedback(sys1,sys2)
5c
clc;close all;clear all
k=[10 20 50 100];
h=length(k)
for i=1:h
sys1=tf([11 k(i)],[1]);
sys2=tf([1],[1 1 0]);
sys3=series(sys1,sys2);
sys4=feedback(sys3,[1]);
subplot (h,1,i)
step(sys4);
title(['k=',num2str(k(i))]);
disp(['k=',num2str(k(i))]);
stepinfo(sys4)
end
5d
clc;close all;clear all
k=[10 20 50 100];
h=length(k);
for i=1:h
sys1=tf([1],[1 1 0]);
sys2=tf([11 k(i)],[1]);
sys4=feedback(sys1,sys2);
subplot (h,1,i)
step(sys4);
title(['k=',num2str(k(i))]);
disp(['k=',num2str(k(i))]);
stepinfo(sys4)
end
4
clc;close all;clear all
k=[20 30 50 60 80];
h=length(k);
for i=1:h
sys1=tf([k(i)],[1]);
sys2=tf([5],[1]);
sys3=series(sys1,sys2);
sys4=tf([1],[1 20 0]);
sys5=series(sys3,sys4);
sys6=feedback(sys5,[1]);
subplot (h,1,i)
step(sys6);
title(['k=',num2str(k(i))]);
disp(['k=',num2str(k(i))]);
stepinfo(sys6)
end

You might also like