0% found this document useful (0 votes)
24 views8 pages

Controller Paper

Uploaded by

Hậu Vũ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views8 pages

Controller Paper

Uploaded by

Hậu Vũ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/327389913

Design and Performance Analysis of Digital Controllers in Discrete and


Continuous Time Domains for a Robot Control System

Preprint · September 2018


DOI: 10.13140/RG.2.2.24827.57128

CITATIONS READS

0 14,643

1 author:

Dhiman Chowdhury
University of South Carolina
47 PUBLICATIONS 238 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Design and Control of DC Microgrid View project

Speech Features: Pitch and Formant Extraction of Vowel Sounds Using Autocorrelation and Frequency Domain Spectral Analysis View project

All content following this page was uploaded by Dhiman Chowdhury on 02 September 2018.

The user has requested enhancement of the downloaded file.


Design and Performance Analysis of Digital
Controllers in Discrete and Continuous Time
Domains for a Robot Control System
Dhiman Chowdhury, Student Member, IEEE
Electrical Engineering, University of South Carolina
SC 29208, Columbia, U.S.A.
[email protected]

Abstract—This paper presents design approach and perfor- phase margin or cross-over frequency. Phase-lag, phase-lead,
mance analysis of different types of digital compensators for a PI and PID (lag-lead) controllers have been designed according
robot arm joint control system which involves a sensor feed- to the compensation theory and methodologies as described in
back. The design procedure incorporates discrete (z-plane) and
continuous time (warped s-plane or w-plane) domain parameters. [1].
The design techniques of frequency response characteristics have The mathematical and conceptual premises articulated in this
been investigated and four basic types of controllers-phase-lag, paper have been explained in [1]. The basic framework and il-
phase-lead, proportional-integral (PI) and proportional-integral- lustrations of digital control systems have been reported in [2].
derivative (PID) have been designed and simulated on MATLAB. For education purpose, theory, simulation and experimental
All the controllers have been implemented to achieve a phase
margin of 40 deg. and open loop bode plots and closed loop approaches of digital control systems have been documented
step responses have been evaluated. Comparison among the in [3]. A closed loop model for digital control systems and
controllers on the basis of step response characteristics has been applications of digital controllers to speed drives have been
presented in this paper. presented in [4] and [5]. Several novel design and practical
Index Terms—Bode plot, compensators, continuous time, dis- implementation of digital controllers have been proposed in
crete domain, lag, lead, phase margin, PI, PID, robot control
system, step response
[6]-[10].
The example robot control system illustrated in this paper
consists of a sampler, digital controller block, D/A block
I. I NTRODUCTION
which is a zero-order hold (ZOH), a power amplifier gain,
Controllers are essential to determine the changes of system a servomotor represented by a s-domain transfer function,
parameters and to attain desired characteristics with perfor- gears represented by a gain value and a feedback sensor
mance specifications which are related to steady-state accu- block. The uncompensated plant is presented by a s-domain
racy, transient response, stability and disturbance reduction. transfer function. The sampler initiates A/D conversion and
Analog control systems are robust and do not incur inherent zero-order hold implements D/A conversion. The controllers
bandwidth limits and system modifications. Analog controllers are required to compensate the plant phase margin and the
are hard to synthesize complicated logics, make dynamic inter- desired outcome is considered as 40 deg. For performance
faces among multiple subsystems and are prone to inaccurate evaluation, steady-state error, percent overshoot, rise time and
designs and limitations due to the tolerances of the practical settling time are measured for each controller. The literature
devices. In addition analog systems are highly susceptible review of digital compensation, example uncompensated robot
to corruption by extraneous noise sources. Digital control arm joint plant, discrete and continuous time equations with
systems are reliable since no signal loss occurs in analog- design procedure, MATLAB simulation results of lag, lead,
to-digital (A/D) and digital-to-analog (D/A) conversions and PI and PID controllers and comparative analysis among these
are more flexible and accurate in case of sophisticated logic four are documented in this paper section-by-section.
implementation. Digital filters are not subject to external II. L ITERATURE R EVIEW
noises and are compatible for adaptive filtering applications.
Memory interface and fast response are possible for digital The plant configuration, compensation theory, mathematical
systems. derivations [equations (1)-(47)] of the design approaches and
A physical system or plant is accurately controlled through open loop and closed loop parameters of the controllers de-
closed-loop or feedback operation where an output (system scribed in this paper completely follow the literature reported
response) is adjusted as required by an error signal [1]. The in [1]. For a first-order compensation, the controller transfer
error signal is generated from the difference between the function can be expressed as
response as measured by the sensor feedback and the desired Kd (z − z0 )
D(z) = (1)
response. A controller or compensator processes the error z − zp
quantity to meet certain performance criteria [1]. This paper Here z0 and zp are the respective zero and pole locations. The
documents design methodologies of four digital controllers for bilinear or trapezoidal transformation of the controller from the
a real time robot control system. The compensating parameter discrete z-plane to the continuous w-plane (warped s-plane)
in these design approaches is the phase margin, determined implies
from the bode diagram of the plant. The design procedure 1 + (T /2)w
employs frequency response techniques which account for the D(w) = D(z), z = (2)
1 − (T /2)w
Fig. 1. Block diagram of a robot arm joint control system [1]

TABLE I
A PPLICATIONS OF MATLAB C OMMANDS

Commands Applications
tf Constructs transfer function or converts to transfer func-
tion
c2d Converts continuous-time dynamic system to discrete
time
bode Plots bode frequency response of dynamic systems
margin Locates gain and phase margins and crossover frequen-
cies
zpk Creates continuous-time zero-pole-gain (zpk) model
[used for lead controller]
d2c Converts discrete time model to continuous time model
f eedback Evaluates the closed loop system
step Evaluates the step response

Fig. 2. Bode plot of the uncompensated system

and
1 + (w/ωw0 ) III. P LANT
D(w) = a0 (3)
1 + (w/ωwp ) The robot arm control system has been presented in Fig. 1.
Here ωw0 and ωwp are the respective zero and pole locations In this example system, the sampling time, T = 0.1s, power
in the w-plane and a0 is the compensator dc gain. According amplifier gain, K = 2.4 and sensor feedback gain, Hk = 0.07.
to the bilinear approximation, The sensor input is θa in degrees and the output is in volts.
For the uncompensated plant, the controller, D(z) = 1. The
2 z−1 zero-order hold transfer function can be defined as
w= (4)
T z+1 1 − e−sT
GHO (s) = (9)
From the equations (1)-(4), in z-plane the controller can be s
realized as The continuous-time plant transfer function is
2/T −ωw0 9.6
ωwp (ωw0 + 2/T ) z − ( 2/T +ωw0 ) Gp (s) = 2 (10)
D(z) = a0 (5) s + 2s
ωw0 (ωwp + 2/T ) z − ( 2/T −ωwp )
2/T +ωwp The continuous-time plant with feedback sensor gain transfer
The equation (1) yields to function is
0.672
ωwp (ωw0 + 2/T ) Gc (s) = Gp (s) × Hk = 2 (11)
Kd = a0 (6) s + 2s
ωw0 (ωwp + 2/T ) The discrete-time plant with feedback sensor gain transfer
function is
2/T − ωw0 0.003147z + 0.002944
z0 = (7) Gd (z) = 2 (12)
2/T + ωw0 z − 1.819z + 0.8187
and Fig. 2 presents the bode diagram of the system with D(z) = 1.
2/T − ωwp For the uncompensated system, the phase margin, Pm = 79.6
zp = (8)
2/T + ωwp deg. with a gain margin, Gm = 35.8 dB.
The presented digital control system has been implemented IV. P HASE -L AG C ONTROLLER D ESIGN
and simulated on MATLAB and certain built-in commands The dc gain of the lag controller design, a0 = 10 and the
have been applied for evaluating the design specifications. high-frequency gain can be expressed as
Table-I consists of some specific MATLAB commands and a0 ωwp
their applications. Ghf (dB) = 20log (13)
ωw0
TABLE II
D ESIGN PARAMETERS S ATISFYING THE C ONSTRAINTS

Parameters Values
a1 7.6354
b1 0.4646
θr 372.4823 deg.
∠Gd (jωwc ) -152.4823 deg.
|Gd (jωwc )| 0.0695
|D(jωwc )| 14.4025
cos θr 0.9764

V. P HASE -L EAD C ONTROLLER D ESIGN


the dc gain of the phase-lead controller, a0 = 10 and the
maximum phase shift, θm occurs at a frequency, ωwm =
Fig. 3. Bode plot of the phase-lag controller √
ωw0 ωwp . In this paper, the controller is designed for 40 deg.
phase margin and the cross-over or phase margin frequency
for this design has been selected as ωwc = 2.8 rads−1 .
The lead controller design approach yields to
D(jωwc )Gd (jωwc ) = 1∠(180 + φpm ) (17)
here φpm is the desired phase margin and
1 + w/(a0 /a1 )
D(w) = a0 (18)
1 + w/(b1 )− 1
where ωw0 = aa10 and ωwp = b11 . The angle associated with
the controller can be expressed as
θr = ∠D(jωwc ) = 180 + φpm − ∠Gd (jωwc ) (19)
The controller design requires
Fig. 4. Bode plot of the phase-lag controlled total open loop system
1
|D(jωwc )| = (20)
|Gd (jωwc )|
The maximum phase shift lies between 0 and -90 deg. which From the equations (18)-(20), it can be evaluated that
depends on the ratio ωw0 /ωwp . In this paper, the controller 1 − a0 |Gd (jωwc )| cos θr
is designed for 40 deg. phase margin and the cross-over or a1 = (21)
ωwc |Gd (jωwc )| sin θr
phase margin frequency for this design has been selected as
and
ωwc = 1.88 rads−1 . cos θr − a0 |Gd (jωwc )|
Here b1 = (22)
ωwc sin θr
ωw0 = 0.1ωwc (14) Because of the phase lead characteristic, θr > 0 and in
the design procedure, ωwc has been selected to satisfy the
and
ωw0 following constraints.
ωwp = (15)
a0 |Gd (jωwc )| ∠Gd (jωwc ) < 180 + φpm ; |D(jωwc )| > a0 (23)
The design approximates that the controller introduces 5 deg. 1
|Gd (jωwc )| < ; b1 > 0 (24)
phase lag to the system and |D(jωwc )Gd (jωwc )| = 1. The lag a0
controller implies that ωw0 = 0.1880 > ωwp = 0.1446 and the cos θc > a0 |Gd (jωwc )| (25)
compensating phase angle, φm = (−180 + 5 + 40) = −135
The lead controller implies that ωw0 = 1.3097 < ωwp =
deg.
2.1524. The calculated design parameters are presented in
The controller transfer function is
Table-II. The controller transfer function is
7.707z − 7.564 15.809(z − 0.8771)
Dlag (z) = (16) Dlead (z) = (26)
z − 0.9856 (z − 0.8057)
Fig. 3 and Fig. 4 present the bode plots of the phase-lag Fig. 5 and Fig. 6 present the bode plots of the phase-lead
controller and the compensated open loop system respectively. controller and the compensated open loop system respectively.
From the bode plot, it can be observed that the phase margin of From the bode plot, it can be observed that the phase margin
the compensated plant, Pm = 40 deg. at 1.88 rads−1 and the of the compensated plant, Pm = 39.9 deg. at 2.8 rads−1 and
gain margin, Gm = 17.9 dB. The phase-lag controller reduces the gain margin, Gm = 14.6 dB. The phase-lead controller
the gain margin by (35.8 − 17.9) = 17.9 dB and the phase reduces the gain margin by (35.8 − 14.6) = 21.2 dB and
margin by (79.6 − 40) = 39.6 deg. From the marginalized the phase margin by (79.6 − 39.9) = 39.7 deg. From the
bode plot of the controller, it can be observed that the gain marginalized bode plot of the controller, it can be observed that
and phase margin values are undefined and thereby these are the gain and phase margin values are undefined and thereby
found to be infinite. these are found to be infinite.
Fig. 5. Bode plot of the phase-lead controller Fig. 7. Bode plot of the proportional-integral (PI) controller

Fig. 6. Bode plot of the phase-lead controlled total open loop system Fig. 8. Bode plot of the PI controlled total open loop system

VI. P ROPORTIONAL -I NTEGRAL (PI) C ONTROLLER D ESIGN and


ωwc sin θr
The controller transfer function can be expressed as KI = − (34)
|Gd (jωwc )|
KI 1 + w/ωw0 The controller transfer function has been calculated as
D(w) = KP + = KI (27)
w w 6.954z − 6.874
DP I (z) = (35)
Here ωw0 = KI /KP . Proportional-integral (PI) compensator z−1
acts like a phase-lag controller with the pole placed at ωwp = The design parameters are: θr = 356.1990 deg., KP = 6.9143
0. and KI = 0.8039. Fig. 7 and Fig. 8 present the bode plots
Using the equation (4), the discrete transfer function of a PI of the PI controller and the compensated open loop system
controller can be expressed as respectively. From the bode plot, it can be observed that the
T z+1 phase margin of the compensated plant, Pm = 40 deg. at
D(z) = KP + KI (28) 1.75 rads−1 and the gain margin, Gm = 18.5 dB. The PI
2 z−1
controller reduces the gain margin by (35.8 − 18.5) = 17.3
and
KI dB and the phase margin by (79.6 − 40) = 39.6 deg. From the
D(jωw ) = KP − j = |D(jωw )|ejθr (29) marginalized bode plot of the controller, it can be observed that
ωw
the gain and phase margin values are undefined and thereby
The controller design approach yields that at the cross-over
these are found to be infinite.
frequency
VII. P ROPORTIONAL -I NTEGRAL -D ERIVATIVE (PID)
D(jωwc )Gd (jωwc ) = 1∠(−180 + φpm ) (30) C ONTROLLER D ESIGN
At the cross-over frequency (1.75 rads−1 in this design The controller transfer function can be expressed as
example) KI
D(w) = KP + + KD w (36)
KI w
KP − j = |D(jωwc )|(cos θr + j sin θr ) (31)
ωwc using the equation (4), the discrete transfer function of a PID
The angle associated with the controller is controller can be expressed as
T z+1 z−1
θr = −180 + φpm − ∠Gd (jωwc ) (32) D(z) = KP + KI + KD (37)
2 z−1 Tz
From the equations (30)-(32), it can be derived as The controller frequency response is
cos θr KI
KP = (33) D(jωw ) = KP + j(KD ωw − ) = |D(jωw )|ejθr (38)
|Gd (jωwc | ωw
Fig. 9. Bode plot of the proportional-integral-derivative (PID) controller Fig. 10. Bode plot of the PID controlled total open loop system

At the cross-over frequency (1.85 rads−1 in this design


example)
KI
KP + j(KD ωwc − ) = |D(jωwc )|(cos θr + j sin θr ) (39)
ωwc
From the equations (30) and (39), it can be derived as
cos θr
KP = (40)
|Gd (jωwc |
and
KI sin θr
KD ωwc − = (41)
ωwc |Gd (jωwc )|
For design consideration, by adding a pole in the derivative
Fig. 11. Step response of the closed loop system for the phase-lag controller
term, the controller transfer function is modified as
KI KD w
D(w) = KP + + (42)
w 1 + (T /2)w
The modified frequency response is
KI KD jωw
D(jωw ) = KP − j + (43)
ωw 1 + jωw (T /2)
which yields to
2
KD ωwc (2/T ) KD ωwc (2/T )2 KI cos θr + j sin θr
[KP + 2 2
]+j[ − ]=
(2/T ) + ωwc (2/T )2 + ωwc
2 ωwc |Gd (jωwc )|
(44)
From the equation (44), it can be concluded that
2
KD ωwc (2/T ) cos θr
KP + = (45) Fig. 12. Enlarged version of Fig. 11 to show the continuous and discrete step
(2/T )2 + ωwc
2 |Gd (jωwc )|
responses
and
KD ωwc (2/T )2 KI sin θr
2 2
− = (46)
(2/T ) + ωwc ωwc |Gd (jωwc )| by (79.6 − 40) = 39.6 deg. From the marginalized bode plot
The controller transfer function has been calculated as of the controller, it can be observed that the gain and phase
margin values are undefined and thereby these are found to be
8.655z 2 − 9.694z + 1.125 infinite.
DP ID (z) = (47)
z2 − z
The controller parameter, KI is tuned at 0.85. From the VIII. S TEP R ESPONSE C HARACTERISTICS
equations (45) and (46), KD is found to be 0.1125 and KP The design problem explained in this paper has assumed an
is found to be 7.4877 respectively. The angle associated with input of θc = 0.07u(t); where u(t) is the unit step function.
controller, θr = 358.0683 deg. The scaled step response of the closed loop system for the
Fig. 9 and Fig. 10 present the bode plots of the PID controller designed phase-lag controller is presented in Fig. 11 and Fig.
and the compensated open loop system respectively. From the 12 shows the enlarged view.
bode plot, it can be observed that the phase margin of the From Fig. 11, the rise time is found to be 8.26s and percent
compensated plant, Pm = 40 deg. at 1.85 rads−1 and the overshoot is found to be 2.16% for the lag compensator.
gain margin, Gm = 20.2 dB. The PID controller reduces the There are two plots concatenated in this figure. One is the
gain margin by (35.8 − 20.2) = 15.6 dB and the phase margin continuous-time (w-plane) response and other is the actual
Fig. 13. Step response of the closed loop system for the phase-lead controller Fig. 16. Enlarged version of Fig. 15 to show the continuous and discrete step
responses

Fig. 14. Enlarged version of Fig. 13 to show the continuous and discrete step
responses Fig. 17. Step response of the closed loop system for the proportional-integral-
derivative (PID) controller

Fig. 15. Step response of the closed loop system for the proportional-integral
Fig. 18. Enlarged version of Fig. 17 to show the continuous and discrete step
(PI) controller
responses

digital controlled system response. the actual digital controlled system response.
The scaled step response of the closed loop system for the The scaled step response of the closed loop system for the
designed phase-lead controller is presented in Fig. 13 and Fig. designed PID controller is presented in Fig. 17 and Fig. 18
14 shows the enlarged view. From Fig. 13, the rise time is shows the enlarged view. From Fig. 17, the rise time is found to
found to be 8.72s and percent overshoot is found to be 0% be 5.68s and percent overshoot is found to be 27% for the PID
for the lead compensator. There are two plots concatenated in compensator. There are two plots concatenated in this figure.
this figure. One is the continuous-time (w-plane) response and One is the continuous-time (w-plane) response and other is
other is the actual digital controlled system response. the actual digital controlled system response.
The scaled step response of the closed loop system for the
designed PI controller is presented in Fig. 15 and Fig. 16 shows IX. C OMPARISON
the enlarged view. From Fig. 15, the rise time is found to be Fig. 19 and Fig. 20 present the step responses of the
5.96s and percent overshoot is found to be 28.5% for the PI designed phase-lag, phase-lead, PI and PID compensators in
compensator. There are two plots concatenated in this figure. discrete (actual digital) domain and continuous (warped s-
One is the continuous-time (w-plane) response and other is plane or w-plane) domain respectively. The step response
TABLE III
S TEP R ESPONSE C HARACTERISTICS OF THE C ONTROLLERS

Characteristics Phase-lag Phase-lead Proportional-integral (PI) Proportional-integral-


derivative (PID)
Steady-state error 0 0 0 0
Percent overshoot (%) 2.16 0 28.5 27
Rise time (s) 8.26 8.72 5.96 5.68
Settling time (s) 21.4 15.9 50.3 46.7

yields to a complex design methodology for the system where


PID controller is governed by tuning the control parameters.
Therefore phase-lead or PID can be selected for compensation
of the presented robot control system.
X. C ONCLUSION
This paper presents design and performance assessment of
four basic digital controllers: phase-lag, phase-lead, PI and
PID for a physical system of robot arm joint plant. The
design statement yields to a compensated phase margin of
the system frequency response to 40 deg. Frequency response
techniques have been applied and cross-over frequency is
the prime design specification to compensate the plant. The
Fig. 19. Step responses of the lag, lead, PI and PID controllers in discrete design methodologies have been investigated in both discrete
domain (z-domain or actual digital) and continuous (warped s-domain
or w-plane) time frames. The controllers have been simulated
on MATLAB and open loop bode plots and closed loop
step responses have been analyzed for comparative premises.
Such design specifications are applicable in different practical
control systems.
R EFERENCES
[1] C. L. Phillips, H. T. Nagle and A. Chakrabortthy, Digital Control System
Analysis & Design, 4th ed., Pearson, 2015.
[2] C. R. Phillips and N. T. Nagle, “Digital control system analysis and
design”, IEEE Trans. Systems, Man, and Cybernetics, vol. 15, no. 3,
May-Jun. 1985.
[3] H. Klee and J. Dumas, “Theory, simulation, experimentation: an in-
tegrated approach to teaching digital control systems”, IEEE Trans.
Education, vol. 37, no. 1, pp. 57-62, Feb. 1994.
[4] L. F. Godbout, D. Jordan and I. A. Apostolakis, “A closed-loop model
Fig. 20. Step responses of the lag, lead, PI and PID controllers in continuous for general multirate digital control systems”, in Proc. Int. Conf. Control-
domain Control 88, 13-15 Apr. 1988.
[5] C. Osawa and M. Ohara, “A digital control system with graphic language
and its applications to variable-speed drives”, IEEE Trans. Industry
Applications, vol. 28, no. 1, pp. 151-156, Jan./Feb. 1992.
characteristics of the designed controllers are enlisted in Table- [6] A. Królikowski and D. Horla, “Design of digital control systems via
LMI”, in Proc. European Control Conf. (ECC), 23-26 Aug. 2009.
III for comparative analysis. [7] F. Pesántez-Pesántez, A. Valdez-Salamea, X. Serrano-Guerreo,
Since the controllers are designed with optimum considera- W. Orozco-Tupacyupanqui and G. Escrivá-Escrivá, “A digital control
tions, no steady-state error is observed. In case of the phase-lag system for Lighting Energy Consumption Efficiency (LECE)”, in Proc.
IEEE Autumn Meeting Power, Electronics and Computing (ROPEC),
controller, the low frequency response and stability margins get 8-10 Nov. 2017.
improved with a reduced bandwidth. In case of the phase-lead [8] J. V. Wallbank, S. Singh and S. Walters, “An introduction to the
controller, high frequency response and stability margins get implementation of digital control - Leading to the control of electrical
power systems”, in Proc. 52nd Int. Universities Power Engineering Conf.
improved with an increased bandwidth. PI controller behaves (UPEC), 28-31 Aug. 2017.
like a phase-lag compensator since the integral term is the lag [9] N. A. Sevostyanov, R. L. Gorbunov and M. A. Zharkov, “Digital control
controller. From Table-III, it can be observed that in terms system with an adaptive feedback loop for AC motor PWM drive”, 17th
Int. Ural Conf. AC Electric Drives (ACED), 26-30 Mar. 2018.
of percent overshoot, lead controller performs better than the [10] V. Mazulina, O. Nuyya, E. Sergeeva and N. Vunder, “Digital con-
other controllers and in terms of rise time, PID shows the trol system of the recuperation device”, 9th Int. Cong. Ultra Modern
best performance. PID controller is a lag-lead compensator in Telecommunications and Control Systems and Workshops (ICUMT), 6-
8 Nov. 2017.
which PI block acts as the lag controller and PD block acts as
the lead controller. In comparison of PI and PID controllers,
PID results in reduced overshoot and settling time than the
PI because of the additional derivative term. Rise time is the
highest for the lead controller but in case of percent overshoot
and settling time it outperforms rest of the three. Rise time
is the lowest for the PID controller. Phase-lead compensator

View publication stats

You might also like