Lecture 16 - Root Locus Based Controller Design Using MATLAB, Control Systems
1 Root Locus Based Controller Design Using MATLAB
In this lecture we will show how the MATLAB platform can be utilized to design a controller using root locus technique.
Consider the closed loop discrete control system as shown in Figure 1. Design a digital controller such that the closed loop system has zero steady state error to step input with a reasonable dynamic performance. Velocity error constant of the system should at least be 5.
Figure 1: A discrete time control system
Gp(s) = T = 0.1 sec
Gh0Gp(z)
The MATLAB script to find out Gh0Gp(z) is as follows.
>> s=tf(’s’);
>> Gp=10/((s+1)*(s+2));
>> GhGp=c2d(Gp,0.1,’zoh’);
Figure 2: Root locus of the uncompensated system
The root locus of the uncompensated system (without controller) is shown in Figure 2 for which the MATLAB command is
>> rlocus(GhGp)
Figure 3: Pole zero map of the uncompensated system
Pole zero map of the uncompensated system is shown in Figure 3 which can be generated using the MATLAB command
>> pzplot(GhGp)
One of the design criteria is that the closed loop system should have a zero steady state error for unit step input. Thus a PI controller is required which has the following transfer function in z-domain when backward rectangular integration is used.
The parameter Ki can be designed using the velocity error constant requirement.
Above condition will be satisfied if Ki ≥ 1. Let us take Ki = 1. With Ki = 1, the characteristic equation becomes
(z − 1)(z − 0.9048)(z − 0.8187) + 0.004528(z + 0.9048) + 0.04528Kp(z − 1)(z + 0.9048) = 0
Now, we can plot the root locus of the compensated system with Kp as the variable parameter.
The MATLAB script to plot the root locus is as follows.
>> z=tf(’z’,0.1);
>> Gcomp=0.04528*(z-1)*(z+0.9048)/(z^3 - 2.724*z^2 + 2.469*z - 0.7367);
>> zero(Gcomp);
>> pole(Gcomp);
>> rlocus(Gcomp)
The zeros of the system are 1 and −0.9048 and the poles of the system are 1.0114 ± 0.1663i and 0.7013 respectively. The root locus plot is shown in Figure 4.
Figure 4: Root locus of the system with PI controller
Figure 5: Root locus of the system with PI controller
It is clear from the figure that the system is stable for a very small range of Kp. The stable portion of the root locus is zoomed in Figure 5. The figure shows that the stable range of Kp is 0.239 < Kp < 6.31. The best achievable overshoot is 45.5%, for Kp = 1, which is very high for any practical system. To improve the relative stability, we need to introduce D action. Let us modify the controller to a PID controller for which the transfer function in z-domain is given as below.
To satisfy velocity error constant, Ki ≥ 1. If we assume 15% overshoot (corresponding to ξ ≌ 0.5) and 2 sec settling time (corresponding to ωn ≌ 4), the desired dominant poles can be calculated as,
Thus the closed loop poles in z-plane
The pole zero map including the poles of the PID controller is shown in Figure 6 where the red cross denotes the desired poles.
Figure 6: Pole zero map including poles of the PID controller
Let us denote the angle contribution starting from the zero to the right most pole as θ1, θ2, θ3, θ4 and θ5 respectively. The angles can be calculated as θ1 = 9.5o, θ2 = 20o, θ3 = 99.9o, θ4 = 115.7o and θ5 = 129.4o.
Net angle contribution is A = 9.5o − 20o − 99.9o − 115.7o − 129.4o = −355.5o. Angle deficiency is −355.5o + 180o = −175.5o
Thus the two zeros of PID controller must provide an angle of 175.5o. Let us place the two zeros at the same location, zpid.
Since the required angle by individual zero is 87.75o, we can easily say that the zeros must lie on the left of the desired closed loop pole
The controller is then written as GD (z) = The root locus of the compensated system (with PID controller) is shown in Figure 7. This figure shows that the desired closed loop pole corresponds to K = 4.33.
Thus the required controller is GD (z) = If we compare the above
Figure 7: Root locus of compensated system
transfer function with the general PID controller, Kp and Kd can be computed as follows.
Kd/T = 0.5761 ∗ 4.33 ⇒ Kd = 0.2495
Kp + Kd/T = 4.33 ⇒ Kp = 1.835
KiT − Kp − 2Kd/T = −1.518 ∗ 4.33 ⇒ Ki = 2.521
Note that the above Ki satisfies the constraint Ki ≥ 1. One should keep in mind that the design is based on second order dominant pole pair approximation. But, in practice, there will be other poles and zeros of the closed loop system which might not be insignificant compared to the desired poles. Thus the actual overshoot of the system may differ from the designed one.
1. What is root locus in control system? | ![]() |
2. How can MATLAB be used for root locus based controller design? | ![]() |
3. What are the advantages of using root locus in controller design? | ![]() |
4. How does root locus help in controller design? | ![]() |
5. Can root locus be used for systems with multiple inputs and outputs? | ![]() |