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

Contol Lab 8 Task

The document contains code to model and simulate transfer functions in MATLAB. It defines several transfer functions using numerator and denominator polynomials. It then connects the transfer functions in different configurations using sum and product blocks to form two separate closed loop feedback systems. Each system is simulated for a specified number of time steps.

Uploaded by

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

Contol Lab 8 Task

The document contains code to model and simulate transfer functions in MATLAB. It defines several transfer functions using numerator and denominator polynomials. It then connects the transfer functions in different configurations using sum and product blocks to form two separate closed loop feedback systems. Each system is simulated for a specified number of time steps.

Uploaded by

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

clear all

close all
num1=[0 1];
den1=[1 2];
num2=[0 1];
den2=[1 3];
numH=[0 1];
denH=[1 4];
numF=[0 1];
denF=[1 5];
G1=tf(num1,den1);
G2=tf(num2,den2);
H=tf(numH,denH);
F=tf(numF,denF);
G1.InputName = 'e' ;
G1.OutputName = 'uc' ;
G2.InputName = 'u' ;
G2.OutputName = 'y' ;
H.InputName = 'y' ;
H.OutputName = 'y1' ;
F.InputName = 'r' ;
F.OutputName = 'uf' ;
sum1=sumblk('e','r','y','+-');
% e = r-y
sum2=sumblk('u','uc','uf','++'); % Sumblk('u=uc+uf');
Tff=connect(G1,G2,H,F,sum1,sum2,'r','y');
step(Tff,7)
clear all
close all
s = tf('s');
P=1/(s*(s+6));
K=18*s^0;
K.InputName = 'e' ;
P.InputName = 'u' ;

K.OutputName = 'u' ;
P.OutputName = 'y' ;

sum1=sumblk('e','r','y','+-');
% e = r-y
%sum2=sumblk('u','uc','uf','++'); % Sumblk('u=uc+uf');
Tff=connect(K,P,sum1,'r','y');
step(Tff,15)

You might also like