# Designing a PI controller

by glorimda
Tags: controller, designing
 P: 140 The secret is in the fact that there is a pole @ $s=0$ in the plant. When you apply the feedback controller, You'll have $H(s) = \frac{G_c(s)G(s)}{1 + G_c(s)G(s)}$ where $G_c(s)$ is the controller. You start with the criterion they gave you $\frac{G(0)}{1 + K_pG(0)} = 1$. In order to use this, you first have to plug in G(s). Notice, that of course, if we then set $s=0$, that the expression blows up, so instead we have to do the Laplace domain equivalent of L'Hopital's rule, which is multiplying the expression by a fancy form of one, or $\frac{s}{s}$. Assigning ${\hat{G}}(s) = \frac{210}{(5s+7)(s+3)}$, then you'll have $\frac{{\hat{G}}(s)}{s + K_p{\hat{G}}(s)}$. Notice now that if you plug in 0, the expression simplifies to $\frac{21}{K_p21}$ which, set equal to one, produces the result that $K_p=1$. Unfortunately, I remember less about the phase margin controller design. Maybe I'll brush up and get back to you (I love reviewing. I seriously might.). But I will say this... The design centers around starting with the bode plot for G(s). Since the new plant will be Gc(s)G(s), the phases will add, and you have to cancel out the unwanted phase in the plant with the controller. It's also standard to add in 5 degrees of safety within the design procedure since it's known that this procedure involves some, perhaps strong, approximation. This is vague and I'm sorry I don't have more details. But I hope this helps get you started...