Proceedings of the 2006 American Control Conference Minneapolis, Minnesota, USA, June 14-16, 2006 WeA08.3 PID Controller Design with Constraints on Sensitivity Functions Using Loop Slope Adjustment Daniel Garcia*, Alireza Karimi*, Roland Longchamp* and Sebastián Dormido** Abstract— This paper presents a PID controller design method for stable minimum-phase systems. The approach is similar to the one proposed in the so-called modified ZieglerNichols method, where only one point on the frequency response of the plant is measured and then moved to the desired position on the unit circle. This technique provides the specified phase margin and crossover frequency to the closed-loop system. However, the ratio between integral and derivative time is not fixed prior to the design in the proposed approach. This ratio is chosen is order to obtain the desired loop slope at the crossover frequency. Constraints on the infinity-norm of sensitivity functions are used to shape the loop transfer function and to determine the corresponding loop slope value. The proposed method, which is based on Bode’s integral relationships for the slope adjustment, does not require any parametric model of the plant and can be applied with only modest effort. I. INTRODUCTION The conventional PID controllers are undeniably the most commonly used control algorithm for industrial processes. In spite of their very simple structure, they can often provide satisfying closed-loop stability and performances as long as their parameters are properly chosen. Nowadays many different methods exist for the design of such controllers. The simplicity of the PID structure, which consists of only three parameters, constraints however the design method to be not very complex. Among the techniques currently available, the modified Ziegler-Nichols [1] method has this advantage of simplicity and is known to work well in many situations in process control. The approach is very intuitive and can be applied with only modest effort. It only requires the knowledge of the point on the frequency response of the plant that corresponds to the desired crossover frequency. This point can be moved by the controller to a desired position on the unit circle in order to satisfy a phase margin specification. Two equations for phase and amplitude assignment are obtained and can be solved to find the parameters of the controller. An additional equation, which specifies the ratio between integral and derivative time, should however be introduced in order to obtain a unique solution. In the modified Ziegler-Nichols * D. Garcia, A. Karimi and R. Longchamp are with the Laboratoire d’Automatique, Ecole Polytechnique Fédérale de Lausanne (EPFL), 1015 Lausanne, Switzerland. {daniel.garcia, alireza.karimi, roland.longchamp}@epfl.ch. The work of these authors is financially supported by the Swiss National Science Foundation under grant No. 2100-064931.01. ** S. Dormido is with the Dpto de Informática y Automática, UNED, c\ Juan del Rosal 16, 28040 Madrid, Spain. sdormido@dia.uned.es. The work of this author is financially supported by the Spanish CICYT under grant DPI 2004-01804. 1-4244-0210-7/06/$20.00 ©2006 IEEE method, this ratio is chosen to be constant, i.e, Ti = αTd . The closed-loop stability and performances are heavily influenced by the choice of α [2]. In [1] it has been shown that the ratio α = 4 is appropriate for many industrial processes. For some systems, however, it has been pointed out in [3] that better results are obtained with an α parameter in the vicinity of 2.5. One problem associated with the modified Ziegler-Nichols is that the ratio α is specified prior to the controller design, without any a priori information of the process dynamics. Only one point on the Nyquist curve of the loop can then be positioned by the method, and the curve cannot be shaped more precisely. In [2], a design procedure is proposed in order to overcome this problem and to shape the Nyquist curve between the crossover and critical frequencies. The design procedure however requires a parametric model of the plant and thus looses the advantage of simplicity. Recently, in [4], [5] it has been shown how the slope of the Nyquist curve at the crossover frequency can be adjusted, without any model of the plant. The design is based on Bode’s integrals and only requires the knowledge of the frequency response of the plant at the crossover frequency as well as its static gain. This approach is used in this paper. The main contribution of this work is to shape the frequency response of the loop, based on constraints on the infinitynorm of the sensitivity and complementary sensitivity functions. A closed-loop experiment is provided to measure the point on the Nyquist curve of the plant corresponding to the desired crossover frequency. The modified Ziegler-Nichols method is then used to obtain the required phase margin. The ratio between integral and derivative time is designed to impose, in the Nyquist diagram, the slope of the loop frequency response, which is chosen according to constraints on the infinity-norm of sensitivity functions. This paper is organized as follows: Section II recalls the modified Ziegler-Nichols method as well as the procedure for adjusting the loop slope at the crossover frequency. The choice of the slope to shape the loop transfer function according to sensitivity constraints is explained in Section III. In Section IV the measurement procedure for identifying the plant at the chosen crossover frequency is presented. A simulation example is then provided in Section V to illustrate the approach. Finally, some concluding remarks are offered in Section VI. II. PRELIMINARIES This Section recalls briefly the so-called modified ZieglerNichols method. It also underlines that PID controllers have more parameters than required for the design problem. 268 0.5 Finally it explains how this supplementary degree of freedom can be used to shape the Nyquist plot of the compensated system, without any model of the plant. B. Loop Slope Adjustment The slope ψ of the Nyquist curve of the loop transfer function L(jω) at the frequency ωc is equal to the phase of the derivative of L(jω) with respect to the frequency at ωc . The derivative of the loop transfer function with respect to the frequency is computed as follows: dL(jω) dK(jω) dG(jω) = G(jω) + K(jω) (3) dω dω dω 0 Imaginary Axis A. Phase Margin Adjustment Suppose that, for a given unknown system, specifications on crossover frequency ωc and phase margin Φ are known. Reasonable values for such design parameters are usually easy to find: A phase margin specification does not depend on the system structure and parameters, and is habitually chosen between 40◦ and 60◦ . For the crossover frequency, a specified value is not a priori known and depends especially on the plant dynamics. Since the crossover frequency is closely related to the rise time and thus to the bandwidth of the closed-loop system, guiding rules on its choice based on a specification on these performance indicators can be formulated [6]. The amplitude and phase of the plant at the crossover frequency ωc can then be measured with the procedure proposed in Section IV. The modified Ziegler-Nichols method can now be used to adjust the phase margin. One obtains the following equations for the controller parameters [1]: cos(Φ − ϕc − π) (1) Kp = |G(jωc )| 1 T d ωc − = tan(Φ − ϕc ) (2) T i ωc where ϕc is the phase of G(jωc ). Eq. (2) has usually an infinity of solutions for the parameters Ti and Td . In order to have a unique solution, an additional equation has been introduced in the modified Ziegler-Nichols method: Ti = αTd . The choice of α influences heavily the closedloop performances and stability. This fact may be illustrated with an example. Consider a plant with given closed-loop specifications on phase margin and crossover frequency. Suppose that three controllers are obtained, by solving Eq. (1) and (2) with three different values for the parameter α. Resulting Nyquist plots will show similar behaviors as those depicted in Fig. 1. It can be seen, that the three curves pass effectively through a common point and ensure a given phase margin and crossover frequency. Nevertheless, stability and performances of the three designed closed-loop systems differ passably since the loops are shaped very differently. The parameter α should thus be chosen in order to shape appropriately the Nyquist curve of the compensated system. Recently, it has been proposed in [5], [4], to design the ratio between integral and derivative time in order to obtain the desired loop slope at the crossover frequency. This design is briefly recalled hereafter. −0.5 −1 −1.5 −1 −0.5 0 0.5 Real Axis Fig. 1. Influence of the parameter α on the loop frequency response. which gives after some calculations: 1 dL(jω) = Kp G(jω) j(Td + 2 ) dω ω Ti 1 ) + 1 + j(Td ω − ωTi d ln |G(jω)| d∠G(jω) × +j dω dω (4) Hence, the slope of the Nyquist curve at ωc is given by: ψ= ∠ dL(jω) = ϕc + arctan dω ωc (Td Ti ωc2 + 1) + (Td Ti ωc2 − 1)sa (ωc ) + sp (ωc )Ti ωc sa (ωc )Ti ωc − (Td Ti ωc2 − 1)sp (ωc ) (5) where ϕc = ∠G(jωc ) and sa (ωc ) and sp (ωc ) are defined as follows: d ln |G(jω)| sa (ωc ) = ωc (6) dω ωc d∠G(jω) sp (ωc ) = ωc (7) dω ωc Straightforward calculation brings the following result for the relation between integral and derivative time for the specified loop slope ψ at the crossover frequency: 269 Td = [sa (ωc ) − 1 + sp (ωc ) tan(ψ − ϕc ) − Ti ωc (sp (ωc ) − sa (ωc ) tan(ψ − ϕ0 ))] × [ωc2 Ti (1 + sa (ωc ) + sp (ωc ) tan(ψ − ϕ0 ))]−1 (8) Eq. (8) and (2) give for the derivatives time Td : 1 [(sa (ωc ) − sp (ωc ) tan(Φ − ϕc )) 2ωc × tan(ψ − ϕc ) + (1 − sa (ωc )) tan(Φ − ϕc ) − sp (ωc )] (9) sa (ωc ) ≈ 2 ∠G(jωc ) π sp (ωc ) ≈ ∠G(jωc ) + m It is thus possible, if the slope of amplitude and phase sa and sp of the plant are known at ωc , to design the Nyquist plot of the loop transfer function with the desired slope at the crossover frequency. In [5], [4] it is shown for stable minimum phase systems, how these slopes can be approximated with an adequate precision for controller design without any model of plant. The approximations which are based on the Bode’s integrals, only require the knowledge of the plant at the crossover frequency as well as its static gain. The following expressions are obtained for the slopes: 0.75 M , φ [rad] Td = 1 0.5 0.25 0 0 0.25 0.5 Mc 0.75 1 Fig. 2. Lower bound of Mm (dashed line) and Φ in radian (solid line) in function of the Mc value. 1.5 (10) 2 [ln |Kg | − ln |G(jωc )|] π 1 Imaginary axis where Kg stands for the plant static gain. In the following Section, it will be shown how the slope ψ can be chosen in order to appropriately shape the loop. This design is based on constraints on the infinity-norms of the sensitivity functions. 0.5 1 (− 1−M 2 , 0) c 0 Φ ψ Mc 1−Mc2 -0.5 -1 III. SENSITIVITY CONSTRAINTS -1.5 Consider the complementary sensitivity function T (s) and the sensitivity function S(s) which express respectively the closed-loop transfer function from set-point to process output and the closed-loop disturbances amplification: T (s) = L(s) , 1 + L(s) S(s) = 1 1 + L(s) (11) It is well-known that the loci for constant values of |T | and |S| are represented in the complex plane by circles [6]. In the following, the notations introduced in [6] will be used for the complementary modulus margin Mc and the modulus margin Mm . They represent respectively the inverse of the infinity-norm of the complementary sensitivity and sensitivity functions: Mc = ||T ||−1 ∞, Mm = ||S||−1 ∞ (12) Consider now only one specification on Mc . This corresponds in the complex plane to a prohibited disk for the frequency response of the loop. The radius rc and center cc of the disk are given as follows [6]: rc = Mc , 1 − Mc2 cc = (− 1 , 0) 1 − Mc2 (13) It can be shown that a specification on Mc also ensures a lower bound for Mm , which guarantees the closed-loop -3 -2 -1 0 1 Real axis Fig. 3. Tangency condition at the loop crossover frequency. stability, as well as for the phase margin Φ: Mm ≥ Mc 1 + Mc Φ ≥ − arccos (14) Mc2 − 2 2 +π (15) These lower bounds of Mm and Φ in function of Mc are depicted in Fig. 2. A necessary condition for a given specification on Mc to be achieved is the tangency condition. In other words, the Nyquist curve of the loop must be tangent to the prohibited disk defined by the specification. The key idea of this design procedure is to choose the loop frequency response to be tangent to the prohibited disk at the crossover frequency ωc . The loop slope ψ at ωc will then be determined according to the tangency condition (see Fig. 3). The specification on Mc is however not given by the user. Only the phase margin Φ and the crossover frequency are explicitly specified. However, since for each phase margin, only one Mc circle exists, which crosses the unit circle at the corresponding point, the Mc value is unique. It can be 270 0 1.5 d _ -d e−T s G(s) Imaginary axis 1 0.5 0 Φ -0.5 ψ Fig. 5. Fig. 4 depicts this circle for a given value of Mm and Mc . Now with the given specification on Φ, it is possible to do exactly the same procedure as for the Mc circle. It consists in determining the circle satisfying Eq. (20) and (21), which intersects the unit circle at the point corresponding to the phase margin. This circle includes the specified Mm circle and the largest possible Mc circle. It can be determined by solving the following equation: -1 -1.5 -3 -2 -1 0 1 Real axis Fig. 4. Circle including both the Mm and Mc circles. determined by solving the corresponding equation of the circle: Mc2 1 2 2 ) + y = (16) (x + 1 − Mc2 (1 − Mc2 )2 with: x = cos(Φ − π), y = sin(Φ − π) Relay plus additional time delay feedback system. (17) In the complex plane, x + iy is the point on the unit circle corresponding to the phase margin Φ. From Eq. (16), and (17) one obtains: Mc4 +Mc2 (−3 − 2 cos(Φ − π))+2+2 cos(Φ−π) = 0 (18) which is a second order equation for Mc2 with only one positive solution for Mc . Now that the Mc circle crossing the unit circle at the point corresponding to the phase margin is known, it remains to compute its slope at this intersection. This slope in radian is given by the following equation: cos Φ + cc ψ = arctan − (19) sin Φ where cc stands for the center of the Mc circle according to Eq. (13). Now the PID controller can be design using Eq. (1), (2), (9), (18) and (19), . Remark: Instead of defining specifications on Φ and ωc , specifications can be given on Mc and ωc . Then the phase margin will be imposed by the intersection of the Mc circle with the unit circle. The problem can easily be generalized to other circles. Suppose that, for a specific problem, a modulus margin larger than the lower bound given by Eq. (14) is specified. For each value of Mc , it is then possible to compute the smallest circle in the complex plan that include both the Mm and Mc circle. Radius and center of this circle are given as follows: 1 rcm = 0.5 −1 + Mm − (20) Mc − 1 1 ,0 (21) ccm = 0.5 −1 + Mm + Mc − 1 2 (x − ccm )2 + y 2 = rcm (22) where x and y are defined according to Eq. (17). Equation (22) can be solved analytically and has only one positive solution for Mc . Then the slope of the circle at this intersection is computed and the frequency response of the loop is then designed to be tangent to the circle at the crossover frequency. IV. MEASUREMENT PROCEDURE For the proposed controller design procedure, the static gain of the plant as well as the amplitude and phase of the plant at the chosen crossover frequency ωc have to be known. The static gain is very simple to measure (for example by performing only one step response) and is thus assumed to be known. To measure the frequency response of the plant at the crossover frequency different experiments exist, either in open loop or in closed-loop. In this paper, a closed-loop relay experiment is used for the measurement. Relay methods have usually been well accepted by the industrial world because, compared to open-loop solutions, the sensitiveness to disturbances is reduced, and the implementation of such structures are simpler. The standard relay method [7] provides the knowledge of the critical point and frequency of a system. In order to identify points on the Nyquist plot of the plant corresponding to other frequencies an additional time delay is inserted in the loop [8]. Figure 5 depicts the resulting closed-loop relay experiment, where G(s) represents the unknown plant, T the additional time delay (T > 0) and d is the amplitude of the relay output. The influence of the time delay T on the frequency response of the plant G(s) consists on moving each point of the Nyquist plot of the plant, by adding a phase lag, which is proportional to the frequency and to the value of the time delay. As a result, the critical point and frequency of the equivalent plant can be changed by varying the time delay T . By choosing appropriately the time delay T , the purpose of the method is to make the system oscillate at the chosen frequency ωc , in order to identify G(jωc ). The 271 _ k Imaginary axis . 1 s _ 0 _ a) 0.5 δ e−T s G(s) 0 0 -0.5 -0.5 -1 -1.5 Nonlinear scheme for improving the measurement precision. -2.5 -2.5 -1 -0.5 0 Tk−1 − Tk−2 ωk−1 − ωk−2 0.5 1 1.5 -3 -1.5 -1 -0.5 0 0.5 1 1.5 Real axis Fig. 7. Nyquist plots (Dashed line: modified Ziegler Nichols, solid line: proposed design). problem is solved iteratively as explained hereafter, using the secant algorithm: 1) Choose two different initial values for the time delay T (T0 and T1 ). The value T0 is usually chosen to be 0 and T1 > 0. Then two relay experiments can be performed with the two time delay values. Each experiment results in a limit cycle with the frequency ω0 or ω1 which corresponds respectively to the time delay T0 and T1 . 2) The time delay parameter is updated iteratively using the secant algorithm: Tk = Tk−1 + (ωc − ωk−1 ) -1.5 -2 Real axis Fig. 6. -1 -2 3 -1.5 b) 0.5 Imaginary axis ε (23) where k represent the iteration number. A new relay experiment can then be performed with the obtained time delay, and the frequency ωk of the obtained limit cycle can be determined. 3) Repeat the previous step until the obtained frequency is closed enough to the desired one: |ωk − ωc | < η, where η is a small positive number that represents the absolute tolerance. Remark: The secant algorithm is derived from the Newton-Raphson algorithm. The derivative is simply replaced in the secant algorithm by a quotient of differences. However, convergence conditions remain the same as for the classical NewtonRaphson method. In particular, the secant method has a quadratic convergence rate near the solution. There is however, one problem associated with the closedloop relay experiment (see Fig. 5). It is the generation by the nonlinear relay element of higher order harmonics that cannot be completely attenuated by the low-pass behavior of the plant. By considering then only the first harmonic of the signals with the describing function analysis, it leads to identification errors. In order to improve considerably the measurement precision, another nonlinear closed-loop structure can be used (see Fig. 6). In this scheme, the relay element is replaced by a saturation nonlinearity and a time varying gain k [9]. The main idea of this scheme is to automatically tune the gain k with an empirical adaptation law in order to obtain the critical gain kkr of the resulting system G(s)e−T s . Convergence analysis as well as guiding rules on the choice of the parameters δ and ε are provided in [9]. Different simulation examples and real-time experiments [9], [10] show that this scheme leads to accurate results in only few oscillations. The iterative procedure based on the secant algorithm associated with the structure of Fig. 6 allows to identify with high accuracy the point on the frequency diagram of a given plant G(s) corresponding to the given frequency ωc . Furthermore, the time needed for the experiment is reasonable since the secant algorithm converges usually in less than 5 iterations to a frequency sufficiently near to the desired one. V. SIMULATION EXAMPLES A simulation example is now provided to illustrate the design method. Consider the first-order process plus dead time proposed 1 e−0.2s . The specifications are set at in [2]: Gp (s) = s+1 3 rad/s for the crossover frequency and 60◦ for the phase margin. The measurement procedure presented in Section IV is used to measure the point on the frequency response of the plant corresponding to the desired crossover frequency. A first controller is then designed using the modified ZieglerNichols method. This controller moves the point G(3j) of the Nyquist curve of the plant to the point of K(jω)G(jω) on the unit circle with the phase of 60◦ − 180◦ . Now it is desired to adjust the controller parameters with the proposed method. First the Mc circle which intersects the unit circle at the point corresponding to the phase margin of 60◦ is considered. Solving Eq. (18) one obtains Mc = 1. This value corresponds to a degenerated circle (radius rc = ∞) which is the line parallel to the imaginary with the real coordinate of −0.5. Its slope at the crossover frequency is thus ψ = 90◦ . The controller is then designed by using this slope for the loop at the crossover frequency. The resulting Nyquist curve is depicted in Fig. 7 a) and compared with the result provided by the modified Ziegler-Nichols method. A complementary modulus margin of 1 ensures a lower bound equals to 0.5 for the modulus margin. Suppose now that we want to give a larger specification for this one: Mm = 272 even if the slope is perfectly adjusted, the tangency condition is not a sufficient condition for the curve to stay outside a circle. The curve can enter the circle at other frequencies. This can be the case for complex high-order systems, where specifications may be satisfied just locally at the crossover frequency and the behavior changes drastically elsewhere leading to poor results. However, since the method needs the same informations as the modified Ziegler-Nichols method plus the plant static gain, it can constitute a good alternative to this method when it does not provide appropriate results. Furthermore the specifications can be chosen in a very simple way (phase margin and crossover frequency) like in the modified Ziegler-Nichols method, and the problem solution is very easy, since it only requires to solve some algebraic equations. 1 0.8 0.6 0.4 0.2 0 0 1 2 3 Time [s] 4 5 6 Fig. 8. Closed-loop step responses (dashed-dotted line: modified ZieglerNichols, solid line: proposed design with specification on Mc , dashed line: proposed design with specification on Mc and Mm ). TABLE I S IMULATION RESULTS . Method Mod. Z-N Specification Mc Specification Mc , Mm Kp 3.07 3.07 3.07 Ti 0.5203 1.016 0.6658 Td 0.13007 0.0258 0.0834 Mc 0.85 0.99 0.91 Mm 0.57 0.61 0.65 0.6. Specifications on phase margin and crossover frequency are however preserved. Now we can find with Eq. (22), (20) and (21) the circle which includes both the given Mm and the largest possible Mc circle and which intersects the unit circle at Φ. The corresponding Mc is found to be 0.875. The slope ψ of the circle at the intersection is then chosen for the loop slope at the crossover frequency. Again the achieved loop frequency response is shown in Fig. 7 b) and compared with the results of the modified Ziegler-Nichols method. The different circles are also depicted in the figure. It should be remarked here that, by introducing a circle which includes the two sensitivity circles, conservatism is introduced. Step responses obtained in closed-loop with the modified Ziegler-Nichols and the proposed controllers are compared in Fig 8. These curves show that both proposed controllers improve the time-domain performances of the closed-loop system in terms of overshoot and settling time. Furthermore, the Nyquist plots (see Fig. 7) show that the frequency responses with both proposed controllers are appropriately shaped in the frequency range, which is crucial for closedloop stability and performances. Details of the design as well as obtained values for the modulus and complementary modulus margin are shown in Table I. It should be noted that the obtained results are very close to the desired requirements for the infinity-norm of the sensitivity functions. For different reasons however, the proposed method cannot ensure these desired values. On the one hand, the Bode’s integrals are used to adjust the loop slope without any model of the plant. These relations are not exact and consequently the obtained slope can differ from the desired one. On the other hand, VI. CONCLUSIONS An similar approach to the one given by the well-known modified Ziegler-Nichols method is presented in this paper. However, instead of considering a fixed ratio between the integral and derivative time, the ratio is adjusted to obtain the desired loop slope at the crossover frequency. As a result, the loop transfer function can be shaped, in this frequency range, according to constraints on the infinity-norm of sensitivity function. Compared to the modified Ziegler-Nichols method, this procedure requires only one more information about the plant, which is its static gain. It can thus be applied without the need of any parametric model of the system to stable minimum phase plants. This procedure can be considered as an attractive alternative approach to the modified ZieglerNichols method to improve considerably the achieved stability and performances for systems where satisfactory results cannot be obtained with the traditional method. R EFERENCES [1] K. J. Aström and T. Hägglund, Advanced PID Control. Instrument Society of America, 2006. [2] K. K. Tan, T. H. Lee, and Q. G. Wang, “Enhanced automatic tuning procedure for process control of PI/PID controllers,” AIChE journal, vol. 9, no. 42, pp. 2555–2562, September 1996. [3] B. Kristiansson and B. Lennartson, “Optimal PID controllers including roll off and Schmidt predictor structure,” in 14th Triennial World Congress, Beijing, P.R. China, 1999, pp. 297–301. [4] A. Karimi, D. Garcia, and R. Longchamp, “PID controller tuning using Bode’s integrals,” IEEE Transactions on Control Systems Technology, vol. 11, no. 6, pp. 812–821, 2003. [5] ——, “PID controller design using Bode’s integrals,” in ACC, FP13-6, May 2002, pp. 5007–5012. [6] D. Garcia, A. Karimi, and R. Longchamp, “PID controller design with specifications on the infinity-norm of sensitivity functions,” in 16th IFAC World Congress, July, 2005. [7] K. J. Aström and T. Hägglund, “Automatic tuning of simple regulators with specifications on phase and amplitude margins,” Automatica, vol. 20, no. 5, pp. 645–651, 1984. [8] A. B. con Voda and H. Roux-Buisson, “Another version of the relay feedback experiment,” J. Proc. Cont., vol. 7, no. 4, pp. 303– 308, 1997. [9] M. Saeki, “A new adaptive identification method of critical loop gain for multi-input multi-output plants,” 37th IEEE CDC, vol. 4, pp. 3984– 3989, 1998. [10] A. Karimi, D. Garcia, and R. Longchamp, “Iterative controller tuning using Bode’s integrals,” in CDC, FrM07-6, December 2002, pp. 4227– 4232. 273