CARIBBEAN MARITIME UNIVERSITY
CARIBBEAN MARITIME UNIVERSITY
SUBJECT: CONTROLS 2
Notes for Guidance of Candidates:
This project is worth 30% of the course grade.
Candidates are required to do ALL three exercises.
Marking Criteria
Content 85 %
Presentation 13 %
Citations and reference 2%
Submit a project report in Microsoft Word of all the work done in the Exercises 1 to 3.
Where relevant, provide MATLAB codes. Programs and subroutines should have comments including the names of group members, date program was written etc.
Report should be done in groups not exceeding three (3) persons.
Reports should be uploaded to folder called Controls 2 Project on Moodle no later August 25, 2023.
Any duplicated report or/and program will attract a project grade of zero.
AIM:
To use Matlab and Routh-Hurwitz criterion to investigate the stability of a system , determine the value of the poles and their location and its state space representation.
FACILITIES REQUIRED:
MATLAB software.
Computer.
EXERCISE:
Using MATLAB, find the transfer function of the closed loop system G(s) ,
Analyze and modify the program given in the Appendix and use it to determine whether G(s), is stable. The program is used to determine stability. It is based on Routh Hurwitz.
Using the Routh-Hurwitz criterion manually find how many poles of the closed-loop system, G(s), are located in the rhp, in the lhp, and on the j-axis.
Using MATLAB calculate the poles of transfer function of G(s) .
Using MATLAB determine the state space representation of G(s) .
REPORT:
Submit a report on the work done.
Appendix Matlab Program
Program
clear
clc
%% firstly it is required to get first two row of routh matrix
e=input('enter the coefficients of characteristic equation: ');
disp('------------------------------------------------------------------------- ')
l=length(e);
m=mod(l,2);
if m==0
a=rand(1,(l/2));
b=rand(1,(l/2));
for i=1:(l/2)
a(i)=e((2*i)-1);
b(i)=e(2*i);
end
else
e1=[e 0];
a=rand(1,((l+1)/2));
b=[rand(1,((l-1)/2)),0];
for i=1:((l+1)/2)
a(i)=e1((2*i)-1);
b(i)=e1(2*i);
end
end
%% now we genrate the remaining rows of routh matrix
l1=length(a);
c=zeros(l,l1);
c(1,:)=a;
c(2,:)=b;
for m=3:l
for n=1:l1-1
c(m,n)=-(1/c(m-1,1))*det([c((m-2),1) c((m-2),(n+1));c((m-1),1) c((m-1),(n+1))]);
end
end
disp('the routh matrix:')
disp(c)
%% now we check the stablity of system
if c(:,1)>0
disp('System is Stable')
else
disp('System is Unstable');
end