ontrollers are essential to determine the changes of system parameters and to attain desired characteristics with performance specifications which are related to steady-state accuracy, transient response, stability and disturbance reduction. Analog control systems are robust and do not incur inherent band width limits and system modifications. Analog control lersare hard to synthesize complicated logics, make dynamic interfaces among multiple subsystems and are prone to inaccurate designs and limitations due to the tolerances of the practical devices. In addition analog systems are highly susceptible to corruption by extraneous noise sources. Digital control Systems are reliable since no signal loss occurs in an along to-digital (A/D) and digital-to-analog (D/A) conversions and are more flexible and accurate in case of sophisticated logic implementation. Digital filters are not subject to external noises and are compatible for adaptive filtering applications. Memory interface and fast response are possible for digital systems.
A physical system or plant is accurately controlled through closed-loop or feedback operation where an output (system response) is adjusted as required by an error signal [1]. The error signal is Generated from the difference between there sponge as measured by the sensor feedback and the desired response. A controller or compensator processes the error quantity to meet certain performance criteria [1]. This paper documents design methodologies of four digital controllers for a real time robot control system. The compensating parameter in these design approaches is the phase margin, determined from the bode diagram of the plant. The design procedure employs frequency response techniques which account for the phase margin or cross-over frequency. Phaselag, phase-lead, PI and PID (lag-lead) controllers have been designed according to the compensation theory and methodologies as described in [1].
The mathematical and conceptual pr emises articulated in this paper have been explained in [1]. The basic framework and illustrations of digital control systems have been reported in [2].For education purpose, theory, simulation and experimental approaches of digital control systems have been documented in [3]. A closed loop model for digital control systems and applications of digital controllers to speed drives have been presented in [4] and [5]. Several novel design and practical implementation of digital controllers have been proposed in [6]- [10].
The example robot control system illustrated in this paper consists of a sampler, digital controller block, D/A block which is a zero-order hold (ZOH), a power amplifier gain ,a servomotor represented by a s-domain transfer function, gears represented by a gain value and a feedback sensor block. The uncompensated plant is presented by a s-domain transfer function. The sampler initiates A/D conversion and zero-order hold implements D/A conversion. The control lersare required to compensate the plant phase margin and the desired outcome is considered as 40 deg. For performance evaluation, steady-state error, percent over's hoot; rise time and settling time are measured for each controller. The literature review of digital compensation, example uncompensated robot arm joint plant, discrete and continuous time equations with design procedure, MATLAB simulation results of lag, lead, PI and PID controllers and comparative analysis among these four are documented in this paper section-by-section.
The plant configuration, compensation theory, mathematical derivations [equations (1)-(47)] of the design approaches and open loop and closed loop parameters of the controllers described in this paper completely follow the literature reported in [1]. For firstorder compensation, the controller transfer function can be expressed as (1)
(2)
From the equations ( 1)-( 4), in z-plane the controller can be realized as (5) The equation (1) yields to (6) (7) and (8) The presented digital control system has been implemented and simulated on MATLAB and certain built in command shave been applied for evaluating the design specifications. Table-I consists of some specific MATLAB commands and their applications.
D(z) = K d (z ? z 0 ) z ? z D(w) = D(z), z = 1 + (T /2)w 1 ? (T /2)w D(w) = a 0 1 + (w/? w0 ) 1 + (w/? wp ) w = 2 T z ? 1 z + 1 D(z) = a 0 ? wp (? w0 + 2/T ) ? w0 (? wp + 2/T ) z ? ( 2/T ??w0 2/T +?w0 ) z ? ( 2/T ??wp 2/T +?wp ) K d = a 0 ? wp (? w0 + 2/T ) ? w0 (? wp + 2/T ) z 0 = 2/T ? ? w0 2/T + ? w0 z p = 2/T ?Here z 0 and z p are the respective zero and pole locations. The bilinear or trapezoidal transformation of the controller from the discrete z-plane to the continuous w-plane (warped s-plane) implies Here! w w0 and! WP is the respective zero and pole locations in the w-plane and a 0 is the compensator dc gain. According to the bilinear approximation, The robot arm control system has been presented in Fig. 1. In this example system, the sampling time, T = 0:1s, power amplifier gain, K = 2:4 and sensor feedback gain, H k = 0:07.The sensor input is ? a in degrees and the output is in volts. For the uncompensated plant, the controller, D (z) = 1. The zero-order hold transfer function can be defined as The dc gain of the lag controller design, a 0 = 10 and the high-frequency gain can be expressed as
G HO (s) = 1 ? e ?sT s G p (s) = 9.6 s2 + 2s G c (s) = G p (s) × H k = 0.672 s 2 + 2s G d (z) = 0.003147z + 0.002944 z 2 ? 1.819z + 0.8187 G hf (dB) =)Here ?pm is the desired phase margin and
(18)(19)The controller design requires (20)
From the equations ( 18)-(20), it can be evaluated that
D(j? wc )G d (j? wc ) = 1?(180 + ? pm ) D(w) = a 0 1 + w/(a 0 /a 1 ) 1 + w/(b 1 ) ? 1 ? r = ?D(j? wc ) = 180 + ? pm ? ?G d (j? wc ) |D(j? wc )| = 1 |G d (j? wc )| a 1 = 1 ? a 0 |G d (j? wc )| cos ? r ? wc |G d (j? wc )| sin ? r b 1 = cos ? r ? a 0 |G d (j? wc )| ? wc sin ? r ?G d (j? wc ) < 180 + ? pm ; |D(j? wc )| > a 0 |G d (j? wc )| < 1 a 0 ; b 1 > 0 cos ? c > a 0 |G d (j? wc )| © 2018 Global JournalsThe maximum phase shift lies between 0 and -90 deg. Which depends on the ratio w 0 =! w p . 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 Fig. 3 and Fig. 4 present the bode plots of the phase-lag Controller and the compensated open loop system respectively. From the bode plot, it can be observed that the phase margin of the compensated plant, P m = 40 deg. at 1.88 rads-1 and the gain margin, G m = 17:9 dB. The phase-lag controller reduces the gain margin by (35:8 -17:9) = 17:9 dB and the phase margin by (79:6 -40) = 39:6 deg. From the marginalized bode plot of the controller, it can be observed that the gain and phase margin values are undefined and thereby these are found to be infinite. Bode plot of the controller, it can be observed that the gain and phase margin values are undefined and thereby these are found to be infinite.
The dc gain of the phase-lead controller, a 0 = 10 and the maximum phase shift, ? m occurs at a frequency, Wm = pww 0 ww P . In this paper, the controller is designed for 40 deg. phase margin and the crossover or phase margin frequency for this design has been selected as!wc = 2:8 rads-1. The lead controller design approach yields to.
Where ww 0 =a 0 a1andww P =1b1. The angle associated with the controller can be expressed as Because of the phase lead characteristic, ? r > 0 and in the design procedure, ww c has been selected to satisfy the following constraints.
The design approximates that the controller introduces 5 deg. phase lag to the system andjD(jww c )Gd (jww c )j = 1. The lag controller implies that w w 0 = 0:1880 >ww 0 = 0:1446 and the compensating phase angle, ? m = (-180 + 5 + 40) = -135 deg. The lead controller implies that ww 0 = 1:3097 < ww p =2:1524. The calculated design parameters are presented instable-II. The controller transfer function is observed that the phase margin of the compensated plant, P m = 39:9 deg. at 2.8 rads-1 and the gain margin, G m = 14:6 dB. The phase-lead controller reduces the gain margin by (35:8 -14:6) = 21:2 dB and the phase margin by (79:6 -39:9) = 39:7 deg. From the marginalized bode plot of the controller, it can be observed that the gain and phase margin values are undefined and thereby these are found to be infinite. Proportional-Integral-Derivative (pid)Controller Design
The controller transfer function can be expressed as (36)
Using the equation ( 4), the discrete transfer function of a PID controller can be expressed as
D(w) = K P + K I w + K D w (37)The controller frequency response is (38)
D(z) = K P + K I T 2 z + 1 z ? 1 + K D z ? 1 T z D(j? w ) = K P + j(K D ? w ? K I ? w ) = |D(K P = cos ? r |G d (j? wc | K D ? wc ? K I ? wc = sin ? r |G d (j? wc )| D(w) = K P + K I w + K D w 1 + (T /2)w D(j? w ) = K P ? j K I ? w + K D j? w 1 + j? w (T /2) [K P + K D ? 2 wc (2/T ) (2/T ) 2 + ? 2 wc ]+j[ K D ? wc (2/T ) 2 (2/T ) 2 + ? 2 wc ? K I ? wc ] = cos ? r + j sin ? r |G d (j? wc )| K P + K D ? 2 wc (2/T ) (2/T ) 2 + ? 2 wc = cos ? r |G d (j? wc )| K D ? wc (2/T ) 2 (2/T ) 2 + ? 2 wc ? K I ? wc = sin ? r |G d (j? wc )| D P ID (z) = 8.655z 2 ? 9.694z + 1.125 z 2 ? z © 2018 Global JournalsFor design consideration, by adding a pole in the derivative term, the controller transfer function is modified as respectively. From the bode plot, it can be observed that the phase margin of the compensated plant, P m = 40 deg. at 1.85 rads-1 and the gain margin, G m = 20:2 dB. The PID controller reduces the gain margin by (35:8-20:2) = 15:6 dB and the phase margin by (79:6 -40) = 39:6 deg. From the marginalized bode plot of the controller, it can be observed that the gain and phase margin values are undefined and thereby these are found to be infinite. Step Response Characteristics From Fig. 11, the rise time is found to be 8.26s and percent overshoot is found to be 2.16% for the lag compensator. There are two plots concatenated in this figure. One is the continuous-time (w-plane) response and other is the actual digital controlled system response. The scaled step response of the closed loop system for the designed PID controller is presented in Fig. 17 and Fig. 18 shows the enlarged view. From Fig. 17, the rise time is found to be 5.68s and percent overshoot is found to be 27% for the PID compensator. There are two plots concatenated in this figure. One is the continuous-time (w-plane) response and other is the actual digital controlled system response. Since the controllers are designed with optimum considerations, no steady-state error is observed. In case of the phase-lag controller, the low frequency response and stability margins get improved with a reduced bandwidth. In case of the phase-lead controller, high frequency response and stability margins get improved with an increased bandwidth. PI controller behaves like a phase-lag compensator since the integral term is the lag controller. From Table-III, it can be observed that in terms of percent overshoot, lead controller performs better than the other controllers and in terms of rise time, PID shows the best performance. PID controller is a lag-lead compensator in 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 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.
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 Design methodologies have been investigated in both discrete (z-domain or actual digital) and continuous (warped s-domain or w-plane) time frames.
![Figure1: Block diagram of a robot arm joint control system[1]](https://engineeringresearch.org/index.php/GJRE/article/download/1789/version/100958/2-Design-and-Performance_html/20965/image-2.png)



















| Commands | Applications |
| tf | Constructs transfer function or converts to transfer function |
| 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 frequencies |
| zpk | Creates continuous-time zero-pole-gain (zpk) model [used for lead controller] |
| d2c | Converts discrete time model to continuous time model |
| feedback | Evaluates the closed loop system |
| step | Evaluates the step response |
| and |
| V. Phase-Lead Controller Design | |
| Parameters | Values |
| a1 | 7.6354 |
| b1 | 0.4646 |
| ?r | 372.4823 deg. |
| \Gd(j!wc) | -152.4823 deg. |
| jGd(j!wc)j | 0.0695 |
| jD(j!wc)j | 14.4025 |
| cos ?r | 0.9764 |
| 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 |
The scaled step response of the closed loop system for the designed phase-lead controller is presented in Fig. 13 and Fig. 14 shows the enlarged view. From Fig. 13, the rise time is found to be 8.72s and percent overshoot is found to be 0% for the lead compensator. There are two plots concatenated in this figure. One is the continuous-time (w-plane) response and other is 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 the enlarged view. From Fig. 15, the rise time is found to be 5.96s and percent overshoot is found to be 28.5% for the PI compensator. There are two plots concatenated in this figure. One is the continuous-time (w-plane) response and other is the actual digital controlled system response.
Design of digital control systems via ´LMI. Proc. European Control Conf. (ECC), (European Control Conf. (ECC)) Aug. 2009. p. .
A digital control system with graphic language and its applications to variable-speed drives. IEEE Trans. Industry Applications Jan./Feb. 1992. 28 (1) p. .
Digital control system analysis and design. IEEE Trans. Systems, Man, and Cybernetics May-Jun. 1985. 15 (3) .
A digital control ´ system for Lighting Energy Consumption Efficiency (LECE). Proc. IEEE Autumn Meeting Power, Electronics and Computing (ROPEC), (IEEE Autumn Meeting Power, Electronics and Computing (ROPEC)) Nov. 2017. p. .
Theory, simulation, experimentation: an integrated approach to teaching digital control systems. IEEE Trans. Education Feb. 1994. 37 (1) p. .
An introduction to the implementation of digital control -Leading to the control of electrical power systems. Proc. 52nd Int. Universities Power Engineering Conf. (UPEC), (52nd Int. Universities Power Engineering Conf. (UPEC)) Aug. 2017. p. .
A closed-loop model for general multirate digital control systems. Proc. Int. Conf. Control, (Int. Conf. Control) Apr. 1988. 88 p. .
Digital control system of the recuperation device. 9th Int. Cong. Ultra Modern Telecommunications and Control Systems and Workshops (ICUMT), Nov. 2017. p. .