1
A Graphical User Interface (GUI) for a Unified Approach for ContinuousTime Compensator Design
Minh Cao
1
, John M. Watkins
1
and Richard T. O’Brien
2
Department of Electrical and Computer Engineering, Wichita State University, Wichita, Kansas 67260, U.S.A Department of System Engineering,U.S. Naval Academy, 105 Maryland Avenue, Annapolis, MD 21401, U.S.A.
Abstract:
In the field of control theory, compensators are used when a proportional controller design does not meet the intended design specifications. Some examples of these design specifications could be percent overshoot (P.O.), settling time (T
s
), steadystate error (e
ss
), gain margin (G.M.), and phase margin (P.M.). This paper will discuss a compensator graphical user interface (GUI) implemented using Matlab. This GUI enables the user to design a continuoustime compensator using two different methods that have been unified into one. The first method uses root locus. The second method uses the Bode plot. The root locus method is used in the time domain while the Bode plot is used in the frequency domain. By making both the root locus and Bode plot available on the GUI, the user can take advantage of the features of each design method in order to meet the desired design specifications.
1. Introduction:
When design specifications cannot be met using proportional control, compensators can be used to improve transient and steadystate responses. The paper begins with a brief description of the background required to understand the compensator design approach. The next section of the paper describes the Graphical User Interface (GUI) used to design various compensators. The GUI in this paper was created in Matlab 7.0. The GUI allows for two possible approaches to compensator design: root locus or Bode. The user has the ability to choose which of the two methods to use. The GUI can be used as a quick educational tool when discussing different compensator designs in the continuoustime domain. In the final section, two examples demonstrate the use of the GUI.
2. Background:
The purpose of the GUI was to create a useful and userfriendly way of designing compensators in the continuoustime domain. The GUI is based on the integrated design procedure described in [1,2]. The procedure, using time or frequency domain plant data, generalizes the angle criterion in root locus design. The standard closedloop system is represented by the block diagram in Fig. 1, where
K
is the control gain, )(
sG
c
is the compensator, and )(
sG
p
models the plant dynamics. The signals )(
s R
and )(
sY
represent the reference input and system output, respectively. From [1,2], the generalized magnitude constraints take the form )1(1)()(
=
d pd c
sG sG K
where the design point is given by
R(s) Y(s) K G
c
(s) G
p
(s) Fig. 1 Block Diagram of Unity Feedback System
+

U(s)
2
⎪⎩⎪⎨⎧ ±−=−±−
=
Bode jlocusroot j j
s
gcd d nn
d
ω ω σ ζ ω ζω
)2(1
2
ζ
is the damping factor,
n
is the undamped natural frequency, and
gc
is the gain crossover frequency. The generalized angle constraint takes the form )3(180)()(
d d pd c
sG sG
φ
+°±=+∠
where the desired angle is given by )4(0
⎩⎨⎧ °=
Bode PM locusroot
d
φ
The steps in the unified approach for continuoustime compensator design are presented in Table 1. The basic design steps for the root locus method and the Bode method are the same, but some of the specifications are different. The root locus method and Bode method differ in how the 7 steps are accomplished, such as the difference between
d
s
and
d
φ
.
Table 1. Compensator Design Steps Steps Description Root Locus Bode
1 Plot the uncompensated plant information. )(
sG
p
)(
jG
p
2 Use the design specifications to determine which, if any compensator is necessary. See Table 2,3. 3 Choose the design point form the design specifications.
°=+−=
0
d d d
j sd
φ σ
PM j sd
d gc
==
φ
4 Use the angle criterion to select the desired compensator angle. )()(
d pd cc
sG sG
∠−=∠=
φ θ
5 Select compensator poles and zeros. See Table 3. 6 Used magnitude criterion to select K. )()(
1
d cd p
sG sG
K
=
7 Evaluate, simulate, and; if necessary, redesign. If applicable Table 2 presents some of the 2
nd
order system relationships we us for developing design specifications. Two specifications that are specific to the Bode approach are the phase margin and gain crossover frequency.
3
Table 2. Second Order System relationships:
s s sG
nn p
ζω ω
2)(
22
+=
Design Spec. Description Mathematical Relationships
T
s
Settling Time 8.03.0
44
≤≤=≈
ζ ζω σ
nd s
T
T
p
Peak Time
2
1
ζ ω π ω π
−==
nd p
T
T
r
Rise Time
nr
T
ω ζ
60.016.2
+=
P.O.
Percent
φ π
tan
100..
−
=
eO P
ζ
Dampling Ratio
φ ζ
cos
=
φ
Angle Criterion
d d
σ φ
=
tan s
d
Design Point
⎪⎩⎪⎨⎧ ±−=−±−
=
Bode jlocusroot j j
s
gcd d nn
d
ω ω σ ζ ω ζω
2
1
PM
Phase Margin
⎩⎨⎧≤≤°+°
≤≤°=
0.16.03345
6.00100
ζ ζ ζ ζ
PM
gc
Gain Crossover Frequency )tan(
PM
d gc
σ ω
=
Table 3 presents the different compensator types. The compensators covered are the PorportionalDerivative (PD), lead, ProportionalIntegral (PI), lag, ProportionalIntegralDerivative (PID), and ProportionalIntegralLead (PILead). The transfer functions for the various compensators are also given. The “z” represents the compensator zero. The “p” represents the compensator poles. Table 1 also describes how each compensator affects the transient responses. The unified compensator design approach uses the relationships from equations (2) and (3) to show how the root locus and Bode approaches to designing compensators are related.
4
Table 3. Compensator Types Compensator Description Transfer Function Transient Response SteadyState Error (e
ss
)
PD ProportionalDerivative z)(sG
c
+=
Improve  Lead Lead p)(sz)(sG
c
++=
Improve  PI ProportionalIntegral sz)(sG
c
+=
Degrade Improve Lag Lag p)(sz)(sG
c
++=
Degrade Improve PID* ProportionalIntegralDerivative sz)(sG
2c
+=
Improve Improve PID** ProportionalIntegralDerivative s)z)(sz(s
G
21c
++=
Improve Improve PILead* ProportionalIntegralLead p)s(sz)(sG
2c
++=
Degrade Improve PILead** ProportionalIntegralLead p)s(s)z)(sz(s
G
21c
+++=
Degrade Improve *colocated zeros **noncolocated zeros z < p for lead compensator z > p for lag compensator
3. GUI Design:
In order to make the discussion of the GUI simpler, the GUI can be divided into 3 regions. The region on the left side of the GUI displays the uncompensated and compensated root loci. The right side of the GUI displays the Bode magnitude and phase Bode plots. The central region of the GUI is where the user enters the system specifications. The user can select the compensator type, system plant, design point,
d
φ
, and compensator zeros (if applicable based on the compensator chosen). When the
Compensator
dropdown box is selected, the GUI gives the user the choice of selecting between the compensators illustrated in Table 3. For the PID and PILead compensators, the user has the ability to select different compensator zeros because the unknown parameters in the compensator outnumber the constraints from equations (1), (3), and (4) [3]. The system specifications, which may be determined from the rise time (
T
r
), settling time (
T
s
), peak time (
T
p
), and percent overshoot (
P.O.
), are entered in terms of the
Design Point
and
d
φ
input fields. The
Update
button is pressed to execute the GUI. The GUI then plots the root locus and Bode
5
plots in their respective areas. The
Analysis
option, in the toolbar, allows the user to plot the openloop Bode response, closedloop step response, and closedloop Bode response. Fig. 2 Graphical User Interface (GUI) in Matlab
4. Examples: Example #1 Root Locus Method
In this example, the compensator for an antennaangle tracker will be designed. The plant is represented by
G
p
(s)
in Figure 1. The design specifications for a step input are: sec66.1
%16..
≤≤
s
T O P
)6()5( 0)(
=∞
ss
e
The system plant is represented by the transfer function [4]
)110(
1)(
+=
s s sG
p
)7(
The system input )(
sU
is the voltage applied to the servo motor. The system output )(
sY
is the angular position of the antenna. From Table 2, 8.03.0
44
≤≤=≈
ζ ζω σ
nd s
T
)8( By substituting (6) into (8), we get that 41.2
≥
d
σ
)9( From Table 2,