{"Affiliation":[{"label":"Affiliation","value":"Applied Science, Faculty of","attrs":{"lang":"en","ns":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","classmap":"vivo:EducationalProcess","property":"vivo:departmentOrSchool"},"iri":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","explain":"VIVO-ISF Ontology V1.6 Property; The department or school name within institution; Not intended to be an institution name."},{"label":"Affiliation","value":"Chemical and Biological Engineering, Department of","attrs":{"lang":"en","ns":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","classmap":"vivo:EducationalProcess","property":"vivo:departmentOrSchool"},"iri":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","explain":"VIVO-ISF Ontology V1.6 Property; The department or school name within institution; Not intended to be an institution name."}],"AggregatedSourceRepository":[{"label":"AggregatedSourceRepository","value":"DSpace","attrs":{"lang":"en","ns":"http:\/\/www.europeana.eu\/schemas\/edm\/dataProvider","classmap":"ore:Aggregation","property":"edm:dataProvider"},"iri":"http:\/\/www.europeana.eu\/schemas\/edm\/dataProvider","explain":"A Europeana Data Model Property; The name or identifier of the organization who contributes data indirectly to an aggregation service (e.g. Europeana)"}],"Campus":[{"label":"Campus","value":"UBCV","attrs":{"lang":"en","ns":"https:\/\/open.library.ubc.ca\/terms#degreeCampus","classmap":"oc:ThesisDescription","property":"oc:degreeCampus"},"iri":"https:\/\/open.library.ubc.ca\/terms#degreeCampus","explain":"UBC Open Collections Metadata Components; Local Field; Identifies the name of the campus from which the graduate completed their degree."}],"Creator":[{"label":"Creator","value":"Ye, Rebecca Yan","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/creator","classmap":"dpla:SourceResource","property":"dcterms:creator"},"iri":"http:\/\/purl.org\/dc\/terms\/creator","explain":"A Dublin Core Terms Property; An entity primarily responsible for making the resource.; Examples of a Contributor include a person, an organization, or a service."}],"DateAvailable":[{"label":"DateAvailable","value":"2009-04-30T17:09:33Z","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/issued","classmap":"edm:WebResource","property":"dcterms:issued"},"iri":"http:\/\/purl.org\/dc\/terms\/issued","explain":"A Dublin Core Terms Property; Date of formal issuance (e.g., publication) of the resource."}],"DateIssued":[{"label":"DateIssued","value":"1997","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/issued","classmap":"oc:SourceResource","property":"dcterms:issued"},"iri":"http:\/\/purl.org\/dc\/terms\/issued","explain":"A Dublin Core Terms Property; Date of formal issuance (e.g., publication) of the resource."}],"Degree":[{"label":"Degree","value":"Master of Applied Science - MASc","attrs":{"lang":"en","ns":"http:\/\/vivoweb.org\/ontology\/core#relatedDegree","classmap":"vivo:ThesisDegree","property":"vivo:relatedDegree"},"iri":"http:\/\/vivoweb.org\/ontology\/core#relatedDegree","explain":"VIVO-ISF Ontology V1.6 Property; The thesis degree; Extended Property specified by UBC, as per https:\/\/wiki.duraspace.org\/display\/VIVO\/Ontology+Editor%27s+Guide"}],"DegreeGrantor":[{"label":"DegreeGrantor","value":"University of British Columbia","attrs":{"lang":"en","ns":"https:\/\/open.library.ubc.ca\/terms#degreeGrantor","classmap":"oc:ThesisDescription","property":"oc:degreeGrantor"},"iri":"https:\/\/open.library.ubc.ca\/terms#degreeGrantor","explain":"UBC Open Collections Metadata Components; Local Field; Indicates the institution where thesis was granted."}],"Description":[{"label":"Description","value":"Performance assessment tools are very useful in providing information about the control\r\nloop performance. To maintain high process performance, effective methodologies to\r\nmeasure the actual performance of the control loops are urgently needed.. -Since the\r\nindustry normally has a fixed set-point for each loop, most of the control action is to\r\nreject disturbance, i.e. regulatory control.\r\nThe most popular performance index for regulatory control nowadays is the Harris\r\nindex due to it's simplicity of usage. The Harris index requires only routine operating\r\ndata and prior knowledge of the process delay. It compares the variance of the process\r\noutput with the benchmark of minimum variance. An application of the Harris index to\r\nPID controller tuning is discussed in this thesis.\r\nA new input\/output index (I\/O) is developed in this thesis. It requires more knowledge\r\nabout the process model than the Harris index, but provides more information\r\nabout the performance of a closed-loop system. The key feature of this \/\/0 index is that\r\nthe user can specify a benchmark which considers the balance between process output\r\nvariance and the controller output variance. However, in this case, the process model\r\nneeds to be identified so that the upper bound of the controller output variance and the\r\nlower bound of the process output variance can be obtained to set the benchmark for\r\nthorough performance assessment of the control system.\r\nIn industry, during closed-loop control, both controller output and process output\r\nvariances are desired to be as little as possible. Though Minimum Variance Control\r\n(MVC) may minimize the process output variance, it is not desirable in many cases due\r\nto excessive control action and sensitivity to changes in process dynamics. Therefore, balancing the process output and process input variances becomes very important. This\r\nnew performance index uses the upper bound of the controller output and lower bound of\r\nthe process output from MVC. In fact, it can indicate graphically the optimal operating\r\npoint for each loop. Hence, this I\/O index is more practical and reliable.\r\nAn extensive simulation study was performed to examine the operation, usefulness\r\nand limitations of the performance indices. These simulations confirm the benefit of\r\nusing the new I\/O index for assessing regulatory control.","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/description","classmap":"dpla:SourceResource","property":"dcterms:description"},"iri":"http:\/\/purl.org\/dc\/terms\/description","explain":"A Dublin Core Terms Property; An account of the resource.; Description may include but is not limited to: an abstract, a table of contents, a graphical representation, or a free-text account of the resource."}],"DigitalResourceOriginalRecord":[{"label":"DigitalResourceOriginalRecord","value":"https:\/\/circle.library.ubc.ca\/rest\/handle\/2429\/7759?expand=metadata","attrs":{"lang":"en","ns":"http:\/\/www.europeana.eu\/schemas\/edm\/aggregatedCHO","classmap":"ore:Aggregation","property":"edm:aggregatedCHO"},"iri":"http:\/\/www.europeana.eu\/schemas\/edm\/aggregatedCHO","explain":"A Europeana Data Model Property; The identifier of the source object, e.g. the Mona Lisa itself. This could be a full linked open date URI or an internal identifier"}],"Extent":[{"label":"Extent","value":"4354676 bytes","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/terms\/extent","classmap":"dpla:SourceResource","property":"dcterms:extent"},"iri":"http:\/\/purl.org\/dc\/terms\/extent","explain":"A Dublin Core Terms Property; The size or duration of the resource."}],"FileFormat":[{"label":"FileFormat","value":"application\/pdf","attrs":{"lang":"en","ns":"http:\/\/purl.org\/dc\/elements\/1.1\/format","classmap":"edm:WebResource","property":"dc:format"},"iri":"http:\/\/purl.org\/dc\/elements\/1.1\/format","explain":"A Dublin Core Elements Property; The file format, physical medium, or dimensions of the resource.; Examples of dimensions include size and duration. Recommended best practice is to use a controlled vocabulary such as the list of Internet Media Types [MIME]."}],"FullText":[{"label":"FullText","value":"P E R F O R M A N C E A S S E S S M E N T OF F E E D B A C K C O N T R O L L E R O U T P U T A N D PROCESS O U T P U T By Rebecca Yan Ye B. Sc., Zhejiang University, 1995 A THESIS S U B M I T T E D IN P A R T I A L F U L F I L L M E N T O F T H E R E Q U I R E M E N T S F O R T H E D E G R E E O F M A S T E R O F A P P L I E D S C I E N C E in T H E F A C U L T Y O F G R A D U A T E S T U D I E S C H E M I C A L & B I O - R E S O U R C E E N G I N E E R I N G We accept this thesis as conforming to the required standard T H E U N I V E R S I T Y O F BRITISH C O L U M B I A December 1997 \u00a9 Rebecca Yan Ye, 1997 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. \\ Department of ChmlClJl $ fb&uiro EwifofiiX^ The University of British Columbia \" \" Vancouver, Canada Date DE-6 (2\/88) A b s t r a c t Performance assessment tools are very useful in providing information about the control loop performance. To maintain high process performance, effective methodologies to measure the actual performance of the control loops are urgently needed.. -Since the industry normally has a fixed set-point for each loop, most of the control action is to reject disturbance, i.e. regulatory control. The most popular performance index for regulatory control nowadays is the Harris index due to it's simplicity of usage. The Harris index requires only routine operating data and prior knowledge of the process delay. It compares the variance of the process output with the benchmark of minimum variance. An application of the Harris index to PID controller tuning is discussed in this thesis. A new input\/output index (I\/O) is developed in this thesis. It requires more knowl-edge about the process model than the Harris index, but provides more information about the performance of a closed-loop system. The key feature of this \/\/0 index is that the user can specify a benchmark which considers the balance between process output variance and the controller output variance. However, in this case, the process model needs to be identified so that the upper bound of the controller output variance and the lower bound of the process output variance can be obtained to set the benchmark for thorough performance assessment of the control system. In industry, during closed-loop control, both controller output and process output variances are desired to be as little as possible. Though Minimum Variance Control (MVC) may minimize the process output variance, it is not desirable in many cases due to excessive control action and sensitivity to changes in process dynamics. Therefore, 111 balancing the process output and process input variances becomes very important. This new performance index uses the upper bound of the controller output and lower bound of the process output from M V C . In fact, it can indicate graphically the optimal operating point for each loop. Hence, this I\/O index is more practical and reliable. An extensive simulation study was performed to examine the operation, usefulness and limitations of the performance indices. These simulations confirm the benefit of using the new I\/O index for assessing regulatory control. i v Table of Contents Abstract ii List of Figures viii Acknowledgement x 1 Introduction 1 1.1 Background 1 1.2 Summary of Existing Performance Analysis Methods 2 1.3 Motivation 3 1.4 Objectives of the Thesis 5 1.5 Organization of the Thesis 5 1.6 Contributions 6 2 Literature Survey 7 2.1 Introduction 7 2.2 Servo Performance 7 2.3 Regulatory Performance 8 2.3.1 Performance Indices Based on Minimum Variance 9 2.3.2 Application of the Harris Index 10 2.3.3 Concluding Remarks 10 2.4 Other Approaches for Performance Assessment 11 2.4.1 LQ Performance Index 11 v 2.4.2 Applications of the LQ Performance Index 13 2.4.3 Concluding Remarks 13 2.5 Performance Monitoring System 14 2.6 Conclusion 15 3 Minimum Variance Performance Index 16 3.1 Introduction 16 3.2 Definition of the Harris Index 17 3.3 Estimation of Ideal Minimum Variance 21 3.4 Application to Tuning PID Controller Parameters 25 3.4.1 The Discrete Control system 25 3.4.2 Closed-Loop Identification 30 3.4.3 Estimation of Controller Parameters under M V C 35 3.4.4 MV(minimum variance) PID Controller 37 3.4.5 Examples 41 3.5 Limitations of the Harris Index 50 3.5.1 Non-Unique Controller Output for the Harris Index 51 3.5.2 Simulation Results 53 3.6 Conclusions 57 4 Performance Assessment Diagram 59 4.1 Introduction 59 4.2 Controller Output Upper Bound 60 4.2.1 Estimation of Controller Output Variance Under M V Control . . 60 4.2.2 Estimation of F(z~1) and the Variance of White Noise aWt . . . . 62 4.2.3 Example 65 4.3 Definition of the I\/O Index 69 vi 4.4 Conclusions 72 5 Demonstration of the I\/O Index 73 5.1 Introduction 73 5.2 Level Control System 73 5.2.1 Theoretical Model 74 5.2.2 Experimental Model 80 5.3 Demonstration Using Industrial Data 90 5.4 Conclusions 95 6 Conclusions and Recommendations 97 Appendix 100 A Computer Programs 100 Bibliography 117 vii List of Figures 3.1 Closed-loop dynamics under a non-minimum variance PID control . . . . 44 3.2 Closed-loop dynamics under M V PID control 45 3.3 Closed-loop dynamics under a non-minimum variance PID control . . . . 48 3.4 Closed-loop dynamics under M V PID control 49 3.5 Three-dimensional process output variance versus controller tuning pa-rameters 55 3.6 Variance contour for different tuning values 55 3.7 Closed-loop simulation model 56 3.8 Process output variance versus controller output variance in closed loop . 57 4.9 Closed-loop simulation model 65 4.10 Closed-loop dynamics under M V control 67 4.11 Closed-loop dynamics under a non-minimum variance PID control . . . . 68 4.12 I\/O index diagram 70 5.13 Liquid level automatical control system 74 5.14 Apparatus set up diagram for level control system 75 5.15 Notation for level control system 75 5.16 Calibration curve of control valve gain, Kv 77 5.17 Calibration curve of sensor\/transmitter gain, Km 78 5.18 Calibration curve of orifice resistance, R 79 5.19 Liquid level open loop dynamics 81 5.20 Level control system closed-loop dynamics under optimal PID control . . 84 viii 5.21 Level control system closed-loop dynamics under a non-minimum variance PI control 85 5.22 Level control system closed-loop dynamics under a non-minimum variance PI control 87 5.23 I\/O index diagram for level control system 88 5.24 Level control system closed-loop dynamics under a non-minimum variance PI control 89 5.25 Closed-loop operating data from coat weight control system 91 5.26 Block diagram 'of the coat weight closed-loop simulation under optimal PID control 93 5.27 Coat weight closed-loop dynamics under optimal PID control . . . . . . . 94 5.28 I\/O index diagram for coat weight control system 95 i x Acknowledgement I would like to express my deepest and sincere appreciation to Dr. Ezra Kwok for his guidance, support and encouragement throughout the course of this research. I also thank Professor-Michael S. Davies and Professor Guy A. Dumont for their assistance and input during this research. Thanks to Ms. Rita Penco for her assistance library and literature survey. I also thank the system manager, Dr. Brian D. McMillan, for his help with the computer I am very thankful for the financial support from NSERC and Weyerhaeuser Canada Ltd. Last but not least I would like to thank countless friends and colleagues at the pulp and paper center and chemical engineering for making the period I spent as a master student a pleasant time. Chapter 1 Introduction 1.1 Background In a typical process industry, there are hundreds to thousands of control loops. Every controller is expensive to implement, requiring hardware, software, and engineering ser-vices. It is not uncommon for controllers to perform poorly in process control loops. Some controllers cannot reach their design potential after implementation, some lose their effectiveness over time from a lack of maintenance. Other controllers, due to valve wear, fouling of the equipment, variation of the process dynamics and nature of the dis-turbance change, are no longer suitable for the new conditions. These factors lead to poor performance, resultingin an increase of energy consumption, waste raw materials and non-uniform end products. Poor performance is basically a maintenance problem. With limited manpower, con-trol audits are rarely performed routinely. Poor control performance is often reported subjectively. It is not usually detected until severe oscillations or process upsets occur. Hence, it is almost impossible to ensure that all loops are operating satisfactorily. It would be time consuming to investigate each loop individually without an easy and effi-cient assessment tool. Given the limited technical resources available to support control systems, the performance analysis\/diagnosis methodology must be reliable, computa-tionally simple, and readily interpretable. Recently, many performance assessment tools have been developed to detect poor performance, diagnose the underlying cause of this 1 Chapter 1. Introduction 2 abnormal behavior and take remedial actions. In particular, performance indices are practical and meaningful as performance analysis tools. A review of existing methods for assessing the performance is presented here. The most basic form for performance assessment includes observation of process operation, recording the control action and process output, and calculation of the performance index. Using performance analysis tools to improve process performance is very attractive and efficient, since it is easy to implement and only requires the-addition of software code programming to process the plant measurements. 1.2 Summary of Existing Performance Analysis Methods To be effective, a plant-wide control monitoring and performance assessment package should have the following properties (Harris et. a\/., 1997) [1]: i) automated background operation, ii) scheduled remote collection of control loop data, iii) theoretically sound, efficient, and automated computational procedures, iv) the ability to identify and report problems by exception with preliminary diagnosis, v) acceptable false alarm and detection rates, and vi) an intuitive user interface. Together, these properties form the basis of a powerful process control performance monitoring system. The topic discussed here focuses on property iii) above, i.e. the background theory and associated computational procedures required to obtain meaningful performance information from large amounts of measured data. A common way to quantify controller performance is by computing the variance in terms of deviation from the target. Minimum variance of the process output can be estimated from routine operating data when the time delay is known (Harris, 1989) [2]. In reality, it is rarely desirable to implement a minimum variance controller which is nevertheless an ideal benchmark as it gives the best control. To use the resources more Chapter 1. Introduction 3 efficiently, frequency domain and settling time performance characteristics, which might be considered at the design stage, are discussed in Astrom (1991) [3]. Many authors have introduced a number of performance indices to provide an in-dication of the departure of current performance from minimum variance control. As indicated in Desborough and Harris (1992) [4], it is more useful to replace the process output variance by the mean square error of yt which accounts for offset. The spectral interpretation for this normalized index has also been discussed in this paper. Harris et al. (1996b) [5] and Kozub (1996) [6] also utilize an extended horizon performance index which gives a proportion of the variance arising from non-zero impulse coefficients. The advantage of this extended horizon performance index is that it does not require a precise estimate of the process delay. Desborough and Harris (1993) [7] have developed a method that analyzes the variance procedure for feedforward\/feedback control schemes. Using this approach, it is possible to assess the effectiveness of the feedforward and feedback elements of the control schemes. This can yield considerable insight into factors affecting the dynamic behavior of the process. Huang, Shah and Kwok (1997) [8, 9] have developed a filtering and correlation based method - FCOR, to estimate the minimum variance and normalized Harris index for MIMO systems. A pre-whitening filter is used to obtain disturbance series. A cross-correlation function is then calculated, leading directly to the calculation of the perfor-mance index. 1.3 M o t i v a t i o n Among all previous research work which, most of the methods only analyze the process output performance, which minimize the process output variance without considering Chapter 1. Introduction 4 the controller output performance. Though Linear Quadratic Gaussian(LQG) control algorithm does take into account the controller output variance, it requires more prior knowledge of the process model. The Harris index is popularly used as the performance index for stochastic control nowadays. By investigating performances both for process input and output through simulation, it was found that only using the Harris index is not sufficient to describe the control loop performance. Essentially, the Harris index cannot indicate whether the control system is running optimally or not. Achieving the same Harris index may result in different control laws, i.e. the controller output may have different variances for the same process output variance. The larger value of the controller output variance is not at the optimal running point for process control. This is because the Harris index didn't take into account the controller output. Another drawback of the Harris index is that the relationship between this index and the controller parameters is not straightforward. A new performance index - I\/O index - is proposed here which provides more infor-mation about the performance of a feedback control system. It combines the performance measurements of the controller output and process output. By using a modified bench-mark from M V C (minimum variance control), it can be ensured that the control system is running optimally, which means consuming less controller energy, while obtaining de-sired process output variance. It also allows a user to specify a benchmark that considers the balance between the controller output variance and the process output variance for a specific control loop. The goal of using this performance index is to provide thorough information about a process during closed-loop operation. This information can be used to confirm if the process is operating as expected and also to highlight any changes in the process. In this index, more emphasis is put on balancing process input and process output variances. This is because the original Harris index only compares the actual output Chapter 1. Introduction 5 variance with the theoretical minimum variance. The reason that M V C cannot be widely used is that even though the output can reach minimum variance, the control action will probably be too aggressive to be implemented. In other words, the controller output magnitude will be too large when trying to eliminate the disturbance. Therefore, the process input will oscillate significantly to bring the output back to the setpoint. This type of controller behavior should be avoided. A trade-off between process input and output variance should be considered in performance assessment. The prior information required for this performance analysis method is the knowledge of the process model. Though this requirement is more than what the Harris index requires, it provides more information. Therefore, performance assessment through this new I\/O index can avoid the energy wastage and be more practical. The class of processes considered in this project is restricted to SISO, discrete-time, linear and time invariant systems. 1.4 Objectives of the Thesis The objective of this thesis is to provide process control engineers with a useful perfor-mance analysis tool. To be more specific, it is to define a new performance measure which takes into account both controller and process output. It also attempts to design a new performance measure which allows users to specify an achievable performance rather than ideal minimum variance by investigating the minimum variance that PID controllers can achieve. 1.5 Organization of the Thesis The outline of the thesis is as follows: In chapter 2, literature in the field of performance assessment is reviewed. It covers performance analysis tools for both servo control and Chapter 1. Introduction 6 regulatory control purposes. In chapter 3, a closed-loop performance assessment using the process output variance and time delay is discussed. Further research about the Harris index on its limitations and application to PID controller tuning is discussed, followed by a few examples. In chapter 4, a new I\/O index diagram is designed. It includes the estimation of the upper bound of the controller output variance and the definition of the I\/O index. Chapter 5 is about the demonstration of the I\/O index, using computer simulations as well as industrial data \/ Chapter 6 concludes and indicates the contributions of this thesis and outlines the future research directions. 1.6 Contributions The major contributions of this research are as follows: 1. Developed a tuning method for regulatory control which relates PID controller parameters to the achievable minimum variance for the process output. 2. Developed a new input\/output (I\/O) index that considers both the process output performance and the corresponding controller output performance of a closed-loop system. This index has the advantage of using the achievable minimum variance as a benchmark instead of the ideal one. It also shows the performance measurements graphically. The prior knowledge needs operating data from the control loop and model identification by switching between two different controllers in closed loop. 3. Demonstrated the new I\/O index by performing computer simulations and an experimental study of a-level control system. Chapter 2 Literature Survey 2.1 Introduction Controllers are implemented with many design objectives, including setpoint tracking, disturbance rejection, constraint handling, and surge attenuation. Assessing performance with contradictory and mismatched criteria degrades rather than improves performance. The performance of a control loop can be assessed as servo performance or regulatory performance, in terms of different control purposes. Servo performance indicates how well the controller is doing to keep the process output tracking the setpoint. On the other hand, regulatory performance indicates how well the controller can eliminate the disturbance. The discussion on performance assessment will be divided into the follow-ing two sections: servo performance and regulatory performance. Besides, performance monitoring systems as complete analyzing, detecting and alarming tools will be reviewed in this chapter later. 2.2 Servo Performance Regarding servo performance, there are several well-developed criteria to measure it, such as overshoot, rising time, settling time, etc (Kuo, 1982) [10]. Recently, Astrom (1990) [11] introduced some other criteria to measure the servo performance, such as bandwidth, peak error, maximum time and integral gain from the response to a unit-step process input. The paper considered problems where the process is described by 7 Chapter 2. Literature Survey 8 linearized models with actuators which saturate. Although the technique for the perfor-mance assessment is straightforward, it requires more information on process dynamics, disturbances and regulator complexity. Also in that paper it is limited to PID control algorithm. Zhuang and Atherton (1991) [12] introduced an integral performance criteria for optimal PID controller settings. The integral squared error criterion (ISE) has a disadvantage that its minimization often results in a relatively oscillatory step response because large errors occurring within a small time contribute significantly to the perfor-mance index. Therefore, the authors proposed the time moment weighted ISE criterion. The results clearly show that the proposed time moment weighted ISE provides a better tuning. Swanda and Seborg (1997) [13] developed a new performance index, the normalized settling time to characterize the performance of PID-type feedback control loops. The index is determined by normalizing the settling time of a setpoint by the apparent time delay of the process. The advantage of this index is that it is insensitive to model order and model type for a wide range of transfer function models. It can be used on-line to detect poorly performing control loops along with setpoint overshoot. 2.3 Regulatory Performance In reality, most of the control loops in industry are running at steady state, as such most of the performance assessment is considered only for regulatory control. The following performance assessment is restricted to regulatory performance. Control loop performance assessment here is a measure of performance of the control loop relative to some predefined benchmark standards. One of the first performance assessment application was reported by Astrom in 1967 [14]. One-step ahead prediction variance was used as a benchmark standard. This application though simple, had the Chapter 2. Literature Survey 9 disadvantage of impracticality on processes with a time delay. 2.3.1 Performance Indices Based on M i n i m u m Variance Astrom (1967, 1970) [14, 15] , Astrom and Wittenmark (1973) [16], Box and Jenkins (1976) [17], Harris (1989) [2] and Stanfelj et al. (1993) [18] have suggested the use of an autocorrelation function to calculate the loss function of the achievable optimal minimum variance, which can be the benchmark standard to measure the loop performance. The technique is quite elegant, that is because the autocorrelation function up to lag d \u2014 1 (where d is the process time delay) can be easily estimated. From the autocorrelation function figure, minimum variance or the achievable minimum variance can be obtained. Harris (1989) [2] formalized a performance index. Instead of using an autocorrelation function, he introduced a time series analysis to calculate the achievable minimum vari-ance. The feedback-invariant property of the minimum variance term can be used as the benchmark for assessing loop performance. After that, Desborough and Harris (1992) [4] modified the original performance index into the normalized performance index. This normalized performance index is a scalar between zero and one, with zero indicating that the process is operating under minimum variance control, i.e. at its optimal performance bound. Desborough and Harris (1993) [7] extended the application of the index to feedforward\/feedback control loops. In their work, a scheme was developed for analyzing linear dynamic MISO systems where there is no cross-correlation among the disturbances (i.e. process input disturbance and process output disturbance). The overall performance bound they developed, can be decomposed into the best possible bounds for each of the controllers viz. feedforward and feedback controllers. This accounts for the performance limitations imposed by the disturbances of the process. Kozub and Garcia (1993) [19] have reported a similar measure of the performance Chapter 2. Literature Survey 10 which they defined as Closed Loop Potential (CLP). Lynch and Dumont (1993) [20] also applied a similar idea to control loop performance monitoring. These research results were limited to SISO, linear and time invariant systems. For more sophisticated control systems, for example, non-linear, MIMO, and non-minimum phase, the original Harris index cannot assess the performance well. 2.3.2 Application of the Harris Index Recently, several researchers have extended Harris's performance assessment concept to make it more applicable. Tyler and Morari (1995) [21] have applied the idea to SISO unstable systems and systems with general non-invertible dynamics when the locations of the poles and zeros outside the unit circle are known. The extension of this idea has also been studied by Huang et al. (1995) [22]. It is a new approach on loop performance analysis of MIMO processes, based on Filtering and CORrelation (FCOR) analysis of the process output and filtered data. This algorithm is simple and efficient. However, it requires some prior knowledge or estimation of the time-delay or interactor matrix of the MIMO process. Isaksson (1996) [23] introduced a set of alternative indices which take into account the controller structure limitations (such as PI, PID, Dahlin etc.) and intended control task (such as stochastic control, servo control, regulatory-control). A drawback with this set of indices is that, as compared to the original Harris index which uses minimum variance control, they require an identified process model and knowledge of the current controller setting for calculating the index. 2.3.3 Concluding Remarks Essentially, all these developments of the performance index are based on the same theory, the index was basically defined to be the ratio: Chapter 2. Literature Survey 11 Variance of the error between the controlled variable and its target Minimum variance achievable This method does not require an external signal to perturb the closed-loop system, the process delay should be known and a time series model has to be fitted to closed-loop process data. Ideally, minimum variance control is the best possible control since no other controller is able to provide a lower variance than that. Although this performance index provides very valuable information on the lower bound of performance, minimum variance control is not desirable in practical situations. The reason is that a minimum variance controller demands excessive control action and the closed-loop has poor robustness. 2.4 Other Approaches for Performance Assessment In 1995, Tyler and Morari [24] presented an approach which expressed good performance as constraints on the impulse response coefficients. A generalized likelihood ratio test with suitable threshold was used to determine if the constraints were met. However, the drawback of using this approach requires the knowledge of the impulse response of the closed-loop transfer function from disturbance to the output. Furthermore, the impulse response coefficients depend not only on the plant and the controller, but also on the disturbance generator. 2.4.1 L Q Performance Index In general, strict quality specification resulting in smaller variation in the process output will require more control effort. This minimum variance benchmark doesn't explicitly take into account the control effort. Therefore, performance evaluation with control Chapter 2. Literature Survey 12 action constraints needs to be taken into account. Hence, LQ control becomes more and more popular in the research community. Kammer et al. (1996) [25] searched for similar performance measurement that could be extended to LQ control. In that paper, a test of optimality for linear quadratic control is presented. The advantage is that it does not require parametric model fitting for the process being controlled. However, it has to use external excitation. From this test, it is possible to determine the closed-loop-pole positions which would have be::\".', obtained by using the LQ optimal controller. The key point is to illustrate the feasibility of the method. Astrom and Wittenmark (1990) [26] explained how to find the weighting matrices in the LQ performance index. One way to decide the weights is to choose the diagonal elements as the inverse value of the square of the allowed deviations. Another way is to consider only penalties on the state variables and the constraints on the control deviations. Huang (1997) [8] in his thesis proposed the solution (achievable performance) for LQG benchmark performance assessment. A tradeoff curve was shown. By varying A, various optimal solutions of E[yf] and E[u2] can be calculated. Thus a curve with the optimal E[u2] as the abscissa and E[y2] as the ordinate is generated. This curve therefore represents the bound of the performance and can be used for performance assessment purpose. Stuckman and Stuckman (1993) [27] presented a method of determining the weighting matrices for the best optimal LQ control. The advantage of this technique is that it uses a design which is simultaneously optimal in the quadratic sense as well as in terms of a separate, more meaningful performance criterion developed by the designer. Chapter 2. Literature Survey 13 2.4.2 Applications of the LQ Performance Index Hagiwara et al. (1996) [28] proposed a new method to design a two-degree-of-freedom ro-bust servo system for step references and step disturbances. In this method, the tracking characteristics for step references are determined with respect to a quadratic-integral per-formance index, while the feedback characteristics for step disturbances are determined with respect to another quadratic performance index where the frequency-dependent weighting matrices are introduced. This method can reduce the sensitivity in the low frequency range without deteriorating the characteristics in the high frequency range. Lee and Wu (1993) [29] studied a time-weighted performance index for optimal dis-crete time linear time-invariant systems. The performance index consists of two parts. One is used to penalize the sustained error while the other one is used to improve the robustness of the closed-loop system. This method also ensures all closed-loop poles lie inside the region. Veillitte (1995) [30] introduced a procedure for the design of reliable LQ state-feedback control which guaranteed both stability and known quadratic performance bound, despite any outages within a selected subset of actuators. 2.4.3 Concluding Remarks LQ Performance Index gives a better assessment for closed-loop systems since it considers both the output and the input variations. However, the difficulties to compute LQ performance index are as follows: 1. It needs prior knowledge of the process model, while the Harris index only needs the disturbance dynamics and process delay. 2. In LQ performance index, the weight of the control input is not easy to choose. The initial control weighting is usually \"guessed\"and then the controller is implemented Chapter 2. Literature Survey 14 If the control action is too high, the control weighting needs to be increased and in turn the controller has to be redesigned. This procedure is repeated until proper control is achieved. 2.5 Performance Monitoring System For oscillation detection in the control loop, Hagglund (1994) [31] presented a procedure for automatic nidnitoring of control loop performance. The Control Loop Performance Monitor (CLPM) detects oscillations in the control loop. This C L P M is quite robust because the theory is based on monitoring the integrated absolute value of the control error (IAE) between successive zero crossings. The assumption for this method allows to detect any shape of oscillations - only the measured signal needs to deviate significantly from the set point for sufficient times during certain supervision period. In 1996, Owen et al. [32] developed a prototype on-line system for automatic detection and location of malfunctioning control loops. They extended the single variable analysis for loop performance to a multi-variable analysis which took into account the propagation of disturbances from the malfunctioning loop to other normal functioning loops. The authors claimed that the package required very little prior information and was able to detect the presence of upset conditions. Excess variation caused by non-linearities due to sensor or valve failures would also be taken into account in the calculation of the performance index. However, no detail was written in the literature because the package was considered proprietary. Harris et al. (1996) [33] reviewed SISO control performance assessment and detailed the development of an expert system that quantifies control loop performance on an on-going basis. It uses a normalize performance index to quantify the loop's performance. This expert system is an interface for users to acquire, examine and store process data. Chapter 2. Literature Survey 15 2.6 Conclusion The existing methods to assess\/measure the control loop performance have been briefly reviewed in this chapter. Some extensions of the performance analysis indices and per-formance monitoring systems have been reported. They allow better detection and iden-tification of poor performance, as well as diagnosis of malfunctioning in industrial control systems. Most of the performance measuring indices can be sorted into two categories: one for servo performance assessment and the other for regulatory performance assess-ment according to different control purposes. Care must be taken to select appropriate criteria for assessing individual controllers. This will guarantee that the benefits upon which the controller was initially justified will continue to be realized. Chapter 3 Minimum Variance Performance Index 3.1 Introduction Modern manufacturing facilities have many automatic control loops. It is nearly impos-sible to monitor the performance of more than a few of the most critical control loops without some formalized assessment tools. In order to identify the poorly performing control loop and be able to improve performance, it is necessary to correctly diagnose the underlying problem. The emerging area of performance assessment provides a means of diagnosing control loop performance using time series and digital signal processing techniques. As mentioned earlier in chapter 2, in terms of performance assessment, many methods have been investigated since the 1960's. Most of those methods require some priori knowledge about the process model, noise model and\/or time delay of the system. In 1992, Desborough and Harris [4] developed a normalized index for analyzing the performance of regulatory control in a closed-loop system. This index (known as the Harris index) uses minimum variance control as a benchmark. It is a scalar between 0 and 1, as 0 indicates the output variance reaching ideal minimum variance and 1 indicates an unstable\/unacceptable response of the process output which has a huge variance. The major advantage of using the Harris index is that instead of knowing much information about the process model and noise properties, it only requires routine operating data and little prior knowledge of the time delay in plant processes. This 16 Chapter 3. Minimum Variance Performance Index 17 method brings operation personnel great convenience to estimate the ideal minimum variance of the process output. Therefore, the Harris index gives the user a certain number which measures how far the current process variance is to ideal minimum variance by simply collecting the closed-loop data from process outputs. In this chapter, the derivation of the Harris index will be reviewed followed by a discussion on the limitations and application of the Harris index. A novel method to calculate PID tuning parameters for near minimum variance control will be described later. 3.2 Definition of the Harris Index As an emerging technique in performance assessment of control systems, the Harris index is derived in this section for future discussions to follow. The idea of using minimum variance as a performance measurement was first proposed in 1989 [2]. The normalized Harris index was then derived in 1992 [4] by Desborough and Harris. Several assumptions were introduced in this performance assessment technique: \u2022 If a controller is a minimum variance controller, the true autocorrelation functions of process output y are zero for lags > d, where d is the number of whole periods of delay. This is because in reality, models always have some mismatches with the real processes which may result in the autocorrelation functions not being zero for lags > d. The Harris index is extremely sensitive to poor estimates of delay d. \u2022 The process output or its transformation can be adequately described by a linear transfer function with additive disturbance. The Harris index is not applicable to non-linear systems. The following model used for describing a process is assumed to be ARIMA: Chapter 3. Minimum Variance Performance Index 18 where y(t) - controlled variable\/process output. \/j, - mean of y(t). z~x - backward shift operator which is defined such that z-ly(t) = y{t-l). B(z~1), A(z~x) - polynomials of order (p,q) respectively in backward shift operator z~l, A(z~x) is monic. d - the number of whole periods of delay including a zero-order hold. u{t) - manipulated variable\/controller output. C ^ - 1 ) , ! ) (z-1) - stable monic polynomials. V = 1 - z\" 1 {w(t)} - a sequence of independently and identically distributed random variables. The controller is represented by Gc(z 1) which has the following relation with the process input and output. u(t) = Gciz-^yv-yit)) (3.2) After substituting equation (3.2) into equation (3.1), a closed-loop model can be written in the following format: y(t) - M = ^^z~dGo{yv-y{t)) + ^ ^ ^ { t ) (3.3) where D'(z-1)V is equal to D(z~1). Ideally, the mean of the output p, equals setpoint Vsp-Chapter 3. Minimum Variance Performance Index 19 For regulatory control, only the deviation of a variable is concerned. Therefore, the process output deviation can be defined as y(t) = y(t) - ysp (3.4) Combining equation (3.3) and equation (3.4) gives A(z~1)D(z~1)y(t) = -Biz-^Diz-^Gciz-^m + M^Ciz-'Mt) (3.5) re-arranging the terms alike yields [Aiz-^Diz-1) + B(z-1)D(z-1)z-dGc{z-1)]y(t) = A(z~1)C(z~1)w(t) (3.6) Then, _ Ajz-^Cjz-1) V W ~ A(z-l)D(z-1) + \u00a3 ( z - 1 ) D ( z - 1 ) * - d G c ( * - 1 ) U , W ^(z-l)w(t) (3.7) w here Mz-i) = A(z^)C(z-i) n ' A{z-i)D(z-^) + B{z-l)D{z^)z-dGc(z-^) K ' ^(z-1) is a monic polynomial since both A(z~1)C(z~1) and A(z~l)D(z~1) are monic. It can be broken into two parts such that y(t) = Fiz-^wW + M^Mt-d) = e(t) + y(t) (3.9) where F{z~l) = i + \/ l 2 - i + \/ 2 Z - 2 + ... +\/d_1^+i (3.10) Chapter 3. Minimum Variance Performance Index 20 and the degree of the monic polynomial F(z~1) is d\u2014l. On the right hand side of equation (3.9), e(i) can be interpreted as the d-step ahead prediction error from the future noise which cannot be eliminated by the controller. y(t) is called the d-step predictor of y(t). The coefficients of Fi^z\"1) can be obtained by solving the Diophantine identity\/long division shown as follows: Obviously, ^ >i(z_1) in equation (3.9) is equal to ^ ^ r ; ( z - i ) + B ( ^ ) ^ y G c ( ^ ) -So far, the variance of y(t) can be given by Var(y(t)) = Var(e(t)) + Var(y(t)) + 2Cov{e(t),y(t)} (3.12) Since w(t) is a sequence of independent random variables, Cov{e{t), y(t)}, which is equiv-alent to Cov{F(z~1)w(t),\u2022^i(z~1)w(t \u2014 d)}, vanishes. As long as the model equation (3.1) is known, a controller can be designed to minimize the variance of y(t). For minimum variance (MV) control, the controller forces the output to the setpoint in d steps, which can be explained as follows. Biz'1) . A Ciz-1) . . = f[^ )M(t ~ Q+F^yvi+i^^ -d) (3- i3) FutureNoise C(z~l) Here the Diophantine equation was again used for \u2014 \u2014 \u2014 , DK z~ l) Cjz-1) _ ( t . G'jz-1) ~ F [ z ) + ^ y ( 3 - 1 4 ) Notice the polynomial F(z~1) in equation (3.14) (open-loop model) is the same as in equation 3.9 (closed-loop model). This is because the future noise term won't be af-fected\/eliminated by the controller form, i.e. F{z~l) is the same in open-loop model and closed-loop model. Chapter 3. Minimum Variance Performance Index 21 Therefore, the controller will force the predictor to go to zero since the setpoint is considered to be zero, i.e. = 0 (3.15) As a result, the variance of y(t) achieves the minimum variance SMV. Vctr(y(t)) = Var(e(t)) = tliv (3-16) If the controller is not a M V controller, the variance of the predictor <5? is non-zero. The process output variance will always be greater than the minimum variance. Var(y(t)) = 6l = Var(e(t)) + Var(y(t)) = 6Mv + % (3-17) 3.3 Estimation of Ideal Minimum Variance The Harris index uses minimum variance as the benchmark, hence, how to calculate the minimum variance is a point of discussion. Theoretically, the minimum variance 82MV can be calculated from term e(t) which demands to know the coefficients in equation (3.10) and the variance of the white noise w(t). In this section, by knowing only the time delay of the process and the closed-loop operating data collected from the output, the minimum variance will be estimated through the least squares method. Recall the closed-loop model equation (3.7) and equation (3.9): y(t) = = F(z-l)w{t) + ^{z-x)w(t - d) (3.18) Chapter 3. Minimum Variance Performance Index 22 Backward shifting equation (3.18) by step d, one obtains y(t - d) = i\/j(z~1)w(t - d) y(t - d) w ( ' - d ) = M (3-19) Substituting equation (3.19) into equation (3.9) gives y(t) = F(z-')w(t) + ^ f[jy(t - d) (3.20) Since all system dynamics are assumed to be stable in closed loop, i^lil\u20141 must form ) a convergent infinite series addition such that, \u2014\u2014\u2014 = ao + diz + a2z H ip{z-1) oo = E\u00ab^~ f c (3.21) Notice that oo ]T ak < oo To simplify the calculation, in practice, the infinite series ak is truncated after m terms. Substituting equation (3.21) into equation (3.20) yields. oo y(t) = F{z-1)w{t) + Y, ( t ) + ^ 0 ( i - d - H l ) (3.22) k=i A lagged regression of closed-loop data yi can be fitted only in matrix-vector notation. Y = Xa + R Chapter 3. Minimum Variance Performance Index 23 whe re, X y{n) y _ y(n-l) y(d + m) 'y(n \u2014 d) y(n \u2014 d \u2014 1) \u2022 \u2022 \u2022 y(n \u2014 d \u2014 m + 1) y(n \u2014 d\u2014 1) y(n \u2014 d \u2014 2) \u2022 \u2022 \u2022 y(n \u2014 d \u2014 m) y{m) y{m - 1) y ( i ) a = R rn-i rd+r. R is the error vector. Using the least squares estimate algorithm, vector a can be solved by The minimum variance can be estimated from the error vector E which contains all the unrejectable future noise variance. RTR c2 \u00b0MV n \u2014 d \u2014 2m + 1 Chapter 3. Minimum Variance Performance Index 24 _ (Y - Xo)T(Y - XOL) In equation (3.23), the denominator at the right hand side is from the degree of freedom according to the least squares algorithm. The reason for subtracting 2m is that one m is from m data points lost, the other m is due to m number of elements in matrix a. In order to measure the performance of the process output by the Harris index, the real process output variance reeds to be measured to compare with the benchmark -minimum variance. To do so, in practice, one would simply calculate the mean square error mse(y) which is defined as follows. mse(y) = E[y - ysp]2 = E[y - E(y) + E(y) - ysp]2 (3.24) The expectation of process output E(y) can be considered as the average of the output y. To calculate mean square error of data {?\/,}, the following step is taken: n \\ 2 mse(y) = i=d+m n \u2014 d \u2014 m + 1 n ( y ( z ) - y + y - y s P f i=zd-\\-m n \u2014 d \u2014 m + 1 E (y(0 - y ) 2 = iJ\u00b1^ -r- + ( y - y s P ) 2 (3.25) n \u2014 a \u2014 m + 1 Note that all data used to calculate mse(y) are mean-centered. To choose the proper number m in equation (3.25), normally one can start from 5 and up until the normalized performance index estimate shows no appreciable change. Therefore, the normalized Harris index is defined as follows: Chapter 3. Minimum Variance Performance Index 25 Note that all the data used to calculate 8\\ MV is mean-centered. In summary, the actual procedure to estimate 8\\ 'MV is as follows: 1. Collect data y(i) and ysp(i) that does not include scheduled setpoint changes. 2. Obtain y(i) by subtracting y(i) \u2014 y s p (0-3. Calculate mse(y(i)). 4. Mean-center data y(i). 3.4 Application to Tuning PID Controller Parameters The development and interpretation of the normalized performance index - Harris index - has been briefly reviewed. It is computationally simple, yet not applicable to PID controller tuning. As PID controllers still have the dominant role in the industry, this section will discuss how to relate the controller tuning to the Harris index. 3.4.1 The Discrete Control system With the advent of the digital computer, more and more important control loops are under digital feedback. It provides an opportunity to a process engineer to carry more sophisticated control designs. Since the Harris index was derived on a linear, single input single output discrete control model, the following section will also start with a discrete control system. 5 Calculate 8\\ Chapter 3. Minimum Variance Performance Index Control system model The block diagram of a feedback control system is shown as follows. Disturbance Wt+d Set Point ym+d B{z-x)z-d ) Ut A(z-i) \\ ' nt+d + Controller Plant Figure 1.1. Block Diagram of a Feedback Control Loop. The process model is assumed to be a Box and Jenkins model. where \u2022 Vt+d (3 y(t) - controlled variable\/process output. p - mean of y(t). z~x - backward shift operator which is defined such that z-ly(t) = y(t-l). B(z~1), A(z~1) - polynomials of order (p,q) respectively in backward shift operator z - 1 ; A(z~1) is monic. d - the number of whole periods of delay including a zero-order hold u(t) - manipulated variable\/controller output. C{z-1),D\\z-1) - stable monic polynomials. Chapter 3. Minimum Variance Performance Index 27 V = 1 - z'1 {w(t)} - a sequence of independently and identically distributed random variables. D (z X )V is equal to D(z 1). Ideally, the mean of the output fi equals setpoint ysp. y{t) can be defined as y(t) \u2014 ysp. Closed-loop Model As discussed earlier, in order to design the minimum variance controller which forces the output to the setpoint in d steps, the disturbance term has to be separated into two parts: one is the future noise (cannot be observed or eliminated by the controller), the other is the predictable part due to past disturbances (can be eliminated by the controller). To do so, the Diophantine equation is used for the disturbance model. Substituting y(t) into the open-loop model 3.27 gives Biz-1) , , Ciz-1) . By combining equation (3.28) and equation (3.29), one obtains (3.29) m + d ) = ^ ^ ^ t ) + F ^ ~ 1 ) w ^ + d ) + ^ P j w ^ ( 3 - 3 0 ) Diz'1) By backward shifting equation (3.30) by d steps and dividing both sides by Ciz'1) , , , Biz'1) . ^Dfz-1) W { t ) = m ~ Ajz^)u{t ~ d)]C(z^) ( 3 , 3 1 ) Chapter 3. Minimum Variance Performance Index 28 Substituting equation (3.31) into equation (3.30), B^'1) , x G^-1),,, Biz'1) , ^Diz~l) +F(z-1)w(t + d) (3.32) By combining the terms alike, one obtains y(t + d^ = ^(f=ryt1 - ^ ( f ^ ) ^ \" ^ \" ^ 5 + ^f=^) s ? (* ) + ^(^\"^^C* -\u00bb- *0 (3-33) Since the last term on the right hand side of equation (3.33) is the future noise term (which is the source of the minimum variance), the controller does not have any impact on it. As for the first two terms, one can combine them together as follows: Biz-^Fiz-^Diz-1) , , G(z~l) , , u , y(* + <0 = c(z-.)A(z-') + cH )^+ ^ + <*> B(z-i)F(z-i)D(z-i)u(t) + A(z-i)G(z-i)y(t) = A (z- i )C(z-i) + j P ( Z H * + ^ 3 - 3 4 ) To simplify the discussion in the sequel, it is better to redefine the following polyno-mials: a{z~l) = 5(z- 1)F(z- 1)\/J(z- 1) \u2022 (3,35) b{z~x) = Aiz-^Giz'1) (3.36) c(z-x) = Aiz-^Ciz'1) (3.37) e(t) = Fiz-^wit) (3.38) Consider a general linear feedback controller, u < \" = = i ( f f m ( 3 - 3 9 ) Three important equations can be obtained from the original equation (3.34): Chapter 3. Minimum Variance Performance Index 29 1. In the first equation, y(t) is represented by two variables: u(t \u2014 d), y(t \u2014 d), plus the future noise term e(t). The predictor is yi(t). B(z-1)F(z-1)D(z-i)u(t-d) + A(z-1)G(z-l)y(t-d) y(t) = \u2014 ; A(z-*)c(z-i) + F { z M t ) g{z-1)u{t-d) + b{z-x)y{t-d) = + 6 ( ) = yi(t) + -lw) c(z^)R2(z-i) V ( t d> + e^> = y3(t) + e(t) (3.42) These three equations are important because they present the closed-loop model in different predictor forms of the process output, but they are the same in the sense they repeat the same closed loop. In the first predictor yi, the numerator is the equation of the minimum variance controller. This provides a short cut to the design of a minimum Chapter 3. Minimum Variance Performance Index 30 variance controller. Both the second predictor $ 2 and the third predictor i\/3 use the controller in their prediction equations. This fact helps to analyze non-identifiability of closed-loop data. With closed-loop data, the predictor form of the Box-Jenkins model can be identified. Therefore, by using the predictor form for the closed-loop model, it is easier and more practical to analyze the performance of the loop. Several closed-loop identification methods will be introduced in the next section. 3.4.2 Closed-Loop Identification The Box-Jenkins model is a well-known and parsimonious model for a discrete control system. But due to the fact that it is a sum of two rational functions, the model is difficult to identify. There have been algorithms suggested to identify this model. The question of closed-loop data began with a paper by Akaike (1967). In this paper, by using cross-spectral method, Akaike showed that if closed-loop data are used, one might not get the transfer function of the process dynamics but the inverse transfer function of the controller. In 1975, Ljung et al. (1974) [35] studied identifiability of closed-loop data and sug-gested that by shifting controller parameters in different control laws, identifiability can be achieved as in open loop. The number of control laws or controllers must be greater than the ratio of number of input to number of output variables. This is for multivari-able systems. For single input single output systems, one just needs to shift between two control laws. The conclusion involving the prediction error method was drawn as \"Direct identification with a prediction error method can be used exactly as in the open-loop case; the fact that the system operates in closed-loop causes no extra difficulty\" [35]. In 1981, Gevers, and Anderson [36] presented a new approach to the problem. They claimed that under feedback control, the white noise drives both the input and output variable time series, therefore these variables can be put in a vector form and treated as a Chapter 3. Minimum Variance Performance Index 31 vector time series. This vector form gives a joint input-output model which contains both the controller and the transfer function of the process dynamics. This joint input-output model can be identified by a factorization of the joint spectral density matrix. However, with no dither signal this method becomes an indirect method. In 1988, Zervos et al. [37] introduced a new method called Laguerre expansion to identify the plant and obtain optimal PID tuning constants. The plant in their study is a linear, continuous-time plant. It is assumed initially to be under stable, closed-loop control. The closed-loop plant is modeled by a Laguerre series expansion, rather than by a fixed-structure transfer function, because of the requirements of robustness with minimal prior information. It is seen that the estimates of the Laguerre coefficients are unbiased even for a truncated series. Also a fairly large number of terms can be used without undue computational burden. The step response of a closed-loop system is identified by Laguerre expansion in that paper. It offers certain advantage over A R M A models, namely lack of bias in estimates, structural flexibility and the ability to precompute the regressor. Overall, closed-loop identification methods have been studied extensively by many researchers. It has become more comprehensive and important. However, closed-loop identification is not the major scope of this thesis, but its results are being used in the study of performance tuning. In practice, the standard function bj in the system identification toolbox of the MAT-L A B software package can be used to identify a Box-Jenkins model. This software func-tion uses the method of prediction error which interprets the white noise driving the disturbance model as the prediction error. This white noise has minimum variance prop-erty and so identification is done via minimization of the sum of squares of its values. The theory is from Ljung et al. (1974) [35]. Basic concepts are shown as follows: Chapter 3. Minimum Variance Performance Index 32 A linear, discrete time, stochastic system, s, is considered which has the general form y(t) = Gs(z-1)u(t) + Hs(z-1)e(t) ' (3.43) where the output, y(t), is a vector of dimension ny, the input, u(t), has dimension nu and e(t) is a sequence of independent, random vectors with zero-mean value. It has the same dimension as y(t). The initial values for matrix Gs and Hs are 0 and I respectively. The controller is defined as u(t) = Fiz-^yit) (3.44) The model functions Gs{z~l) and H^z'1) are parametrized in a suitable manner by a parameter vector 6. Therefore, the model corresponding to a certain value of 6 is denoted by m(0) and is given by y{t) = C7m t e )(z->(*) + H^z-^eit) (3.45) The identification problem is to determine the parameter 6 so that m{0) suitably describes the system s given by equation (3.43). A common way of parametrizing G and H is to consider vector difference equation models. A^iz-^yit) = Bm{e){z-X)u{t) + Cm{e)(z-X)eft) (3.46) where Am^, Bm^ and Cm^e) are matrix polynomials. The identification method is denoted by j . The concept of identifiability is introduced as follows: DT(s,m) = {9\\Gm(9) = Gs;Hm(6) =-Ha} as estimate time goes to infinity. (3-47) Chapter 3. Minimum Variance Performance Index 33 Definitions 1. The system s is said to be system identifiable (SI) if 8 can be found to meet Z?r(s,m) as estimate time TV \u2014> oo. 2. The system s is said to be strongly system identifiable (SSI) if it is SI for all m such that Dj -^ra) is non-empty. 3. The system s is said to be parameter identifiable (PI) if it is SI and Dj(s,m) consists of only one element. As long as the system meets the condition for SSI, the fact that the system may operate in closed loop does not add difficulties to the identification of the models. Identification in closed-loop using predictor error method One possibility to achieve SSI in close-loop operation is to add extra perturbations to the input or to add noise in the regulator. However, in some cases this may not be permitted since it may excessively increase the variance of the input. It is often possible to find several linear regulators that are acceptable for production quality. According to the theory, SSI can be obtained by switching between several regulators. The required number of regulators depends only on the number of inputs and outputs of the system. A direct identification with a prediction error method in closed loop can be used exactly as in the open-loop case. The cost function (prediction error) QN(s, m(6)) = 1 Y\\y(t) - y(t\\t - l;m{0))][y(t) - y(t\\t - 1; m(6))]T (3.48) is minimized. The minimizing element 9 is estimated. Here the predictor can be derived from equation (3.45) as follows: y(t\\t - 1; m(0)) = (I- H-}e))y(t) + H^\\e)Gm{e)u(t) (3.49) Chapter 3. Minimum Variance Performance Index 34 By substituting the controller form (equation 3.44)into equation (3.49), the following predictor form can be obtained, y(t\\t - 1; m(B)) = (I- H-\\e) + H-\\B)GM9)F)y{t) = Ly(t) (3.50) Suppose the regulator switches between the r different control laws and each regulator is used T{ part of the total time, then SSI can be achieved only if the following equation can be satisfied: DT(s,m) = {6\\L\u00ae = L {l\\i = l,2,3....,r} (3.51) From equation (3.50), one can see that equation. (3.51) is essentially the same as the following equation: [H-1 - H~X;H-XG - H~xG]Rr = [0....0] (3.52) w here Rr = \/ \/ . . . . \/ pi1) pW .... pW (3.53) The dimensions of the matrices in equation (3.52) are ny\\(ny + n\u201e ) , (ny + nu)\\(nyr) and ny\\(nyr), respectively. If rank Rr = ny + nu (3.54) then equation (3.52) implies that H~ \u2014 H~ =0 (3.55) H-xG-H-xG = 0 (3.56) Chapter 3. Minimum Variance Performance Index 35 Thus equation (3.54) is a sufficient condition for SSI. A necessary condition for equation (3.54) to hold is Tl rny > ny + nu; therefore r > 1 H\u2014- (3.57) The conclusion can be drawn as follows: when the regulator switches at least r(r > 1 + ^) linear feedback laws, it is possible to guarantee strong system identifiability(S'S'J). Then the input-output data collected during closed-loop control can be used to identify the models in a direct manner. 3.4.3 Estimation of Controller Parameters under M V C In the previous closed-loop model (3.40), (3.41) and (3.42), the e{t) term is actually the future noise which generates the minimum variance of the control loop. Polynomials a(z - 1 ) , b{z~l) and c(z _ 1) can be identified from the closed-loop data using the prediction error method. In this case, the controller form is a time series model. Variance of the output y(t) can be represented by either \/ ~ \/ x x f aiz-^RAz-1) - b(z-1)R2(z-1) A , x , \u201e n x var(y(t)) = var M -^1)^ (1-1) Lu(t ~ d)j + var(et) (3.58) or \/ \/ x x (-a(z-l)Rl(z-l) + b(z-1)R2(z-1) A . . , var(y(t)) = var (\u2014^ c(z-x)R2(z-x) Ly(t - d)j + var(et) (3.59) From the latter equation, the ratio between the minimum variance and the variance var(e(t)) output can be seen 1 var(y(t)) -aiz-^R^z-^ + biz-^R^z-1) cLrieit)) of the process T~TTZ c a n be s en to be related to the quantity of the time series model c(z-i)R2(z-1) Chapter 3. Minimum Variance Performance Index 36 Recall the normalized Harris Index equation (3.26), mse(y) var{y(t)) vcivi e(t)} By comparing the Harris index definition with , two observations can be var(y(t)) made: 1. Since a(z *), b(z *), and c(z *) are all model parameters, for a linear time-invariant process, r](d) only depends on controller parameters. Therefore, -a{z-x)Rx(z-x) + b{z-x)R2{z-x) c(z-*)R2(z-i) A is called the amplification factor. This is because it amplifies the output variance higher than the minimum variance except when the controller is in the minimum variance form. When the controller \\ is equal to -7\u201477, the amplification R2{z-1) a \\ z ) factor is exactly zero and var{jj(t)) = var(e(t)) = MV. Also, other amplification factors result in higher output variance than M V by either detuning or overtuning the controller. 2. Though Harris (1992) already introduced the method of minimum variance estima-tion from the closed-loop output data ( delay has to be known as a prerequisite), the process input or controller output variance under minimum variance control cannot be calculated by Harris' approach. Nevertheless, the input variance under M V control should be referred to as the upper bound for control action. The rea-son behind this is that if the control action variance exceeds this bound, it will not improve the output performance but waste more energy and result in higher output variance which is not desirable. From equation (3.41), if the controller is minimum variance controller, the input Chapter 3. Minimum Variance Performance Index 37 variance will be: var(u(t)) = var (^-ly(t)^- (3.60) By knowing the time series model \u2014 7 \u2014 - \u2014 and minimum variance of the output, the upper bound of the control action can be computed. This upper bound can then be used as another performance measure for the overall controller performance. Also, hy knowing the \"best\" PID tuning for a certain process, one can assess the performance of a PID controller against an achievable target rather than MV. This \"best\" PID is discussed in the next section. 3.4.4 MV(min imum variance) PID Controller By using the least squares method to estimate the minimum variance of the process output, the Harris index can be calculated for any closed-loop process. However, it doesn't indicate how to tune the controller to approach the minimum variance for the process output. Since PID controllers are still widely used in the industry, in this section, PID controller tuning will be discussed specifically. By using the proper identification method mentioned in section 3.4.2, one is able to obtain a PID controller which achieves the possible minimum variance for the process output, i.e the possible minimum Harris index in PID controller form. Recall equation (3.59), ,~ , ^ \/-a(z- 1)i? 1(^- 1) + 6(z- 1 ) i? 2 (^ 1 ) . \/ A \\ , , var(y(t)) = var \u2014 ^ , n P V - V ^ * ~ <0 + \u2122r(et) 3.61 A standard PID controller in discrete form can be defined as G, = R2(z-1) ro + rlz~l + r2z~2 1 - z (3.62) Chapter 3. Minimum Variance Performance Index 38 Here R2(z 1 ) = 1 \u2014 z Therefore V \u00ab ( f ) = -(ro + n z - 1 +r 2\" 2)y(0 Substituting equation (3.63) into equation (3.61) gives var(y(t)) = var ( ^ ' V J-y(t -d))+ var(et) (3.63) c (z - i ) = var(y(t)) + var(et) (3.64) a ( z _ 1 ) where a ^ z \" 1 ) = v ^ \\ and i ? 2 ( 2 _ 1 ) = V . As mentioned earlier in section 3.2, var(et) is actually the process minimum variance which can be estimated by knowing the process output operating data and time delay. Therefore, variance of y(t) in equation (3.64) can be estimated by 1 TV var(y(t)) \u00ab \u2014 ^ i=l - q 1 ( z - 1 ) \/ ^ 1 ( z - 1 ) + fe(z (3.65) Equation (3.64) becomes 1 N . var(y(t)) ~ ^ 7 E - \u00ab 1 ( z - 1 ) J R 1 ( z - 1 ) + K ^ 1 ) ~ c (z- i ) y(\u00bb) (3.66) For minimum variance control, uar(y(r+d)) = M V , implying var(y(t)) = 0. To obtain the minimum achievable variance, the PID controller should minimize the following cost function 1 N var(y(t)) \u00ab \u2014 \u00a3 -mjz-^R^z-^ + bjz-1) c(z-i) 12 y ( 0 (3.67) Then the controller parameters r 0 , r i and r 2 can be obtained by differentiating var(y(t)) with respect to ro,rx and r2. N dvar(y(t)) 1 _ dr0 N ^ =1 L c(z j c^z J (3.68) To find the solution for the controller parameters, it would be simpler to consider a linear form of the derivation by eliminating c ( z _ 1 ) in the denominator. Since polynomial Chapter 3. Minimum Variance Performance Index 39 c(z~l) is monic and contains no zero outside the unit circle, \u2014;\u2014\u2014 can be approximated c ( 2 - 1 ) by a sum of finite coefficients in the backward shift operator. c{z !) = I + d^z-1) + d^z-1) + d2(z~2) + d3(z~3) + \u2022 \u2022 \u2022 (3.69) After m terms, the coefficients are close to zero which can be truncated: 1 d(z~x) c(z-i) \u00ab I + d^z-1) + dl(z~1) + d2(z~2) + d3(z~3) + ... + dm(z-m) (3.70) Equation (3.66) becomes dvar(y(t)) dr0 1 N ^ EH^\" 1 )^\" 1 )^^ 1 ) + r1)^\"1)]^)!-^\"1)^\"1)]^) (3-71) A 7 \u2022 1 1=1 To simplify the calculation, let's define the following polynomials a^z-1) = ai(z-l)d{z-1) (3.72) b*{z-x) = biz-^z-1) (3.73) + r j j i (>-2) ) + 6 ' (\u00ab- 1 ) ! ( (0][-o*(z- 1 )\u00bb(>)] (3-74) To obtain the parameter r 0 , setting the above equation (3.74) to zero and simplifying it gives \u00a3 ( a * ( z - 1 ) ) 2 [ r 0 y ( z ) y ( ? ) + riy{i - l)y(i) + r 2 y ( z - 2)y(i)] = D ^ O ^ M * \" 1 ) ^ ) ] 4 = 1 t = l (3.75) Chapter 3. Minimum Variance Performance Index 40 Then dvar(y(t)) 1 N N ^ . 1 = 1 L -a 1(z- 1)J? 1(z- 1) + 6(z-1) Same simplification procedure for c(z-i) dvar(y(t)) dri y(0 U I T i 8 ' ( \u00bb - l ) [ where w(t) is a white noise with variance of 0.01. According to equation (3.27) Biz'1) = 0.25 - 0.07Z- 1 (3.97) Aiz-1) 1 - 0 .9Z\" 1 + 0.2* (3.98) c ( 0 = i (3.99) D{z~x) = 1 - z ' 1 (3.100) Given the following Diophantine equation, = 1 + - - L \u2014 - (3.101) z'1 1 - z-1 1 - Z'1 Therefore, a{z~l) = Biz-^Fiz-^Diz-1) = (0.25 - 0.07z-1)(l + z'1) (3.102) Chapter 3. Minimum Variance Performance Index 47 - i , a(z 1) . a^z'1) = - ^ - L = 0.25 - 0.07Z- 1 biz'1) = A(z-1)C7(z-1) = 1 - 0.9Z-1 + 0.2 z'z'1) = Aiz-^Ciz'1) = 1 - 0.9Z'1 + 0.2\" - 2 diz'1) = F{z-X) = 1 (3.103) (3.104) (3.105) (3.106) The following non-minimum variance PID controller was selected for generating closed-loop data: 3.5 - 3.9z~x + 0.7z~2 1 - z-This is equivalent to Kc = 2.5; rt = 0.83; rd = 0.028 when sampling is 0.1 seconds. The process output variance is measured to be 0.0126. By using the algorithm developed in section 3.4.4, the M V PID controller parameters: r 0 , rx and rx can be obtained . Vector R\\ was calculated as follows: Rx 3.88 -4.2 1.33 (3.107) Implement this M V PID controller _ Rijz-1) _ 3.88-4.2z- 1 + 1.33~2 c ~ 1 - z-1 ~ 1-z-1 into the closed-loop system. The simulation results in figure 3.4 shows that this controller does achieve the minimum variance of process output which is 0.0103 which is much less than the one in figure 3.3. Chapter 3. Minimum Variance Performance Index 0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000 Time, sampling unit=0.1 seconds Figure 3.3: Closed-loop dynamics under a non-minimum variance PID control Chapter 3. Minimum Variance Performance Index 49 Figure 3.4: Closed-loop dynamics under M V PID control Chapter 3. Minimum Variance Performance Index 50 Theoretically, minimum variance of the process output cry2^ can be obtained by y(t - i) i=l (3.112) Here N is the total number of collected data, y(t) is the current process output, a* and b* are the coefficients of the polynomials a * ( z _ 1 ) and fe*(z_1) respectively. Chapter 3. Minimum Variance Performance Index 53 This is a bilinear equation for each variable ro, r i , and r 2. Therefore, the solution for set of ro, rx, and r2 is not unique. This proves that for the same variance of process output, the controller form can be different, hence the performance of the controller output will be different as well. The Harris index cannot give any information about which controller form is better. 3.5.2 Simulation Results Besides the mathematical proof, a few examples are shown in this section to illustrate limitation of the Harris index. Example 1. Mesh Plot The process model is described as follows: 0.168Z-1 , , 1 , s , s \u00bb<\" \" i - o . 9 0 8 r - \" W + 0 - , - ) ( ! - 0 . 3 0 , - - o . m - ^ W <3-113> with the estimated variance of the white noise sequence w(t) being 2.37 and the setpoint being zero. A discrete PID controller in kc (proportional), ki (integral), and kd (derivative) form can be represented as follows (assuming Ts = 1) Rijz-1) _ r0 + rxz~x + r2z~2 R2{z-1)~ I - * - 1 with r 0 = {kc +ki + kd); n = -(kc + 2kd); r2 = kd (3.114) Since the setpoint is zero, u(t) can be substituted by , N R\\(z~x) , , Chapter 3. Minimum Variance Performance Index 54 Then, the closed-loop model becomes y(t) 1 - 0.908Z-1 w(t) (3.115) 1 \u2014 mlz 1 \u2014 m2z 2 \u2014 m3z 3 \u2014 m4z 4 \u2014 mbz 5 where m l = 2.208 - 0.168 * r0 m2 = - 1.310 + 0.05* r 0 - 0.168 * n m3 = \u2014 0.052 + 0.028 * r 0 + 0.05 * rx - 0.168 * r 2 m4 = 0.154 + 0.028 * n + 0.05 * r 2 m5 = 0.028 * r 2 To simplify the calculation, let's assume kd is equal to zero (PI controller). By varying ki from 1 to 4, while kc varies in the range 4 to 9, one can compute the variance of the process output in closed-loop. Using the program rjcont.m and armavar.m in appendix A, a three-dimensional plot, as shown in figure 3.5, for var(y) versus kc and ki is obtained. In this figure, for a constant variance of the process output var(y) (excluding minimum variance), there are different sets of solutions for kc and ki. It should be noted that if kd is not zero, more combinations of the tuning parameters can achieve the same variance. By projecting this mesh plot to a two-dimensional plan, one can see the contour plot, as in figure 3.6, which shows that the same variance of process output can be obtained by different kc and ki along the elliptical contour. Chapter 3. Minimum Variance Performance Index 55 kd = 0 Figure 3.5: Three-dimensional process output variance versus controller tuning parame-ters kd \u2014 o Figure 3.6: Variance contour for different tuning values Chapter 3. Minimum Variance Performance Index 56 E -Band-umi ed While Noise z-0.2 z-0.8 Dis. Transfer Fcnl Sum P!D controller 0.2 Dis. Transfer Fen Figure 3.7: Closed-loop simulation model Example 2. The closed-loop simulation model is described in figure 3.7. The process is a first-order model with a time delay of 2 including a zero-order hold. The noise model is an A R M A model with a white noise variance of 0.01. The controller is a non-minimum variance PID. When the setpoint is set to zero, the PID controller is working as a regulator. By changing the proportional gain from 0.1 to 3, while the integral and derivative gains are fixed at 0.4 and 0.1 respectively, the controller output variance is increased. The question here is \"With more energy being consumed by the controller, will it improve the process output performance?\". In the closed-loop simulation, the process output and controller output data have been collected to calculate the variances which are plotted in figure 3.8. Figure 3.8 shows that as the controller output variance increases, the process output Chapter 3. Minimum Variance Performance Index 57 Kc from 0.1 to 3, Ki = 0.4, Kd = 0.1 0.021 1 , 1 0.019r Controller output variance Figure 3.8: Process output variance versus controller output variance in closed loop variance drops until the achievable minimum variance is reached before increasing again. This implies that a higher energy consumption by the controller will not improve the process output and will eventually deteriorate it. This region should definitely be avoided in close-loop control. Therefore, if the Harris index only measures the process output, it doesn't indicate whether the controller is working efficiently or not. 3.6 Conclusions In this chapter, the Harris index which is still being commonly used in the industry to analyze the process output performance has been reviewed. Though it is computation-ally simple to estimate the minimum variance and calculate the performance index, its application for controller assessment is limited. Therefore, a novel PID tuning strategy to achieve near minimum variance control has been proposed and demonstrated. Fur-thermore, the major drawback for the Harris index is that it doesn't take into account Chapter 3. Minimum Variance Performance Index 58 the controller output performance which is equally important in assessing control perfor-mance especially for PID controllers. The solution for this problem will be addressed in the next chapter. Chapter 4 Performance Assessment Diagram 4.1 Introduction Though the Harris index is an easy method to measure the performance of the closed-loop output, the major limitation for this index is that it doesn't take into account the controller output. This directly causes adverse performance in closed-loop control. As explained in section 3.5.1, different control laws may result in the same variance of the process output. This fact indicates that for different variances of the controller output, the resulting Harris index may be the same number to reflect the performance except when the loop is under minimum variance control (i.e, the controller output variance, o n e c a n u s e a user-specified a2u as a benchmark for the I index. However, normally process output variance is desired to be as small as possible during regulatory control. Therefore, a2 m v can still be used as the benchmark for the 0 index. No matter which benchmark for controller output is used [o2umv or cr2u), the conclu-sion is the same. Obviously, if \/ and 0 are quite large, an increase in the controller output variance a\\ will be needed to drive the I\/O index close to the practical optimal operating point. The operating personnel is then recommended to retune the controller by increasing the controller gain to reach smaller I and O but not to the shaded region. This is an advantage to have the input variance constrained. Another thing to be noted is when the disturbance is non-stationary, the correspond-ing PID controller will also have non-stationary movements. In that case, the controller output cannot be assessed by calculating the variance directly. Rather the incremental controller outputs have to be obtained and used as a criteria instead of the controller Chapter 4. Performance Assessment Diagram 72 output position. 4.4 Conclusions A new performance I\/O index in the form of a performance diagram is proposed in this chapter. To calculate this index, the upper bound of the controller output under min imum variance control has to be defined first. The I\/O index diagram is defined as a two-dimensional map, where the I axis represents the performance measure of the controller output; and the 0 axis represents the performance measurements of the process output. The theoretical optimal operating point is located at the origin (0,0). The practical operating point can be defined by the user or calculated through the optimal P I D controller developed in Chapter 3 if the controller structure is l imited to a P I D type. Chapter 5 Demonstration of the I\/O Index 5.1 Introduction In this chapter, two control systems are used to demonstrate the optimal PID controller and the new performance input\/output (I\/O) index. The first section includes an exper-iment of a level control system. The control loop is to keep the liquid level in a tank at a desired value even though process upsets occur. The experiment is designed to illustrate the change of the I\/O index as a function of the operating parameters. It illustrates that with the optimal PID controller tuning, both the process output and controller output achieve the desired variance. Therefore, the I\/O index does indicate the improvement of controller performance. The second section uses a set of real data from a coat weight con-trol system to demonstrate the performance of the overall control system. Furthermore, by using the same data, the process and noise models were identified. The optimal PID controller was derived and the simulation results show that the performance measured by the I\/O index has been improved tremendously. 5.2 Level Control System The apparatus set up diagram for this level control system is shown in figure 5.13. Water is pumped from a reservoir through a control valve and rotameter(s) into the acrylic plastic tank. By suitably setting the shut-off valves, water can pass through the tank. Discharge from the tank is by gravity through flow orifices. The water subsequently 73 Chapter 5. Demonstration of the I\/O Index 74 returns to the reservoir. L e v e l C o n t r o l l e r R e c o r d e r Circu la t ion P u m p C o n t r o l V a l v e T a n k L e v e l S e n s o r Ori f ice i \u00a3 2 A 3 A T y T C o n s t a n t V o l u m e P u m p W a t e r R e s e r v o i r Figure 5.13: Liquid level automatical control system The control system block diagram is shown in figure 5.14. A transfer function which relates the liquid height in the tank to the flowrates in and out was derived theoretically and experimentally. The details are given in the next sections. 5.2.1 Theoretical Model A mass balance upon the tank, followed by the introduction of deviation variables and Laplace transformation of the equation yields a first order transfer function describing the dynamic behaviour. (Refer to figure 5.15 for notation). H(t) = h(t) - hss(t) Qin(jjS) ^ss(^) ?mss(^) (5.130) (5.131) Chapter 5. Demonstration of the I\/O Index 75 Output % Set Point Volts % PID Controller 4-20 mA L 1 Control Valve Q Prnress | Kv cm3\/s Gp Liquid Level in Tank 3 Volts Hm P \/ l 3-15 psig Pressure I 10-50 mA Converter Transducer | H, cm Input \/o Figure 5.14: Apparatus set up diagram for level control system h H(t) = h(t) - h4t) Tank, Area A ~ \u2014 ~ \u2014 ~ I pump Q o r i f i c e Orifice Risistance = R Figure 5.15: Notation for level control system Chapter 5. Demonstration of the I\/O Index 76 The volumetric balance is: where qorifice is equal to ^ dh Oin - qorifice - A \u2014 (5.132) Rorifice By introducing deviation variables (ss indicates steady state), the following equation can be obtained: ( f t n - + D(z-i) 1.082 = 1 + T _ 7 ^ T ( 5 - 1 4 5 ) Therefore, according to equation (3.35),-(3.36) and (3.37), aiz-1) = Biz-^Fiz-^Diz-1) = -0.2(1 - z\" 1 ) (5.146) a i ( z - J ) = Biz-^Fiz-1) = -0.2 (5.147) biz'1) = A(z-1)G(z~1) = (1 - 0.979z-1)1.082 = 1.082 - 1.06z_ 1 (5.148) c{z~l) = Aiz'^Ciz'1) = (1 - 0 .979z _ 1 )( l+ 0.082Z- 1) = 1 - 0.897Z - 1 - 0.08z~2 (5.149) The optimal PID that generates near minimum variance performance is estimated as follows using the M A T L A B program pidxon.m in appendix A: , = -4 .87 + 5 . 4 3 4 3 , - - 0 .6962,- ' 1 \u2014 z Converting this optimal PID controller into continuous time, one obtains the following PID structure: Gc(s) = -4.04(1 + \u2014[\u2014 + 0.0435) (5.151) 7.475 Chapter 5. Demonstration of the I\/O Index 83 the integral time of 7.47 minutes is very reasonable compared to the process time constant of 10 minutes. The derivative time could have been neglected because the system delay is quite insignificant. When implementing the optimal P ID controller into the system, the process output and controller output are shown on figure 5.20. B y measuring the P I D controller output and process output, the process output reaches a variance.of 0.0992. The variance of the incremental controller output is 4.92. B y comparing the operating data under the optimal P I D control with the theoretical min imum variance process output which is 0.0952 and the variance of the incremental controller output of 5.03, one is able to calculate the I\/O index for this P I D control performance. I is equal to 0.022 and O is equal to 0.04. Theoretically, for any first-order process with no delay, the optimal P ID wi l l be exactly the same as the min imum variance controller. However, due to model identification errors, one. would not obtain the perfect model. Therefore, the designed optimal P I D wi l l not perform like a min imum variance controller. From the I\/O index calculated from this P ID control loop, which is located at (0.022,0.04), one can see that it is very close to the minimum variance control point of (0, 0). It shows that the performance of the control system is quite good. When the system is in open loop, the process output variance is equal to 4.03 and the process input (controller output) variance is zero. Therefore, the I\/O index during open loop is at (1,0.976). Using a non-minimum variance P I controller Gc = -6 (1 + ^ ) (5.152) one can see the closed-loop dynamics in figure 5.21. The process output variance is equal to 0.0985. The incremental controller output variance increased significantly to 3.974 which exceeds the one required for M V control 5.03. Therefore, the I\/O index is located Chapter 5. Demonstration of the I\/O Index 0 50 100 150 200 250 300 350 0 50 100 150 200 250 300 350 Time, sampling unil(1 unit=15seconds) Figure 5.20: Level control system closed-loop dynamics under optimal PID control Chapter 5. Demonstration of the I\/O Index 85 Figure 5.21: Level control system closed-loop dynamics under a non-minimum variance PI control Chapter 5. Demonstration of the I\/O Index 86 on the left-hand side of the performance diagram plot at (\u20140.629,0.034). This indicates that the controller is performing poorly and therefore wasting energy. Again, using another non-minimum variance PI controller G c = ~ 3 ( 1 + Ws) ( 5 - 1 5 3 ) one can see the closed-loop dynamics in figure 5.22. The process output variance is equal to 0.1206. The incremental controller output variance is 8.194. Therefore, the I\/O index is located at (0.772,0.21) in the performance diagram plot in figure 5.23. This indicates the poor performance for both the process output and controller output which can be improved by tuning the PID controller properly. Closed-loop Identification If using a non-minimum PI controller, G c = 4 ( l + I ^) (5.154) by changing the setpoint from 0 to 1, to 0.2 and then to 0.8, a set of closed-loop data shown in figure 5.24 can be collected to identify the process and noise models. The model is found to be as follows while the sampling time is 15 seconds, -0.197 , 1 + 0.06Z- 1 , , y { t ) = i - 0 . 9 7 5 , - *-l) + ^rzpr-4') (5-155> where e(t) is the white noise with a variance of 0.1. By using the Diophantine equation, the disturbance model can be separated into two parts. = 1 + (5-156) Chapter 5. Demonstration of the I\/O Index 87 ^ 1.5i 1 1 1 r E _151 1 1 1 1 I L ' 0 50 100 150 200 250 300 350 _gi i i i i i i I 0 50 100 150 200 250 300 350 Time, sampling unil(1 unit=15seconds) Figure 5.22: Level control system closed-loop dynamics under a non-minimum variance PI control Chapter 5. Demonstration of the I\/O Index 88 0.976) I No control Optimal operating point Figure 5.23: I \/ O index diagram for level control system Therefore, according to equation (3.35), (3.36) and (3.37), a(z~ 1 ) = Biz-^Fiz-^Diz-1) = -0.197(1 - z'1) (5.157) a i ( z - x ) = B{z-l)F(z~l) = -0.197 (5.158) biz'1) = A(z-1)G{z-1) = (l~0.975z-1)1.0Q = 1.06 - 1.0335Z-1 (5.159) c{z-1) = A ( z \" 1 ) C ( ^ - 1 ) = (1 - 0 . 975z _ 1 ) ( l +0.06z_ 1) 1 - 0 .915z _ 1 - 0.059z (5.160) The optimal P I D that generates near min imum variance performance is estimated as follows using the M A T L A B program pid-con.m in appendix A : -5 .38 + 5.24Z\" 1 - 0.0009z- 2 Gdz-1) = 1 - z-(5.161) Chapter 5. Demonstration of the I\/O Index 89 5 -1 0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000 Time, sampling unit (1 unit=15seconds) Figure 5.24: Level control system closed-loop dynamics under a non-minimum PI control Chapter 5. Demonstration of the I\/O Index 90 Converting this optimal P I D controller into continuous time, one obtains the following P I D structure: Gc(s) = -5.24(1 + \u2014 J \u2014 + 0.0004.S) (5.162) This P I D is st i l l quite reasonable though it is obtained from the closed-loop identification. Compared to the one obtained from open-loop bump tests, equation (5.151), the integral tir&e- k $v\u00a9n-\u2022closer to the theoretical time constant of the process 10 min. ft also shows that the derivative is not necessary for this level control system since rd is very small. 5.3 Demonstration Using Industrial Data The industrial data used here to demonstrate the optimal P I D controller and I\/O index is from a coat weight control loop provided by a consulting company. The process output - coat weight- is manipulated through a blade load. The disturbance is assumed to be integrated white noise. The control parameters are self-adjusting and depend on the operating conditions. The system was most of the time under closed-loop control. Data was collected every 44 seconds. Figure 5.25 shows the data collected from the coat weight and blade load respectively during closed-loop control. Using the prediction error method and using a sampling time of 15 seconds, one is able to identify the process and disturbance models in discrete time as follows. Biz'1) = -8.822 (5.163) A ( z _ 1 ) = 1 - 0 .223z - 1 - 0.255z~2 (5.164) C ( z - X ) = 1 - 0 . 2 5 z _ 1 (5.165) Chapter 5. Demonstration of the I\/O Index 91 200 400 600 800 1000 1200 1400 P 5 a CD 2 5' 1 1 1 1 1 1 I \"0 200 400 600 800 1000 1200 1400 Time, sampling unilfl unit=44seconds) Figure 5.25: Closed-loop operating data from coat weight control system Chapter 5. Demonstration of the I\/O Index 92 D(z-Y) = 1 - z ' 1 (5.166) The process time delay is found to be 1. Therefore, the model is described as -8.822 . , 1 - 0.25Z- 1 , , , \u00bb ( < ) = 1 - 0.223,- - 0 . 2 5 5 ^ \" \" ~ \" + T ^ ^ W ( 5 ' 1 6 7 ) where e(t) is the white noise with a variance of 0.0082. .By using the Diophantine equation, the disturbance model can be separated into two parts: _ , . M Gjz-^z-1 0.75Z- 1 = 1 + y-^r (5-168) Therefore, according to equation (3.35), (3.36) and (3.37) a{z-1) = B(z-1)F{z-1)D{z~x) = -8.822(1 - z'1) (5.169) ax(z-x) = B{z-l)F{z-x) = -8.822 (5.170) biz'1) = A(z-1)G(z~1) = (1 - 0.223z_1 - 0.255*-2)0.75 = 0.75 - 0.1673z_ 1+0.1913z - 2 (5.171) c(z _ 1) = A f * - 1 ) ^ * - 1 ) = (1 - 0.223z- x- 0 .255z _ 2 ) ( l -0 .252- 1 ) = 1 - 0 .473z _ 1 + 0.281z-2 - 0 .05632 - 3 (5.172) The optimal PID is found to be -0.085 + 0.019Z-1 - 0.0217z~2 1 - z-G c = \u2014 (5.173) Chapter 5. Demonstration of the I\/O Index 93 The continuous form is Gc = -0.02(1 + 1 0.3465 + 0.8145) (5.174) with the time unit of minute. Since implementation of the theoretical PID control is impossible for this coat weight process, closed-loop simulation is used to demonstrate the results. The Block diagram of this control loop simulation is shown in figure 5.26. ' \u2022 \u2022 wn | iRnput JT| \u2022 - 0 . u85z 2 *0 .019z -0 ,0217 RTi Dis. Transfer F c n 2 Dis. Transfer F c n l A u t o - S c a J e Graph_ z^-0 .223z+0.255 Dis. Transfer F e n ymv j Proess output A u t o - S c a l e Graph Figure 5.26: Block diagram of the coat weight closed-loop simulation under optimal PID control The process output and controller output, when implementing the optimal PID con-troller into the system, are shown in figure 5.27. By using the PID controller, the process output reaches a minimum variance of 0.0082. The variance of the incremental controller output is 7.16 * 10 - 4 . Comparing them with the original operating data from the process output which has a variance of 0.0171 and the incremental controller output variance of 5.95* 10 - 5 , one is able to calculate the I\/O Chapter 5. Demonstration of the I\/O Index Chapter 5. Demonstration of the I\/O Index 95 index for different control performances. The I\/O index performance diagram for this coat weight control loop is shown in figure 5.28. to 1 Optimal operating point Figure 5.28: I\/O index diagram for coat weight control system Without any control, the process output variance is equal to the noise variance 0.197 which gives the O index equal to 0.9584. The controller output variance is 0 which has I index of 1. The I\/O index for the original operating data is calculated as (0.917,0.4795). Under the optimal PID control, the closed-loop achieves the best performance which gives the I\/O index at (0,0). By tunning the normal PID to optimal PID, one can easily see that the I\/O index moves towards (0,0) in the diagram. This indicates the improvement of the control performance. 5.4 Conclusions In this chapter, the experiment of a level control system and industrial data from a coat weight control system were used to illustrate the optimal PID controller and the I\/O per-formance index. By collecting the data from the controller output and process output of Chapter 5. Demonstration of the I\/O Index 96 the operating systems, the process and disturbance models were identified as Box-Jenkins model. Then, by using the strategy developed in chapter 3, the optimal PID which gives the best achievable performance was estimated. Both level control experiment and coat weight simulation verified the performance of the estimated optimal PID controller. The new performance I\/O index developed in chapter 4 was also calculated for these two systems and presented in the form of an I\/O index diagram. Chapter 6 Conclusions and Recommendations In this thesis, some basic performance analysis tools were reviewed. A few questions regarding the regulatory control performance analysis were discussed. A convenient and clear performance index is of great importance for modern industrial process control systems, since thousands of control loops need to be monitored and analyzed on time. The conventional performance analysis tools are not sufficient to reflect the performance clearly and practically. The current commonly used performance index is the Harris index which has certain limitations. These limitations include lack of controller output performance and controller re-tuning. A new algorithm to derive an optimal PID con-troller for regulatory control purpose was developed. The important issues about the performance index has been taken into account. Therefore, a new I\/O index was pro-posed in this thesis which results in a more practical and complete assessment of control loop performance analysis. The current work can be summarized as follows: 1. For regulatory control, an optimal PID controller is derived in the sense of ob-taining the achievable minimum variance for the process output. Since the most popular used controller is limited to the PID type, the best feasible minimum vari-ance instead of the theoretical minimum variance as a benchmark for performance assessment is more practical and useful. Although the process model needs to be identified, the algorithm is comparatively simple and it is based on minimizing the variance of the process output by taking differential with respect to the controller 97 Chapter 6. Conclusions and Recommendations 98 parameters. By collecting the closed-loop operating data, the process model includ-ing the time delay and noise properties can be estimated. By using the Diophantine equation, the prediction form of the control loop can be obtained directly. There-fore, the process output related to the noise properties can be extracted, leading to the necessary optimal PID controller. Furthermore, the achievable minimum variance of the process output can be obtained when the controller structure is limited to a PID form. This benchmark makes the performance assessment to. be. more practical and straightforward for control personnel. The other advantage of deriving an optimal PID controller is that it provides the control personnel certain direction to tune the control system to achieve better performance. 2. As a performance index used for regulatory control, the Harris index has the lim-itation of not taking into account the controller output. From the study of this thesis, it clearly shows that with the same amount of the variance for the process output (the same Harris index the same performance), the controller output vari-ance can be very different. Sometimes, this causes unnecessary energy wastage for the controller or unnecessarily large controller output variance. Therefore, an up-per bound of the controller output is very useful in guaranteeing that the process operates efficiently. It is calculated by estimating the controller output variance under minimum variance control where maximum controller energy is required. Combining this factor with the process output, the concept of the new I\/O index has two parts. One is the I index which measures the process input (controller output) performance. A negative value of I indicates that the system is running in a very undesirable region where it is using more energy than required. The other is the O index which compares the process output variance with the benchmark of minimum variance. A two-dimensional I\/O index diagram was constructed. This Chapter 6. Conclusions and Recommendations 99 graphical plot shows how the overall control loop performance looks. The performance assessment for regulatory control has been well developed and un-derstood for single-input single-output, linear Box-Jenkins process model. Some future research suggestions are: 1. Extend the work to multi-input multi-output systems. Although the author sees no \u2022major obstacles in doing so for most of the topics covered in this thesis, some efforts are needed to identify the proper process model when there are some feedforward control or coupled loops etc. 2. Extend the work for integrating and non-linear systems. For an integrating sys-tem, since the integrator - will magnify the noise, it becomes much more difficult s to identify the proper dynamics of the process for regulatory control. Also for a non-linear system, it is not sufficient to describe the system by a rational func-tion of polynomials. Nonlinear control systems have not been well described even mathematically. 3. For certain types of process models, the optimal PID derived using the algorithm in chapter 3 may not be physically implementable. Therefore, certain constraints may be needed to ensure that the integral and derivative time constants are posi-tive. However, the concept to derive a controller by minimizing the variance of the process output will be the same. Appendix A Computer Programs In this section, programs written to verify the theory presented in the thesis will be included. f u n c t i o n [F,vw]=lse_f(y,b,n,m); 7. \u00b0\/0 Routine to c a l c u l a t e the variance of white noise and the % monic moving average polynomial. \u2022\/. \u00b0\/0 C a l l i n g sequence: 1 % f u n c t i o n [F,vw]=lse_f(y,b,n,m); y. \u00b0\/0 Input arguments: % y : the closed-loop data. % b : time delay of the process i n c l u d i n g d i s c r e t i z a t i o n delay. % n : number of the samples. % m : number of c o e f f i c i e n t s of alpha we want to choose to estimate alpha. % Output arguments: % F : y( t ) = F*w(t) + alpha* y ( t - b ) ; where F i s moving average model \u00b0\/\u201e of futu r e noise. w(t) i s white noise. Define ee=F*w. % vw : variance of the white noise. 100 Appendix A. Computer Programs 101 y. i % Least squares estimation for a time series model of output y(t) . 1 y(t)=Sum (k from 1 to m) alpha(k) * y(t-b-k+l) +ee. I yy( l , l )=y (n , l ) ; for 1=1:n-b-m yy( l+ l , l ) = y ( n - l , l ) ; end g=0; for r=l:n-m-b+1 x=n-b-g; for c=l:m X(r,c)=y(x, l) ; x=x-l; end g=g +i; end M=X'*X; N=inv(M); alpha=N*X'*yy; mv=(yy-X*alpha)'*(yy-X*alpha)\/(n-b-2*m+l) % Calculate F and the variance of white noise w(t). ee=(yy-X*alpha); % calculate autocovariances of ee. Appendix A. Computer Programs 102 f o r i=0:b-l cm=cov(ee(i+l:n-m-2,1),ee(l:n-m-2-i,1)) % cm i s the covariance matrix, gamma(i+1,l)=cm(2,1); end gamma pause , [F,var_w]=ma_id(gamma); vw=var_w; f u n c t i o n [Fl,var_w]=ma_id(gamma); 1 \u00b0\/o I d e n t i f i c a t i o n algorithm f o r a Moving Average % time s e r i e s given the autocovariances. y. % C a l l i n g sequence: y. % [F,var_w]=ma_id(gamma); % Input arguments: y. gamma : The autocovariances s t a r t i n g from l a g 0 to d=b-l where d % i s the pure process delay. % Output arguments: y. F l : The moving average parameter vector. y. var_w The variance of the white noise. y. Appendix A. Computer Programs 103 % % q=length(gamma)-1; b=zeros(q,q); F=zeros(q,1); nF=zeros(q,1); gm=gamma(2:q+l,l)\/gamma(l,l); err=l; i ter= l ; while (iter<100&err>le-ll) for i = l : q - l for j = l :q - l m=i+j ; i f (m<=q) b( i , j )=F(m,l ) ; end; end; end; nF=b*F-(1+F'*F)*gm; i ter=iter+l ; err=(nF-F)'*(nF-F)\/q; F=nF; end; F l = [ l ; - F ] ; % Notice the or ig ina l F doesn't have the f i r s t coeff icient 1, also i t i s negative Appendix A. Computer Programs 104 l = l e n g t h ( F l ) ; i f 1==1 var_w=gamma(l,1) ; e l s e var_w=gamma(l,l)\/(l+F'*F); end f u n c t i o n [Gl]=pid_con(a,b,c,y,n) t % \u00b0\/0 Routine to c a l c u l a t e the matrix E which i s used i n E*G1=F to obtain the optimal PID c o n t r o l l e r parameters G l . '\/. I \u00b0\/0 Input v a r i a b l e s : % a, b, c : polynomials i d e n t i f i e d from the open loop or closed-loop data. % Note here 'a' doesn't contain i n t e r g a l which assumes that D ha: an i n t e g r a l . Parameters put as column. % y : open loop or close loop output data. \u00b0\/o n : the number of samples % n l : The order or degree of the quotient polynomial from 1\/c. \u00b0\/0 Output v a r i a b l e s : % Gl : The optimal PID c o n t r o l l e r parameters. % % PID c o n t r o l l e r : Appendix A. Computer Programs 105 I G1\/G2 = [ g 0 + g l * z - ( - l ) + g 2 * z - ( - 2 ) ] \/ [ l - z - ( - l ) ] . y. Therefore Gl=[gO g l g2] ' . y. '\/. Equation E*G1=F. y. '\/, E=sum_i(l~n){a*a*y_i*y_i} sum_i(l~n){a*a*y_i-l*y_i} sum_i(l~n){a*a*y_i-2*y_i} y. *\/, sum_i(l~n){a*a*y_i-l*y_i} s u m _ i ( l ~ n ) { a * a * y _ i - l * y _ i - l } sum_i(l~n){a*a*y_i-2*y_i-'\/. '\/. sum_i(l~n){a*a*y_i-2*y_i} sum_i(l~n){a*a*y_i-2*y_i-l} sum_i(l~n){a*a*y_i-2*y_i-y. y. y. '\/o F=[sum_i(l~n){b*a*y_i*y_i} sum_i(l~n){b*a*y_i-l*y_i} sum_i(l~n){a*a*y_i-2*y_i}] y. \u00b0\/0 Here 1\/c = d, a = a*d, b = b*d from equation (3) . y. % Since E i s f u l l rank, Gl = E\"(-1)*F. y. [d] = p o l y d i v ( c , [ l ] , n ) ; [al]= polymul(a,d); [bl]= polymul(b,d); el1=0;el2=0;el3=0;e22=0;e23=0;e33=0;f1=0;f2=0;f3=0; f o r t=n:2*n suml=0;sum2=0;sum3=0;sum4=0; f o r i=0:n; Appendix A. Computer Programs 106 i f ( i < t ) s u m l = s u m l + a l ( i + l , l ) * y ( t - i , l ) ; sum4=sum4+bl(i+l,l)*y(t-i,l); end end f o r j=0:n; i f ( j < ( t - l ) ) sum2=sum2+al(j+l,l)*y(t-j-l,l); end end f o r j=0:n; i f ( j < ( t - 2 ) ) sum3=sum3+al(j+l,1) *y ( t - j - 2 , 1 ) ; end end ell=ell+suml*suml; el2=el2+suml*sum2; el3=el3+suml*sum3; e22=e22+sum2*sum2; e23=e23+sum2*sum3; e33=e33+sum3*sum3; fl=fl+suml*sum4; f2=f2+sum2*sum4; Appendix A. Computer Programs 107 f3=f3+sum3*sum4; end E= [ e l l el2 el3; el2 e22 e23; el3 e23 e33]; % C a l c u l a t e l a t r i x F. F = [ f l ; f 2 ; f 3 ] ; % C a l c u l a t e the optimal PID c o n t r o l l e r parameter. Gl=inv(E)*F; f u n c t i o n [quot,rem]=polydiv(den,num,n) y. % Routine to c a l c u l a t e the c o e f f i c i e n t s of % the quotient and remainder polynomials % of 2 polynomials. I % C a l l i n g sequence: % % [quot,rem]=polydiv(den,num,n); y. % Input v a r i a b l e s : % num : The numerator monic polynomial. % den : The denominator monic polynomial. Mote : i f the Appendix A. Computer Programs 108 % polynomial i s not monic, f a c t o r the f i r s t c o e f f i c i e n t out. n : The order or degree of the % quotient polynomial. % % Output v a r i a b l e s : % quot : The quotient polynomial. !v rem : The remainder polynomial. % I i f den(l,l)==l & num(l,l)==l p=length(den) - 1 ; q=length(num)-1 ; xquot=zeros(n,1) ; i f (q>=D xnum=-num(2:q+l,1); e l s e q=0; xnum(l,1)=0; end; i f (p<=0) error('The denominator i s a s c a l a r ' ) ; end; xden=-den(2:p+l,l); xquot (1,l)=xnum(l,1)-xden(l,1) ; f o r j=2:1:n, Appendix A. Computer Programs 109 x q u o t ( j , 1 ) = 0 . 0 ; f o r i = l : j - l , i f (i<=p) xquot(j,l)=xquot(j,l)+xden(i, 1 )*xquot(j-i, 1 ) ; end; end; i f (j<=q) xquot(j,l)=xquot(j,l)+xnum(j , 1 ) ; end; i f (j<=p) xquot(j,l)=xquot(j, 1 )-xden(j, 1) ; end; end; quot=[l -xquot']'; [reml]=polymul(den,quot); m=max(length(reml),length(num)); rem2=zeros(m,1); r e m 2 ( l :q+l',l)=num; rem0=rem2-reml; rem=remO(n+2:m,1); e l s e r=num(l,l)\/den(l, 1 ) ; den=den\/den(1,1);num=num\/num(1,1); p=length(den)-1 ; q=length(num)-1; Appendix A. Computer Programs 110 xquot=zeros(n,1); i f (q>=D xnum=-num(2:q+l,1); e l s e q=0; xnum(l,1)=0; end; i f (p<=0) e r r o r ( ; T h e denominator i s a s c a l a r 1 ) ; end; xden=-den(2:p+l,l); xquot(1,l)=xnum(l,1)-xden(l,1); f o r j=2:1:n, xquot(j,1)=0.0; f o r i = l : j - l , i f (i<=p) xquot(j,l)=xquot(j,l)+xden(i,1)*xquot(j-i,1); end; end; i f (j<=q) xquot(j,l)=xquot(j,l)+xnum(j,1); end; i f (j<=p) xquot(j,l)=xquot(j,l)-xden(j,1) ; end; end; Appendix A. Computer Programs quot=[l -xquot']'; [reml]=polymul(den,quot); m=max(length(reml),length(num)); rem2=zeros(m,l); r em.2 (1: q+1,1) =num; rem0=rem2-reml; rem=rem0(n+2:m,1); quot=quot*r; rem=rem*r; end f u n c t i o n [c]=polymul(a,b); y. \u00b0\/0 Function to m u l t i p l y two polynomials y. % C a l l i n g sequence: [c]=polymul(a,b); y. % Input argument: % a : Column of input polynomial c o e f f i c i e n t s % b : Column of input polynomial c o e f f i c i e n t s y. y. % Output argument: Appendix A. Computer Programs 112 I % c : Column of r e s u l t a n t polynomial c o e f f i c i e n t s , c = a*b. '\/. y y. [m,n]=size(a); i f (m==l) degreea=n; e l s e degreea=m; end; [m,n]=size(b); i f (m==l) degreeb=n; e l s e degreeb=m; end; degreec=degreea+degreeb-l; f o r i=l:degreec c(i,l ) = 0 ; f o r j = l : i m=i+l-j; i f (j<=degreea&m<=degreeb) c ( i , l ) = c ( i , l ) + a ( j , l ) * b ( i + l - j , l ) ; end; end; Appendix A. Computer Programs 113 end; % Routine to ca l cu la te the contour f o r % the same value of the process output var iance. % Inputs arguments: \u00b0\/\u201e PID c o n t r o l l e r form as fo l l ows . X Gc = (c.l+c2B+c3B\"2)\/(l-B) ; '\/\u201e c l = (kc+ki+kd); c2 = -(kc+2kd); c3 = kd; y. % Process model % et=(1-0.908B)*at\/(l-mlB-m2B~2-m3B~3-m4B~4-m5B~5) y. Here 4\/\u201e B i s backward s h i f t operator. % et i s the er ror at the output, % at i s the white noise sequence with var iance of 2.37 X ml = 2 .208-0 .168c l ; m2 = -1.310+0.5cl-0.168c2; y. m3 = -0.052+0.028cl+0.05c2-0.168c3; y. m4 = 0.154+0.028c2+0.05c3; m5 = 0.028c3; y. y. c i g ; c l e a r ; kd=0; i=0; f o r k i = l : 0 . 1 : 4 ; i= i+ l ; Appendix A. Computer Programs v k i ( i , l ) = k i ; j= 0 ; for k c = 4 : 0 . 1 : 9 ; vkc(j,1)=kc; c l = (kc+ki+kd); c 2 = -(kc+2*k