Part II. PID controller tuning using the multiple integration method

Similar documents
CDS 101/110: Lecture 8.2 PID Control

Consider the control loop shown in figure 1 with the PI(D) controller C(s) and the plant described by a stable transfer function P(s).

PID TUNING WITH INPUT CONSTRAINT: APPLICATION ON FOOD PROCESSING

DESIGN AND VALIDATION OF A PID AUTO-TUNING ALGORITHM

Modified ultimate cycle method relay auto-tuning

New PID Tuning Rule Using ITAE Criteria

A Comparison And Evaluation of common Pid Tuning Methods

CHBE320 LECTURE XI CONTROLLER DESIGN AND PID CONTOLLER TUNING. Professor Dae Ryook Yang

BINARY DISTILLATION COLUMN CONTROL TECHNIQUES: A COMPARATIVE STUDY

Cohen-coon PID Tuning Method; A Better Option to Ziegler Nichols-PID Tuning Method

EMPIRICAL MODEL IDENTIFICATION AND PID CONTROLLER TUNING FOR A FLOW PROCESS

6545(Print), ISSN (Online) Volume 4, Issue 1, January- February (2013), IAEME & TECHNOLOGY (IJEET)

Different Controller Terms

Module 08 Controller Designs: Compensators and PIDs

GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control

Hacettepe University, Ankara, Turkey. 2 Chemical Engineering Department,

Loop Design. Chapter Introduction

Dr Ian R. Manchester

Position Control of DC Motor by Compensating Strategies

PYKC 7 March 2019 EA2.3 Electronics 2 Lecture 18-1

The PID controller. Summary. Introduction to Control Systems

Laboratory PID Tuning Based On Frequency Response Analysis. 2. be able to evaluate system performance for empirical tuning method;

THE general rules of the sampling period selection in

Temperature Control in HVAC Application using PID and Self-Tuning Adaptive Controller

Find, read or write documentation which describes work of the control loop: Process Control Philosophy. Where the next information can be found:

Some Tuning Methods of PID Controller For Different Processes

CHAPTER 4 AN EFFICIENT ANFIS BASED SELF TUNING OF PI CONTROLLER FOR CURRENT HARMONIC MITIGATION

Chapter 5 Frequency-domain design

Anti Windup Implementation on Different PID Structures

Performance Analysis of Conventional Controllers for Automatic Voltage Regulator (AVR)

Chapter 2 Non-parametric Tuning of PID Controllers

The Matching Coefficients PID Controller

PID Tuner (ver. 1.0)

MM7 Practical Issues Using PID Controllers

Abstract. I. Introduction

Andrea Zanchettin Automatic Control 1 AUTOMATIC CONTROL. Andrea M. Zanchettin, PhD Spring Semester, Linear control systems design

Comparative Analysis of Controller Tuning Techniques for Dead Time Processes

International Journal of Research in Advent Technology Available Online at:

CDS 101/110a: Lecture 8-1 Frequency Domain Design

CHAPTER 6 INTRODUCTION TO SYSTEM IDENTIFICATION

SECTION 6: ROOT LOCUS DESIGN

Fundamentals of Servo Motion Control

CHAPTER 2 PID CONTROLLER BASED CLOSED LOOP CONTROL OF DC DRIVE

CHASSIS DYNAMOMETER TORQUE CONTROL SYSTEM DESIGN BY DIRECT INVERSE COMPENSATION. C.Matthews, P.Dickinson, A.T.Shenton

Classical Control Design Guidelines & Tools (L10.2) Transfer Functions

Andrea Zanchettin Automatic Control 1 AUTOMATIC CONTROL. Andrea M. Zanchettin, PhD Winter Semester, Linear control systems design Part 1

CDS 101/110: Lecture 9.1 Frequency DomainLoop Shaping

Systems Engineering/Process control L9

Implementation of decentralized active control of power transformer noise

Robust Performance Limitations and Design of Controlled Delayed Systems

Automatic Feedforward Tuning for PID Control Loops

Digital Control of MS-150 Modular Position Servo System

An Expert System Based PID Controller for Higher Order Process

Chapter 4 PID Design Example

Design and Analysis for Robust PID Controller

Simulation and Analysis of Cascaded PID Controller Design for Boiler Pressure Control System

Modified Relay Feedback Approach for Controller Tuning Based on Assessment of Gain and Phase Margins

Stabilizing and Robust FOPI Controller Synthesis for First Order Plus Time Delay Systems

Comparative Study of PID and FOPID Controller Response for Automatic Voltage Regulation

MODEL BASED CONTROL FOR INTERACTING AND NON-INTERACTING LEVEL PROCESS USING LABVIEW

EE 482 : CONTROL SYSTEMS Lab Manual

EE 560 Electric Machines and Drives. Autumn 2014 Final Project. Contents

TRACK-FOLLOWING CONTROLLER FOR HARD DISK DRIVE ACTUATOR USING QUANTITATIVE FEEDBACK THEORY

Fig.. Block diagram of the IMC system. where k c,t I,T D,T s and f denote the proportional gain, reset time, derivative time, sampling time and lter p

Understanding PID design through interactive tools

MTE 360 Automatic Control Systems University of Waterloo, Department of Mechanical & Mechatronics Engineering

A Case Study in Modeling and Process Control: the Control of a Pilot Scale Heating and Ventilation System

Various Controller Design and Tuning Methods for a First Order Plus Dead Time Process

PROCEEDINGS OF THE SECOND INTERNATIONAL CONFERENCE ON SCIENCE AND ENGINEERING

Non-Integer Order Controller Based Robust Performance Analysis of a Conical Tank System

Auto-tuning of PID Controller for the Cases Given by Forbes Marshall

Non Linear Tank Level Control using LabVIEW Jagatis Kumaar B 1 Vinoth K 2 Vivek Vijayan C 3 P Aravind 4

Relay Feedback Tuning of Robust PID Controllers With Iso-Damping Property

Chapter 10: Compensation of Power Transmission Systems

ISSN Vol.04,Issue.06, June-2016, Pages:

Relay Feedback based PID Controller for Nonlinear Process

2.7.3 Measurement noise. Signal variance

Control Design for Servomechanisms July 2005, Glasgow Detailed Training Course Agenda

AVR221: Discrete PID Controller on tinyavr and megaavr devices. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

EVALUATION ALGORITHM- BASED ON PID CONTROLLER DESIGN FOR THE UNSTABLE SYSTEMS

Design of Model Based PID Controller Tuning for Pressure Process

Closed-loop System, PID Controller

BSNL TTA Question Paper Control Systems Specialization 2007

ME451: Control Systems. Course roadmap

Comparative Analysis of a PID Controller using Ziegler- Nichols and Auto Turning Method

Testing and Stabilizing Feedback Loops in Today s Power Supplies

Mechatronics. Analog and Digital Electronics: Studio Exercises 1 & 2

Application of Proposed Improved Relay Tuning. for Design of Optimum PID Control of SOPTD Model

Positive Feedback and Oscillators

METHODS TO IMPROVE DYNAMIC RESPONSE OF POWER FACTOR PREREGULATORS: AN OVERVIEW

7. PID Controllers. KEH Process Dynamics and Control 7 1. Process Control Laboratory

Course Outline. Time vs. Freq. Domain Analysis. Frequency Response. Amme 3500 : System Dynamics & Control. Design via Frequency Response

AN EXPERIMENTAL INVESTIGATION OF THE PERFORMANCE OF A PID CONTROLLED VOLTAGE STABILIZER

PI Tuning via Extremum Seeking Methods for Cruise Control

Optimal Control System Design

SCIENCE & TECHNOLOGY

ANNA UNIVERSITY :: CHENNAI MODEL QUESTION PAPER(V-SEMESTER) B.E. ELECTRONICS AND COMMUNICATION ENGINEERING EC334 - CONTROL SYSTEMS

PID control of dead-time processes: robustness, dead-time compensation and constraints handling

EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall Lab Information

Transcription:

Part II. PID controller tuning using the multiple integration method 5

6

5. Introduction to PID control PID controllers have been in use for a long time. The first (pneumatic) PI controllers came from the Foxboro and Taylor companies in 94-95. Within a few years, Taylor developed its first PID controller, the Fulscope (Babb, 99; Bennett, 99; Blickley, 99). That PID controller performed excellently on several types of processes (especially temperature processes), but the problem which arose was how to tune such a controller. Without any guidelines for tuning, there were no prospects for selling the product. At that time, tuning of the PI controller required a relatively skilled engineer. The problem was significantly increased by the addition of the derivative (D) part. This led Ziegler and Nichols from the Taylor company to discover the famous Ziegler- Nichols tuning rules (Ziegler and Nichols, 94). Those rules were derived in quite a heuristic way using the laboratory multicapacity system and a Fulscope PID controller (Blickley, 99). The Ziegler-Nichols tuning rules were the very first tuning rules for PID controllers, and it is surprising that they are still widely used today. The reason for their popularity lies in their simplicity and efficiency. This is why so many different tuning rules have been developed which are based on the same tuning procedures (see e.g. Clair, 995). After the work of Ziegler and Nichols, a variety of PID tuning methods have been developed. A good survey of these can be found in Gorez (996) and Haalman (966). In general, these methods can be divided into two main groups: direct and indirect tuning methods (Åström and Hägglund, 99; Gorez, 996). Direct tuning methods do not use an explicit process model, whilst indirect methods are based on the process model. The most popular direct tuning methods are based on the measurement of particular points on the process Nyquist curve. The best-known rules are the Ziegler-Nichols tuning rules (Åström and Hägglund, 995; Hang et al., 99; Hang and Cao, 99; Ho et al., 995, 996a; Thomas, 99), and the refined Ziegler-Nichols rules (Åström and 7

Hägglund, 995a; Åström and Hägglund, 995b; Hang et al., 99; Ho et al., 995). Several methods based on the detection of one or two points of the process frequency response using relay excitation (Åström and Hägglund, 984; Atherton, 996) have become more popular in the last decade. In order to track the ultimate frequency if process dynamics vary, the measuring of more points on the Nyquist curve was proposed by Ho et al., (996b). Use of the cross-correlation technique so as to detect the process ultimate gain and frequency was proposed in (Hang and Sin, 99). Repeatedly changing the PI(D) controller parameters until the phase and gain margin are satisfied was proposed in Calcev and Gorez (995), Denolin and Hanus (996), Vrančić et al. (996c), Vrančić and Peng (994b, 995a). Some direct tuning methods are also based on pattern recognition methods (Bristol, 977), genetic algorithms (Wang and Kwok, 99), and on the optimisation approach (Zhou and Birdwell, 996). The most popular indirect tuning methods are based on the process model in the frequency domain. PID controller tuning is usually achieved by placing the closed-loop poles (Persson and Åström, 99; Shafiei and Shenton, 994, Vrančić et al., 99b, 994), by tuning each term of the PID controller so as to maximise the stability margin according to the specified phase and amplitude margins (Thomas, 99), or by finding the appropriate PID parameters from the derived IMC controller (Williams and Adeniyi, 996). Some indirect tuning methods are based on a reduced process model (the first or second order model with pure time delay) (Ho et al., 99). In this framework, several authors (Besherati and Gawthrop, 99; Khan and Lehman, 996; Leva et al., 994) were particularly interested in accurately obtaining the process time delay. Obtaining an estimation of the process model by using the integration of the process step response was proposed in (Åström and Hägglund, 995a; Nishikawa et al., 984; Voda and Landau, 995). PID controller tuning for such an estimated model is based on the symmetrical optimum technique (Kuhn, 995, Voda and Landau, 995), or on the optimal weighted integral of the squared error (Nishikawa et al., 984). Each tuning method has its advantages and drawbacks. In general, the more information that can be extracted from the process, the better are the tuning results which can be obtained. However, extracting more process information requires more extensive process identification and computations, with longer and more complicated experiments on the tested plant. Moreover, it has been recognised (Peterka and Åström, 98) that developing accurate models for the process industry and identifying the parameters within them is often not worthwhile; rather the problem is how to determine the controller parameters. On the other hand, tuning rules which require less process information (e.g. detection of the process gain, lag and rise times, or the process ultimate point) generally do not give the optimal response, since the available process information is based on few measured parameters. For instance, there are considerably different processes with the same pairs of lag and rise times (or ultimate points); clearly, these processes require different controller parameters. Several drawbacks of the Ziegler-Nichols tuning rules are reported in Åström and Hägglund (995b), Hang et al. (99), Hang and Cao (99), Hang and Sin (99), Thomas (99), and Voda and Landau (995). Some authors have suggested the introduction of the so-called set-point weighting approach (Hang et al., 99; Hang and Cao, 99), and the refinements of the Ziegler-Nichols 8

tuning rules (Åström and Hägglund, 995a; Åström and Hägglund, 995b). The improved closed-loop responses have shown that the refined tuning rules gave very good results on several types of processes, but tuning was still based on measurements of the process lag and rise time (or ultimate point), so their applicability to a wide spectrum of processes still remains an open problem. Our aim was to find a simple tuning procedure which could be easily executed by the real-time auto-tuning algorithm, and which would give the optimal controller settings for a large set of process models. It was decided that the PID controller tuning should be based on the process step response, because it can usually be simply obtained on the real plant. Instead of measuring the lag and rise times (this can be tricky if the process step response is noisy), the process information was extracted from the process step response by using a function which is quite inert to process noise (Nishikawa et al., 984), and can be simply executed by a real-time digital algorithm: an integration. We chose the multiple integration approach, the technique originally used for the process identification (see e.g. Isermann (97), Rake (987), Strejc (959), and Vrančić et al. (996b,d)). It was also decided to meet all the demands of the "magnitude" ("modulus") optimum (MO) tuning goal (Åström and Hägglund, 995a; Boucher and Tanguy, 976; Hanus, 975; Umland and Safiuddin, 99). The MO technique guarantees fast, stable and nonoscillatory closed-loop behaviour for a large set of industrial processes. It was found that there is a close relationship between the five areas, obtained from the process open-loop step response (by using the multiple integration approach), and the MO technique. The PID controller parameters were merely calculated from the process step response, regardless of the process order. 9

6. Derivation of PID controller parameters The tuning procedure for the PID controller is given for those processes which can be approximated by the following transfer function: () G s = K P PR m + bs + bs + m+ bms as as a s e n + + + m+ n st del, () where K PR denotes the process steady-state gain, and a to a n and b to b m are the corresponding parameters (m n) of the process transfer function. A parameter T del represents the process pure time delay. The PID controller is given by the following transfer function: G C ( s) ( ) ( ) Us st d = = K + + Es sti + st, () f where U and E denote the Laplace transforms of the controller output, and the control error (e=w-y), respectively. The controller parameters K, T i, T d, and T f denote proportional gain, integral time constant, derivative time constant, and filter time constant, respectively. The PID controller in a closed-loop configuration with the process is shown in Fig. 74, where d denotes a load disturbance.

A goal of tuning was to find such a controller that makes the closed-loop amplitude (magnitude) frequency response from the set-point to the plant output as flat and as close to unity as possible for a large bandwidth for a given plant and controller structure (see the solid line in Fig. 75). This technique is called magnitude optimum (MO) (Umland and Safiuddin, 99), modulus optimum (Åström and Hägglund, 995a), or Betragsoptimum (Åström and Hägglund, 995a; Kessler, 955), and results in a fast and non-oscillatory closed-loop time response for a large class of process models. The MO tuning goal can be achieved by setting G CL () = and d n G CL (jω) /dω n = at ω= for as many n as possible (see Åström and Hägglund, (995a); Boucher and Tanguy, (976); Hanus, (975); Umland and Safiuddin, (99)), where G CL (s) denotes the closed-loop transfer function from w to y. Fig. 74. The closed loop system with PID controller Figures 75 and 76 illustrate the relation between the closed-loop frequency response (Fig. 75), and the open-loop frequency response (Fig. 76) (the well-known M and N circles in control theory). To achieve the same tuning goal as given above, the open-loop Nyquist curve of the process and controller should follow the vertical line with the real value -.5 for the highest frequencies as possible (see solid line in Fig. 76).

Closed-loop gain - - - - - Frequency (/s) Fig. 75. Bode plot of the closed-loop magnitude frequency-response G P (jω)g C (jω) / (+G P (jω)g C (jω)).5.5 Imag axis -.5 - -.5 - - -.5 - -.5.5.5 Real axis Fig. 76. Nyquist curve of the open-loop frequency response G P (jω)g C (jω) When developing the pure time delay in () into the Taylor series:

e stdel ( st ) ( st ) del del = stdel + + m, (4)!! the open-loop system transfer function can be expressed from () and () in the following way: () () G s G s C P = d + ds+ ds + ds + l 4 cs+ cs + cs + cs+ l, (5) where parameters c i and d i in (5) can be calculated by inserting (), (), and (4) into (5): c = Ti c = at i c = ati c = ati c4 = a4ti c5 = a5ti o d = KKPR d = KKPR( b + Ti Tdel ) T del d = KKPR b + bt i + TdTi Tdel( Ti + b) + ( ) btt i d + bt i + b Tdel TT i d + bt i + b + d = KPRK Tdel Tdel, + ( Ti + b ) 6 btt i d + bt i + b4 Tdel( btt i d + bt i + b) + d4 = KPRK 4 Tdel Tdel Tdel + ( TT i d + bt i + b) ( Ti + b ) + 6 4 T del btt i d + bt 4 i + b5 Tdel( btt i d + bt i + b4) + ( btt i d + bt i + b) d5 = KPRK 4 5 Tdel Tdel Tdel ( TT i d + bt i + b) + ( Ti + b ) 6 4 (6) o 4

Note that expressions (6) are valid when T f = (the ideal derivative term). A derivation of the PID controller parameters when T f is given in sub-chapter 7.. However, in all examples and real-time experiments, the derivative filter time constant is set to T f =T d /. Following the procedure given by Hanus, (975), the magnitude optimum can be achieved by moving the zeros of the function Re{G P (jω)g C (jω)}+/ toward ω=. This can be done by fulfilling the following set of equations (Hanus, 975): n+ i i ( ) i n+ i = ( ) i= n dc cc i n i (7) i= In order to find three PID parameters (K, T i, and T d ), the first three equations (n=..) in (7) are to hold (Vrančić and Peng, 997): dc c dc + = (8) c dc dc + dc + dc cc + = (9) c dc 4+ dc + dc 5 dc 5 dc dc 4 + cc 4 cc + = (4) When inserting (6) into (8) to (4), the following expressions are obtained: K = T i KPR Ti a b Tdel ( + ) (4) T i T T del del KK PR ab ab+ a b Tdel ( ab a b) + ( a b) + 6 = T del KKPR Td ( a b+ Tdel ) + ab a b Tdel ( a b) + a a (4) 5

T d ( i( + 4 4) + 4 + 4 + 5 5) KKPR T ab a b a b a b ab a b a b a b a b = T T del del KK PRTi ab ab + a b Tdel ( ab a b) + ( a b) +! ( i( + ) + + 4 4) Tdel T ab ab a b ab ab ab a b + T T del del KK PRTi ab ab + a b Tdel ( ab a b) + ( a b) +! Tdel ( Ti ( ab a b) + ab ab+ a b) + T T del del KKPRTi ab ab+ a b Tdel ( ab a b) + ( a b) +! ( ) ( ) 4 5 Tdel Tdel Tdel Ti ( a b) + ab a b + Ti a+ b! 4! 5! + T del KK PRTi ab ab + a b Tdel ( ab a b) + ( a b) +! ( 4) Ti aa a a + Tdel T del KKPRTi ab ab+ a b Tdel ( ab a b) + ( a b) +! (4) When solving (4) to (4), the following PID controller parameters can be expressed by the unknown process parameters: K = K PR a a b + ab aa + a b + a b + Tdel Tdel + Tdel ( a ab a + b ) + ( a b) + 6 a b + aa + ab a bb + b + Tdel ( a b) + T del + Tdel ( a b) + Td( a b+ Tdel) (44) T i = a a b + ab aa + a b + a b + Tdel Tdel + Tdel ( a ab a + b ) + ( a b) + 6 T a ab a+ b+ Tdel a b + d + del ( ) T ( a b T ) del (45) 6

( ) T f a a, b b, T (46) d = 5 5 del Note that the explicit result for the derivative time constant is not given. The reason is that expression (46) would otherwise fill up several pages of this thesis. In order for the method to be applied, the real process must be approximated by the transfer function (), which requires an explicit identification of the parameters K PR, a, a, a, a 4, a 5, b, b, b, b 4, b 5, and T del. Note that the identified model of the process must be of the same or a higher order than the real process so as to avoid a modelling error which could appear due to the insufficient order of the model. Therefore, calculation of the PID controller parameters (based on expressions (44) to (46)) is frequently impossible in practice. The main benefit of the proposed new tuning method is, however, to avoid this explicit identification by using the concept of multiple integration (Isermann, 97; Rake, 987; Strejc, 959; Vrančić and Juričić, 995). Following Strejc, (959), and considering (), the following five areas can be expressed by integrating the process open-loop step response (y), after applying the stepchange U at the process input: ( ) A = y ( ) = K a b + T (47) PR del A T del = y( ) = KPR b a Tdelb + + A a (48) T b T del del A = y( ) = KPR a b + Tdelb + + Aa A a (49)! A 4 Tdel b b4 a4 Tdelb + PR 4 + Aa Aa + Tdel b Tdel = y4( ) = K A a (5) +! 4! where T b del a5 b5 + Tdelb4 + A 5 = y5( ) = K PR 4 5 + A4a Aa + Aa A a4, (5) Tdel b Tdel b Tdel + +! 4! 5! 7

() y t t = KPR ( τ ) y U d τ, (5) t ( ) () = () y t A y τ dτ, (5) t ( ) () = () y t A y τ dτ, (54) t ( ) () = ( ) y4 t A y τ dτ, (55) t ( ) () = () y5 t A4 y4 τ dτ. (56) In order to clarify the mathematical derivation, graphic representations of the first two areas (A and A ) are shown in Figures 77 and 78. K PR A t Fig. 77. The graphic representation of area A 8

A A y (t) t Fig. 78. The graphic representation of area A When inserting the calculated areas (47) to (5), obtained from the process open-loop step response, see e.g. Vrančić (995b), Isermann (97) or Rake (987), into equations (44) to (46), the following result is obtained: K = A ( AA AK TA ) PR d (57) T i = A A T A d (58) T d = AA AA AA AA 4 5 5 (59) Let us define factor α D as: α D = α A T d K A PR, (6) where 9

AA α=. (6) K A PR When applying (6) to (57) and (58), the proportional gain (K), and the integral time constant (T i ) can be rewritten into: 5. K = KPR α D (6) T i = K PR A ( + α ) D (6) This form is more appropriate in cases when modifying some of the controller parameters, as will be shown later. Note that the PI controller parameters can be expressed from (6) and (6) by applying T d = in (6). Now obviously only the process steady-state gain K PR, and five areas A to A 5 are needed to calculate the unknown PID controller parameters K, T i, and T d, by using expressions (59) to (6). As can be seen from equations (47) to (55), the areas can be calculated from the process open-loop step response by a simple numerical integration, whilst the gain K PR can be determined from the steady-state value of the process step response in the usual way. The PID controller tuning procedure can therefore proceed as follows: measure the process step response, find the process steady-state gain K PR and areas A, to A 5 (by using numerical integration (summation) from the start to the end of the process step response), and calculate the PID controller parameters by using expressions (59) to (6). The main point is, however, that the PID controller parameters can be calculated exactly (according to the MO criterion) for a wide spectrum of process models (), merely by measuring the process open-loop step response. Let us now illustrate the proposed PID controller design in one example. The following eight-order process model is chosen:

GP( s)= ( + s) 8. (64) At first, a step-change U= is applied to the process input. The process open-loop step response is shown in Fig. 79 above. The final steady-state of the process is y( )=, so the process steady-state gain K PR =y( )/ U=. A function y (t) is obtained by numerically integrating the difference K PR -y(t)/ U, as given by (47) and (5). The function y (t) is shown in Fig. 79 below. The final steady-state y ( )=8, which corresponds to area A. Similarly, area A can be obtained by numerically integrating the difference between A =y ( ) and y (t), as given by (48) and (5). Function y (t) is given in Fig. 8 above. The final steady-state value of y (t) corresponds to A (A =y ( )=6). Similarly, as for y (t) and y (t) (A and A ), the remaining functions (y to y 5 ) and areas (A to A 5 ) can be calculated. Functions y (t) to y 5 (t) are shown in Figs. 8 and 8. Process step response (y).8.6.4. 5 5 5 8 First integral function (y) 6 4 5 5 5 Fig. 79. Process step response (y) (above) and function y (t) (below) The following values of the process steady-state gain and the areas are obtained from the process step-response: KPR =, A= 8, A = 6, A=, A4 =, A5= 79. (65)

4 Second integral function (y) 5 5 5 5 Third integral function (y) 5 5 5 5 Fig. 8. Function y (t) (above) and function y (t) (below) 4 Fourth integral function (y4) 5 5 5 8 Fifth integral function (y5) 6 4 5 5 5 Fig. 8. Function y 4 (t) (above) and function y 5 (t) (below) The optimal PID parameters are calculated from (65) by using expressions (59) to (6):

K =. 75, T = 4. 8s, T =. 75s. (66) i d Figs. 8 and 8 show the closed-loop time responses on the reference change (w= at t=s), and on the load-disturbance (d= at t=5s). It is clear that both closed-loop responses are quite acceptable, all according to the chosen tuning goal. The Nyquist curve of the open-loop frequency response G C (jω)g PR (jω) is shown in Fig. 84. It is clear that the Nyquist curve closely follows the vertical line with the real value -.5 at lower frequencies, as prescribed by the MO tuning. Fig. 85 shows the closed-loop frequency response. The closed-loop magnitude equals one at lower frequencies, all according to MO..8.6.4..8.6.4. 4 5 6 7 8 9 Fig. 8. Process output (y) during the closed-loop experiment

9 8 7 6 5 4-4 5 6 7 8 9 Fig. 8. Process input (u) during the closed-loop experiment 4 Im - - - -4-4 - - - 4 Re Fig. 84. Nyquist curve of the open-loop frequency response 4

Closed-loop amplitude characteristics - - - - - - Frequency [rad/s] Closed-loop phase characteristics [deg] -5 - - - - Frequency [rad/s] Fig. 85. Bode closed-loop frequency response 5

6

7. Some considerations and practical modifications of tuning approach 7. Influence of a derivative filter time constant on PID controller settings The calculation of the PID controller parameters set out in the previous chapter holds for the ideal PID controller without a derivative filter (T f =). Let us now investigate a case where a derivative term filter is present, so as to fix the ratio between the derivative and the filter time constant: T f =δ T (67) d Expression (6) therefore becomes 7

c = Ti c = T a + T i[ δ d] [ δ d] [ δ d] [ δ d] [ δ d] c = T a + a T i c = T a + a T i c = T a + a T 4 i 4 c5 = Ti a5 + a4 T d = KKPR d = KK b + T + T PR[ i δ d ] ( δ ) ( δ) ( δ ) ( δ) ( δ ) + btt d i( + δ ) ( δ ) ( δ) [ ] [ ] [ ] [ ] d = KK b + b T + T + T T + PR i d d i d = KK b + b T + T + bt T + PR i d d i d = KK b + b T + T 4 PR 4 i d d = KK b + b T + T + b T T + 5 PR 5 4 i d d i (68) Note that in expression (68) the process time delay is fixed to T del = in order to simplify the mathematical derivation. However, the final result (69) does not depend on the time delay (T del ). Following similar derivations as for the ideal derivative term, the following expressions are derived: ( 5 ) ( 5 ) 4 d d d d T δ A + T δ A A T δ A A A + T A A + A + A A A A = (69) 5 4 T = i A A T A T d d δ (7) Ti K = (7) ( A T) i It is clear that when applying δ= to expressions (69) to (7), the resulting PID controller parameters are the same as those obtained by using expressions (59) to (6). Generally, by using more terms in expression (69), a more accurate result can be obtained when applying δ>. Expression (69) is of the fourth order and T d can still be solved analytically, but the calculation is quite involved. However, in usual applications, when using small ratio δ (e.g. δ.), the difference between the calculated T d from (59) and (69) is relatively small. When using greater values of δ, the derivative time constant T d can usually be quite accurately calculated by using only the last three terms in expression (69): 8

d ( 5 ) d( 5 ) T δ A A A + T A A + A + A A A A = (7) 5 4 The analytical solution of (7) can be expressed in the following way: T d, ( A A5A) ( A A5A) 4δ ( AA A5)( A5A A4A) = + δ ( AA A) 5 (7) Let us provide an example by using the following third-order process: G = PR + s (74) ( ) The steady-state gain for the process (74) is K PR =. The areas A to A 5 can be calculated from expression (47) to (5): A =, A =6, A =, A 4 =5, A 5 =. The PID controller parameters, when using the ideal derivative term (δ=), are calculated from (59), (6), (6), and (6): K =., T = 47. s, T = 65. s (75) i d Let us now calculate the PID controller parameters for the situation where the filter time constant is fixed to T f =.T d (δ=.), by using expressions (69) to (7): K = 7., T = 4. s, T = 6. s (76) i d By using the approximate expression (7), and expressions (7), and (7), the following PID controller parameters are obtained: K = 8., T = 4. s, T = 6. s (77) i d It is clear that the difference between the calculated PID controller parameters in (75), (76) and (77) is relatively small. The closed-loop responses, when using process (74), and controllers (75), (76), and (77), are given in Fig. 86. It is clear that only 9

slight differences exist between the closed-loop responses. Note that all three closedloop responses were obtained by fixing the filter time constant to T f =. T d. However, the difference becomes more obvious when ratio δ is increased. When fixing the ratio δ= for the same process (74), the following PID controller parameters are obtained from (69) to (7): K =., T = 7. s, T = 4. s (78) i d.5.5 5 5 5 5 4 Fig. 86. Closed-loop process output response on the reference change and load disturbance (at t=s, d= (see Fig. 74) is added to the process input) @ T f =. T d (δ=.); controller parameters calculated by using the fourth-order expression (69), and the approximate expression (7), -- controller parameters calculated from basic expression for T d (59) When using the approximate formula for T d (7), the following parameters are obtained: K = 46., T =. s, T = 44. s (79) i d

Here, the difference between (75), (78), and (79) is more obvious. The difference between the closed-loop responses is shown in Fig. 87. Note that all three process responses were obtained by fixing the filter time constant to T f =T d. Therefore, it can be concluded that when using small values for the ratio δ=t f /T d (e.g. δ=. or less), expressions (59) to (6) generally give a very good approximation for the PID controller parameters. However, the exact value of the derivative time constant is obtained by solving the fourth-order expression (69) when δ. In all of the following examples, expressions (59) to (6) are used for calculating the PID controller parameters, and the filter time constant is fixed to T f =T d / (δ=.) unless otherwise stated..5.5 5 5 5 5 4 Fig. 87. Closed-loop process output response on the reference change and load disturbance (at t=s, d= (see Fig. 74) is added to the process input) @ T f =T d (δ=); controller parameters calculated by using the fourth-order expression (69), -- controller parameters calculated from approximate expression (7), -.- controller parameters calculated from basic expression for T d (59)

7. modified tuning procedure for PID controllers using three areas In practice, it is relatively difficult to obtain five multiple integrations from the step response without making a significant error. Such an error can occur due to load disturbances, process non-linearities and process noise if the integration time is too long. It is recognised (Rake, 987) that as the subsequent integration is prone to errors, only low-order models can be obtained by this method. It is advised that the method should only be used for the identification of systems up to the third order (Isermann, 97). If the process model has poles and zeros (without time delay), this implies that 5 subsequent integrations are required in order to explicitly identify the process parameters. Moreover, in our case the calculated areas are not used for the explicit identification of the process parameters, but for the calculation of the controller parameters. Therefore, moderate measurement errors are generally allowed. However, in our experience, five integrations can only be successfully obtained without making significant errors from relatively undisturbed processes. Three subsequent integrations are much more likely to be successfully obtained in practice. The tuning algorithm for the PI controller, based on the calculation of three integrals (A to A ), was testeded to the process noise and non-linearity (Vrančić, 995b). The closed-loop time responses showed quite acceptable results. Therefore, a tuning procedure for the PID controller will be given which will require the calculation of only three areas (A to A ) and the process steady-state gain K PR. The areas A 4 and A 5 are explicitly used only in the calculation of the derivative time constant (59). So, an alternative way of calculating T d will be given which does not require parameters A 4 and A 5. To this end, the ratio ρ=t d /T i is fixed to a reasonable value, e.g. ρ=. to.5 (Vrančić et al., 997c). Although such a concept is not optimal in the sense of MO, it does usually give quite reasonable tuning results. In such a case, using expressions (6) and (6), the integral time constant can be expressed as: T i = A A 4ρA A ρa, (8) where T d =ρt i. The controller gain can be re-calculated from (6) and (6) as K = 5. A K T i PR. (8)

The PID controller tuning procedure can therefore proceed as follows: measure a process step response; find a process steady-state gain K PR and areas A, A, and A (by numerical integration (summation) from the start to the end of response) or even areas A 4 and A 5, if the process is relatively undisturbed and mostly linear; and calculate PI controller parameters K and T i (6), (6), and (6) by fixing T d = or PID controller parameters by fixing the ratio ρ=t d /T i. The ratio ρ=. to.5 usually results in quite a reasonable tuning. However, the optimal T d is explicitly given by (59) if A 4 and A 5 can be successfully obtained. An illustrative example can be found in Chapter 8. 7. modified tuning procedure for -degrees-offreedom PI controllers It is frequently claimed that a drawback of the MO tuning approach is that the process poles are cancelled by the controller zeros. This may lead to poor attenuation of load disturbances if the cancelled poles are excited by disturbances, and if they are slow compared to the dominant closed-loop poles (Åström and Hägglund, 995a). However, the MO controller design given in Åström and Hägglund (995a, page 66) is based on the second-order closed-loop transfer function. In our design procedure, the closed-loop transfer function is of the higher order (according to the process () plus controller () order), and our results therefore differ from those obtained by Åström and Hägglund (995a), and Umland and Safiuddin (99). However, poorer disturbance rejection can be observed for dominantly first-order processes when using the PI controller, and dominantly first and second-order processes when using the PID controller. In such cases, disturbance rejection can be significantly improved by using a two-degrees-of-freedom PI (PID) controller (e.g. the generalised PID controller). Here, the controller parameters have to be recalculated according to the changed structure of the controller. Let us derive the controller parameters for the simple two-degrees-of-freedom PI controller shown in Fig. 88 (see e.g. Åström et al., 99; Åström and Hägglund, 995b; Hang et al., 99; Hang and Cao, 99).

Fig. 88. A two-degrees-of-freedom PI controller. In order to satisfy the magnitude optimum (MO) criterion, the closed-loop magnitude frequency-response should be as flat and as close to unity as possible for a large bandwidth, as shown by the solid line in Fig. 75. The system closed-loop transfer function is the following: G CL ( s) ( ) ( ) Ys = = Ws ( ) ( + β i) ( ) ( ) G s K s T P st + G s K + st i P i, (8) where G P (s) denotes the process transfer function (). The corresponding open-loop transfer function (G OL ) can be derived from the following expression: G CL ( s) ( s) ( s) GOL = (8) + G OL The open-loop transfer function can be expressed by solving (8) and (8): G OL ( s) = ( ) ( + β i) ( )( β) G s K s T P st + G s skt i P i (84) By using the same method as for the one-degree-of-freedom PID controller (note that for the PI controller, only expressions (8), and (9) are to be satisfied), the following expressions are derived: 4

( )( PR PR ) ( PR ) K β K A + A K AA + K K A AA + A = (85) T i = K PR A KK PR + + K ( β ) (86) From (85), the controller proportional gain K can be expressed in the following way: K = ( AA KPR A) ( KPR A AA ) ( β ) A ( KPR A + A KPR AA ) ( β )( KPR A + A KPR AA ), (87a) if K PR A -A A <, and K = ( AA KPR A) + ( KPR A AA ) ( β ) A ( KPR A + A KPR AA ) ( β )( KPR A + A KPR AA ), (87b) if K PR A -A A >. In cases when β=, or K PR A +A -K PR A A =, the proportional gain can be calculated from (85) as: K = A ( AA K A) PR (88) Note that expression (88) is the same as expression (6), when using the PI controller (T d =). Two examples were made in order to depict the above results. The first example was made with the following dominantly first-order process (the second process time constant is much shorter than the main time constant): G ( s) P = ( + s)( +. s) (89) 5

The following values of the process steady state gain and areas are calculated: K PR =, A =., A =., A =.. The value of expression A +A -A A =, so the controller gain is calculated by using expression (88). The integral time constant is given by expression (86). Controller parameters were calculated for different values of parameter β: β K T i [s] 5.5.9.8 5.5.5478.5 5.5.676 5.5.5 The closed-loop responses, when using all four of the PI controllers given above with different parameter β, are shown in Fig. 89. It is clear that disturbance rejection is significantly improved by using smaller values of β down to β=.5. Further decreasing of factor β does not improve significantly the disturbance rejection, but rather degrades the tracking performance...8.6.4. 4 5 6 Fig. 89. Process (89) closed-loop responses when using different PI controller parameters and factors β; β=, -- β=.8, β=.5, -.- β=. 6

The other example was made by using the fifth-order process: G ( s) P = ( + s) 5 (9) The following values of the process steady state gain and areas are calculated: K PR =, A =5, A =5, A =5. This time the value of A +A -A A, so the controller gain is calculated from expression (87) (except for β=). As in the previous case, the PI controller parameters were calculated for the same values of parameter β: β K T i [s].48..8.447.5.5.457.67.465.7 The closed-loop responses when using all four PI controllers with different parameter β are shown in Fig. 9. It is clear that the responses are almost identical. However, the decreased value of parameter β does not improve disturbance rejection significantly, whilst still degrading the tracking performance. From our experience, based on numerous simulations on different process transfer functions and a real-time implementation of the algorithm to the plastic extruder machine, the most appropriate range of parameter β for achieving good tracking performance and disturbance rejection is: β = 5. 8. (9) 7

.8.6.4..8.6.4. 4 5 6 7 8 Fig. 9. Process (9) closed-loop responses when using different PI controller parameters and factors β; β=, -- β=.8, β=.5, -.- β=. 7.4 Improving some certain tuning rules by using the new tuning approach This new tuning method is also suitable for improving the response of certain classical tuning rules (e.g. Ziegler-Nichols, Cohen-Coon, Chien-Hrones-Reswick, etc.). For example, the proportional gain of the PI controller can be obtained by using the Ziegler- Nichols (or any other) settings, whilst the integral time constant can be recalculated from expressions (6) and (6). As an example, we use the process G P (s) with T= (see Appendix E). The Ziegler- Nichols tuning rules give the following PI parameters: K=.9 and T i =.. The integral term time constant can be recalculated using the new tuning approach. At first, factor α D is calculated from (6): α D =.5/(K K PR )=.555. The integral time constant T i is then calculated from (6): T i =s/.555=.9s. The tuning results, when using the original Ziegler-Nichols tuning rules and the recalculated parameter T i, are shown in Fig. 9. It is obvious that the recalculated PI controller gives better closed-loop performance. Note that only area A is used in the recalculation of parameter T i. Such an approach can also be used for highly disturbed processes. 8

.8.6.4..8.6.4. 4 5 6 Fig. 9. The process response to the reference change and load disturbance (d= @ t=s); K=.9, T i =.9 (recalculated T i ); -- K=.9, T i =. (Ziegler-Nichols) 7.5 Process noise and non-linearity High-frequency process noise does not usually cause significant errors in calculating areas. However, if the noise is quite distinctive and the integration time is too long, fairly large errors can be obtained, as reported in (Vrančić, 995b). The proposed scheme, by which the time of experiment is divided into the integration period and a determination of the process gain period, is given in Fig. 9. Such an approach can significantly improve the accuracy of the calculated areas (an example can be found in Vrančić, (995b)). The new tuning algorithm was also tested on non-linear processes. It was shown that tuning results obtained by using the PI controller are relatively robust to the process non-linearities (Vrančić, 995b). However, the higher the process noise, disturbances, and non-linearities, the less reliable is the information that can be obtained from the process step response. 9

Fig. 9. The proposed approach divides the experimental period into two periods in order to improve the accuracy of the measured areas 7.6 Stability considerations In spite of the considerably large set of tested process models (see Appendix E), the stability of the obtained PI or PID controller is not a priori guaranteed. A necessary stability condition is given by Hanus, (975): KPRK T i >. (9) Inequality (9) is a sufficient condition when using the controller which places all the zeros of the function Re{G P (jω)g C (jω)}+/ toward ω= (Hanus, 975). This can be achieved by using the controller with an appropriately high degree. By using the PI controller, only four zeros can be moved toward ω=. The PID controller can increase the number of zeros by two, but this is still not a sufficient condition for the closed-loop stability when using higher-order processes. In fact, the necessary condition is sometimes violated when using the PI (PID) controller on the processes with strong zeros or complex poles placed close to the imaginary axis. 4

Indeed, in such cases factors α or α D can be - α (- α D ). From (6) and (6), it can be seen that -<α D < violates expression (9), if A >. A typical example can be the following process: GP () s = + s ( + s)( +. s). (9) The calculated factor is α=-.449 (α D =-.476). This results in an unstable closed-loop system. The open-loop Nyquist curve when using the calculated PI and PID controller (PI: K=-.4, T i =.996s; PID: K=-.5, T i =.s, T d =.95s) for the process (9) is shown in Fig. 9. It is obvious that the Nyquist curve follows the prescribed vertical line with the real value -.5, as required by the MO criterion. However, both Nyquist curves start on the wrong side (from +j ) and the system is therefore unstable. Sometimes, stability can be achieved simply by choosing a positive factor α (e.g. by inverting its sign) and recalculating the controller parameters. As an example, we can choose α=., and α D =. for the process (9). The modified derivative term time constant can be calculated from (6) as: T d = A ( α α ) A D, (94) whilst the other two parameters of the PID controller can be calculated directly from (6) and (6) (K=5, T i =s, T d =.48s). Note that the PI controller parameters can be calculated from (6) and (6) by substituting α D =α (K=.5, T i =.97s). The open-loop Nyquist curves when using the modified PI and PID controller parameters are shown in Fig. 94. It is clear that the closed-loop system is now stable. This is also confirmed by the process closed-loop time responses as shown in Fig. 95. However, such a technique does not work in all cases (Vrančić, 995b). Therefore, we will pay more attention to such cases in our further research. If α<- or α D <-, a stable PI (PID) controller is obtained with unstable zero (see Vrančić, (995)). 4

.5.5 Im.5.5.5.5.5.5 Re Fig. 9. The open-loop Nyquist curve when using: the PID controller, -- the PI controller 5 4 Im 4 5.5.5.5.5 Re Fig. 94. The open-loop Nyquist curve when using the modified controller parameters for: the PID controller, -- the PI controller 4

.4..8.6.4. 5 5 5 Fig. 95. The process closed-loop time response when using the modified controller parameters for: the PID controller, -- the PI controller 4

44

8. Simulation examples A simulation experiment was performed to depict the above results in more detail, during which tracking and control performances were tested. The following third-order system was chosen: G P () s = ( + s). (95) From the process step response, the following parameters were detected: KPR =, A=, A = 6, A=, A4 = 5, A5=. (96) The PI controller parameters were calculated from (6), (6), and (6): K=. 65, = 667.. (97) T i In order to speed-up the closed-loop performance, the PID controller was used. The optimal T d was calculated from (59), and the corresponding PID controller parameters were: K=., T =. 467, T =. 649 (98) i d 45

The PID controller parameters, when applying the modified tuning procedure which uses only three areas (see Chapter 7.), were also calculated by fixing the following ratios: ρ=t d /T i =.,.5 and.9 (see expressions (8) and (8)). The calculated PID controller parameters were: ρ K T i T d..9..4.5.87.67.59.9 7.77.89.87 The process closed-loop responses are shown in Fig. 96. It is clear that the process closed-loop response on the reference change and on disturbance when using the PID controller (98) is quite faster than the response given when using the PI controller (97) (see upper figure). From the lower figure, it can be seen that the process response, when using the PID controller with ρ=.9, results in quite a higher overshoot than when using all the other controllers. An additional slight increase of ρ would result in a negative K and in an unstable closed-loop response. In general, the proportional gain K increases upon increasing factor ρ. By testing several process transfer functions and laboratory plants, it was found that ratio ρ=. is a relatively safe choice. The new tuning method was also compared to the Ziegler-Nichols (ZN), Cohen-Coon (CC) and Chien-Hrones-Reswick (CHR) step-response tuning methods (Åström and Hägglund, 995b; Haalman, 966; Hang et al, 99; Šega, 99; Zupančič, 996). In comparison to these methods, the new method gives time responses with a very small overshoot, without oscillations, and with a better or comparable settling time for a large set of processes (see Appendix E) (Vrančić et al., 995a), all of which is in accordance with the chosen tuning criterion (MO). In order to illustrate the tuning results, a comparison of time responses obtained by the mentioned methods for three of the tested processes is given. The chosen processes are G P with T= (process a), G P5 with n=5 (process b), and G P7 with T= (process c) (see Appendix E). The calculated controller parameters for all four tuning methods, for PI and PID controller (optimal T d ), are shown in Tables. and.. In order to test the behaviour of the closed-loop system, a unity step change in reference at the beginning of the experiment and a unity step load disturbance at the process input in the middle of the experiment were chosen. For tracking with a % overshoot. 46

Process output (y); PID, -- PI.5.5 5 5 5.5 Process output (y); PID (Td=.Ti), -- PID (Td=.5Ti), -.- PID (Td=.9Ti).5 5 5 5 Fig. 96. The closed-loop process time responses (y) when using the PI (--) and the PID ( ) controller(upper figure), and three different PID controllers obtained by fixing the ratios ρ=t d /T i =. ( ),.5 (--), and.9 (-.-) (lower figure). Load disturbance d= appears @ t=5s. The results, obtained by simulation using a MATLAB-SIMULINK programme package, are shown in Figs. 97 and 98. Note that the CC settings gave an unstable closed-loop response for processes b and c (for PI and PID controllers), the CHR settings gave an unstable closed-loop response for process c (for PI and PID controllers), and ZN settings gave an unstable response for process c for PID controllers, and are therefore not shown. Table.. Calculated PI controller parameters. Process New tuning method ZN CC CHR K T i K T i K T i K T i a.57.67.9..98.8.6. b.47..9 6.9.8.8.46 5. c.88.95.94 5.44.77..9.8 47

Table.a. Calculated PID controller parameters. Process New tuning method ZN K T i T d K T i T d a..4.6..5 b.8.4.95.9 4..5 c.6.6.7.6 9.6.4 Table.b. Calculated PID controller parameters. Process CC CHR K T i T d K T i T d a.58.8..95.5.47 b.5 4.44.7. 6.9.99 c.54 5.58.9.5.6. a. First order process with delay 5 5 5 b. Fifth order process 4 5 6 7 8 c. Non-minimum phase process 4-4 6 8 4 6 8 Fig. 97. Process output (y) closed-loop responses for test processes when using PI controller; new tuning method, -- ZN,... CC, -.- CHR, 48

a. First order process with delay 5 5 5 b. Fifth order process 4 5 6 7 8 c. Non-minimum phase process - -4 4 6 8 4 6 8 Fig. 98. Process output (y) closed-loop responses for test processes when using PID controller; new tuning method, -- ZN,... CC, -.- CHR, 49

5

9. Experiments with realtime auto-tuning algorithm 9. Description of the auto-tuning algorithm The auto-tuning algorithm, made in the Pascal programme language, using programme unit CONTROL (Vrančić et al., 99c), has been built up to show the advantages of using the proposed tuning method in the auto-tuning controllers (Đapić, 997; Vrančić et al., 997b). The block scheme of the auto-tuning algorithm is given in Fig. 99. 9.. Inserting parameters At first, the algorithm requires some parameters for proper initialisation: sampling time (T S ), amplitude of the step-change at the process input ( U), maximum allowable open-loop proportional gain K*K PR (K max ), so as to reduce the transfer of the quantisation noise from the A/D converter to the output of the derivative term, and approximate process main time constant (T main ). 5

The last parameter (T main ) does not have to be accurate. It is generally enough to estimate the range of the value (e.g. s, s, s...). Fig. 99. Block diagram of the auto-tuning algorithm 9.. Manually driving the process into the steady-state After inserting the parameters, the algorithm switches into the manual mode and the process has to be driven to the desired steady-state. When the process output settles, we can start the next stage of the algorithm, at which the open-loop step-response is performed. 9.. Performing the open-loop step response At first, a standard deviation (σ ) and a mean value ( y ) of the process output signal is measured by using the recursive algorithms, during the period <t t =T main /4 (see Fig. 5

and a block-diagram in Fig. ). Then, at t=t =T main /4, a step-change U is applied to the process input. After t=t, five integrals of yt ( ) y are calculated recursively, where y(t) denotes the process open-loop step response. Time instants t to t n are changed in the following way: Tmain t t T t = i + ; i < i+ 4 5. t ; t T main i i main. (99) Fig.. Process output during the open-loop and the closed-loop experiments performed by the auto-tuning algorithm In time intervals t i- t t i (i=...n), the process deviation σ i, and the process mean value y i are recursively calculated. The multiple integrations of the process step response are also recursively calculated from t=t and are terminated at t=t n-, when the standard deviation becomes σ n- σ or when σ n- σ max /4, where σ max = max σk k= l n. () The steady-state gain of the process is calculated at t=t n in the following way: 5

K PR = yn y U, () At the same instant, the areas A to A 5 are calculated: I A = KPR( tn t) U, () ( ) A = A t t K n PR ( ) tn t I + U, () ( ) ( ) A A ( t t ) A t t n tn t I = n + KPR 6 U, (4) ( ) ( ) ( ) A A ( t t ) A t t A t t n n tn t I4 4 = n + KPR + 6 4 U, (5) 4 ( ) ( ) ( ) A A ( t t ) A t t A t t A t t n n n 5 = 4 n + 6 4 5 ( tn t) I5 + K PR U 4 +, (6) where I to I 5 are recursively calculated multiple integrations of the process step response: t n I = y ( τ) d τ, (7) t t n I = τ y( τ) dτ dτ, (8) t t 54

t n I = τ τ y( τ) dτ dτ dτ t t t, (9) t n 4 I4 = τ τ τ y d d d d 4 t ( τ ) τ τ τ τ t t t, () t n 5 4 I5 = y d d d d τ τ τ τ 4 d 5 t t ( τ ) τ τ τ τ τ t t t, () where the process step response y(t) is approximated by the linear function between two samples: () yk ( ) yt = + ( ) yk ( ) ( t t( k ) ) t( k ) < t t( k) yk T S ;, () as given in Fig.. After the process steady-state gain K PR and areas A to A 5 are obtained, the PI and the PID controller parameters are derived from expressions (59), (6), (6), (6), and (8), and (8) by fixing ρ=.. Note that the calculated proportional gain of the PI and PID controller for the dominantly first-order process or the proportional gain of the PID controller for dominantly second-order process can become very high or even infinite (K= ). In such a case, the open-loop gain is restricted to: K K K PR max, () where K max is a given user-defined parameter (see Chapter 9..). By solving expressions (6), and (), the factor α D can be recalculated: α D K = 5 ṁax. (4) 55

When applying (4) to (6) and (6), the remaining two PID parameters can be obtained. t= t =T main /4 σ i >σ max YES n=i+ NO σ max =σ i recursively calculate σ, t=t+t S NO YES YES TLD<σ max /4 NO TLD=σ max /4 t=t+t S calculate YES NO apply a step change ( U) to the process input i= σ max = TD=FALSE TLD=.5σ σ i >.5σ NO YES TD=TRUE calculation of A to A 5 from (.6) to (.) NO i=i+ t i- -t <T PROC YES NO NO σ i <TLD or YES TD=TRUE? calculation of the PI and the PID controller parameters from (.8), (.9), (.), and (.) t i =.5t i- t i =t i- +T main /4 YES t=t+t S calculate I to I 5, σ i, NO YES Fig.. Block-diagram of the auto-tuning algorithm whilst performing the open-loop step response. 56

Fig.. The continuous-time approximation of the process step-response between two discrete samples. In order to achieve an even more robust auto-tuning algorithm for the PID controllers, the proportional gain of the PID controller is additionally limited to four times the proportional gain of the PI controller. As factor α corresponds to the PI controller and α D corresponds to the PID controller (6), this limitation can be expressed in the following way: α α D 4. (5) 9..4 Performing closed-loop experiments After calculating areas A to A 5, the PI and the PID controller parameters (the calculation is very fast due to the recursive way of numerical integration), the algorithm switches into automatic mode (closed-loop). After switching to automatic mode, the reference step changes are applied (only for testing purposes), first by using the PI controller (using expressions (6) (T d =), (6) and (6)) from t n <t t n+, then by applying the PID controller obtained by fixing the ratio ρ=t d /T i =. (see (8) and (8)) from t n+ <t t n+, and then by using the PID controller using expressions (59), (6), (6), and (6) from t n+ <t t n+4. 57

Note that in practical realisation of the PID controllers, the implementation of the appropriate anti-windup protection is of high importance. In this auto-tuning algorithm, the conditioning technique is applied as an anti-windup protection (see part I of this thesis). 9. Real-time experiments on laboratory plants Four real-time experiments were performed on laboratory plants. The first experiment was made on a very simple model of the third-order process, comprised of resistors, capacitors, and the operational amplifiers (R-C chain) as given in Fig.. The process is very linear with almost no noise (in fact, only the quantisation noise of the A/D converter is present). Fig.. The R-C chain plant Fig. 4 shows the results of the real-time experiment on the R-C chain, when using the auto-tuning algorithm. After the process open-loop step response is obtained (from t=s to t=8s - see the step-change of the process input), the following values of the process gain, areas, and factors α and α D are obtained: The input filters of the Burr-Brown acquisition system are not shown in Fig., but it should be noted that they contribute additional dynamics to the system. 58