• No results found

A practical approach to detection of plant model mismatch for MPC

N/A
N/A
Protected

Academic year: 2021

Share "A practical approach to detection of plant model mismatch for MPC"

Copied!
73
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

A practical approach to detection of plant model

mismatch for MPC

Examensarbete utfört i Reglerteknik vid Tekniska högskolan i Linköping

av

Rickard Carlsson

LiTH-ISY-EX--10/4348--SE Linköping 2010

Department of Electrical Engineering Linköpings tekniska högskola

Linköpings universitet Linköpings universitet

(2)
(3)

A practical approach to detection of plant model

mismatch for MPC

Examensarbete utfört i Reglerteknik

vid Tekniska högskolan i Linköping

av

Rickard Carlsson

LiTH-ISY-EX--10/4348--SE

Handledare: Abhijit Badwe

ABB Corporate Research, Bangalore, India

Henrik Ohlsson

isy, Linköpings Universitet

Examinator: Alf Isaksson

isy, Linköpings Universitet Linköping, 19 May, 2010

(4)
(5)

Avdelning, Institution Division, Department

Division of Automatic Control Department of Electrical Engineering Linköpings universitet

SE-581 83 Linköping, Sweden

Datum Date 2010-05-19 Språk Language ◻Svenska/Swedish ◻Engelska/English ◻ ⊠ Rapporttyp Report category ◻Licentiatavhandling ◻Examensarbete ◻C-uppsats ◻D-uppsats ◻Övrig rapport ◻ ⊠

URL för elektronisk version

http://www.control.isy.liu.se http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-56581 ISBNISRN LiTH-ISY-EX--10/4348--SE

Serietitel och serienummer Title of series, numbering

ISSN

Titel Title

En industriellt anpassad metod för detektering av modellfel hos MPC regulatorer A practical approach to detection of plant model mismatch for MPC

Författare Author

Rickard Carlsson

Sammanfattning Abstract

The number of MPC installations in industry is growing as a reaction to demands of increased efficiency. An MPC controller uses an internal plant model to run real-time predictive optimization of future inputs. If a discrepancy between the internal plant model and the plant exists, control performance will be affected. As time from commissioning increases the model accuracy tends to deteriorate. This is natural as the plant changes over time. It is important to detect these changes and re-identify the plant model to maintain control performance over time.

A method for identifying Model Plant Mismatch for MPC applications is devel-oped. Focus has been on developing a method that is simple to implement but still robust. The method is able to run in parallel with the process in real time. The efficiency of the method is demonstrated via representative simulation examples.

An extension to detection of nonlinear mismatch is also considered, which is important since linear plant models often are used within a small operating range. Since most processes are nonlinear this discrepancy is inevitable and should be detected.

Nyckelord

Keywords Model Predictive Control, Model Plant Mismatch, Error Detection, Partial Cor-relation

(6)
(7)

Abstract

The number of MPC installations in industry is growing as a reaction to demands of increased efficiency. An MPC controller uses an internal plant model to run real-time predictive optimization of future inputs. If a discrepancy between the internal plant model and the plant exists, control performance will be affected. As time from commissioning increases the model accuracy tends to deteriorate. This is natural as the plant changes over time. It is important to detect these changes and re-identify the plant model to maintain control performance over time.

A method for identifying Model Plant Mismatch for MPC applications is de-veloped. Focus has been on developing a method that is simple to implement but still robust. The method is able to run in parallel with the process in real time. The efficiency of the method is demonstrated via representative simulation examples.

An extension to detection of nonlinear mismatch is also considered, which is important since linear plant models often are used within a small operating range. Since most processes are nonlinear this discrepancy is inevitable and should be detected.

Sammanfattning

Ökade krav på effektivitet gör att industrin söker efter mer avancerad processtyr-ning. MPC har växt fram som en kandidat. En MPC regulator änvänder en modell av systemet för att samtidigt som systemet körs utföra en optimering av framtida styrsignaler. Om modellen innehåller felaktigheter kan reglerprestandan påverkas. En modell försämras normalt då tiden från idrifttagning växer eftersom systemet förändras med tiden. Det är av största vikt att upptäcka dessa förändringar och sedan uppdatera modellen för att reglerprestandan inte ska påverkas.

Avsikten är att utveckla en metod för att upptäcka modellfel med fokus på att den ska vara enkel att implementera. Det ska även vara möjligt att använda metoden parallellt med en process. För att utvärdera metoden så körs den på ett antal representativa simuleringsexempel.

Det har även varit en avsikt att utveckla en metod för detektion av ickelin-jära modellfel. Motivet till det är att linickelin-jära modeller används för att beskriva ickelinjära processer och då är modellfel naturliga.

(8)
(9)

Acknowledgments

I would like to acknowledge my supervisor at ABB INCRC in Bangalore, India, Abhijit Badwe. He supplied me with an interesting problem to tackle, but also the guidance necessary to solve it. I must also thank the whole Control and Optimization group for their patience with the large number of questions about the Indian society and for making my stay a true experience.

The quality would not have been as high without the support and demands from my supervisor Henrik Ohlsson at Linköping University. I must also mention that all this became possible thanks to my examiner Alf Isaksson, who initiated the contact with ABB in Bangalore.

Last, but not least, I must send appreciation to my friends and family for their support throughout my studies at Linköping University.

Linköping, May 2010 Rickard Carlsson

(10)
(11)

Contents

1 Introduction 1 1.1 Background . . . 1 1.2 Motivation . . . 2 1.3 Method . . . 2 1.4 Scope . . . 2 1.5 Goals . . . 2 1.6 ABB INCRC . . . 3 1.7 Related work . . . 3 1.8 Report outline . . . 3 2 Preliminaries 5 2.1 Industrial process control . . . 5

2.2 MPC . . . 6

2.2.1 Structure of MPC . . . 6

2.2.2 MPC theory . . . 7

2.2.3 Control and prediction horizon . . . 7

2.2.4 Optimization criteria . . . 8

2.2.5 Constraints . . . 8

2.2.6 Performance measures of MPC . . . 9

2.2.7 Impact of poor models on MPC performance . . . 9

3 Detection of Linear Model Plant Mismatch 11 3.1 Introduction . . . 11

3.2 Structure of MPM . . . 11

3.3 Correlation . . . 12

3.4 Partial correlation . . . 13

3.5 Partial correlation and detection of MPM . . . 14

3.5.1 Partial correlation controlling for previous inputs . . . 15

3.6 Remarks . . . 17

3.6.1 Number of lagged variables . . . 17

3.6.2 Setpoint excitation . . . 17

3.6.3 Time . . . 17

3.6.4 Noise levels . . . 18

3.6.5 Correlation threshold . . . 18 ix

(12)

x Contents

3.6.6 Computational effort . . . 18

4 Simulation Case Studies - Detection of Linear MPM 19 4.1 Scenario 1 . . . 20 4.2 Scenario 2 . . . 22 4.3 Scenario 3 . . . 24 4.4 Scenario 4 . . . 26 4.5 Parameter sensitivity . . . 28 4.6 Summary . . . 30

5 Simulations on a Recovery Boiler model 31 5.1 Simulation setup . . . 31

5.1.1 MPC controller and MPM detection in Matlab . . . 32

5.1.2 OPC interface . . . 32

5.1.3 AC800M . . . 32

5.1.4 Dymola/Modelica plant model . . . 32

5.2 Identification of linear process model for use in MPC . . . 34

5.3 Tuning of MPC . . . 36

5.3.1 MPC performance at commissioning . . . 37

5.4 Introduction of Model Plant Mismatch . . . 37

5.4.1 Effect of MPM on controller performance . . . 38

5.5 Detection of MPM . . . 40

5.5.1 Re-identification of plant model . . . 41

5.5.2 Control performances with updated model . . . 42

5.6 Summary . . . 43

6 Detection of Nonlinear MPM 45 6.1 Spearman’s rank coefficient . . . 45

6.2 Nonlinear partial correlations . . . 46

6.3 Simulation - Polynomial expansion . . . 46

6.3.1 Scenario 1 . . . 47

6.3.2 Scenario 2 . . . 48

6.4 Kernelized partial correlations . . . 49

6.4.1 Kernelized regression . . . 49

6.4.2 Kernel functions . . . 50

6.4.3 Regularization . . . 50

6.4.4 L2 regularization . . . 51

6.4.5 Reduce dimensionality - PCA . . . 51

6.4.6 Part of K matrix . . . 51

6.5 Results - Kernelized partial correlation . . . 51

6.6 Summary . . . 52

7 Discussion and Conclusion 53 7.1 Detection of linear MPM . . . 53

7.1.1 Recovery boiler study . . . 53

7.2 Detection of nonlinear MPM . . . 54

(13)

Contents xi

8 Future Work 55

(14)
(15)

Chapter 1

Introduction

As a result of increasing demands in production efficiency, industry turns to more advanced process control systems [4]. One class of advanced controllers are model predictive control (MPC). A MPC controller uses a plant model and the current state to estimate the optimal (according to some criteria) series of future inputs. MPC also incorporates bounds on both input and output variables in a natural way [22]. For a model based MIMO controller that suffers from poor modeling in a single channel, multiple outputs can be affected [22].

It is important to identify a model plant mismatch (MPM) to assist in re-identification and tuning of the controller as well as to keep a continued mainte-nance program to receive the productivity gains from MPC [4]. Up to 60% of all industrial controllers have some performance issues [10]. In many industries intru-sive plant tests are associated with high costs due to large production losses. An algorithm that provides information on which input-output relations that experi-ence MPM would speed up the re-identification process and reduce the downtime of the plant.

1.1

Background

Performance assessment of controllers is a field of interest for academia and indus-try even though in the case of MPC focus has been on finding a limit for optimal control. The control performance of MPC depends mainly on three factors; a) the accuracy of the internal plant model, b) the tuning of the controller and c) discrepancies in the noise model [22].

As MPM can be a limiting factor for the performance of MPC controllers the presence of it does not directly imply reduced performance. Depending on the tuning of the MPC controller the performance may be improved or reduced with MPM present, and this duality makes it hard to find optimal performance for MPC controllers [21].

When performance of a controller is reduced the first step would therefore be to correct for any MPM. The likelihood of achieving satisfying controller performance through retuning increases if the plant model is correct [21].

(16)

2 Introduction

1.2

Motivation

The motivation behind developing a method for detection of MPM is to reduce the required time for re-identification by isolating the input-output relations that contain significant MPM. A full plant test can take 5-15 days to complete and if the required time is reduced, large cost savings can be made [20].

1.3

Method

The proposed technique is a simplification of the method presented in [3] where a method for detection of linear MPM is developed. An extension that also seeks to introduce detection of nonlinear MPM is introduced in this thesis. The method is demonstrated via representative simulation examples.

1.4

Scope

The argumentation will be based on a simulation study and real data will not be tested. The method is to be used on runtime data. A verification of the method would require plant data, the faulty model and a new updated plant model for comparison, but no data fulfilling these requirement were available for this thesis. Only limited theoretical evidence will be provided as this is not the focus of the study.

1.5

Goals

The goal is to develop a method that is capable of detecting MPM in MPC appli-cations. The method should also be automatic in order to run in parallel with a industry process.

Primary goals

To develop a method for detection of MPM that is: • capable of running in parallel with a process. • easy to adapt and implement.

• able to identify the input-output relations that experience MPM. • general and applicable in different types of plants.

Secondary goals

(17)

1.6 ABB INCRC 3

1.6

ABB INCRC

The work presented in this thesis was carried out at ABB Corporate Research Center, Bangalore, India. The Control and Optimization group there focuses on modeling and control in process industries.

1.7

Related work

Previous work on MPC was focused on attaining optimal performance. One ma-jor contribution to this field is the development of minimum variance controllers (MVC, [9]). MVC defines a bound on the variance performance of unconstrained controllers. Since MPC is a constrained controller an index based on a linear quadratic gaussian controller (LQG) can solve this issue [11].

Methods for detection of faults have been concentrated on sensors and actua-tors, and different techniques based on observer residuals and principal component analysis (PCA) have been discussed [12], [7]. The observer and residual based methods are not suitable for MPC due to large variations in different MPM:s.

[13] presents how to identify the matrix A, B or C that contains the error, but it does not specify in which input-output relation. Therefore limited help is provided considering re-identification

Overall this thesis is based on the work presented in [3].

1.8

Report outline

Chapter 1 introduces the topic, problem, motivation, goals and gives a summary of previous related research. Theory related to the topic is presented in Chapter 2. The proposed method is developed and discussed in Chapter 3, while Chapters 4 and 5 cover simulations on the method developed in the previous chapter. The motivation and introduction of detection of nonlinear MPM is discussed in Chapter 6. Chapter 7 covers conclusions and future work.

(18)
(19)

Chapter 2

Preliminaries

Relevant background theory related to control of industrial processes and MPC is here presented. This covers an introduction to industrial control systems. The idea and the structure of MPC is also discussed.

2.1

Industrial process control

A complete control system for large scale industrial processes is a combination of several control layers, each with different priorities. A typical structure for controlling an industrial process is exemplified in Figure 2.1.

Figure 2.1. Overview of industry process control system

LP - layer The overall optimization of production in a longer perspective is

controlled by the linear programming layer (LP). This takes material supply and 5

(20)

6 Preliminaries

demand, price fluctuation and other economical parameters into consideration and is normally done for a whole industrial site.

MPC - controller With setpoints from the LP-layer the MPC controller tries

to optimize the production of a single processing unit. It keeps the process within specified safe operating ranges and optimizes production based on the rules decided in the layer above.

Low level control Keep for example flows and temperature at their setpoint

given by the MPC.

Industrial Process The actual process that should be controlled.

2.2

MPC

A MIMO system have m inputs u and n outputs y,

u(k) = ⎡⎢ ⎢⎢ ⎢⎢ ⎢⎢ ⎣ u1(k) u2(k)um(k) ⎤⎥ ⎥⎥ ⎥⎥ ⎥⎥ ⎦ , y(k) = ⎡⎢ ⎢⎢ ⎢⎢ ⎢⎢ ⎣ y1(k) y2(k)yn(k) ⎤⎥ ⎥⎥ ⎥⎥ ⎥⎥ ⎦ .

Different structures are available in order to model the relations between u(k) and

y(k). The most common model structure is Linear Time-Invariant (LTI) systems

(see e.g. [8]). The system output is a linear map from u to y where superposition and time-invariance rules apply. Different types of formulations of LTI-systems are for example transfer functions (TF) and state space (SS).

2.2.1

Structure of MPC

An MPC controller is similar to the structure of Internal Model Control (IMC, see e.g. [22]). In some examples, the MPC controller will be replaced by an IMC-controller because there is no explicit model in the LTI-framework capable of describing an MPC. The difference between IMC and MPC lies in how the controller Q is calculated.

IMC controller

The objective of an IMC controller is to control the plant G, e.g keep the plant output y close to the reference signal r, Figure 2.2. IMC uses a plant model

ˆ

G running in parallel with the plant and the plant output y is compared with

the model output ˆy. v captures all unknown disturbances in the system and is

a combination of process and measurement noise. The error between the plant output and model output is fed back to the controller Q. Q is normally chosen as the inverse of the plant model combined with a low pass filter of order r,

Q= 1

ˆ

Gf, f=

1

(21)

2.2 MPC 7

Figure 2.2. IMC model structure

The model error e, the difference between the true output and the model output can be expressed as,

e(k) = y(k) − ˆy(k) =∆u(k) + v(k), (2.2)

≜ G − ˆG, (2.3)

were ∆ captures the deterministic modeling error. The additive structure of ∆ can easily be transformed into multiplicative form, ∆ = G − ˆG = (1 + ∆mult)G.

The noise enters the system only at the output level and this structure is therefor referred to as Output Error (OE see e.g. [16]). An OE-model is chosen because of its separation of deterministic modeling errors and process noise.

2.2.2

MPC theory

The development of MPC was originally made by two independent research groups in the 70’s, ADERSA and Dynamic Matrix Control [20]. MPC has developed since then and many commercial packages are available. The formulation of MPC presented in this section is based on the theory presented in [22].

MPC is a controller Q, performing an optimization routine at each sample step. The current state of the system and future setpoints are used to generate an optimal series of control signals[u(k), u(k + 1), u(k + 2), . . . ], from which only the first one is implemented and at the next iteration a new series is generated, Figure 2.3.

2.2.3

Control and prediction horizon

Predictions of the system are normally limited in time in order to create a finite optimization problem that can be solved. Two different limits are used; control horizon, M, and prediction horizon, P. At each step the controller calculates a series of M future control signals,[u(k), u(k+1), . . . , u(k+M −1)]. The system behavior is then evaluated up to prediction horizon P ≥ M, with u(k) kept constant for

(22)

8 Preliminaries

Figure 2.3. MPC concept: At time k, the current state (x) and the future setpoints

(- - -), are used to calculate an optimal series of control signals (⋯⋯) , that should result in the predicted outputs (O), after that the first control signal () is implemented.

2.2.4

Optimization criteria

Different cost functions could be used as optimization criteria. Common is to try to reduce the predicted control error, ˆec(k) = r(k) − ˆy(k), and change rate of inputs,

ud(k) = u(k)−u(k−1). It is important to remember that it is the predicted control

error that is minimized, not the control error ec(k) = r(k) − y(k). The predicted

control error is calculated based on the plant model and the minimization criteria is then J(ud) = Pk=1 ˆ eTc(k)Wˆec(k) + udT(k)Wdud(k). (2.4)

This is a convex optimization problem that is easily solved with available methods. The weighting of Wd is related to the aggressiveness of the controller.

2.2.5

Constraints

An MPC can handle constraints on input and output signals in a natural way. Constraints are normally formulated as inequality constraints;

u(k) ≤ u(k + j) ≤ u+(k)

j= 0, 1, . . . , M − 1, (2.5)

u

d(k) ≤ ud(k + j) ≤ u+d(k) j= 0, 1, . . . , M − 1. (2.6)

Constraints on predicted outputs ˆy are normally formulated as soft constraints.

Soft constraints are created by introducing slack variables, sj, into the inequality

constraints,

y(k + j) − s

j ≤ ˆy(k + j) ≤ y

+(k + j) + s+

(23)

2.2 MPC 9 With S = [s0, s + 0, . . . , sp, s +

p] and T as the weighting matrix for S, the updated

minimization criteria is J(ud) = Pk=1 ˆ eT(k)Wˆe(k) + udT(k)Wdud(k) + STT S. (2.8)

Note that the constraints are on the predicted output ˆy, the true output y may be

violating the constraints if the predictions are not accurate. For this reason MPM can have an impact on control performance and safety.

2.2.6

Performance measures of MPC

If the controller is able to control the process the variance is a standard criterion for controller performance. If the objective is to find a limit on optimal performance a LQG based index could be used (see e.g. [11]). But assessing optimal performance is not the focus of this thesis.

If the controller has problems controlling the process one possible measure of MPC performance is the percentage running time. It is defined as the ratio between the active time for the MPC and the total running time (see e.g. [22]). This index is not suitable for a simulation study as there is no operator to turn off the MPC and run a manual control scheme.

A third performance measure is how much of the total time each input operates at its limit. A controller that operates the inputs at the level of the constraints large parts of the time have less degrees of freedom to control the plant.

2.2.7

Impact of poor models on MPC performance

At each step an MPC makes a prediction of future states based on the informa-tion available, predicinforma-tion is based on the internal plant model. The optimizainforma-tion criterion is based on the predicted error. If this model has discrepancies, MPM, with the real plant the prediction will not be accurate. As a result of this, control performance may be affected. The actual effect of MPM depends on the mismatch but also on the tuning of the controller. The more aggressive a controller is, the more it amplifies the effect of a mismatch [22].

(24)
(25)

Chapter 3

Detection of Linear Model

Plant Mismatch

3.1

Introduction

As defined in (2.2), e(k) = ∆u(k) + v(k), the model error consists of two com-ponents. One deterministic part that is the result of MPM, and another caused by noise. The deterministic part that originates from MPM is the one of interest here. The assumption in this chapter is that there is a component described by a linear time invariant model (LTI) in ∆, that is a gain or delay mismatch. This will make e correlated with u. A nonzero correlation between e and u would imply presence of MPM in the corresponding MV-CV channel.

3.2

Structure of MPM

Let an LTI-model describe the system by a number of transfer functions relating

u to y. y(k) =⎡⎢⎢⎢ ⎢⎢ ⎣ G11 . . . G1nGjiGm1 . . . Gmn ⎤⎥ ⎥⎥ ⎥⎥ ⎦ u(k). (3.1)

Consider a 2-by-2 example where the true plant model differs from the plant in

G11, e.g. ∆11≠ 0.

e(k) = [∆11 0

0 0]u(k) + v(k) (3.2)

Observing a nonzero e1will not indicate whether the modeling error is attributable

to G11 or G12. If a channel is not excited the modeling error would not be

ob-servable, and a systematic scheme could be used to excite each channel separately. This method could be feasible for a small 2 by 2 example but becomes troublesome for more realistic MPC problems with larger model matrices and will inevitably

(26)

12 Detection of Linear Model Plant Mismatch

also result in production disturbances. It is more desirable to perform this analy-sis with normal operating data. If it would be possible to analyze the correlation between e1and u1, u2 respectively with the effect of the other input removed, this

would identify in which channel the error is present [3]. Under the assumption that ∆ is modeled by an LTI-system, this will make e an amplified and phase shifted version of the input u (see e.g. [8]).

3.3

Correlation

Let xi and yi, i= 1, 2, . . . N, be samples from two stochastic processes X and Y .

The correlation between the sample vectors x and y is defined as

Corr(x, y) ≜ Cov(x, y) V ar(x)V ar(y), Cov(x, y) ≜ ∑ N k=1(xk− ¯x)(yk− ¯y) N− 1 , V ar(x) = Cov(x, x). (3.3)

were ¯x and ¯y are the arithmetic means of x and y respectively. For a system with m inputs u and n model errors e (outputs) this will result in a correlation matrix,

Corr(u, e) =⎡⎢⎢⎢ ⎢⎢ ⎣ Corr(u1, e1) . . . Corr(u1, en) ⋮ ⋱ ⋮ Corr(um, e1) . . . Corr(um, en) ⎤⎥ ⎥⎥ ⎥⎥ ⎦ . (3.4)

A nonzero entry indicates the existence of a connection between the input ui

and error ej, which implies that modeling errors are present in ˆGji. Correlation

is calculated for different lags d= 0, 1, . . . to form normalized cross-correlations

Corr(u(k − d), e(k)). Due to feedback and system properties correlation

calcu-lations could fail in identifying the poor model, where u are correlated amongst themselves and noise is present in the system. This is discussed in Examples 3.1 and 3.2.

Example 3.1: Issues with feed back and detection of MPM

Suppose a plant G is controlled using an IMC structure with a controller Q. Con-sider a situation where the model captures the plant dynamics exactly, that is

G= ˆG. Let

G= 1+s1 , Q= G−1f, f =1+s1 .

With ∆= 0 in (2.2) Ô⇒

e(t) = v(t)

u(t) = Q (r(t) − e(t)) = Q(r(t) − v(t))

This results in,

u(t) = Q(r(t) − v(t)) = 1+ s

1+ s(r(t) − v(t)) = r(t) − v(t), (3.5) which implies that u(t) is correlated with the modeling error e(t) due to the feed-back of noise. u(t) and e(t) can hence be correlated even though the model equals the true plant i.e., ∆= 0.

(27)

3.4 Partial correlation 13

Another concern is that the different inputs u can be strongly correlated. In that case a number of false indications are possible, a problem that is exemplified in Example 3.2.

Example 3.2: Correlation among inputs

Consider the system presented in Section 3.2, using the same notation as in the IMC-structure in Figure 2.2. A modeling error is introduced in ∆11, resulting in

correlation between u1and e1, but the structure will make u2correlated with u1.

u(k) = Qr(k) − Q[∆u(k − 1) + v(k − 1)] (3.6)

There is zero correlation between the inputs u only when Q and ∆ are diagonal and if v is uncorrelated between the channels. If a correlation calculation is made between u2 and e1, a correlation can be shown, but this is not due to modeling

errors in ∆12, only because of the structure of the controller. Therefore this could

result in false identification of MPM.

In reality, nonzero off diagonal elements are common, for example when a combustion process is analyzed, e.g. flow of fuel and airflow are highly correlated.

3.4

Partial correlation

Let xi and yi again be samples from two stochastic processes X and Y . Suppose

there exists another variable Z that affects both X and Y . Then, in order to accurately measure the correlation between X and Y the correlation should be controlled for variations in Z. Otherwise, the correlation between X and Y would be corrupted by the effects from Z. This is called partial correlation between x and

y controlling for z, where z is the sample vector from Z. This is represented as,

P arCorr(x, y∣z). (3.7) There exists multiple methods of calculating partial correlations, one possible method is,

By= (zTz)−1zTy, (3.8)

ry= y − zBy, (3.9)

Bx= (zTz)−1zTx, (3.10)

rx= x − zBx, (3.11)

P arCorr(x, y∣z) = Corr(rx, ry). (3.12)

The correlation between the residuals rxand ryis the partial correlation between

x and y controlling for variation in z. A graphical interpretation of (3.12) is

given in Figure 3.1. The interpretation is that the correlation between x and y is performed in an orthogonal plane to the subspace of z.

(28)

14 Detection of Linear Model Plant Mismatch

Figure 3.1. Graphical interpretation of partial correlation, x and y are projected on

the space orthogonal to z.

3.5

Partial correlation and detection of MPM

Partial correlation is calculated between ui and ej controlling for other inputs for

different time lags d= 0, 1, 2, . . . to create partial cross-correlations. Let

˜

ui(k) = [u1(k), . . . , ui−1(k), ui+1(k), . . . , um(k)] , (3.13)

and compute

P arCorr(ui(k − d), ej(k)∣˜ui(k − d)). (3.14)

A significant correlation implies that ∆ in (2.2) is not zero and modeling errors are present. One concern by using partial correlations in the direct way as described in (3.14) is that data is collected in closed loop. The error e(k) is used for feedback and makes u(k) correlated with previous u as well with the noise v. The noise v may already be colored when it enters the system since no assumptions are made about the distribution of v. With ∆= 0, partial correlations for different lags d could show a significant relation between the error e(k) and the input u(k − d) due to feedback and noise, as exemplified in Example 3.1. It is also necessary to remove the dynamic contribution from previous inputs as pointed out in Example 3.2. Inputs at time k will affect the system in the future for k+1,k+2,. . . , due to dynamics in the system.

Existing method An existing approach solving the problems presented in

pre-vious section is presented in [3]. This existing method is based on partial correla-tions and estimation of OE-models to regenerate system inputs. This results in a method that is hard to automate, where many parameters need to be chosen and that is computationally intensive. A simplification of this method would make the idea more appealing to industry.

(29)

3.5 Partial correlation and detection of MPM 15

3.5.1

Partial correlation controlling for previous inputs

The method presented in Section 3.5 does not address all issues with detection of MPM. It does not handle effects due to dynamics in the system. It is desirable to correlate ui and ej with the effect of other inputs completely removed. In (3.14)

the influence of previous inputs is not considered, that is, effects due to system dynamics are not taken into account. A natural extension would then be

P arCorr(ui(k − d), ej(k)∣˜ui(k − d), ˜ui(k − d − 1), ˜ui(k − d − 2), . . . ). (3.15)

This will correlate ui and ej with the contribution from previous inputs reduced.

Correlations are calculated for different lags d= 0, 1, 2, . . . to create partial cross-correlations. For an LTI-system the output will be a scaled and phase-shifted transformation of the input [8]. Cross-correlation should identify when a specific input component is present in the output. This can indicate if a specific input is connected to the modeling error through ∆.

Alternative method

One could argue that it would be more relevant to control for all inputs u and not for ˜ui,

P arCorr(ui(k − d), ej(k)∣˜ui(k − d), u(k − d − 1), u(k − d − 2), . . . ). (3.16)

This will calculate the correlation between uiand ejfor different lags d= 0, 1, 2, . . .

with the effect from all other previous inputs removed. In (3.12) z= [˜ui(k−d), u(k−

d− 1), u(k − d − 2), . . . ]T, a least square fit between[˜ui(k − d), u(k − d − 1), u(k −

d− 2), . . . ] and ui(k − d) with the following residual calculation would remove the

dynamic behavior in the signal. Example 3.3 will try to highlight the difference between the two alternatives.

Example 3.3: Effects of system dynamics

It is possible to examine the property in a SISO (Single Input, Single Output) scenario. This is not limiting as it can be interpreted as the calculations are per-formed orthogonal to{˜ui(k − d), ˜ui(k − d − 1), ˜ui(k − d − 2), . . . } where the effect of

other inputs is perfectly removed. A SISO IMC-structure is used with

G=z+0.3z2 , Gˆ= 0.5G, Q = 1.

A sine wave is used as reference and colored noise v is introduced. The system output and model residuals are presented in Figure 3.2. Correlation show a strong connection between e and u.

Corr(u, e) = 0.948

If instead (3.16) is used, previous inputs will also be used as controlling variables,

(30)

16 Detection of Linear Model Plant Mismatch 0 20 40 60 80 100 −1 −0.5 0 0.5 1 Time Ref Output 0 20 40 60 80 100 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 Time Input Model error

Figure 3.2. System output and model error

z= u(k − 1). The resulting residuals are plotted in Figure 3.3. System noise is

dominating and the correlation is reduced, it is not possible to identify the sine waveform in the figure. Residuals in (3.3) rx, rx consists mainly of unmodeled

process noise. 0 10 20 30 40 50 60 70 80 90 100 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 Time Residuals Residuals r u Residuals r e

Figure 3.3. Residual after controlling for u(k-1)

The partial correlation controlling for one previous input is

P arCorr(u(k), e(k)∣u(k − 1)) = Corr(ru, re) = 0.128.

The resulting correlation is low and the model error is not identified. The dynamic behavior of the signal is destroyed and cross-correlation will show a low correlation.

(31)

3.6 Remarks 17

3.6

Remarks

3.6.1

Number of lagged variables

The required g number of lagged inputs of ˜ui, used as controlling variables depends

on the system it operates on,

P arCorr(ui(k − d), ej(k)∣˜ui(k − d), ˜ui(k − d − 1), ⋯, ˜ui(k − d − g)). (3.17)

The required number of variables is related to the dominating time constant of the system. A change in one input variable should propagate through the system and back to the other inputs. If this is not the case, partial correlations control-ling previous inputs will not posses any improved performance in comparison to conventional partial correlations.

3.6.2

Setpoint excitation

If no excitation is present it will not be possible to detect the model error ∆ in the output error. The relations between the reference r and noise v to the model error e and system input u are,

e(k) = ∆Q[I + ∆Q]−1r(k) + [I + ∆Q]−1v(k) (3.18) u(k) = Q[I + ∆Q]−1(r(k) − v(k), (3.19) With r(k) = 0 in (3.18) and (3.19), e(k) = [I + ∆Q]−1v(k) u(k) = −Q[I + ∆Q]−1v(k) } ⇒e(k) = −Q −1u(k).

No effect of modeling error will be present in the error and it will not be possible to identify MPM with analysis of u and e.

If two inputs, urand usshow identical excitation patterns, that is Corr(ur, us) =

1, methods based on partial correlations will not be able to separate them. One could question this usefulness when this is considered, if setpoint excitation is needed why not perform a system re-identification. Detection of poor models will require less data points and a complete re-identification could be simplified by only updating those relations affected by poor modeling. Re-identification also requires considerable amount of manual work. The goal is to create an automated method for detection of MPM.

3.6.3

Time

The rate with which a model error is introduced does not alter the likelihood of detection. This is a result of that the current output is compared with the output from the model used at commissioning, this model is time-invariant and does not change. The factors affecting the time until detection are the type of modeling error and the properties the noise possesses.

(32)

18 Detection of Linear Model Plant Mismatch

3.6.4

Noise levels

Noise levels are critical for the performance of the method. It is necessary that the magnitude of the modeling error dominates over process noise. Higher noise levels will increases the required number of samples to accurately estimate the correlation between signals. Even though different types of process noise also could be considered as modeling errors, this is not considered. This thesis focuses on the deterministic modeling errors in plant dynamics.

3.6.5

Correlation threshold

When a partial correlation is calculated there will be correlated components present in the residuals not related to MPM. This is due to the limited modeling capabili-ties of lagged variables. One solution would be to compare the partial correlation coefficient for each channel with the average magnitude of the correlation over all channels. A channel where the correlation coefficient is larger than the average is likely to be affected by MPM.

3.6.6

Computational effort

The computational effort of linear partial correlations is dependent on the lin-ear regression performed. Linlin-ear least squares is normally based upon a QR-factorization and dominates the computational effort. Size of

[˜ui(k), ˜ui(k − 1), . . . , ˜ui(k − g)] , (3.20)

is(m − 1) ∗ (g + 1) ≈ mg where g is the number of previous controlling variables. The QR-factorization is then proportional toO((mg)3). This is done for all

com-binations of inputs and outputs and for different lags d. Total computational complexity is then proportional toO(mnd ∗ (mg)3). The estimates is base on a batch implementation. It is possible to implement partial correlation recursively, then runtime at each step will be significantly reduced and a real-time implemen-tation is possible.

(33)

Chapter 4

Simulation Case Studies

-Detection of Linear MPM

The method developed in Chapter 3 is tested on four scenarios. The Shell Standard Benchmarking problem [19] is used which is a heavy oil fractionator, a typical component in the oil refining industry. A 3-by-3 system is extracted and the large time lags are reduced to some extent to simplify controller tuning (which is not the objective in this thesis), this should not reduce the level of generality. The part extracted are the variables related to control of the heavy oil fractionator, this is the same system as in [3]. The full system contains both disturbance and feed-forward variables. The system used is

ˆ G= ⎡⎢ ⎢⎢ ⎢⎢ ⎢⎢ ⎣ 4.05 50s+1e −6s 1.77 60s+1e −7s 5.88 50s+1e −6s 5.39 50s+1e −4s 5.72 60s+1e −3s 6.9 40s+1e −3s 4.38 33s+1e −5s 4.42 44s+1e −5s 7.2 19s+1 ⎤⎥ ⎥⎥ ⎥⎥ ⎥⎥ ⎦ . (4.1)

Simulation will be carried out on a discretized version of ˆG converted with unit

sampling time. An MPC controller controls the system and all channels have the same penalty weights, the prediction horizon is set to 100 steps and input blocking is used to smooth the response.

A pseudorandom binary signal (PRBS) signal is used as reference for the sys-tem. Noise is introduced into the system for all channels as white noise w(k) with

σ= 0.01, filtered according to,

v(k) = z

z− 0.95w(k), (4.2)

to create colored noise v(k). The average value of the magnitude of correlation over all 9 relations is plotted as a line for all relations in the correlation figures. This is used to compare the correlations in one channel to correlation as a result of remaining un-modeled colored noise present in the system. If ∆ is nonzero for some entry then the partial correlation should be larger than average in the cor-responding channel. The number of lagged inputs, g, used as controlling variables are 40 in all scenarios.

(34)

20 Simulation Case Studies - Detection of Linear MPM

4.1

Scenario 1

To test the method for false indication, no MPM is introduce in this scenario, that is ∆= 0. This will be the reference case for comparing how control performance is affected by MPM in scenario 2 to 4. In Figure 4.1 reference signals and controller outputs are plotted. The controller is able to control the system and there is no offset.

Non of the methods, conventional correlations, partial correlation or partial correlation when controlling for previous inputs show any indication of presence of MPM, Figure 4.2. This conclusion is based on that the correlation for all input-output relations is low.

0 500 1000 1500 2000 2500 3000

−1 0 1

Control perfromance: Senario 1

Channel 1 CV1: Var = 0.0562 Reference 0 500 1000 1500 2000 2500 3000 −1 0 1 Channel 2 CV1: Var = 0.0395 Reference 0 500 1000 1500 2000 2500 3000 −1 0 1 Channel 3 Time CV1: Var = 0.0195 Reference

(35)

4.1 Scenario 1 21 −10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(a) Conventional correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(b) Conventional partial correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(c) Partial correlation controlling for previous inputs

(36)

22 Simulation Case Studies - Detection of Linear MPM

4.2

Scenario 2

A 25% gain mismatch was introduced in MV1-CV1 and MV1-CV2. The con-troller is designed assuming that the plant gains are higher than they are. Control performance is greatly affected by this modeling error, the system is stable but reference following is poor, see Figure 4.3. The variance of the control error is increased in all channels. If the variance of ec in this scenario is compared with

the variance in scenario 1 (benchmark) it has increased significantly. MPM has a clear deteriorating effect on control performance in this scenario. Even though the modeling errors are limited to CV 1 and CV 2 control performance is affected in all channels.

In Figure 4.4(a) conventional correlations were calculated and gave multiple false indications on presence of MPM. Channels show high correlations without any modeling errors present in those channels. In Figure 4.4(b) partial correlations can be interpreted as it is likely that MPM is isolated to two models. Partial cor-relations controlling with 40 previous inputs can be interpreted in the same way as conventional partial correlation except that the level of correlation is significantly higher. The correlation is high for the same relations as the introduce mismatch for both methods based on partial correlation.

0 500 1000 1500 2000 2500 3000

−1 0 1

Control perfromance: Senario 2

Channel 1 CV1: Var = 0.138 Reference Benchmark: Var = 0.0562 0 500 1000 1500 2000 2500 3000 −1 0 1 Channel 2 CV1: Var = 0.138 Reference Benchmark: Var = 0.0395 0 500 1000 1500 2000 2500 3000 −2 0 2 Channel 3 Time CV1: Var = 0.21 Reference Benchmark: Var = 0.0195

(37)

4.2 Scenario 2 23 −10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(a) Conventional correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(b) Conventional partial correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(c) Partial correlation controlling for previous inputs, (3.15)

(38)

24 Simulation Case Studies - Detection of Linear MPM

4.3

Scenario 3

A four unit step delay mismatch is introduced from MV1 to all CV’s. The con-troller is designed assuming the delay is smaller than the true delay of the plant. Controller performance is to some extent affected by the delay mismatch, Fig-ure 4.5, the variance is slightly increased when compared with the variance from scenario 1 (benchmark).

Neither conventional correlations or conventional partial correlations are able to separate the mismatches, Figures 4.6(a) and 4.6(b), multiple mismatches are indicated with high correlation in channels where no MPM is present. Correlation is high for MV1 and MV3 with all CVs in Figure 4.6(a). When calculating partial correlations controlling for 40 previous inputs, correlation is high for MV1 com-bined with all CVs, Figure 4.6(c). The developed method indicates the presence of poor modeling in the expected channels with MPM.

0 500 1000 1500 2000 2500 3000

−1 0 1

Control perfromance: Senario 3

Channel 1 CV1: Var = 0.0663 Reference Benchmark: Var = 0.0562 0 500 1000 1500 2000 2500 3000 −1 0 1 Channel 2 CV1: Var = 0.0465 Reference Benchmark: Var = 0.0395 0 500 1000 1500 2000 2500 3000 −2 0 2 Channel 3 Time CV1: Var = 0.0215 Reference Benchmark: Var = 0.0195

(39)

4.3 Scenario 3 25 −10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(a) Conventional correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(b) Conventional partial correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(c) Partial correlation controlling for previous inputs

(40)

26 Simulation Case Studies - Detection of Linear MPM

4.4

Scenario 4

In a real scenario, when running the method on a plant, it is inevitable that some modeling error is present, no model can perfectly model a plant. This scenario is to test if the method finds the most severe error, therefore small gain errors were introduced in all channels except for MV3-CV2 where the error was 40%. The current combination of gain errors improves control performance, Figure 4.7, when compare with scenario 1. The variance of the control error is reduced for all outputs.

Conventional correlations is not able to identify the most severe mismatch, Figure 4.8(a). Mismatch is present in all channels, this is correctly indicated with high correlations, but it is interesting to find the most severe error. Conventional partial correlations locate the mismatch to the correct CV but is for multiple MV’s, see Figure 4.8(b). Partial correlation controlling for previous inputs indicates gain mismatch in multiple channels, but the highest correlation is in MV3-CV2 as desired. It is interesting to notice an improved control performance but MPM is still detected.

0 500 1000 1500 2000 2500 3000

−1 0 1

Control perfromance: Senario 4

Channel 1 CV1: Var = 0.0512 Reference Benchmark: Var = 0.0562 0 500 1000 1500 2000 2500 3000 −1 0 1 Channel 2 CV1: Var = 0.0358 Reference Benchmark: Var = 0.0395 0 500 1000 1500 2000 2500 3000 −1 0 1 Channel 3 Time CV1: Var = 0.0167 Reference Benchmark: Var = 0.0195

(41)

4.4 Scenario 4 27 −10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(a) Conventional correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(b) Conventional partial correlation

−10 0 10 20 −1 0 1 MV 1 CV 1 Lag −10 0 10 20 −1 0 1 MV 2 CV 1 Lag −10 0 10 20 −1 0 1 MV 3 CV 1 Lag −10 0 10 20 −1 0 1 MV 1 CV 2 Lag −10 0 10 20 −1 0 1 MV 2 CV 2 Lag −10 0 10 20 −1 0 1 MV 3 CV 2 Lag −10 0 10 20 −1 0 1 MV 1 CV 3 Lag −10 0 10 20 −1 0 1 MV 2 CV 3 Lag −10 0 10 20 −1 0 1 MV 3 CV 3 Lag

(c) Partial correlation controlling for previous inputs, (3.15)

(42)

28 Simulation Case Studies - Detection of Linear MPM

4.5

Parameter sensitivity

The tuning parameter for this method is the number of previous ˜ui being used as

controlling variables. Different number of previous inputs g is evaluated on the same setup as in scenario 4. Testing with 5, 10, 40 (original) and 80 previous inputs is performed, Figure 4.9.

If more than 20 previous inputs are used as controlling variables only small improvements can be observed in detection performance. The correlation plots do not isolate MV3-CV2 more clearly when the number of previous inputs as control-ling variables are increased further. As long as the number of previous inputs are large enough the method is insensitive to the exact value. This number is easily chosen based on simulations before commissioning. If to many previous inputs are used it increases the computational intensity when calculating the partial correla-tions, as discussed in Section 3.6.6. If a recursive implementation is used, then at each sampling interval the computational time is small in comparison to sampling times used in control systems for process industries. As a result a large number of previous inputs can easily be chosen for the method to work properly without the computational time growing to large.

(43)

4.5 Parameter sensitivity 29

(a) 5 previous inputs (b) 10 previous inputs

(c) 40 previous inputs (original) (d) 80 previous inputs

(44)

30 Simulation Case Studies - Detection of Linear MPM

4.6

Summary

There is no clear relation between MPM and its impact on control performance. MPM, can as shown, result in improved, unaffected or reduced control perfor-mance. The suggested method based on partial correlations controlling for pre-vious inputs is able to detect MPM in these three different mismatch scenarios. The rate of detection obtained by the suggested method outperforms conventional correlation and partial correlation in all cases.

It is not the change in level of control performance that sets the level of detec-tion. One could question the point of detecting MPM when control performance is not reduced. An MPM that does not affect or improve control performance can still be interesting to isolate. After a re-identification of that particular input-output relation, followed by controller tuning, performance could be moved closer to optimal for the plant.

Similar performance is received as with the method presented in [3] but with fewer parameters combined with a lower computation load. As shown in Section 4.5 the method is insensitive to the design parameter g, the number of previous inputs to use as controlling variables.

(45)

Chapter 5

Simulations on a Recovery

Boiler model

The main purpose of a recovery boiler is to recover process chemicals to the pulping process. A recovery boiler also produces steam used for producing electricity.

Only runtime plant data is used to identify poor MV-CV relations, but for verification a new re-identified model is necessary. This last requirement makes it hard to find appropriate plant data for the thesis. In absence of appropriate plant data, a simulation setup, based on a first principle model and copy of the low level control loops from a real plant is used. A more complex simulation setup is used to test the method closer to real conditions. This also makes it possible to introduce the desired type of mismatch in different channels and perform a re-identification to retrieve the correct model for verification of the method.

5.1

Simulation setup

The simulation setup consists of 4 layers, a hierarchical layout of the system is presented in Table 5.1. This system follows the same structure as presented in Section 2.1 with the LP layer removed and the real plant replaced with a first principle model in Dymola.

Level System

1 MPC and MPM detection algorithm (Matlab)

2 OPC server as an interface to set setpoints in AC800M controller

3 AC800M, PID - loops for low level control in 800xA

4 First principle model of recovery boiler in Dymola

Table 5.1. Simulation hierarchy

(46)

32 Simulations on a Recovery Boiler model

5.1.1

MPC controller and MPM detection in Matlab

The MPC controller and the MPM detection code is running in Matlab. This allows for testing of different algorithms.

5.1.2

OPC interface

Matlab and AC800M are capable of communicating over the OPC interface which is an open standard for communication in industrial control systems [6].

5.1.3

AC800M

AC800M is an ABB controller hardware and a part of the 800xA platform for industry automation [1]. This level replicates the real plants low level PID control loops. The setpoints for this level of control loops are set by the MPC controller in the layer above.

5.1.4

Dymola/Modelica plant model

A first principal model of a recovery boiler developed in Dymola is used. This model has been developed for operator training and has been verified against the real plant [18]. An overview of the system is presented in Figure 5.1. The model is highly nonlinear, based on mass and energy conservation. The number of CVs and MVs can be made very large for this system. It is therefore necessary to identify a subset to use in the MPC. For this scenario four MVs, Table 5.2, and four CVs, Table 5.3, are extracted with the remaining inputs kept at their steady state values during simulations.

MV 1 Tertiary Air flow

MV 2 Black liquor flow

MV 3 Black liquor temperature (Fuel viscosity)

MV 4 Attemperator flow

Table 5.2. Manipulative Variables

CV 1 Steam flow

CV 2 Steam temperature

CV 3 Excess O2

CV 4 CO

Table 5.3. Control Variables

The reason why these control variables are chosen is that steam flow and steam temperature are directly related to electricity production in the steam turbines. It is also interesting to control CO emissions, pollutions are also related to cost,

(47)

5.1 Simulation setup 33

Figure 5.1. Overview of recovery boiler

for example emissions are traded within EU. If cost of buying electricity from the grid is compared with generating in-house, then the cost of emission should be included in the optimization problem solved in the LP-layer. It is necessary to maintain sufficient O2 to get a good combustion process but the excess O2in the

flue gases, which have not reacted in the combustion process, should be reduced.

Furnace

Black liquor is burned to generate steam and recover process chemicals. In the bottom of the furnace a bed of non-organic process chemical builds up where reactions makes it possible to recover process chemicals to the pulping process. The chemicals are used when separating wood fibers from lignin during production of paper pulp. The output from the furnace is steam, recovered process chemicals and emissions related to the combustion process.

Economizers

Economizers are used for preheating water before it enters the steam drum. When the water leaves the economizers to the steam drum it is still liquid.

Steam drum

The steam drum is an intermediate storage of hot water and steam to stabilize steam production. Water flows from steam drum to pipes in the furnace walls and returns to the steam drum as steam, the steam then flows to super heaters.

(48)

34 Simulations on a Recovery Boiler model

Super heater

Steam flowing from the steam drum meets the warmest flue gases in the super heaters. In these heat exchangers the steam temperature approaches approxi-mately 450○C before it leaves the super heaters for the attemperator.

Attemperator

The attemperator is used to control the steam temperature. This is because the steam turbine needs a constant steam temperature to function properly, therefore super heated steam gets sprayed with water to control output temperature. Since it is only possible to cool down the steam with water, the output from the super heaters should be higher than the desired final output temperature to allow for control at this stage. This process has a small time constant compared to the rest of the process and allows for quick control. As a result of water being added to the steam the amount of steam produced increases due to mass balance.

5.2

Identification of linear process model for use

in MPC

Step tests are used to estimate the time constants for the different channels to set an appropriate switching frequency for the identification input. A pseudo random binary sequence (PRBS) is used to excite the plant for the identification experiment. The inputs have been perturbed from their steady state levels which the controller is designed to operate around Table 5.4. The process is highly nonlinear and models are only valid around these operating levels.

MV Value CV Value

Tertiary Air FLow 30 m3/h Steam Flow 389 T/h

Black Liquor Flow 135 m3/h Steam Temperature 444○C

Black Liquor Temp 130○

C Excess 02 5.88 %

Attemperator flow 30 % CO 272 ppm

Table 5.4. Steady state levels for recovery boiler

Approximately 15 hours of data at 10 s sampling interval is collected from the test and the data is imported into the System Identification Toolbox [17]. OE-models of different sizes are identified for the 14 relations and the resulting step responses are presented in Figure 5.2.

(49)

5.2 Identification of linear process model for use in MPC 35 0 100 200 −0.8 −0.6 −0.4 −0.2

From Air Flow

To Steam Flow Time 0 100 200 0 1 2 From BL Flow Time 0 100 200 −0.6 −0.4 −0.2 0 From BL Temp Time 0 100 200 0 5 10

From Att Opening

Time 0 100 200 −0.4 −0.2 0 To Steam Temp Time 0 100 200 0 0.2 0.4 0.6 Time 0 100 200 −0.02 −0.01 0 Time 0 100 200 −15 −10 −5 0 Time 0 100 200 0 0.02 0.04 0.06 0.08 To Excess O2 Time 0 100 200 −0.08 −0.06 −0.04 −0.02 0 Time 0 100 200 −0.02 −0.01 0 Time 0 100 200 −1 0 1 Time 0 100 200 −4 −2 0 To CO Time 0 100 200 0 2 4 6 Time 0 100 200 0 1 2 Time 0 100 200 −1 0 1 Time

(50)

36 Simulations on a Recovery Boiler model

5.3

Tuning of MPC

Multiple iterations are performed to find a controller providing acceptable perfor-mance. Input and output signals are not normalized and weighting is dependent on the operating range of each parameter. Controller is tuned until adequate perfor-mance is received, further optimization is not performed since finding an optimal controller is not the objective here. A summary of tuning parameters is presented in Table 5.5. Control of excess O2 is not prioritized as it is more important to

W = ⎡⎢ ⎢⎢ ⎢⎢ ⎢⎢ ⎣ 10 0 0 0 0 30 0 0 0 0 5 0 0 0 0 5 ⎤⎥ ⎥⎥ ⎥⎥ ⎥⎥ ⎦ Wd= ⎡⎢ ⎢⎢ ⎢⎢ ⎢⎢ ⎣ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 10 ⎤⎥ ⎥⎥ ⎥⎥ ⎥⎥ ⎦ Var Value

Control horizon 50 steps

Input blocking [5 5 5 10 25]

Table 5.5. MPC tuning parameters

control steam production and greenhouse gas emissions. The real objective is to minimize excess O2in order to reduce cost. Setpoints are set for excess O2but the

control is poor with this selection of tuning parameters. The inputs are restricted to safe operating ranges where the model is verified within, see limits in (5.1).

15 m3/h≤ Tertiary air Flow ≤ 45 m3/h 135 m3/h≤ Black Liquor Flow ≤ 145 m3/h 125○

C≤ Black Liquor Temperature ≤ 135○

C

(51)

5.4 Introduction of Model Plant Mismatch 37

5.3.1

MPC performance at commissioning

Reference following at commissioning is good in all channels except for excess O2,

Figure 5.3. The time in limit for each input is also low, Figure 5.4. Both the reference following and the low time each inputs are operating at their limits are indication on good control performance.

100 200 300 400 500 600 700 800 900 1000 350

400 450

Steam Flow

Control performance: Original senario

CV1: Var = 33.5 Setpoint 100 200 300 400 500 600 700 800 900 1000 430 440 450 Steam Temp CV2: Var = 3.6 Setpoint 100 200 300 400 500 600 700 800 900 1000 5 6 7 Excess O2 CV3: Var = 0.261 Setpoint 100 200 300 400 500 600 700 800 900 1000 260 280 300 Time CO CV4: Var = 37.5 Setpoint

Figure 5.3. Control performance at commissioning: Reference tracking

5.4

Introduction of Model Plant Mismatch

A model error was introduced by changing the equation describing the conversion between CO and CO2. The rate of oxidization from CO to CO2was increased by

10%. Notice that the change was made in the plant and not in the plant model. This could be as a result of change in turbulence and airflow in the furnace. For more details about the equations see [18].

(52)

38 Simulations on a Recovery Boiler model 100 200 300 400 500 600 700 800 900 1000 −10 −8 −6 −4 −2 0 2 4 6 8 10

Inputs and corresponding limits: Original senario

Time

Input value

Air Flow: Time in limit: 0.0033 BL Flow: Time in limit: 0 BL Temp: Time in limit: 0.22 Att Opening: Time in limit: 0.15

Figure 5.4. Control performance at commissioning: Inputs and input limits

5.4.1

Effect of MPM on controller performance

The variance of the control error is increased for all channels except excess O2

and the time each input operates on its limits was also increased. The controller needs to use more of the input range when trying to control the recovery boiler. Both the variance of the control error and the time each input operates on its bounds are indicators of control performance. The modeling error is affecting control performance to a large extent and this can be seen in multiple channels, not only in the control of CO. Performance indicators are summarized in Table 5.6. System variables can be seen in Figure 5.5 and Figure 5.6.

Control error variance Time in limit

CV No mismatch Mismatch MV No mismatch Mismatch

Steam flow 33.5 36.3 Air flow 0 % 44 %

Steam temp. 3.6 3.83 Black liquor flow 0 % 0 %

Excess O2 0.261 0.216 Black liquor temp. 22 % 54 %

CO 37.5 46 Attemperator flow 15 % 25 %

(53)

5.4 Introduction of Model Plant Mismatch 39 100 200 300 400 500 600 700 800 900 1000 350 400 450 Steam Flow

Control performance: Changed plant, Old Model

CV1: Var = 36.3 Setpoint Benchmark 100 200 300 400 500 600 700 800 900 1000 420 440 460 Steam Temp CV2: Var = 3.83 Setpoint Benchmark 100 200 300 400 500 600 700 800 900 1000 4 6 8 Excess O2 CV3: Var = 0.216 Setpoint Benchmark 100 200 300 400 500 600 700 800 900 1000 200 250 300 Time CO CV4: Var = 46 Setpoint Benchmark

Figure 5.5. Control performance when mismatch is present: Reference tracking, control

performance is greatly affected by the modeling error.

100 200 300 400 500 600 700 800 900 1000 −10 −8 −6 −4 −2 0 2 4 6 8 10

Inputs and corresponding limits: Changed plant, Old Model

Time

Input value

Air Flow: Time in limit: 0.44 BL Flow: Time in limit: 0 BL Temp: Time in limit: 0.54 Att Opening: Time in limit: 0.25

Figure 5.6. Control performance when mismatch is present: Inputs and input limits,

References

Related documents

In the conventional analysis of fatigue life of a component with an arbitrary load history, the cycle counting method is a key step in the analysis, as it defines the range and the

Trots att det finns en viss skillnad mellan begreppen har det inte gjorts någon skillnad mellan dessa i detta arbete då syftet är att beskriva vilka effekter djur i vården kan ha

Using 1000 samples from the Gamma(4,7) distribution, we will for each sample (a) t parameters, (b) gener- ate 1000 bootstrap samples, (c) ret the model to each bootstrap sample

These include civil and political rights, such as the right to public information and political participation, and economic, social and cultural rights, such as the right to work

By being a resource amid poverty and poverty-stricken institutions of governance, the poor in Zimbabwe have man- aged to make significant contributions to the building of their

Acknowledging a wide range of existing research on social context and political behavior, I argue that poor individuals should be more likely to participate in activities based

Research on political participation finds that poor citizens engage less in politics than wealthy citizens. Yet, recent survey evidence also suggests that there is cru- cial

This is valid for identication of discrete-time models as well as continuous-time models. The usual assumptions on the input signal are i) it is band-limited, ii) it is