I. INTRODUCTION
Controllers 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 . 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. Phase-lag, phase-lead, PI and PID (lag-lead) controllers have been designed according to the compensation theory and methodologies as described in .
The mathematical and conceptual premises 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.
II. LITERATURE REVIEW
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 first-order compensation, the controller transfer function can be expressed as
Here and 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
![Figure 1: Block diagram of a robot arm joint control system [1]](https://doc.globaljournals.org/lhyo71_55935/ocr/images/derivatives/e4/e489dfe7c9dbbafeb193847511b2d11bb0c7cdfdf5607181de4681b4c45fe7d4.webp)
| 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
Here! and! WP is the respective zero and pole locations in the w-plane and is the compensator dc gain. According to the bilinear approximation,
From the equations (1)-(4), in z-plane the controller can be realized as
and
The equation (1) yields to
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.

III. PLANT
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, . The sensor input is 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 continuous-time plant transfer function is
The continuous-time plant with feedback sensor gain transfer function is
The discrete-time plant with feedback sensor gain transfer function is
Fig. 2 presents the bode diagram of the system with D (z) = 1. For the uncompensated system, the phase margin, Pm = 79:6deg. With a gain margin, dB.
IV. PHASE-LAG CONTROLLER DESIGN
The dc gain of the lag controller design, and the high-frequency gain can be expressed as


The maximum phase shift lies between 0 and -90 deg. Which depends on the ratio . 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
and
The design approximates that the controller introduces 5 deg. phase lag to the system andjD(jwwc)Gd (jwwc)j = 1. The lag controller implies that w w0 = 0:1880 >ww0 = 0:1446 and the compensating phase angle, deg.
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, deg. at 1.88 rads-1 and the gain margin, 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.
| 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 |
V. PHASE-LEAD CONTROLLER DESIGN
The dc gain of the phase-lead controller, and the maximum phase shift, occurs at a frequency, . 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.
Here pm is the desired phase margin and
Where . The angle associated with the controller can be expressed as
The controller design requires
From the equations (18)-(20), it can be evaluated that
Because of the phase lead characteristic, and in the design procedure, has been selected to satisfy the following constraints.
The lead controller implies that . The calculated design parameters are presented instable-II. The controller transfer function is
Fig. 5 and Fig. 6 present the bode plots of the phase-lead controller and the compensated open loop system respectively. From the bode plot, it can be
(26) observed that the phase margin of the compensated plant, deg. at 2.8 rads-1 and the gain margin, 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.




VI. PROPORTIONAL-INTEGRAL (PI) CONTROLLER DESIGN
The controller transfer function can be expressed as
Here . Proportional-integral (PI) compensator acts like a phase-lag controller with the pole placed at .
Using the equation (4), the discrete transfer function of a PI controller can be expressed as
and
The controller design approach yields that at the crossover Frequency
At the cross-over frequency (1.75 rads-1 in this design example)
The angle associated with the controller is
From the equations (30)-(32), it can be derived as
The controller transfer function has been calculated as
The design parameters are: deg., and . Fig. 7 and Fig. 8 present the bode plots of the PI controller and the compensated open loop system respectively. From the bode plot, it can be observed that the phase margin of the compensated plant, deg. At 1.75 rads-1 and the gain margin, dB. The PI controller reduces the gain margin by (35:8 - 18:5) = 17:3 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.
VII. PROPORTIONAL-INTEGRAL-DERIVATIVE (PID)CONTROLLER DESIGN
The controller transfer function can be expressed as
Using the equation (4), the discrete transfer function of a PID controller can be expressed as
The controller frequency response is

At the cross-over frequency (1.85 rads-1 in this design example)
From the equations (30) and (39), it can be derived as and
For design consideration, by adding a pole in the derivative term, the controller transfer function is modified as
The modified frequency response is
Which yields to?
From the equation (44), it can be concluded that
and
The controller transfer function has been calculated as
For design consideration, by adding a pole in the derivative term, the controller transfer function is modified as
Fig. 9 and Fig. 10 present the bode plots of the PID controller and the compensated open loop system respectively. From the bode plot, it can be observed that the phase margin of the compensated plant, deg. at 1.85 rads-1 and the gain margin, 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.



VIII. STEP RESPONSE CHARACTERISTICS
The design problem explained in this paper has assumed an input of ; where u(t) is the unit step function. The scaled step response of the closed loop system for the designed phase-lag controller is presented in Fig. 11 and Fig. 12 shows the enlarged view.
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 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.



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.
IX. COMPARISON
Fig. 19 and Fig. 20 present the step responses of the designed phase-lag, phase-lead, PI and PID compensators in discrete (actual digital) domain and continuous (warped spline or w-plane) domain respectively. The step response characteristics of the designed controllers are enlisted in Table III for comparative analysis.
| 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 |


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.
X. CONCLUSION
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. 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.