# How to place a zero of the PI controller?

Let's say I have a plant with following transfer function

$$G(s) = \frac{\frac{L_M\cdot R_R}{L_R}}{s + \frac{R_R}{L_R}} = \frac{0.0129}{s + 1.935}$$

and I would like to design a PI controller for it in a form $$D(s) = K\frac{s + z}{s}.$$ As far as the requirements regarding the controller design I need to fulfill

• settling time ($$t_s$$) not greater than $$200\,\mathrm{ms}$$
• percent overshoot ($$M_p$$) not greater than $$20\%$$

The rise time requirement can be translated via $$t_s \approx \frac{4.6}{\sigma}$$ into $$\sigma \geq \frac{4.6}{200\cdot 10^{-3}} \geq 23$$

The percent overshoot requirement can be translated via $$M_p = e^{\frac{-\pi\zeta}{\sqrt{1 - \zeta^2}}}$$ into $$\zeta = \frac{-\ln{Mp}}{\sqrt{\pi^2 + \ln^2{M_p}}} = \frac{-\ln{0.2}}{\sqrt{\pi^2 + \ln^2{0.2}}} = 0.46$$

In respect to the fact $$\sigma = \omega_n\cdot\zeta$$ I have a requirement for the natural frequency $$\omega_n \geq \frac{\sigma}{\zeta} = \frac{23}{0.5} = 46\,\mathrm{rad}\cdot\mathrm{s}^{-1}$$

Design via root locus

I have attempted to design the PI controller via the root locus method. The root locus for the plant with an integrator added looks like this

It is evident that I am not able to fullfill both of the requirements at the same time. Here I could probably exploit the ability of a transfer function zero to move the root locus more into the left half plane. My question is whether there is some rule of thumb for the PI controller zero location.

Design via pole-placement method

The closed loop transfer function is (with help of the wxMaxima)

$$T(s) = \frac{D(s)\cdot G(s)}{1 + D(s)\cdot G(s)} = \frac{K\cdot L_M R_R\cdot(s + z)}{L_R\cdot\left(s^2 + \frac{K\cdot L_M + 1}{L_R}R_R\cdot s + \frac{K\cdot L_M\cdot R_R\cdot z}{L_R}\right)}$$

In case I compare the polynomial in the denominator of $$T(s)$$ with the standard second order system I can write:

$$\frac{K\cdot L_M + 1}{L_R}R_R = 2\cdot\zeta\cdot\omega_n$$ i.e. $$K = \frac{2\cdot\zeta\omega_n\cdot\frac{L_R}{R_R} - 1}{L_M} = \frac{\frac{2\cdot 0.5\cdot 46\cdot 0.007027}{0.0136} - 1}{0.006649} \approx 3424$$ and $$\frac{K\cdot L_M\cdot R_R}{L_R}\cdot z = \omega_n^2$$ i.e. $$z = \omega_n^2\cdot\frac{L_R}{K\cdot L_M\cdot R_R} = 46^2\cdot\frac{0.007027}{3424\cdot 0.006649\cdot 0.0136} \approx 48$$

The PI controller with transfer function $$D(s) = 3424\cdot\frac{s + 48}{s}$$ gives following step response of the closed loop

• Why root locus? Why not compute the closed-loop TF and see what $z$ and $K$ need to be to meet spec? Pole placement works just fine here... Commented Jul 24, 2023 at 15:45
• @RollenS.D'Souza thank you for your reaction. I have just attempted to design the controller according to the pole-placement method (please see my original question). Please can you tell me whether you meant the same procedure? Commented Jul 24, 2023 at 17:14

If you require a root locus procedure, I'm sure any Introductory Control textbook will cover this. For instance, pg. 464 (Example 7.11) of Modern Control Systems (13th Ed) by Dorf & Bishop covers a procedure in which the root locus is used to solve almost the exact same problem you propose: using a PI control law against a standard first order system to meet certain response characteristics.

The basic idea is this. The root locus equation with $$K$$ variable is thus,

$$0 = 1 + K L(s)$$

where

$$L(s) = \frac{s + z}{s\,(s + B)},$$

absorbing the gain of the plant into $$K.$$ If you sketch the root locus for this, you will find that as long as $$-z$$ is farther to the left of $$-B$$, the root locus looks something like below.

From this, we can deduce that as long as we place our zero $$-z$$ somewhere faster than the settling time specification, there exists poles on the root locus that should meet the settling time specification (because they have more negative real part) and meet the overshoot specification (because they converge upon the real axis); we must simply choose a sufficiently large gain $$K.$$

There is a catch, however. With a PI controller, you introduce a zero in the closed loop transfer function. This zero can add overshoot that scales with the speed of your response. You may need to scale the gain to wash out the effects of the zero in some designs.

In your case, you picked $$z = -48$$ is more than sufficient to meet your $$200~\mathrm{ms}$$ settling time spec, but this I think is too aggressive. It still should be possible to find a gain $$K$$ but it might be difficult to do so, and you will need a larger gain to achieve that end. For that choice of $$z$$, $$K = 10000$$ seems to work:

$$C(s) = 10000\,\frac{s + 48}{s}.$$

I would pick $$z = -20$$ near the settling specification. The root locus thus still has solutions that meet the settling time specification as seen in the diagram, and we just need to choose large enough gains $$K$$ to meet the overshoot specification while still not having poles that are too fast. Turns out,

$$C(s) = 4000\,\frac{s + 20}{s}$$

does the trick.

• It is worth noting that there is no generic rule, and any rule will depend on your plant pole and zero locations. Commented Jul 25, 2023 at 0:35
• Thank you very much for explanation. As far as the pole-placement method. Did you mean the same approach I have attempted to use in my question? Commented Jul 25, 2023 at 5:04
• I have one question regarding the practical implementation (irrespect to the design method used). Isn't a problem that the gain is several thousands? It seems to me that the system tends to be sensitiv to noise. Commented Jul 25, 2023 at 5:20
• @Steve That depends on your specific method of implementation and application area. The gains can be a problem. The gains aren't that alarming to me though. Care needs to be taken is all. If you want lower gains, you might need a more complex control law or to relax your specifications. There are limitations here given how much you are changing the plant speed and DC gain. Commented Jul 25, 2023 at 12:47
• @Steve yes. similar to Cesareo's answer below. At the time of my query, it wasn't clear whether you were concerned about the zero dynamics or not. It seemed you are concerned about the zero (the empirical overshoot includes this) so I created an answer with root locus. Commented Jul 25, 2023 at 12:49

The design specifications such as

• settling time ($$t_s$$) not greater than $$200\,\mathrm{ms}$$
• percent overshoot ($$M_p$$) not greater than $$20\%$$

are defined over the standard transfer function

$$G(s) = \frac{\alpha^2+\beta^2}{(s+\alpha)^2+\beta^2}$$

as follows:

$$\frac{\sqrt{\alpha^2+\beta^2}}{\beta}e^{-\alpha t_s}\le 0.05\\ \zeta = \frac{\alpha}{\sqrt{\alpha^2+\beta^2}}\le \frac{|\ln(M_p)|}{\sqrt{\pi^2+\ln(M_p)^2}}$$

Our plant plus controller has a closed loop as

$$G_r(s)=\frac{PI(s)G_p(s)}{1+PI(s)G_p(s)}=\frac{k a (s+z)}{s^2+(a k + b)s+ a k z}$$

with $$PI(s) = k\frac{s+z}{s}$$ and $$G_p(s) = \frac{a}{s+b}$$ so equating $$(s+\alpha)^2+\beta^2 = s^2+(a k + b)s+ a k z$$ for all $$s$$ we have

$$\cases{ \alpha = \frac 12(a k + b)\\ \beta = \frac 12\sqrt{4a k z-(a k + b)^2} }$$

and thus we can convert the design specifications to our real plant obtaining

$$\cases{ \frac{a k+b}{2 \sqrt{a k z}}\leq \frac{\left| \log (M_p)\right| }{\sqrt{\log ^2(M_p)+\pi ^2}}\\ \frac{2 \sqrt{a k z} e^{-\frac{1}{2} t_s (a k+b)}}{\sqrt{4 a k z-(a k+b)^2}}\leq 0.05 }$$

Considering now the values $$a=0.0129, b=1.935$$ and ploting (in blue) the region associated to the design restrictions we obtain

Choosing $$z=60, k = 2800$$ (in red) we obtain the following step response

Note that the percent overshoot is greater than specified. This can be corrected by using a pre-filter with the structure

$$P_f = \frac{z}{s+z}$$

obtaining a response to step as follows