©1999 IEEE. Personal use of this material is permitted.
However, permission to reprint/republish this material for advertising or promotional
purposes or for creating new collective works for resale or redistribution to servers or
lists, or to reuse any copyrighted component of this work in other works must be obtained
from the IEEE.
Return to Table of Contents
ComputerAided Implementation of
Graphical Root Locus Design Recipes
M. Sami Fadali, Senior Member, IEEE
fadali@ee.unr.edu
Abstract  Root
locus design is an inherently iterative process by which the poles and
zeros of a system are selected to provide a desirable time response. However,
trial and error can be greatly reduced using graphical design recipes.
With the advent of computeraided design (CAD) tools, most of the graphical
recipes lost their appeal. We provide procedures for the computer implementation
of graphical sdomain design recipes. The procedures can be implemented
using any computeraided design package. We discuss lead, lag, laglead,
PI, PD and PID control. Examples are provided.
I. Introduction
Control system design was revolutionized by the introduction
of the root locus technique [1]. The technique allows the designer
to conveniently select the poles and zeros of the closedloop system.
Because the poles and zeros determine the time response of the system,
the designer is able to select the desired system behavior using root locus
design. The following years witnessed the appearance of several graphical
recipes for compensator design based on root locus plots which are standard
material in most control texts (see for example [2], [3]). These
recipes allow the placement of the dominant closedloop poles (i.e. poles
that correspond to the slowly decaying time response terms [2, p. 231])
at desired locations. They represent years of experience by ingenious control
engineers.
With the advent of digital computers, several authors
provided computeraided design recipes for root locus compensation (see
for example [4], [5] ) and many of the old recipes lost their appeal
because of their reliance on graphical root locus construction. However,
the root locus method never lost its popularity among control engineers
and their computeraideddesign packages typically include commands to
obtain root locus plots. It is even possible to obtain root locus plots
using a handheld calculator [6]. Some authors have proposed the
use of expert systems in root locus design in lieu of the graphical recipes
[7]. This approach could provide useful assistance to designers but is
still at an early stage of development. We believe that design is inherently
an iterative process facilitated by computer tools but relying on the wisdom
embodied in the old graphical design recipes. Nevertheless, there is a
need to computerize some of the cumbersome steps involved in the design
recipes for them to regain their popularity. Surprisingly, we have found
few attempts to do so in the literature [8].
This paper is an attempt to provide a comprehensive treatment
of all standard compensators that adapts graphical recipes for computer
implementation. We show that many of the standard recipes for root
locus compensator design can be easily adapted for computer implementation
and provide simple procedures for control system design. Lag, lead and
laglead controllers are discussed. PI, PD and PID control are shown to
be special cases of lag, lead and laglead control, respectively. We use
the CAD package MATLAB, but other packages have similar commands
and can be used with the same design procedures.
Throughout the paper, we use the notation of Table 1.
Table 1. Nomenclature
Symbol 
Definition 
d_{z}(d_{p}) 
distance from the compensator zero (pole) to the desired
closedloop pole location 
G_{c}(s) 
compensator transfer function 
K 
compensator gain 
K_{e} 
error constant 
K_{d}
, K_{i}
, K_{p} 
derivative, integral, and proportional gain, respectively 
L(s) 
loop gain function 
p 
compensator pole location 
r 
ratio of pole distance to zero distance from the desired
closedloop pole location 
s 
Laplace complex variable 
s_{cl} 
desired closedloop pole location 
T 
compensator time constant 
x 
ratio of zero to undamped natural frequency for lag compensator 
z 
compensator zero location 
a 
polezero ratio for lead compensator 
b 
polezero ratio for lag compensator 
g 
parameter used to define the zero location for a PI controller 
f 
angle deficit at the desired closedloop pole location 
q_{z}
(q_{p}) 
compensator zero (pole) angle at the desired closedloop
pole location 
w_{d} 
damped natural frequency in rad/s. 
w_{n} 
undamped natural frequency in rad/s. 
z 
damping ratio 
s Ðs 
magnitude and angle of a complex number s 
The basic idea underlying root locus plots is the fact
that the closedloop characteristic equation of the system is the complex
equality
1 + K L(s_{cl}
) = 0
(1.1)
where K is a variable gain parameter.
The equality yields two conditions:
a) Magnitude Condition:  K L(s_{cl}
) = 1
b) Angle Condition: Ð
K
L(s_{cl}
) = +/(2m+1)180°,
m = 0, 1, 2, ....
Root locus design is essentially a set of recipes to alter
the locations where the conditions are satisfied (the closedloop poles)
so as to obtain a system with the desired time response. This is
accomplished by introducing poles and/or zeros in the control loop thereby
changing the loop gain L(s_{cl}
). The two conditions are used extensively throughout the paper.
II. Lead Design
Consider the lead compensator

(2.1)

where T is the compensator time constant. The
compensator is added to the control loop together with a gain K
to improve the transient response of the system by placing the closedloop
poles at desired locations. The compensator introduces a zero at

1/T and a pole at 1/aT
Let the desired closedloop pole location be s_{cl
}=
 s_{cl } Ðq_{cl
}.
For all points off the root locus the angle differs from 180°
by an angle we refer to as the angle deficit. Prior to adding the
compensator, the angle deficit at the desired closedloop pole location
is
f = 
180°  ÐL(s_{cl})

(2.2)

By adding the compensator to the control loop, we obtain
an angle of +/180°
at the desired pole location s_{cl}
. For a lead design, we require the angle
at the zero q_{z
}(numerator
angle)and the angle at the poleq_{p
}(denominator
angle) to satisfyq_{z
}q_{p}
= f .
If the location of the zero is fixed, then the location of the pole can
be determined. The location of the zero can be selected by one of
the following methods.
a) Choose a zero to approximately cancel the closest plant
pole to the jw axis (excluding poles
at the origin). Let the pole to be
canceled be at p_{1},
then the zero angle and the pole angle are given by
q_{z}
= Ð (s_{cl}
+ p_{1})


q_{p}
= q_{z}
f = Ð (s_{cl}
+ p_{1})f


This is the simplest design recipe but may fail
as in the case of a system with complex conjugate poles.
b) Place the compensator zero directly
under the desired closedloop pole location. The angle at the zero
is now 90° . The angle
at the zero and the angle at the pole
are


q_{p}
= q_{z}
f = 90° f


This recipe is applicable to the complex
conjugate case but may result in excessively small values of the parameter
a.
c) Use a geometrical construction to select a pole and
zero of minimum ratio a.
A proof of the minimum aproperty
for this design can be found in [9].
Consider the geometric construction of Figure 1. The
origin O is connected to s_{cl}
and a parallel to the real axis from s_{cl }
is drawn to A. The angle
Os_{cl}A
is bisected by the line s_{cl}B.
.
Figure 1 Polezero diagram of lead controller.
Click
to see Figure 1
From the geometry, we have
q_{z}
= q_{cl}
(q_{cl }f
)/2 = (q_{cl}
+ f )/2

(2.7)

q_{p}
= q_{z}
f
= (q_{cl
}f
)/2

(2.8)

From Figure 1, we observe that the tangents of q_{z
}and
q_{p
},
respectively, are
tan(q_{z
})
=w_{d
}/(zzw_{n})
tan(q_{p
})
=w_{d}/(pzw_{n})
Hence, we evaluate the zero and the pole using

(2.9)


(2.10)

Finally, we calculate the gain K from the magnitude
condition as applied to the system after the introduction
of the lead compensator

(2.11)

The above analysis yields the following procedure for lead
compensator design:
Procedure 1

Calculate the desired location of the closedloop dominant
pair.

Determine the angle of the loop gain at the desired closedloop
pole location and calculate the compensator angle using (2.2).

Determine the location of the zero using (2.34), (2.56)
or (2.78), together with (2.9).

Determine the location of the pole using (2.10).

Determine the gain using the magnitude condition (2.11) at
the location of the closedloop pole.
A. PD
Design
As a special case of lead design we consider proportionalderivative
or PD control
G_{c}(s) =
K(s + z)

(2.12)

We obtain a PD compensator by letting the pole of the lead
compensator migrate far in the left half plane so that its angle contribution
is negligible. Using the angle condition, we now require the angle
at the zero to satisfy q _{z} =
f.
The location of the zero can be calculated from

(2.13)

Alternatively, one may approximately cancel the closest L(s)
pole p_{1} with the compensator zero , i.e. z = p_{1},
and use q_{z}
=  Ð (s + p_{1})
. In either case, the controller gain is obtained from the formula

(2.14)

and the design can be completed using Procedure 1
with minor modifications.
III. Lag Design
The general form of a lag compensator is

(3.1)

The lag transfer function is similar to that of the lead
compensator with the parameter a now
replaced by the parameter b >
1 and with a gain equal to b.
A lag compensator is typically used to improve the steadystate response
for a system whose transient response is acceptable with the appropriate
gain adjustment. Most CAD packages allow the variation of the gain to select
a suitable design point. For example, one could use the root locus
cursor commands of PROGRAM CC or the MATLAB command rlocfind.
The lag compensator reduces the steadystate error by
the factor b but introduces a negative
angle that shifts the root locus to the right resulting in a slower time
response. To minimize the latter harmful effect, the lag pole and
zero are located close to the imaginary axis so that their net angle contribution
is small. If the initial choice of closedloop pole is conservative,
then the small shift to the right due to the lag section is minimal and
is corrected for by a small gain adjustment. The angle contribution
of the PI controller is obtained next.
Theorem 1. A PI controller
with the zero location specified by

(3.2)

where has
an angle contribution f .
Proof:
To prove (3.2), we use the polezero diagram of Figure
2. The figure shows the angle contribution of the controller at the closedloop
pole location s_{cl}.
The contribution of the open loop gain L(s) is not needed
and is not shown.
Figure 2. Polezero diagram of lag controller.
Click
to see Figure 2
The controller angle at s_{cl}
is
From Figure 2, the tangents of the two angles in the RHS
of the above equation are
where x is the ratio ( z/ w_{n
}).
Next we use the trigonometric identity
to obtain
Because f is a negative
angle, we have

(3.3)

We now have the quadratic
Solving for x, we obtain the admissible solution
which is equivalent to (3.2). Equation
(3.2) is rather cumbersome but can be replaced by the simpler choice

(3.4)

Figure 3 shows the resulting compensator angles for different
z
and b values. The plots show that fis
less than 5° for underdamped
system with practical values of the two parameters.
Figure 3. Plot of the controller angle magnitude f
 at the underdamped closedloop pole versus z
for
b =2,
4, 6, 8, 10,12. The arrow indicates the direction
of increasing b.
Click
to see Figure 3
The following procedure yields a lag compensator that
reduces the steady state error by a factor b.
Procedure 2

Improve the transient response using proportional control
and obtain the corresponding gain K and closedloop pole location
s_{cl}
=  zw_{n}
+ jw_{d}.

Calculate the steadystate error using Kand
obtain the required improvement in the steadystate error b
.

Select the compensator zero using (3.2) or (3.4).

Adjust the compensator gain to return the closedloop pole
closer to the desired location.
The compensator transfer function is

(3.5)

A. PI Design
This is a special case of lag design where the controller
pole is at the origin and the transfer function is

(3.6)

The compensator zero can sometimes be used to cancel a
pole and obtain a good design. More often, a better design is obtained
using Procedure 2, with minor modifications.
We first observe that for PI control, the zeropole ratio
is infinite and (3.3) with infinite b
reduces to
Then we solve for z to obtain

(3.7)

As in lag design, using (3.3) to choose the zero gives
a small angle contribution and a simpler design. This is verified by the
plot of the angle versus z shown in Figure
4. The figure shows that the f  is
less than 3° for almost any underdamped
system.
Figure 4. Plot of the controller angle f
at the underdamped closedloop pole versus z
for PI control.
Click
to see Figure 4
IV. LagLead Design
In situations where both an improvement in the transient
response and a significant reduction in steadystate error are needed,
neither a lag nor a lead compensator will suffice. We need a compensator,
which includes a lead as well as a lag section known as a laglead compensator.
The lead section is added to shift the closedloop pole to the left in
a location that corresponds to an improved transient response. The lag
section is added so that the perturbation of the closedloop pole is minimal
but its location corresponds to a larger error constant i.e. a reduced
steadystate error. Thus, we are able to improve both the transient and
steadystate response using a laglead compensator.
The general form of a laglead compensator is

(4.1)

Two cases can be considered.

a b¹1:
In
this case, laglead design can be accomplished by designing a lead compensator
to improve the transient response and then improving its steadystate response
by adding a lag compensator. Because the lag compensator will cause deterioration
in the transient response, it is advisable to use a somewhat conservative
lead design.

a b
=1: This constraint allows the implementation
of the compensator using a simple passive circuit. It
is possible to desing the compensator subject to the constraint by following
the procedure in (a) using a suitable value such as a
=0.1 and modifying it until an acceptable design is obtained. To reduce
trial and error, we prefer to develop a different design procedure as in
[2]. We first prove some properties of the lead section.
Theorem 2. Given a lead section
with angle contribution f
. If the distance from the desired closedloop pole to the lead pole and
zero is

(4.2)

Then the zero and pole of the lead section have the angles

(4.3)


(4.4)

The zero and pole are located at

(4.5)


(4.6)

Proof:
Refer to Figure 1 and use basic trigonometric relations
to obtain
where we assume that q_{z}is
a first or second quadrant angle.
Using q _{p}
= f + q _{z}
, we eliminate q _{p}
or to obtain
We now solve for tan(q_{z})
The above equation gives (4.3). Similarly, we solve for tan(q_{p
}).
Substituting in (2.910) gives (4.56), respectively.
To find the ratio r in terms of the error constant
K_{e
},
we apply the magnitude condition to the compensated loop gain at the desired
closedloop. We substitute an approximate value of unity for the lag section
to obtain

(4.7)

The approximate magnitude of the lag section is
slightly greater than its actual value so that the actual K_{e}
obtained is slightly better than the desired value. However, the
lag section contributes a negative angle of 35°
. We therefore use an angle f = 
180°  ÐL(s_{cl
})
+ 35° to obtain the desired closedloop
poles. We now have the following procedure which is imilar to that
of [8].
Procedure 3

Calculate the error constant for the system with proportional
control and calculate the needed gain change to meet the steadystate error
requirements.

Obtain the ratio r of the pole distance to the zero
distance for the lead section using (4.7).

Calculate the angle contribution of the lead section using
the angle condition at the desired pole location. Let the angle contribution
be f =  180°ÐL(s_{cl})
+ 35° .

Obtain the pole and zero locations for the lead section using
equations (4.36).

Add a lag section with b= 1/a
= p/z where
p and z are the pole and zero or
the lead section.

Check the error constant and the pole locations for the design.
A. PID Design
The transfer function of a PID controller is

(4.8)

where the proportional gain is K_{p}=
2zw_{n },
and the integral gain is .
The gain of the compensator is the derivative gain K_{d
}.
The roots of the numerator or controller zeros can be real or complex conjugate
depending on the choice of design parameters. The zeros can be used to
almost cancel slow dynamics whether they arise from real or complex conjugate
poles. Alternatively, one zero can be added using the PD design procedure
then the rest of the compensator can be added using the PI design procedure.
This latter approach is due to the fact that the PID controller is a special
case of laglead control with the lag pole at the origin and the lead pole
migrating to infinity. Hence, it can be designed using Procedure 3 with
the lead design replaced by PD design and the lag design replaced by PI
design.
V. Examples
We now apply the lead, lag and laglead design procedures.
Example 1: Lead Design [2, p.413416]
Design a lead compensator for the transfer function
to obtain closedloop dominant poles with a damping ratio
z
of 0.5 and an undamped natural frequencyw_{n}
of 4.
Solution
We follow Procedure 1.
1 We calculate the desired location for the closedloop
dominant pair to be at
s=2+j*2*sqrt(3)
s =
2.0000
+ 3.4641i
The angle of the loop gain at
the desired closedloop pole location is
phi=180+angle(
s*(s+2))*180/pi
phi =
330
2 The actual angle contribution is positive and is obtained
by adding 360°
phi
=phi+360phirad=phi*pi/180
phi =
30
phirad =
0.5236
3 The zero is chosen using (2.9)
thetarad=piacos(.5)theta=thetarad*180/piz=real(s)+imag(s)/tan((thetarad+phirad)/2)
thetarad
=
2.0944
theta =
120.0000
z =
2.9282
4 The location of the pole, using (2.10), is
p=real(s)+imag(s)/tan((thetaradphirad)/2)
p =
5.4641
We select a zero at 2.9
and a pole at 5.5.
Thus, we have a = 2.9/5.5 = 0.527
5 The gain is obtained from the magnitude condition (2.11)
at the location of the closedloop pole.
s=2+j*2*sqrt(3)K=abs(s*(s+2)*(s+5.5)/(s+2.9))
s =
2.0000
+ 3.4641i
K =
19.0648
s =
2.0000
+ 3.4641i
K =
19.0648
The compensator transfer function is
The results of the calculations are almost identical to those
of [1]. The root locus of the compensated system is given in Figure 5.
Figure 5. Root locus of leadcompensated system (+ =
closedloop pole for K = 19).
Click
to see Figure 5
The figure shows the closedloop poles for a gain of
19. The system has two dominant poles close to the desired locations and
a third pole close to a zero. The step response of the system is given
in Figure 6.
Figure 6. Step response for lead design.
Click
to see Figure 6
Example 2: Lag Design
Add a lag section to the results of Example 1 to reduce
the steadystate error by a factor of 3.
Solution:
We follow Procedure 2.

The first step was accomplished in Example 1, resulting in
the loop gain

The required improvement in the steadystate error is b
= 3.

The compensator zero is given by (3.4)
and the compensator transfer function (3.1) is
The overall compensator for the system is a laglead controller
with a ¹1/band
is given by
The step responses for lag and for lead compensation are
shown in Figure 7. The figure shows that, in spite of the placement of
the lag pole and zero to contribute a small angle, the lag compensator
causes significant increase in the overshoot. This may be reduced by trial
and error but better results are obtained in the next example.
Figure 7. Step response for lag and lead compensation.
Click
to see Figure 7.
Example 3: LagLead Design
Design a laglead compensator for the system of Example
1 with a = b
to obtain the same closedloop pole locations as Example 1 and error constant
as Example 2 (about 30).
Solution:
We follow Procedure 3.

The desired error constant for the system is about 30.

Equation (4.7) with K_{e} =30 and with the
magnitude of the lag section » 1 gives
the ratio
s=2+j*2*sqrt(3)r=30/abs(s*(s+2))
s =
2.0000
+ 3.4641i
r =
2.1651

The angle contribution of the lead section is
phi=180+angle(
s*(s+2 ) )*180/pi
phi =
330
The actual angle contribution is positive and is obtained
by adding 360° . An additional 4°
is added to correct for the effect of the lag section. The compensator
angle is therefore
phi=phi+364phirad=phi*pi/180
phi =
34
phirad =
0.5934

The pole and zero of the lead section are at
zlead=real(s)+imag(s)*(cos(phirad)1/r)/sin(phirad)plead=real(s)+imag(s)*(rcos(phirad))/sin(phirad)tlead=1/zleadalphat=1/plead
zlead
=
4.2745
plead =
10.2764
tlead =
0.2339
alphat =
0.0973

Add a lag section with b= 1/a.
beta=plead/zleadzlag=real(s)/10plag=zlag/betatlag=1/zlagtbeta=beta*tlag
beta =
2.4041
zlag =
0.2000
plag =
0.0832
tlag =
5
tbeta =
12.0207
The compensator transfer function is
The root locus for the compensated system is obtained next.
We first transform the transfer function to a ratio of polynomials using
[num,den]=
zp2tf([4.27;.2],[10.28;0.08;2.0;0],1)
num =
0 0 1.0000
4.4700 0.8540
den =
1.0000
12.3600 21.5424 1.6448 0
The root locus is plotted using the MATLAB command
rlocus
or the PROGRAM CC command root. The closedloop poles are close
to the desired location for a gain of 30.
Figure 8. Root locus of system with laglead control
(+=poles for K=30).
Click
to see Figure 8.
The step response of the system is shown in Figure 9.
Figure 9. Step response of the system with laglead control
and with lead control.
Click
to see Figure 9
Figure 9 shows that the laglead response is similar
to, though slightly more oscillatory than, the lead response. If further
improvement is needed, then trialanderror is unavoidable.
VI. Conclusion
Although root locus design must involve some trial and error
in practice, a good first design is obtained using simple rules of thumb.
We have shown how graphical construction can be completely eliminated without
sacrificing the design rules of thumb to obtain procedures implementable
with standard CAD design programs. Using MATLAB, for example, each design
recipe can be implemented using a suitable function or "mfile". In addition,
the design steps can be implemented using a handheld calculator with the
aid of the root locus plots that are now available on some calculators.
References

W. B. Evans, "Graphical Analysis of Control Systems", Tans.
AIEE, Vol. 67, pp. 547551, 1948.

K. Ogata, Modern Control Engineering, 3^{rd}
Ed., PrenticeHall, Upper Saddle River, NJ, 1997.

J. J. D'Azzo and C. H. Houpis, Linear Control System Analysis
and Design: Conventional and Modern", McGrawHill, NY, 1995.

D.K. Frederick and J. H. Chow, Feedback Control Problems
Using MATLAB and the Control System Toolbox, PWS, Boston, MA, 1995.

N. E. Leonard and W. S. Levine, Using MATLAB to
Analyze and Design Control Systems, Benamin/Cummings, Redwood City,
CA, 1995.

B. K Theon, "HP15C Program Calculates Root Locus",
Electronic
Design, Vol. 31, May, pp. 202204, 1983.

P. A. Muha, "Expert System for SROOT", IEE Prod.D,
Vol. 138, No. 4, pp. 381387, 1991.

M. C. M. Teixeira, "Direct Expressions for Ogata's LeadLag
Design Method Using Root Locus", IEEE Trans. Educ., Vol. 37, No.
1, pp. 6364, Feb. 1994.

R. Unnikrishnan, "Design of a Lead Compensator with Minimum
Attenuation", Int. J. Eng. Educ., Vol. 17, No. 1, pp. 8588, 1980.
Author Contact Information
URL: http://www.ee.unr.edu/publish/fadali/fadali.html
EE Dept. MS260, University of Nevada, Reno, NV89557
Phone: 7757846951Fax: 7757846627
email: fadali@ee.unr.edu
Author Biography
M. Sami Fadali is a Professor of Electrical Engineering at
the University of Nevada, Reno. He earned his BS in Electrical Engineering
from Cairo University in 1974, MS in Control from UMIST in 1977 and Ph.
D. in Bioengineering from University of Wyoming in 1980. He was an Asistant
Professor at King Abdul Aziz University, Jeddah from 198183 where he participated
in starting a Biomedical Engineering Program. From 198485 he was a Post
Doctoral Fellow at Colorado State University. He joined the Electrical
Engineering at the University of Nevada in 1985. His research interests
are in robust control, fault detection, engineering education and physiological
modeling.
Return to Table of Contents