Controllers and Control Algorithms: Selection and Time Domain

International Journal of Engineering Sciences, 2(5) May 2013, Pages: 160-190
TI Journals
ISSN
2306-6474
International Journal of Engineering Sciences
www.waprogramming.com
Controllers and Control Algorithms:
Selection and Time Domain Design Techniques Applied in
Mechatronics Systems Design
(Review and Research) Part I
Farhan A. Salem 1,2
1
2
Mechatronics Sec. Dept. of Mechanical Engineering, Faculty of Engineering, Taif University, 888, Taif, Saudi Arabia.
Alpha Center for Engineering Studies and Technology Researches, Amman, Jordan.
AR TIC LE INF O
AB STR AC T
Keywords:
The most critical decision in Mechatronics design process is the selection, design and integration in
overall system, of two directly related to each other sub-systems; control unit and control
algorithm. This paper provides simple and user friendly controllers and design guide that illustrates
the basics of controllers and control algorithms, their elements, effects, selection and design
procedures, it is intended for research purposes, application in educational processes, as well as, an
introductory material for author's proposed control systems design procedures introduced in parts II
and III.
Mechatronics
Controller
Control Algorithm
Controller Design
© 2013 Int. j. eng. sci. All rights reserved for TI Journals.
1.
Introduction
The modern advances in information technology and decision making, as well as the synergetic integration of different fundamental
engineering domains caused the engineering problems to get harder, broader, and deeper. Problems are multidisciplinary and require a
multidisciplinary engineering systems approach to solve them, such approach is called mechatronics approach, and such modern
multidisciplinary systems are called mechatronics systems. Mechatronics is defined as multidisciplinary concept, it is synergistic
integration of precision engineering mechanical engineering, electric engineering, electronic systems, information technology, intelligent
control system, and computer hardware and software to manage complexity, uncertainty, and communication through the design and
manufacture of products and processes from the very start of the design process, thus enabling complex decision making , exceptional
levels of accuracy and speed of high-tech equipment including ability to perform complicated and precise movements of high quality.
Mechatronics systems are supposed to operate with high accuracy and speed despite adverse effects of system nonlinearities and
uncertainties, since achieving and verifying accuracy in Mechatronics systems' performance is of concern, the most critical decision in the
Mechatronics design process is the selection and design of two directly related to each other sub-systems; control unit (physical controller)
and control algorithm.
There are many control strategies options that may be more or less appropriate to a specific type of application each has its advantages and
disadvantages. The designer must select the best one for specific application, most are to introduced and discussed, tested in many texts
including [1-15]. Controllers' options including but not limited to: Microcontroller/microprocessor (e.g. PIC-microcontroller),
Programmable logic controller (PLC), computer control, desktop/laptop, Digital Signal Processing (DSP) integrated circuits. Also,
algorithms options including but not limited to: ON-OFF control, P, PI, PD and PID control, lead, lag intelligent control, Fuzzy control,
adaptive control, Neural network control. In this paper we ill introduce main of them, their structures, indicate their main properties and
their design procedures. There is several control system design and analysis techniques, including; numerical, analytical and graphical, the
three primarily simple and direct graphical methods are Root-Locus, Bode plots and Nyquist diagrams.
The term control system design refers to the process of selecting feedback gains, poles and zeros that meet design specifications in a
closed-loop control system. Most design methods are iterative, combining parameter selection with analysis, simulation, and insight into
the dynamics of the plant [15-16]. The goal of control design is to obtain the configuration, specifications, and identification of the key
parameters of a proposed system to meet and satisfy all the design specifications. Control system design involves the following three steps;
(1) Determine the design specifications.(2) Determine control algorithm, and controller/compensator configuration. (3) Determine the
parameter values of the controller to achieve the design goals, shortly, after formulating the problem and establishing the control goals, the
controller configuration is chosen, were the designer must select a controller and strategy that will satisfy all the design specifications, and
finally, the next task is to select (design) controller parameter values so that all design specifications are achieved.
The accuracy control system design (accuracy of selected gains, poles and zeros) to meet all desired specifications, depends on many
factors including; the accuracy of derived mathematical model, the accuracy and limitations of applied design methodology and tools, and
* Corresponding author.
Email address: salem_farh@yahoo.com
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
161
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
designer's skills and experience, in the following discussion assuming the mathematical model in terms of transfer function is accurate
enough to processed to control design process. The following three primarily graphical methods are available to the control system analysis
and design: (1) The root-locus method, (2) Bode- plot representations, (3) Nyquist diagrams.
The term control system analysis concerns itself with the impact that a given controller has on a given system when they interact in an
applied configurations. The term synthesis refers to the process by which new physical configurations are created, to combine separate
elements or devices and construct controllers with certain properties.
The term design specifications refer to statements that explicitly state and describe what the system should do? How to do it? How well and
accurately it is Done?. The design specifications are unique to each individual application and often include specifications about relative
stability, steady-state accuracy (error), transient-response characteristics, and frequency-response characteristics. In some applications
there may be additional specifications on sensitivity to parameter variations, that is, robustness, or disturbance rejection. Standard
measures of performance used include; Time constant T, Rise time TR, Settling time Ts, Peak time, TP, Maximum overshoot MP, maximum
undershoot Mu, Percent overshoot OS%, Delay time Td, The decay ratio D R , Damping period TO and frequency of any oscillations in the
response, the swiftness of the response and the steady state error ess [17].
1.1 Controllers Configurations:
Most of the conventional design methods in control systems rely on the so-called fixed-configuration design in that the designer at the
outset decides the basic configuration of the overall designed system and decides where the controller is to be positioned relative to the
controlled process. Most control efforts involve the modification or compensation of the system-performance characteristics, the general
design using fixed configuration is also called compensation [18]. The five commonly used system configurations with controller
compensation, are ( see Figure 1) (1)Series (cascade) compensation; it is the most common control system topology, were the controller
placed in series with the controlled process(plant), with cascade compensation the error signal is found, and the control signal is developed
entirely from the error signal. (2)Feedback compensation, the controller is placed in the minor inner feedback path in parallel with the
controlled process. (3) State-feedback compensation the system generates the control signal by feeding back the state variables through
constant real gains. (4)Series-feedback compensation a series controller and a feedback controller are used (5) Feedforward compensation:
the controller is placed in series with the closed-loop system, which has a controller in the forward path the Feedforward controller is
placed in parallel with the forward path.
1.2 Control system strategies, selection, & design methodologies
The control system strategies available for control-system design are bounded only by one's imagination, there are many control strategies
that may be more or less appropriate to a specific type of application, each has its advantages and disadvantages; the designer must select
the best one for specific application [14-15]. Engineering practice usually dictates that one chooses the simplest controller that meets all the
design specifications. In most cases, the more complex a controller is, the more it costs, the less reliable it is, and the more difficult it is to
design. Choosing a specific controller for a specific application is often based on the designer's past experience and sometimes intuition,
and it entails as much art as it does science [18] the choice of the controller type is an integral part of the overall controller design, taking
into account that the final aim is to obtain the best cost/benefit ratio and therefore the simplest controller capable to obtain a satisfactory
performance should be preferred. The main factors that might influence the decision on selecting certain control unit and algorithm include;
simplicity, space and integration, processing power, environment (e.g. industrial, soft.. ), precision, robustness, unit cost, cost of final
product, programming language, safety criticality of the application, required time to market, reliability, number of products to be produced
and designer's past experience and sometimes intuition. Based on all mentioned, the following simplified guide for control algorithm
selection, can be suggested; (1) for processes that can operate with continuous cycling, the relatively inexpensive two position controller is
adequate.(2) For processes that cannot tolerate continuous cycling, a P-controller is often employed. (3) For processes that can tolerate
neither continuous cycling nor offset error, a PI controller can be used. (4) For processes that need improved stability and can tolerate an
offset error, a PD-controller is employed. (5) However, there are some processes that cannot tolerate offset error, yet need good stability,
the logical solution is to use a control mode that combines the advantages of the three controllers' action [19].
Disturbances
ERROR
E(s)
Reference
Input command +
R(s)
The actuating signal
U(s)
system to be
controlled
controller
G(s)
Primary feedback B(s)
D(s)
Controlled
variable
C(s)
Input , R(s)
Designable controller
Compensator
Feedback element
Sensor /Transducer
H(s)
Figure 1 (a)
Figure 1(a) Series or cascade compensation and Components
Fixed Plant
G(s)
H(s)
Figure 1 (b)
Output , C(s)
Farhan A. Salem
162
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
Fixed Plant
r(t)
Input , R(s)
Output , C(s)
G(s)
u(t)
x(t)
+-
Designable controller
y(t)
C
GP(s)
K
Compensator
Feedback
Figure 1(c) Feedback compensation
r(t)
+ -
Figure 1(d) State feedback
E(t) u(t)
Gc(s)
+
y(t)
r(t)
e(t)
Gf (s)
G(s)
-
+
-
u(t)
Gc (s)
Plant
y(t)
GH(s)
Figure 1(e) Series-Feedback compensation (2DOF)
Figure 1(f) Forward with series compensations
Gf (s)
r(t)
u(t)
+
-
Gc (s)
+
Plant
y(t)
Figure 1(f) Forward compensations
2.
Proportional Control, P-Controller
P-Controller is one of the simplest and widely used methods of control for many kinds of systems, it is always recommended to be selected
and applied first in control system selection and design process . The control action of P-controller is proportional to the error, where Pcontroller pushes the system in the direction opposite the error, with a magnitude that is proportional to the magnitude of the error, Pcontroller action, provides an instantaneous response to the control error; this action is used to improve the response of the stable system.
The relation between the output of controller, (control Effort), u(t) and the actuating error signal e(t) is given by Eq.(1), taking Laplacetransform and manipulating Eq.(1), for transfer function gives:
u t   K p e t
  U s 
Gp(s) = U(s )/E(s) = Kp
 E s  K p
(1)
(2)
The output of P-controller is equal to the error, e(t) , multiplied by the constant proportional gain K P, this describes a pure proportional
relationship between input R(s) and output KP *E(s), in effect P-Controller is an amplifier and Kp is simple ratio (non-zero term).
2.1 Properties and limitations of P-controllers
In transient mode: P-controllers are useful for improving the response of a stable system, but cannot control an unstable system by itself.
The proportional controller has no sense of time, and its action is determined by the present instantaneous value of the error. Proportional
control has a tendency to make a system faster, ( is used to speed up system response), it will have the effect of reducing the rise time TR,
small changes to settling time Ts ,and increases the overshoot MP.
In steady state mode: P-controller will reduce but never eliminate the steady-state error ess, In a proportional controller, steady state error
tends to depend inversely upon the proportional gain, so if the gain is made larger the error goes down, therefore, with only P-controller,
there will always be a small offset-error between the reference input and the measured variable, this is the main disadvantage of Pcontroller, to remove this offset-error, integral control has to be used with proportional controller, resulting in (PI- Controller).There are
practical limits as to how large the gain can be made, where very high gains lead to instabilities, but if the process has a low-order
dynamics the proportional gain can be set to a high value in order to provide a fast response and a low steady-state error.
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
163
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
2.2 The effect of P-controller on error e(t)
Assuming that the steady state output, N ss is proportional to the control effort u(t), the output is then given by Eq. (3) , substituting Eq.(1) in
Eq.(3) , gives Eq.(4) :
Nss = DC Gain * u(t)
Nss = DC Gain * K p e(t )
e(t ) =( Nss -DC Gain)/ Kp
(3)
(4)
(5)
The error e(t ), is the difference between the actual measured output and the desired input , the and the actual measured output is just the
output of the sensor Ks, therefore the error e(t ),is given by:
e(t )= Input – actual measured output
e(t )= R(s) - Ks * Nss
(6)
Where: Ks, is sensor constant gain. Substituting in Eq.(4) and solving for the steady state output Nss, gives:
Nss = DC Gain * Kp (R(s) - Ks * Nss)
Steady state output, N ss 
DC Gain * K p * R (s )
(7)
1  DC Gain * K s * K P
Now, considering the case when KP, is set to be so large, we have:
Steady state output, N ss  R (s ) / K s
Now, considering the case when Ks=1, (unity feedback), we have the output equal to the input:
Steady state output, N ss  R (s )
The steady state error is calculated as follows:
e(t )= R(s) - Nss
e (s )  R (s ) 
e (s ) 
DC Gain * K p * R (s )
1  DC Gain * K s * K P

R (s ) 1  DC Gain * K s * K P   DC Gain * K p * R (s )
1  DC Gain * K s * K P
R (s )
1  DC Gain * K s * K P 

(8)
This equation shows that increasing KP, will reduce steady state error, but never eliminate it.
2.3 The effect of P-controller on transient specifications TR , Ts and TP
The proportional controller is a pure gain controller; the design is accomplished by choosing gain value, where a single gain is varied from
zero to infinity to results in a satisfactory transient response. Based on desired response specifications the proportional gain can be
designed .The general form of second order system in terms of damping ratio ζ, and undamped natural frequency ωn, is given by Eq.(9):
n2
K P * n2
 G open (s )  2
2
s  2n s  n
s  2n s  n2
K P G (s )
K P * n2
K P * n2
T (s ) 
 2

1  K P G (s )H (s ) s  2n s  K P n2  n2 s 2  2n s  n2 (K P  1)
G plant (s ) 
2
Also, for second order plant transfer function, given by Eq.(9), the closed loop TF , damping ratio ζ and undamped natural ωn frequency are
given as follows:
G plant (s ) 
K P G (s )
KP
n2
1
 T (s ) 
 2
 2
s (s  1)
1  K P G (s )H (s ) s  2s  K P s  2 n s  n2
(9)
n2  K P  n  K P , 2n  2    1 / n  1 / K P
In the closed loop transfer function T(s), the term ω2n is given in terms of proportional gain K p and thus we can potentially make ωn ,very
large by choosing Kp to be very large, thereby speeding up the system, e.g. settling time is given by Ts = 4T = 4/ ζωn, rise time is given by
TR =(2.16 ζ+0.6)/ ωn , the peak time TP = π/ (ωn√1- ζ2 ), where: T: time constant, all these expressions show that the larger the values of ωn
Farhan A. Salem
164
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
the faster the system will response, the proportional controller will have the effects of Reducing the rise time Ts, Increases the overshoot
OS% , and Reduce ,but never eliminate, the steady-state error, ess The following MATLAB code, can be used to demonstrate the effect of
increasing proportional gain KP=[ 1 10 100]; for an open loop system given in next code, the resulted responses are shown in Figure 2
>> K =[ 1
10
100]; t=0:0.001:5; for i=1:3
num= K(i);
den=[1
3 K(i)];
Gopen
=tf(num,den), Gclosed = feedback(Gopen,1); sys= feedback(Gclosed,1); y(:,i)=step(sys,t);
Gopen =tf(num,den), Gclosed = feedback(Gopen,1), pause (1), end, plot(t,y(:,1),t,y(:,2),'-',t,y(:,3),':'); legend('K=1','K=10','K=100',-1)
0.7
K=1
K=10
K=100
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
Figure 2(b) The effect of increasing (changing) proportional gain KP
2.4 Physical analog realization of Controller
Any controller can be built with passive components only (resistors and capacitors), and thus is easily implemented in analog control
systems, also the operational amplifier circuit shown in Figure 3, can be used as a building block to implement physical realization of
controllers, by judicious choice and configurations of two impedances Z1 (s) and Z2(s), (resistor and/or capacitor) any controller can be
built.
2.4.1 Implementing P-Controller
We can physically realize P-Controller, by judicious choice of two impedances Z1(s) and Z2(s), based on this proportional controller can be
implemented as shown in Figure 4. When the currents are summed at the inverting input, an equation including the input and output
voltages is obtained. The final equation shows the system is a simple multiplier, or amplifier. The gain of the amplifier is determined by
the ratio of the input and feedback resistors. Inverting configuration, formula for obtaining the output value and proportional gain, (KP), is
given by as follows: The voltage at the non-inverting input will be 0V; by design the voltage at the inverting input will be the same.
V   0 V and V  V   0 V
The currents at the inverting input can be summed.
I
V

V  V in V  V out
0 V in 0 V out
 R 2V in  R 2 

 
 0 V out 
 
V in
R1
R2
R1
R2
R1
 R1 
This is the mathematical model of operational amplifier in the form of zeroth order. The proportional gain is given by:
V out
R
  2  KP
V in
R1
2.4.2 Digital Proportional Controllers
Implementing control algorithm in a digital system is done using programming codes, the most used programming language is C language,
an example code is written next.
Read KP, setpoint
double error , effort
while ( )
y = ADC_read ( );
error = setpoint – y;
effort =Kp*error
end
// read proportional gain and desired output, setpoint
// read value of controlled variable from sensor
// compute new error
// calculate control effort
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
165
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
Figure 3. Op-amp configuration
Figure 4. Physical implementation of proportional controller
2.5 Control systems design methodologies
The purpose of a control system is to reshape the response of the closed loop system to meet the desired response; the response depends on
closed loop poles' location on complex plane, for first and second order systems it is easy to determine the poles of closed loop system.
response of higher order systems is largely dictated by those poles that are the closest to the imaginary axis, i.e. the poles that have the
smallest real part magnitudes, such poles are called the dominant poles, many times, it is possible to identify a single pole, or a pair of
poles, as the dominant poles, based on this most complex higher order systems that have dominant features can be approximated by either a
first or second order system response. In such cases, a fair idea of the control system's performance can be obtained from only time
constant of the dominant pole for first order system and from the damping ratio and undamped natural frequency of the two dominant
poles. The approximation conditions; for dominant one first order pole: the pole closest to the imaginary axis is the one that tend to
dominate the response. For higher-order than second system, if the real pole is five time-constants, 5T, farther to the left than the dominant
poles, we assume that the system is represented by its dominant second-order pair of poles, for example Considering a third order system
with one real root, and a pair of complex conjugate roots given by :
G (s ) 
K
s    s
2
 2n s  n2 
This system can be considered as consisting of two systems; first and second order systems; that it has three poles one real pole ,at pole
= α, and two complex poles, the condition for dominant one first order pole , or two second order poles, is given below:
K / n2
1 0 
s   
K /
s
2
 2n s  n2 

 n A pproximated as first order system
10 n A pproximated as sec ond order system
There are many control methods (techniques) for control system design, including trial and error, gain adjustments, direct pole placement,
comparison technique of standard and obtained transfer function, graphical tools, as well as using computer softwares e.g. MATLAB.
2.5.1 Direct pole placement
The objective of pole placement method is to place the closed loop poles at desired locations, to meet desired design specification. For first
and second order systems, it is possible to place all closed loop poles with any controller type. When the process is of higher order, this is
not possible anymore, and it is necessary to make approximations to obtain a fist or second order model, based on pole's location different
designs exist, including for desired response type and performance.
2.5.2 Dominant poles design
2.5.2.1 P-Controller design for desired response type and desired performance
For a given second order system, by factoring the denominator using the quadratic equation to find the poles of the closed loop transfer
function, in terms of proportional gain KP, as K P varies, the closed loop poles given by Eq.(11), move through the four ranges of operation
of a second-order system response types: undamped, overdamped, critically damped, and underdamped. Using the relation between the
discriminant and the response types , we can find the most suitable value of gain K P that will result in response type, for example: a system
open loop and the closed loop transfer functions are by Eq.(10): finding the closed loop poles by applying quadratic equation, the poles will
be given in terms of proportional gain K P , and given by Eq.(11), depending on numerical value of K P , the following different response
types results, that depends on the value of the discriminant of quadratic equation: (1) Overdamped response for 4 > 4K, ( positive
discriminant), (2) Underdamped response for 4 < 4K, , ( negative discriminant), (3) Critically damped response for 4 = 4K. , (discriminant
= zero). Depending on required response type and performance specifications, we can choose the condition and determine the value of gain
KP that will result in the required response. Assuming that it is required to design this system to have an underdamped response with
damping ration of 0.7071, this means we choose the condition, that return complex conjugate poles, (negative discriminant), this can be
accomplished as shown next:
Farhan A. Salem
166
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
G plant (s ) 
KP
1
 T closed (s )  2
s (s  1)
s  2s  K P
(10)
s 2  2s  K P  as 2  bs  c  s 2  2n s  n2
P1,2 
P1,2 
2
2
2n  4n2  ( )2  1
b  b 2  4 * a * c 2n  (2n )  4 n


  n  j  n
2*a
2
2
2  4  4 K P
2
1   
2
(11)
 1  1  K P
  4  4K P   4  4K P   0  4K P  4  K P  1
Figure 5
The response will be underdamped for all values of K P greater than one, taking in consideration that there are practical limits as to how
large the gain can be made.
P-Controller design For desired performance: Based on pole's value, designer can calculate the exact value of proportional gain Kp , that
will result in desired damping ratio ζ, and correspondingly response type, by setting the magnitudes of the real and imaginary parts of the
poles equal to each other and solving , as shown next: based on Eq. (11) and for system given by Eq.(10), for achieving damping of
0.7071, equating real and imaginary parts of the poles, and solve for Kp , gives:
P1,2  n  j n
1     
2
n
 n
1     
2
2
 1   2  2 2  1    0.5  0.7071
By equating real and imaginary parts of system's closed loop pole and knowing that the real and imaginary parts must have equal
magnitude, solving, gives the value of KP
P1,2 
2  4  4K P
2
 1  1 K P  1  K P 1  K P  2
to select the exact proportional gain Kp value, to achieve desired response, based on desired performance specifications in terms of damping
ratio and undamped natural frequency, the following expression for proportional gain, for second order systems can be proposed
2
b 2  4aK P
b  b 2  4ac b  b  4aK P
b



  n  j  n
2a
2a
2a
4a 2
b 2  4aK P
b

 n  j
2a
4a 2

2
n
 n2 2  
1   
2
b 2  4aK P
b2
 n2  n2 2  K P  2  an2 (1   2 )
2
4a
4a
For example, for system given by Eq.(10), for achieving damping of 0.7071 and undamped natural frequency of 1.4142 , the proportional
gain is found to be KP=2, resulting in achieving desired response
2.5.2.2 P-Controller design by coefficients comparison technique
2.5.2.1.1 P-Controller design for desired performance by coefficients comparison technique
Design by coefficients comparison gives an easy design approach for first and second order systems, and become more difficult as the order
of the system increases. Based on desired performance specifications; desired damping ratio or percent overshoot %OS, or settling time, or
ess, the proportional gain Kp , can be obtained by comparison the closed loop transfer function with standard form of closed loop transfer
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
167
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
function. for second order systems, solving the closed loop transfer function given by Eq.(9) for ωn, ζ we have proportional gain Kp in terms
of damping ratio and undamped natural frequency:
n  K P
%OS  e ( /
,  1/
2
1 )
KP ,
,   
 ln(%OS / 100)
(12)
 2  ln 2 (%OS / 100)
Also, settling time is given by Ts = 4T = 4/ ζωn , solving for ωn , gives:
Ts 
4
4
4
2 ,
=
 KP 
 KP 
n
Ts
 KP
T s
(13)
In terms of desired steady state error, we can calculate the corresponding proportional gain K p by solving:
KP 
R (s )  e (s )
DC Gain * K s * e (s )
(14)
For first order system, the closed loop transfer function, and correspondingly, the pole and time constant T, are given in terms of KP, for
desired time constant we can select KP
G  s  
KP
1
 T  s  
 P    a+K P   s  a 
 s   a+K P 
T  1 / P  1 /   a  K P   1 /  a  K P 
In terms of desired steady state error; the ess, can be written in terms of proportional gain, then we can calculate the corresponding
proportional gain Kp as shown in both Eqs (14) ,(15)
e ()  lim
s 0
sR (s )
1
1
 e () 
 e () 
1  G open (s )
1  K P G (0)
1 K P / a
(15)
For higher order systems, root locus or comparison methods can be applied, to select the exact proportional gain K p value, to achieve
desired response. To calculate Kp that will result in ess ≤ 3% , we substitute in Eq.(14) to have Kp= 21.286. Another example, for system
given by transfer function given by Eq.(16) to calculate proportional gain, Kp, that will give a steady state error ess of 5%, can be
accomplished as follows: the DC gain of controlled system is 1/0.5 =2, with unity feedback, Ks =1, and unity step input, substituting in
Eq.(14), gives K p=95, to calculate Kp that will result in overshoot OS% ≤ 10%, we first calculate closed loop transfer function, since this is second order system, using Eq.(12) from desired overshoot we find damping ratio ζ, we rewrite the denominator in terms of damping ratio
ζ and undamped natural frequency ωn , and by comparison we find the values of gain K p
G (s ) 
KP
1
 T (s ) 
0.1s 2  0.6s  0.5
0.1s 2  0.6s  (0.5  K P )
(16)
0.1s 2  0.6s  (0.5  K P )  s 2  2n s   n2
0.6  2n , (0.5  K P )  n2
2.5.2.1.2 P-Controller design for desired performance by selection of both or either of gain K P and/or parameter
Rewriting Eq.(10) to have the below form, with undefined system parameter P, both system parameter, and proportional gain K P, can be
selected to meet design specifications e.g. Ts, OS% , as follows: by finding closed loop transfer function and comparing it with standard
second order transfer function , gives
G plant (s ) 
KP
n2
1
 T closed (s )  2
 2
s (s  P )
s  Ps  K P s  2n s  n2
By comparison both system parameter P, and proportional gain KP, can be designed by:
K P   n2 and 2 n  P Farhan A. Salem
168
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
2.5.3 P-Controller design by the Root Locus
Considering that transient response specifications are obtained under the assumption that a given system has a pair of dominant complex
conjugate closed-loop poles, the root locus allows us to choose suitable gain proportional KP, to meet the required transient response
specifications. Using root locus, we are limited to those responses that exist along the root locus, where as the gain is varied we move
through different regions of response, and by setting the gain at a particular value yields the transient response dictated by the poles at that
point on the root locus. Proportional gain KP at that point is found by the magnitude criterion; dividing the product of the pole lengths by
the product of the zero lengths, as given by:
K =
1
│G(s)H(s) │
=
The product of pole lengths
The p roduct of zero lengths
=
Π pole lengths
Π zero lengths
Based on Figure 5, the damping ratio line can be found by the following equation:
ζ = cosθ, and θ=cos-1ζ
For desired damping ratio, overshoot or settling time, rise time, the damping ratio can be found and correspondingly damping ratio line and
finally proportional gain K P at intersection point between root locus and damping line, based on Fig 5 , the equations are given next
T  1 / n ,
TS  4 / n ,

 ln(%OS / 100)
 2  ln 2 (%OS / 100)
θ = cos-1 ζ
2
Pcl    n  j d  Pcl   n  n tan  n  jn (1   )
3.
Integral controller , I-controllers
An integral control integrates the error signal to generate the controller output signal. The I-Controller output signal, (control Effort, u(t)), is
changed at a rate proportional to the integral of error signal e(t), and equal to the integral of the error multiplied by the integral gain KI , this
can be described as follows:
du t 
du t 
 K e t  .dt  
  K e t  dt
dt
dt
u (t )  K I  e t  dt
(17)
Integrals give information concerning the past, that is why integrals provide stability and are always have a tendency to get stuck in the
past, and being late. Taking Laplace transform of Eq.(17) and rearranging for transfer function gives, the transfer function of integral
controller:
E s  K I
1
(18)
U (s )  K I E  s  , 

s
U (s )
s
3.1 Properties of I-controllers
Adding an I-controller will effect stability, speed of response and other performance measures, where the I-controller integrates the error
and eliminate it, this is why I-controller has the unique ability to return the process back to the exact setpoint.
Root locus: Adding an I-controller is equivalent to adding open-loop pole at the origin as shown by Eq.(10) (to the right of the right most
pole in the system) in the forward path, in result increasing the system type by one and steady-state error is reduced to zero (ess=0), also
resulting in“shifting” root-locus to the left tending to lower the system's relative stability and slows the response times.
In transient mode: the major disadvantage of I-controller is in that it allows a large deviation at the instant the error is produced , WHERE
based on fact that integration is a continual summing, integration of error over time means summing up the complete controller error
history up to the present time, this means I-controller can initially allow a large deviation at the instant the error is produced allowing the
oscillatory and slow transient behavior that can lead to system instability and cyclic operation, this all means the following; since the error
must accumulate, before a significant response is output from the controller, the integral control is not normally used alone, but is combined
with another control mode, I-control has a tendency to slow the response times by increasing TR , and OS% makes the transient response
worse.
In steady state mode: the major advantage of integral controllers is in that it return the controlled variable back to the exact setpoint, where
the I- control integrates the error and eliminates it (ess =0).
It is important to note the following: (1) large values of the integral gain (KI ) unsterilized the response. (2) The Differential controller in
feedback path is equivalent to an Integral controller in the forward path. (3) The Integral controller in feedback path is equivalent to a
differential controller in the forward path (4) The integral control is not normally used alone, but is combined with another control mode.
To more clearly understand integral control, we can recall integral in math; an integral is really the area under a curve, negative area can
subtract from positive area, lowering the value of an integral, Integration is a continual summing as time goes on, the area accumulates, E.G.
for (ʃAdt= At) , the integrator acts to transform the step change into a gradually changing signal every sample time. Integration of error
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
169
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
over time means that we sum up the complete controller error history up to the present time, this is shown in Figure 6 the integral sum of
error is computed as the shaded areas between the SP and PV traces, At time t = 60 min on the plots, the integral sum is 135 – 34 = 101.
The response is largely settled out at t = 90 min, and the integral sum is then 135 – 34 + 7 = 108 [19]. As note applying only P-controller,
there will always be a small offset-error between the reference input and the measured variable, to remove this offset-error, integral
control has to be used with proportional controller, resulting in (PI- Controller), the offset will be reduced over time until the measured
variable eventually will coincide with the reference input set point and the offset will cease to exist.
Figure 6. integral control calculations [19].
3.2 Physical analog realization of I-Controllers
The operational amplifier can be used as a building block to implement physical realization of I-Controllers shown in Figure 7. By
judicious choice of resistor and capacitor the I-controller can be implemented. The integrator basically works as follows: whatever current I
you get flowing in RI , gets integrated across capacitor CI . The output voltage Vout, is simply the voltage across CI . Inverting configuration,
formula for obtaining the output value and proportional gain, (KI), is given next below:
1
1
1
V in (t )dt ,  V out (s )  
V in (s )
RC 
RC
s
1 1
1
1
G (s )  
 KI , KI  
RC s
s
RC
V out (t )  
Figure 7. Operational Amplifier Integrator circuit and formula
3.2.1 Digital realization of I-Controller
In digital implementation, the I-control system computes the error, integrates the error using some standard integration algorithm, and then
generates an output control signal from that integration, An example code is written next.
Read KI, setpoint
// read proportional gain and desired output, setpoint
double error , effort
while ( )
y = ADC_read ( );
// read value of controlled variable from sensor
error = setpoint – y;
// compute new error
ErrorInt = ErrorInt + dt*( error);
effort =KI* ErrorInt
// calculate control effort
end
4.
Differential (Derivative) controller, D- controller
A derivative control differentiates the error signal to generate the controller output signal. it is when the signal driving the controlled system
is directly proportional to the rate change of the error with time, (the derivative of the error). The changing of the error indicates where the
error is going to be in the future, that is predicting the error in future, based on the past and current state (e.g. slope) of the error, once the
D-Controller has predicted the future error, it adds an additional control action of controller given by Gain * Future Error. The transfer
function is obtained as follows:
Farhan A. Salem
170
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
u t   K D de t  / dt  U  s   K D s E  s 
(19)
G(s) = K D s
4.1 Properties of D-controller
As shown in Eq.(19), adding Differential Controller is equivalent to addition of zero to the open loop transfer function.
In the transient mode: The D-control action mainly works in transient mode, D-controller will have the effect of improving the stability of
the system, and improving the transient response by providing a fast response; where adding D-control result in reducing the overshoot Mp,
settling time TS, small changes on both rise time TR and steady state error, D-controller predicts, the large overshoot and makes the
adjustment needed.
In steady state mode: If the steady-state error of a system is unchanged, (constant), in the time domain, the derivative control has no effect,
since the time derivative of a constant is zero.
4.2 Remedies for Derivative action; D-controller cascaded with a first-order low-pass filter
The D-controller based on past and present states, extrapolates the current slope of the error (see Figure 11), therefore has very high gain
this means a sudden rapid change in setpoint (and hence error) will cause the derivative controller to become very large, also for high
frequency signals would differentiate high frequency noise (noise is small, random, rapid changes), and thus provide a derivative kick to
the final control, this is undesirable which can cause problems including instability. To implement D-controller, in processes with noise,
Pure differentiator approximation (Pure differentiator cascaded with a first-order low-pass filter, of the next form: (1/τs+1), with small time
constant e.g. shorter than 1/5 of derivative time TD, is recommended this has the effect of attenuating (filtering) the high frequency noise
entering the D-controller.
filter 
1
1
 D _ filter 
,   very smal nuumber e .g . 0.20 or 0.1 T D
 s 1
 TD s  1
And the derivative controller will have the following form:
G D (s ) 
TD s
 TD s  1
Since D-controller works on the derivative of the error, derivative action is completely unable to control a process on its own , where if the
error is constant and doesn't change, de/dt =0, derivative will not do anything ,as a result derivative action is always used in conjunction
with one or more of the other control modes, PD, PID. It is important to note the following: (1) The D-controller in feedback path is
equivalent to a I- controller in the forward path, (2) The I-controller in feedback path is equivalent to a D-controller in the forward path,
(3) A Tachometer is an example of differential Control. In order to use the Derivative control the transfer function must be proper, that is
the degree of denominator is greater or equal to the degree of numerator, this is often requires a pole to be added to the controller.
4.3 Physical analog realization of D-Controllers
The operational amplifier can be used as a building block to implement physical realization of I-Controllers shown in Figure 8. By
judicious choice of resistor and capacitor the D- controller can be implemented. The Differentiator basically works as follows: whatever
current I you get flowing in C, gets differentiated across the resistor R, The output voltage Vout, is simply the voltage across resistor R. If
there is constant DC voltage applied as input then output voltage is 0 . If input voltage is changing from 0 to negative going voltage output
voltage is positive DC. If input voltage applied is changing from zero to positive going voltage then output is negative DC. Formula for
obtaining the output value and differentiator gain, (derivative gain KD), is given by:
dV in (t )
 V out (s )   RCV in (s )s
dt
1
G (s )  RCs  K I ,  K I   RC
s
V out (t )  RC
Figure 8. Operational Amplifier differentiator circuit and output formula
4.4 Digital realization of D-Controller
The D-control system computes the error, derivates the error using some standard integration algorithm, and then generates an output
control signal from that integration, an example code is written next.
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
171
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
Read KD, setpoint
// read proportional gain and desired output, setpoint
double error , effort
while ( )
y = ADC_read ( );
// read of controlled variable from sensor
error = setpoint – y;
// compute new error
ErrorInt = ErrorInt + (error)/dt
effort =KD* ErrorInt
// control effort
end
4.5 Pseudo-Derivative Feedback Control or Rate feedback control; D-Controller as rate feedback (feedback compensation)
As noted, a simple form of control systems is to place the controller in the forward loop ( cascade) in the front of the system to be
controlled. Another configuration is the design procedures for feedback compensation can be more complicated than for cascade
compensation. On the other hand, feedback compensation can yield faster responses. Thus, the engineer has the luxury of designing faster
responses into portions of a control loop in order to provide isolation [8]. a simple controller that is always used in the feedback loop is
known as the rate feedback controller (also called Pseudo-Derivative Feedback), where in 1977 Phelan [20-21] published a book, which
emphasizes a simple yet effective control structure, a structure that provides all the control aspects of PID control, but without system
zeros, and correspondingly removing negative zeros effect upon system response. Phelan named this structure "Pseudo-derivative feedback
(PDF) control from the fact that the rate of the measured parameter is fed back without having to calculate a derivative. The rate feedback
controller is obtained by feeding back the derivative (rate) of the output of a second-order system (or a system which can be approximated
by a second-order system, i.e. a system with dominant complex conjugate poles) according to the block diagram given in Figure 9. The rate
feedback control helps to increase the system damping, decreases both the response settling time and overshoot [22]. The closed loop
transfer function, for system without any controller in the forward loop is given by:
G plant (s ) 
n2
1
 T closed (s )  2
s (s  1)
s  2n s  n2
But, the closed loop transfer function, for rate feedback controller is given by:
T closed (s ) 
n2
s 2  2    0.5K Rate  n  n s  n2
Comparing these two closed loop transfer functions, to find the relation between damping ratios, shows that the damping ratio is increased
applying the rate feedback , and the undamped natural frequency is unchanged, resulting in improving transient response in terms of
reducing in settling time and overshoot
Rate    0.5K Rate n
The derivative gain can be calculated as follows:
KD 
2
( Rate   )
n
(20)
This means, based on damping ratio of original system closed loop transfer function without controller; we can design a rate feedback
controller to achieve a desired damping.
R(s)
+-
+
-
C(s)
G(s)
Krates
Figure 9. Block diagram for D-Controller as rate feedback
5.
Proportional-Derivative, PD-controller
The output control signal of PD-Controller controller u(t),is equal to the sum of two signals (see Figure 10); The signal obtained by
multiplying the error signal by a constant gain KP and the signal obtained by differentiating and multiplying the error signal by gain KD, and
given by Eq.(21), taking Laplace transform and solving for transfer function, gives Eq.(22) :
Farhan A. Salem
172
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
de (t )
 U (s )  K P E (s )  K D sE (s )
dt
K
G PD (s )  K P  K D s  K D (s  P )  K D (s  Z PD )
KD
(21)
u (t )  K P e (t )  K D
(22)
Where: ZPD = KP/KD, is the PD-controller zero,
5.1 Properties of PD-controller
The transfer given by Eq. (22), shows that PD controller is equivalent to the addition of a simple zero at ZPD = KP/KD, to the open-loop
transfer function. The addition of zeros to the open-loop transfer function has the effect of pulling the root locus to the left, or farther from
the imaginary axis, resulting in more stable system and improving the transient response.
In the transient mode: PD-controller improves (speed up) the transient response, it will decay faster resulting in less settling time TS, less
time constant T, less peak time TP, and reduced maximum overshoot MP.
In steady state mode: has minimum effect, from a different point of view, the PD controller may also be used to improve the steady-state
error only when error changes with respect to time, because it anticipates the direction of large errors and attempts corrective action before
they with large overshoot occur (see Figure 11).
(noise) Filtering the D-controller: The main disadvantages are in that the PD controller, given by: C(s) = K P + K Ds, is not physically
implementable, since it is not proper, also D-term in D-controller, has very high gain, where for high frequency signals would differentiate
high frequency noise, thereby producing large kicks in output, this means for particular systems, the addition of PD zero may cause
overshoot in the transient response for the closed loop system. In order to avoid this and use PD-controller, three main solutions; (1) To
replaced the PD controller, with lead compensator, which is a soft approximation of PD controller, (2) the D-control the transfer function
must be proper, that is the degree of denominator is greater or equal to the degree of numerator, this is often requires a pole to be added to
the controller correspondingly, Eq.(22) can be manipulated to have the following form:
G PD (s )  K P  K D s  K P (1 
KD
de (t )
s )  K P (1  T d s )  u (t )  K P (e (t )  T d
)
KP
dt
This is not proper transfer function, since the numerator has a higher degree than the denominator, the transfer function is not causal and
can not be realized, and therefore the PD controller is modified through the addition of a lag to the derivative term, to have a proper form
given by:
G PD (s )  K P (1 
Td s
)
1  Td s
(23)
Where: Td  K D / K P , is the time constants of the derivative actions,(Derivative time) extrapolating the error Td time units into the
future using the tangent to the error curve, this is shown in Figure 11. The approximation acts as a derivative for low-frequency signals and
as a constant gain for the high frequency signals. The transfer function of a PD controller with a filtered derivative term is given by:
G PD (s )  K P (1 
Td s
)
1 T d s / N
(24)
N: With the range of 2 to 20, it determines the gain K HF of the PID controller in the high frequency range, the gain KHF must be limited
because measurement noise signal often contains high frequency components and its amplification should be limited.
Figure 10. PD controller arrangements.
Figure 11. PD action[23]
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
173
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
5.2 Physical analog realization of PD-Controllers
PD controller circuit is shown in Figure 12, we can implement this circuit for designed values of KP and K D, corresponding to R1, R 2 and C.
Figure 12. two different PD controller circuit
5.3 PD-Controller with D-Controller as rate feedback (feedback compensation, rate sensor)
This is accomplished according to the block diagram given in Figure 8.22, resulting in improving transient response in terms of reducing in
settling time and overshoot, the closed loop transfer function is given by:
K P G (s )
1  G (s ) K D s
K P G (s )
K P G (s )
T (s ) 


1  G (s ) K D s  G (s ) K P 1  G (s )K D s  G (s )K P 1  G (s )  K D s  K P 
1  G (s ) K D s
For a type 1 system, rate feedback decreases the ramp-error constant K v but does not affect the step-error constant KP.
An example of applying PD-Controller with D-Controller as rate feedback, for electric motor output angular position control, where the
measured output is angle and the rate of measured output angle is angular speed, which is to be feedback, this is shown in Figure 13 now, If
we place a tachometer, it will output a voltage proportional to angular speed, this can be feed back to the regulator. Tachometer-feedback
control has exactly the same effect as the PD control shown Figure 10, the response of the system with tachometer feedback is uniquely
defined by the characteristic equation, whereas the response of the system with the PD control also depends on the zero at Z = -KP/KD,
which could have a significant effect on the overshoot of the step response [7].
R(s)
E(s)
+-
C(s)
KP
+
G(s)
-
R(s)
E(s)
+-
ω(s)
KP
+
G(s)
-
KDs
Figure 13 Block diagram for PD-Controller with DController as rate feedback
1
s
θ(s)
KRate
Figure 13 Electric motor controls.
5.4 Design of PD-controller with deadbeat response
Deadbeat response means the response that proceeds rapidly to the desired level and holds at that level with minimal overshoot,. A
deadbeat response has the following characteristics, (1) Steady-state error = 0, (2) Fast response; minimum both rise time TR and settling
time Ts, (3) 0.1% < percent overshoot <2%, (4) Percent undershoot <2% (The ± 2 % error band). Characteristics (3) and (4) require that the
response remain within the ±2% band so that the entry to the band occurs at the settling time Ts [25]. The deadbeat control could be used in
systems where the known finite settling time is required, PD-controller transfer function is given by:

K 
G PD  K p  K D s  K D  s  P   K D  s  Z o 
KD 

For example; the forward transfer function of DC motor system, is given by:
G forward (s ) 
(K p  K D s )K t
 (s )

3
V in (s ) ( L a J m )s  (R a J m  b m La )s 2  ( R ab m  K t K b )s 
Farhan A. Salem
174
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
The system overall closed loop transfer function, T(s) , from input signal to sensor , potentiometer, output is given by:
T (s ) 
( K p  K D s )K t
 (s )

3
2
V in (s ) (L a J m )s  ( R a J m  b m La )s  (R a b m  K t K b  K D K t K pot )s  K p K t K pot
Referring to [13], The controller gains KP and KD depend on the physical parameters of the actuator drives, to determine KP and KD that
yield optimal deadbeat response, the overall closed loop transfer function T(s) is compared with standard third order transfer function given
by below equation, knowing that α =1.9, β =2.2 and ωnTs =4.04 are known coefficients of system with deadbeat response given by table 1,
and choosing TS to be less than 2 seconds, gives the following:
G (s ) 
 n3
, n * 0.5  4.82, n  4.82 / 2  2.41
s  n s  n2 s  n3
T (s ) 
 (s )

V in (s )
3
2
(K p  K D s ) K t /  La J m 
K p K t K pot
(R a J m  bm La ) 2 (R a bm  K t K b  K D K t K pot )
s 
s 
s
La J m
La J m
La J m
3
KD 
( n2 L a J m )  ( R ab m  K t K b )
K t K pot
Kp 
n3 La J m
K t K pot
The desired Standard second order closed-loop transfer function for achieving desired deadbeat response specifications is given by:
T s  
n2
s  n s  n2
2
Table 1. The coefficients of the normalized standard transfer function
System
order
Optimal coefficients
α
2nd
3nd
4nd
5nd
6nd
β
γ
δ
ε
1.82
1.90
2.20
2.20
3.50
2.80
2.70
4.90
5.40
3.40
3.15
6.50
7.55
7.55
4.05
Percent
Overshoot
Percent
Undershoot
Rise,90%
Rise,100%
Settling
OS%
PU%
TR
TR
TS
0.10%
0.00%
3.47
6.58
4.82
1.65%
1.36%
3.48
4.32
4.04
0.89%
0.95%
4.16
5.29
4.81
1.29%
0.37%
4.84
5.73
5.43
1.63%
0.94%
5.49
6.31
6.04
5.6 Analytical PD-controller design approach, based on comparison technique
For first and second order systems and systems that can be approximated as first or second orders, based on desired performance
specifications, the PD controller gains can be calculated as follows:
a) Based on desired performance specifications , find desired damping ratio and undamped natural frequency
b) Find overall closed loop transfer function in terms of KP, KD
c) Compare closed loop TF , with standard second order transfer function written in terms of damping ratio and undamped natural
d)
e)
frequency, ( or first order written in terms of time constant), particularly compare both characteristic equations to separate PD
controller gains KP , K D in terms of damping ratio and undamped natural frequency
Substitute values , and find KP, KD
For example , for transfer function given by below transfer function, to have ζ=1 and ωn=4, the PD controller gains are calculated
as follows:
G (s ) 
a (K P  K D )
a
 T (s )  2
s (s  a )
s  (a  aK D )s  2K P
Comparing the characteristic equations and solving, gives:
s 2  (a  aK D )s  2K P  s 2  2n s  n2
KD 
2n  a
2
, K P  n
a
2
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
175
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
5.6 PD-controller design by root locus
5.6.1 straight-forward PD-controller design by root locus
PD controller is used to design a response that has a desirable percent overshoot and a shorter settling time. The procedure for the
graphical root-locus PD compensator design can be accomplished by following the next steps:
a) Construct an accurate root-locus plot, (or, simply plot pole-zero diagram of the open-loop plant transfer function)
b) Obtain the desired location of the closed loop dominant poles P1,2, from desired transient performance specifications e.g.
damping ratio ζ or OS% ,time constant T or settling time Ts by the following equations:
 ln(%OS / 100)
T  1 / n , TS  4 / n ,  
 2  ln 2 (%OS / 100)
θ = cos-1 ζ and Pcl = − ζ ωn ± jωd
Pcl   n  n tan  n  jn (1   2 )
c) Mark the location of the dominant pole P1,in the pole zero diagram.
d) Find the location of the PD controller zero Zo, such that the angle criterion as given by next equation is satisfied (The angles is
measure counterclockwise):
m

i 1
n
zi
   Pi  180r , where r  1, 3......
i 1
 Z 0   Z 1   Z 2  ......   P 1   P 2  ......  180
Two main ways to find PD controller zero Zo
d-1) Find the PD zero location using angle criterion by drawing line from the desired location of the dominant closed-loop poles s1 ,to the
real axis ,with the PD controller angle of zero θzo.
d-2) Applying trigonometry, referring to Figure 14, the PD zero location can be obtained using any of the following equation:
Z0 
d
  n
tan(c )
Z0 
n
 tan(c )  (1   2 )
tan(c )


Figure 14
a) Find derivative gain KD applying magnitude criterion; estimate the vector lengths from P1 to all poles and zeros and apply the
magnitude criterion to find KD.
b) Find proportional gain KP by:
KP
 KP  KDZ0
KD
c) Find PD transfer function : by substituting the value of the Zo or K P and KD in the PD controller transfer function :
K
G PD (s )  K P  K D s  K D (s  P )  K D (s  Z 0 )
KD
d) Analyzing the closed loop response with PD controller added, and if necessary, modifies the design to meet the desired
specifications.
e) Speeding up the time response can be done by either or both, 1) Move zero closer to the imaginary-axis, 2) Increase the
proportional gain.
Z0 
5.6.2 PD-controller pole cancelling design procedure by root locus
a) PD –controller is can be written in the form K*(s), that can be written in the next form:
K (s )  k (s  Z )
b)
c)
d)
Where :K = Kc* (the multiplication factor of plant numerator)
PD zero design ; Find the plant's pole closest to the origin that pushes the root locus to the right and cancel it effect by designing
PI zero equal to plant's closest pole.
Find gain K , in K*(s), by applying magnitude criterion.
If the system still slow , cancel the next slowest plant's pole , and the compensator transfer function will have the form
K (s )  k (s  Z 1 )(s  Z 2 )
Farhan A. Salem
176
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
6.
Proportional-Integral, PI-controller
The integral of the error as well as the error itself are used for control. The output control action signal u(t), of PI-Controller controller is
proportional to the error and the integral of error. The control action u(t) is equal to the sum of two signals ( see Figure 15(a)); The integral
of the error, e(t), multiplied by the integral gain KI , and the error e(t), multiplied by the proportional gain KP, and given by Eq.(25), taking
Laplace transform, and solving for transfer function gives Eq.(26):
u (t )  K P e (t )  K I  de (t )dt  U (s )  K P E (s )  K I E (s )
K
K s  KI
G PI (s )  K P  I  P

s
s
Where:
K P (s 
s
KI
)
KP

K 
1

 E (s )  K P  I 
s
s 

K P (s  Z PI )
s
(25)
(26)
Z PI  K I / K P , is the PI-controller zero. Equation (26) can be rewritten, in terms of integral time constant TI, to have the
following given by (333), and implemented as shown in Figure 15(b) :
G PI (s )  K P 
KI
K
1
1
 K P (1  I )  K P (1 
)  u (t )  K P (e (t )   e (t )dt )
s
KPs
TI s
Ti
u (t )  K P (e 
e
)
Ti
(27)
This means if constant error exists, the controller action will keep increasing, until the error is zero, where: TI =KP/KI, is the time constants
of the integral actions, or integral time , Both K P and TI are adjustable, a change in the value of KP affect both the proportional and integral
parts of control action.
Figure 15(a)
Figure 15(b)
Figure 15,16. UIU PI-Controller arrangement
6.1 Physical analog realization of PI-Controllers
PI controller circuit is shown in next Figure 16, we can implement this circuit for designed values of KP and KD, corresponding to R1, R2
and C, formula for obtaining the output value and gains is given by:
1
 R1
V out (s ) sC
R
R
1 1
1 1 

 2 
  2 

V in (s )
R2
R1 s R 1C
R
s
R1C 
 1
Figure 16. two physical analog realizations of PI-Controllers
(28)
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
177
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
6.2 Properties and limitations of PI-controller
If the zero steady-state error is an essential control requirement, then PI controller is the simplest choice to use, PI controller is capable to
provide an acceptable performance for the vast majority of the process control tasks (especially if the dominant process dynamics is of first
order) and it is indeed the most adopted controller in the industrial context
Transfer function given by Eq. (26), shows that PI-controller is equivalent to addition of a pole at the origin, P=0, and a stable zero at Z= KI / Kp , to the open loop path, (the zero placed near the pole), the addition of zero pulls the root-locus to the left, meanwhile the addition of
pole to the open-loop transfer has the effect of pulling the root locus to the right, resulting in; (1) Lower the system's relative stability, (2)
worse transient response, slow dawn the setting of response, (3) Improve steady-state error.
In transient mode : The presence of zeros in either the system will significantly inversely effect the response and may cause worse
transient response, slows dawn the setting and overshoot of response of the closed loop system, (this means PI control does not perform
well in sluggish systems), the size depending upon the relative position of the zeros and closed loop poles within the complex plane, [21]
some times and depending on controlled system, the transient response parameters with the PI controller are almost the same as those for
the original system.
In steady state mode: PI controller is used to drastically improve or eliminate the steady-state errors, where PI controller zero increases the
system type by one.
It is important to note the following: (1) Integral term in the feedback path is equivalent to a differentiator in the forward path, (2) PI
controller by it self is unstable, pure integrators not easy to physically implement; this is why PI controller is approximated to result in lag
compensator.
6.3 Filtering PI-controller
To avoid the inverse effect of the added zero, the zero should be cancelled, this can be accomplished, mainly, by one of the following two
main ways; applying prefilter or PI Control with Proportional in the Feedback Loop.
6.3.1 Systems design with prefilter
The negative effect PI-controller zero can be cancelled by adding a low-pass prefilter with pole equal to the zero of PI controller. Prefilter
is defined as low-pass filter with a transfer function G p(s) that filters the input signal R(s) prior to calculating the error signal. The required
prefilter transfer function to cancel the zero is given by Eq.(29). In general, the prefilter is added for systems with lead networks, PI or PID
compensators that introduce zeros and which may lead to worse transient response and overshoot. Pre-filters in general will not prevent
overshoot due to disturbance
GPrefilter (s) 
ZO
ZPI
 GPI _Prefilter (s ) 
s  ZO 
 s  ZPI 
(29)
The design with prefilter procedure is simple, and consist of the following steps:(1) Determine the zeros of the closed loop system, (2)
Design a prefilter in which the poles match the zeros of the closed loop system, (3) Apply the prefilter to the input command outside the
closed loop system, as shown in Figure 17
6.4 PI Controller design with Proportional in the Feedback Loop
The proportional term in PI-controller may not be desirable in cascade with controlled system, and is preferred to be in the feedback path
with controlled system (see Figure 18(a)) , this structure removes PI zero Z= - KI / Kp , ( as proposed by Phelan [20]) and feed's back a
proportional component of the output rather than the error, resulting in a smoother with improved transient response without or with
minimum overshoot in output response, The transfer function for this modified PI=controller is now given by:
U (s )  K P (C (s )) 
KI
E (s )
s
For plant of first order given by Eq.(30), the over all closed loop transfer function, is given by Eq.(31), this equation is identical to closed
loop equation of PI-control in cascade, the difference being that the PI compensated system contains a zero introduced by the compensator
at Z= - KI / Kp
a
s a
KI
C (s )
T (s ) 

R (s ) s 2  1  K P  as  K I
G (s ) 
(30)
(31)
Here notice that, there is note zero added, and correspondingly there is no PI-zero effect. However If overshoot response to commanded
input cannot be tolerated in the system, a pre-filter can be used on the system input.
Farhan A. Salem
178
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
Figure 17. Systems design with prefilter
Figure 18. (a) PI design with Proportional in the Feedback Loop
6.5 Analytical PI-controller design approach, based on comparison technique
The same procedure described for PD controller in 5.6, can be applied for PI controller design
6.6 PI-Controller design by root locus
PI-Controller is used to improve (eliminate) steady state response without affecting the transient response. Different procedures for the
graphical root-locus PI controller design; each has its effects, designer can apply any of these procedures depending at desired response,
considering that most of steps are allmostly similar.
6.6.1 First PI-controller design procedure
a) Construct an accurate root-locus plot, (or, simply plot pole-zero diagram of the open-loop plant transfer function)
b) Find PI controller zero , Zo such that the angle criterion as given by equation below is satisfied:
m

i 1
n
zi
   Pi  180r , where r  1, 3......
i 1
 Z 0   Z 1   Z 2  ......   P 1   P 2  ......  180
Two main ways to find PI controller zero Zo
b-1) The exact location of PI controller zero ,Zo , can be found using the dominant pole location and trigonometry , tan function.
b-2) PI controller zero ,Zo can be select to add the controller zero, Zo, close to origin , to be at 4 to 10 times to the right of the
dominant closed-loop poles Pcl, and given by:.
Zo 
c)
d)
Find proportional gain Kp, applying the magnitude criterion; Estimate the vector lengths from dominant P1 to all poles and
zeros.
Obtain the integral gain KI, by:
Z0 
e)
 n
 4to 10 
KI
 K I  Zo K P
KP
Find PI controller transfer function : by substituting the value of the Zo or KP and K I in the PI controller transfer function :
K
K s  KI
G PI (s )  K P  I  P

s
s
f)
K P (s 
s
KI
)
KP

K P (s  Z 0 )
s
Analyzing the closed loop response with PI controller added, and if necessary, modify the design to meet the desired
specifications.
6.6.2 Second shorthand PI-controller design procedure
a) Apply any of covered proportional controller KP design techniques (including comparison or root locus) , to design proportional
controller K P to meet the desired transient response specifications ( Ts, TR, OS%), that is place the dominant closed-loop system
poles at a desired location to satisfy specifications.
Pcl  n  jn (1   2 )
b)
c)
d)
e)
Add a PI controller with a zero at −ζωn /10.
Tune the gain of the system to move the closed-loop pole closer to Pcl.
For some system, designer can apply pole cancelling, to cancel plant closest to origin pole by adding corresponding similar PI
zero.
To speed up response you can increase KP gain
6.6.3 Third simple shorthand PI-controller design procedure
This simple technique has two features; Transient performance remains essentially unchanged and it generally takes a long time to reach
zero value of steady state (ess=0)
a)
b)
c)
Set the value of PI controller zero equals ZO = 0.1
Find proportional gain Kp, applying the magnitude criterion; Estimate the vector lengths from dominant P1 to all poles and
zeros.
From equation Z0 =KI/ KP, we find integral gain as follows:
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
179
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
0.1  K I / K P  K I  0.1 * K P
d)
Find the proportional gain KP , applying angle criterion .
6.6.3 Fourth extremely simple PI-controller design procedure
Very often PI-controller is implemented to have Kp=1, this implementation is sufficient to justify its main purpose of reducing the steady
state error, and PI-controller transfer function is given by:
G PI (s ) 
(s  Z 0 )
s
a) Apply Kp=1,
b) Set the PI controller’s pole at the origin and locate its zero arbitrarily close to the pole, e.g. 0.1 or 0.01
c) If necessary, adjust for Kp to compensate for the case when Kp is different from one.
6.6.4 Fifth PI-controller pole cancelling design procedure
a) PI –controller is can be written in the form K*(s), that can be written in the next form:
s Z 
K (s )  k 

 s 
Where : K = Kc* (the multiplication factor of plant numerator)
b) PI zero design ; Find the plant's pole closest to the origin that pushes the root locus to the right and cancel it effect by designing
PI zero equal to plant's closest pole.
c) Find gain K , in K*(s), by applying magnitude criterion.
6.6.5 PI controller tuning design procedure
a) Initially apply no integral gain, KI =0.
b) Increase proportional gain Kp, until get satisfactory response.
c) Start to add in integral KI, until the steady state error is removed in satisfactory time.
d) If the combination becomes oscillatory, May need to reduce Kp.
7.
Proportional-Integral- Derivative PID-controller
Combining all three controllers, results in the PID controller, the output of PID controller is equal to the sum of three signals: The signal
obtained by multiplying the error signal by a constant gain K P, and The signal obtained by differentiating and multiplying the error signal
by KD and The signal obtained by integrating and multiplying the error signal by K I, and given by Eq.(32), taking Laplace transform, and
solving for transfer function , gives Eq.(33)
u (t )  K P e (t )  K D
de (t )
1
 K I  e (t )dt  U (s )  K P E (s )  K D E (s )s  K I E (s )
dt
s
K
K


U (s )  E (s )  K P  I  K D s   G PID (s )  K P  I  K D s
s
s


This equation can be manipulated to result in the following form

K
K 
K D s 2  P s  I 
K
K
KI
K Ds 2  KPs  K I

D
D 
G PID (s )  K P 
 K Ds 

s
s
s
(32)
(33)
Equation (33) is second order system, with two zeros and one pole at origin, and can be expressed to have the following form:
G PID 
K D  s  Z PI
s  Z PD 
s
 K D  s  Z PI

 s  Z PD 
s
 G PD (s )G PI (s )
(34)
Which indicates that PID transfer function is the product of transfer functions PI and PD , Implementing these two controllers jointly and
independently will take care of both controller design requirements.
The transfer function of PID controller, GPID(s) ,can also be expressed as:
G PID 
K D  s  Z PI  s  Z PD  K D s 2   Z PI  Z PD  K D s  ( Z PI Z PD K D )

s
s
Rearranging, we have:
G PID 
K D s 2  Z PI  Z PD  K D s ( Z PI Z PD K D )
(Z Z K )


  Z PI  Z PD  K D  PI PD D  K D s
s
s
s
s
Farhan A. Salem
180
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
Substituting the following, K 1   Z PI  Z PD  K D , K 2  ( Z PI Z PD K D ), K 3  K D , gives:
G PID  K 1 
K2
 K 3s
s
(35)
Since PID transfer function is a second order system, it can be expressed in terms of damping ratio and undamped natural frequency to have
the following form:

K
K 
K D s 2  P s  I 
K D s 2  2n s  n2 
K
K

D
D 
G PID (s ) 

s
s
Where:  2  K I and
n
KD
2n 
(36)
KP
KD
The transfer function of PID control given by Eq.(32) can, also, be expressed in terms of derivative time and integral time to have the
following form:


1
T T s 2 T I s  1
G PID  K P 1 
T D s   K P I D
TIs
 TI s

(37)
Where: The integral time, TI  K P / K I , The derivative time, T D  K D / K P
K I  K P / T I , K D  K PT D
Since in Eq. (37) the numerator has a higher degree than the denominator, the transfer function is not causal and can not be realized,
therefore this PID controller is modified through the addition of a lag to the derivative term, to have the following form:
G PID


TDs
1
 K P 1 

 T I s 1  T D s

N


 , TD /N - time constant of the added lag


N: determines the gain KHF of the PID controller in the high frequency range, the gain K HF must be limited because measurement noise
signal often contains high frequency components and its amplification should be limited. Usually, the divisor N is chosen in the range 2 to
20. If no D-controller, then we have PI controller, given by Eq. (38), it is clear that, PI and PD controllers are special cases of the PID
controller.

T I s  1 
1 
G PI  K P  1 
  KP 

 TI s 
 TI s 
(38)
The addition of the proportional and derivative components effectively predicts the error value at TD seconds (or samples) in the future,
assuming that the loop control remains unchanged. The integral component adjusts the error value to compensate for the sum of all past
errors, with the intention of completely eliminating them in TI seconds (or samples). The resulting compensated single error value is scaled
by the single gain KP.
7.1 Properties of PID-controller
When three controllers combined we get a system that responds quickly to change (D-controller), generally track required positions (Pcontroller), and will eventually reduce errors (I-controller). More that 50% of industrial controllers in use utilize PID controller, PID
controller can be analog PID or digital PID, analog PID are mostly hydraulic, pneumatic, electric and electronic types or their combination,
many PID controllers are transformed into digital forms thought the use of microprocessor.
Filtering PID controller : two way including ; (1) PID introduce a zero into the closed loop transfer function, the presence of zero may
cause overshoot in the transient response for the closed loop system, to filter PID controller and eliminate the overshoot, a prefilter is used,
the same procedure is used; see systems design with prefilter. (2) Since it not be desirable to implement the controller as given above; in
practice, all signals will contain high frequency noise, and differentiating noise (by D-controller) will once again create signals with large
magnitudes. To avoid this, the derivative term K Ds is usually implemented in conjunction with a low-pass filter of the form: (1 /τs+1), with
small time constant e.g. shorter than 1/5 of derivative time TD , for some small τ, this has the effect of attenuating the high frequency noise
entering the D-controller, and produces the following controller proper transfer function:
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
181
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013

TD 
I
G PID (s )  K P 1 

T
s
1

 D s 

I
The transfer function of a PID controller with a filtered derivative is given by:


TD
I
G PID (s )  K 1 


 TI s 1  D s / N 
7.2 PID Control with Derivative in the Feedback Loop, PI-D controller
Derivative kick is very similar in origin to proportional kick, where any change in setpoint causes an instantaneous change in error, this
number is fed into the PID equation which results in an undesirable kick in the output. Since there is always a jump (Kick) in the error
signal, when system is subjected to step input, the derivative term in PID-controller may not be desirable in cascade with controlled system,
and is preferred (to remove the D-term negative effect) to be in the feedback path with controlled system, where PID controller is
restructure, by placing the derivative term, D-Controller, into the feedback path, as shown in figure 19, PI terms is applied on error, while
D terms is applied on controlled variable, this is therefore a standard feature of most commercial controllers, this controller is called PI-D
controller, the simplified transfer function is given by:
K 

K s 
U (s )   K P  I  E ( s )   D  C ( s )
s


 Ts  1 
The PI transfer function in terms of integral time is given by Eq.(40) , The D-controller transfer function in terms of derivative time is
given is given by Eq.(39):
G D (s ) 
Td s
1 Td s / N
G PI (s )  K P 
(39)
KI
K
1
 K P (1  I )  K P (1 
)
s
KPs
TI s
(40)
The controller and feedback transfer functions can be equivalently written as next; moving inner a summing junction in Figure 19(a), to the
left, gives two feedback loops the equivalent to inner loop is given by:
Td s
Td s
*

1
1 T d s / N

1   Td s 
K P (1 
)
K P 1 
 1 
TI s
T
N 

I s 
1
Further simplification gives, the following in the feedback [24], (see Figure 19(b)):
Feedback ,  H (s ) 
 Kp
1 
N

TD 


2
T I T D s  K P T I 
s  K P )
N 


T s

K P T I s  1  D  1 
 N

(a)
Figure 19. PID Control with Derivative in the Feedback Loop
(41)
(b)
Farhan A. Salem
182
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
7.3 Physical analog realization of PID-Controllers
PID controller circuit is shown in next Figure 20(a), Proportional term transfer function is given by Eq.(42), Integral term transfer function
is given by Eq.(43), Derivative term transfer function is given by Eq.(44), , finally, the transfer function of the PID op-amp circuit transfer
function and corresponding transfer function are given by Eq.(45):
G P (s ) 
E P (s )
R
 2
E (s )
R1
(42)
G I (s ) 
E I (s )
1

E (s )
RIC I s
(43)
G D (s ) 
E D (s )
 R D C D S
E (s )
G PID (s ) 
(44)
E o (s )
R
K
1
 2 
 R DC D S  K P  I  K D s
E (s )
R1 R I C I s
s
(45)
Based on circuit shown in Figure 20(b), the following transfer function can be derived:
R
C 
1
G PID (s )   2  1  
 R 2C 1S
R
C
R
C
 1
2 
I
2s
(a)
(46)
(b)
Figure 20. Two Physical analog realizations of PID controller circuit
7.4 Digital realization of PID-Controller
An example code of the PID-control system is written next.
Read KP, KI, KP
previous_error = 0;
integral = 0;
Read target_value
while ( )
Read current_ value ;
.
error = target_ value – current_ value ; // calculate error
proportional = KP * error;
// error times proportional gain
integral = integral + error*dt;
//integral stores the accumulated error
integral = integral* KI;
derivative = (error - previous_error)/dt; //stores change in error to derivate, dt is sampling period
derivative = KD *derivative;
PID_action = proportional + integral + derivative;
previous_error =error; //Update error
end
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
183
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
8.
Demonstrating controllers' effects
Based on P, PD, PI, and PID derived transfer functions in terms of derivative time, and integral time given by Eqs.( 40)( 23)( 37), a
MATLAB code, is written and can be used to demonstrate the effect of changing (decreasing and increasing) one gain in terms of
proportional gain K P, derivative time TD integral time TI , and fixing both others equal to unity , for system given by Eq.(47), the results are
shown in Figure 21, these results show the effect of each term on transient and steady-sate responses.
G (s ) 
1
3
(47)
2
s  3s  3s  1
0.5
0
Icreasing Ti, Applying only PI-controller
2
Amplitude
Amplitude
Icreasing Kp, Applying only P-controller
1
0
5
10
1
0
15
(sec)
Icreasing Td, Applying PD-controller
Amplitude
Amplitude
0
5
1
0
10
(sec)
Icreasing Ti, Applying PID-controller
0
10
20
30
40
(sec)
Icreasing Kp, Applying PID-controller
2
Amplitude
2
Amplitude
100
2
0.5
1
0
50
(sec)
Icreasing Td, Applying PID-controller
1
0
0
0
20
40
60
80
1
0
0
Time (sec)
10
20
30
Time (sec)
Figure 21. Demonstrating controllers' effects
9.
Compensators: Lead, lag and lag-lead compensators.
The desired transient and steady state performance specifications for given a control plant, can be achieved using controllers; P, I, D, PI,
PD, and PID, as well as by compensators. a compensator is an additional component or circuit that is inserted into a control system to
compensate for a deficient performance, to improve systems transient and steady state response by presenting additional poles and zeros to
the system, General form of the compensator is given by Eq. (48). As noted, in order to avoid controller disadvantages, controllers are
approximated, where; Lag compensator is soft approximation of PI Controller, Lead Compensator is soft approximation of PD Controller,
Lag-Lead Compensator, is soft approximation of PID Controller. A first-order compensator having equal numbers of poles and zeroes that
is a single zero and pole in its transfer function given by Eq. (49):
n
 s  Z 
i
G (s )  K C
i 1
n
(48)
 s  P 
i
i 1
G (s ) 
s  ZO
s  PO
Eq. (49) shows that compensators introduce, a located in the left half s-plane, pole–zero pair into the open loop transfer function.
(49)
Farhan A. Salem
184
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
9.1 Analog realization of compensators, TF , pole and zero distribution
The circuit shown in Figure 22(a) is active network architecture of electric compensator, by writing its mathematical model and simplifying
to find the transfer function of compensator, we find when it can be used to be lag or lead compensator:
E o R 2 R 4  R1C 1s  1 R 4C 1

*

*
Ei
R1 R 3  R 2C 2 s  1 R 3C 2
Where : Zo = R2C2
1
1
s
R 1C
s  ZO
T
K *
K
1
1
s  PO
s
s
R 2C 2
T
s
, and Po =R 1C1
If R1C 1 > R 2C 2 , that is Zo > Po , then the compensator is known as the lag compensator, The transfer function angle given by θc =θZo - θ
Po, is negative .The pole-zero configuration for lag compensator is shown in Figure 22(b)
If R1C 1< R2 C2 , that is Zo < Po , the compensator is known as the lead compensator, the transfer function angle given by θc =θZo - θPo, is
positive, The pole zero configurations for lead compensator is shown in Figure 22(c)
(a)
Compensator two different electric circuits
(b) lag compensator R1 C1 < R2C2 pole and zero distribution
(c) lead compensator If R1 C1 > R2C2 pole and zero distribution
Figure 22. Compensators and pole zero distribution
10. Lead compensator
Lead compensator is a soft approximation of PD-controller, The PD controller given by transfer function, GPD(s) = K P + K Ds , is not
physically implementable, since it is not proper, and it would differentiate high frequency noise, thereby producing large swings in output,
to avoid this, PD-controller is approximated to lead controller of the following form[25]:
G PD (s )  G Lead (s )  K P  K D
Ps
s P
The larger the value of P, the better the lead controller approximates PD control, rearranging gives:
G Lead (s )  K P  K D
G Lead (s ) 
K  s  P   K D Ps
Ps
 P
s P
s P
K P  K D P  s  K P P
s P
 KPP 
s 

K P  K DP 
 K P  K D P 
s P
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
185
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
K C  K P  K D P and
Now, let
 K P P  , we obtain the following approximated controller transfer function of PD controller,
Z 

KP  KDP 
and called lead compensator:
G Lead (s )  K C
s Z
s P
(50)
Where : Zo < Po , If Z < P : this controller is called a lead compensator, and If Z > P : this controller is called a lag compensator. Lead
compensator transfer function can be written to be:
G Lead (s ) 
P s  Z 


Z s P 
Where: P/Z, is called the lead ratio.
10.1 Properties of lead compensator
Lead compensation is a soft approximation of PD controller with transfer function G(s) = K P + K Ds . The angle contribution of lead transfer
function given by θc = θZo - θ Po, is positive.
Lead controller effect on root locus (transient response): since Zo < Po , Lead compensator basically slightly shift the locus to the left
result in improving (increase) the system's stability and (speeds up) the transient response, raise bandwidth and reduce steady state error.
A typical application of lead compensator is in controlling servos because it will speed up the original response.
10.2 Physical analog realization of Lead compensator
Lead compensator RC-circuit is shown in next Figure 23, the output signal is proportional to the sum of the input signal and its derivative,
the analog transfer function is derived as follows:
R2
R2
R1 (s  1)

*

R

R
  1  


R
1

 
1
2
1R 2 
R 2  R1   /  R1    

 Cs  1
 Cs   
 R1  R 2 
  Cs  
Ts  1
R2
G Lead (s )  
, where : 1   ,  
and T  R 1C R1  R 2
Ts  1
G Lead (s ) 
V 2 (s )

V 1 (s )
Figure 23. Lead compensator circuit
10.1 Lead-compensator design by root locus
10.1.1 First procedure for approximate lead controller design.
a) For required specifications e.g. Damping ratio ζ, time constant T, settling time Ts, and %OS, evaluate the performance of the uncompensated system to determine how much improvement in transient response is required.
b) Construct an accurate root-locus plot, ( or, simply plot pole-zero diagram of the open-loop plant transfer function).
c) Obtain the desired location of the closed-loop dominant poles from the time-domain specifications.
d) Select the Lead compensator zero: place the zero Zo to the left of the smallest plant’s pole .
e) Locate the compensator pole so that the angle criterion is satisfied.
f) Determine the compensator gain, Kc at dominant pole such that the magnitude criterion is satisfied.
g) Evaluate the performance specifications of the compensated system: If the overall response; rise time, overshoot and settling time
is not satisfactory, place the controller zero at a different location and repeat the design.
10.1.2 Cancelling technique for approximate lead controller design;
A lead compensator is a prefilter of the form K*(s) that can be written in the next form:
s P 
K (s )  k 

s Z 
a) Construct the lead compensator transfer function of the form of K*(s), where:
K = Kc* the multiplication factor of plant numerator
b) Lead zero design ; Find the plant's pole closest to the origin that pushes the root locus to the right and cancel it effect by
c)
designing lead compensator with zero equal to plant's closest pole.
Lead pole design ; set the lead pole equal to ten multiplied by plant's pole closest to the origin (Lead pole = plant's pole*10 ), that
is moving this plant's pole far away from origin
Farhan A. Salem
186
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
d) Find gain K , in K*(s), by applying magnitude criterion.
e) Evaluate the overall response ,if the overall response; rise time, overshoot and settling time is not satisfactory, place the
controller zero at a different location and repeat the design .
f) The static error constants Kp , Kv, Ka can be obtained from equations
K P  lim G lead (s )G (s ) , K   lim s *G lead (s )G (s ) , K a  lim s 2 *G lead (s )G (s )
s 0
s 0
s 0
For example: for a system transfer function given by Eq.(51, it is required to design a lead compensator that results in a damping ratio of
0.5.
2
(51)
G (s ) 
s (s  0.5)(s  2)
The system transfer function shows that the pole at -0.5 is causing a problem of pushing the root locus to the right. To remove its effect we
need to cancel this pole by adding Lead zero at its value (Z0=-0.5) , and move it out at ( pole*10 = -50), to lead pole. The unwanted pole -2
, is cancelled by the added lead controller zero -0.5 , ( and moving it from –0.5 to -5 ). Letting the lead compensator transfer function of the
form of K*(s), where K = Kc* 2, we have:
G lead (s )  K * (s )  K
s  0.5
s 5
And the resulting open loop transfer function, is given by:
G open (s ) 
2 k (s  0.5)
2k

s (s  0.5)(s  2)(s  5)
s (s  2)(s  5)
Now, Find gain K , by applying magnitude criterion.
10.1.3 Third shorthand procedure for approximate lead controller design;
a) Construct an accurate root-locus plot, ( or, simply plot pole-zero diagram of the open-loop plant transfer function).
b) Refering to Figure 24, From the location of the dominant pole , draw a horizontal line PA, passing through dominant pole.
c) Draw a line PB connecting dominant pole and origin.
d) Bisect the angle between PA and PB, by drawing bisect line PE.
e) Using the necessary angle ϕ , to be added to the dominant pole location to satisfy angle criterion, draw two lines,( PD and PC)
that makes angles ϕ/2 with bisector line PE .
f) The intersection of the two lines PD and PC with real negative axis give the necessary lead compensator pole and zero.
g) Recall that in lead compensator Zo > Po. Therefore the intersection of line PD and real axes gives compensator zero location and
the intersection of line PE and real axes gives compensator pole location.
h) Obtain the compensator transfer function, substituting values.
, G Lead (s )  K C
i)
s Z
s  1 /T
, G Lead (s )  K C 
s P
s  1 / T
Where: The lead zero is given by T = -1/ Zo. The lead pole is given by Po = -1/ α T.
Finding gain K, applying magnitude criterion and damping ratio of the dominant pole, and then finding Kc from the following
equation:
K = Kc* the multiplication factor of plant numerator.
Figure 24. [26] lead controller design
10.1.4 Fourth procedure for lead controller design;
a) Construct an accurate root-locus plot, (or, simply plot pole-zero diagram of the open-loop plant transfer function).
b) Obtain the desired location of the closed-loop dominant poles from the desired time-domain specifications.
c) Put lead zero Z0 under desired dominant pole, or just to the left.
d) Determine position of the lead pole applying angle criterion
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
187
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
e)
f)
Determine the compensator gain, K at dominant pole such that the magnitude criterion is satisfied.
Lead compensator transfer function can be written to have the form given by:
G Lead (s ) 
P
Z
s  Z 


s P 
10.1.5 Lag compensator.
The Lag compensator is a soft approximation of PI controller, it is used to improve the steady state response, particularly to result in
measurable reduction in steady-state of the system, without appreciably affecting the transient response, mainly, when the system transient
response is satisfactory but the system requires a reduction in steady state error, the reduction in the steady state error accomplished by
adding equal numbers of poles and zeroes to a systems.
PI controller uses a pure integrator (active network such as amplifiers) to place an open-loop, forward-path pole at the origin, PI-controller
by it self is unstable, pure integrators not easy to physically implement, meanwhile the lag compensator can be built with passive
components only (resistors and capacitors), and thus is easily implemented in analog control systems, by the passive network, a pole cannot
be placed at origin; the pole and zero are moved to the left, close near the origin , this is shown next:
G PI (s )  G lag (s )  K P 

KI
K s KI
K 
 P
 K P s  I  / s
s
s
K

P 
By approximating the PI controller by introducing value of pole Po that is not zero but near zero; the smaller we make Po , the better this
controller approximates the PI controller, and the approximation of PI controller will have the form:
G lag (s )  K c
s  Z o 
(52)
(s  PO )
Where: Zo > Po, and Zo small numbers near zero usually at -0.1, Zo =KI/KP , the lag compensator zero. Po: small number. Lag
compensator transfer function can be written to be:
G Lead (s ) 
P s  Zo 


Z  s  Po 
Where: P/Z, is called the lag ratio.
10.1.6 Properties of lag compensator?
Sometimes, lag compensators the best controller to use to get a system to perform as required, where the added pole and zero may possibly
be manipulated to give better stability, better performance and general improvement.
Lag controller effect on root locus: The poles and zeros of the lag compensator were Zo > Po, are placed very closed together, and the
compenation is closed relatevly to the origin , as a result lag controller adds a negative angle to the angle criterion (θc =θZo - θPo, is
negative) and tends to slightly shift to the right, the original root loci from the original location.
Lag controller effect on transient response: Lag compensator has the disadvantage on transient response of producing a decrease in
undamped natural frequency ωn , and correspondingly an increase in settling time. The time constant T of the system is usually increased,
producing a more sluggish system, For large gain values an overshoot and transient oscillation are introduced. Lag compensator is often
designed to minimally change the transient response of system that is the added pole and zero may be manipulated to give better stability,
better performance and general improvement.
Lag controller effect on gain, K: In the design of lag controller, the zero (Zo) must be chosen to be close to the pole at the origin so that the
angular contributions from the zero and the pole cancel out, i.e., (θzc – θpc = 0). Lengths of dominant pole to compensator pole and zero (P
to Zo and P to Po) are allmostly, similar, therefore the effect on gain allmostly unity. Applying magnitude criterion will result in the
following:
G lag (s )  K c
s  Z o 
(s  PO )
 Kc
Lag controller effect on steady state error: does not drive the steady-state error to zero but yield measurable reduction in steady-state,
where the steady state error constant (K P, K v, or K a), is increased by a factor equal to: Zo/ Po, and the steady-state error will thus decrease
by the same factor. Once we know how much the steady-state error must be reduced, we also know the ratio of compensator zero to pole.
Farhan A. Salem
188
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
10.1.7 Physical analog realization of Lag compensator
Lag compensator RC-circuit is shown in next Figure 25, The output signal is proportional to the sum of the input signal and its integral. The
analog transfer function is given by:
R2 
1
Cs
R 2Cs  1
1  Ts
1 s Z


 *
1
R1  R 2  Cs  1 1  Ts  s  P

R 2  R1 
Cs
R1  R 2
Where : 1   ,  
, T  R 2C , Z  1 / T , P  1 / T
R2
V (s )
G Lag (s )  out

V in (s )
Figure 25. Lag compensator circuit
11. Lag controller by root locus
By applying Lag compensator, the steady state error constant (KP, K v, or Ka ), is increased by a factor equal to: Zo/ Po, and the steadystate error will thus decrease by the same factor, therefore it is required to have a large value for Zo/ Po, this Only can be achieved if Z and
P are both small, i.e., close to the origin
11.1 First procedure for lag controller design;
a) Construct an accurate root-locus plot, (or, simply plot pole-zero diagram of the open-loop plant transfer function).
b) Obtain the desired location of the closed loop dominant poles P1,2, from desired transient performance specifications e.g.
damping ratio ζ or OS% ,time constant T or settling time Ts.
c) Calculate the necessary increase the steady state error constant, Zo/ Po to achieve desired steady state error.
d) Place compensator's Zo and Po close to the origin (with respect to desired pole positions), considering that
K error  Z0 / P0  Z0  P0 *K error
11.2 Second procedure for lag controller design;
e) Construct an accurate root-locus plot, ( or, simply plot pole-zero diagram of the open-loop plant transfer function).
f) Obtain the desired location of the closed loop dominant poles P1,2, from desired transient performance specifications e.g.
damping ratio ζ or OS% ,time constant T or settling time Ts.
g) Using root locus, determine the gain, Ko, to satisfy the specifications for the closed-loop poles.
h) Determine the gain, K to satisfy the desired stead-state error, ess, that is the uncompensated error constant K
K 
s 0
K
s z
z
K
a p
p
Or from steady state error equation or next equation:
i)
KC
j)
Determine the lag-controller gain, Kc ,( the lag ratio) using the following equation:
K
Gain to satify the desired damping ration  0 
K
Gain to satify the desired steady state error
Select the controller zero, Zo , close to origin, , or 4 to 10 times to the right of the dominant closed-loop poles, e.g.
Zo 
n
 4to 10 
Where : ζωn the desired pole real part.
g) Find the lag controller pole by : Po = Kc Zo, Based on the compensator DC gain of unity
1
K
KC  1
K0
h) Check the closed-loop system's specifications and redesign if needed.
11.3 Third simple shorthand procedure for lag controller design;
a) Use uncompensated root locus to find K to achieve transient response specifications (%OS, Tr, Tp, Ts).
b) Determine additional gain to satisfy the desired steady-state error ess specification.
For control systems of type zero, one, and two, respectively, the error constants are all given by the same expression, given in next
table as uncompensated error constant
Controllers and Control Algorithms: Selection and Time Domain Design Techniques Applied in Mechatronics Systems … Part I
189
Internat ional Jour nal of Engineeri ng Science s, 2(5) May 2013
Uncompensated error constant
The corresponding steady state constants of the compensated system will be given by
Compensated error constant
In order to increase these constants and reduce the steady state errors, the ratio of Zo/ Po should be as large as possible, Where: z1, z2,..zm,
system zeros, and P1, P2 ,..Pm, system poles
c) Select lag zero Zo close to the origin.
d) Calculate lag pole Po using the following equation
e)
f)
Select lag zero Zo close to the origin.
Check the steady-state error of compensated system. The controller gain is the gain that results in the required steady state error
G lag (s )  K c
g)
s  Z o 
(s  PO )
Check the closed-loop system's specifications and redesign if needed.
11.4 Forth procedure for lag controller design;
a) Construct an accurate root-locus plot, (or, simply plot pole-zero diagram of the open-loop plant transfer function).
b) Obtain the desired location of the closed-loop dominant poles from the desired time-domain specifications.
c) Place lag pole and zero close to the origin (with respect to desired pole positions),choose lag pole and zero so that their angles to
desired poles differ by less than 1 degree, where: Zo > Po, and Zo small numbers near zero usually at -0.1, Zo =KI/KP
d) Determine the compensator gain, K at dominant pole such that the magnitude criterion is satisfied.
Lag compensator transfer function can be written to be:
G Lag (s ) 
P  s  Zo 


Z  s  Po 
12. Lead-Lag compensator.
A lead-lag compensator combines the effects of a lead compensator with those of a lag compensator, resulting in a system with improved
transient response, stability, and steady-state error. Both analog and digital control systems use lead-lag compensators. The lag-lead
compensator is given by:
G Lag _ Lead (s )  G Lag (s ) *G Lead (s ) 
P1P2
Z 1Z 2
 s  Z 1  s  Z 2 



 s  P1  s  P2 
 s  Z 1  s  Z 2 
G Lag _ Lead (s )  K 

 , P1  Z 1 and P2  Z 2
 s  P1  s  P2 
G
Lag _ Lead (s )  G Lag (s )G Lead (s )
Figure 26
12.1 Physical analog realization of Lead-Lag compensator
Lead-Lag compensator RC-circuit is shown in next Figure 26, it combines the characteristics of the lag and the lead compensators.
12.2 lead-lag compensator design by root locus
The design for the phase-lag-lead controller combines design procedures of both lead and lag compensators
a) Check the transient response and steady state characteristics of the original system.
b) design the lead compensator to achieve the desired transient response and stability,
c) Then design a lag compensator to improve the steady-state response of the lead-compensated system.
Farhan A. Salem
190
Inter nat ional Journal of Engineer ing Sci ences, 2(5) May 2013
13. Lead integral compensator
It is a combination of lead compensator and I-control, the lead integral compensator transfer function is given by
G Lead _ Integral (s )  K C
1 (s  Z o )
(s  Z o )
 KC
s (s  Po )
s (s  Po )
(52)
Applying the lead Integral compensator will eliminate the steady state error, but the transient response may become worse where settling
time, overshoot may increase, also the system is subject to instability problems as the controller gain increased.
14. Conclusion and future work
This paper provides simple and user friendly controllers, control algorithms and design guide that illustrates the basics of controllers and
control algorithms, their elements, effects, selection and main design techniques intended for research purposes, application in educational
processes,. Based on this introductory design guide, in part (II) and (III) new conclusions and a proposed simple design approaches are to
be introduced tested and verified.
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
Robert H. Bishop (2006), Mechatronics an introduction , Taylor & Francis.
Devdas Shetty, Richard A. Kolk (1997), Mechatronics systems design, second edition, SI 2011, Cengage Learning.
De Silva, Clarence W., (2005) ,'Mechatronics : An Integrated Approach , CRC Press.
Godfrey C. Onwubolu, (2005), Mechatronics Principles and Applications'', Elsevier.
Ashish Tewari (2002), Modern Control Design with MATLAB and SIMULINK, John Wiley and sons, LTD, England.
Katsuhiko Ogata (1997), Modern control engineering'', third edition, Prentice hall.
Farid Golnaraghi, Benjamin C.Kuo, (2010), ''Automatic Control Systems'', John Wiley and sons INC .
Norman S. Nise, (2011), ''Control system engineering'', Sixth Edition, John Wiley & Sons, Inc.
Gene F. Franklin, J. David Powell, and Abbas Emami-Naeini, (2002) Feedback Control of Dynamic Systems'', 4th ed., Prentice Hall.
Bill Goodwine (2011), Engineering Differential Equations Theory and Applications, Springer.
Dale E. Seborg, Thomas F. Edgar, Duncan A. Mellichamp (2004), Process dynamics and control, second edition, Wiley.
Robert H. Bishop (2008), The Mechatronics handbook'' , second edition, CRC press.
Farhan A. Salem (2013), Precise analytical expressions for mechatronics systems time domain performance specifications and verification using
MATLAB / SIMULINK''' International Journal of Information Technology, Control and Automation ,Vol.3, No.1, January
Farhan A. Salem, Ahmad A. Mahfouz, Modeling and controller design for electric motor, using different control strategies and verification using
MATLAB/Simulink , Submitted and accepted , to I.J. Intelligent Systems and Applications, Submission ID 124 , 2012.
Hedaya Alasooly, Control of DC motor using different control strategies, global journal of technology and optimization 2011 .
D'Azzo, John Joachim, Houpis, Constantine H, “Linear control system analysis and design: conventional and modern“, 1988..
Farhan A. Salem, ' Precise analytical expressions for mechatronics systems time domain performance specifications and verification using '
International Journal of Information Technology, Control and Automation ,Vol.3, No.1, January 2013.
Farid Golnaraghi , Benjamin C. Kuo, Automatic control systems, John wiley &sons, 2000.
Douglas J. Cooper , '' practical process control' http://www. controlguru. com/wp/ p69.html
Richard M. Phelan, Automatic Control Systems, Cornell University Press, Ithaca, New York, 1977 .
Mike Borrello, '' Controls, Modeling and Simulation '' http://www. Stablesimu lations .com
Zoran Gajic's, personal Home Page , www. ece.rutgers. edu/~gajic/ psfiles/ chap8.pdf
http://www.cds.caltech.edu/~murray/amwiki/index.php/PID_Control
Dingyu Xue, YangQuan Chen, and Derek P , '' Linear Feedback Control" Society for Industrial and Applied Mathematics 2007.
R.C. Dorf and R.H. Bishop, Modern Control Systems,10th Edition, Prentice Hall, 2008,