# Decide P controller gain K so that phase margin is 50 deg

I need help finding the gain $$\K\$$ so that the phase margin for the system equals 50 degrees.

$$F(s) = K$$

$$G(s) = \dfrac{1}{(s+1)^2}$$

$$\v\$$ is a process disturbance sinusoid with amplitude 2.5 and freq 0.5 rad/s. Image below.

Now I need to find K so that the phase margin = 50 deg. I tried:

$$\\varphi_m = 180\$$ deg $$\+ \arg G(i\omega_c) + \arg F(i\omega_c) = 50\$$ deg

and solve for $$\\omega_c\$$ but I can't really figure out how to. Do I have to account for the disturbance as well? If so, why? why not?

• No - the disturbance has nothing to do with stability margins. Are you able to find the phase response for G(s)? – LvW Aug 19 '20 at 9:32
• @LvW I got: arg G(jw) = arctan(0) - arctan(2w/(1-w)) = -arctan(2w/(1-w)). I know that arg F + arg G = 50-180 deg. – Mati Aug 19 '20 at 11:33
• PM only depends on the OLTF. Signals don't matter. – Chu Aug 19 '20 at 12:27
• This is somewhat like 2 non-inverting Op Amps with negative feedback and choose gain so PM 50deg, at what gain. Or in other words , what is the GBW? what is BW and PM with a closed loop gain of 1 and at f-3dB – Tony Stewart EE75 Aug 19 '20 at 12:29
• Dont use the phase equation to find $\omega_c$. Use the gain equation (i.e. the definition of gain cross over frequency) to find $omega_c$. $|G(\omega_c)\cdot F(\omega_c)| = 1$. Solve for $\omega_c$ from this. Then use that in the phase equation to find K. – AJN Aug 19 '20 at 14:29

From you question I understand that you have written one equation and have unknown variables in it; viz, $$\\omega_c\$$ and K. If you write one more equation, you may be able to solve for K. To that end,
\ \begin{align} |GF|_{s=j\omega_c} ={}& 1\\ \frac{K}{|1+j\omega_c|^2} ={}& 1\\ K^2={}& (1+\omega_c^2)^2 \\ \end{align}\
Solve for $$\\omega_c\$$ in terms of K.
In the phase equation you already have with you, substitute $$\\omega_c\$$ with the expression containing K. Now that equation has only one unknown, viz. K. Solve!