A New Approach for Calculation of PID Parameters with Model Based Compact Form Formulations

PID controller is a popular control method still widely used in process industry. In literature there are model/non-model based calculation methods for PID parameters. However, a model based analytic formulation in compact form in discrete time has not been come across yet. This study presents a new approach for calculation of PID parameters with model based analytic formulation (MBCF), which is presented uniquely in this paper, in compact form, in discrete time. Furthermore, a procedure for implementation of the proposed formulas is given in four stages. The formulations in related literature for PID parameter calculation are all derived for continuous time. Therefore, extra transformations are required for a discrete time design. The proposed MBCF formulation method reduces extra calculation burden and simplifies calculation complexity. Moreover, this method provides a direct calculation method for digital PID controller design in discrete time. The derived expressions in this study also provide a fast, easy-implemented, and practical PID parameter calculation method for all field researchers and application engineers. The validation of proposed MBCF formulations are comparatively proved with the simulations and the real time application results. DOI: http://dx.doi.org/10.5755/j01.eee.20.3.4415


I. INTRODUCTION
Proportional-integral-derivative (PID) controllers have been widely used and are essential elements in industry especially in process control applications [1], [2].The reason behind this wide usage is not only about its simple structure and easy implementation but also its sufficient control performance in the limitless type of real-world applications [3], [4].
PID controller has all the 'key ingredients' for a process control.To expand the expression of 'key ingredients', the proportional (P) part answer rapidly to the error, the integral (I) bring a pole to the s-plane as a result of this steady state errors could be removed and the derivative (D) part is active in transient response of a system to fix the error [5], [6].To conclude, PID controllers are like the 'bread and butter' of control engineering and it is a crucial fundamental for every control engineer [7].
In the last three decades a digital era has started in industry.Almost all the processes have been adapted to be controlled with digital controllers such as PLCs, microprocessors etc.Therefore, digital PID controllers are regarded more convenient than the analog ones.This recent change forces the designers to design their controllers in discrete time.Although there seems to be several model/non-model based calculation methods for PID parameters in literature such as Ziegler-Nichols rule, symmetric optimum rule, Ziegler-Nichols' complementary rule, transient response method, some-overshoot rule, noovershoot rule, refined Ziegler-Nichols rule, integral of squared time weighted error rule, and integral of absolute error rule, only a few of them are designed in discrete time [8].In addition to this, no model based compact form formulations for PID parameter calculation has not been presented yet in discrete time.
Most of the studies on PID parameter calculation in the last decade has been focused on adaptive/optimal/ artificial auto tuning methods [4], [9]- [12].
Regarding formulations for PID parameter calculation, there are only few studies.[13] presents a direct synthesis design (DS-d) formulations for the systems with dead time and inverse response in continuous time.However, these formulations are restricted by a specific type of a process with delay and the DS-d formulations of PID parameters were only available in continuous time.
In [14]- [16] a tuning formula derived for PID parameter calculation by using phase and gain margins for only continuous time is presented.These formulations are derived for a specific plant, and are not generalized for all types of systems.
This study presents a new approach for discrete time PID parameters calculation with model based compact form (MBCF) formulations according to determined performance criteria.These MBCF formulations are based on the relationship between the open and closed loop transfer functions.This relationship is defined by magnitude and angle values of the closed loop characteristic equation, and MBCF formulations are obtained according to these values.
In this study, MBCF formulations for determine three parameters ( , , controller.Therefore, the implementation procedure navigates the designer to obtain , , proposed two MBCF formulations.In this paper, a specified implementation procedure for MBCF formulations is also introduced.This paper is organized as follows; Section II presents and introduces the MBCF formulations and the implementation procedure.Six different systems in Section III are generally used for demonstration of the effectiveness of PID controller design methods in literature.Dynamics of closed-loop responses of those systems are investigated using proposed formulations to design PID.In Section IV, a PID controller is designed with using proposed formulations and implemented to a real time DC Motor velocity control system.The closed loop step responses with/without disturbance are comparatively given in this section.Finally, in Section V conclusion and discussion are conducted.

II. PROPOSED MBCF FORMULATIONS AND THE IMPLEMENTATION PROCEDURE
Proposed study contains two steps; in the first step, MBCF formulations for PID parameter calculation are obtained.In the second step, the procedure is presented for implementation of these MBCF formulations to calculate the , , A.
Step One: Obtaining the MBCF Formulations Characteristic equation of closed loop control system in Fig. 1 is given in (2) The control (dominant) poles in (3) are obtained from the nth degree ( ) F z characteristic equation in (2) where damping ratio "  " and natural frequency " n w " are defined by designer from determined performance criteria .
If the control pole ' 1 z ' in (3) is replaced by 'z' in characteristic (2), the characteristic equation is arranged as follows: Since, 1 z is a complex variable, accordingly ( 5) is a complex variable, too.Hence, ( 5) is arranged in polar coordinate as underneath .
Using ( 6) the magnitude and angle of complex variable ' 1 z ' is written as below: G z complex variable could determine polar coordinate as follows: Proposed MBCF formulations for calculation of p K and d K parameters, which assigns two poles of th n degree characteristic equation, are obtained from (5) with the replacement of the terms in ( 7)-( 10): The derivation of ( 11) and ( 12) are given in appendix A.

B. Step Two: The Implementation Procedure of MBCF Formulations
In the implementation procedure of the MBCF formulations firstly PI controller is designed.Thereafter, PD controller is designed according to the new system which is formed from cascaded PI controller and the controlled system.
Implementation procedure has four sub stages; in the first sub stage, control rule consists of the PI controller as shown in As a continuation of second sub stage, obtained new system ( 1 ( ) G z ) is controlled by PD control rule.Similar to first sub stage, integrator gain ' i K 'sets to zero in (11) and ( 12) and PD controller parameters , ; , Fourth sub stage is the stability analysis and fine-tuning.

C. First Sub Stage: PI Design
PI controller parameter 1 i K as shown in Fig. 2 is calculated from (12) where ' d K ' parameter sets to zero and is rearranged as follows K parameters in Fig. 2 are calculated from ( 11) and ( 14) with the help of calculated numerical values in ( 7)- (10).

D. Second Sub Stage: PD Design
Control block diagram of the new PD controlled system 1 ( ) G z is given in Fig. 3.
Derivative parameter 2 p K and 1 d K of PD controller is calculated from ( 11) and (12) where i K sets to zero and rearranged as below: K parameters in Fig. 3 are calculated from ( 15) and ( 16) with the help of calculated numerical values in ( 7)- (10).

E. Third Sub Stage: PID Parameter Calculation
Forward transfer function of PID controlled system as shown in Fig. 4 is written with the help of Fig. 3 as follows: 1 ( ) Equation ( 18) can be rearranged as below where:

F. Fourth Sub Stage: Stability Analysis and Fine Tuning
If the characteristic equation degree ' n ' of the controlled system is greater than two ( 2) n  , stability analysis should be made.
After the stability analysis of the system in Fig. 4, a ' f K ' parameter could be cascaded as shown in Fig. 5 for a stable condition.This ' f K ' parameter is used for fine-tuning of the dynamic response of the system according to the performance criteria.
. Control Block Diagram of Control system with parameter " f K ".
Parameter ' f K ' can be calculated from (23 where 1 z control pole is calculated from (3) and i Z , i P are the zero and poles of the ( ) G z respectively.

III. PERFORMANCE ANALYSIS OF PROPOSED METHOD
In this section, PID controller performances are examined for several systems.The selected system and PID controller parameters are given in Table I which is calculated through the proposed method.Several systems are carefully selected, which are frequently encountered in literature to analyse the performance of PID controllers [18], [19].
Simulation study of the step responses under the various disturbance effects are given in Fig. 6-Fig.11.    4 ( ) G s integrator with delay system response to different time constants and 13 % disturbance.Fig. 10.

( )
G s pure delay system with different delay times and 15 % disturbance.
6 ( ) G s lead and delay system with 20 % disturbance.
Several parameters for PID controlled systems ( 1 ( ), ( ), ( ), ( ), ( ), ( ) G s G s G s G s G s G s ) are given in Table I.

IV. REAL TIME APPLICATION OF MBCF FORMULATIONS
Real time application has two stages.In the first stage open-loop gain and time constant parameters ( , K  ) of the simplified DC motor model are obtained from the open-loop response.PID controller parameters are calculated by using MBCF formulations and implementation procedure, according to defined performance criteria.PID controlled system simulation results are given for the comparison through real time results.In the second stage, Real time application is implemented by using the Analog devices ADUC-841 microcontroller and Feedback DC Motor Mechanical Unit 33-100.Experimental set-up is shown in Fig. 12.

A. DC Motor Model and Parameters
First, as mentioned above experimentally obtained openloop gain and time constant parameters are accurately calculated by the repetitive tests and simulation results.Simplified transfer function of the DC Motor is given below 0.78 ( ) . 1 0.48 1 Performance criteria for calculation of the PID parameters are selected as follows: overshoot 4.3%.PID controller parameters are calculated with the steps in Section II and using ( 15)-( 22) and given as: From the simulation and real time closed loop step responses the following assessments are given by considering the Fig. 13 and Fig. 14:  PID controlled DC Motor system is stable. Dynamics of closed loop response of the system similarly ensure the pre-defined performance criteria depicted in Table II as given in Fig. 13.Systems in Section III are generally used for performance analysis of PID controller design methods in literature therefore in this section frequently encountered systems in literature are selected for the assessment of proposed MBCF formulations.Systems and calculated PID parameters by using proposed formulations are given in Table I, closed loop step responses with disturbance of PID controlled systems are shown in Fig. 6-Fig.11.In Section IV control of a DC Motor velocity is applied in real time and a comparison between closed loop step and disturbance responses of simulation and real time application is given in Table II, Table III and Fig   All these results in Section III and Section IV show that proposed MBCF formulas and proposed method in this study achieved following goals for an effective PID controller design;  Obtain a stable closed loop response. Track different step reference with zero steady state error.
 Suppress disturbance effect and regulate system in a short period of time. Ensure the pre-defined performance criteria.
To sum up, based on all statements given above it can easily be said that MBCF formulations are an effective and practical model based calculation method for PID controllers.In addition, designer will be able to design P, PI and PD controllers with proposed method.
Through using presented expressions, self-tuning PID controller could be designed for academic/industrial control applications, PID parameters could be updated by detecting parameter variations of controlled system and PID based adaptive and robust control applications could be used.

V. CONCLUSIONS
The formulations in related literature for PID parameter calculation are all derived for continuous time.Therefore, if the PID controller is desired to be designed for discrete time, extra transformations are required.This proposed method, provided designers a direct, fast and practical PID controller design without extra transformations.In addition to this, designer also will be able to design P, PI and PD controllers with proposed method.
The proposed MBCF formulations which are used in the calculations of the digital PID parameters via determined performance criteria are performed through the transfer functions in related studies in literature.The dynamic response of the each system is analysed with simulation studies.The applicability and accuracy of the proposed method are shown in real time DC motor velocity control study which ensures determined performance criteria.
This proposed method will gain a new perspective and contribute to the literature as new alternative compact form formulations in digital control. , p K and d K expressions are derived as dependent to i K parameter.
The known and unknown parameters are arranged as follows The expressions in (A.2) and (A.5) are put in the equation above and arranged as follows: Where Euler's Formula expressions in (A.13) and (A.14) are placed into (A.12) and rearranged as follows: where p K and d K parameters are obtained by arranging as real and imaginary parts separately in (A.15) The expressions in (A.16) and (A.17) arranged in a matrix form:

Fig. 1 .
Fig. 1.Block diagram of a simple feedback control system.

Figure 1
Figure 1 shows a basic closed loop control block diagram of a feedback control system.In this block diagram ' ( ) c G z ' is representing the PID controller and ' ( ) p G z ' is

1
these rearranged equations.In the third sub stage, PID controller parameters ( , , p i d K K K ) are calculated from former obtained PI and PD controller parameters ( 1 1 2 1

Fig. 7 .
Fig. 7.2 ( ) G s second order system with different time constants and 40 % disturbance.

Fig. 8 .
Fig. 8.3 ( ) G s system with lag and delay with different time constants and 20 % disturbance.
the performance criteria, sampling time is determined according to open-loop time constant (approx. , ISSN 1392-1215, VOL. 20, NO. 3, 2014B.Simulation and Real Time ResultsIn the simulation and real time application study, the PID parameters in (27)-(29) are used.Closed-loop performances are comparatively shown in Fig. 13 and Fig. 14 for step input of the PID controlled DC Machine velocity without/with disturbance respectively.(a) (b) Fig. 13.Simulation result of controlled system step reference response (a); real time controlled DC motor step reference response (b).

Fig. 14 .
Simulation result of controlled system step response with 50 % disturbance (a); real time PID controlled DC motor step response with 50 % disturbance (b).

TABLE I .
SEVERAL SYSTEM AND PID CALCULATED PARAMETERS.
p M  OVERSHOOT, s t  SETTLING TIME, , K   OPEN LOOP GAIN AND TIME CONSTANT, d T  DELAY TIME, s T  SAMPLING TIME, f K  FINE TUNING COEFFICIENT.

TABLE II .
DYNAMICS OF CLOSED LOOP RESPONSES.

TABLE III .
DYNAMICS OF CLOSED LOOP RESPONSES.