Advanced Methods of PID Controller Tuning for Specified Performance

This chapter provides a concise survey, classification and historical perspective of practiceoriented methods for designing proportional-integral-derivative (PID) controllers and autotuners showing the persistent demand for PID tuning algorithms that integrate performance requirements into the tuning algorithm. The proposed frequency-domain PID controller design method guarantees closed-loop performance in terms of commonly used time-domain specifications. One of its major benefits is universal applicability for both slow and fast-controlled plants with unknown mathematical model. Special charts called B-parabolas were developed as a practical design tool that enables consistent and systematic shaping of the closed-loop step response with regard to specified performance and dynamics of the uncertain controlled plant.


Introduction
How to tune a controller for any control application quickly and appropriately? This question raised in 1942 is still up to date and constantly occupies the automation community worldwide. The answer is very intricate; its intricacy is comparable with the open hitherto unresolved Hilbert problems known from mathematics.
Will the PID controllers, historically the oldest but currently still the most used ones, control industrial processes in the near and far future? Based on the increase of the number of PID tuning methods from 258 to 408 during 2000-2005, a positive response can be assumed [23].
The remarkably simple ability of the PID controller to generate a difference equation using the present, past and future values of the control error is often projected into the philosophical understanding [1] and forecast this controller a long-term perspective.
Beginnings of PID controllers date back to 1935 when the Taylor Instruments Companies launched their pneumatic controller with a derivative channel [1]. Owing to rapid developments in the control theory, it was supposed that the conventional PID controllers would be gradually replaced by advanced ones; however, this did not come to pass mainly due to the simple PID structure and its commercial usability in practice. For 83 years, control loop designers preferred the PID controllers for their outstanding ability to eliminate the control error using the integrator, their ability to improve the performance using the "trend" of the controlled variable through the derivative channel and for many other benefits. PID controllers are important parts of distributed control systems, predictive control structures; their coefficients are often adapted by means of fuzzy and neural control and set by genetic algorithms [20,21,35]. In multiloop control structures, they are able to stabilize unstable objects and difficult-to-control systems. The 46 existing PID variants and reported 408 diverse tuning methods are a good prerequisite for achieving a satisfactory performance in simple as well as demanding industrial applications [23,25].
PID controllers are widely applied in technological processes of heavy and light industries, for example in control of tension in the roll during paper winding, boiler temperature, chemical reactor pressure, lathe spindle position in metalworking, and so on; they can be found in modern cars controlling combustion control or vehicle dynamics [9], valve opening and robotic arm position. In the interconnected power system, they are used to control turbine power and speed in both primary and secondary regulation of active power and network frequency. Being easy to implement on both Arduino and Raspberry Pi platforms allows them to be used in mobile "unplugged" applications as well.
Commercial applicability of PID controllers is confirmed by studies referring that more than 90% out of all installed controllers in industrial control loops are PID controllers [36]. The alarming fact, however, is that only 20% of them are tuned correctly, and in 30% of all PID applications, the regulation is unsuitable due to an incorrect selection of synthesis method. Another 30% of poor performance is due to ignorance of nonlinear properties of actuators, and the remaining 20% represent an inadequate choice of sampling period or poor signal filtering [5]. Some controllers not only do not provide the required performance yet often even stability of the control loop being operated only in open loop and manually switched off by the service staff when approaching the setpoint [9]. According to other statistics, 30% of controllers operate in manual mode and require continuous fine-tuning and supervising by the process technologist. A 25% of PID applications use coefficients pre-set by the manufacturer with no update of their values with respect to the particular process [47]. Therefore, a natural requirement for innovative PID tuning methods has come up to ensure the specified performance [19,22] in terms of the maximum overshoot and settling time not only for processes with constant parameters but for their perturbed types. In this chapter, a novel original robust PID tuning method is presented; hopefully, it will help reverse the above mentioned unfavorable statistics of incorrectly tuned PID controllers.

PID controller design for industrial processes for performance
Despite the fact that there are more than 11,000 PID controllers in 46 variants operating in industrial processes [23], mostly three basic forms are used to control industrial processes: the ideal (textbook) PID controller, the real PID controller with derivative filter, and the ideal PID controller in series with the first-order filter given by the following transfer functions, respectively.
where K is the proportional gain, T i and T d are the integral and the derivative time constants, respectively, T f is the filter time constant and N∈<8,16> in practical applications [37,38]. The PID controller design objectives are: 1. tracking of setpoint or reference variable w(t) by y(t),

rejection of disturbance d(t) and noise n(t) influence on the controlled variable y(t).
Time response of the controlled variable y(t) is modifiable by parameters K, T i and T d , respectively; the objective is to achieve a zero steady-state control error e(t) irrespective if caused by changes in the reference w(t) or the disturbance d(t). This section presents practice-oriented PID controller design methods based on various performance criteria.
Consider the control loop in Figure 1 with control action u(t) generated by the PID controller (switch SW in position "1").
A controller design is a two-step procedure consisting of controller structure selection (P, PI, PD or PID) followed by tuning coefficients of the selected controller type.

PID controller structure selection
An appropriate structure of the controller G R (s) is usually selected with respect to: • zero steady-state error condition (e(∞) = 0), • type of the controlled plant, • parameters of the controlled plant.  Consider the unity feedback control loop (Figure 1), where G(s) is the controlled system. According to the final value theorem, the steady-state error e ∞ ð Þ ¼ lim is zero if the integrator orders ν L = ν S + ν R in the open-loop L(s) = G(s)G R (s) is greater than the order q of the reference signal w(t) = w q t q , i.e., where ν S and ν R are integrator orders of the plant and the controller, respectively, K L is the open-loop gain and w q is a positive constant [46].

PID controller structure selection based on the plant type
Industrial process variables (e.g., position, speed, current, temperature, pressure, humidity, level) are commonly controlled using PI controllers; in practice, the derivative part is usually switched off due to measurement noise. For pressure and level control in gas tanks, using a Pcontroller is sufficient [3]. However, adding the derivative part improves closed-loop stability and steepens the step response rise time.

PID controller structure selection based on plant parameters
Consider the FOPDT (j = 1) and FOLIPDT (j = 3) plant models, respectively given as G FOPDT ¼ K 1 e ÀD1s = T 1 s þ 1 ½ and G FOLIPDT ¼ K 3 e ÀD3s = s T 3 s þ 1 ½ f gwith the parameters given as follows: where K c and ω c are critical gain and critical frequency of the plant, respectively, the normalized time delay μ j and the parameter ϑ j can be used to select appropriate PID control strategy. According to Table 1 [ 46], the derivative part is not used in presence of intense noise and a PID controller is not appropriate for plants with large time delays.

Performance measures in PID controller design
Performance measures for industrial control loops can be expressed both in the time and the frequency domains. The time-domain performance indicators allow to directly expressing the desired process parameter, whereas the frequency-domain performance indicators can be used as PID tuning parameters.

Performance measures in the time-domain
In the time-domain, satisfactory setpoint tracking ( Figure 2a) and disturbance rejection ( Figure 2b) are indicated by small values of maximum overshoot and a decay ratio, respectively, given as where y(∞) denotes the steady-state value of y(t) [4]. A measure of the y(t) response decay is the ratio of two successive amplitudes A i+1 /A i , where i = 1…N, and N is half the number of points of intersections of y(∞) and y(t). The settling time t s is the time after which the output y(t) remains within AEε% of its final value ( Figure 2b)  η max ∈(0%;50%). Figure 2c depicts underdamped (plot 1), overdamped (plot 2) and critically damped (plot 3) closed-loop step responses.

Performance measures in the frequency-domain
The most frequent parameters for PID tuning are the following performance measures [1]: • ϕ M and G M : phase and gain margins, respectively, • M s and M t : maximum peaks of magnitudes of the sensitivity function S(jω) and complementary sensitivity function T(jω), respectively, • λ: required closed-loop time constant.
If a designed controller G R (jω) guarantees, that |S(jω)| or |T(jω)| do not exceed prespecified values M s or M t , respectively, defined by for ω∈〈0,∞), then the Nyquist plot of the open-loop transfer function L(s) = G(s)G R (s) avoids the respective circles M S or M T each given by its center and radius as follows: By avoiding the Nyquist plot of L(s) to enter the circles corresponding to M S or M T , a safe distance from the critical point is kept (Figure 3a). Typical |S(jω)| and |T(jω)| plots for properly designed controller are in Figure 3b. The disturbance d(t) is sufficiently rejected if M s ∈(1.2;2). The reference w(t) is properly tracked by the process output y(t) if M t ∈(1.3;2.5).
With further increasing of M t the closed-loop tends to be oscillatory.
From Figure 3a results, that by increasing open-loop phase margin ϕ M the gain crossover L(jω a *) on the unit circle M 1 moves away from the critical point (À1,j0); similarly by increasing open-loop gain margin G M the phase crossover L(jω f *) moves away from (À1,j0). Therefore, the stability margins ϕ M or G M given by are frequently used performance measures, their typical values are ϕ M ∈(20 ;90 ), G M ∈(2;5).
Relations between individual stability margins and respective magnitude peaks are given by the following inequalities The point in which the Nyquist plot L(jω) touches the M T circle defines the closed-loop resonance frequency ω Mt .

PID controller design methodologies for performance
When synthesizing a control loop, if the controller type is already known and the designer has just to select a suitable method to appropriately adjust its coefficients, we speak about PID controller tuning methods. Controller design is a more complex problem which includes determining controller structure and then calculating its parameters. When setting coefficients of industrial PID controllers {K, T i , T d }, basically the following procedures are applied: 1. Trial-and-error methods are based on closed-loop experiments [1]. Controller parameters settings are based on observation of the response to reference or disturbance changes with the assistance of an expert, or the design is driven by empirical rules. The control-loop synthesis is time-consuming and its success is not guaranteed.

2.
Analytical methods are used to generate a control law based on the mathematical model of the plant; the plant model is obtained from first principles or via experimental identification. The success of these methods depends on the accuracy of the mathematical model of the plant, and is not always achievable in practical cases (e.g., for a cement kiln).
3. Classical tuning methods use only a limited number of characteristic parameters of the plant obtained from the step response or critical system parameters [11,27,31]. Their main advantage is a simple and short calculation of controller parameters. The control objective is to provide a satisfactory response to reference change, or disturbance rejection and often their combination. The main drawback is that the designer cannot influence the performance by means of the adjustable parameters of the algorithm. Also, the resulting closedloop response may not be satisfactory if the step response of the plant is nonmonotonic, or when the plant has nonminimum-phase dynamics or large time delay. Most of these methods are implemented in autotuners of industrial PID controllers [1].

4.
Autotuners are a modern and convenient means for adjusting coefficients of industrial controllers [33,34,49]. They implement a two-step algorithm of automatic acquisition of characteristic parameters of the controlled process followed by automatic calculation and adjustment of the controller coefficients. After activating the autotuning function on the industrial controller, the control-loop synthesis is performed automatically in a very short time. The ABB, Emerson, Fischer-Rosemont, Foxboro, Honeywell, Siemens, Yokogava, or ZPA controllers have a built-in PID autotuning function implemented on a microcomputer [47]. In many situations, however, these methods are unreliable because of the imperfection of the plant identification algorithm and the subsequent controller design.

5.
Robust PID controller tuning methods for specified performance represent a modern area of industrial control-loop synthesis. They improve the PID tuning methods by providing stability and required performance also for processes with variable parameters. The controller tuned only by conventional method is just "intuitively" invariant against perturbations of the controlled plant; robust operation of the control loop is usually possible only for small changes of plant parameters. The major disadvantage of these methods is that the control law is not based on the knowledge of uncertainties of the controlled object and a further research on their possible expansion is needed. The proposed original method which eliminates this drawback, its theoretical analysis and verification on benchmark examples are the core of the chapter.

PID controller tuning methods for performance
Tuning methods are commonly used engineering tool for the synthesis of industrial control loops as they do not require a full knowledge of the mathematical description of the controlled plant. This differentiates them from analytical methods which, on the contrary are based on a precise knowledge of the mathematical model of the controlled system. In the tuning methods, the controlled process is considered as a black-box which is to be revealed only to such extent that the controller synthesis is successful and the control objectives are achieved. Thus, only those characteristic parameters of the unknown plant have to be acquired via appropriate identification that are inevitable for the PID controller design. In this way, the PID controller coefficients can be obtained in a relatively short time. The implicit knowledge about the controlled system and the ambient influences affect the choice of the PID coefficients calculation method . According to the way of using the identified data of the controlled plant, the tuning methods are classified into as follows: a. model-free PID controller tuning methods, b. model-based PID controller tuning methods.
Percentage proportions of commonly used PID controller tuning methods are presented in Figure 4.
Approximately 12% out of all tuning methods are model-free methods, 88% (app. seven times more) are model-based ones. A 37% portion belongs to PID controllers of FOLPDT (first order lag plus dead time) system models which are the most commonly used approximation of plant dynamics in industries (thermal plants, chemical and woodworking industries). Equal 9% shares belong to IPDT (integral plus dead time) and FOLIPDT (first order lag integral plus dead time) models with integral behavior encountered mainly in drives and power industry in modeling mechanical subsystems of rotating machines, valves and servo-systems and 18% of algorithms are used to control plants with SOSPDT (second order system plus dead time) models [26]. Controllers for other system types are tuned by methods from the 15% portion.

Model-free PID controller tuning with guaranteed performance
There are such PID tuning algorithms, which can be applied without any knowledge about the unknown plant model. These methods yielding PID coefficients for systems with a general, unknown model are known as "Non-Model Specific", "Model-Free" or "Rule-Based" Methods. Their basic feature is that the identified characteristic parameters of the unknown system appear directly in the PID coefficient tuning rules. They are very popular among practitioners due to a high flexibility and ability to control a wide class of systems. The respective algorithms have been tested on benchmark examples, the control objectives can be expressed by empirical rules. They are simply algorithmizable for application in industrial autotuners. A seven-step flow diagram of a direct tuning method is depicted in Figure 5.
The oldest direct-type engineering method is the well-known Ziegler-Nichols frequency method (1942) [48]. The control objective is a rapid disturbance rejection so that each amplitude of the oscillatory response to disturbance step change is only a quarter of the previous amplitude. The method is based on two identified characteristic parameters of the unknown plant : the critical frequency ω c = 2π/T c and the critical gain K c used for calculation of the coefficients of P, PI and PID controllers . The first characteristic parameter provides basic information on plant dynamics, while the value of the second parameter indicates the degree-of-stability of the plant. PID controller parameters according to the Ziegler-Nichols method are calculated using the algorithm P ZN = 0.6K c , T iZN = 0.5T c = π/ω c , T dZN = 0.125T c = 0.25π/ω c , in which the characteristic parameters {K c , ω c } are directly included.  When first PID controllers were developed in the period 1935-1942, no tuning methods were available at the market. The controller "design" consisted in experimenting with control loops without considering any relationship between plant parameters and controller coefficients. Acquired experience, however, was generalized giving rise to empirical trial-and-error tuning method that consist of three main steps: 1. Turning off the integral and derivative parts of the PID controller and increasing the gain until the closed-loop oscillates with constant amplitudes, then adjusting the gain at half of this value. The set of these rules of thumb is still being used in practice to roughly tune industrial PID controllers and is considered as a predecessor of all engineering tuning methods. In 1942, two direct tuning methods were published and authored by Ziegler and Nichols [48], employees of the Taylor Instrument Companies producing PID controllers. The first one is time-domain method; according to it, the PID coefficients are calculated using the effective time delay and the effective time constant of the step response of the industrial plant. The frequency-domain method uses the critical gain K c and the period of critical oscillations T c to calculate the PID coefficients according to the relations Θ PID = (P, T i , T d ) = (α 1 K c , α 2 T c , α 3 T c ), where the weights of critical parameters are (α 1 , α 2 , α 3 ) = (0.6, 0.5, 0.125).

Tuning rules based on ultimate parameters of the industrial process
Due to its simplicity, the Ziegler-Nichols frequency-domain methods are still used in industrial autotuners in the original version, although they have undergone various modifications during the last 70 years of its existence. Due to the technological development after the industrial revolution and major electrification, PID tuning for stability was no more sufficient because a fast setpoint attainment could bring about important savings of time and money and accelerate the entire production process. More and more demanding requirements on control performance were formulated, and an intense demand for effective tuning methods guaranteeing required performance has arisen.
As a rule, application of Ziegler-Nichols methods usually leads to oscillatory closed-loop responses; hence, many scientists have become interested in their possible improvement. Forty-two modifications of the Ziegler-Nichols frequency method were developed in the period from 1967 to 2010. They differ from the classical algorithm in using various other combinations of the weights (α 1 , α 2 , α 3 ). An overview of selected model-free methods is given in Table 2.
Tuning rules No. 1-3 are the well-known Ziegler-Nichols frequency-domain method which objective is a fast rejection of the disturbance d(t) and δ DR = 1:4. In the complex plane interpretation ( Figure 6), the method corresponds to shifting the critical point C = [À1/K c + j0], into the points C P = [À0.5 + j0], C PI = [À0.45 + j0.0896] and C PID = [À0.6-j0.28] using respectively P, PI and PID controllers tuned according to Table 2. Put simply, the open-loop Nyquist plot is shaped into a sufficient distance from the limit of instability specified by the point (À1.j0).  Table 2. Model-free PID controller tuning rules based on critical plant parameters. Related methods (No. 4-10) use various weighting of critical parameters thus allowing to vary the closed-loop performance requirements (see the last column in Table 2). All presented methods (No. 1-10) are applicable for various plant types, easy-to-use and time efficient.

Specification of critical parameters of the plant using relay experiment
In autotuners of industrial controllers, a relay test [29] using an ideal relay (IR) or a hysteresis relay (HR) is used to quickly determine the plant critical parameters K c and T c . In the manual mode, after setting the nominal setpoint w(t) and switching the SW to position "3", a stable limit cycle around the nominal working point y(t) arises in the control loop in Figure 1. As a result of switching between the ÀM, +M relay levels, the controlled system G(s) is excited by a rectangular periodic signal u(t) (Figure 7a). The critical frequency ω c and the critical gain K c are calculated as follows: where the period T c and the amplitude A c of critical oscillations are read off from y(t) of the recorded limit cycle ( Figure 7b); Δ DB is the width of the hysteresis plot, the relay amplitude M is chosen as (3÷10)% of the control u(t) limits. A typical limit cycle is depicted in Figure 7b. A hysteresis relay is used if y(t) corrupted by a noise n(t) [47].
The advantage of these methods is their applicability for different types of systems, simplicity and the short time needed for the controller design of the-approx. (3÷4)T c .

Model-based PID controller tuning with guaranteed performance
In these methods, the identified characteristics of the unknown system are used to create its typical model, and the controller design algorithm is derived for this particular model. Formulas for calculation of the controller coefficients include process model parameters that are function of the identified process data. Each method works perfectly for the system whose model has been used in the design algorithm. However, if the system is approximated differently, the achieved performance may be impaired or even insufficient. The advantage is that control objectives can be clearly defined and expressed using analytical relationships (e.g., it is possible to derive the relationship for maximum overshoot of the step response). A small flexibility due to the "tailor-made" design for one type of model limits the widespread application of these methods in autotuners of industrial controllers.
PID tuning algorithms of indirect tuning methods have two more steps compared with direct methods, as shown in the flow chart in Figure 8. When choosing the procedure for creating a Figure 7. Determination of critical parameters K c and T c of the controlled plant from the limit cycle. typical model . , it is important how the implicit information about the controlled system is considered (if we deal with a driving system, a thermal process, a mechanical or pneumatic system, etc.). If the typical model for the given controlled system has already been selected, the model parameters are calculated in step . and subsequently used in calculation of the PID coefficients.

Specification of FOLPDT, IPDT and FOLIPDT plant model parameters
The static and dynamic properties of most technological processes can be expressed by one of the FOLPDT, IPDT, FOLIPDT, or SOSPDT models. Model parameters are identified from the recorded step response of the controlled system ( Figure 9) and are further used in calculation of PID controller coefficients. According to Figure 1, step response of the controlled process is obtained by switching SW into position "2" and performing step change in u(t).
Transfer functions of the model are found from the step response parameters according to Figure 9.

PID controller tuning formulas for FOLPDT models
The FOPDT model (11a) is used to approximate dynamics of chemical processes, thermal plants, production processes, and so on. To calculate the P, PI and PID controller, coefficients based on the parameters of the FOLPDT model of the controlled system, the tuning formulas in Table 3 can be used.

PID controller tuning formulas for IPDT and FOLIPDT models
While dynamics of slow technological processes (polymer production, heat exchange, etc.) can be approximated by an IPDT model (11b), electromechanical subsystem of rotating machines and servo drive objects are typical examples for using a FOLIPTD model [42] (11c) ( Table 4).   Table 4. PID tuning rules based on IPDT and FOLIPDT model parameters.

PID controller tuning formulas for SOSPDT plant models
Flexible systems in wood processing industry, automotive industry, robotics, shocks and vibrations damping are often modeled by SOSPDT models with transfer functions where for SOSPDT model (12b) the relative damping ξ 6 ∈(0;1) indicates oscillatory step response.
If ξ 4 > 1, SOSPDT model (12a) is used; its parameters are found from the nonoscillatory step response in Figure 10a using the following relations where S = K 4 (T 4 + T 5 + D 4 ) is the area above the step response of the process output y(t), and y(∞) is its steady-state value.
Parameters of the SOSPDT model (12b) can be found from evaluation of 2-4 periods of step response oscillations (Figure 10b) using following rules [39] Quality of identification improves with increasing number N of read-off amplitudes. If N > 2 several values ξ 6 , T 6 and D 6 are obtained, and their average is taken for further calculations. Table 5 summarizes useful tuning formulas for both oscillatory and nonoscillatory systems with SOSPDT model properties.
Using tuning methods shown in Tables 2-5, achieved performance is a priori given by the particular method (e.g., quarter decay ratio when using Ziegler-Nichols methods No. 11-13 in Table 3) or guarantees performance however not specified by the designer (e.g., in Chen Figure 10. Step response of (a) nonoscillatory, (b) oscillatory SOSPDT model. method No. 33 in Table 5 gain margin G M = 1.96, phase margin ϕ M = 44.1 and maximum peak M s = 1.5 of the sensitivity to disturbance d(t)).

PID controller tuning formulas for unstable FOLPDT models
Minimization of performance indices can be applied also for unstable FOLPDT models leading to simple tuning rules for PID controller (1a) (No. 34-38 in Table 6). Tuning rules No. 37 and 38 for PID controller (1c) show that settling time t s increases with growing normalized time delay ν 1 = D 1 /T 1 of the FOLPDT model (15).

PID controller design for specified performance
The main benefit of these methods consists of that all tuning rules are based on a single tuning parameter that enables to systematically affect the closed-loop performance by step response shaping [32].
The engineering practice is persistently demanding for PID controller design methods that simultaneously guarantee several performance criteria [24], especially the maximum

42.
Morari and Zafiriou, 1989, FOPDT [22] T1þ0, 5D1 K1 λþD1 ð Þ Chen and Seborg, 2002, FOPDT [17] overshoot η max and the settling time t s . However, we ask the question: how to suitably transform the abovementioned engineering requirements into frequency-domain specifications applicable for PID controller coefficients tuning? The response can be found in Section 3 in which a novel original PID controller design method is presented.

PID controller design for specified performance based on harmonic excitation
The proposed original method [6] enables to guarantee required closed-loop performance for a whole family of plants specified by the uncertainty description. The core of it is the recently developed PID controller design method based on external harmonic excitation [7]-a twostep PID tuning method for performance specified in terms of maximum overshoot η max and settling time t s .
In the first step, the plant is identified using external harmonic excitation signal (a sinusoid) with the frequency ω n . In the second step, two developed PID controller design approaches can be applied: 1. the approach based on guaranteed phase margin ϕ M suitable for nonintegrating systems with/without time delay and for integrating systems as well; 2. the approach based on guaranteed gain margin G M suitable for nonintegrating systems with unstable zero.
For the ϕ M -based approach, the specified performance is achieved by means of developed quadratic dependences η max = f(ϕ M ,ω n ) and t s = f(ϕ M ,ω n ) parameterized by ω n ; the corresponding plots are called B-parabolas. For the G M -based approach similar quadratic dependences for both the maximum overshoot η max = f(G M ,ω n ) and the settling time t s = f(G M ,ω n ) were constructed. These approaches enable to achieve fulfillment of the following performance measures (ω c is the plant ultimate frequency): • for plants without integration behavior: η max ∈〈0%, 90%〉 and t s ∈〈6.5/ω c , 45/ω c 〉, • for plants with integration behavior: η max ∈〈9.5%, 90%〉 and t s ∈〈11.5/ω c , 45/ω c 〉, • for plants with unstable zero: η max ∈〈0%, 90%〉 and t s ∈〈8.5/ω c , 45/ω c 〉.
A setup for the proposed harmonic excitation based method [7] is in Figure 11, where G(s) is a transfer function of the controlled plant with unknown mathematical model, G R (s) is a PID controller transfer function, and SW is a switch.

Process identification using external harmonic excitation
A sinusoidal excitation signal u(t) = U n sin(ω n t) is injected into the plant G(s) when the switch is in the position SW = 4. The plant output y(t) is sinusoidal as well with the same frequency ω n , magnitude Y n and a phase lag φ, that is y(t) = Y n sin(ω n t + φ), where φ = argG(ω n ) ( Figure 12).
After obtaining Y n and φ from the recorded time responses u(t) and y(t), one point of the (unknown) plant frequency characteristics related with the excitation frequency ω n can be plotted in the complex plane ( Figure 12) It is recommended to choose U n = (3÷7)%u max [7]. Identified plant parameters are described by the triple {ω n ,Y n /U n ,φ}. Note that if SW = 4, the identification is performed in open-loop, hence this approach is applicable for stable plants only.

PID controller tuning rules based on harmonic excitation
Based on identified plant parameters, PID controller can be tuned using the phase margin and/ or gain margin approaches. In the control loop in Figure 11, switch SW in "5" and the PID controller in manual mode. To guarantee a specified phase margin ϕ M at the gain crossover frequency ω a *, the closed-loop characteristic equation under a PID controller 1 + L(jω) = 1 + G(jω)G R (jω) = 0 can be easily broken down into the magnitude and phase conditions (ω a * = ω n , and ϕ M is the required phase margin, L(jω) is the loop transfer function)   To guarantee a specified gain margin G M at the phase crossover frequency ω p *, the closed-loop characteristic equation can be expressed by the magnitude and phase conditions [6] as follows (ω p * = ω n ) Graphical interpretation of (19), (20) is shown in Figure 13. Let us denote φ ¼ argG ω n ð Þ, Θ ¼ argG R ω n ð Þ, and consider the ideal PID controller (1a), where K is proportional gain, and T i , T d are the integral and the derivative time constants, respectively. Substituting for s = jω n into (1a) we obtain Comparison of (21) with its polar form yields a complex Eq. (23) for phase margin approach and (24) for gain margin approach Finally, PID controller parameters are obtained from (23), (24) using the substitution |G R (jω n )| = 1/|G(jω n )| for the phase margin approach and |G R (jω n )| = 1/[G M |G(jω n )|] for the gain Figure 13. Graphical interpretation of (a) ϕ M , ω a * and shifting G into L A at ω a * = ω n ; (b) G M , ω f * and shifting G into L F at ω f * = ω n . margin approach resulting from (24). The complex equations (23), (24) are solved as a set of two real equations (25) for the phase margin or (26) for the gain margin approaches, respectively where (25a, 26a) represent general rules for calculating the controller gain K. After substituting (25a), (26a) and the ratio β = T i /T d into (25b), (26b), after some manipulations we obtain a quadratic equation in T d for both approaches Expression for calculating T d is the positive solution of (27) Hence, the PID controller parameters are calculated using the expressions (25a), (26a), T i = βT d and (28); Θ is obtained from (19b) using (29) for the phase margin approach and (20b) for the gain margin approach Using the PID controller designed for the phase margin ϕ M , the identified point G of the plant Nyquist plot G(jω) with co-ordinates (1) is moved into the point L A of the open-loop Nyquist plot located on the unit circle M 1 (Figure 13a). In this way, the gain crossover L A of the openloop L(jω) is specified for which the designed PID controller guarantees the required phase margin ϕ M ; so for ω n is |L(jω n )| = 1. In case of PID controller design for gain margin G M , the identified point G of the plant Nyquist plot G(jω) with co-ordinates (1) is moved into the open-loop frequency response point L F lying on the negative real half-axis of the complex plane (Figure 13b). In this way, the phase crossover L F of the open-loop L(jω) is specified Location of the points G(jω n ) and L(jω n ) in the complex plane is shown in Figure 13. Table 8.

PI, PD and PID tuning formulas for both approaches (ϕ M and G M ) are summed up in
The excitation frequency can be adjusted according to the empirical relations [6].
; ω n ∈ 0:5ω c ; 1:25ω c h i GMÀapproach : 3.3. Controller structure selection using the "triangle ruler" rule The argument Θ in the tuning rules in Table 8 indicates the angle to be contributed to the identified phase φ at ω n by the controller to obtain the resulting open-loop phase (À180 + ϕ M ) necessary to guarantee the required phase margin ϕ M (or the gain margin G M ). Working range of the PID controller argument is given by the union of PI and PD controllers phase ranges which is symmetric with respect to 0 and due to frequency properties of PI, PD and PID controllers also upper-and lower-bounded. The working range (34) can be interpreted using a pretended transparent triangular ruler turned according to Figure 14; its segments to the left and right of the axis of symmetry represent the PD and PI working ranges, respectively. Figure 14a shows the situation, when the identified point G is situated in the 1st quadrant of the complex plane. In case of phase-margin approach, put this ruler on Figure 14a, the middle of the hypotenuse on the origin of the complex plane and turn it so that its axis of symmetry merges with the ray (0,G). Thus, the ruler determines in the complex plane the cross-hatched area representing the full working range of the PID controller argument. The controller type is chosen depending on the situation of the ray (0,L A ) forming with the negative real half-axis the angle ϕ M : situation of the ray (0,L A ) in the left-hand sector suggests a PD controller, and in the  Table 8. PI, PD and PID controller tuning rules using the harmonic excitation method.
right-hand sector the PI controller. Figure 14a shows the case, when the phase margin ϕ M is achievable using both PI or PID controller. According to Figure 14b, the identified point G is placed in 2nd quadrant of the complex plane. Applying the gain-margin approach, the ruler is to be put on Figure 14b according to the similar setup than in case of phase-margin approach. The controller type is chosen depending on the situation of the ray (0,L F ) lying on the border of the second and third quadrants of the complex plane; in this case, PI or PID controller type has to be chosen.

Closed-loop performance
This subsection answers the following question: how to transform the practical performance requirements in terms of maximum overshoot η max and settling time t s into the couple of frequency-domain parameters (ω n ,ϕ M ) needed for identification and PID controller coefficients tuning?
Achieving required t s and η max was tested by designing PID controller for a vast set of benchmark examples [2] at excitation frequencies and phase margins expressed by a Cartesian product ϕ Mj Âω nk of the sets (35) and (36) for j = 1…8, k = 1…6. Resulting dependences η max = f(ϕ M ,ω n ) and t s = (ϕ M ,ω n ) are plotted in Figure 16 [6].
Considering the frequencies ω a * = ω n are equal which results from the assumptions of the sinusoidal excitation method, the settling time can be expressed by the relation similar to (16c) [6], where γ is the curve factor of the step response; in the relation (16c) for the 2nd order closed-loop, γ is from the interval (1;4) and depends on the relative damping [14]. In case of the proposed sinusoid excitation based method γ varies over a considerably broader interval (0.5;16) found empirically and depends strongly on ϕ M , that is γ = f(ϕ M ) at the given excitation frequency ω n . To examine closed-loop settling times for plants with different dynamics, it is advantageous to define the relative settling time [7] Substituting for ω n = σω c into (39) and (40), we obtain a relation for the relative settling time where t s is related to the critical frequency ω c . Due to introducing ω c the right-hand side in (41) is constant for the given plant and independent of ω n . The dependency (41) obtained empirically for different excitation frequencies ω nk is depicted in Figure 16b; it is evident that at every excitation level σ k with increasing phase margin ϕ M the relative settling time τ s first decreases and after achieving its minimum τ s_min it increases again. The empirical dependences in Figure 16 have been approximated by quadratic regression curves, thus they are called Bparabolas [7].

Discussion
When choosing ϕ M = 40 on the B-parabola corresponding to the excitation level σ 5 = ω n5 / ω c = 0.8 (further denoted as B 0.8 parabola), maximum overshoot η max = 40% and relative settling time τ s ≈10 are expected (see Figure 16). Point corresponding to these parameters and is located on the left (falling) portion of B 0.8 yielding oscillatory step response (see response in Figure 15c). If the phase margin to ϕ M = 60 increases, the relative settling time decreases into the point on the right (rising) portion of the B 0.8 parabola; the corresponding step response in Figure 15c is weakly aperiodic. For the phase margin ϕ M = 80 , the B 0.8 parabola indicates a zero maximum overshoot, the relative settling time τ s = 20 corresponds to the position on the B 0.8 parabola with aperiodic step response (Figure 15c). If the maximum overshoot η max = 20% is acceptable, then ϕ M = 53 yields the least possible relative settling time τ s = 6.5 on the given level σ 5 = 0.8 ("at the bottom" of B 0.8 ).

Example 1
Using the sinusoid excitation method, design ideal PID controllers (1a) for an operating amplifier modeled by the transfer function G A (s) The control objective is to guarantee maximum overshoots η max1 = 30%, η max2 = 5% and a maximum relative settling time τ s = 12 in both cases.

Systems with time delay
The sinusoid excitation method is applicable also for plants with time delay commonly considered as difficult-to-control systems [1]. It is a well-known fact that at each frequency ω n ∈〈0,∞) the time delay D turns the phase by ω n D with respect to the delay-free system [44]. For timedelayed systems, the phase condition (29) is extended by an additional phase φ D = Àω n D where φ 0 is the phase of the delay-free system and is the identified phase of the plant including the time delay.
The added phase φ D = Àω n D is associated with the required phase margin ϕ M according to The only modification in using the PID tuning rules in Table 9 is that an increased required phase margin is to be specified. G D (s) 5%,12 0.049 245.9 Figure 25 18 dB 0.65 0.38e Àj136 0.38e Àj44 4.55% 243.4 Table 9. PID controller design parameters, required and achieved performance, identified plant parameters for G A (s), G B (s), G C (s) and G D (s). (46) and the controller working angle Θ is to be computed using the relation The phase delay ω n D increases with increasing frequency ω n of the sinusoidal excitation signal. It is recommended to use the smallest possible added phase φ D = Àω n D to lessen the impact of time delay on closed-loop dynamics.

Discussion
The time delay D can be easily specified during identification of the critical frequency as a time D = T y ÀT u , that elapses since the start of the test at time T u until time T y , when the system output starts responding to the excitation signal u(t). A small added phase φ D = Àω n D due to time delay can be achieved by choosing the smallest possible ω n attenuating the effect of D in (47) and subsequently in the PID controller design. Therefore when designing a PID controller for time delayed systems, it is recommended to choose the lowest possible excitation level when using B-parabolas (most frequently ω n /ω c = 0.2 resp. 0.35) and corresponding couples of B-parabolas in Figure 16. From the given couple (η max ;t s ), ϕ M is specified using the chosen couple of B-parabolas, however its increased value ϕ M 0 given by (46) is to be supplied in the design algorithm thus minimizing effect of the time delay on closed-loop dynamics.

Solution and discussion
3. Figure 18a shows that identified points G B (j0.35ω c ) = 1.03e Àj23 and G B (j0.2ω c ) = 1.09e Àj13 are located in the quadrant I of the complex plane at the beginning of the frequency response G B (jω) (continuous curve).  Figure 18b comply with the required performance specification.

Systems with 1st order integrator
Corresponding B-parabolas in Figures 19-21 were obtained by applying the sinusoid excitation method on a set of benchmark systems with first-order integrator (for a Cartesian product ϕ Mj Âω nk of the sets (35) and (36), j = 1…8, k = 1…6 and three various ratios T i /T d : β = 4, 8 and 12).

Discussion
Inspection of Figures 19a, 20a and 21a reveals that increasing β results in decreasing of the maximum overshoot η max , narrowing of the B-parabolas of relative settling times τ s = f(ϕ M ,ω n ) for each identification level ω n /ω c and consequently increasing the settling time.
Consider for example, the B 0.95 parabolas in Figures 19b, 20b and 21b: if ϕ M = 70 and β = 4 the relative settling time is τ s = 30, for β = 8 it grows up to τ s = 40, and for β = 12 even to τ s = 45. If a 10% maximum overshoot is acceptable for the given system with integrator, then the standard  interaction PID controller can be used with no need to use the setpoint filter; however a larger settling time is expected.

Example 3
Using the sinusoidal excitation method, let us design ideal PID controllers for a flow valve modeled by the transfer function G C (s) (system with an integrator and a time delay) The control objective is to guarantee a maximum overshoot of the closed-loop step response η max1 = 30%, η max2 = 20% and a maximum relative settling time τ s = 20.

5.
Using the PID controller, the first identified point G C (j0.35ω c ) (Design No. 1) was moved into the gain crossover L C1 (j0.35ω c ) = 1e Àj127 located on the unit circle M 1 ; this verifies achieving the phase margin ϕ M1 = 180 À127 = 53 (dashed Nyquist plot in Figure 22a). Achieved performance in terms of the closed-loop step response in Figure 22b is η max1 * = 29.6%, t s1 * = 81.73[s] (dashed line).  According to the ratio α/T unknown plants with an unstable zero can be classified in following two groups [7]: With respect to this classification, B-parabolas η max = f(G M ,ω n ), τ s = f(G M ,ω n ) for nonminimum phase systems with an unstable zero constructed for different open-loop gain margins G M and excitation levels σ are depicted in Figure 24 (for α/T > 0.3) and in Figure 25 (for α/T < 0.3).

Example 4
Using the sinusoid excitation method, ideal PID controllers are to be designed for a heating plant described by the transfer function G D (s) (a system with an unstable zero) The control objective is to guarantee a maximum overshoot η max1 = 30%, η max2 = 5% and maximum relative settling time τ s = 12.   noise corrupting the excitation and output signals u(t) and y(t), respectively, is expected during identification. If, however, the identification at the excitation level ω n = 1.25ω c were carried out for a "fast" object with a high value of ω c , it would be necessary to choose the lowest possible excitation level in order to reject the identification noise. The second identified point G D (j0.65ω c ) is placed in the quadrant II of the complex plane. Time-domain performance requirements specified by the process technologist, identified plant parameters needed for PID controller tuning (for two PID controllers of all four plants G A (s), G B (s), G C (s) and G D (s)) along with specified and achieved performance measure values are summarized in Table 9. The asterisk "*" indicates closed-loop performance complying with the required one.

Robust PID controller design for specified performance
When identifying an uncertain plant, the sinusoidal excitation with the frequency ω n is repeated for individual parameter changes to obtain a set of points G i from the set of frequency responses of the uncertain plant where φ 0 (ω n ) = arg{G 0 (jω n )}. The points G i represent some elements of the family of plants and can be enclosed by a circle M G centered in G 0 (jω n ) with the radius R G R G (ω n ) corresponding to the maximum distance between G i (jω n ) and G 0 (jω n ) 2…N. Actually, the control law generated by the robust controller G Rrob (s) designed for the nominal point G 0 (jω n ) performs the mapping of the set of identified points G i (jω n ) encircled by M G with the radius R G onto the set of points L i (jω n ) delineated by M L and calculates the radius R L R L (ω n ) of the dispersion circle M L which encloses the points L i (jω n ) of the Nyquist plot so as to guarantee fulfillment of the robust performance condition.
A robust PID controller is designed using the sinusoidal excitation method with input data for the nominal model G 0 (jω n ): {|G 0 (jω n )|; φ 0 = argG 0 (ω n )}. Substituting them into (25a), (26a), (29) and (30), the expressions for calculating robust PID controller parameters according to Table 8 are obtained. Obviously, the phase and gain margins ϕ M and G M , respectively, are robust PID controller tuning parameters and at the same time attractive robustness measures [6].

Robust performance condition
Theorem 1 (Sufficient condition for robust performance under a PID controller).
Consider an uncertain continuous-time stable dynamic system described by a nominal model and unstructured uncertainty. The PID controller G R (s) tuned according to the rules in Table 8 guarantees robust closed-loop performance if the following conditions are satisfied φ M > arccos 1 À 1 2 where ϕ M and G M are the required phase and gain margins, respectively, ω n is the excitation frequency, χ L = R L + /R L and χ S = R S + /R S are safety factors of radii of the dispersion circles M L and M S , respectively, delineating prohibited areas; R G (ω n ) is the radius of the dispersion circle at the Nyquist plot of the plant at ω n , and G 0 (ω n ) is a point at the Nyquist plot of the nominal plant at ω n . The prohibited area M S can be defined in terms of ϕ M or G M using the expressions ϕ S = arcsin(R S ) or G S = 1/(1ÀR S ), respectively.

Proof:
The proof is straightforward using Figures 27 and 28. If the nominal open-loop L 0 (s) = G 0 (s) G R (s) is stable, then according to the Nyquist stability criterion the closed-loop with the uncertain plant will be stable if the distance between L 0 and (À1, j0), that is |1 + L 0 (jω n )| is greater than the sum of the radii R L (ω n ) of the circle M L centered in L 0 , and R S (ω n ) of the circle M S centered in (À1.0j), that is 3.5.1.1. Robust performance condition: phase margin approach According to Figure 27, the distance between (À1.0j) and the open-loop Nyquist plot L 0 (jω n ) at ω n , that is |1 + L 0 (jω n )| can be calculated by applying the cosine rule to the triangle given by the vertices (À1.0,L 0 ) (ϕ M is the phase margin) From the principles of the sinusoidal excitation PID controller tuning method results that the robust controller shifts the nominal point of the plant frequency response G 0 to the point L 0 situated on the unit circle. Thus, ω n becomes the gain crossover frequency. As the point L 0 is situated on the unit circle M 1 , the magnitude |L 0 (jω n )| equals one, that is |L 0 | = |G 0 ||G R | = 1, yielding the transformation ratio |G R | = |G 0 | À1 between the radii R G and R L of the circles M G and M L , respectively. The radius R L of the dispersion circle M L can be expressed as Substituting (62) and (63) in (61) yields the robust performance condition which after some manipulations is identical to the proven condition (60a). Typical values of safety factors are χ L = 1.1 and χ S = 1.2. The value of ϕ M chosen according to the robust performance condition used in the tuning rules in Table 1 yields robust PID controller coefficients. The design procedure is illustrated in Section 3.5.1.3.

Robust performance condition: gain margin approach
According to Figure 28, |1 + L 0 (jω n )| is a complement of |0,L 0 | = |L 0 | to the unit value. Thus From the principles of the proposed PID tuning method results that the robust controller shifts the point G 0 (ω n ) of the plant nominal frequency response to L 0 situated on the negative real half-axis of the complex plane. From the relation |L 0 (jω n )| = |G 0 (jω n )||G R (jω n )| = 1/G M results the ratio |G R (jω n )| = 1/[G M |G 0 (jω n )|] between the radii R G and R L = |G R |R G of the circles M G and M L , respectively. The radius R L of the dispersion circle M L is calculated as follows Substituting (65) and (66) into the general robust performance condition (61) and considering the safety factors χ L and χ S , the following inequality is obtained which after some manipulations is identical to the proven condition (60b). According to the robust performance condition, the chosen value G M is substituted into (26a) and robust PID controller parameters are obtained from Table 8. ϕ S and G S are found from the B-parabolas ( Figures 16,[19][20][21]24,25) considering η maxN and τ sN of the worst-case plant.
to be the nominal model of an uncertain system where K A and T A are uncertain parameters varying within AE15% from their nominal values K A0 and T A0 (i.e., the total dispersion is κ = 30%). Let us design a robust PID controller to guarantee η maxN = 30% and a relative settling time τ sN = 12 for the worst-case model of G A (s).

2.
For the required performance (η maxN ,τ sN ) = (30%,12) the corresponding values of phase margin and excitation frequency have been selected (ϕ M ,ω n0 ) = (50 ,0.5ω c0 ) using the pair of "red" B-parabolas in Figure 16. As there are two uncertainties in G A (s) (K A and T A ), the number of identification experiments is N = 2 2 = 4.
7. The smallest phase margin estimated from the location of the worst-case point L AN = 1.13e Àj114 is ϕ MN = 66.2 . The achieved smallest phase margin ϕ + MN = 61 is given by the intersection of the "red" Nyquist plot and the unit circle M 1 (closest to the negative real half-axis).  Figure 29a) are touching, which indicates fulfillment of the robust performance condition.
to be the nominal model of the uncertain plant G D (s) with parameters K D , T D and α D varying within AE15% from their nominal values K S0 , T S0 and α D0 (the total dispersion is κ = 30%). A robust PID controller is to be designed to guarantee specified performance in terms of a maximum overshoot η maxN = 5% and a relative settling time τ sN = 12 for the worst-case model of G D (s).

2.
For the required performance (η maxN ,τ sN ) = (5%,12) the corresponding values of gain margin and excitation frequency have been selected (G M ,ω n ) = (18 dB,0.65ω c0 ) using the pair of "red" B-parabolas in Figure 25. As there are three uncertain parameters in G D (s) (K D , T D and α D ), the number of identification experiments is N = 2 3 = 8.

3.
For ω n0 = 0.65ω c0 = 0.65Á0.04880 = 0.03172[rad/s], eight points of the family of Nyquist plots corresponding to the uncertain plant model were identified using the sinusoidal excitation: G D1 (jω n )…G D8 (jω n ) (depicted by blue "x" in Figure 30). The nominal point G D0 (jω n ) calculated from the coordinates of all identified points G Di (jω n ), i = 1…8 is located on the Nyquist plot of the nominal model G D0 (jω n ) (blue curve) thus proving correctness of the identification. Radius of the dispersion circle M G centered in the nominal point G D0 (jω n0 ) with the radius R G = 0.164.
6. The smallest gain margin G + MN = 18.8 dB is estimated from the position of the worst-case point L DN (jω n0 ) = 0.112e Àj197 . The achieved smallest gain margin is given by the intersection point of the red Nyquist plot with the negative real half-axis of the complex plane G + MN = 16.9 dB.   Figure 30a (dotted curves) touch, which indicates fulfillment of the robust performance condition.

Conclusion
A novel frequency-domain PID design method for performance specified in terms of maximum overshoot and settling time is presented applicable for uncertain systems with parametric uncertainties. One of the main results is developed empirical charts called B-parabolas; this insightful graphical tool is used to transform engineering time-domain performance specifications (maximum overshoot and settling time) into frequency-domain performance measures (phase margin and gain margin). The developed PID design method is based on shaping the closed-loop step response using various combinations of excitation signal frequencies and required phase and gain margins. Using B-parabolas, it is possible to shape time responses of processes with various types of dynamics. By applying appropriate PID controller design methods including the above presented, it is possible to achieve cost-effective control of processes with uncertainties. The presented advanced external harmonic excitation-based design method contributes to improve the unfavorable statistical ratio between the properly tuned to all implemented PID controllers in industrial control loops.