# How do I find value of gain that stablizes the system from root locus?

Consider the following root locus:

which is obtained by the following code:

s = tf('s');
G = [2/(s+1) 3/(s+2);1/(s+1) 1/(s+1)];

k1 = 1;
k2 = 1;
D4 = [k1*(s+1)/s k2; -k1*(s+1)/s k2];
F4 = G * D4;

figure;
rlocus(F4(1,1))


how can I find the value of $$\k1\$$ that makes the closed loop stable from the root locus?

I have tried looking at the windows that opens in the plot:

and considered these valuse of gain as a bound for the gain to use,so I tried to use values of gain between $$\0\$$ and $$\1.90\$$, but the system is still unstable.

How can i solve this?

If I try to use the Routh criterion to find the value of $$\k1\$$ I have that the closed loop is:

$$\\frac{F4(1,1)}{1+F4(1,1)}=\frac{-k(s-1)}{s^{2}+s(2-k)+k}\$$

and then I use the Routh locus as follows:

$$\s^{2} :\$$ $$\1\$$ | $$\1\$$

$$\s^{1} :\$$ $$\2-k\$$ | $$\0\$$

$$\s^{0} :\$$ $$\1\$$ | $$\0\$$

where I have used the bar $$\|\$$ to indicate that the numbers belong to different columns in the table.

And so I should have that the closed loop is stable for $$\k1<2\$$, but if I use for example $$\k1=1\$$ the system is still unstable.

I have also done the Routh criterion for $$\k2\$$, which resulted in saying that I nedd $$\k2>-0.28\$$, but the system is still unstable.

What am I doing wrong?

also If I look for the gain margin, I have :

gm = margin(F4(1,1))


which gives as result:

gm =

2.0000


this if I consider $$\k1=1\$$ in $$\F4(1,1)\$$, so it agrees with my calculation using the Routh Criterion above, but why is it still unstable?

But for $$\F4(2,2)\$$ I have infinite gain margin, ans since I have done a partial decoupling, I have also the term $$\F4(1,2)\$$ for which also the gain margin is infinite. Could it be that the problem is this?

• Thanks for answering, I have tried also using the Routh criterion to find the intervalo of $k$ , as I edited in my question, but I am still doing something wrong. – J.D. Jan 28 '20 at 15:28