% Root Locus of 1+KH(s)G(s)=0 H(s)=1

% Plant OLTF
num=[1]; den=conv([1 0],conv([1 3],[1 6 20]));
G=tf(num,den);
rlocus(G);
grid on;

dur=20;

%Responses 1
%K=20; % four distinct poles of which two are real and two are complex
%cltf1=feedback(G,K);
%step(cltf1,dur); hold on;

%Responses 2
%K=30; % four poles of which two are real coincident and two are complex
%cltf2=feedback(G,K);
%step(cltf2,dur); hold on;

%Responses 3
%K=150; % four distinct complex poles
%cltf3=feedback(G,K);
%step(cltf3,dur); hold on;

%Responses 4
%K=240; % unstable
%cltf4=feedback(G,K);
%step(cltf4,dur); hold on;

%DCG adjusted Response 2
%K=30; % four poles of which two are real coincident and two are complex
%step(K*cltf2,dur); hold on;

grid on;