Control Systems – How to Calculate Gain Margin in Transfer Function and Constant K

controlcontrol systemcontrol theory

This is the problem statement:

There is a mechanical crane whose Transfer Function is shown. If it is implemented
The automatic system shown, closing the loop and adding the G1 block (s), you are asked:

a)Determine analytically, what should be the Transfer Function simpler (“type 0”) for G1 (s), if you want the closed loop system is stable and that the modulus of the Phase Margin is 60 °.

b) Taking into account the previous answer, what would be the Gain Margin?

enter image description here

My solution is:

First part:
enter image description here

Second part:
enter image description here

And my question is:

The frequency w should come out positive, but it comes out negative, this is not valid, right?
In class, my teacher commented that when complex conjugate poles are involved, they contribute a maximum of -180 °, but since the arctangent limits to -90 °, we had to proceed differently, does anyone know how I could solve this exercise?

UPDATE

After Chu's observation

These are the answers:

a) K = 0.009342

b) G.M = 8.54954 ≈ 8.55

To check it, simulate it in Scilab, obtaining the Bode plot in magnitude and phase, and apart G.M and its frequency (in Hertz, to pass it to rad / s, divide by 2pi); and also P.M and its frequency (in Hertz, to convert it to rad / s, divide by 2pi)

Scilab Console

enter image description here

Bode Plot

enter image description here

Best Answer

Working in arctan is quite difficult. Instead, use complex notation, and this will give the answer, \$\omega =\large \frac{\sqrt{5}}{2}\$ rad/sec.

... In response to the OP's comment ...

Thus, ignore the numerator gain (10) as this does not affect the phase angle, and work from: $$G(s)=\frac{(s+5)}{s(s^2 +s +1)}$$

Let \$s\rightarrow j\omega\$ : $$G(j\omega)=\frac{(5+j\omega)}{j\omega((1-\omega^2)+ j\omega)}$$ Rationalising:

$$G(j\omega)=\frac{(5+j\omega)}{-\omega^2+j\omega(1-\omega^2)}\times \frac{-\omega^2-j\omega(1-\omega^2)}{-\omega^2-j\omega(1-\omega^2)}$$ $$ $$ $$\therefore G(j\omega)=\frac{(-5\omega^2+\omega^2(1-\omega^2))-j(\omega^3+5\omega(1-\omega^2))}{\omega^6-\omega^4+\omega^2}\:\:\:(*)$$

For a phase angle of \$0^o\$ or \$-180^o\$, the imaginary part of the numerator must be zero, hence: $$\omega^3+5\omega(1-\omega^2))=0 $$

$$\therefore \omega=\pm\frac{\sqrt{5}}{2}\mathrm{rad/sec}$$

The negative frequency can be ignored (mathematically, gives \$0^o\$), hence, the phase angle is \$-180^o\$ at the frequency:

$$ \omega=\frac{\sqrt{5}}{2}\mathrm{rad/sec}$$

... In response to the OP's comment (2) ...

From equation (*), a phase angle of -120 deg is obtained when:

$$\frac{-(\omega^2+5(1-\omega^2)}{(-5\omega+\omega(1-\omega^2))}=\sqrt{3} $$

$$\therefore \sqrt{3}\omega^3+4\omega^2+4\sqrt{3}\omega-5=0 $$ The only real solution is \$\omega=0.52576\$ rad/sec. Hence, plug this into the gain expression to find the required K value to bring the open loop gain to 0 dB