Вы находитесь на странице: 1из 144

Adaptive Dynamic Matrix Control for a

Multivariable Training Plant

Isabel Remigio Ferrao Guiamba

Submitted in partial fulfi llment of the academic requirements for the degree of Master
of Sc ience in Engineering in the School of Chemical Engineering at University of
Natal, Durban

Durban
November 28, 2001
Abstract

Dynamic Matrix Control (DMC) has proven to be a powerful tool for optimal regulation of
chemical processes under constrained conditions. The internal model of th is predictive
controller is based on step response measurements at an average operating po int. As the process
moves away from this point, however, control becomes sub-optimal due to process
non-linearity. IfDMC is made adaptive, it can be expected to perform well even in the presence
of uncertainties, non-linearities and time-vary ing process parameters.

This project examines modelling and control issues for a complex muhivariable industria l
operator training plant, and deve lops and app lies a method for adapti ng the controller on-line to
account for non- li nearity. A two-inputltwo-output sub-system of the Training Plant was
considered. A special tech niq~e had to be developed to dea l with the integrating nature of this
system - that is, its production of ramp outputs for step inputs.

The project included the commissioning of the process equipment and the addition of
instrumentation and interfacing to a SCADA system which has been deve loped in the Schoo l of
Chemical Engineering.

n
To
Margareth, Fred and Joaquim

iii
PREFACE

This dissertation is submitted as a component of a part-coursework MSc. Eng. in the School of


Chemical Engineering, under the supervision of Professor Michael Mulholland.

The coursework component was ma'de up of the following subjects.

• Process Dynamics and Control [DNC4DCI]


• Real Time Process Data Analysis [DNC5RTM]
• Applied Control Theory (DNC5CTM]
• Linear Multivariable Control [DNL5NCM]

I certify that all of the work in this dissertation is my own work except where otherwise
indicated and referenced .

Isabel Guiamba Prof. Michae l Mulholland


November 28, 2001 Supervisor
November 28, 2001

iv
ACKNOWLEDGEMENTS
I wish to express my sincere gratitude and appreciation to all people who directly or indirectly
contributed to this research by giving some of their precious time and advice.

A special word is due to:

My supervisor Professor Michael Mulholland for his many contribution in this investigation,
and for his encouragement and final proof-reading of this dissertation. The assistance provided
in extending my understanding of this subject is much apprec iated.

My chi ldren Margareth and Fred who patiently suffered during the past two years afmy studies,
being far away from their mother, and my son Joaqu im for being wonderful company in this
very difficult period.

My family, my husband and friends for their understanding, support and encouragement.

To the Chem ical Engineering workshop staff for their assistance in the commissioning of the
equipment and to Dudley Naidoo for fix ing the electronic problems.

The financial support of thi s research from the Eduardo Mondlane University of Mozambique
and from the Natal University Research Fund (NURF) is gratefully acknowledged.

v
Contents
Page
ABSTRACT . ...... ... ..... .. ...... ..••• ..... .••• ..... .••.. .... .••• .. .. ..... ..... .. ... ....... .. ....... ......... ii

PREFACE ... .. ... ............. ... ........................•••........ ...••••••.....•...........••••••..... ....iv

ACKNOWLEDGEMENTS ...... .. ... ...... .. .. ... .... ... ... ... .. ...... .. .... ....... ......... .... ........ v

LIST OF FIGURES .... .... ... .. .. ....... .... ....... ....... .. ..... .. ...... .. .. .. .... ..... ... ............... ix

LIST OF SYMBOLS AND ACRONYMS .. .... .. ...... ... ... ...... .... ........ ....... ................ xii

I. INTRODUCTION .... ............. ....... ... ... .. .......... ..... .. ........ ........... ... .. ....... . 1·1
1.1 Background of the work presented 1·1
1.2 Thesis layout 1·2
1.3 The aim of the project 1·3

2. THE TRAINING PLANT...... .......... .. .. ..... ... ...... ....... .. .. ..... ............... .. ........2·1
2.1 lntroduction 2-1
2.2 System description 2-3
2.3 Data acquisition and control 2·5
2.4 The control problem 2·6
2.5 T he sub-system under study in the present work 2·8

3. THE PROCESS MODEL. .. ....... .... ....... .. ...... .. .... ....... ............ ..... ............... 3·1
3.1 Introduction 3·1
3.2 Literature review on the differential and algebraic equations systems 3·2
3.3 Mode lling the Training Plant 3·3
3.3.1 The state-space model 3·3
3.3.2 Comments on the extended Kalman filter 3·8
3.3.3 Matlab software and results 3·10
4. DYNAMIC MATRIX CONTROL .. ... .... ...... ................... ... .. " ..... ...... .......... .4-1
4.1 Introduction 4-1
4 .2 Genera l principles 4-1
4.3 Design parameters fo r DMC 4-8
4.4 Application of LDMC to a Pump-tank system - case study 4-9

5. ADAPTIVE CONTROL PRlNCIPLES ....... ........ .... . ... ..... ....... ..... ..... ..... .. ... S_1
5. 1 Genera l 5-\
5.2 Adaptive contro l overv iew 5-2
5.3 Adaptive schemes 5-3
5.3.1 Scheduled Adaptive Contro l 5-3
5.3.2 Model Reference Adaptive Contro l 5-4
5.3.3 Self-tuning Adaptive Control 5-5
5.4 Procedure to decide what type of controller to use 5-5
5.5 Identification and parameter estimation 5-6
5.5. 1 Comments on identification and parameter est imation 5-6
5.5.2 ReclIrsive least squares estimation of model parameters 5-9
5.5.2.1 Kalman filter interpretation 5-9
5.5.2.2 Least squares parameter estimation 5-11
5.5.2.3 The recurs ive least squares parameter estimat ion 5-13
5.5.3 App lication of recursive least squares parameter estimation technique to a
Pump-tank system - case study 5-14

6. ADAPTIVE DYNAMIC MATRIX CONTROL ................ .... .... ........ .... .. .... .... 6-1
6.1 Introduction 6-1
6.2 Literature review 6-1
6.3 Formulation of an Adaptive DMC a lgorithm 6-3
6.4 Regulari sation approach 6-8
6 .5 Application of ADMC to a Pump-tank system - case study 6-10
6.5.1 Off-line simu lat ion 6-10
6.5.2 On- line app lication 6-12

7. INTEGRATING ADAPTIVE DYNAMIC MATRIX CONTROL ........ ........ ........ 7-1


7.1 Introduction 7-1
7.2 Integrating processes overview 7-1
7.3 Integrating LDMC formulation 7-3
7.4 Integrat ing Adaptive DMC formulat ion 7-6

vii
7.5 Integrating ADMC application to a 2-input 12-output sub-system of the Training
Plant - case study 7-10
7.5. 1 Off-l ine simulation 7-1 2
7.5.2 Real-time application 7- 17

8_ CONCLUSIONS and RECOMMENDATIONS .... ................................... .. .. .8- J

REFERENCES .. .. ... .... ..... ............ .. . .. .. .. ..... .............................. ....... .. .. ...... . R-i

APPENDIXES
A: General Concepts about Process Models .... .. .................... ............ .... .... ....... A-J
A.I Variables of a process A-2
A.2 Process characteristics and process models A-2
A.3 The process model forms A-4
A.3.l The state-space mode l A-4
A.3.2 Impulse I step response models A-S

B: Extended Kalman Filter Fornlu lation ....• ...• __ . . . ............. . .... .............. .... . . .... B-l

C: Matlab Extended Kalman Filter Algorithm ................................... .. . . . ...... . . C-l

D: P ump-tank and Training Plant step responses .. .. .. .. .... .. ....................... .... .... D-l
0.1 Pump-tank step responses D-2
0.2 2-input 12-output sub-system of the Training Plant step responses 0-3

E: E xtracts ofthc Integrating Adaptive Dynamic Matrix Algorithm from the


SCADA System ••••••..•.•• ••••• ••••••••••••••••........ .••..•....••.•... .. ... . .. .. . ... . . .. . .. ... .. E-J
E.I Extracts of DM CObject.h B-2
E.2 Extracts from DMCStream.cpp E-3

viii
List of Figures

Page
C hapte r 2
2.1: Parts of the Train ing Plant rig ..................................... ....... .. , .. .••••• •. •....... . . .. 2-2
2.2 : The Traini ng Pla nt diagram .... , ................... ........ . ... . .................................... 2-4
2.3 : T he Trai ni ng Pl ant control problem structure .................................... ... ..... ....... 2-7
2.4: Su b-system of Tra ining Plant for experiments ................................................... 2-8

C hapter 3
3.1: Model-pred icted unit step responses for the 2-input / 2-output sub-system of the
T raining Pl ant (M = 5) ......... ... .. .............................................................. .3- 11

C hapter 4
4.1: Example of elements in mode l predictive controL .........................•.................... .4-3
4.2: Typical output response to a unit step input ........................................... •••....... .4-4
4.3 : Mode l Predictive Control configurat ion .......................................................... .4-5
4.4: 2- input 12-output Pump-tank system for s imu lation and laboratory tests ............... .. .. .4-1 0
4.5: The un it step responses for the Pump-tank system (M = 10) ....................... . ......... .4-11
4.6 : Unconstrained closed loop step response fo r N = 2, A = I and W = 100 .................. .4-12
4.7: C losed loop step response fo r N = 2, A = I and JV = 100 w ith upper constraints
VI: 60 % and V2: SO % ................... ............... . . .................. ....... ............. .4-13

C hapter 5
5.1 : Block d iagram of a system in whi ch the infl uences of parameter variations a re
reduced by ga in schedul ing ..................... ... ................................................. 5-4
5.2 : Model reference adaptive control structure ...................................................... 5-4
5.3: Self-tuning control system ........... . .... ........................ .. ................................. 5-5
5.4: Procedure to decide what type of controller to use ............................................... 5-6
5.5: General procedure of process identification ..................... . .. . .............................. 5-8
5.6: On-line identificat ion configurat ion ...................... .. .... .. .................... . ........ . .. 5-\ 0
5.7: Data set fo r para meter estimati on ............ . ... . ... .. . .. . .. . . ... .. ... ........... .. .... . ........ 5-1 5
5.8 : Comparison of measu red and pred icted outputs .............................................. . . 5- 16

,x
Chapter 6
6.1: Predicted response from 2M past moves up to present time .................................. 6-3
6.2: Basic functions fo r regularisat ion .................................................................. 6-9
6.3: True step responses identified by regularised model 6 minutes and 49 seconds
from start of the run ........... ... . .. ................................. ..... .............. .... ....... 6-10
6.4: Attem pt to find true step responses using unregularised model at same time as
Figure 6.3 ............................................................................................ 6-11
6.5: C losed loop DMC level response to set point variation for non-adapted (a) and
adapted (b) cases (simulation model) ................................. .................. . ..6- 12
6.6: C losed loop on-l ine LDMC level response to set po int variation in the Pump-tank
Plant. ................................................................................................. 6- 13
6.7 : Closed loop on-li ne ADMC level response to set poi nt variation in the Pump-tank
Plant. ......................... .... .................................................................... 6-14
6.8: Identified step responses using regu larised model in the Pump-tank Plant, I hour
from start of the run ................................................................................ 6-15
6.9: Identifi ed step responses using regularised model in the Pump-tank Plant, 2 hours
37 minutes and 30 seconds from start of the run ............................................... 6-16

C h apter 7
7.1 : Typical output integrating response to a unit step input. ............ .......................... 7-2
7.2: Unit step responses for the 2-input 12-output sub-system of the Training Plant
(M ~ 5) .. ......................... .................................. ... ............. .......... ................................... ... 7-11
7.3: C losed loop LDMC (a) and ADMC (b) using true process model without
integratingcompensation,N=2,A = I, W = 100 .............................................. 7-13
7.4: C losed loop LDMC using true process model mismatched without integrating
cOlnpensation , N = 2, ..1 = 1, W = 100 ............................................................. 7- 14
7. 5: Closed loop LDMC (a) and ADMC (b) w ith integrating compensation and
process-model mismatch. N=2,A = I, W = 100 ................................................ 7-15
7.6: Ident ified step responses using simulation model, 7 minutes and 10 seconds
from stall of the run ........................ ... ... ... ................................................ 7-1 5
7.7: C losed loop integrating ADMC with in put constraints: CVOI: 45 - 55 % and
CV 0 3:3 0 -70%,N~2, A ~ I , W ~100 .............................. ......................... 7-1 7
7.8: C losed loop on-line Integrating LDMC, N = 2, If = I, W = 100 ..............................7-1 8
7.9: C losed loop on-line Integrating ADMC, N = 2, A = 1. W = 100 ...... ............. " ......... 7-19
7.10: Identified step responses in the Train ing Plant, 43 minutes from start
of the run ....................... ........................... ......... ..................... : ........... 7-20
7.11 : C losed loop on- line non-integrating LDM C, N = 2, ..1 = I, W = 100,13 - 0........ ..... ... 7-21

x
7.12: Closed loop on- line non-integrating ADMC. N = 2.A = 1, W = 100,13= 0................ 7-22
List of Symbols and Acronyms
A Matrix of model coefficients
AID Ana logue to digital
ADMC Adapt ive Dynamic Matrix Control
Heat transfer area in heater Hi
Tank i area
Pump Ki coefficient

B Dynamic Matrix
Reduced dynamic matrix (non-square P x N matrix)
Open loop matrix
Offset matrix
Pump Ki coefficient

CL C losed loop
Cp Heat capacity at constant pressure
CV Contro lled variable
CVij Contro l valve ij
CV; MVj Controlled variable i and manipulated variablej
C, Observation matrix from DAE system
C C"ij Contro l Valve ij size coefficient
Pump Ki coefficient

DAS Differential-algebraic system


DAE Differential and Algebraic Equation
DMC Dynam ic Matrix Contro l
D/A Digital to analogue

xii
EKF Extended Kalman fi lter
Closed loop error
Model error
Open loop error

Volumetric flow fate of stream ij

G Observation matrix

Height above ground level


Junction height above ground level and Pij pressure po int

K Kalman filter gain


P ipe resistance

Li Tank i level
Lij Length of pipe ij
LDMC Linear Dynamic Matrix Control

M Steady state horizon (number of steps)


M; Filter covariance matrix
MPC Model Predictive Control
MRAC Model reference adapt ive contro l
MV Manipulated variab le
In Number of inputs

N Number of future control moves


n Number of outputs

ODE Ordinary differential equation

P Optimisation horizon
Pressure
p Parameter vector
pr Reduced parameter vector

xiii
Q Prediction error covariance matrix
QDMC Quadrat ic Dynam ic Matrix Control
Heat transfer rate for healer Hi
Heat transfer rate for heaters Hi and Hj

R Observation error covari ance matrix


Reg Regularised model
RLS Recursive least squares

SVij So lenoid va lve ij


SCADA Supervisory Control and Data Acquisition

Temperature
Ambient temperature
Ti me

u Overa ll heat transfer coefficient


u Input (or manipulated) variable

Vj Valvej
v, Tank i volume

IV Process variab le weighting matrix


Observation vector from DAEs system

Valve stem pos ition (fraction of wide open)


x output vector
XCL Closed-loop response
XMEAS Measured output
XOL ~Open · loop" response
Predicted output
Process variable set point

y State vector
y Observation vector

z Associated variable

xiv
Greek Icttcrs
6P Ki Pressure drop over the pump
6PCVij Pressure drop over the valve ij
!>rn' Limited sequence of N moves to be opt imised
6mpAST Vector of past inputs -M steps before present time
6m ' PAST Vector of past inputs between -2M and -M steps before present time
6m"PAST Vector of past inputs w ith accumulated moves
ill Sampling time
a Fi lter constant
Coefficient in gradient feedback
Process noise
Move suppression
Measurement noise
Den sity

xv
Chapter 1

Introduction

1.1 Bac kg round to the work prese nted

Dynamic Matrix Control is one of the most successful model predictive schemes and quite
popular within the process industry. Control design methods based on the Model Pred ictive
Control concept have found wide acceptance in industrial applications because of the ir ability to
handle process interact ions, their handl ing of unusual dynamic responses and because th ey do
not necessarily demand a rigorous model derived from first principles.

Dyna mi c Matrix Contro l is based on a linearised step response model ca lled the convolution
lIIodel. Thi s dynamic model with its assoc iated uncertainti es is used to predict and optimise
process performance. However, as the system dynamics change with time, a large mi smatch can
deve lop between the model and the process and it no longer reflects the actua l system. Under
these conditi ons the controller performance deteri orates, which may even destabilise the
process. In th ese s ituat ions it becomes necessary to re-evaluate the process mode l. One way of
doing this is to include an adaptive algorithm w ithin the Dynamic Matrix Control algorithm.
This strategy can allow adjustment of controller settings with changes in the operating point and
better performance is expected even in the presence of time-varying process ga in and process
nonlin earity. Thus, the development of a method for closed-loop on line identification for
updating the dynamic matri x is proposed in this work.

Despite Dynamic Matrix Control presenting several novel features and advantages, it is not
designed to deal with processes w ith an integrat ing nature. These are processes that produce a
ramp change in the output for a step change in the input. The Training P lant currently under
study exhibits this be haviour, and is also non- li near, multivariable and highly interact ive. Thus,
an approach for using Dynamic Matrix Control to control integrating processes was also
cons idered. In th is method the slope of the predicted response is determined from th e slope of
the output trajectory between the current and the previ ous contro l instants.

I-I
Chapter! Introduction

However, because of the comp lexity of th e Train ing Plant, with th is work be ing the first
investigation with regard to it, only a 2-input 12-output sub-system of the plant was studied in
the present project. Thus, the proposed algorithm was applied only to this sub-system. For a
better understanding of the software, preliminary simulat ion was in some cases done on a
second pilot plant, a 2- input I 2-01ltput , Pump-tank system, also availab le in the School of
Chemical Engineering.

1.2 T hesis Layout

As an introduction, Chapter 1 is devoted to provide an overv iew of the thesis and aims of the
present work.

Chapter 2 is designed to fam iliarise the reader with the Trai ning Plant under study. With thi s
goal in mind, attent ion has been given to a description o f the system and presentation of the
contro l problem emanating from this process.

Chapter 3 dea ls with the theoretical process model and prov ides a more comprehensive
understanding of the Training Plant behaviour described by a non-linear system of mi xed
differential and algebraic equations. State-space step responses obtained from estimated data
when running the extended Ka lman filter simulation program written in Matlab 1, are also
prese nted in this chapter.

The Dynamic Matrix Control techn ique and its applications are considered 111 Chapter 4.
Adaptive Control principles are covered in Chapter 5.

Chapters 6 and 7 deal with the Adapt ive Dynamic Matrix Control scheme with part icular
attention to an integrating system in Chapter 7. Results obtained from off-line tests, as well as
actua l application of the Integrati ng ADMC controller in the 2-input I 2-output sub-system of
the Training Plant are also included.

1-2
Chapter I Introduction

J.3 T he aim of t he project

The aim of this study was to investigate different aspects of contro l of a Training Plant available
in the School of Chemical Engineering laboratory at University of Natal. Th is multivariable
system presents eight manipulated input variabl es and sixteen output variables of interest from
the point of view of process control. A mathematical mode l derived from first prin ciples
revealed complex behaviour of the system with hi gh order, non-linearity and a high level of
interaction between variables. To overcome these difficulties, possi bilities of applying a Model
Predictive Contro l techniqu e in thi s Trai ning Plant had to be considered.

To fu lfil the objective of this work, general tasks were proposed as follows:

• Recommi ss ioning of the equipment,


• Additi on of d igital control to already exi sting analogue instrumentation,
• Interfacing of the system to a computer SCADA system, comprising software for real-time
simu lation and data acqu isition developed in the School of Chem ical Engineering,
• Development of the contro l algorithm
• Application of the control algorithm on the equipment

, Matlab is a registered trademark of The MathWorks,lnc.

\-3
Chapter 2

The Training Plant

2.1 Introduction

The Training Plant currently under study is a complex multi variab le, non-linear and highly
interactive industrial teaching facility comprising fu ll-sca le equ ipment. It is very useful for a
d ivers ity of studies in the field of mass and heat transfer as well as process control. As w ill be
seen, a model will be developed for the enti re plant, but only a sub-system of three tanks will be
used in the app lication of the proposed adaptive control algorithm.

Thi s Training Plant all ows d igital control of variab les such as temperature, level, fl ow and
pressure, s ince the o ld analogue inSlfllm entat ion of the equipment was converted to a digital
format in the course of this study. by introduc ing ollologue-lO·digital (AID) and digital-to·
analogue (D/A) converters. Thus, with digital processing the computer is able to receive the
measurements d irectly from the process and based on the control law, resident in its memory,
calculate the values of the manipulated variables. T he decisions are then directly imp lemented
in the process by the computer via the final control element.

Some advantages of digital controllers over their analogue are that high-speed digital systems
have prov ided th e means to produce low cost and accurate controllers. More comp lex
algorithms can be imp lemented using digita l controllers, and with greater accuracy than the
corresponding analogue systems. Furthermore, there is greater flexibility in digita l system s ince
alterations to the contro l algorithm can be performed in software rather than through changing
or tuning d iscrete components which are prone to dr ift.

The Training Plant is part of the ava ilable equipment in the Chem ical Engineering Laboratory at
the University of Natal and some pictures of it are presented in Figure 2.1 .

2-1
Chapter 2 The Training Plant

Figure 2.1 Parts of the Training Plant rig

2-2
Chapter 2 The Training Plant

To fulfil some of the objectives presented in Chapter I, tasks such as re-Iabeling, calibration,
add ition and repair of the equipment and control instrumentation, including improvement of
piping I tubing were a lso taken into account. In a number of cases, new sensors were installed in
parallel to the existing sensors (e .g. leve l transmitters and temperature transmitters).

A description of the equipment is presented in this chapter in Sect ion 2.2. Section 2.3 prov ides
information about data acqu isition and control. The control problem emanating from thi s
process is presented in section 2.4. Finally, a 2-input 1 2-output sub-system from the Training
Plant was considered in the present study; is presented in section 2.5.

2.2 Syste m description

The experimental setup is schemat ically presented in Figure 2.2. The system can be divided in
two parts involv ing mass and heat ba lanc ing as shown below. However, it is important to
not ice that sub-systems can be defin ed and simulated accordingly with fewer variables of
in terest, by manipu lating limited manual and I or pneumatic control valves in the pipes
connecting the eq uipment.

Mass balancing
In this part, the Training Plant consists ofa mixing tank, Tank TI02 (a lso called Tank 2), from
which warm water is pumped by centrifugal pump, K2, to four different parts of the system as
fo llows:

• Tank I, Tl 0 I, w ith its base at ground level, the same level as Tank 2. A butterfly pneumatic
control valve, CVO I, connects both tanks. The out let stream from th is tank is pumped by
sma ll centrifugal pump, Kt and returned to Tank TI02 through pneumatic control valve
eVIl.

• Counter-current gas I liquid absorption column , C lOS, 0.5 m in diameter and 2.5 m in
he ight at overhead level, fill ed with ceram ic raschig rings. The column bottom is 2.7 m
above the ground floor and is connected to Tank TI02 by pneumati c control va lve CV05.
The output flow from the column is returned to Tank 2 by grav ity.

• Upper storage Tank 3, TI03 , w ith base at 4.75 m above the ground fl oor. This stream is
controll ed by pneumatic control valve CV03, while pneumatic control valve CV 13 controls
the outlet stream from Tank TI03 to Tank 2 whi ch, is also returned by grav ity.

2-3
Chapter 2 The Training Plant

• The fl ow is fin ally pumped to a co-current heat exchanger, HI , where it is heated and
returned to Tank Tl02 through pneumatic control valve CV02.

Figure 2.2 The Training Plant diagram

2-4
Chapter 2 The Training Plant

Heat bala ncing


Hot water is pumped by small centrifugal pump, K4, from Tank T104, and used in the above-
mentioned co-current Heat Exchanger, HI, to heat the incomi ng flow from Tank T102.
However,just before HI, the hot stream is by-passed, passing through pneumatic control valve
CV 10, and then mixed with the output flow from the heat exchanger, continuing then to a
counter-current cooler, H2 , where the temperature is dropped. Part of the outlet stream from the
coo ler enters the gas heaters, H3 and H4 where it is heated and then mixed with the by-passed
cooler output flow and returned to Tank 4, TI04, just after pneumatic contro l valve, CV04.
Because the resistance of the piping through H3 and H4 is quite high, closing CV04 has the
effect of increasing flow through H3 and H4 from virtually very low to full flow. Since the
heater capacities are much larger than the cooler, shutt ing CV04 has the effect of passing from a
net cooling mode to a net heating mode.

2.3 Data acquisition and Control

The rig is interfaced to a local PC via Eagle® PC30 comprising analogue-ta-digital (AID), and
digital-to-analogue (D/A), input I output boards, with 16 12-bit inputs, 4 outputs and 24
programmable digital 1/0. The experimental as well as si mulation stud ies were carried out using
a flexible Supervisory Control and Data Acquisition System (SCADA). Extensive configurat ion
options are provided in this software, including Linear Dynamic Matrix Control (LDMC),
constraints and tuning parameters, PID loop setti ngs, measurement filtering, alarm levels and
loggi ng se lections which may be changed on-line. In addition, an on-board convolution model l
may be used to test algorithms. A version of th is program with real-time graphing and plant
mimic features current ly ex ists in Microsoft® Visual C++ and was written for Windows 95.
Previous research students, including Prosser [1998] , have developed this software.

The evolution of this software has been fairl y organic, comprising many modifications by
various researchers as the need arose. Modifications were also made in the present work since
an integrating adaptive algorithm was added to the existing Dynamic Matrix Control algorithm
to overcome the problem of non-linearity and the integrating nature of the Training Plant (see
Append ix E). Results of off-l ine and real-time simu lations using a step-response model applied
to an Integrat ing Adaptive Dynamic Matrix Control for a 2-input 1 2-output sub-system defined
on the Training Plant are presented in Chapter 7.

lThe convolution model is a model based on linear combination of time-domain step response

2·5
Chapter 2 The Training Plant

2.4 The Cont rol Problem

As already mentioned, this system is mu hivariable w ith a high leve l of interaction. A


lIIu/livariab/e process is one w ith multiple inputs, UI , U2, ... , Urn. and / or multip le outputs. XI. Xl •
... , X n, where m is not necessarily equal to n.

One of the consequences of having several input and output variables is that sllch a control
system can be con figured in several different ways using traditiona l SISO (single input / single
output) control loops depending on which in put variab le is used to control which output
var iable. Thi s is referred to as the input I output pairing prob lem.

In order to be able to control the output variables arbitrarily. we need at least an equal number
of input variab les. and the choice of the best pairing to minimize the interaction and provide
optimum control is vcI)' important. Th is does not mean that the control is "perfect" or even
very good; it s imp ly means that it is the best it can be in such a SISO format.

For non-square systems that is, a multi variable systems with unequal numbe r of input and
output variab les, thc most obvious problem is that after input I output pairing, there will always
be a residual of unpaired input or output variables, depend ing on which of these are in excess.

For under-defined systems (w ith fewer input than output variables), not all the outputs can be
controlled, since we do not have enough input variables. T he strategy for loop pairing of suc h
syste ms, is to c hoose a sq uare sub-system by dropping off the excess numbe r of output
variables on the basis of economic importance [Ogunna ike and Ray, 1994]. As illustrated in
Figure 2.3, the present Training Plant is an under-defined system from the point of view of
contro l, with e ight manipulated input variables (pneumatic control valves) and sixteen output
variab les of interest. The figu re shows the anticipated ma in influences of the inputs on the
outputs.

2-6
Chapter 2 The Training Plant

Possible
influence

Outputs
Inputs _--->{=====~ LI

CVOJ
eV04 ~
--
---+

evos ------. l'


L2
Ll
Pu
To>
CVIO t '''"f--+ T"
eVil
eV13
--+" \
~ __ T"
Tu
,,
,
\
"
\ T.
\
~_~T.
Fo>
Process Fo>
F.

Figure 2.3 The Training Plant control problem structure

The real challenge in deciding on loop pairing for non-square systems is presented by over-
defined systems (with more inputs than output variables), where arbitrary control of the fewer
output variables can be achieved in more than one way. The Relative Gain Array (RGA) the
most discussed index of loop interaction that suggests input I output pairings for which the
interaction effects are minimized, can in this case also be used to define the best square sub-
system. Further information about this issue can be found in Luyben, (1990} (pgs. 576 - 579)
and Ogunnaike and Ray. [1994J (pg,. 728 -758).

According to John son, [1993] , optimum control (control quality) can be defined in terms o f the
three effects resulting from a load or set point change as fo llows:

• Stabi lity,
• M inimum deviat ion from set point and
• M inimum duration (time necessary to control)

2-7
Chapter 2 The Training Plant

In the present work the intention is to fonnu late a control strategy for the process viewed as a
lumped multivari able system , in this way avoid in g the pairing issue and allowing coordinated
action to achieve contro l object ives within defined constraints. Thus, only a sub-system
(described in the fo llowing section) with two inputs (CVOl, CV03) and two outputs (LI , L2),
will be cons idered.

2.5 The sub-system under study in the present work

As mentioned above in section 2.2, the Training Plant presented in Figure 2.2 allows the
defin ition of the slIb-system of interest, by manipulating some control valves in the equ ipment.
Thus, to understand some aspects of the control of this system, a 2-input 1 2-output sub-system
was configured as follows:

Controlled variables were chosen as the levels in the tanks T10l and Tl02 while manipulated
var iubles were valves CVO l (inflow from Tl02 to TIOI) and CV03 (inflow from TI02 to
T I 03). Constant posit ions as percentage open were set for valves CV I I (inflow from T I 0 I to
TI02) and CV 13 (inflow from T I 03 to TI 02). A simplified diagram is shown in Figure 2.4

..0 1

eV03
evoI '"
'"'

eVil

eV il

8 T102
Kl

Figure 2.4 Sub-system of Training Plant for experiments

2-8
Chapter 2 The Training Plant

To understand thi s sub-system behavior, a 2x2 off-line step responses of it, were derived from
the estimated outputs using the extended Kalman filte r sofhvare appl ied to a state-space mode l
discussed (Chapter 3). For process control purpose, the step responses were experimentally
obtained and actually applied in the Dynamic Matrix Controller for off-line simulation as well
as for real-time tests as presented in Chapter 7.

It is important to emphasize that, a second 2-input I 2-output Pump-tank system, described in


section 4.4 and shown in Figure 4.4, was also used in the present work for on-line test ing of
Linear Dynami c Matrix Contro l and Adaptive Dynamic Matrix Control in Chapters 4 and 5
respective ly.

2·9
Chapter 3

The Process Model

3. 1 Introdu ction

A proper understanding of process dynamics sign ificantly facilitates the design of effective
controllers. This understand ing has usually been shown to be dependent on the ava ilabi lity of a
process mode l. A mathematical model representing a process consists of a system of equation s.
wh ich represent the relationships between process variables, which purport to describe the
behav iour of th e physica l system. The main lIse of the mode l is usually the possibility to
investigate the system response under various input conditions rapidly. and inexpensively,
without necessa ri ly tampering with th e actual physical entity.

With the exception of the most trivial process, it is impossib le for a mathematical model to
represent exactly all aspects of process behaviour (Ogunnaike and Ray, 1994]. Thi s fact
notwithstanding, however, the usefulness of the mathematical model shou ld not be
underestimated. We just need to keep its limitations in proper perspective. The effectiveness of
any contro l system des igned on the basis of a process model w ill, of course, depend on the
integrity of such a model in representing the process.

To investigate the process behaviour of the present Training Plant, two process models based on
different principles were developed. A state-space mode l formulated from first principles and a
step-response mode l based on the experimental data from the equipment.

An extended Kalman filter method was used for state estimation of the non- li near system
descri bed by a class of differential-algebraic equations this was used to develop a state-space
model fo r the entire system shown in section 2.2. In addition, a step response convolution
model was obta ined us ing process measurements.

3-1
Chapter 3 The Process Model

The present chapter is structured as follows. Literature review is presented in section 3.2.
Section 3.3 describes the Training Plant behaviour predicted using a state-space mode l. This
section includes issues such as the theoretica l mode l, applied technique for solution of the
differential and algebraic equations describing the system, and finally, the step response
resulting from the mode l s imulation using a Matlab program.

3.2 L iteratu re review of differenti al and algebraic equations systems

Differential-algebraic equations (DAEs) arise frequently in chem ical engineering and may
occur directly from the use of first principles to model a physical phenomenon. The differential
equations represent the dynamics of the system and the algebraic equations lIsually describe the
constraints among variables. These constraints may be linear or non-linear.

The OAEs have been studied by a number of investigators and are widely used for the dynamic
modelling of chem ical processes. Several approaches have been proposed to estimate a solution
of OAEs. Cheng, Mongkhonsi and Kershenbaum [1997], employed the minimum least squares
criterion, i.e., the minimisation of the integral of the we ighted square residual errors in the
process model and the measuring device, to develop a sequential algorithm for non-linear
differential and algebraic systems with the use of variational calculus.

8yrne and Ponzi [1988] review the underly ing methods in some differential-algebraic systems
(DAS), software. A Newton-type method in which the computation of the Jacobian matrix is
not performed during each iteration is described. Rather, it is computed at some point and
retained until the convergence is deemed to be too slow.

Becerra, Roberts and Griffths [2001] , explore the application of an extended Kalman filter
(EKF), to systems described by non-linear DAE's. A time-varying linearisation has been
derived for a DAE model and a simplified square root EKF algorithm has been described. They
showed how the EKF can be used for noise filtering and estimation of unmeasured states.
includ in g algebraic states of a system described by a semi-explicit index one DAE, i.e. , with
s imil ar behav iour to sets of ord inary differentia l equat ions (ODE), that can be solved using
sim ilar solution methods. Notice that the EKF technique has been traditionally applied to state
and parameter estimation using models described by ordinary differential equations.

3-2
Chapter 3 The Process Model

DASs solvers can play a significant role in chemical engineering since, the simultaneous
treatment of both differential and algebraic equations in a mixed system eliminates the need for
attaching together separate methods and software for ODEs and algebraic equations.

An extended Kalman filter was employed in the present work for state estimation of the system
under study, since it provided a means to drive the solution towards convergence, and avoided
problems of singularity in under or over~specification.

3.3 Modelling the Training Plant


3.3.1 The state-space model

The initial modelling approach of the ex isting Training Plant was based on a state-space model
which, as described in section A.3.1 (Appendix A), is formulated from first principles.
Fundamental laws including mass and energy balances were appl ied over the equipment and
junction po ints and pressure drops over the pumps, pipes, and pneumatic control valves were
also considered.

The main simp lifying assumptions that were taken to derive this model were:

• The mixing is perfect


• Heat losses are negligible
• The valves have linear characteristics (but in stalled characteristics will be non ~ linear due to
pressure variation)
• No mass transfer occurs in the absorption column
• The pump characteristics are described by quadratic functions
• Since only water is used in the system, the specific heats are omitted from energy balances.

The modelling revea led a complex non~linear, multivariable, and high order system with forty-
seven equations. Nine were Ordinary Differential Equations (ODEs), describing the state
variables and thirty-eight were algebraic equations representing the system constraints as shown
below. The system has a total of nine states, ten inputs and thirty-eight associated variab les.
The equations below should be viewed in conjunction with Figure 2.2.

3-3
Chapter 3 The Process Model

• Model differential equations

Vo lume balances in tanks and co lumn

(3.2)

dh '2 = -F;z + F02 + ~I + F;3 + ~3 (3.3)


dl A,

dhi3 -F;3 + Frn


--= (3.4)
dl A,
dh l4
=0 (level in Tank 4 is constant) (3.5)
dl

-dhl3- = -F;s + Fos (3.6)


dl A,

Energy balances in tanks

d~,_ -F;,~,+Fo,r;2 - (-F;,+Fo, ) r;,


(3.7)
dt A,hll

d~2 _ -;;27;2 + F;,~, + F;)r;) + F;sT;s + Fa2Toz - (-F;2 + Fa2 + F;, + F;3 + F;5)7;2
(3.8)
dl A2h12

dTi3 _ -F;)T;) + FO)TI2 -(-Fu + Fa3 )T.3 (3.9)


dt A)hll

dT;4 F;4 (T04 - 7;4 ) (3.10)


dl A,iI,
dT,s _ -F;sr.s +Fasr.2- (-F;s + Fas )r.$ (3.11)
dl A,h"

• Model algebraic eq uations

Overall e nergy ba lance in Heat Exchanger, HI

0= - F", (To, - T,, )+ (1\, - 1\, )(T" - T,, ) (3.12)

Heat balance at j unction hPl9

0= - F;4T20 + ( 1';4- 1';0)1~9 + F;07;4 (3.13)

3-4
Chapter 3 The Process Model

Heat transfer in Heat Exchanger HI

0= -qHI + UA'f! ((7;, - To, )-(7;, -7;, )) IIn ((7;, - To, )/(7;, -7;, )) (3. 14)

Heat to output stream from the heat exchanger HI

O=-qHI +pCp (To,-7;, )Fo, (3.15)

Heat balance in gas heaters

(3. 16)

Heat balance in cooling coil

0= -q H' + UA H , (( TlO - Tom. ) - (T" - Tom. )) IIn ((TlO - Tom' )1(T,o - Tom. )) (3.17)

Heat to output stream from coo ling coi l F l4

(3.18)

Geyzer tempe rature setting

o= - T:u /."C}::cr + 7; 1 (3.19)

Heat ba lance at junct ion hP04

0= F'o47;o + r;17;1 - F,,4 T().j (3.20)

Mass balance at split hP 12

0= - F;2 + FOl + 012 + Pc)) + F'os (3.21)

Mass balance at geyzer bypass hP)o

O=-r;I+F; 4 - F~ (3.22)

Pressure rise over the pumps

O=-IiPK1 +QKl 1;1


, +bK1 F;I +C K1 (3.23)
, (3.24)
O=-!lPK2+ Q K2 F',,2 + b K2 F;2+ C K2
,
0= -IiPK4 + Q K4 1;4 + bK4 1;4 + C K4 (3.25)

3·5
Chapler 3 The Process Model

Pressure drop over the va lves


2
O=-XOI~llPcvOI +P PoI (3.26)
C C VOI

(3.27)

(3.28)

(3.29)

.J
O=-Xos llPcvos +p'-F"- (3.30)
Ccvo~

(3.31)

(3.32)

(3.33)

Pressure drop over the pipes

0= -k41 FOl2 +fb + pg ( hPI2 -hol)-Mcvol (3.34)

0= -kLo2 F"eJ2 + ~2 + pg (h~2 -ho2)-llPcvo2


2
(3.35)

0= -kLoJ Fa) 2 + ~ 2 + pg (hP12 - 1103) - fiPCVOJ (3.36)

0= -kL", 1';: + P" + pg (hP.. - h,.) (3.37)

0= -kL" F,,' + P" + pg (hp" - 11,,) - M CV05 (3.38)

0= -kL" 1';,' + (p" - p,,) + pg (hp" - hp,, ) - Mcv" (3.39)

(3.40)

0= -kL" 1';,' - P" + pg(h" - hp,, ) +MK2 (3.41)

0= -kL" 1';,' + pg(h" - 11,,) - M cV13 (3.42)

(3.43)

O= - kL, , 1';,'+pg(h,,-h,,) (3.44)

3-6
Chapter 3 The Process Model

0= -kL" (F" - F,o)' +(P,o-p,, )+ pg (hP,o- hp,, ) (3.45)

o= -kL,o F,.' + (p" - PlO )+ pg (hp" - h?,o ) (3.46)

O= -kL" F",'+ P",+pg(hPOl-h,,) (3.4 7)

0= - kL" F,,' + (?'o- Po. ) + pg (h?,o- hp", ) (3.48)

0= -kL" F,,' + (PlO - p,, ) + pg (hP" - hP,, ) - Mcv" (3.49)

where:
Ai tan k area, [m2}
aKi pump coefficient, [h2/m]
b Ki pump coefficient, (h]
CKi pump coeffic ient, [m]
Cp heat capacity at constant pressure, [kw/(kg °C)]
CCvij Control valve ij size coeffic ient
Fij vol umetric fl ow rate of stream ij , [mlfh]
hli tank level, [m]
h Oi height level above floor, [m]
hP ij junction height above floor to the Pij pressure point, [m1
kL ij pipe ij resistance, [m water]
qHi heat transfer rate for heater Hi , [kw/h]
qHiHj heat transfer rate for heaters Hi and Hj , [kwfhJ
T jj temperature, [0C]
T amb ambient temperature, rC]
t time [h1
X0 1 valve stem position (fraction of wide open)
U Alii overall heat transfer coefficient x heat transfer area for heater Hi [kw/ (m 2°C)][m2]
p dens ity, (kg Im'J
LlP Ki pressure drop over the pump, [m water]
.1PCVij pressure drop over the valve ij . [m water]

N umerical treatment of this 47 x 4 7 system of coupled differential and algebraic equat ions was
a comp licated task due to the high dimension and non-l inearity. Therefore, for solution of thi s
system, an extended Kalman filter algorithm for systems described by non-linear differential-
algebraic equat ions developed by Mulholland [2001] (personal communicat ion), was applied . A
perturbation method is used in this technique for local linearisation, i.e ., a fixed 'small fracti on

3-7
Chapter 3 The Process Model

(eg. 0.00 I) of the defined range for each va ri able is ~Ised as the perturbation. By avoiding the
use of analytical derivatives, possible model I derivative mi smatches in this large system were
prevented. Admittedly, thi s risk could be reduced somewhat by using a symbolic mathematics
package like Mathemat;ca or Maple.

3.3.2 Co mments on the extented Kalman filter

The Kalman filter is a stochastic filter that allows the estimation of the states of the system
based on a linear state space model. The extended Kalman filter (EKF) uses local linearisati on
to extend the scope of the Kalman filter to systems described by non·Jinear ordinary differential
equations, [Maybeck, 1982 in Becerra et aI., 2001]. Thus, this scheme has been traditionally
appl ied to state and parameter estimation using models described by ODEs.

As mentioned above, fo r state estimation of the Training Plant under study using the state·space
model , an EKF technique was applied. A detailed description of this method is presented in the
Appendix B.

Lincarisation of DAEs
By app lying a Taylor series expansions truncated after the first order tenn, the process model is
Iinearised taking into account the DAE nature of the system, described by the following
equation:

;; =f(y,z)
(3.50)
0= g (y,Z)

where y is a vector of state variables, and z a vector of algebraic variables.

The Jacobian is calculated assuming that f and g functions are suffic iently differentiable in their
argu ments so that all needed differentiations are possible. Notice that for local linearisation a
perturbation method is used in the EKF algorithm. The functions and the Jacobian matrices are
re·evaluated at every iteration by perturbing each variable in tum, thus the va lues of the
elements of the matrices change slowly as the process moves to a new operating point.
Perturbation techniques find their most fru itful application in the class of non·linear systems
[Rice and Do, 1995]. It can be applied to algebraic equations as well as differential equat ions.
Analytical solutions requi ring explicit formulas for the lacobian terms are prone to error.

3·8
Chapter 3 The Process Model

A good approximation of the init ial operat ing point data is required to acce lerate th e
convergence. The devel oped EKF algorithm, technique in thi s work has the advantage of
reducing the problem of singularity since both excess equations and excess variables may be
specified. The solution sim ply achieves the best least squares fit to thi s specificat ion. Where
there is no reason to change an excess variable, it is simply left at its original va lue.

The linear model obta in ed has the form given by equation (8.6) (see extended Kalman filt er
formulation in the Appendix B) as

(3 .5 1)

T he di screte mod el
As ment ioned in sect ion A.3.1, state-space models are most usefu l for Obtaining real-time
behaviour of process system s, since they appear in continuous time. However, when the output
variables are sampled , the control action is imp lemented only at discrete points in time . Because
discrete-time formulati ons are most especially suited to computer simulation of process
behav iour, a discrete-time model of the process based on the li near mode l and the re lationship
of mode l states to the measurements W, are respective ly given by equati ons (B. 10) and (8.11) as
follows

A,x, + H, II, (3.52)

CtX t = HIt (3.53)

K alm nn filt er
With equations (3.52) and (3.53), the transient responses of the state-space model can thus be
founded usi ng the Kalman filter (sec equations (B .12) to (8.14», taking into account the
expected error covariances Q and R matrices for the model and the measurements respectively
as desc ribed by eq uations (3.54) to (3.57). Note that the Kalman Filter has not been used to
provide state estimates, but rather as a means to seek agreement between the differentia l and
algebraic equation s arising in this DAE model structure. Elements of the Q and R matrices were
merely chosen to give satisfactory performance in thi s task. This technique proved useful to
obtain the necessary convergence. For more details on the Kalman fi lter interpretation see
section 5.5.2.1.

3-9
Chapter 3 The Process Model

K, = M, ClT[ C,M,C,T+ R J-' (3.54)

(3.55)

M'+df = A, [I ~ K, C, ] M, A; + Q (3.57)

Notice that for DAEs system the observation matrix and observation vector are defined as C.
and <VI respectively.

3.3.3 Matlab software and res ults

The EKF algorithm was written in Matlab and is presented in Appendix C. The original Matlab
version of the extended Kalman filter software was written by Professor M. Mulholland [2001]
"Personal communication".

Using the model described by a set of equat ions (3.2) to (3 .50), excluding equation (3.5) which
is not relevant, it was possible to establish the open-loop performance. The variables were
constrained in terms of physical reality. For example, the algorithm can handle emptying of
tanks with pump pressures responding correctly and fl ow being lost.

The above theoretical model showed process complexity derived from being multi variable, non-
linear, with a high level of interaction between the variables and comp lex model equations.
Tuning of the EKF predictor to find good parameters of the expected observation error
covariance, R and the expected prediction error, Q that gives satisfactory performance, was a
very difficult task taking into account the large number of variables to deal with, and the little
ava ilable information about the plant.

Reca ll that the EKF scheme has been traditionally applied to state and parameter estimati on
usi ng models described by ODEs. Thus, the software was tested in order to infer the model,
based on the estimated outputs for input step changes for the 2-input / 2-output sub-system
defined on the Training Plant (see section 2.5). Notice that the output variables under study in
the present work, are the level s in tanks TIOI and n02, while the inputs are valves CVOI
(inflow to TI 0 I from TI 02) and CV03 (inflow to Tl 02 from Tl 03).

)-10
Chapter 3 . The Process Mode l

The state·space step responses obtained from the model are shown in Figure 3.1. These
responses are equiva le nt to the step responses derived from experimental data, presented in
Figure 7.2. Resu lting responses showed similar integrat ing behaviour to the experimental data
and same trend although slower. It took approx imately ten minutes for all responses to become
steady ramps. Thus, considering a steady state horizon, M = 5 steps, a time interval, L1t was
defined to be two minutes (see section 4.3 for detai ls of parameters).

- 0.0400 0.0006

."• J

-..
-
e •~
0.0300

0.0200
/

..
•c
_n
.5
~

n
0.0004

V
liT
-~ n 0
~ ~ 0.0002 --'
,
.~ 0.0100 '€,
g / 1 g /(--'1 ,
0.0000
0 , 2 3 , , 0.0000
0 , 2 3 ,
St&PS St&PS

0.0000 0.0000
J "'-.,1 I JE "'-., 1
••
....- . -.
-0.0050 -0 .00$0

N
~

n
·0.0100
" ~
E
N
•~
co ·0.0100
""
~
~
.<
,c
.0.0150

·0.0200
i'--..
~

••,
n

.~
·0.0150

.0.0200 ~
g § I
.0.0250
0 , 2 3 , , ..... -0.0250
0 , 2 3 , ,
Steps Step,

Figure 3.1 Model·predicted unit step responses for the 2· input 1 2·output sub·system of the
Training Plant (M = 5)

Taking into account that little infonnation about physical coefficie nts was ava ilable, many
parameters describing the equipment were guessed, (e.g. pipe friction coefficients) and wi ll be
erroneous. However, the results are promis in g considering that the proposed EKF technique can
sati sfactorily estimate the state variab les describing thi s system. Further investigat ion to find
actua l process parameters is required to improve the model perfonnance.

3·11
Chapter 3 The Process Model

To overcome the difficulties presented by this theoretical model regarding its complexity and
lack of infonnat ion, an emp irical model approach was further adopted (see sect ion A.3.2 in
Appendix A). Thus, the process model of the sub-system under study was built using
experimental data and then app lied to the Linear Dynamic Matrix Contro ller. Empirical models
have the advantage that they are simp ly based on the arbitrary input functions u(t), and do not
require any complex mathematical manipulations or any state transfonnatiolls, on ly requiring a
data record from well-designed experiments. This issue is discussed in the following chapters.

3-12
Chapter 4

Linear Dynamic Matrix Control

4.1 In t r od uction

The control of the exi sting Training Plant presents a d ifficult problem due to a number of
factors described in Chapter 3. Among them are the multivariable, interactive nature of the
system and the fa ct that the process is highly non-linear and constrained.

Si nce Model Predictive Control (MPC), is able to handle most of the difficulties menti oned
above fo r the Training Plant, this technique was applied to design a controller fo r it, using
Linear Dynamic Matrix Contro l (LDMC), one of the most popular applications of MPC based
on the step response. In section 4.2 , the general principles of MPC are presented. The des ign
parameters of DMC are discussed in sect ion 4.3 while a case study of DMC appl ication is
presented in section 4.4.

4.2 General Pri nciples

Model Predictive Control refe rs to a class of control algorithms in wh ich a dynamic model with
its associated uncertainties is used to predict and optimi se process perfonnance. Control design
methods based on the MPC concept have found wide acceptance in industrial applications
because of their abil ity to handle process interactions and unusual dynamic responses, and
because it does not necessarily demand a rigorous mode l derived from first principles. An
explic it dynamic model of the plant is used to optimise the future actions of the manipulated
variables on the output over a longer time period. This flexibi lity is helpfu l in modelling
unusual process behaviour. On the other hand, MPC prov ides the only methodo logy ab le to
handle constraints in a systematic way during the design and implementation of the control
[Garcia, Prett and Morari, 1989]. These authors present a reviewed MPC methodology wh ile de
Vaa l [ 1999] presents an overv iew of ad vanced control techniques.

4· 1
Chapter 4 Dynamic Matrix Control

Successful applications of DMC have been reported in the literature. Robertson, Waners,
Desphande, Assef and Alatiqi [1996] compared a DMC method with standard PI control on
reverse osmosis (RO) desalination processes to produce a constant quantity of product water
with an acceptable purity. They reported that much more fl exibility in the operati on of an RO
plant is available with DMC control. Linear Dynamic Matrix Control (LDMC), based on a
linear programming solution for the optimal path to the control horizon has been developed by
Mulholland and Prosser [1997] following the methods of Chang and Seborg [1983], as well as
Morshedi eJ al (1985]. The combinat ion of linear programming and DMC allows for the
handling of explicit constraints on top of the standard DMC structure . The algorithm was
applied to control the top and bottom temperature of a semi-industrial distillation column.
Mulholland and Narotam [1996] and Prosser [1998] also considered multivariable control using
LDMC.

Qualitative models based on fuzzy sets have also become a powerful too l for representing nOI\-

linear systems. Demircan, Camu rdan and Postlethwaite, [1999] demonstrated that besides
quantitative fundamental and empirical models, a qualitative Fuzzy Relational Model (FRM).
can also be lIsed when implementing DMC.

Some design techniques emanating from MPC are Dynamic Matrix Control, discussed in the
present chapter, Model Algorithmic Control (MAC) and Model Reference Adaptive Control
(M RAC). The last one is discussed briefly in section 5.3.2. The fundamental framework of
MPC cons ists of four elements shared in common by all sche mes. What differentiates one
spec ifi c sc heme from the other is the strategy and philosophy underly ing how each element is
actually implemented. These elements (illustrated in Figure 4.1) may be defined as follows
(Dgunnaike and Ray. 1994]:

1. Reference trajectory specification

Desired target trajectory for the process output, xCi). This can simply be a step to the
new set point value or more commonly, it can be a desired trajectory that is less abrupt
than a step.

2. Process output prediction

The appropriate model is used to predict the process output over a predetemlined,
extended time horizon (with the current time as the prediction origin) in the absence of
further control action ("open-loop" response).

4-2
Chapter 4 Dynamic Matrix Control

3. Control action sequence computation

The same model is used to calculate a sequence of future control moves of the
manipulated variables that wi ll satisfy some specified optim isation objective such as:

• Minimising the predicted deviation of the process output from target over the
prediction horizon,
• Minimising the expenditure of control effort in driving the process output to target,

subject to prespec ified operating constraints. Only the first calculated move is used,
since the optimisation is repeated at each sampling time based on updated informat ion
(measurements) from the plant.

Past Future

"-
..
x Re r<i-2) , xPREO<i)

x PREO< i-2) ,Q/ XM""'S(i) -

x:..... (i-2) (://


w s

I
1 i+l 1+2 I+M-I I+P
,
H orizon

Figure 4.1 Example of elements in model predictive control:.6. - .6. : reference


trajectory, 0 - 0 : predicted output, 0 - 0 : measured output

The DMC algorithm is currently one of the most popu lar and widely used MPC algorithms,
because it is simple, intuitive and allows the formulation of the prediction vector in a natural
way. It is based on a linearised step response model called the cOl/volution model (Figure 4.2) to
predict th e effect of possible control actions. Such a strategy enables the model-based control to
ant icipate where the process is heading.

The elements of the step response represent the changes observed in the process output at M,
consecutive equally spaced, discrete-time instants after implementing a unit change in the input
variable.

4·3
Chaoter 4 Dynamic Matrix Control

I 1____ 1
I-.. . 1.....
'
I

1 BM

~
..,f,
Am
/ I
1BI
0 1 2 3 ... ... ... 1
lime

Figure 4.2 Typical output response to a unit step input

Step responses data can be represented in the convolution model for future outputs as

,, B, 0 0 0 0 0 6 ", ,

,, B, B, 0 0 0 0 6m

,• B

B

B, 0 0 0 6m

B.. BM_, B, o o 6 ",


. (4.1)
, ,., B

B
• B
••
B o tun ...,

,• B

B

B

B" B . ., B, 6m

or

x =Bdm (4.2)

To implement the predicti ve algorithm in accordance with the MPC configuration illustrated in
Figure 4.3. it will be seen that other matrices are defined from the step response coefficients. Bo
is the Offset matrix of the coefficients and BOL a matrix of the Open Loop response coefficients.

An approach fo r on-line ident ification of the step response coefficients, in Bo matrix which. are
used to fill BOL and B matrices applied in the DMC algorithm, is illustrated in th is study and is
discussed in chapter 6.

4-4
Chapter 4 Dynamic Matrix Control

find lll1l to
-~-e~)---.-l imise eel. - - ,- x

PROCESS
MODEL

p ' UMI
X m, pnllinlon
COR RECTED 1,1,) " .. ,I'
I,J,)~, .. ,I'

(o pen.)oop t r aj ecto ry) e~IODEL


OFFSET

F ig ul'c 4,3 Model Predictive COll lrol configuration [Mulholland and Prosser, 1997J

Thus, the step responses of an m.input / n·output system can be represented by a series of
matri ces B I • B1• BJ, ..... , Bp. The position (iJ) in each matri x B, is a point on the trajectory at
time 1 for the (i th) output as it respond s to the j th input. Now consider the foll ow ing
construction in which Lim l is the vector of input moves (changes) made at time I, and XI is the
vector of outputs at time I, A mov ing frame of reference for time is lI sed in which 1=0

represents the present time.

4-5
Chapter 4 Dynamic Matrix ContrQI

X0/'RED B. 8"., B.., B. , B, B, 0 0 0 0 0 0 1::!J1/_M +1


X OPRFJ) B. B. , B. , B.. B, B, 0 0 0 0 0 0 1::!J1/_M +1
X OPRED B. 8 ..., B... , 8 ..., B, B, 0 0 0 0 0 0 l!.IlI_}.f+J

X,"""" B. 8"., B,,_, B., B, B, 0 0 0 0 0 0 &n_M~

XO PRJ.:D B. 8"., B"., 8"., B, B, 0 0 0 0 0 0 M.


(X~"RfD ) _
, ... _. ,"-' ..
x, B. B. 8"., B" B, B, B, 0 0 0 0 0 tJm,
' '( PRIill
x, B, B. B. B.. _, B. B, B, B, 0 0 0 0 M.,
xM B. B, B
• B, B
• 8".• : Bu _, B"., B, 0 0 l!.In}.f

XU+I B. B. B. B. B. B. · B., B,,_, B, B, 0 I::!m,lf+1

XP B, B, B, B, B, B, B, B. B. B, B" .• B. 6111,
(4.3)

The vector of vectors X OPRED = Bo 6 m pAST in eq uation (4.3) contains P ident ical predictions of
the output vector at the present time 1=0. The vector XPRf:O contains pred icti ons of the output
vector at P points on the future trajectory, as contributed to by the past M control moves
[6m pAST = (6tn.M+1..... , 6m.o)T], and a future P control moves. \Ve choose Mt o be large enough
to ensure that all step responses are at steady state at this point (BM)' Then we expect that our
predictions of -"'OPRED and -"'PRED will only be in error by steady-state offsets emanating from
ea rlier than M steps before the present time.

We make P copies of this offset error by comparison with a vector X O.lIEAS conta ining P cop ies
of the present output measurement

X Q.l/EAS

(4.4)

X fJ}.f£AS

and lIse them to correct our future predictions as fo llows

(4 .5)

4·6
Chapter 4 Dynamic Matrix Control

The matrices B o. B OL and B are clearly top-left, bottom-left and bottom-right respect ively in
the structure given by equation (4.3). h~ DMC we solve on each step for a limited sequence ofN
moves (o m·) to be optimised (N :s; P). Actually, on ly one or two future moves are normally
solved, all owing a reducti on to one or two co lumns in B, resu lting in the matrix B* (non-square
P x N matrix). Although only the first move is ever used, a solution for a second move all ows
stronger action on the first move, because the solut ion plans a correction with the second move.
In thi s way higher gains are obtained.

A quadratic objective functi on J, dependent only on 6 m* can be defined as:

J(6 m *) = (eed T W (eCL) + (6 m*) TA (6 111 *)


= (XoL - xsp +B*6m *)T \V(xoL -xsp+ B *6m *) + (6 m*)TA (6 m*) (4.6)

where Xsp is the process variable set point trajectory, while the cl osed loop error, ea, is de fin ed
as:

eCL = eOl. + B 611l* (4.7)

and the "open -loop" response, XOL, corrected for present model offset, is given by

(4.8)

Thus, an optimal seq uence of control moves, o m ·, for minimum control move effort which
achieves minimum deviation from the set point trajectory up to the time horizon P, is foun d by
minimis ing J with respect to om*. Thi s optimisation problem is solved lI sing a least squares
technique (see Section 5.5.2.2). The LDMC approach then finds the "closest" 6 m* to this po int
which satisfies the input and output constra ints (see below).

A we ighting factor matrix, W , and a move suppress ion matrix, A, generally diagonal,
(discussed in the next section), are incorporated to determine the extent to wh ich deviations
from setpoint, or control moves, are di scouraged.

Th is model predictive control (MPC) format lends itself to deal in g with constraints in both the
input and output variab les. The present work uses a combination of quadratic and linear
objective function s in which linear programming (LP) is used to obtain a final so lution w ith in
constra ints (LOMC). This solution has the benefits of QDMC without being as computationally
demanding (Chang and Seborg, 1983; Morshedi et aI, 1985). It is based on the idea of obtaining
the closest approach to the least squares optimum , should it lie outside of the constra ints.

4-7
Chapter 4 Dynamic Matrix Control

4.3 Design parameters for DMC

As mentioned above, within the DMC algorithm, the process dynamics are represe nted by a set
of numerical coeffic ients determ ined from a process step response. While an extens ive review
of the DMC algorithm is not discussed in the above section (the interested reader shou ld consult
references [Ogunnaike and Ray, 1994; Mulholl and and Prosser, 1997] for a detail ed
description), it is useful to discuss several design parameters which can be adjusted to give the
desired response as well as an appropriate amount of controller effort. Bearing in mind that only
the first N control moves of the possible P need be opti mi sed (the rest can remain zero), the
parameters include:

• sampling time, .1t


• steady state horizon, M
• optimi sation horizon , P
• number of future control moves, N
• process variab le we ight, W
• move suppressi on, A

At discrete sampling in stants, .1/, the step response coefficients may be determined from the
step response model. The steady state horizon, M, is the time for the open-loop step response to
reach e.g. 99 % comp letion. The choices of the sampling time and the steady state horizon are
interrelated as the steady state corresponds to the settling lime of the system expressed as a
mu ltip le of the samp ling interva l. The se lection of these parameters should in sure that no
truncat ion problems arise in calcu lating the predicted values for the COl/volution model. The
sampling time se lected mu st be small enough to accurately represent the process dynamics.
However, if chosen too sma ll , it wi ll requ ire an extraordinarily large steady state horizon. Smal1
values of M, with subsequent large values of .1/, are desired so as to reduce the computational
requirement. In cases where a dead time is to be accounted for the sampling time must
obviously be smaller than thi s delay.

Param eter P is defin ed as the optimisat ion horizon. It is equal to the number of predicted
controll ed variab le response times that are used in the opt imi sation calculations.

4-8
Chapter 4 Dynamic Matrix Control

N is used to ind icate to the controller, the number of future control moves that are calculated in
the opt imisat ion step to reduce the predicted errors [Seborg, Edgar and Mellichamp, 1989]. The
computational effort increases as N increases and a small va lue of N leads to a robust controller
that is relatively insensitive to model errors. Thus, as the value of N is increased. more degrees
of freedom are availab le for the controller optim isation step. Thi s will result in tighter control,
at least as far as minimising the objective funct ion is concerned. Wh ile increasing N can result
in better control system perfonnance. the manipulated variable movements become larger and
there is a reduction in the controller's robustness.

However, it has been noted that if a particularly fast response is necessary. and the reduced
robustness can be tolerated, a controller with higher va lue of N can be more finely tuned using
the cont inuous adjustment of A as opposed to discrete values of P or N [Proso;er, 1998).

In practical situation s, it is usually necessary to suppress the movement of the manipulated


variables. This is achieved by incorporating move suppression values, A, into such variables.
Increasing the A values will slow down the controller's closed- loop response and reduce the
size of the changes that are generated. In addition, it is possib le to achieve tighter contro l of
some variab les relative to others, by multiplying the controlled variables set point deviations
(squared) by different weighting values, W, in the objective funct ion (equation (4.6».

The selection of such we ight parameters for the controlled variables is generally a relative
matter, depending on the need to control some outputs tighter than others. It is important to note
that whi le the se lection of individual weight parameters does indicate a designer's desire to
control one output tighter than another, a comparison of the absolute values of the weighting
parameters does not indicate the degree to which one variable is controlled relative to others
[Robertson et aI., 1996). This comes about because variab les may have different units, and
some units, such as those of temperature and fl ow rate, cannot be directly compared.

4.4 Application of LDMC to a Pump-tank system - case study

The on-line testing of LDMC was done using a second plant considered in this research and
mentioned in Section 1.1. This was the 2-input 12-output pump-tank system used for simulation
and laboratory tests in the School of Chemical Engineering at the Univers ity of Natal,
represented in the Figu re 4.4.

4-9
Chapler 4 Dynamic Malrix Conlro\

The system consists of a pair of interacting tanks receiving water from a reservo ir by mean s of a
centri fu ga l pump. The two input variables are control va lves: valve I is on the return line to the
reservo ir and valve 2 connects the two tanks; the output variables are levels I and 2. At the
bottom of each tank is a small pipe connecting the tanks to a shared line, wh ich return s to the
reservoi r. The va lves on these pipes remain at some fixed open position and allow water to flow
out the tanks and back to the reservoir cont inually. VI , V2 indi cate valve position as percentage
open, and Ll, L2 indicate tank level as percentage full.

The Pump-tank system was operated to get the open-loop step responses presented in Fi gure
(4.5). These responses show stable process behav iour, i.e., "se lf-regulatory" (see section A.2 in
Appendix A). The time taken for the system to reach a steady-state in all step responses after
di sturbances was approximate ly 10 minutes. Note that the response of L2 to V2 achieves the
steady-state on the last point. A time interva l, t11, was chosen to be 60 seconds and giving a
steady-state horizon, M of 10 steps.

VI

V2

F igure 4.4 2-input 12-output Pump-tank system for simu lation and laboratory tests

4· 10
Chapter 4 Dynamic Matrix Control

:; N
>
.!::: 0.000 I I
~ .Q.1SO
1\ 1 ! I .£ 0.000

~ -O. 025
1\ I
~ -5
-~
-' . -<I.lOO

;;:; -0.450
';;
'\ ,
7 "
~ ~
;- u -0.050
-' ~
<;; -0.075

~ -0.600 ·
1 I .~ -0.100 I I

- 0 1 2 3 4 5 6 7 8 9 10 g 0 1 2 3 4 5 6 7 8 9 10
Steps Steps

-
>
.<
0.000 ~I ~ 0.800
.< I1
• -<1.030 . g. 0.600 1 -
2'
j!.i'!
u -<1.060 .
~ 1
7~~"
~ u 0.400
Y
N
-' V -0.090 . -' It V
~ 0.200 ·
'E, " 11I •, 1
.g 0.000 / 1
-<1.120
,g 0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
Ste ps
Ste ps

Figu re 4.5 The unit step responses fo r the Pump-tank system (M = 10)

To ill ustrate some properties of LDM C, the controller design and the effect of constra ints were
considered. The data acqu isition and control action implementat ion tasks we re performed with
the optim isation hori zon, P = 10, the same as the steady state horizon, M. The move
suppression factor, A = 1 and weight factor, IV "" 100 were tuned on-line givi ng sat isfactory
performance with two optimised control moves as illustrated in Fi gures 4.6 and 4.7, fo r step
changes in the set point made at 340 and 640 seconds for outputs 1 and 2 respectively. Note, as
mentioned before, a controller update interval of60 seconds was used in all of these tests.

4- 11
Chapler 4 Dynamic Malrix ContrQI

80 .
I "L . "
II I II ,
I, I I ,
I I,
~ 60
"-
-
•> 40 I

~
,""r l ~

I
20

0 I
0 200 400 600 800 1000 1200
Time {s]

1
L1 L2 ........ L1sp _._. ,L2'P :
80 , ,
60
I
1 I 1
- 1 I I I, 1 I
i.
;.-~

"
... '", , j.. .... - "
~ 40 ·· . .. I . .- "
>• 20

0 I
0 200 400 800 800 1000 1200
Time Is]

V1 ........ V2 1
1

Figure 4.6 Unconstrained closed loop step response for N = 2, A = I and W = 100

In th e unconstrai ned run (Figure 4.6), the control was efficient in reducing set poi nt deviations,
while at the same time being severe in terms of control movements since the second opti mised
move makes a correction to the first move, which can therefore be an "overshoot" move.

The Li near Dynam ic Matrix Control was also observed to take logical actions accounting for
the system coupl ing and allowing for constrai nts as ill ustrated by Figure 4.7. In this case, upper
constraints of 60 % for input I and 50 % for input 2 were imposed. As a result, an offset can be
seen in the level 1 in the period where the constraints are active. Th is is as wou ld be expected
from reducing the degrees of freedom of the man ipulated variab les. However, Ievel 2 presents a
smooth response and attempts to obtain the best fi t.

4-1 2
Chapter 4 Dynamic Matrix Control

80 -

60
, , , , ,
I -,'f- I -
,,
. ~ ~
I I I I
- - -- I I I , I I
, - I
1':
-•
>
40 I - - T-. -- - -- _.
I
!i - I
20

0 I I
0 200 400 600 800 1000 1200
Time [s]

I L1 12 -l1sp ___ .. . .. 12sp l

80

i!:

'"
60 -

40
-- - . .. - - --
I I
-- -1- ,' I I I I I !l I I I
I (~- -~!-
>• I ,
20

0 I I
0 200 400 600 800 1000 1200
Time [sI

1........ V l - - V2 1

Figure 4.7 Closed loop step respon se for N = 2, A = 1 and W = 100 with upper constra ints
V I: 60 % and V2: 50 %

Notice that a large number of tuning parameters, including move suppression, set point
deviation weighting factor and different numbers of contro l moves were tested for this system,
subjected to a step change in the set point, and the LOMC algorithm gave acceptable
performance for a wide range of these condit ions. When the weighting factors are held constant,
decreases in the move suppression values for each manipulated variable resulted in
progress ively faster responses. If the move suppression is held and the weighting factor
increased, faster responses were again noted.

4-13
Chapter 5

Adaptive Control Principles

5.1 General

Traditionally, chemical process control has focused almost entirely on the analysis and control
of linear systems. Therefore, most exist ing control systems design and analysis techniques are
suitable only for linear systems. Thi s is because many processes are in fact only mildly 11011-

linear, and even strongly non-linear processes take on approximately linear behaviour as they
approach steady state.

Nevertheless, for those non-linear process whose non-li nearities are strong, linear controller
design techniques often prove inadequate as the process moves further away from steady state
and more effective alternatives must be considered. An adaptive control system is one of the
advanced control strategies that can, in some cases, provide significant ly improved process
control beyond that wh ich can be obtained w ith conventional controllers.

Despite DMC presenting several features and advantages as descri bed in Chapter 4, being linear
it introduces some limitations when it is applied to non-li near systems. To deal with the non-
linearity nature of the present process (see section 3.3), an adaptive control scheme with
recursive parameter estimation was proposed and implemented in the DMC algorithm. A
deta iled discuss ion about adapt ive DMC is presented in Chapter 6.

Bas ic concepts of adaptive control and model parameter est imation using a recursive least
squares technique are introduced in thi s chapter. An overview of adaptive control is given in the
section 5.2, while severa l schemes of adaptive control are discussed in section 5.3. In section
5.4 s uggestions of how to proceed in order to decide what type of controller to lI se are given
and some aspects of the identificat ion and parameter estimation are discussed in section 5.5.

5-1
Chapter 5 The Adaptive Control Principles

5.2 Adaptive control overview

Modern industrial processes are getting more and more comp lex, and are inherently non-linear,
respond slowly, and have large time-delays and so on. The quest for improvement in the
performance of process plants and the avai labi lity of fast computing power has given rise to the
development of a new generation of advanced control algorithms. These algorithms can identify
the current optimal operating point of a process and effect the transition of the process to a new
optimal point in an acceptable and safe manner.

According to Astrom and Witternmark [1995], adaplive control is a technique that


automatically adjusts the controller settings with process moves from one operating point to
another, to accommodate cIlanges in the process to be controlled or its environment.

An adaptive control system can be thought of as having two loops. One loop is a normal
feedback with the process and the controller; the other loop is the parameter adjustment loop
and this is often slower than the normal feedback. The general strategy for designing adaptive
control systems is to estimate the model parameters on-line and then adjust the controller
settings based on the current parameter estimates.

Adaptive control schemes provide systematic, fl exible approaches for dealing with
uncertainties, non-linearities, and time-varying process parameters. Consequently. adaptive
contro l systems offer s ignificant potential benefits for difficult process contro l problems such as
non -l inearity and / or high-order, where the process is poorly understood and / or changes in
unpredictable ways. This control technique has been applied in chemical processes. Several
theoretical and experimental studies have appeared in chemical engineering literature, [Seborg,
Edgar and Shah , 1986; Astrom and Witternmark. 19951, while the number of industrial adaptive
control techniques availab le increases continuously. Most of the adaptive contro l 'systems
require extensive computations for parameter estimation and optimal adjustment of controller
settings.

Seborg et al [1 986] have reviewed the adaptive contro l strategies from a process control
perspective and describe teading design techniques. This survey paper is a good reference to get
detailed information about this issue.

5-2
Chapter 5 The Adaptive Control Principles

5.3 Adaptive schem es

Two general categories of adaptive control problems can be distinguished, differing ma inly in
the way the controller parameters are adjusted. The first category consists of problems where
the process changes cannot be directly measured or anticipated. The most popular are mode l
reference adaptive control and self-tuning adaptive control. The second category consists of
control problems where process changes can be anticipated or inferred from process
measurements. In these situations, if the process is reasonably well understood, it is feasible to
adj ust the controller seuings in a predetermi ned manner as process conditions change, and this
contro l strategy is referred to as gain scheduling. Most adapt ive control literature has
emphasised the fi rst category [Maiti, Kapoor and Saraf, 1994; Maiti and Saraf, 1995a &1995b;
Aitchison and Mulholland, 1997; Demircan, <;amurdan and Postlethwaite, 1999]. A brief
description of these schemes is follows:

5.3.1 Scheduled Ad a ptive Control

As mentioned above, in some cases it is possib le to fi nd measurable variables that correlate well
with changes in process dynamics. Such variables can then be used to change the controller
parameters by monitoring the operating cond itions of the process, to reduce the effects of
parameter variations. This scheme is referred to as gain scheduling and is commonly used in
industry to overcome the ga in mismatch. A block diagram of thi s scheme is shown in the Figu re
5.1.

A good knowledge of the process is required to apply th is method and a great advantage of this
scheme is that the controller adapts quickly to changing cond itions. Since no estimation
parameter occurs, the limiting factor depends on how quick ly the auxi liary measurements
respond to process changes.

Gain schedu ling has been used in special cases, such as combustion control, pH control and
other well-known contro l problems that present difficulties due to large variations in process
dynam ics (Ogunnaike and Ray, 1994].

5·3
Chapter 5 The Adaptive Control Principles

Updated I Gain I
Controller I Schedule
Parameters Opera ling
Condi (ion

'.
Set.po1n+'2\.. J Controller "
Input
Process I ,
. OulPU

F igure 5.1 Bloc k diagram ofa system in which the influences of parameter variations are
reduced by gain scheduling

5.3.2 Model Reference Adaptive Control

The key component of the Model Reference Adapti ve Control scheme (M RAC), is the
reference model that cons ists of a reasonable closed-loop mode l of how the process should
respond to a set point change. The reference model output is compared with the actual process
output and the observed error eM is used to drive some adaptation scheme to cause the controller
parameters to reduce eM to zero. The adaptation scheme could be some control parameter
opt imisatioll algorithm that reduces the integral squared va lue of eM, or some other procedure.
Thi s scheme is illustrated in the Figure 5.2.

Reference Model Output


Model
e +

~ ~
Controller
Updaled Paramete r
Controller Adjustment
Paramcte~

, + ~ J Controller I " Process I x


Sel-point
Input OutpuI .

Figure 5.2 Mode l reference adaptive contro l structure

5·4
Chapter 5 The Adaptive Control Principles

5.3.3 Self-tuning Adaptive Control

Self-tun ing adaptive controllers differ from the model reference adaptive controller in basic
principle. The self-tuning control configuration in Figure 5.3 is flexible enough to accommodate
a wide variety of parameter estimation techniques and controller des ign strategies. It makes use
of the process input and output to estimate recursively, on -line, the parameters of an
approx imate process model. Thus, as the actual non-l inear process changes operating region or
changes with time, an approximate model is continuously updated with new parameters. The
updated model is then used in prespecified contro l system design procedures to generate
updated controller parameters. The controller could be a PlO controller or more complex
control system structures such as a cascade controller, DMC, etc.

Since the est imated model detennines the effectiveness of the controller, the most essentia l
feature of the sel f-tunin g controller is rel iability and robust model identification. In the present
work, a se lf-tun in g adaptive control sc heme is implemented in the Linear Dynam ic Matrix
Control algorithm, where the coefficients of the step response are updated recursively (Chapter
6).

~ I
Control
design
Updated
Controller
Parameter
estimation
--
Parameters
x
Set-point Controller I " Process x
I Input
Outpu

F igure 5.3 Se lf-tu ning control system

5.4 Procedure to decide what type of co ntroller to use

An adapt ive controller, be ing inherently non-linear, is more complicated than a fi xed gam
controller. Before attempting to use adaptive control, it is therefore important to investigate
whether the control problem might be so lved by constant·gain feedbac k. Figure 5.4 shows how
to decide what type of contro ller to use [Ast rom and Wittlermark, 1995].

5-5
Chapter 5 The Adaptive Control Principles

Process Dynamic

Varying
Constant

Use a controller with


varying parameter
"
Use a controller with
constant parameters

Unpre ictable
red ictable
varia tions
variations
~
Use an adaptive Use gain
controller scheduling

Figure 5.4 Procedure to decide what type of controller to lIse

S.S Identification and parameter estimation

As mentioned above, on·line determinat ion of the process parameters is a key element in
adapt ive control. A recursive parameter estimator appears explicitly as a component of a self·
tuning regulator (see Fi gure 5.3). Parameter estimation also occurs implicitly in model reference
adapti ve control (see Figure 5.2). Since system identification is executed automatically in
adaptive systems. some aspects of it are discllssed in thi s section.

S.S.1 Comments on identification and parameter estimation

The non·linear and non·stationary nature of a typical chemical process leads to a change in its
dynamic characteristics during operation. To cope with this situation, a controller should be
able to adjust its parameters in an "optim um" manner. However, the complexity of these
processes makes them difficult to understand, model, interpret and control. As a consequence
engineers often try to develop empirical dynamic process models for these systems, directly
from input I output data rather than attempting to develop time consuming, expensive
fundamental, analytical models [Bamard and Aldrich, 2000].

System identification deals with the prob lem of bui ld ing mathematical models of dynamica l
systems based on observed data from the system. This activity can be carried out in an off-line
or oil-line manner. In the off-line situat ion, the process data is first stored and later transferred to
a computer and analysed. For this "batch" processing technique, a whole data set is evaluated at

5-6
Chapter 5 The Adaptive Control Principles

once. In the on-line techniques, the identificat ion is performed in on-line operation with the
process and, two ways of processing data can be distingui shed: real-time processing and batch
process ing. In real-time processing the data is evaluated immediately at each sample instant,
while in batch processing, the data is evaluated periodically after periods of measurements have
been made. Rea l-time process ing in general needs no storage of data since each new point is
used to update the model parameters.

Table 5.1 Some examples for the relati onships between different final goals and some
specifications of process identification [Isemmnn, 19801

Final goal of Type of Required accuracy Identification


mode l application process model of model method

Verification Ii near/continuous- mediumlhigh off-line step response of


theoretical time non-parametric! frequency parameter-
models parametric estimation

controller linear, non-parametric, low for off- line


parameter tuning conti nuous-time input/output step response

computer aided linear, medium for on-line


design of digital parametric input/output off-line
control discrete time (non-parametric) beha\liour estimation parameter algorithms

self-adaptive linear, medium for on-line parameter


digital control parametric, input/output estimation
discrete-time behaviour in closed loop

process parameter linear, high for on-line


monitoring non-linear, process parameter
and failure detection continuous-time parameters estimation

It is thu s important to regard first the final goal for the application of the process mode l, since
this determines the type of the model and its accuracy requirements and the identification
method. Prior knowledge of the process is required. Table 5.1 shows some of the relationsh ips
between different fina l goals and some specifications of process identification [Isermann,
1980]. The key elements of system identification are the selection of model structure,

5-7
Chapter 5 The Adaptive Control Principles

experiment design, parameter esti mation and val idat ion . The se lection of mode l structure and
parameterisation are fundamental issues.

A ge neral procedure of process identification is illustrated in the Figure 5.5 and shows how the
identificati on is an iterative procedure. Isermann [1980], presents a good description of pract ical
aspects of process identification while Lj ung [1999] descri bes a theory of system identificati on
that has direct consequences for the understanding and practica l use of avai lable techniques.

process
T~k
Economy
Final
goal
A prior
knowledge
- Physical laws
Premensurements
Operating condition ,

\.. I
-. Design of
experiments

~
Signal generation,
mensurements
and data storage

.J. ~

r- Application of
identification method
Assumption of
model structure

-+
Process model
-
I- Non-
parametric
parametric
~
Model structure
detcrmination

l
Modcl No
verification

.J. '"
I I
Final
model

Figure 5.5 Genera l procedure of process identification

Because system identificat ion has been suffic ient ly forma lised for li near systems, but not for the
empirical identi fication of non·linear dynamic systems, many researchers have studied th is
prob lem. A method for estab lishing second order plus dead time model par~mete rs under
c losed-loop PI contro l is proposed by Suganda, Krishnaswamy and Rangaiah [19981 . The

5-8
Chapter 5 The Adaptive Control Principles

advantage of this · technique is that the required closed-closed loop response data can be
obtained wh ile the process is in normal operation since many industrial controllers are of the PI-
type.

Barnard and Aldrich [2000] propose a for mal methodo logica l framework for the empirical
mode lli ng of a non-lin ear dynamic system that can be parameterised as a state space system.
The methodo logy invo lves classification of a time se ri es and associat ing a suitable mode l with
the prediction of the time series.

Some aspects of the real time parameter esti mation are di scussed below, followed by an on·line
ident ification exam pl e using batch processing. A real·time process ing examp le is presented in
Chapter 6.

5.5.2 Recursive le~lSt square estimation of model parameters

In adapt ive control, rea l-t ime (or sequentia l) updating of the model parameters is more
appropriate than batchwise (non sequenti al) process in g of the input·output data. Algorithms that
are suited to real· time usage and are based on successive updating of the model parameters are
called recursive. There are a large number of recursive identification algorithms described in
the literature. Treatments of these techniques are given in many textbooks, and Ogun naike and
Ray [ 1994J ; Astrom and Winenmark [1995] and Lju ng [1999] may be mentioned as su itable
references for furthe r study. The most popular technique is Recursive Least Squares (RLS).
di scussed in this section. It is assumed in thi s technique that the order and the form of the
system are known. We start thus by giving an overview of Kalman filtering since it is used 10

eslimate the parameters of the mode l rectlrsively by us in g the least squares technique.

5.5.2 .1 Kalman filte r interpretation

Cons ider linear, discrete time dyna mic systems where pred ict ion s and observations are
subjected to random errors to account for the uncertainties:

(5.1 )

and for th e measurement :

5-9
Chapter 5 The Adaptive Control Principles

y / =G/x,+ J.l, (5.2)

where x is the state vector, u the input vector of independent variables, i represents the time
and y the system out put. G is an observation matrix while A and B are matrices of appropriate
dimensions (11 x 11 and 11 x 111, respectively, for an n-dimensional state and an m-dimensional
input). These matrices (A and B) typically correspond to unknown values of physical
coefficients, property constants and .the like. a and J.I are process and measurement noise
contribut ions respective ly acting on the states. They resu lt from both measurement
imperfections and disturbances affect ing the process. They are considered to be random
variables with zero means, and with known covariances:

(5.3)

and for uncorrelated a and J.I

E{SJi ' } = [0] (SA)

Linear, discrete·time models are preferred for adaptive control because they lead to algorithms
Ihat are readily impleme nted on a digital computer.

In a real time identification situation (Figure 5.6), X'+ h x" and Uj are observed on- line and the
elements inside A and B matrices that give a good description of the input I output behaviour of
th e system need to be found. The on-l in e computation of the mode l must be done in such a way
that the processing of the measurements from one samp le can, with certainty, be completed
during one sam pling interval. Otherwise the model building cannot keep lip with the
infonnation flow.

Real
I-X~
U;+l
Real
pnxoess word
-- .. _------- --- - -- -- --- --------- -------- .__ .- ---_.
~.,
RLS
-
Z·l 4
' Ident . A
= of B
Z"~ model
-
Figure 5.6 On-line identification con figurati on

5·10
Chapter 5 The Adaptive Control Principles

The Ku lman interpretati on of th is system, taking in to account the expected errors, is that the
filter gain K, is yiel ded on each time·step for adjusting x as follows:

(5.5)

(5.6)

M,., = A, [1- K, G,jM, A,T + Q (5.7)

where M i is the filter covariance matrix (diagonal and initially small to promote fast adjustment
at the start), R the expected observation error covariance (usua lly diagonal) and Q, the expected
prediction error covariance (usually diagonal). Higher prediction errors Q relative to
observation errors R, force the filter to follow observations more closely, whilst specifying
higher observation errors R makes the model less sensitive to observations.

The initial conditions can be set so that Xo is what we guess the parameter vector to be before
we have seen the data, and Mo is the initial covariance matrix, which renects the confidence in
thi s guess.

Equat ion 5.6 shows that the estimate X i+! is obtained by adding a correction to the prediction of
X i->- I based on Xi accord ing to the model. The correction term for the model parameter vector is
thus proportional to the prediction error (difference between the measured value of Yi and the
prediction of Yi) based on the prev ious estimate. The components of the Kalman fi lter gain
matri x, Ki are we ighting factors that introduce an optimal correction inro the integration cycle.

Notice that this form (equations (5.5) to (5.7)), allows A and B to vary in time. This provides a
way to hand le non· linearities, since, as the process moves to a new operating point, elements of
these matrices will change. Recall that these equations were also applied in Chapter 3 for state
estimation of the state·space model of the Training Plant, using an extended Kalman filter.

5.5.2.2 Least sq uares parameter estimation

Parameter estimat ion is concerned with the detennination from experimental data of the best set
of values for unknown parameters in a process of known form. The least squares estimati on
approach (also ca lled linear regression) is a basic technique for parameter estimation. The
method is particularly simple if the model has the property of being linear ;n 'he parameters.

5-\\
Chapter 5 The Adaptive Control Principles

Based on Ogunnaike and Ray [19941, Astrom and Wittenmark [1995], we prese nt some basic
principles fo r parameter estimat ion. Consider a mathematical model subjected to an
unavoidable measurement error, as well as the inaccuracies that can be written in the form:

; i = 1, 2, . . . , t (5.8)

where y is the observed va riable, p are parameters of the model to be determi ned, g is a known
fun ct ion that may depend on other known variables and is called the regression variable or the
regressor and eM jlhe vector of errors between the model pred iction and the actlLa l data,

The parameter estimation is now involved with findin g a specific set of parameter
va lues such that some scalar function J of the vecto r P. known as the objective fun ction
and usually represented as J (p) , since it depends on the parameter values, is minimi sed.
Typically we use the quadratic form :

/. / T
J(p)= ~]eM ,] [eM,] (5 .9)
,.,
or from equation (5.8)

i., T
J(p) = Dy, - f (g" p)] [y, - f (g;. p)] (5.10)
i. l

where the summation is over all of th e data points. Somet imes it might be necessary to assign
more weight to more precise measurements, and less weight to others. Thi s is accomplished by
introducing weighting coefficients as foll ows:

i.,
J( p) = L:[y, -f(g" p ) j' w, [y, - f(g" p)] (5 . 11 )
,.,
The coefficients IV/ reflect the relati ve precision of the measurements (for more details about
we ight factors see section 4.3).

5-12
Chapter 5 The Adaptive Control Principles

It can be seen from equat ion (5.10) that th is parameter estimat ion IS really a quadratic
optim isation problem. Its object ive is to estimate the parameters in p that minimi se the model
error.

Remember that this technique is also applied in the constrained Dynami c Matrix Control
algori thm (Chapter 4) where J is a defined quadratic function depending on a limited sequence
ofN moves (6 m*) to be optimised.

Iff(g;, p) is linear in the parameters p, equation (5.8) can be represented by equation (5.2) as:

y~G p + C M , (5.12)

whe re G is the complete matrix of independent variables compi led for each set; y is the entire
co llection of the experimentally obtained data; and C,\ I; contains the prediction errors, and we
wish to find a vector p ofslIitable parameters. IrG were square and non-si ngu lar, we could get
the constant coefficients p directly from

(5.13)
However, in genera l, G will not be square and the linear (least squares) parameter estimation
problem is now to find the vector p for which the squared deviation of the data set y from the
~lodel Gp is minimised . The funct ion is minimal for parameters p such that:

(5.14)

If the matrix GTG is non-singular, then the minimum is un ique and given by:

p =(GTGr'GTy (5.15)

5.5.2.3 T he recursive least sq ua re parameter estimat ion

In the adaptive controllers, the observations are obta ined sequentially in real time. It is then
desirable to make the computation recursive to save computation time . Computation of least
square estimates can be arranged in such a way that the results obta ined at time i can be used to
get the estimates at i+ 1. We can rewrite the solut ion of equation (5.15) in the recursive form by

5-13
Chapter 5 The Adaptive Contro l Principles

using the Kalman filter. We also asslIme th at in the equation (5.1), the matrix A is an ident ity
matrix and, that matrix B is the null matrix :

(5.16)

Thus, following the Kalman filter interpretation (equations 5.5 to 5.7), the RLS fit is given on-
line by:

(5.17)

PH' =I p,+ K,[i'-G,p,] (5.18)

(5.19)

Least square parameter estimati on can also be applied to certain non-linear models. The
essent ial restri ction is that the mode ls be li near in the parameters so that they can be written as
linear regression models [Astrom and Wittenmark, 1995]. Notice that the regressors do not need
to be linear in the inputs and outputs.

5.5.3 Application of the recursive least sq uares parameter estim ation tec hnique to a
Pump-t ank system - case study

The open loop on-line identification by recurs ive least squares parameter estimat ion technique
is illustrated in this examp le using batch processing for step input changes, on a 2-input I 2-
output Pump-tank system for simulat ion and laboratory tests presented in Figure 4.4. The model
parameter est imation was constructed from observed data.

To eva luate the disturbance in fl uence, a ra ndom-number generator was used to produce a
sequence of input changes during the identification time that could be considered as a
representation of wh ite noise.

Determining the model from the data set


From the collected data for parameter estimation, a "best" set of the converged va lues of the
parameters (F igure 5.7) was used to estimate the elements of A and B matrices of the mode l, by
tak ing th e average of that set. The resu ltant mode l fo r .6.t = 200 seconds, is represented by
equation (5 .20).
Chapler 5 The Adaptive Control Principles

1.' , -_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _------,

..... • . ••• ._ ............c t ","

"E
s
0.5 /- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/
~
If.

~ . ,L_ __________________________________________- "

Time [s]

_____ all _._._. a 12 ____ .21 __ •• a22


_ _ _ b11 ........ bl2 _ _ _ b21 _ _ _ b22

Figure 5.7 Data set fo r parameter estimation

0.9 14 0.034]
= [ 0.089
x. + [- 0.030 - 0.062] u. (5.20)
X i+ l 0.935' 0.000 0. 11 7 '

Model validation
The actual siruation is that a certain model structure to predict future outputs, was selected and
therefore, a test to evaluate the model abi lity to describe the observed data is needed. A "good"
model is one that is good at predictin g that is, one that produces small prediction errors when
compared to the observed data. Note that there is considerable flexibi lity in se lecting various
pred ictor functions, and th is gives a corresponding freedom in defining "good" models in terms
of prediction performance.

In the present case, the val idation was based on integration using the dynamic matrix as in
equations (5.21). The model initial va lue was attached to the measured sequence at the starting
point of the sequence.

(5.21)

5-\5
Chapter 5 The Adaptive Control Principles

Where: aJk and bjk are the parameters of A and B matrices


K,. output j at time i
u" inputj at time i
Kjop outputj at operating point
Ujop input j at operating po int

100

80

6<l
~
0 40
>
0
~
20

o - - ;r-""Y<--_ - - _ - - - - - . ''--V-
-20 L-_ _1000
__ _2000
_ _ _3000
_ __ 4000 6000
_ _ _ __ _ _ 7
_ _---'

Time [sI

i- - L1 pred L2pred ........ L1 meas ____ .L2meas l

Figure 5.8 Comparison of measured and predicted outputs

Figure 5.8 shows how the predicted outputs track the observations in some cases, while in
others we have an expected offset. Thi s is because of the measurement errors, inaccuracies in
the model formulation and the non-linearity. Recall that it is assumed that the process is linear
in the parameters. However, it can be seen that the fit is acceptable.

5-16
Chapter 6

Adaptive Dynamic M atrix C ontrol

6.1 Int roduction

In this chapter, the implementation of th e combined processes of Dynamic Matrix Control and
Adaptive Control discussed in Chapters 4 and 5 respect ive ly is presented. The performance of
the resulting Adaptive Dynamic Matrix Control (ADMC) controller is expected to be
significantly better than the conventional DMC. Because of the advantages of overcom ing non-
linearity problems and the avoidance of a rigorous model, its application in designing a
controller for the Training Plant in this study was considered.

A Literature rev iew of ADMC is presented in section 6.2. Form ulation of the AOMC technique
is shown in section 6.3. A regulari sation approac h to account for extensive computations
required for parameter estimation when dealing with a high dimension system is considered in
sect ion 6.4. Finally, it is presented in sect ion 6.S a case study of ADMC algorithm
imp le mentation.

6.2 Literatu re review

As described in Chapter 4, Dynamic Matrix Control is a highly successful model predictive


contro l scheme based on a step response model. However, being based on a linear mode l its
performance begins to deteriorate as the process moves away from the nominal operat ing poi nt.
T hus, several researchers modified the original DMC algorithm making it adapt ive to account
for the various problems mentioned in prev ious chapters, since ADMC is expected to perform
well even in the presence of time-varying process gain and process non-linearity. Successful
app lications of Adaptive DMC have been reported in the literature.

6-1
Chapter 6 Adaotive Dynamic Matrix ContrQI

Maiti et al [1994] developed a closed-loop on-line scheme for identificat ion of a process in
terms of pseudo impulse response coefficients for a commonly encountered non-linear problem
in the process industry, the control of pH. The model was subsequently used to update the
dynamic matrix, making the DMC algorithm adaptive, and thus overcoming that difficulty.

Distillation is one of the most widely used separation processes in the Chemical ! Petrochemical
industry and its control is economically important. However, most of the industrial1y important
distillation processes exhibit a large degree of non-linearity and the control system designed at
one operat in g point may not perform well at another operating point. Thus updating of the
process model is an important issue in distillat ion column contro l. Maiti and Saraf (199 5a &
1995b] applied DMC adaptively to control the top product composit ion of a distillation column
for both servo and regulatory problems. They also discussed the application of an adaptive
DMC scheme to start-up and control of a distillation column, following a closed-loop on-line
identificati on technique for single-input, single-output systems developed by Maiti ct al [1994] ,
to update the DMC contro ller model to accommodate process-model mismatch, and extended it
for a multivariable system.

Zhu and Huang [1995] present an approach for self-tunin g of DMC by on- line identification of
the impulse model of the process based on the unit step set point change made for the closed-
loop system. The proposed algorithm differs from that usually encountered in the ADMC
literature since it is not implemented in the DMC algorithm. However, it has the advantage of
being simp le and requires little computing, and if added to conventional DMC algorithm, the
resulting DMC algorithm is expected to find wider applicat ion in industry to control
complicated high order processes with large time delays or varying dead time.

Aitchison and Mulholand [1997] appl ied an adaptive MPC to regu late the peak temperature in a
heat exchanger. The system is highly d istributed and conditions vary with both position and
time, so control moves needed to account for the previolls sequence of moves, and MPC 's are
well suited to these applications. Adaptation of the controller with flow changes, which have a
severe effect on the system behaviour, showed some improvement in the controller performance
when compared with a non-adapted contro ller.

As mentioned in the earlier chapters, the control of the present Training Plant is difficult
because of its non-linearity, interactive nature, being multi variable and difficult to model.
A self-tuning adaptive contro l scheme described in section 5.3.3 was applied in paralle l to DMC
to generate updated controller parameters as the process moves from one operating point to
anothe r. This was done by adapting the internal model in the MPC structure (Figure 4.3), using

6-2
Chapter 6 Adaptive Dynamic Matrix Control

recursive identificati on of the step response coe ffici ents following the technique developed by
Deghaye, Guiamba and MulhoJland [2000]. The implementation of the proposed adaptive
control technique in the existing LDMC algorithm was done within a flexible SCA DA system
at the School of Chemical Engineerin g at this Un iversity, as developed by Mull~ol1and and
Prosse r [1997]. Thi s internal model control (I MC) design method is based on an assumed linear
discrete process model and relates the contro ller setti ngs to the model parameters in a
stra ightforward manner. An advantage of this approach is that the initial model is eas ily
s pecified, and deviati ons from it as the adaptation progresses have a sign ificance, wh ich any
user is able to assess. A special technique to deal with the integrat ing nature of the process
und er study is also considered and is discussed in Chapter 7.

6.3 Formulation of an Adaptive DMC Algorithm

We desire to estimate in real -time by using a recursive least squares parameter estimation
technique, the coeffi cients of the open loop step respon se, B h B 2 , B 3 , ••• , BM to be lIsed to
construct the matrices: Open loop Motrix, BOl, Offsel Malrix, Bo and Dynamic Molrix B
described in Chapter 4. The updated mat rices are then applied in the DM C algorithm to
compensate fo r non- linearity and changes in system behaviour.

Cons ider the process at a certain instant M steps be/ore Ihe presenl, where the contribution of
the M past inputs prior 10 Ihal, .t.m*PAST and M subsequent control input steps, .t.m pAST up to
present time will be considered as illu strated in Figure 6.1.

Control Horizon ,
-M p

Fig ure 6.1 Predicted response from 2M past moves up to present time

A corrected predicti on of the future traj ectory from the present time up to P horizon is given by
equation (4.5) as:

6-3
Chapter 6 Adaptive Dynamic Matrix Control

(6.1 )

In thi s formulation it is taken that P = M For predictions of the outputs about the time -M,
matri ces B o, BOL and B are defined from equat ion (4.3), with the bottom matrix-row of each of
these a s fo llows:

B'• ~ [B" BioI-! B"'_2 BM _1 B, B,]


B ol. = [BM B" B" BM BM BM] (6.2)

B' ~ [B" BM _1 BAI _ ~ BM _l B, B,] = B'0

Mov ing the datum back to -M, ignoring th e recent M moves, the predicted output at this time
shoul d be given by:

(6.3)

So, it is now possible to predict the corrected output at present time as defined by equat ion
(6.1), taking into account the most recent M input steps:

(6.4)

Using B'o = B' the predicted change of the state over the recent M steps is thus defined frolll
equation (6 .4) as:

(6.5)

The measured change is

(6.6)

where X-MMEAS is the measured outputs M steps ago.


Recall from the di sc ussion of DMC in Section 4.2 that the model error CM is gIven by the
differe nce between the measured changes at present time and the predicted output changes, that
IS:

(6.7)

6·4
Chapter 6 Adaptive Dynamic Matrix Control

Substituting above equation In the equat ion (6,5) and rearranging the measured changes are
given by:

{~~lmEAS - [ B;Jf, - B; ] ilm ;A,IT } = e,lI + B; ilJ1l pAsr (6.8)

The left hand side of equation (6.8) defi nes corrected measured changes by [a'OL - B'o]

ilm ' PAST. which is a correcting vector for the steady state and remaining tran sient at time M and
it is expected that the true model error eM will average O. Since the correction term does not
contribute strongly here. we simplify the ident ification by usi ng past values of 8,. Eh E J , .... . BM

to construct B 'o and B 'OL on the left hand side, Thus the entire left-hand-side can be treated as a
known " measurement",

Let us define the observati ons as:

(6.9)

thus. equat ion (6.8) becomes

(6.10)

where the matrix of matrices B'o for III inputs. 11 outputs and M-step horizon is given by:

(6.11)

The n b i vectors are defined as:

b , = [bAl,'I. "" b~f.lm' bM_',"'·" .bM_"I",, '· '.b"",·' ,.b,.,mf


(6. 12)

Then, the observati on vector (equation (6,10)) can be written as:

6-5
Chapter 6 Adaptive Dynamic Matrix Control

e 1.f1

e 1.f2

1 0 0 0 !J,. n ,r I'AST 0" 0' 0'


• 0 0 0 OT AlnT PA.\7 0" OT e M"

y= b, (6. 13)
OT OT !J,.11{ I'AST 0"
0 0 0 OT 0" 0' !J,.m
,. PAS]'
b,

b,,_1
b.

or

y Gp (6. 14)

where

0 0 0 !J,.m
,. I'A."'/' OT 0" 0'1'

0 0 0 0' !J,.m
,. I 'AS'/' 0" 0'
G=
0" 0" !J,.m T"AS1' 0"
0 0 0 0" 0" 0" !J,. m T I'AST

and

T
p= [ C MI
l'
, c ~f2 , ... , C M/! T , b l l' , b 2 T , ... , b,,_1 T , b" T JT

G is an augmented matrix combining an identity matrix related to vector of model errors, e,,1o
and a diagonal matrix with past input contribution, 6 m pAST in the recursive identificati on of the
B'o matrix coefficients.

To estimate the contents of the parameter vector p, the Kalman filter is set up as (see sect ion
5.5.2)

P,., = A p, + K, [y - G, p,] (6.15)

6-6
Chapter 6 Adaptive Dynamic Matrix Control

It is desired to force the offset errors CMi back to zero over a period, by adjusting the b kiJ term s,
but its must be allowed to move from zero temporarily whilst this happens. Thus A will be an
iden tity matrix except that the first n elements on the diagonal w ill be zero, to give the C/Ioli a
zero base, Le.

00000 0

0000000
A= 0 0 0 1 0 o 0 (6.16)
000 o o0
000000

When plant var iations slap, there will be no more changes in the p vector.

For safety, the plant should be allowed to drift back slowly 10 the original measured step
responses. The follow ing mode l is used

P,., = A p, + Bp. + K, [y-G, p,j (6.17)

where Po is the initially proposed p vector and matrices A and B are defined as:

0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0
A = 0 0 0 a 0 0 0 B= 0 0 0 (I-a) 0 0 0 (6 18)
0 0 0 0 a 0 0 0 0 0 0 (I -a) 0 0

0 0 0 0 0 0 a 0 0 0 0 0 0 (I -a)

with 0 ~ a ~ 1 and we generally expect a to be close to I to find "constant" step response


coefficients, but force the eMi toward zero by virtue of the first 11 diagonal elements being zero.
Shou ld the plant become quiescent, Yi and G i move to 0 and the existing p may lose relevance.
Then the B matrix slowly draws predictions towards the initial step-response Po.

6-7
Chapter 6 Adaptive Dvnamic Matrix Control

The required recursio n for the optimal Kalman gain K j is thus given by equations (5.5 to 5.7)
as:

K ,= M;G;T [ G,M;G ,T + R ] -'

P.. , = A,p, + B,p, + K , [y -G, p,l (6. 19)

M,., = A, [l - K ,G,lM,A,T + Q

As defined in Chapter 5, M j is the fil ter covariance matri x (initia lly small and diagona l), R the
expected observation error covariance (us ually d iagonal), Q the expected predicti on error
covariance (usua lly diagonal). For the present recursion, the first n elements on the diagonal
matrix Q. if small, will cause the errors eM, to red uce quickly with more rapid adjustment of the
bkij parameters.

At each sam pling inslant, the coeffic ients of the step response BI> Bh B3 , ••• , Bn are updated , and
then used to update B'OL, B'o and B' . In this way, the DMC controller continues to be
constructed from a good local representation of the process.

6.4 Regularisation approach

If the p vector conta in s many parameters, the prob lem of minim ising the error may be ill
condit ioned. Regu larisation is really a general technique to so lve ill -posed prob lems. It is of
particular importance for non- linear black-box models, where many parameters are often used
and it may not be possib le to estimate several of them accurately [Ljung, 1999].

The identification problem as described above is of a high dimension (A1 x III x n parameters).
This will usually cause difficulty if the process vari ations are not rich in information. Thus an
option for regularisat ion has also been prov ided. This is based on a weighted combination of the
original step-response ( x \VI), and the same response delayed one step in time (x w}) (Figure
6.2). This reduces the search to 2 x III x n parameters.

6·8
Chapter 6 Adaptive Dynamic Matrix Control

O,i in. m. ,"'


d ~I . .-:: .
' ,,0
f;: - ---
- -
~
U nil
Sl~p
Rupon.~
Co,
x w"
,/ --
inpuI i
'0
)V (.;
OUlPUI j
V ,-' w,

./ ~ -
-
Tim~Slep, ....

Figure 6.2 : Basic fu nct ions for regu larisation

The weight lV, allows scal ing of the original response, wh ilst the proportions of WJ and WJ g ive
some ability to shift the step response in time. The origin al shape of the measured response is
reta ined but moved in s ize and time by the proportions of w, and WJ. The adapted response thus
becomes defined by on ly two parameters, rath er than indi vidual new values for every point on
the response. The regularisati on is eas ily hand led in the above fonn ulation by noting that

P = F Pr (6.20)

where PT is the reduced parameter vector, so that we only have to replace G with GF in the
fonnulat ion. The construct ion of F is most easi ly illustrated using a 2·input 12·output process:

e MI
e MI 1 0 0 0 0 0 0 0 0 eMZ
eM> 0 1 0 0 0 0 0 0 0 Will

b~1I1 0 0 b1'11 b OSH/fT


Mn 0 0 ... 0 0 0 W Z11
bOSlf/~T (6.21)
b"'12 = 0 0 0 0 b!m Mll 0 0 0 Will
bOSH/FT
b M • 1,11 0 0 b!H.lI U · I,II 0 0 0 0 0 WIn
bOSH/FT
bM_I,I~ 0 0 0 0 b:,wl,ll A/-1.12 0 0 0 Will

w211
bm 0 0 0 0 0 0 0 0 ~~~ ~OSHIFT
win
" wl21

6·9
Chapter 6 Adaptive Dynamic Matrix Control

6.5 A pplication of ADMC on P ump-ta nk system - case study

The simulation study was carried out on the 2-input 12-output Pump-tank system described in
Chapter 4 and shown in Figure 4.4. The conventional DMC and the ADMC algorithm were
applied to control the leve ls Ll and L2 manipU lating va lves VI and V2. Notice that the
conventional DMC is referred to as LDMC.

6.S.1 Off-lin e si mulat ion

The data acquisition and control action implementation tasks were performed with the on-board
convolution model, loaded with the true measured step responses illustrated in the Figure 4.5 ,
and the DMC algorithm with "faulty" initial step responses in which, the diagonal responses
were both twice their correct magnitudes (see Table 0.1 in the Appendix D). An initial
operating point lying at 50 % for both manipulated variables and controlled variables was
considered.

The control1er design parameters M = 10, P = 10, and N = 2, were used for LDMC I ADMC
algor ithms. The move suppress ion, A and weight factors W were tuned and a value of I for both
parameters proved acceptable. The performance of the DMC algorithm was com pared for the
case where the initial step-responses were not adapted, versus the case with adaptation. The
identification rapidly converged to the true step responses through a wide range of Q and R
tuning.

............ Adapted Non adapted


, ,•
Offset CV1 MV1
, CV1 MV2!, 1 1
, , ., J-";'. , ,
0.046231 ., . ~'r ~· •
., , · '--
I
., · • •·
R., 0 .580 -0.015 R., 1.011 0 .009

•· ,·
, CV2 MV1, , , ,·
CV2 MV2
...........
• · 1'-..
·0 .32995
,
, '-r , / - ,+
,
................
, ,
I
R.. 1.001 0 .005 R., 0 .718 -0 .163

Figure 6.3 Tru e step responses ide ntified by regularised model 6 minutes and 49 seconds
from the start of the run

6-10
Chapter 6 Adaptive Dynamic Matrix Control

............ Ado .od Non.adapted

Offset
,
cV. MV1 , •,. cv . MV' I

1

0.16335 ,

1"~T·················'
"1
I
.'.1
I 'I: • . ~!
• : 1 ·,
••
,t
1 'j
.,
Ro, 0.960 ·0 .009 Ro, 1.000
,· , ,
CV2 MV, I I CV2 MV2j
...._.
I
• "-...; .....j , , , ,
·0.54513 • ·
~ ................ · f'
.... 1~
•· • ,
• I ,. '\ '\
Ro, 1.001 0 .001 Ro, 0 .983 -0 .014

Fig ure 6.4 Attempt to find true step responses using unregularised model at same time as
in Figure 6.3

In the tests considered here, the coefficient a. (rate of going back to initial parameters vector, Po.
discussed in sect ion 6.3), was set at 0.9999, the model error, cM terms at 1.0, and the expected
observation error covariance, R, diagonal terms set at 1.0. Note that a. = 0.9999 suggests an
extrcmc ly slow movement towards the assumed starting forms of the responses. In practice this
effect was faster than expected, possibly due to the structure of equation (6.17) used in the
Kalman filter. Further, an identity matrix used for R was possible because of the similar input
and output unit ranges (%). In Figure 6.3 the dark curve is the initial "fau lty" step-response. The
light dashed is the regulari sed result at a particular time. The eq uiva lent result prov ided by the
unregularised model , fo r the same tuning, at the same point in time (6'49" from sta rt), is g iven
in Figure 6.4. Because each point of the response is solved for individually, considerably more
variabil ity is encountered.

In Figure 6.5 a compari son is performed between the control performance in the non-adapted
case (conventional DMC) (a), and the recursively adapted case (b) using the regularised model
for changes in the set poi nts. Although ADMC yie ld ed improved performance over LDMC,
LDMC was not totally unsatisfactory. In the adapted case there is a small overshoot and the
process attains its new steady state quickly and smoothly. Thus, the controller performance is
tighter and quite sat isfactory with the va lves working much harder. This is to be expected
because the specified diagonal responses for the DMC were twice their correct sizes. Therefore
control moves in the non -adapted case will be ha lf what they shou ld have been, giving a
somewhat detuned contro l response in the top diagram.

6-1 1
Chapter 6 Adaptive Dynamic Matrix Control

100.0
90.0
800
Ll so El I I
I
I
Ll
,.
I
(a)
70.0
00.0

so.o
40.0
I f fi :-1'
I
f
L2
4V! .
.~
~-

II ".1.
:~
Uso
I
\.
I!/
\ "-----L_M ~. 1£;----1.:""'. '
30.0
~, ..... ,-.-
......... ,
• ::;.:.::.::.:
2:;.: I .:;····· .. ' ,
20.0
'......... -- ----- , ............
10.0 V' I V2
; \,

~3S.S1 09.36.S1 09.37.S1 09.38.S1 09.39.S1 09:40.S1 09.41 .51 09.42.51 09:43.51 09.44.51 0945.51
Time

100.0

90.0
00.0
70.0
00.0
(b)
" .0
" .0
30.0
20.0

"0

,&104.S1 10.05.51 10.06.51 10.07.51 10.08.51 10.09.51 10.10.51 ' O." .S' 10.12.51 10.13.S1 10.14.51
Time

F igure 6.5 C losed loop DMC level respon se to set point variat ion for non-adapted (a) and
adapted (b) cases (simulation model)

6.5.2 On-line application

So far, in Section 6.5.1 we have on ly considered app lication of the algorithm off-line, to a linear
convolution model based on the measured process step responses. Th e real-time control study
for the same in put change sequence and same parameters as applied in the off-line simulation.
was run with and without adaptation. with regularisation effective. on the Pump-tank system in
the laboratory usin g a sampling interval of 60 seconds. However, a set point start and end of
(50,30) was used instead. since the system shown in Figure 4.4 attests that (50,50) is not
feasible!

Figures 6.6 and 6.7 shows the output respon ses to input step changes with the non-adaptation
and adaptation cases respectively. The difference is not great, but careful inspect ion reveal s the
use of higher gain in the adapted case, as we would expect, because the DMC receives the
updated smaller true step responses from the identifier.

6-1 2
~
'" ,

,= l!
• Va lve rlo] Leve l r/oJ
"
'"
'"0- N
~
~
0
~
~
~

0
0 0
~
0
~

8
20.82 20.82

() J '-.;
0-
~

•0-
112Q.82
, 112t1.B2

2220.82 222t1.B2
0-
.g
0 3320.82

'T
3320.82
=, If
•r= 4420.82 .
':
4420.82
rl
0 I
,
'"w
i1
= ;;-
".
~

;::
()

< T•
<
~
5520.82

.. 6620.82
I "I
[;
~

5520.82

662M2
i!! ~
~ ~

•3 •" rr
~

"8
=
3 7720.82
• \) =
3 7720.82

~

•=
':
~
< '" 8820.82 • '" 8820.82
~
~ "":.'
~
".:. '-<;
15
-""•
~ 9920.82 . 9920.82

[;
I~
-0
,r
<
~

"~.
11020.8 ·

12120.8 ·
~
;

~
11 020.8

12120.8
'7

I ~·

"
~o·
0'
= 13220.8 13220.8

-•'"=
"C
14320.8 14320.8
.~
= 3
x
:n
"", ,0=
la
Chapler 6 Adaptive Dynamic Matrix Control

100 .

~
-
•> 50 :r i, j i\

~• I
0
~
~
~
~
~
~
~
~
~
~
~
~
~ ~
~
~
~
g g g " ~
~
~

:<i
--
:<i ~
N
0

i?i " "Si


N
~
~ i " "i8 "Si -- N- - -
~
~

Elapsed ti me (5)
0
:;j
N
~
~

I L1 l2 .l1sp ........ L2sp I


100

~ 75
~ ..------.
,v ~ I'- 1\ ,/ )\.'
~
• 'J .y "\ J
>• 50

25 ·
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ m
~ :lI ~ ~ ~ ~ ~ ~ ~ ~

" :<i " 0 0 0

~ ~
0 0
" "-
N N
0
N
"
N
N
~
N
N
N
N
~
~
N
; ~
~ ~

Elapsed time (5)


i:l Si
0
~
- -
N :;j
-
~
~

1--Vl ........ V2 1

Figure 6.7 Closed loop on-line ADMC level responses to set point variat ion in the Pump-
tank Plant

Si nce differences behveen the response curves cannot be easily distingu ished in these fi gures,
Quadratic Performance Ind ices (QPI) of the controlled variables, levels LI and L2, were
ca lculated from the logged data. These consist of the sum of the squares of the errors
(difference behveen set point and process variable), and results are given in Table 6.1. As
expected, the ADMC controller has a better performance for both levels when compared with
the LDMC controller, since it presents small er QPI values i.e. 9.24 and 6.07 for leve ls LI and
L2 respectively. Clearly this is only an approximate comparison, because the behaviour of each
contro ller is determined by the definitio n of its objective fu nction, which includes the control
move penalisation. Thus if either of the adapted liS unadapted cases demanded a greater degree
of movement, it wou ld apportion terms differently with regard to the objecti ve function.

6- 14
Chapter 6 Adaptive Dynamic Matrix Control

Table 6.1 On- lin e LDMC and ADM C quad ratic performance indices

Co nventional DM C Adapted DMC


QPl- Ll 10.92 9.24
QPI- L2 6.28 6.07

Note that the identified responses in Figures 6.8 and 6.9 move towards the true measured
diagonal responses (non-adapted responses are 2x the init ial responses) set in the DMC. Some
sp urious effect introd uced by the plant causes a significant change to be registered in an off-
diagonal term. This can be protected in practice by increasing the response time of tile identified
responses by lowering the prediction error, Q in the Ka lman filter and r.y constraining the
allowed range of variati on.

............ Adapted Non. adapted


,· 0

Offset CV1 Mr' CV1 M~2
0
,
·0.11773
0

., . ~" "I' ·············'"


·1····· ·······r • o. • · :\:
......
." '" '"
• o.
., ·
•• •

R., 0.798 0.170 R., 0.983 -0.016

•· ,·

.
0
CV2

• . ~ ....'"
M~1

~
• .. .1
'"
,-
CV2 M/12

V im
I

i ." • i
2.06097 0
0 · ..............
• ., ·
R., 1.064 0.059 R., 0.647 -0.291

Fig ure 6.8 Identified step responses using regu larised mode l in the Pump-tank Plant, 1
hour from the start of the run

6- 15
Chapter 6 Adaptive Dynamic Matrix Control

I Offset , ............
-
CV1 M~'
Adapted

I I I 0
. -
CVl
N on-a d 'PO

M~J2
'd
I I

·0,09746
0
~ "'-....
, _ ~mmLJ
lOO .00 eoo <00
0 .
0

-~
>i" ' 00 <00
I
.00
I

, I I I
0

o.
o -
5 •
'I i i
R., 0.943 0.100
R" 1.004 ·0.001

• I I I ' - CV2t2
CV2 MY1
!
· ,
0 _""" ..
r\,>i"
lA........ ='" I
.00 .00
' 00
-- ''' f:::::--l
1.75597
o -

•-
I " +m
0

,-
,t '00 ,do
i
.00

I
R" 1.182 0.164
R" 0 .803 0065

F igure 6.9 Ident ified step respo nses lI sing regu lari sed model in the Pump-tank Plant, 2
ho urs 37 minutes and 30 seconds from the start of the run

6-\6
Chapter 7

Integrating Adaptive Dynamic Matrix Control

7.1 Introduction

The Adaptive DMC controller discussed in the above chapter proved adeqtla~e for muhivariable
and non-linear systems. However, when the LOMC algorithm is lIsed for control of processes
containing integrating process units, steady-state offsets occur for sustained changes. This offset
it is not acceptable for most applications.

To overcome the problem of the integrating nature of tile present Training Plant, an integrating
ADMC approach was deve loped and is disclIssed in thi s chapter. A literature review covering
integrating processes is presented in the section 7.2. Section 7.3 shows the formulation of
integrating DMC wh ile, Integrating AOMC is discussed in the sect ion 7.4. Finally, application
results of Integrating ADMC on the 2-input 1 2-output sub-system defined on the Training Plant
which include off-li ne and on-line simulation, are presented in section 7.S.

7.2 Integ rating processes overview

Integrating processes are those that produce a ramp change in the output for a step change in the
input (Figure 7.1). This resuhs from the process unit's material or energy imbalance [Gupta,
1998), and they are commonly present in chemical industry. '"Non-se lf regulatory" level
processes are typical examples of integrating process units.

7·1
Chapter 7 Integrating Adaptive Dynamic Matrix: Control

-.," . ~
.. ...
E

"0
~ 2
J
4<1

0 , 2 J ... ... ... 1

Time

Figure 7.1 Typical integrating output response to a unit step input

Integrating processes produce a steady-state offset when controlled by a standard DMC


algorithm, which assumes responses reach steady-state on the final point. For application s
where the performance objective of the process control is to ensure that the controlled variables
remain very close to their set points, these steady-state offsets are not acceptable. The control of
the outp uts of integrating process units needs to be considered along with the control of other
process outputs and in the case of constrained variables, all of the constraints need to be
considered simultaneously. This allows the determination of the true optimum of the
optimis8t ion problem that needs to be solved at every control instant.

Integrating process studies have appeared in the literature. Lee, Morari and Garcia [1994]
describe a MPC technique based on step response parameters for systems of stable and / or
integrating dynam ics, developed using state-space estimation techni ques. The standard step
response model is extended, in tbis technique, so that integrat ing systems can be treated within
the same framewo rk. A ramp disturbance is eliminated by introducing a double integrator in the
controller.They showed that the optimal observer can be calcu lated by solv ing a Riccati
equation of significantly lower dimension.

Gupta [1998] presents an alternative approach to eliminate the steady-state offsets that are
encountered when dealing with integrating process units. The proposed approach does not
require the formulation of the MPC problem in the state-space fonn and because of thi s
advantage, it can be implemented directly in the step response fannu lation of the DMC
algorithm. This scheme takes advantage of the fact that the predicted response due to past inpu ls
is a straight line passing through the output at the current control instant. Thus, the slope of the
predicted response is determined from the slope of the output trajectory between the current and
the previolls contro l instants. Note that this slope includes the effect of unmeasured
disturbances and any model mismatch that may be present. This approa~h allows the
considerat ion of all inputs, outputs and constraints in the one optim isation problem.

7·2
Chapter 7 Integrating Adaptive Dynamic Matrix Control

As me ntioned above. the Train ing Plant under study has integrat ing behav iour. Pred icted
responses of level due to past input steps resulted in ramp changes. Thus, to control this system,
we follow the deve lopment made by Gupta [1998], fo r control of an integrat ing process using
DMC by implementing the changes directly in the step response in the DMC algorithm, and this
is descri bed below.

7.3 Integratin g LDMC formulation

As d iscllssed in the Chapter 4, the step responses of an m-input I ll-output system can be
represented by a series of matrices BJ, Bl • B), ..... , Bp (sca led for a un it input step). The pos ition
(iJ) in each matrix B, is a point on the trajectory at time t for the i th output as it respond s to the
j tll input. It is possible to indicate an integrating re lat ionship by unequal corresponding
elements in the final two mat rices, B I , and B r .l , and cons ider that th is finat grad ient continues
indefinitely from th is point onwards as a result of the integration. Define

(7. 1)

Now let ilm, be the vector of input moves (changes) made at time t, with X, the vector of outputs
at time t. \Ve a lso make use of a mov ing frame of reference for time in which (=0 represents the
present time. Thus, fo r integrating processes equation (4.3) can be written as equation (7.2).

Recall that the vector of vectors X OPRED contains P identical predictions of the output vector at
the present time /=0. The vector XpRED contains pred ictions of the output vector at P points on
the future trajectory, as contributed to by the past M control moves, and the future P control
moves.

7-3
[I~/l
XOPfl.ED fi)/ 8)f.! 8 )/ . )
8.\1.) B) B/ ~m_M+1
XOPRED Bl/ H)f.! 8 )f.) B)/.) B) B/ ~m-M+2
XOPRED B.1/ B)/. / 8.11-1 B)/ .) B) B/ ~m-M+3
XOPRED BM B)/. / B)f.' B)/.) B) B, ~m-M+4

--.l
I XOPRED H)/ B.11 ·/ BI/.) BI/./ H) B/ ~mo
~
(XOIMD
X :
1 XI M B1/ +M 8)/ B)/., B.\1.) B) B )
B, ~ml
pRED
X2 1M B.I/+1M BI/ +M B.1/ B.1/ . / B/ B) B, B/ ~m2
3M

XM B.11 B.If.! Bu·) B.I/.) 8, ~M

XM+I B), +M B), Bu., B.I/.) B, B, ~mM+1


(P-I)M :

Xp PM : B.1/ +PM B +2M


.11
Bu +M Bu B.11 B.11 BII B.11 · ' B, ~mp

(7.2)
Chapter 7 Integrating Adaptive Dvnamic Matrix Control

P copies of this offset error are made by comparison of XOPRHD with a vector X O.IfEAS containing P
copies of the present output measurement, and are used to correct our future predictions as
defined by equation (4.4) as follows:

(7.3)

-AI
where Am"A.~T IS considered to include the summat ion term L .6.m, which accumulates all
, . -00

moves older than M steps back from the present time. The matrices BD,BOL and B are clearly
top-left, bottom-left and bottom-right in the above structure. Usua lly we choose M to be large
enough to ensure that all step responses are at steady state at this point, but of course this is not
poss ible for an integrating system , which gives a non-zero M . For such a system we choose M
where all slopes have become constant. The terms in the first column will be non-zero for an
integrating system, and act on a non-zero absolute di splacement of the control action (sum of all
moves), to add a steady ramp to all integrating outputs of the system (see equation (7.2».

It is assumed that our predi ctions of XDPRF.D and XPRI::D will on ly be in error by steady-state
offsets emanating from earlier than M steps before the prese nt time (see Figure 6.1). This is not
really the case for integrating systems, where integration of an unobserved control action may
have begun somewhat earlier, and may not be included in the compensatory term

Moreover, any accumulated compensation will not be exact. These factors mean that an
unaccounted ramp may already be in effect on the outputs. This has the potential to cau se
steady-state offset in the control. Thus the following teChnique has been deve loped to dea l with
this situation. It is based 011 a long-term identification of a cons istent gradient error between
predictions and observations. This gradient is then superimposed on the open-loop predictions.
Note that the prediction of changes in the output over the last M steps is defined in the Chapter
6 by equation (6.5) as:

(7.4)

The equiva lent measurement is

(7 .5)

7-5
Chapter 7 Integrating Adaptive Dvnamic Matrix Control

A simple filter then seeks a consistent error eM

(c,, ), = P(!,.." .." - /I<PRED ), +(1- P) (c" t, (7.6)

and P=O.05 has proved adequate in this case. Construct a "gradient" correction vector for the
future P predicti ons lip to the horizon as foll ows

-I, (e,,),
-b(CA/ )o
+,(eu)o (7.7)
=

lit (e",)o
ft( eu)o

Then th e corrected predi cti on of the future output up to the horizon P becomes

(7.8)

In DM C, the opt ima l set of future moves.1. m is so lved on each step.

7.4 Integrating Adaptive DMC formulation

A scheme for adapting the internal convo lution model of a LDMC, by closed-loop recursive
identification of the step response coefficients in real-time by following the methodology
presented in the Chapter 6 is developed in this section for the integrating case.

Recall that in LDMC the optimal control move at any step is computed as dependent on the
matrices BOL . B o and B . Moreover, these are constructed from the basic step-response matrices
BIo B l • BJo ..... BM, wh ich are thus the target of our real-time identification.

For an integrating process, the defined bottom matrix-row of each of the matrices BOL . B() and
B which are analogous to equation (6.2) are obtained from the structure in equation (7.2) are:

B 0' =[ 0 BM B
M
_
1
B _
M 2 B M_} B, B, ]
B ~,. = [ MM BM + M6.B B M +(M-I)68 BM + (M - 2)6B BM + (M - 3)6B BM + 6.B B,, ]
B' =[ 0 BM B _
M 1
8 _
M 2 B M_) B, B, ] = B 0'
(7.9)

7-6
Chapter 7 Integrating Adaptive Dynamic Matri x Control

Mov ing the datum back to -M, the corrected predicti on o f the present state following equation
(6.4) is thu s given by

(7.10)

where [B'ol.. - B·o J.6.m"PAST is a correction for the steady-state offset and the remaining trans ient
at - M

Notice that both .1"' ·I'AS7' and .6.m I'AST have the extra summat ion term shown in equat ion 7.2. In
the case of llm " '.04.'>1' thi s term will clearly only sum moves until time - 2M Usi ng B~ = B ' , th e

predicted change of the state over the recent M steps is thus

(7.11)

Th e measured change is ll..'(OMEAS = XOM£AS - X . MM£AS where X _M AIIiAS is the measured

output M steps ago. The model error is eM = WOM£AS - WOf'RED so

ll,'CO.l/f:AS = eM + [B~L - B~ ] .6.m· PA.\T + B~ .6.m fA.'iT (7.12)

Any steady gradient error is not included in thi s " model error" for parameter estimation
purposes, so we strip off the filtered version of e ,l!

(7.13)

A non-zero (e,., )oterm when the system is otherwise near steady-state (average conditi on) is

the clearest indication ofa steady gradient error due to unaccounted integration - ie. an error in
-M
the accumu lation term L 6.m; .
•=-""

The matrix of matri ces B'o for m inputs,lI outputs and an M-step horizon is given by (s imilar to
equations (6.11) and (6.12):

7-7
Chapter 7 Integrating Adaptive Dvnam ic Matrix Control

we defi ne

Then,
e~1I

e~n

0 0 0 8 mT
pAST OT OT
T eM~
0 0 0 OT 8 m rAST OT (7.14)
CM + B ~ 8 11\ rA.IT = b,
T b,
0 0 0 OT OT 8 mp ~ST

h •••
b.
= C. (8m ,AST) p

where

eA/I

e"f)

e Mn (7.15)
p = b,
b,

h •. ,
b.

Similarly other term s in (7.12) are rearranged to obtain

(7.16)

and

7-8
Chapter 7 Integrating Adaptive Dynamic Matrix Control

(7.17)

Then (7.13) can be written as

(7.18)

where G is the observat ion matrix. Equation (7.18) shows that for integrat ing processes, G is a
funct ion of all past moves from -2M up to present time, 8 ntPAST as well as 6 m'PAST which takes
into account all accumulated moves o lder th an -2M. For non-integrating processes G is o nl y a
function of the past moves from -M up to present time, 8 m pAST (see equat ion 6.13). Thus

G ( 6 m rAsT ' 6 m~AST ) = G I (6nt rAsT )- Gl (6m~AST ) + G) ( 6 m;'AST) (7.19)

For implementati on of the Kalman filter interpretation, consider the A and B matrices defined
by eq uati on (6.18) and the parameter vector P is thus given by

(7.20)

sllch that, as defined in that chapter. 0 ~ ex :s; 1. and ex is set cl ose to I to find "constan!"
step-response coefficients, but force the eM; toward zero by vi rtue of the fi rst n diagonal

el ements being zero. Should the plant become quiescent, (6.x OAlf;As - (eM)0)1 and G; move

to 0 and the existing p may lose relevance. Then the B matri x slowly draws predi ctions towards
th e initial step-responses Po.

Not ice that for integrating processes the vector of known measurements is defined by:

(7.21 )

The required recursion, including so lution for the optimal Kalman ga in K I, is given by equation
(6. 19) and the regu larisation approach described in section 6.4 is also app lied to reduce the
problem dimension.

7-9
Chapter 7 Integrating Adaptive Dvnamic Matrix Control

Finally, since the identified B'o matrix contains all of the fundamental step-response matrices,
the various matrices used in the DMC can be updated in real-time - i.e., it is an adaptive
control. Extracts of the Integrat ing ADMC algorithm from the SCADA system are presented in
Appendix E.

7.5 I ntcgl'l.lting ADMC application to a 2-input 1 2-output sub-system of the Training


Plant - case study

Appl icati on of the proposed Integrating LDMC I ADMC was carried out on the Training Plant
described in Chapter 2 and schematically presented in Figure 2.2. However as mentioned in
section 2.5, only a 2-input 12-output sub-system of the Trai ning Plant shown in Figure 2.4 was
si mulated.

Taking in to account that Dynamic Matrix Control is based on the step response, the Training
Plant was operated to get the open- loop step responses fo r the proposed 2-input I 2-output
system in order to apply them in DMC algorithm. The time taken for the system to reach
constant slopes in all step responses after disturbances was approximately 50 seconds. It was
decided to lI se a time interval , .11, of 10 seconds and thus have a steady-state horizon of 5 steps.
The step responses that were used for the experiments are illustrated in Figure 7.2, which shows
the integrating nature of thi s system since the responses become steady ramps.

7·10
Chapter 7 Integrating Adaptive Dvnamic Malrix Control

~ 0.800
ag 0.01.
.5
0.600 .~ 0.012 1/
V
(I)

-2' -2'
: -5 0.400 ./ ~ -50.008
~ ~
V ~ ~

• /'
~ 0.200
••: .-,"
u; 0.004
/ 1 .2 0.000 / 1
g
0.000
0 1 2 3 4 5 0 1 , 3 4 5
Steps Steps

"a
.5
0.000
"", I '"a
0

.5
0.000

~ I
-0.200 -0.100
• •
-'# "• i"-- ~
~
-2'
'# • -0.200
- ~ -0.400 -~
u
~ ~ "-. ~

"" "'"
~
!! r-... !!

'2,
-0.600 .
.-

",
-0.300

.e -0.800
0 1 2 3 4 5

'-
-0.400
0 1 2 3 4 5
Steps Steps

figure 7 .2 Unit step responses for the 2-i nput / 2-output sub-system of the Training Plant
(M ~5)

Each control ler test was run for the same defined sequence of set point changes. In off-line tests
DMC was run with the true model in some cases and with "faulty" initial step responses in
others. The " fau lty" responses were set with diagonal response (1,1) at 2 times the correct
responses, and (2,2) at Y2 the correct response (see Table 0.2 in the Appendix D). All tests on
the plant were with an initial mismatched model in the DMC.

For the tests the following controller parameters were used: smooth ing coefficient in gradient
Feedback, p= 0.05 (see eq uation (7.6»), optimisation horizon, P = 5 and control moves, N = 2.
The observat ion error covariance, R and predicted error covariance Q were equal to one, while
for the B; diagonal in equation (6.18), a was set to 0.9999. Tuned move suppression and weight
factors that gave satisfactory controller performance, were .1= I and TV = 100 for both off-line
and on-line simu lation s. Notice that all runs either off- line or on-line were with regularised
identified responses (see section 6.4).

7-11
Chapter 7 Integrating Adaptive Dvnamic Matrix Control

7.5.1 Off-line s imulation

In preparation for the on-line controller software commissioning and to experiment with tuning
parameters, an off-li ne test was designed for use with the on-board model of the Scad95
program that implemented the controller software. The program was written for Windows 95
lI sing M icrosoft ' s Visual C++ and is designed to work with on-line systems, but it also accepts
inputs and outputs from the off- line models th at are coded into the program. The!';e are
convo lution models based on the step responses, with a fine-step integrati on (e .g. 1110 DMC
step) [Mulho land et ai, 2001].

With the same parameters in both algorithm s, LDMC and ADMC controlle r performances were
compared taking into account the effect of several factors as follows, with initial and end
operating points lying at (50,50).

Integ rating co mpensation


As described in the above sect ions, the integrating compensation was included in the DM C
so ftware since convent ional DMC it is not designed for dealing with integrating processes and
as wc know the present Training Plant presents such behaviour, beyond being non-l inear. Recall
th at the integrat ing compensation inc ludes factors like: gradient f eedback, accumulated moves
from past inpu ts earl ier then M steps before present time, and extended slopes (see section 7.3).
So, with the parameter values above, the integrating effect on the LDMC as we ll as Adaptive
DMC were tested considerin g two distinct cases:

a) Simulation without integrating compensation and


b) Simu lation w ith integrating compensation
We d iscuss each case as fol1ows:

C ase a: Si mulation without integrating compensation


Fi gure 7.3 shows the control of the true integrating mode l usi ng LDMC and ADMC controll ers
without integrating compensation. As expected, LDMC controller performance was bad, and
led to excessive valve work and osci llat ions in the output responses due to the unaccounted
integrati ng nature of the process (Figure 7.3 (a» . However, relatively better behaviour was
shown by Adapted DMC, although the controller req ui red lengthy periods to reduce osc illations
apparently arising from the integrating nature of the process. This was reflected in the output
responses as illll strated in Figure 7.3 (b).

7-12
Chapter 7 Integrating Adaptjve Dynamic Matrix Control

60.0 LI
(a)

100.0
00.' Lisp CVOI
'"
70.0 L1

'"
(b) ""
".,
"'.,
~,

10.0
, L2sp L2
" "

Figure 7.3 Closed loop LDMC (a) and ADMC (b) using true process model without
integrating compensation, N = 2, A = J, W = 100

C ase b: Simulation with integrating compensation


T he need for spec ial DMC design whe n dealin g with integrating processes is shown in this case,
by running both algorithms with integrating compensation. Thus, runs with the true model in
the DMC and ADMC under the influence of integrating compensation showed improved
controller perfonnances. Figure 7.4 shows the responses obtained by standard DMC. Clearly
the integration in the process has been effective ly dealt with.

7- 13
Chapter 7 Integrating Adaptive Dynamic Matrix: Control

100.0

'"re., -' Ll -':"


:' ~

70.0
ij,
.-JI\ """, Li sp ,"
,, ,.
CVO l
':
'"50' I~
, , "; ,1 -,,
, !;
\
.,
"
, ;,;.- - .". t: ",,
:!
iI !,
40.0
I-!
,, '
' !
:: .,
I ~ ~l
'''' ~I_~

:,~L o .~.~L2~~ 1
I' 1
"'L
'" "':
~

CV03
",
10.0

"1
oh 3:23""Oif."~; 011:46:29 0I!I.49:4 23
'""
FiguTe 7.4 C losed loop LDMC using true process model with integrating compensation, N
~ 2,A ~ I,W ~ IOO

The robustness of the DMC controller was further tested by incorporating an error factor in two
of the four partitioned matrices of the system dynamic matrix, that is, diagonal terms were set
with, the first one tw ice and the second half their correct va lues. The LDMC contro ller
performance deteriorated as can be seen in Figure 7. 5 (a), whil e the ADMC controller showed
good behaviour (Figure 7.5 (b)). This can be explained as fo llows: with small or zero process
model mismatches unadapted LDMC perfonns well as shown by Figure 7.4. When big process
mode l errors occur, the unadapted linear controller becomes inadequate (Figure 7.5 (a) and
updated parameters are necessary with changes in the operating point (compare 7.5 (b)).

7- 14
Chapter 7 Integrating Adaptive Dynamic Matri x Control

oJlsa:14 05.01 .32 O5.CoI.SO 05.08.08 05. '1 .26 05:14." 05 UI.0:2 05.21 .20 05:24·38 05.2158 05:31 ·'4

100.0
00.' I1
.
LI -i:"
lOo I
0"
._ I
~ Li sp
I ·
""
I
CVOI
""
. ...
0

70.0 : 4" "


"
•,
• ",
;¥4
w., ,;;:_·tF,
. .
U I ";
•,. n~
· ,
0
~f~
,,
;..t~
(b) " ., •
I
,
"., i4~Ni
" n
.":; I ,
ii , ll"°
"
~.,
, · 0
.....
I, I I:"
>
"'., 1
".,- ;
L2 lf ," CV03
10.0
==:f:: "- ,
" O<Il13O
oJ?24 .54 CoI.21U2
L2sp

0<1.34.• 8
E

a..38.06 CoI .• ' .2.


",
"
CoI ....42 a..4II.00
""
a..51 .18 " CoI.54.38
I I
0<1.57.5<1
Ti_

Figu re 7.5 Closed loop LDMC (a) and ADMC (b) w ith integrating compensation and
process-model mismatch . N = 2, If = I, W = 100

The identified responses in the ADMC run moved towards the true diagonal responses set in the
model as ill ustrated in Figure 7.6 (dotted li nes on the diagonal are closed to the true response
curves).
............ Adapted -- Non-adapted
2
Offset CV1 MVr _ CV 1 MV2 ...... .~
,.
, ... ...... ............ .... I.........
~ ~I
0.57761
, .,
0
0
'1
R,g v.", ~."v 1 .053 0 .050
, R'g-
CV2 MV~ CV2 MV2
.
-0.10033 ~ ..
'

.' ,
............. -.
"'" • - .......

Reo v. ~' ~.~
Reo 1.m v.",

F igure 7.6 Identified step responses using s imulati on model, 7 minutes and 10 second s
from the start of the run

7· 15
Chapter 7 Integrating Adaptive Dynam ic Matrix Control

Gradient feedback and accumulated moves compensation


The influence of different factors used in the integrat ing compensation was a lso considered for
both algorithms. It was found that runs with gradient feedback applied to extended slopes
w itho ut accumulated moves resulted in the process in stability, w ith severe osc illation s resulting
from the approach to bang-bang control in the movement of the valves. Recall that the
accumulated moves represent the contributio n of all move s o lder than M steps back from the
present time as shown in equation (7.2). So, the unstable behaviour may be caused by an
unobserved control action that may have begun somewhat earlier and may not be included in
the aCClImulated moves term (see section 7.3).

However, runs with accumulated moves also app lied to extended slopes without gradient
feedback, showed di stinct results with robust controller beh avio ur, s ince the lack of gradielll
feedback was not refl ected in the contro ll er performance. Thi s was not ex pected s ince LDMC
usually produces an o ffset erro r when applied to integrating processes (see o n-line results in
Fi gure 7.11). The addit ional compen sat ion achieved by gradiem feedback (equatio n (7.7», d id
110t seem s ign ificant in these tests, possibly because thi s system was steady at the start.

Move SuppreSSion
The m ove suppression parameter, A , suppresses manipulated variable movements (see section
4 .3). Its effect was tested holding constant set point deviati o n we ight variables, Wand changing
A values. Reducing move suppressio n to va lues as sma ll as 0.01 made little difference on
controller performance, whil e increasing it to 100 led to a s low response and decreased
perfo rmance.

Output Variable Weightings


As menti oned in section 4.3, these set point deviation-weighting parameters are used to set the
relative ranges of variation of the o utputs about set points. They have a direct effect o n the
dynamics of the closed loop system and thus can affect stability.

Whe n holding the move suppression constant, decreas ing the va lues of the weighting factor to I
showed a slight effect on the output respo nses. On other s ide, it was found that increases in the
weight factors are not reflected in the controller performance. These reslllts as well as those
found above in the move suppression tests, show that this controller is quite robust.

7-16
Chapter 7 Integrating Adaptive Dynamic Matrix ContrQI

Constrain ts handlin g
Notice that the hand lin g of constraints is the conventional LDMC feature and the proposed
integrating modification only affects the prediction part of the algorithm. The optimisation part
rema ins the same .

As would be expected. the presence of any active co nstraint reduces the available degrees of
freedom and thus the controller perfonnance. Figure 7.7 illustrates the handling of input
constraints when va lve CVO I is constrained between 45 - 55 % and CV03 between 30 - 70 %,
values above and below the minimum and maximum levels reached by the unconstrained
scenario (F igu re 7.5 (b)). The effect of the constraints can be seen in the much slower set po in t
tracking where the constraints are active, reducing the controller performance. When severe
constraints are added, the control deteriorated and steady-state offsets were introduced.

1((1.0

".0 - - LIsp I
"".0 -- LI
CVO l
~7
70.0 , , ~ ,"
[1'.. ,
"'.0 , .,\- ;t-+~
r~'"' h H;;, I
,
.
i~J:'
...
~. O
I '0#-' l \~ : ......, tJ- , ..... ,
fY!,
"'.0 ...;
, • ~

~. o
i \' ~

ro.o
1f
10.0

26158.32 2101 so
L2sp
I
21 05.08 21 .08.26 21 .11.4-01
L2
21.15.02
T1_
2118.20 2121.38 ..
,
2 .2 .56
CVOJ
,
2 .28.
I
.. 2 I .3
' 1'3
. 2

Figure 7.7 C losed loop Integrating ADMC with input constraints: CVO I: 45 - 55 % and
CV03: 30-70 %. N ~ 2,,1 ~ I, W ~ 100

7.5.2 Real-time application

As mentioned above, real-time tests were perfonned on the Training Plant illustrated in the
Figure 2.2. However only a 2-input 1 2-output sub-system was s imulated (Figure 2.4).

Difficulties were experienced in obtaining accurate step responses due to integration, non-
linearity. and the high level of interaction and noise in the system. These factors led to process-
model mi smatch a nd consequently a difficult contro l problem. Several tuning parameters
resulted in outputs oscillat ing arou nd set po ints even after a long time peri od.

7·17
Chapler 7 Inlegrating Adaptive Dynamic Matrix Control

On-l ine simulation was carried out with the same parameters used in the off- line simu lations for
p (0 .05), predicted error, Q ( 1), observed error, R (I), move suppress ion, A (I), set point
deviation weight factor, W ( 100) and also with a set to 0.9999. A sampling interva l of 10
seconds and set point start and end of (40,40) were considered.

The same set point sequence change was app lied, although on-line runs needed a Jong time fo r
the contro ller to achieve the target. The appl ied results obtained fo r step changes in set points in
LDMC and ADMC runs with integrating compensation are shown in Figures 7.8 and 7.9
respectively.

80

60
~ ,.
•> 40 ·
". • . ,1
J•
20

0
;; ,,;
;'\

Elapsed ti me [5]

1--l1 ........ l.2 ___ ._.l1 sp - - - - -l.2sp l

120

80
.,
7

~
• 40
>•
0

.. 0
Elapsed ti me Is]

1--CV01 ........ CV03 1

Figure 7.8 Closed loop on-line Integrating LDMC, N = 2, A = 1, W = 100

Bad performance, consisting of constant osci llation on the outputs with a bang-bang behav iour
of the manipulated variables was showed by the LDMC controller (F igure 7.8). In contrast the
ADMC contro ller showed better than the LDMC algorithm, and good tracking of set po ints was
observed in the levels, although with sli ght osci llation in the second output (F igure 7.9).

7-18
Chapter 7 Integrating Adaptive Dynamic Matrix Control

120

Z 80

I
~V
,
o
~
o

Elapsed time [s]

I--u ........ l2 _._._.L1sp _____ 12Sp !


120

80

Z
..•
>
> 40

40
Elapsed time [5]

1- - CV01 ..... ... CVOJ !


Figure 7.9 Closed loop on-l ine Integrating ADMC, N = 2, A = I, W = 100

The adaptation plots presented in Figure 7.10 shows the effort of the Adaptive Dynam ic Matrix
Controller to identify correctly the coefficients of the step responses, although with noise and
other disturban ces affectin g the process as can be seem in the off diagonal elements.

7-19
Chapter 7 Integrating Adaptive Dynamic Matrix Control

.. -Adapted -Non-adapted
, "'".", ,

Offset

0.23762
,
,
CV1

.,
M1-
-
• .. I "" ... "" ..... "
~ ........ ,

,
CV1 MV2
~ . ....... " .. .
L--
"

, '1 "l
U.16' 0 . 18U 0 .73. -0.285
R••
, R••
CV2 MVn CV2 MV2
.. .. ...........,., ......... .. ........, "
"
60 ............................-
--0 .15648

- •

U. J4' U.UU, R•• o:ll4O 1.068
R"

Figure 7. 10 Identified responses in the Training Plant 43 minutes from the start of the run

Gradient feedback effect


The algorithms were also tested with all parameters set at the same values as above except for
gradient feedback. which was not app lied. Simulations resulted in deteriorated controller
performance with steady-state offset in the LDMC run as illustrated in Figure 7.11 (compare
with integrating LDMC in Figure 7.8). That was because, as mentioned in section 7.3 , an
unaccounted ramp may already be in effect on the outputs in the moves older than M steps back
from the present time, which has the potential to cause steady-state offset in the contro l.
Chapter 7 Integrating Adaptive Dynamic Matrix Control

80

.
"-
•> 40
60

-,..., ,,_.m'_.,
~ •• "",NHlW,
J"""'HH',.....,'.""'"'..~.."·'"
20 W~

o
M
d

Elapsed time [s]

I- -u ........ l2 _. ____ L1sp _____ L2sp l


120

80

!!:
..••
>
40

-40
Elapsed time (s]

I--cvo, ........ CV03 1


Figure 7.11 Closed loop on-line non-integrating LDMC, N = 2, A = I, W = I 00, ~= 0

Although with relative improvement compared to Figure 7. 11 algorithm with adapted


parameters also showed decreased performance, with oscillations and offset in some cases,
when gradient feedback was not applied as illustrated in Figure 7. 12 (compare with the
integrating ADMC in Figure 7.9). As also seen in the off-line simulation (section 7.5 .1 ), with
adaptation of the model parameters the output error is reduced. However due to the integrating
nature of the process, the error is not completely eliminated and a slight offset is observed when
integrating compensation is not applied.

7-21
Chap!er 7 Integra!ing Adaptive Dynamic Matrix Control

120

80 ·
[
•> •

~
40 ·
~
•I
0
M M
0 ,;
;\

Elapsod time [s]

1- - l 1 ........ 12 -·-·-·l1sp --- - . 12Sp l

12 0 , - - - - - - - - - - - - - - - - - - - - - - - ,

804-~--~--+_--------+_---~

Elapsed time [s)

1--CV01 ...... . CVO' I

Figure 7.12 Closed loop on-line non-integrating ADMC, N = 2, A = I, W = 100,13 = 0

Thus the gradient feedback has proven effective in compensat ing for unknown ramp responses,
perhaps from contro l moves not included in the summation tenns (eq uation (7.2)). This is
contrary to the s imulation on-board model in sect ion 7.S.I , where there presumably was little
initial gradient error.

7-22
Chapter 8

Conclusions and Recommendations

One of the purposes of thi s study was to recommlSSlon the Training Plant, including the
addition of digital control to the already ex ist ing analogue instrumentat ion . Other aspects
rel ated to software deve lopment, interfacing of the system to a computer SCADA system and
application of novel algorithms to the equipment.

A maj or objective was to investigate different aspects of co ntrol of th e multivariable, non-linear


and high ly interactive Training Plant. A 2-input I 2-olltput sub-system of the Training Plant
was, defined as a case study.

Two di fferent approaches were adopted for system investigation: a mathematical model derived
from first principles, and a step response model based on experimental data.

The mathematical mode l revea led complex behaviour of the system described by the m ixed
non· linear diffe re ntial and algebraic equations represented by a (47 x 47) Jacob ian matrix . The
system was so lved through the application of an extended Kalman filter (EKF) technique. The
algorithm written in Matlab was used for state estimat ion, and based on the esti mated data, step
responses for the 2·input 1 2.output sub-system of the T raining Plant were pred icted. Promi s ing
results were obta ined. Although the state-space step responses showed sim ila r integrating
behaviour to the step responses result ing from the experimental data, furth er investigation is
required in order to find improved plant phys ical coefficients that give better description of the
process since little information about the process is available. A trial and error method is
suggested.

It was dec ided to use Dynamic Matrix Control (DMC), one of the most popular techniques of
Model Predictive Control (MPC), to control the Train ing Pl ant. DM C is based on the linear
cOl/volution model, and therefore does not require a rigorous mode l derived from first princ ipl es
as above. A fi xed dynamic model is lIsed to predict and optimise process performance for a

8·\
Chapter 8 Conclusions and Recommendations

nominal operating point. However, as the process moves away from this point, control becomes
sub-optimal due to process non-linearity. To deal with this problem, the use of a self-tuning
adaptive DMC was proposed, since Adaptive Dynamic Matrix Control (ADMC) can be
expected to perform well even in the presence of uncertainties, non-linearities and time-varying
process parameters.

The conventional self-tuning regulator can be subdivided into two di stinct steps: identificat ion
and control. The first is mainly concerned with updat ing an approximate process model so as to
guarantee mOre reliable predi ctions of the system behaviour. It involves some form of on- line
recursive parameter estimation, which also provides estimates of the system states. In the
second step, i.e. , in the contro l stage, it is usually necessary to recalculate the coefficients of the
controller so that appropriate control action can be derived. However, th e dctennination of new
values for such parameters invo lves the solution of a set of recursive matrix equations. For a
muitivariable, system thi s becomes a very time-consuming procedure, and the problem of
minimising the error may be ill conditioned if the process variations are not rich in information
Therefore, some improvement is high ly des irable, particularly when real-time contro l is to be
applied.

One of the most attract ive features of the ADMC control scheme developed in thi s work is that
it does not require the solution of such complex matrix equations. Instead, by providing an
option for a regularisation approach for a closed-l oop configu rati on, it was poss ible to reduce
th e prob lem dimensions, thereby substant ial1y red ucing the com putati onal burden characteristi c
of the optima l self-tuning regulator when applied to multivariab le systems.

The algorithm was tested on the 2- input I 2-ouput Pump·tank system for simulation and
laboratory tests. The real-time identification of step responses and adaptation of the DM C on
thi s basis proved quite robust, particularly when the degrees of freedom of the id entified
responses were limited by regularisati on. The off.1ine tests showed reliable identificati on over a
wide range of RLS identifier tuning. As the changes became impl emented in the DMC,
expected changes were observed in the quality of control. In the on·line testing of this algorith m
on the Pump-tank system, the results were not comp letely consistent, but nevertheless
promising. Quadrat ic performance indices however showed better controller performance when
the process parameters were updated with changes in the operating point. The errors introduced
into the step responses supp lied to the DMC were correctly identified most of the time, but
occas ionally a spuri ous variation would be introduced by the plant data. The best protection
against this in practice will be to increase the response time of the identificat ion, (lower Q
values in the Kalman filter). and to constrain the allowed range of variation.

8·2
Chapter 8 Conclusions and Recommendmions

Despite Dynam ic Matrix Control presenting several novel features and advantages, it is not
designed to deal with processes with an integrating nature. These are processes that produce a
ramp change in the output for a step change in the input, behaviour presented by th e Training
Plant currently under study. When a Linear Dynamic Matrix Controller is applied to processes
with an integratin g natu re, a steady state offset is expected. This is caused by a ramp that may
be in the effect on the outputs. Thus, an integrating compensation consisting of factors like
gradient feedback, accumulated moves and extended slopes was included into the LDMC
algorithm. Gradient feedback is a "gradient" correction vector for the P predictions up to the
horizon. Accumulated moves represents a compensat ion that accumulates all moves older than
M steps back from the present time, and ex/elided slopes extends the integrating step respon se
so that integrat ing processes can be treated with in the same framework as "self-regulatory"
processes.

The resulting Integrating Adapt ive Dynam ic Matrix Control algorithm was finally applied to the
2-input I 2-output sub-system of the Training Plant. In preparation for the on-line controller
software commission in g, and to experiment with the tuning of parameters, preliminary closed
loop off- lin e tests were designed to determine robustness and controller performance lIsing a
cOl/vollltiol/ model representation of the plant. Integrating DMC showed good behaviour as long
as the process model mismatch was sma ll. For large a mismatch, however, DMC was not
satisfactory and model updating was req uired. The Integrating ADMC could successfully
handle this problem, and was able to accurately control the outputs to their set points indicating
that th e algorithm is quite robust. Unexpected results were obta ined when simulati ng off- line,
using the DMC without gradient feedback. Good performance was noted instead of an offset.
The absence of gradient feedback correction was not reflected in the controller possibly because
the system was steady at the start.

in the rea l time tests, however, the gradient feedback compensation played a significant role,
since as expected, steady state offset was observed when gradient-feedback was not applied in
th e controller, and integrating compensat ion was shown to be an effective tool in eliminating
th is steady state offset. Integrating ADMC showed better performance re lative to Integrating
DMC, with the outputs following the setpoint although with slight oscillations in the second
output.

It is concluded that the tuning of a controller for this highly interacting and non-linear system is
a very difficult task. Very slow or osc illating respon ses were often found when changing
parameters. Therefore, many unexplored tuning values need to be tested in order to improve the

8-3
Chapter 8 Conclusions and Recommendations

controller behaviour. The present work may be regarded as the fi rst of many future studies
related to th is comp lex Traini ng Plant, offeri ng a diversity of poss ible fie lds of study, and since
there are many unresolved research issues re lated to this system, further investigation is
recommended.

8·4
REFERENCES
Aitchison, S. and Mulholland, M., "Adaptive Model Predictive Control of the Peak
Temperature in a Heat Interchange", SA Inst. Chem. Eng. ~"Nat. Meeting. Cape Town,
April 16-18, 1997.

Astrom K. J. and Wittenmark B., "Adapti ve Control" (2nd edition). Addison-Wesley Publishing
CompallY. Inc, 1995.

Barnard,1. P. and Aldrich C., "Recent Advances in the Parametric Identification of Non-linear
Dynamics Systems", SA Inst. Chem. El/g. 9th Nat. Meeting. Secunda, Mpllmalanga,
October 9-12, 2000.

Becerra, V. M., Roberts, P. D. and Griffiths, G. W., "App lyi ng the Extended Ka lman Filter to
Systems Described by Non-li near Differential-algebraic Equations", COlllrol Engineering
Practice, 9, p267-281, 2001

Byrne, G. D. and Ponzi , P. R .• " Differential - Algebraic Systems, Their Applications and
So lutions", Computers alld Chemical Engineering. 12 (5), p377-382, 1998.

Chang T. S. and Seborg, D. E., "A Linear Programming Approach for Multivariable Feedback
Control With Inequality Constraints",lnt. J. Control, 37, p583-597, 1983.

Cheng, Y. S., Mongkhonsi, T. and Kershenbauffi, L. S., "Sequential Estimator For Non-linear
Differential and Algebraic Systems - theoretical development and application",
Computers and Chemical Engineering, 21 (9), pi 051-1 067. 1997.

Cutler, C . R. and Ramaker, B. L., " Dynamic Matrix Control - a Computer Control Algorithm",
Proceedings of the Joint Automatic Control Conference, WP5-b, 1980.

Deghaye, S. W., Guiamba, 1. and Mulnolland, M. , "Enhancements of Dynamic Matrix Control


Applied to a Liquid-liquid Extractor", SA Insl. Chem. Eng. 9th Nat. Meeting, Secunda,
Mpumalanga, October 9-12, 2000.

R-i
References

de Vaal, P. L. , "An Overview of Advanced Control Techniques", Chemical Technology,


Sept/Qct 1999, p 13-19.

Dbaraskar, K. P. and Gupta, Y. P., " Predictive Control of Non-linear Processes Using
Interpo lated Models", Inst. of Ch em. Eng.. TraIlS !chemE, 78, Part A, p573-580, 2000.

Garcia C., Prett, D. and Morari, M., "Model Predictive Control: Theory and Practice - a
Survey", AlItomotica, 25 (3), p335 -348, 1989.

Gllpta, Y. P., "Con trol of Integrating Processes Using Dynamic Matrix Control", Inst. of Chefl/.
Eng.. Trans !chemE, 76, Part A, p465-470, 1998.

Henson, M. A., "Non-linear Model Predictive Contro l: current status and future direction s",
Compllters and Chemical Engineering, 23 , p 187-202, 1998.

Huang, D. and Zhll, X., "Auto-tuning of Dynamic Matrix Contro l" Advances in Modelling &
Analysis, C, AMSE Press, 46 (I), p43-46. 1995.

Iserman n t R , "Practical Aspects of Process Identifi cation", AUfomatica, 16, p575-587, 1980.

Johnson, C., "Process Control Instrumentation Techno logy", Prentice-Halllnternational, IlIe,


1982.

Lee, J. H. , Morari, M. and Garcia, C. E., "State Space Interpretation of Model Predictive
Control", Alltomatiea, 30 (4), p707-717, 1994.

Ljung, L. t "Sys~em Identification. Theory for the User" (2 nd edition), Prel1lice Halllne, 1999.

Lllyben, W. L., "Process Modell ing, Simulation and Control for Chemical Engineers" (2 nd
edition), McGrmv-Hill, Inc, 1990.

Maiti, S. N., Kapoor N., and Saraf, N. D., "Adaptive Dynamic Matrix Control of pH",/nd. Eng.
Chem. Res. 33, p641-646, 1994.

Maiti, S. N. and Saraf, N. D., "Adapt ive DMC of Disti llation Co lumn With Closed-loop On-
li ne Ident ificat ion", J. Proc. Coni., 5, p315-327. 1995a.

R-ii
References

Ma it i, S. N. and Saraf, N. D., "Sta rt-up and Control of a Disti llat ion Co lu mn Us ing Adapt ive
Dynam ic Matri x Control: an ex perimenta l study", Process Conlrol alld Quality, 7, p143-
156, 1995b.

Mulho lland M. a nd Narotam, N. K., "Constra ined Predictive Control of a Counter-current


Extractor", System Modelling and Opt imisat ion, edited by J. Dolezal & J. Fidler, ISBN 0
412 718804, Chapman & Hall , p251-258, 1996.

Mu lholl and, M ., "Personal communication", 2001.

Mu lholland, M ., Le Lann, M. V., Chouai, A. and Prosser, 1., "V isualisation of Constrained
Predictive Contro l of a Liquid- li qu id Extractor", in print, Control Engineering Practice,
200 I.

M ulho ll nnd M. and Prosser, J. A., "Constra ined Linear Dynamic Matri x Control of a
Dist il lation Co lumn", SA 11151 Ch. Eng. 8th Nat. Meeting, Cape Town, SOllth Africa, 16-
18 April, 1997.

Morshedi A. M., Cut ler, C. R. a nd Skrovanek, T. A., "Opti mal Solution of Dynamic Mat rix
Control with Linear Programming Tech niques (LDMC)", Proc. Am. Control Coni.
Boston, Massachusetts, 199-208, 1985.

Ogu nnaike B. A. and Ray W. 1-1 ., " Process Dynamics. Mode ll ing a nd contro l", Oxford
Ulliversity Press, New York, 1994.

Patwardhan, S. C. and Madhavan, K. P., «Non-l inear model predictive control using second-
order model approximat ion", Ind. Eng. Chem. Res. 32, p334-344, 1993.

Prosser, J. A., "Variations of Linear Dynam ic Matrix Control and its Applications", M.Sc. Eng.
Dissertation, University of Natal, Durban, 1998.

Rice, R. G. and Do, D. D., "Applied Mathemat ics and Mode ll ing for Chem ical Engineers" JOltll
Wi/ey & Sons, INC, 1995.

Robertson, M. W., Waiters, 1. C ., Desphande. P. B., Assef, J. Z. and Alatiqi, I. M., " Model
Based Control for Reverse Osmos is Desalination Processes". Desalinalion, 104, p59-68,
1996.

R-iii
References

Suganda P., Krishnaswamy P. R. & Rangaiah G. P., "On·line Process Identification from
C losed-l oop Tests Under PI Control", InSlillIilion o/Chemical Engineers Trans !chemE.
76 (part A) ..1998.

Seborg, O. E., Edgar, T. F. & Shah S. L., "Adaptive Contro l Strategies for Process Control: a
survey" AIChE Journal, 32, (6), p881-913, 1986.

R-iv
Appendix A

General Concepts about Process Models

This appendix presents the theory related to process models. It includes issues such as process
var iab le definit ion, process characteristics and process models, as well as different forms of
process model. Thus, the appendix structure is:

Page

A.I Variables ora process A-2


A.2 Process characteristics and process models A-2
A.3 The process mode l forms A-4
A.3.1 The state-space model A-4
A.3.2 Impulse I step response mode ls A-5

A- I
Appendix A General Concepts about Process model s

A. I Variables ora process

The process model represents the relati onship between process variables. Those variables can
be classified as state, input and output variables.

Input variables are those that independently stimulate the system and ca n thereby induce
change in the internal condition of the process. It is possible to classify these variables as
manipulated (or control) variables and disturbance variables. Manipulated variables are those
input variables, which are at our disposal to manipulate freely as we choose, and disturballce
variables are those over which we have no control.

Output variables are those by which one obtains information about the internal state of the
process. State variables are generally recognised as that minimum set of variables essential for
completely describing the internal condition of a process, and can be used to predict future
states provided future inputs are known . The state variables are, therefore, the true indicator of
the internal state of the system. The actual manifestation of these internal states by
meas urem ent is what yields an output .

Some process variables (outputs as well as input variables), are directly available for
measu rement while some are not. Those process variables whose values are made available by
direct o n-line measurement are classified as measured variables; the others are call ed
unmeasured variables.

Although output variables are defined as measu rements, it is possible that some outputs are not
measured on-line (no instrument is installed) on the process but require infrequent samples 10 be
taken to th e laboratory for analysis. Thus for control system design these are usua lly considered
unmeasured outputs in the sense that the measurements are not available frequently enough for
control purposes.

A.2 Process characteristics a nd process models

Chemica l processes can be classified according to nature of the models used to describe their
dyn amics in several ways:

A·2
Appendix A General Concepts about Process models

• Linearity - linear or non-linear


Thus a process described by linear equations ( i.e., equations containing only linear
fun cti ons) is classified as linear, wh ile the non-linear process is the one described by non-
linear equations. A linear system satisfi es the properties of superposit ion and homogeneity,
while a non-linear system does not exh ibit any of these properties.

• Number of independent variables -lumped or distributed


A lumped parameter process (which may be linea r or non-linear) is one in which the time is
the only independent variable. It is described by ordinary differential equati ons. The
process variables of a distributed parameter process on the other hand change with s patial
as well as with time.

• Stabili ty - stable or unstable


The process is defined as stable if "self-regulatory", that is, the process va riables converge
to some steady state when di sturbed and /Instable if variables go to infinity
(mathematically). Most processes are open-loop stable. However, the exotherm ic
irreversible chemi cal reactor is a notab le example of a process that can be open loop
unstabl e. All real processes can be made closed-loop unstab le (with a feedback controll er in
se rvice), and therefore one of the principal object ives in feedback control1er design is to
avo id closed-loop instabi lity.

• Order
If a system is described by one ord inary di fferential equation with derivati ves of order N , as
shown in the bellow equation, the system is called the Nth order.

where aj are constants and f(t) is the forcing fun ct ion or disturbance .

As we shall see in the next sections, we can classify the present Training Plant system as
lumped, non-linear and high order.

A-)
Appendix A General Concepts about Process models

A.3 T he process m odel forms

According to [Ogunnaike and Ray, 1994], it is usual to cast the mathematical model for any
particular process in one of four ways:

I. The state-space (different ial equation) form


2. The transform-domain (Lap lace or Z-transforms) form
3. The frequency-response (or complex variable) form
4. The impul se / step-response (or convolution) form.

The last three form s are called input / output models as the mathematical models strictly relate
only the input and output variables entirely excluding the state variables. In general , input /
output model s occur as a result of appropriate transfo rmati ons of the state-space form, but they
can also be obtained directly from input / output data correl ation. Because these model types are
obviously interrelated, it is poss ible to convert from one form to another.

Recall that in attempt to control the Training Plant currently under study, a state-space model
was deve loped (see Chapter 3). The system transpired to be multivariab le, non-linear, of high
order, described by a mixed ordinary differentia l and algebraic equations (DASs). On other
hand, littl e information about the process parameters was available. Thus, to overcome this
complexity, an experimental step response model was then obtained and used for process
control (see Chapter 7).

The state-space and impulse / step-response forms are briefly described as follows

A.3 .l The s tate-s pace model

When the process model is formulated from first principles, it often naturally occurs in the
state-space form in the time domain. The state variables occur explicitly along with the input
and outp ut variab les. Since the modell ing equations are fo rmulated with time as an independent
variab le, state-space models are most useful for obtaining real-time behaviour of process
systems. Discrete-time formulations are especially well suited to computer simulation of
process behaviour. These models are also used, almost exclusively, for analysis of non-linear
system behav iour, because most of the other mode l fo rms can represent only linear dynamic
behaviour.

A-4
Appendix A General Concepts about Process models

A.3.2 Im pulse I step res ponse models

It is typ ical to adopt the theoretica l mode ll ing approach when the underly ing mechanisms by
which a process operates are reasonably well understood. When the process is too comp licated
for the theoret ica l approach (usually because very little informat ion about the fundamental
nature of the process is ava ilab le, or the theoret ica l mode l equations are enormous ly comp lex)
the empirica l approach i~ the ~ppro p riate choice.

Impu lse I step-response models fin d thei r main appl icat ion in dynamic analys is problems
inVO lvin g arbi trary input functions u(t). In build ing process mode ls from ex perimenta l data
sampled at an interval 6t, discrete impulse I step-response mode ls are most useful because the
model requires only a data record from well-des igned experiments. The particular functional
form that the input takes is immaterial. Observe that a very simple experi ment of send ing an
im pu lse (or a un it step) function as input to the physical system wi ll give th is requ ired impu lse
(or a uni t step) response data record. This may then be used for dynamic analysis througb the
convo lution model. A step function is easier to implement on a physical system than an
impulse.

One app li catio n of impu lse I step-response models outs ide of process dynamics and control is in
study of residence time distributions in chem ical reactors [Ogunnaike and Ray, 1994}. In the
present work, convolution mode ls of two processes with different behaviour, "self-regu latory"
and integrating nature were obta ined fro m the experimental data (see Figures 4.5 and 7.2) and
the n used in Dynamic Matr ix Control algorith m for contro ller design.

A-S
Appendix B

Extended Kalman Filter Formulation

Presented in tbis append ix, is the extended Kalman filter formulation [Mulholand, 2001] for
sol uti on of differential and algebraic equation systems. The first step provides a linearisation of

the system using a Tay lor series expansion, and then the Kalman filter is used for state
estimation.

Consider the system of first order differentia l and algebraic equati ons

dy
f (y,z)
dl (B. 1)
0 = g(y,z)
where y is a vector of state variables and z a vector of algebraic variables.

Defining the lacobians:

5tL if.
-'"-
"', 5tL 5tL -'"-
"',
"" !h..
5tL !h.. 5tL
"',
"" 5tL iJ:~f

-'"-
A=Jfy = "" "" iJYN
B = J" = "', ", fr..(I

'f., iJ/.,. ~,.

"',
iJ/.,' i!f.,' ",
U:M
"" "" "" "" (B.2)
."l<J.
"', "',
,", ."l<J.
{ty.~
"","', ."l<J. la
iJ:J[

."l<J. ,", la ""


la ."l<J. la
"" "', ", ",
Cy.\' C:M
C=J = D=J =
'" '"
ag,.,. ag ...
-.;;- -.;;-
ag ,.
ay,\,
cl!:',.
0;1
""",. ~
U:M

B-\
Appendix B Extended Kalman Filter Formulation

lincarise the right hand sides about (Yo. Zo) to obtain the augmented system

(B.3)

where

Bz,)
(~-)
I (yo. z, ) - Ay, -
(BA)
( g(:;;;~z;y:::: Cy;:::: D~;-

To allow for the possibility that some of the z elements might be free. overspecify the behavi our
by suggesting that z will move towards some observed va lue Zo

i = f (z, -z) (B.S)

so that equation (8.3) becomes

(B.6)

with H o = ; Zo
E = _1 [

an additional requirement is also defined from equation (8.3) as

- G, (B. 7)

To handle the possib ility that the states y may also be observed, augment the above equation as
foll ows

B-2
Appendix B Extended Kalman Filter Formulation

(B.8)

Lettmg. X =(Y) ,
.~. 4> = [A"tT""rE
i B] and "0 = (F'). integrate from 0 to / keeping
ii~" Uo fixed:

o,
x, e x, (8.9)

The same integration can be app lied to the interval / _ I + Llt giving
(8.10)

with A, = e<l>!:J/

B, = [ e<l>!:J/ - I] fP-I

and setting C, = [ ~···I· %] ,IV, = (!d:) , with L select ing observed states, it is also

required

(8.11)

Representing the equivalent set of measurements by iv, . the Kalman filter is configured as

follows

K, = Mt C; [c, M, C; + R JI
x'~JJ' = A, x, + B, Elf + K, [IV, - e, X,] (B .1 2)

M'~JJ' = A, [1 - K, Ct ] M, A; + Q

where the covariance matrix is initialised with Mo small and Q and R the expected error
covariance matrices for the model and the measurements respectively"

8-3
Appendix C

Matlab Extended Kalman Filter Algorithm

T he propose of this appendi x is to prov ide the Matlab algorithm appl ied in Chapter 3, for stale
estimation of the theoretica l process mode l of the Training Plant, using a extended Kalm an
fi lter. The main program was developed by Mulholland [2001]. A ll contributions are gratefully
acknowledged.

Col
"o;II_~~·bI_~

.. 'OfItMClTIllir'inQI'IatII _ _

"1oI, _ _ 2OD' .()$.'Q - . , •• · _IOIftlWI. .... _


.. e. ~., 2OD1.00t 02
.. .hit. Vos1oo 200'.0.0.02
__ «lO£.a:n
-_.-.~
X"P-._'):X'_--<P. I) ' _._~""_'j;
..o4._....z..-...(p.IY,

I'ISIoI.\U·O.OS: ........ _IOPI<II ... _ _ I...... OI

. n.._ . _ . . _. . . . . _. . .d_,_
.. N. do ","Z 2001.00t.02
...,c..o..,.,~ 2001.115.02 ~C.O' :

lORl1c>w-O.OOO';
.. _ .. _ ... I0Il111,.""
.. IOw_I............""" ...

_. _. "- '
LORSw.u.· O,OOlXI1 ; " loA 01 .. ...., _ _ ... _ '''' "", .., _•
.. 0 1 ; _ oquations. _ ...,......Il10 _ _ InpuIs. - . . _ .... ..-.I
pIoysleol"po.-ors n'_ .... IO:
T_02O;
n>g . , : .. _.~
.. _!«npota1 .... )CI
.. _ I _ _ _ 1IyOO)'l",
__ "N. ",""",slnmOl
"1NPlIT: _ _ _ .. ... InpuIs._I<I _ _
.. _ •....-....
~toOl ~

~_'")kWI
-~
.. Aht .. ~·_ .. . . . . . . - ' " _ _

.............-
(oc"1JII3_11IlI
_ 1 0 1; .. _....,._~)rn)

.. OlfTPVl":f"..I < I _.. In _ _ .... to ......... _vari.ollloS .... _ 0 \.2;

.....-
.. ..,:IOtII_ ..
"NOTAnott;

.... : _
_III'-.o_. ,.... . . IIIo._
.. _(IIrot .... ~""
_~
I1PIIS· . :
""'0· .;
""12
""".,:
1IPlO·1;
110• • U:
0
"

.. "' . _ .. ~(fnl ...... II'II~.OC' .... ~ ... >I01es) IIOl . 2.0;


110) • • ;

-
Ill. ~ oIIb <ha ...... IIOlIIOT· JIOl.. U ; Ill. ""'...", ,d" ..... _.0 .......
""" • 1;

-'" 0 e:

---
IIO~

""...
.. TO BE UTIY VUJI 8!LO...I"_ _ _ _ __
IKISIIOl_I\O»· 4: "'''''~'''''n'd''um ........ o'''''''''

A,o 0.1:
.. T1n>o ........ .oJ 0 0.' ;
1 _0. .u. 0.' :
...-. U ... . ..... 0 .1:
Cl _ 0.002: .. . ,uo 0.1.
_ _ _ _ _ _ TO lE UT IYUS[llA&OW: _ _ _ _ _ __ oK'·O;
III. _ _ _ 1IHs bK'·..-
<1<1 • I;
010 ·0;
1>1<2 •• _
_ " 011; .. ,.. .. . . . . . - .
_"200; .. ,.. .. _ dQ·'s:
r·.~ . ):
~.~'):
"".0;
bI(.O o .- =
l"'..roo.(.........lI: <1( • • t:
y~"'sL.I •• _ ........ ' ): oIpi'>oOl. :lCi3O. .. vor. ......... _.
1'1"".",1(...."... 8):
)'0' • ...,1("1"" .... ,): .,,,,,,,,,,. -.
I1CIMOZ·Z0i30:

-,
r&'nft"ll •• 01'01(......... ,): .. ftog. ( " - ' 2:_ ' 0 _.~: , ,_ OIpi'>OOo1 ' ,ar.JO:
OIp/IOOS·-=

-
rorlo".yrna. ....,...10 '1ar.JO:
~II.')"I: ..........

. """",1 . ' - '

-
"""",IJ·l(V3O;
_~I"'l; ........ ~_Ior"" __ ~IftO"_
o.t.O, • '0CV(30'"lO):
1.I.CI1o~ ;
kl.0l • 1CCV!3O"3C):
_ _ ·0.00' : .. _ _ ......... _ O .. RSding W)O.~ ;
.... , ..:zo; .. T_ _ Io< ........
$101.,.,0;
&IoIM., "..__
..,o;.. ,.. _ _ .. _
~~

...
"'proIoa~.-..o,.-..
............... ...-"
IolOS.~ ;
1ol10 • 5OI!JO"3O);
KirII_S; . . . ._ _ _ _ .. ~"
1ol1l 0 SOCIftloIMO):
Iol11 • SOI()O"3O):
"""""""0; .. _ot-..-., _ _ _ ......... " It!. U • 5M'(3/I"3O);
' ...._
T.... I...._
....'oaClPO.5;

.. 1'1.0TT1NG 1NF(lRM,o.11ON
<11.,...._
pol1oat\!''Cl!
_ _ "..,):
_'octo<"d;
..
....... It!. 14 0 lOOI!'CMIII:
It!.., • 'OCV(3O'"lO);

It!.II • JOO/()O""lO):
......dofM!.-II02
.. _ ........... -........on; n.s.n ' SBOT.
I<UO • SI1It3G'"lO):

_-
1.P"'"roo./P.l);
IWl_O:
_00;

. "'....
1J.31·'~:
k... O 0 ' 1(30"30):
UAH' 0 ':
I<ooIOlor ....)

--
\W!2. ,:

..,_..
1N1T. I ... 1nlI_ .... ,.....,_
--. M < •• :

.. SoI_ ......
".... ,:
-~- ."007:
''''cI n'_2.';
TlI .... ZS;
• _ _ _ _ _ TO 8eSV ..... ueERN:LOO'"_ _ _ _ __
Tlz .... n:
ll_n:
TI_IO;
TI_ZS,
.~ ~O l "" S:
.. ~ ....ro F02 .... S:
"''''''I<9O(p.');.'_'-cP.'): .'_'""'"\P.I);
hi IP.zo",S(p.');
Tl IP·.oroo.{p. ' ): T':P>o ..",O(p,. I);
~C)ooS ;
' ..... ' .5:
'ClIG-U:
T. :w-.OtOS($I.' ): Tl4P-.ooroo.{p.I): TI_ • ..ao.(p.'): ~'P-'OtOS($I. I ): ~'Oool . l :
,ozp.l-.(p.'); 'O:W-urot(p.');
,,-,:
'''ool ;
,,)00';
F_.OtOS($I. I); 'OM"o.1W$UI. '); "IIP •• II<OS(p. I): "'P-.-.(J>, '):
,,_1.5:
"2I'-HftIS(p.I); '.:IP->_ 'I:
"_.1;
" ...... _ , ) : " _"","",,1); _'P-~ 1): oIPK2f"oql<9O(p.'):
-.<Po '0t0S($I. 1); dI"CVO' P-lIIUI(p. I).
~...-..(p. 'I. aPCVOJPoo.IftIS/II.1); 1If'C'.'(UP-...-..(p. I):
__
_ , ... 7:

~" ,:
<II'CYOI ..... :
oPCW*,",lAO{p.l); dPCVIOPo. . .. I); ~.

~,

OPCV11P-HftO(p..):0PCV':SP·._.'j;_'_'I:_""z_": dPC_:
_.UfOIo/p.l); P,OP-UfOIo/p.I): ~,
dPCY1_:
P,2P-''''''''.'): P , $P .......... 'I: P)OPo.-<p,I): lO2f'ooHftlS(p. ' ); dPClf" ...:
TO<P·,Of'OO(p.I),Tlw-.-(p.'):

no.... ItOSI,p.,): T_ _ .--<I'. I): T31"".0t00W.' ); .,." ... '0t0S($I. ' ):


-,:
dPClflJooe:

P'_5:
qH:I .... ItO$I,p.l): QM3HoO'" . 0t00W. I):
P'-':
P,,,,,,
XOI"'UfOIo/p. I); X02Po . 1fOI(p. I): )(O:sp.. ........,. ); X_IOt"03{p. I ): ~,
)(O _ _ . I); XI_'.oo(II.1):
T02 .... 5O;

-~
T'-.

C-2
Appendix C Matlab Extended Kalman Filter Algorithm

noo-1I, ..... , : .NT)'YfII.:J00t310 100r4PCw~t~ : ......


l J00060, dI'CY05.,oo:~; " JmI
n, ..."", ..... I;.INITI'YfJI.:)OI:t'O I O , 02"4PCV I Oot~I00 ; ...cI.
IIH'... · et,et, 1IP'CVIO "JI,II): }IO(ft)OdPCVltIO; .. fmI
IIH_,
qH2 . . .

XC, ... C.4. w"c, )(O, ... o.n , ..... ,W"'.O )(0''''0.$ ; _
.... -1 ; IINIT 1'YfJI.;)OpO ' 0 ,(10 2"<I!"CV11 0 t o(.>-c!PCV1IO; ...cl.
ClPCVII "yw;fO(n}odPCV"o: "["'I
""._" .INIT moo.:)o[31 , 0 '00 2"<IPCVI.)o t ""o)odPCV1,...,; .....
X02000: <lPCVU oy(n); 7O<.)odPCVUO; '" 1"'1
X03o'0 .• , ... c.• )(oloo'0.7: _ : .... 0.7 X()3000.SS: ....
X04000; ... • • , ; I INIT n{oI.:)o[U , 0 1 0.0 M'O<o 1 o(n}oP\Uo; ...cl. PO<I '..w:
XQSo-O, rof. )·PO<o; .. (In!
)(111. . 0, ."n" ; .INIT mn.:)ol" , 0 1 0.0 rPlOo t o(.)oPl Oo; ...cl; 1" 0 'nn);
)( 11 ... 0.S: 1'O(n1"P'Oo; .. PI
X'3000.5: ....-1; .INfT)'YfII.:Joot)IIIO , 00 2",, '20 t )'(o)oPI20; ...cI: PI2 "JW:

. ~" eM<;t.por--.
.. ""'. .. _ _ _ ' " ' _ ...... _ _ _
"*')01'120; .. PI
...n.,:. INIT)'YfII.:)opJ I 0
...w'''''''' ......
,0_0 2... 'tot 1W"Plto: end: p,g oy(n);

- ~
M.fVALUt.n-, ;

M.EYA1.lJATEo(I,
Ior)o'""
_,ao·abO(!J(J)-,_~.)-mI . lll) :

'~---'"
,-,-,""
_ 1 .11NIT~ 10 'O. O~~I'W"PXto;...cI.~oy(n) •
ro(Jo)oPXto; .. rnI

I'DW"T02o. "!Cl

ro(O)"T_: "!Cl
_ I ; I INT n(Io.:)o!lIl 00.1 n as t I'W"T02o: ...cl. T~ Rr(OO);

... ft*'; '1NIT)'YfII.'l>'IOO' 0 , nut ItIII"TQoIo: ..... ;T04 .7tnJ'

-
. .... ,: IINlTyr(":"/"I01 '0 , ISn t r(I'I)oT''''': ...cl;'" -,(.).
. . . . ., _ _ .,.. ......... ,-.nc.
R~IINA1.lJATE' "
>"'I.)·T"'.., "ICI
~~ no." ; IINITyr(":)OIOlI 0 , nu t I1n}oT200:...cI; T20 -1'1.):
>"'1.,..1200: "ICI
"..n ·' ; IINIT m":)ol'l , (I I UIS t y(n)oT300; .... ; no '7(n);
•• ,O(nl·no..: "ICI
... •• , ; IINIT m"-')o(" 1 0 , nls t W')OTS"; ..... TlI ·n.).
>"'In}oTllO: "jCI
• _ _ _ _~70 lWO SET" eY ""fit -.eove'-------
"""1; rlNfT rY(o.:)ol"S ,0 '·2"QH'o2·qH'0 ~r(n}oqH' .. : _ . qH'
po<tIt. o.ao , ; '\'In): )'O(tIl"qH'.; ""lW'1
..... · ".INITI'J(ft.:)o[.. ' O ,o.0 'rqH2G tr(n)-qH20; _ . QHl

..-
'7W: rO(l'\)"qH2o; ""lW'1
....... , : .lNITn(I>,:~7 1 0 '0,0 2"<IH_tJIW......,....., ..... ..,...

.-
....... .....
"" EYALUt.""' I'\.INCTlOfo,II • II>OIr ~ .1'In):~ .. lW'1
,"'...
'!M")
..... ".INT ntft..")-[.. , I '0_0 ut ,w.)(O,O: ...... XG' ' I'l"t_jO)(O,o:
~1, "U-_I
dyj • per6r"~.'Yml7(I) . l)) : .·n·' : .INT n{oI.:)o1 •• " '0 0 1.0 t 1(000)(020: _ X02 .-,(.): _)oXGZo;
7OYa)I"Mm)' lilt: .. r-t>on_1
•• ft·"". IIHIT )'Y\IO,:I-ISO " • 0.0 1.0 t )'(n)'XC""'...... , 1(03 oy(.); yo{njoX03o,
• _ _ _ _ _ TO II! a!T BY USER BELOW-- "U-_l
n_.·' : WINT)')'(n,:I-IS'" '0_0 I . O~ )'(n)'X040, om, Xo« -o(n); ,"",)oXOoIo;
"(ffIa~_)
.'0: . .... , ; I !NIT mn.:l"lS2 I 0 I 0.0 1.0 l 7(n)')(o50 . ..... , XOS ' . (n); 7O(0)'XOSO:
.. 5 _ '" V ••_ . . . 01>00 .. _ . h!!iftCI .. 1XIMrv-' Em>n _ Rrqn
"" 1OI>Htv_ Em>n ... . o SI_.... ~(._ ...........; . _"" "'_I .. (ffIa~",,"")
.'.'1 : I ....-r)'r(n,:)oIU' \ 10.0 I .Otr(ll)·XU)O; ...... Xl0 '''''''1; ~x'o.. ;
"~r_openl
""STATES fOO ... _ . . . . . . . . . ... n_I : ' INT n(n.:)ol'" , , , 0.0 lOt _·X, 10; ..... ; X' 1 "JW: r>(n1'X' '0;

.._--
.·n·, •• 1>I1T moo.1"I 1 ,01 0.0 2"IIollO ~ 1W"ftHO; _. ftll
·w.):)'O(tI)"II lIo: ""PI
"~--I
...... , : lINT n(>r.:JOtU " , 00 lO t \'W"xno;...cI. XU .0(0): yo(n}oxno;
... n· l, 1Nl yy(lO,:I"l 2 I 0 1 0.0 2"IIoUo t ItIII"ftlZo; _.ftIZ
'7W:1"'W""I20; "Imf
".--1
... n" •• INITmoo.:)Ol 1 '01 fI43IIOT II03IIOT - 2t~'3o;_ .
nu "Y(JI);_l"nuo: .. "",
..... ,: .1>I1T moo.:)OI • I 1 , flCliIIOT 1IQHOT_3 t ItIII"h,~; _ ;
. ... , ; lINT yy(>r,.")OISO I
0".,1:_)01"3'0; ,.,~
° '0.0 .,.,11. t r(n)'fll.; ...... FlI
hU "JI,II); ro<oo>"ftu.. ; """"I
no.": IINfT moo.:)of $ I , , ,$ as t ItIII"Tl1o: end: TII oy(ft):
7<'W"T I1 0: "ICI
""no l ; IINfT mn.:)O(fl' I I$IS t I'{I>)oTl Zo; _ ; 1>2 oyW:
rowol120; "ICI .. CommOn I$w ~ _"T"'*'O
"'Itt_..,..·.rrott.-.,0OO< __

--
._.·"IINIT mo.:1"l7 I , ,I$U t 7\I')oTl3o: _ : T!J .-,(n), ,o_"U_oO. I : .. ..........
I'O(n,..TI.)o: "let ....... 10< _1<1 ,"0lI0Il101 oNr
...... , : '!NIT mo.:)o(I ' 1 , un t I'W"T'.o: _ : TH .-,(00; 7"___' _ - 1: .. mullpIos"'_ V .......s._.,.... U/\I.nQooon ...
yo(n)oTl'O; "let
.".' 1: '!NIT mo.:)O[~! , , 1515 t ~)onSo: ..... ; lIS oy(/I)! U"'JotIot '0.' : .. ......aI!>In", ..IoIi<. T .......s~log .. """ _ _ _
.,o(I1)-lISo: "/cl
....'" .. No"' ...... .. _ _ '\.011·· 0 ... _ ...... _ '
'~11.-I.0RIIHI ... "

--
lORlol.011SMAI.L:
.. OTWERVAR1AIIlES ~
LOR.·t:
"'~ -I ;'!NIT rY(o.:)Ol'O 1 0 , 0.0 ~IO t 1'W-I'0'o: .....: ' 0'
_ : )'O(nI'f O'o: "" fmJIIol ' II12"1.QR:heoI ...12

--
"_ ~ . t:'MT n(ft.:)olll I 0 I o .O~tI'W-l'O Z o: ..... : ' 02 .~
~.)'O(nI-F02o: .. fmJIIIl
•• • • ".NT )'Y\IO,:)o112 I 0 I O . 07"l'1no~rW-f'C3o; ..... : ' OJ t OlUol :
")'(10); )'O(nI-FOloo; "" fmMOl
ft·.·';fmMOl
'\'In). r<>(tIjOfQolo: ""
'!NIT )'YfII.:)oI IJ , 0 • 0.0 7"fOoIo ~ nOJofOol<>; ..... : FOol WM 3-<o(hOHOT_U)"... ""
lOR:IoLORSJ.WJ.:
"",n
no." ;'!NIT W("')OI'. I 0 I 0.0 7"I'0So ~ w.}ofOSo: ..... : FOI
'n"'; fO(tI)aFoSo: "" (mlIIo1 t OR3.,;
"" • • ,, '!NIT l"I'I":)OI1S I 0 '0.07"1' 100 I; )'(o).Flo..: ..... : "0 •• ".,!

- --
• o(.); yO(n}'f'Oo: ,., [m3II1) wn'$<o{llOSSOT'LOItJIHI)
,," •• , : IINlTn!..:)oII" 0 1 O . ONlIo~)'(o). F llo:...cI;'" lORS-olORs.w.u.:
'0(01; )'O(nI'~ l1o: "~l
..... , : .INfT )'YfII.:)O['" (I 1 0_0 ~"f'20 tJWOf'20:-= ,,2 LOR$<o I ;
' 0(.1; ro(n}'f IZo; ""~l
"" ... , : . 1NIT m":)O['ll 0 , 0_0 :",.)0 ~ 1'W-I'13o;~ '" "02<>~

--
")'(10);_1"" ""'; ""~l lORHl·lORsaMU..
....· ".Nl "",,:)01'" 0 I 0,0 N'~t r(JI)OF'~; _ ".
OY(n};I'OIIIW'IOO; "fmMlJ l ORHl" :
..-ft*"'Nl n(n.:)ol2O 1 0 '0.0 ""'So~J'II'I)Of'l"" : end:,n
' _;_)01'1$0; "Jmlo'II '~1 '~
lOftH2ol.ORSMA1.L.: "" .
-
"''''';.1NITnf/I,:)ofoIl '0 , o _ o:nlpI'a~t ~1.;_;dPKl -,(n):
~10;"""1 l 0RH201 :
• • • - ,;.ltf1Tn(ft.:)o/22 I 0 , O_O:ntP1Qot ~ :_; dP1(2 -,(n):
)'O(tI)odPKZo: .. ["'I
.... _1, IINIT "",,:)ofn 1 0 , 0.0 Z"df'I(~ t r(,*""",,",,; .... ; - . " YW:
...wodP1<oo; "1",1
"" VOI.UME llALANCl!a
.Oft*1:1I(o.:)o[ I ' , ~I(n) O l·"' .'O' )I.. , ;
... 1IT_ '
....,·, : 11("-')0[ 1, 2I;1(n)-C,'U " 02 - ""l'n"'S)lA2;
".'2 T_Z
..... , ; II(n.:)OI' 11 ~ 1W " C· '''· ~)IAl;
", .n T_I

C-3
Appendix C Matlab Extended Kalman Filter AlgQrithm

"'. " .~(ft.;)-1" .t f(n)·(·F ' S ·FOS)lM ...... . tI(n.:)O[ IIUt'W · · .... C'O"1' · ··Z • (PO< • 0 ) . ~ ' (hP04 •
...
~1S_ 1\04 1:
"'HfAT~S _ 1 .II(n.")o[ ' ,].It 1W_·\LO$"fWl · {P12·0 I ' ~ ""'12·
...... .. trto.:>-(' • $~ 1«0' (-F"""l11
' F~'""l' ~' ·(!II'·IISMAU)). _ nCIS )'I.OIU • <IPCV!l$;
(T"/!II" ' hSMAU))" " ,. '01)lA' :
I • ]'t 1(0) . ...... 0,. '0"2
~TlIT_'
.''''I.IIl •• :)O(' , SI: I(ft} 0C·F12""lIZ • Fll""ll 1 • F. J"T\) • .•
,.5"T.5 • F~'(h12'hSMAlJ,J) • ••
"",t)....... , . ft(n.;Jo[. dPCV'O:
• (1'10· P.t). ~ · (hP\O·

{T121(h IZ.I\SMAU)I·C· "2 • '02 • Fll • F,J • F' 5)1A2: . ... I; II(Jo..:)o[ '.)OI; ,(. ) · · .... ""1'''·2 . (0 ·O) · "'O·(hIl . 1"I02
~T1 Z T_Z )'I.0IU • ClPCVII * dPK • •
• 0". ' . Il(10.:)0(' • 7): ~.} . (-FU"T1l • F03"T1 2)1tol3·Oll).lo03BOT·"-SM,.I.lU)
...... I .JI(II..:)OI I 13&1: 1W ·· .... ,l"f ITZ ' (O. PI2) 0 ""f"{1II1 .
{T'lI\JI1J.M'l8OT ·"""'-U.ll'· F13 • FOJ)/Al. ""'2)'1.0'12 . ~
.. T13 T _ ,
..... , . fI{II.:)O[ ' l ]1t ' (!Ij ...... ""1'''·2 .(0 ·0 } * ~' ("') ·11(12
••••• ; II(n.:)-1' .~ 1(JI1· ''''{TOO-T,4l¥o"·(h"'l\So.u.uJ): )"\.011:] • 0fI'eVI]:
"'T' ~ T on~4
•• "": ft(n.=>-(' I): !(n). C,"5"TU ' 'OS"TI~·(h's.t>OSBOT·hSIAAUJ) ..... , : 1Il •. :)ol' , ~SJ : 'Io)" kL .."I' ..·Z • (0 . P' O) * ~'(h" •
~ 'D ) • dPK • .
{T'$I(I"I' 5-1>O)8()T*1\SLIAUJ1' {· F,S * F05)1M.
... T,$ e.- ..... , .1I(n.;)o(1 '!II ~ 1W',kl.U"1',YZ
·0 I' ~""S . 1"IOl)'I.01'U.
...... , . 11(. .")0( '
~--
'1)"1"'" It 1«0. (1"""'0)"""
•• ftO I: Il(10.:)0( ' ,"" ,00
... ,... rw.
.~
• T.t) • F02"{T02·T1b;

(I"""'O)"Ttt • F.O"Tu • F'4"1"2O .


• _ .; ..... )0[, ']$J: Itn)·· ....... (I"..,.'O).~
• (p.0 . P lI) • ~·(hP ' O. ""I~
... "".. boIonoe"~""" •••*,
dT,·T,,·TOZ:
dTZ O TI ..T12;
..,., 1I(n.:I"!' I ~1). ~.I.· kUO"I''''2 • (I'.G· P30) . ~ ·!III" G •

-
V (dT. ·...U ... 0) ..... , ft(.' I"I ' 1)11 ~ f(n) •• k1.3."I'3,·Z • (1'30· POO) • ~'(hPlCI •
q'D: _ I:
WdT'-"4TZ ""." :1/(JI.:)"[' ,)II1rw · · .... 4.O"1'04·2 • {PlO· POOl ' ~'(hP30.

--
q • I.ORHl'UAH'·(dTl4T2)q(dTllOIT2):
"' _ _ ..-M"... _IOO
_I . Gf>CVQ<;
• _ _ __ _ TO BI!. SET BY USflI ASOVt---
q . LORJoi''UAH'' ...n :
....
"'on.:TORI!.COVNT
....... _ _
••
..... , : Il(10.:1''( ' , OOS1: ~O}. -qM ' * q:
~.} • .qH' • (TO.l:. TUI'nlcp'1'U;
..... , . 1I(Jo..:1"[ , , 0 O$L
... ". ..... '02(1."'"
..... ,.lii(i0.:)-1 , , 01).
"'g.. """oos(t.W)
rw·......,... ·,"'. TlOJ-.-""" . ",--' . . 1>0_ . _
dTI • T20-r_:

--
dTZ'T30-Tomt>; nil Os.m(ll(l :"'.IIJ: .... .......".,. .. _ _

.
l(dT " on"OI ...,.. • WIII&"I1I:..,..:!)).
q' 0: ... Nurnt>t< 01 stlf<:l.od ~..,.tJIt&
... '.-(yy(1 :" .211: .... _ .. _ o d ..... onIy

--- ... ' _*';0".')). ... __ ._... __ ptuo .......


"' _1 61"'-0<fT2
_ _ _ _ _ _ 100 .~
q' LORtQVAli2 · (61" ' ~dT ' IdT:n .

- qo LORKl"\IAKl'dT' : _'D:
l'I01o$oll:

----
.'.'1 : 11(",)-1 ' , "I. ~.)'.qK2 ' q: ,.. !e,m .... UA......T_LM
.0.' 1: 1I{n.:JoIII 461: ~.)."'IH2 ' (Tzo.T3Oj·rocp., ,.. I ((yy(L2) " l J , cm))"'))
........ ,: ... _ o I ........ ~_ ...,."

''-~
.'.'1 : e(ft."Jo(11 "1: ~") . ·UlgojUf * n •.
... 8trHfI_......-.a ....... /IOU . I: . . _ " ' _ ..,u
.......
.. _II(Jo..:I"1'
_ • ."oojoIIoctionllPOol
... ,o): 1(1110 -FU"T04. FO'"TlO ' F3'"TJI.

" , _("""-:
.. MASS BALAHCI! AT SPLIT "",2 Oo~.nyo) :
flnl· 01'12 * FO, • F02
... ".' : 11( •• =>-(' "1); * FD]. '11$: Jr_I..,....,.):
""tnk20<.0j>U1 _
w...... o
.. _ ......... Iot _
U-~....,.., : _..
.. _lIS IlALANCE • goyIOf1lofl>ul1lPlO
ond ... _ -.go, goyIon
_ ' . '1(11.:)0(1 ' SSt mo 01']1' F"· '04: ... oo.O'~ : " ' _ ' ""' _ _ _)
UO--<.....nys):.
1W.,-, ·lOft.,. . ,"",.·Z· IlK,"", •• <.1('):
.. PRESSI-'\E DItOP OVER TIE P\.WS .... _
...... , .II(Jo..:)-1 , • 2'~ Ko~.notl : ... ... ""~ .... _
.. ,......KI{II'<Irn~I) ..... 0000( .... , );
.'.'1: 11(",)01 ' • n L I(ol'~ ' LOR:"(oKl"I'U': * bK2"F.2 ' <IUI:
"'''''''''IU~'''''''_21 ......... 100""'10".. •
•••• , : ftl"," I' 1 2]1; 1(01 ' ..,.,K......
... Pwr11:I K, {II'<Irn ....U )
* * <'<" .,'.·2 1>1«"" loO:
"".......1'1 •• ).

1" )0 ' :""

. ... PR£SSURE OAOP ~ TIE VAL."",. rJYl).l)oo'

.....
-"
-
... XlII. l<02.l<ln. XO<. 1<0$• • '0• • " ....... ] _ _ .............. .....-_
" ........ O'.02. 0 ] . 04.0$. 'O. , , _ U _ .. ~~
.. TlIo """"" _ I J - ' " '" (ro%IevO. - . . "' 11 • dONlly .... 0.1 ....
,._'1:
... 01.. . -..
• '''', ; ft(.:)OI ' I 2'~ I{n)' .lqII{dPCW I)'XDI • 'fI>/Io!I l "I'Ol :
.......... ,.UnI<I

-
...... , ; II(n..:Jo\ ' , 2~ rw· -.qr1(dPCW7)'XC2 ' 'fP'Io02'FO:Z:
................. 2
...... 1; fIUo.jo( I ' :IIIt rw. -"l.FeVOl)'X03 • oIpIIoCI3'R1l;
.......... 1O~ 3 ... - . . . _ I o t . " - " , ,
...... ,; tI("-1"1' , 27l: IW - «I"(dPCVOoI)'Xc.o * oIpho04"1'c.o: ...,.,.....-os{r>y•••t1:

--_
"''''''''101_ •

. ..
-~:"'I'
""'.·I,.....
....."...... :tI(n.:JoI .
-...... 1 :n~!(IIl. _(dPCVOS)'XOS * oIpMOS"I'DS:

: II(n..")o[ I 129]: !Inl- _(dPCV10)'XID * _'O"1'ID:


lof)ol
1oJYl).'Y.
lIul._oI
... fW.... """'""""H'

_-,..,
...,..,:.........
......... ,
II(n.")o[ , 130):. lW - «I"(<lPCVII)'X11 • _""1'11 : ............ :

-...-.-
... _1.II(n.")o[ 1 1 ) I~ IW' ·~VU)"lI n. ""","U"I' ' ':
. .."._..~ l"nt-");
.. ""ESSUR! 01101' OV!A: T>tE PIP!'
. ·ftO l : 1I(".:)o( t ,].It If.}.· 0\.0'"1'0'"2
(1'12·0 ) . ~'(hPI2 ·1>01 )'l.0R2 ·.FeW.:

...·1:II(Jo..:I"I' l)11t !(n) •• tI..02"1'02'"2 ·(I'12·0)·~""(N'IZ· Iof )o ' :no


1"I021'l.01'U • <IPe~ r (lYYO.2)o")40InQ.""'))
"""".1I(n.;)O( I I 3lI:
1O» )'I.OI'!2 • 1I!'CW1:
fW.· kUI3"1'Q3'2 -"
C-4
Appendix C Matlab Extended Kalman Filter Algorithm

-. - ••
RM' (yy(J •• )"yo_...._rodot"~.)-r!G. ') _ _ _)IIC1O)-'l:

-••
.~
-..o(Io)..,..q,(l)):
U(Io,l)ol : .. _

_."..,.
....lOt(I-nN)'JOIIJnn:
... ".",""

''''''
....-~ ...
,. ,""
111(1.')&"
10"'. --
f RE~ALUot.l!.

_..._....,;
.... I1Q.,>: ... _ ....... AA·.JJo(" ....., ....J:
V ....... tkJ&I,l ae·.JJo(I"" ...... ,"'Y'l;
·"fIft."....
...-'''';
UJ'''' ~ cc·.Iy( ... )!

-...
00 • M .... , ' .......... I:nyI):

~, •• lPtYI(nyO ..... .n-p-nulIT.'"


..P('·~_l'

---
"., ...... , .... ).~
RM"IL....__ Of""IrQ.l)~. ·)-

P(' :-""" '!JOYOI'88;


1.IJY(U..Iau'I1...~ _ _ _)I100)"'Z: ptou·'....,....... El:
I:nyO) .

JllUI' '1_..._lXtOr""II(I.2Irz: .. 1ot101gUiOl .. _ _ ' ' ' _ ·• . . . - _.......... [~.. ~')..,.·,

~":
.~ --.,.,.{..,. -~
CIIanII_"'*lpeJe(nyO.nys):
••
_.,.
1'<11 ....<0:
n·, ........

--------
""-"'""(~-:

-.. _. _-_.-
.. """'os.,·__ ..... ""' ..... "' ... .-.. ..... _
~own(oum(~~l) •

10"' . ... _
,...-.......
...·-:Ul ........

-••--_....
~~

- ': "'·I~·~.1'\'Sl.
!It •• "I'fIf'<II.._
,: ... CI!>oOt"<" ...........

-
• "Q.Z»O C1.~ ..,..):

--
0(1.1)0 1'_..._'odot"lt(j.2}·""'>OIn'cu.._ .... 1- l ....·O
1uyy(l.-.- " . I ) ' - - ) l l 0 0 ) " 'l. 1;I(' ...... . '!ftSSJ-U:

.~.

I
0(1. ....

...
.... ,.r!G.ll-'
"...
~ r!G.')'"
~_ ...

--
_roc<orll(Ll)rz:

... ~?
-......-
crc.....·,:nos.., ....)<C:
crc_··" .........·, """)oOO;

1'1.1O(, .....j. AA"yO('"",), D*yO( ...·' -"YOl:


GI • 11('''''':Il10>.
.. ·.NIT ..: CC*yO(' :....) • DO*ys(tw."OIyO):
r.......",_...._, ... cw;
•M .... '" 9_011 S.., ...
r.......I'1I_."_t ... cw; us( I:... )· ~~

•• 10",. U5{nSS" '''''').'':


,,-'nO.,)<.o ...-
........ ,..., or 0t0MM0 .... Ye<.I .. .. , "'....... _ _ ,
-..,,-
~.j "llClOf\"l:

--_.,: ,

--
. .. 1<AI.,.t.O.O.tl~"T!II

-,-
_.,.
-~,
r_I<Hli( _: _

" 'COod>.
W!-'nr> _ _ •• , ............. K .............. 'Y" ...... _ _

-......".
_ 1("'<1" _ ~ROfI _ Mo" So .... So ... EQUa6onr, .. s, .... , .. "',. .. ~ ..... "(;r·.»«;'..... -o·. III
CMCII<l .... -er· 11:

. _,-- --:
CUoQ"y;

yO
. .........
.H<OO(nya.'J............ _

.....--.." ~ ):
----
11 •• 00000 ..... J: .. _ ' " " " " " " _ /oil'
""'"~~
-"I~.IIyO).I('C1)'Mt·N·

-......---...,_.........
"","n'IU(MOJoP);
...........
~.MO) ;
.. _

..
.. """_

"""'01_ ....._
0:

- -
"" "';NI
..........
OfotrlG)l-lO(iIt1)):
"'
r>' AI'yo' 81·"" '1('(wJ-CI'yo);

~
lot )01,.,..
"

. _""
--
.~.'J

-
~ . ,,;
~rorm)-tI)t: ~,l)ol :
~ . J~ .5);
, ... oe('+nys)
Inok: ........ ""'CI""'._~_ • ,..(D>r7OrQI.1}

r· 10: ....
......... .. bat>. ,~""son" .....""

.... 10"....
1I(1)'I(If(I))!
_ ..'n'
---- JS6)"JI'(W(D.I},
~.2)02:
)'ImI\IogOy(/),~.e):

)'h!\og()rGI.l)oO:
~OYII).Sl'"-" :
.. hVO "'"

---
.. F ..... joO ......

--.......
tlf lol:tty

"-
' (YY(UI-'lI , ."..

~
....f\'l'C'rQ).J)o"
/', :.....

"'_ ...,.
1010';

--
..". o<a. «()'t(J)-JOOnI)))""YO>_"'_""'O/)"~ (I.t:

~M1O)!
lotio .... -_.,:
........ ,.
lnQy(IJ.))&·'
...~.''''"

c-s
Appendix C Matlab Extended Kalman Filter Algorithm

-......._"'-,..
• rI'I1I9 .' I""
M2_ M2 ' 1~»""'."'>ct.,.y1'Oo.e: ~I :
..... ""'101_·.·
-.. .. pIOI(Ip(1.1'g, pt:I.'" .s.>c1.l'om>~~ "f .1p( ~ J'0lP(.1 ."". _
: · P(:I.I'I>O P(:).Y.tp(1 J'0?~1.·".1p(1.1"OP{. I:"'. _ .
' 1'1:1.1" 'pt.I:r:' .'IIt).!', 2P(~ "9:' .1p('1J" lpt:l."··.·
tp(~J',·pu.y.'Pt).!',g>i:~ ·o:'):
: ~o' ·.1'cr."0»·."I>O·:f05·:f'0".""·." 2':FIl ·."I"."Ul •
-ao_CtD;
ID< i-.;ftI
' .......
'11(1..).0' ... - . . " , _.... , . _
1Igon(4):
"""(t"O._'P{ . ~ "'. Ip(:IpPK2P(~."9·.s.>c1.dP'W'(:).1I1:

--_
50;"': IogenOo("OPK'·. 'lIPKr :<1PK<1:
~_ 0 ~do<1Y' 00I'1......'acI..,..2IIliU): .. ". ...... ",. . _ ag tp(\pO>l)OU):
"''''''"",,"II!..-'. IIgo.><O<Sl:
W"II.''''''
.. .. ___ _ ..... (Ip{;IAPCIII) ' pt·).....IPt~).y.1l>t~)pt :).....
~1.oII'<;W4I'(:). y .1I>t1.~").~·Jp(:)..-cV1OP( :)....._
tp(:J.IPCV··l'(:).........I1.oPCV' __U."9-1:
M2. M2' t(j)",. "",.f_:t.IR(lA: ~PCW, ·."<IPC\IOJ':oP<:VI\:r.~VO<·:oPCVl»· ."<IPCv'O".·cPCv' '-:apCVI)l:
,. """""n."'.

---
kif , .. ,>do< '" RR O>do{[O _ 0 12D:

"""""'""'-':
" ,-..._ . . -~~ :
"1oe(roO<_-I»
"'-_ ............ ,tn'2.~ ... "' ... -
... 1O ..... r-_ . . """'II,....,""_
.........,. ............ ftgun(7);
....,.,... .. =,........., ... """"'" ..... (lp(:j.Q/1! pc,. 1).'".IP(:).QH2Pt. 11:11'.tp(:).Q/13I'MPi:,1).'01;
IogendfqH 1'. 'qH2'•..,HlH< 1:
..a.ca tp(I!*M)~' &Ob:
19I.n(81:
pIot(\p(:).xo,Pt). "'.IPI' ),x02P(:).Y.IfI(:)~ .""._·
1$I(;I )UlfP (;~ y .1P(1,xCSI'U :c' .Ip(:1Jt 1oPt:l ....... _
IPO ,x 111'( : ~ ·r·.II'O,x IlPt) .... ,1:
IogendfXO l':X07:X or :XC)<·. "l!O~.•"X 10'. ox 1,. :' ''' 31:

.....,
,. ......... PIOlI""')
• _ .. pIoIj>·(\I.I ''''f*II) '.(JOt~O'b;
"""IpIo<".
~ "'NOTE _ ........." .... _ .. _ .......
_N(:)._ _ _....U:t)p(:).____ Oft{ ~"' :

CInI ..... • ~
h"I'(OItoI)oM I. ~.~
h' 2f'(~MZ .
"'lP('*>I}'.' :w.olBOT.
"'5P(1pIOI)"n, ~no$80T :
TllP(ipIOIJ"Tll .
TUP(lpIOI}°TI:/:
T'3I'(iI*II)"Tll.
T101' (~ ·Tl' .
T 1SP("~TlS .
fOl~""O' .
'0_"0:.
fO:lP(\lll<M)·FO):
FI>OP("....... )·'I>O:
FOSP(lpcl)""OS.
F1<lP(~l O:
F lll'OPfOO"1' 11 ,
"_",,1Z.
F13P ~U:

- .
F 'OI'(ipIOIJ",1 4:
F15P(IpbI)"Fl ! :
_,PiII*>I.l'-l :
dP1QP("~:

dPCVO'~l :
OPCW~
OPC~ :
GPCIII)4~III)4 :
GPCW$P("'IlIOIIodPCW5:
apcVl~Vl O:
<!PCV"~V " .
GPCV1~-.lPCV'):
po<pc-.,o·POO:
P'CIP(IpIoQ'Pl O:
PI21'foPl>QoPI2;
PIIIP(IpIoQoP" .
P3OP[....... )·~;
T02P(ipIOIJ'T02:
T().1P(ipIOIJ·TI>O:
Tl.(IpDQoTl t;
T20P(iIIIOO)OT2O;
TlOP~'T3O;
nlP(ipIOIJon, :
Q/11~' :
.,owo~IQ :
qIOKfP(IpIot}oqHlH4 :
XOl ~XO' ;
X~X 02:
XOlP(\pIIoI)oX~ :
"",,~)tOoI :
l<OSI'R*IO"llOS:
X,OP(\IIOOOX.O;

--- ....
Xl "'(lpIoQ'X' 1:
X' '''(ipIOIJ°X'';
-~"".-.

- ---.~-.-.

• _ _ ·_···_TO BE SET BY \JSEf1 BELOY.'-_··

~,~
1*>t(Ip(~.II ll P(:).Y .tp(:).I1121'( : ~ ,(".).111 If't)."..IPt.).lI' 5Pt.). Y);
IogonG('IO 11,...11' 2P'.
_QG tp(\!IID<) DU):
"1]p'.'" 3P'):

igO<O(ZJ:
pIOI(Ip{;).TQtF'O:'" -"":l.TO<.I'U:c' -",,:).lI l p( ~:r. _
'Pt),T1 :IJ'(~:"".11'(:). T' 3P(:).'(.!PC).T' OI'(:)..~._
IPI'~T1SPtl :W.lll(;~ T' tI'(:~ "".IP(:l. "nOP(~.",-_
'Pt). ~.""~nlp(:).""');
1ogoftcI(f~ . .,.I)O·..,.' . ·."T 12'•.,.,:r..,., . ·."TIS·:T' ....,.N ."TW.~.");
1>Oo([O~ IS U b:

C-6
Appendix D

Pump-tank and
Training Plant Step Responses
True and mismatched unit step responses, obtai ned usi ng experimental data from the Pump-tank
system (Appendix 0 .1) and the 2-input 1 2-output sub-system of the Training Plant (Appendix
0.2) are provided. These step responses were used for off-line simulati on and real time
appl ications in Chapters 6 and 7 respectively.

Page
D.l Pump-tank step responses D-2
D.2 2-input 1 2-output subsystem of the Training Plant step responses D-3

D-l
Appendix D Pump-tank and Training Plant step responses

Append ix 0.1 Dynamic matrix coefficients of the true and mismatched process models for the
2-input 1 2-output Pump-tank system (M = 10)

True model Mismatched model


Vari ables VI V2 VI V2
Lt -0.186 -0.036 -0.372 -0.036
-0.3 17 -0.059 -0.634 -0.059
-0.416 -0.0 74 -0.832 -0.074
-0.470 -0.081 -0.940 -0.081
-0502 -0.086 -1.004 -0.086
-0.516 -0.088 -1.032 -0.088
-0.523 -0.090 -1.046 -0.090
-0.525 -0.092 -1.050 -0.092
-0526 -0.092 -1.052 -0.092
-0526 -0.092 - 1.052 -0.092
L2 -0.026 0.157 -0.026 0.316
-0.044 0.256 -0.044 0.532
-0.056 0.366 -0.056 0.732
-0.067 0.450 -0.067 0.900
-0.078 0.519 -0.078 1.040
-0.086 0.569 -0.086 1.140
-0.093 0.614 -0.093 1.223
-0.098 0.660 -0.098 1.320
-0.101 0.694 -0.101 1.388
-0.101 0.718 -0.101 1.436

The diagonal responses of the mismatched process model are both twice their correct
magnitudes.

D-2
Appendix D Pump·tank and Training Plant step responses

Appendix 0.2 Dynamic matrix coefficients of the true and mismatched process models for the
2 inputs 12 outputs system from the Plant Simulator (M :::: 5)

Tru e model M ismatched model


Variables CVOl CV03 CVOl CV03
0.131 0.003 0.261 0.003
0.261 0.006 0.523 0.006
Ll 0.392 0.009 0.784 0.009
0.523 0.012 1.046 0.012
0.654 0.015 1.307 0.015
-0.127 -0.073 -0.127 -0.036
-0.254 -0. 145 -0.254 -0.073
L2 -0.382 -0.218 -0.382 -0.109
-0.509 -0.290 -0.509 -0.145
-0.636 -0.363 -0.636 -0.182

The diagona l respon ses of the mismatched process model are, the first one 2 times and the
second Yz of their correct magnitudes.

0-3
Appendix E

Extracts of the Integrating Adaptive Dynamic


Matrix Control Algorithm from the SCADA
System

The Integrat ing Adapt ive Dynamic Matrix Control technique, developed in the present work,
was imp lemented in the existing Linear Dynamic Matrix Control (LDMC) algorithm developed
by Mulholand and Prosser [1997], within a flexible SCADA system at the School of Chemical
Engineering. The contributions, updates and programming expertise of Professor Mulholland
mllst be fu lly acknowledged at this point. This program would never have been comp leted
without his valuable input.

Page

E.! Extracts of DMCObject.h E-2


Original authors: T. Brazier & M Karodia

E.2 Extracts from DMCStream.cpp E-3


Original authors: T. Brazier & M Karodia

E-l
Appendix E Extracts of the inlegrating ADMC Algorithm from the SCADA System

E. ! DMCObject cu ......• fl'lJ'GO<I~,


c ... ut.· mJlClO<l:
............
CMalIt». "'.,JIR ... .

..........
=:~
~

c-.·"'....oKo<I
CMalIt»'",-""",.
c .. _ · ",~ ...

.-
-
drI ~
.. evoaar.
..... CUntO<Proo<.m:
cv...... ~
cV_""""-_O!IiI:
~ ........IIG-.
CJ.IaI/I:I: ....JICl-.
~ . "'JI'-.
c ...... · ~
C""""·m...J>l(adw;

-
cu_''''~

• COMCOIoioa .....
CUatri<'~
~
~.~ ,
......,.,-.
!lOCI. ",-~ftO ...... ;
............ 'IOSItoom,h' !lOO\. ... _tlflla_lPI.
_ "DMCPIoIWnoIN 800l "'-bUM.......,.:
--,~. !lOO\. ..._tlUw...... P\..1uI.
_ _ h'
_~h­ !lOCI. ,"-IIR~
800L "'-DE.oISIoIoo _tot.
IIOOL
800L "'_-_1nl:
"'_ _ _ _ ....
_ ....f(l , . . smootII,., ...
dootllo .....fO ....

--.........
_ ..... CDIgDIoICOIIjOa
_ _ ..... CDMCSIrOO/f\;

..,..pm..........
1/
~
tIer .,•• tIIoo

-",~.
cv.a... "'JIP<o t,
cv-..-nu>f',aol'
CVtd ... ~
C_''''''pTost;
..o..P~
ooOo.~ ,

cv.a... AI;CII"IOIUI"'UOYOINTI':GCORA .
cv...... AC<:urJUo! .......... INT£~ ...,
CDMCI'Io('MocIII\.J'IOIWnd. 1I0OI. ~~G ...
C""""'·m...pDynU_
~.~$oI.
M .... ~ ........
..... lo<seI~ .......
CNoIrt.''''~'''"''
CM_' o"IIJIOIIHIMOI.IIo;
C ",.IIbo· mJOC)po<ll.oopM.trbUlel.
CM""'" mJlOllSOlMOlllo...Sol
a.o_·m~""'1Ia:
CIoI*\I.' m~SuI>M"'"
~'fI\..Pl.o ... ~ __ _

......
M ~.

CJ.aoW.'~~
CV....... "'..PI' ... OuIP"ICI>angn:
"'_"""', ...r ....;
DWOI'IO
ClWORO m_"""".. TlmoMojOl:
II IaSI "1><101'''''' [)MC
" .... _ . _ _ _
.aid S-o'N ..... (CSlrIng UN ..... );
..... COICOMCPot~ .... (WiII):
_ ~at • __
-~~~-
DWORO"'-....T... lII)fI4Ota:~'S _ .......""..0
~_.rr-.u
_lQod)

"_"M"~'" ClII..fOorI • IQ"'J


CSIrIng ",-cSl.I>Iit_FiIo: " Ne """'airWIg "'P to _ _ .. _ .......~(_IARodJ

m .............. Cm_.AB .... 1Aaod.!

---
.......--It .N
W '"
m)Sl .... ,stMoHoIIlon: _ ~SI.pRo~iIt (CStmg~_.."iotl

W \O\.~iIt· <SIopR _ _ _"J


W ~.p _"'Slc~O<oIISIoMySl""""Oftj .
W _~!lnI~ .
_~ ... !lnI~).

11 ~-: ....,..,ling
W

----
IIOOL m_l>I.ogToF"". ~ ...., 10< _"",11.." _h1~(8OOI.I>I.OgT_) :

coo.o.-. ",_OMCS!tOarno:
Cli1rIfIOAmoy ..._........ _ _ " ........ "' _ _..... _. . . . . . . .
_IOU ....... S1toomN_ (COO'>ICS\MGAn'"
-~(-~ . I5OtpOO'Ib);

_ , ...... ·w _C-~.~):
c-~._ ,
_ S l t _ l m..).

COCWto, "'___ . poiIoIotI ........ _


...... ........
sn_._oos._"'. ____
~
COWOI'<IAII"O, m_rs.q,oIru: M
M_ _ M_I p...
O_I r a
_ SOIOUfouI ...... _ _ • (-~,.-~
_PIrI$miImN ....,).
(_C5~ I
:
m
~
CrYN-., ",-"",""", ... t: " __ 00_ _ MIM ..CI\¥IiIU (""" .. CI)W!:wdAtra,I lM..ch _ _l,
C~, m~uop"O_"'''': " _...._ _~(_CClWonlAn-"I~):
"",~",,(-~. ~ :
...
coo.o.-.
~"'_coQuI

m~_
_S~V."",,( _~& ~

COWOI'<IAII"O, "'_.... ~ . _~_.., . _

..,... ~& 1Ad00000/IModfJr.


COWonIAnoy m_~1nI: N _ _ ... _
COWO<d"".Y n'I.}Oo.oIp.,.\LO ..., • •_ ........."'" ...... COWCltllAlTl')'& 1AcI.Pl'MC-.
COW""""'., ....
.- ,
-
"'_~ ig/IIS ... o.rI ... _ .
CDWordAmo, ....
__
__

..
~.
",-_ _ a>En:
' ''''"''OfIb~
_~& ~""-osEnl.
... cn""",~'~_ .

.
_~
~ M ~""~

~ -~.~:

N 10<1_.
CrYN.......,..,
"'-~
"'_~"'cn:
",-1Tlfnt,... _
~ ~-.
NI......... nje<lorypoirOl
: . ........ .... ...... poIiticonoon .... _SItt_.
_ " " " " " , _ " (WiII).

(l000i_
CStmg SlttornG<:lVoI 0<01 _>l:
._IV_~

._.'''1.Il00.,,.,....... ,..........
CL.IM _ _ '",~ .
.....
......UneIlPfcQnmTlotoorl
DWORD _ _ TIoto t>oood).:
__ ~·pTNll

C_ "\JII'I...... (((COMCODjea1PTNo)o>I..irIoarPfognmTlnorl 0: ....... OJ


CV...... ~Fn:
Cv....... "'...POo. .... uao;
Cv.a.... mJ>Pno~

-
~ rruon....,:
!lOCI.
!lOCI.
!lOCI.
N • • 0C>UIIng
m_"""""_........:
"'_"""""_
"'_~ _ ...... . ............. _LP . . . ., . "po.- _ _ !I>nctIont

1nl m.}J'er.or: _ ....... (CAtdWoI 11):


--(~.~.
. _ .... _OOC_IG _ ~.(DWCIItD""""""I:

~ ....JIIIOo<I. ..... SooIEJIKM (8001. 1OE/>MIIo<I):


CMoIrh·........,eol.Io: _~(8001.~ .

CM_·"'~OI...JN'TfO: ..... s.tvsoAcapI: (8OOL IIliHMIpI):


CM_·m..P8aod_..',,, ..... 8otRoouIori> ........,. (8001. lIRoguloltz ....... pO,
CMoItlo· m...p8OI.orI_otIQ: ..., _ _ _...(8OOL tlEl:lSIooo_InIl:
_ iMIfx!SIOs>04'"
a.o_' mJl8Ol...WTfG_otIQ:
(8001.~...,

CVeaor' ..~...o.c~ .
~m...po""
___
_~"'(8OOI.~1OO:): "'~-.....r.

-"
-
CV....... "'..J>Poc.,. MPfoMnI
Cv.a.... "'..Pl....: . ..... OWORtlIModSTlmoT1lUp:l"OIYOOI) C_ ",-"""...B\Ip<Iot.:)
Cv..... • "'...PS"''''; "0..1("".....) . _ (Will) (to! ........bEnoobIo<I.\

,
900L ,"'.. _
Cv ...... "'.;>0><0011:
CV....... "'....PPo<I:
ev..................._otIQ:
C_·~ .
C~·"'...soQ.od'.
CM_·m...soQ.odZ:
-
E-2
Appendix E Extracts of the Integrating ADMC Algorithm from the SCADA System

E.2 DMCStream
It Dr.c&Ito .... _<I>I' : "' _ _ FiIo

._.<m. . .
_

_·~N
•..,ob.~ '

ft.

_ "'DMCOtl'. dX
_~ft·
_ _ _ ft·
-~ . II"

_ . "'DMCSItI ..... ~.

_.".lIItx.h·
_ '\Jno-.ov,om_ft·

--.1"
_~11"
_~ , h'

It.<PLf.. eNT_SEIlw. CCDt.r.C()Iljo;;l,~. '1

,
CIlMCOtIio<I ~~

"'~.NIA.L
0

~_$ot. NIA.L
m..JlOl>ooll._ .. rt<·MJU..
III,.POI!MlMotri): • NUll;
m~ _ _h l . NUlL;
m~s...NUU.;
m~_.NUlL;
"'~$upIJ _ _ ~NIA.L
"'JII..... SqrImM_ • NUlL;
mJII.-.T~IDMOI". MJU..

. .,-_T. . .
"'JIP..IOuIpulCh'nQlO.
_U
"'_~r-.Jpd
c:;..r...e - o.
... . G.fTI._e-O.
NUll;

trDIoOC_lGa<lopl
mj>8CIa<l. NUU.;
......,eou.I - NIA.L
"'~IHTEG . NUU...
"'..JI8Ood_ooIg. NUt.I.,
"'.JI8OI.acI_ooIg. NUL~ .
mJllOL_INT£C_q. NUL~ ;

...,...oa.
",-,,"oa • NVU. ;
NUll. :
"'J'I.ooa. NUU. ;
m...pSPooa • NUll. ;
~·NUll .
"'.JIIIId • NULl. ,

,,
"'-"PI'I_orIg . NUl~ ;
"'JlGoa· NUll. .
"'~I.NUU. :
~.NUll. ;
no...,pGlCIl - NUll. .
","'pooa • NUll. :
"'--"".cl. NUll :
mJlKad • NUI.~ ,
"U'><So14oa • NULL ,
....,.,.. . NUll. .
",-",Id. NU..I. .
,
• (" '1l$IoMg

...~no..rr-_
ell

m......1d _ NUU. ; .. ~~ mjSt.oor-....rI..n:


~ · NUU ; .... ~m.._
m..Jlll'l'too_ooIg. NUll. ; "~~"'_~on:
m...pOOCIw _ NULL ; .. ~~ ..... bl.ogTaI' ..:
m"'po_-NUU. : .. ~. ",. tSo'pA:'oponooI'iIo;
~ _ NUU. ; .... ",_IQ".
~-NUU..

"'nu>I'-.
. . . _.NUU..
"'JI8Idw . NUll. :
NULL:
...~"'--­
...~"'-!AII"'"
...~"'_W>o:AIlII!II ;
.... m..M f9UI'I<\z....,.pt:
..
~

"I,.JII'r.-.CMpuI • NUlL;
.. ~~m..~_IrO.
_ _ _"'".
..
~c"'

"'--""'~.tM.I.:
"'~~.NIA.L ~."'_~-....WII.

,
-....
...........-.NIA.L . . <C ....~
m..J>T. . . NUU. :
. - . -.... Mo.o'NTf.GCORII · NUU..
............. ' .. _'WfOCORflId· NVI.L:
m..~ .. INTEGId. F"'-" . "_M)o!OOIOOZTO_I<I~~
, or
n
m..fT1me _
~$l"'omo .. ··mfl~OII;
~
.... "'~ .... I.. Ie ....
m.._r.... ·_TIdo.c- o· orn"'_,"-ogT_ .
m_~p1. Geo.Tt:Ii;COun( 0 ; .... m..oSlofII'I_ .. r ;(o;
..... m..IQ.o:
• _ OMC Itnall loop ..... "'_Io\8ad.
"'.~-.~~
"'_IIU'Tln-..rrinQ ·
"'.~
~.o.t.SE..
_ _ .F...u.I!.
"'_tSoOf>Rospons.oIIiIo' _T('"'): H"*'_ .. oIcI..c fIOI MI rot
. . ... .
or " " L _
.... "L~opt;
_IoR~_

or" .._t>Eol$Iopo .....


~MocIo1I).oIo 0: .. » m..t>A.CCMOYI~ ;

, .....
• _ _
.. n"'........... __"'"
~
b
r
~
D
M
C
·
1
G
* TltUf:
m tIIt......oa " _. _ _ _ _
"·~.FAI.Se:
for~

~I!I.IMA<I"", . F",-": m........... SIte_~(ot) ,


..... tIUIO.l4 .......... '",-Sf; m..-,....-.... (0f1;
m_DR .... orlz.A.d.p1· ~AUlE: ....."np<.O"""".So<tllllo (Of1,
m..1>l.od_.J" _ll'lue. .....",~
_ . -.(.., ;
_ _ . (oII.
....._OS.Jol. TItUf,
~
.....~1>ock..1rO. • Tm.IE, m..~kfIMH(ot);
~·o. z;
.....IQ.o ••.o:
m..t.O.8-od.l .0.
" O~_"""-_
It dhogor>olva .... .... OIf... ..-............,.
_...
m..~-~:
_ _ "' _ _ '(or).
~--("",

"'_IQI.O~-.("' ;
",-fTlono~"""' , _. Cor).
~. _.(ot);
~. _.(ot);

,~c....... . _.COf1 '


m..fr.moF ... _ ........... {..,.

E-3
Appendix E Extracts of the Integrating ADMC Algorilhm from Ihe SCADA Svslem

,
-COMCOOjed-~ . ~

c~:~_ (j>ScoodDoc): ,,"'_----..0:


cOicoMc:P ........... O:

' <nIl.a.... _ _ 0I..c ...........,..


"'JIItIPuISW....klSiI. ""-~_ ......G«SOI.. o. 10)• ..... ~""(ioI~""l
"'~DMC ............ SeI_ ""~caIIop.OlhnI_ , GelS!H 0.'0); I
'''''.~OII!.iOpIftM~
,o"""" ......... c...-g _ _ 100011"-1
M MI ..........

,'Of
"" (\roll · 0: I' ....._ _ _ ,(;eISiI. 0.10 0) I
",~ .... ~­

,,
e.ouer>............ 0:
, (IrO: j . O. j .

C~"'
~_OocOqocWray , Gel5O"

· "'O""""'·(CIOStto_,.,.~"\..~1iil.
o.joo)
·(pIO __ _ _ _ O_ ...... _ _
• ...- .... 0«_

~
,,
.....JIInpuI$IAomo(II. ~ ..... COUCOIIjoct::S'O .....SlnI_ (_ CS/MgAmy& _S1rO"""'oonn)
I
~"",,,,,,,'o"'W_"_"""_
• .......-IO_ ...........____ nut'- _ _ ,• ""-"""""'$/n!_~ 0 •• caIftpuIStro_ _ GelSi. . 0)

,
1ot,.O., ........JIInPooO _ _ O: Io -) 8001. _ _ • TRUE.
ID< CW 1• 0; I < m.coI_SWomNomu.Geli!otU 0: 10 . )
.(m.... I..... S' ......,....... >(i)1o UI _ _ _ $/;D

.-. . . . . .__
r(Jn..I>Ii:""DiM)
«(COOSIro_,.,.-"''''''''SIfO ....... ,.·Conr>o« ""__ ). DIOI-nII<oI • FAl$L

CSIIIng a l _ ..... "'"" ..... m._Strr--.r'~ ..... ""-<. ... (_ job i I _ )

___
0 •• • 0

-, .. .......:
. NotdIIotOUC .......
101r", _ .··,;
0: I ..
(1nl j . m~ .......IlOcOtIjocIAn'.,.Gels;.,.
.CC(C·r.......... "")no..p'k:_-...~O·- ..
~
0: joo)
T_ . ~_cl ~.

• f _ . NI mJlOUCCXlioa in OMC .". ..... 01""""'" .......


1(11_.1.·1)
,
I ( m . U I _ I h n I _.GelSIl. 0 I- ..1<1pI.<&1rUmN_.GeISiz. 0)

m.DR • .wu.a • TIIUf. "otet ~ _ 01 ...... """" 0r.IC • IG


C~_o:

-,
"'.oueSlre....... I· ...~>m.~· I
, ((:OUCSlre_"".OI.IClIWomofil)-> SeIOMCOt;e<:I (1I'Iio. .: 'Of (1nl I • 0: I ~ m..... _S1rO ......G..Siz. 0: 10 . )
I. _ " " " ' .. InpH _ _ . . . I)M(; .........
'(m_~
m_DMCSft""""l· _ COMeSln!'" (Wo . ....T""'II . ~ . C(CIO$Ito_""JllnpulSI1eImo./'... ·~ (m_~:
,
"W_
~ ......~..,~~0Mcstt0"",",;jJ:
11 """ OM(:
101_.··' .
we... III (:ScOOIOoc .............. , _ 40101. we.,.

, « (couesu ._ ,....O/.OCSItoo"",*,..~ tm.IILogToI''"l. .... (lltJ·O:I·~


1(m~~-·
_ ··t
__ ~.,· GelSlHO . jo·1
..JII.ICStto~D

•mJlC)oA""'su.
,..sI,. OUIput ......
poirIIot ....,
SoISiz. ""-_"",5<.. _ _ .0..050,, O. "j.
AS!I£RTIiI_. I.· ' ): U_" ••• _.
"'~~. R_(II/ICIOt);
. ... poirII ... IO_"", _ ..... c-. _ _ 109tl1MftI)
coOu1""' _ _. ...s;.,.O. loo)
, _ (C0I0ICSW.... '")m..DIoICSn.....

, Iot ~ . 0." ....


• toll',III,... ........ pOItuo- ..... DU(; _ _ """1'1

, I", rOIl J • O. j .. ~Ooe-.m..OocOIIjoa.ltt.' , G.Is;.,. 0: joo)


C>OSIt._.~.(OOSO<Nm",,~~
"'..J>Irop\IIISU
.....__ ......._
SelSIu_(osIt\p,It_ .~SIz. O. 11)):

....oue.... _.S01SlH'_SM_ _ .o.tSito O. 10).


.~GoMSu O"O).

~ (JIIO_~""" 0 .........o..q..o _ _""'*"I1J)

,,
--
mJIOu1pu1S1n!"""~ • pIO$ltt_: II~"""'-
.'" Q_ 0: 1c coI""",&uoomN_.(;oISi.t. 0 : 10 ' )
.........,...stro~t·_---..[It

.~
."".~
........ ..... . ............ ,.. ...... ""' ..... (1IOirog ....... .....,IO'l"' "*"I
"" ~ • 0; I • m. csln,...BtroomNom",Gtls;.,. 0: 10 . )
r.. ~. o: !< "'.)IOo.O .... su._G .. SO .. 0. loo) I
C(CIOSInI ... ')mJ0uq>u4_"""'~ (m.tsN""""I: .... (lit J - 0:1' ....;SeocIDoc>-...OocOtjocVotroy~. 0:" 0'
I
CIOiSItt.... • plO ........ (C1OStt"O .... ~~rtIJ ,
• IPOlllro..,..,.Go\N ..... 0·· " ' - _ " " ' _......1/;0

,,
mJl'll"'."SIfOW1IS(\I· pIOSWom;
_ctIMCOOjo<t __
,
aN ..... )

-
~
• . . . - lot <NIogt , _to
Io<~.
0: 1<
_Ill,... .to......... ""'". OMC "'.....,
"'...P'fIpu! ..........·_.O:I-·j

....
.(tsN ..... ··"'_.......... )
m~ I
((CIO$W .... ,."......,....S1rO""",,~ tm...........).
CSIfoOIQ aT_· 11'1.._...... . . . ' • "'. ........ _""""-1/;.
,".0MCSIf0""",,1 • _ COIoIC$ltt_ (IHo. ""Tomp);

,,
.....,-.......~.AIIII/III..tNCSIIU....r41:

..... (:O"/Xll'iocUloIL"OgIIIg \BOOI. ~TaI''''J


I
1OWIr'II""._
.., . . . _0I_ . . ___
11 ... 01 .... DMC ""' ......
!or (1nl 1• 0, I < m..OMC&IToom'.o..oSi.. 0 : 10')
(COM(:$II .....1O\.DMC $1rt"0Ift0(0D-> s.rt..ovoInII (toL/'IIl"-.,):
-.e
• cNr.gt _ . '" cue ......... m_IILogT_ · tolOeT_:
, lOt (1nl' . 0: 1< .....OMCS't....... QooSll. 0 : loo)

,
CS"'"" "'TomjI·...-.- · ··· · .....~$II._a"MS/4.
(COO'OCSU'om~omo(iI)->s.tN""'" (""Tome». I
.......v_
_~SelSo\IIOIIIIO(coftoI ~& ~

...~ . Se\S!u (ISoo!poiI"IIo,O .. Si.. O. '0):


U ...
' _ININ<I ...

, C~ ,$eIN"'" (t>N .....): lOt (\roll- 0; I < ISc!i>oints _ . O. loo)


"'.J$01IIoIIItI(i. ~

_C~S1.O<IySO_... (InII$I • ..,rSI.. _ )


I ....., COMCOlllo<l;,SeI'"",,-, C"""" COWOod.O.I<Oy& ~
I (m. l$ludyS'OI--'I. _..,'S........... onj I
I '" _~_

",-"", _

CoIcOMCP_
. _OIIySUUHoo\lOOO:
_ TRUE.; . ' .... _ _

... 0:
oI_OMC·1Q ... .-.
. ~-
..._ _ _ SoISII.~ ._Si<.O . '0);
IOtCW I. 0: I . "~ .G.'SI.. 0:100)

, I m~il . MpuIMiNIiJ:

_~.\W~ ..., COIlolCOClj.<l;:SotInp.<MaIq; (CONI ~ & 1InpuIM0Q)


I I
I (m. jN-"::_oIMow. !. _ ) . Mlob.

E-4
Appendix E Extracts of the Integrating ADMC Algorithm from the SCADA System

m_._....
,...~-
(W,. 0.
s.lSIH _ .c;.t..... o. '01. .~ -
"'_~ . s.Sit. (IM~ CO'Os.... I). '01.
I • 11np.(Lla><t..Ge131<' 0; .. .)
"'_ftn .... M ~~. """",MauI'1-
' >e!V_
I ' I • ""..c"""VH-GoISII. 0; " ' )
, .. (H 0;
",~o~'~
_~ _ _l
..... COMCOCroo<I ~ _~ ...... t_~..
, , COMCODjoQ :: ~1>otMiM

..
..... I...... COWonlAtJoyJ. ro-..o:"",,,,,,,)

11 ........
m_-~

.~-
_s.tSlu
lOt (1nl I • 0: ,. _ s . . w - _.GoISi •• 0; ,..)
(IUow~"' .... GoISII. o. ' 01; ... . v_
• .... Iil.
"'~-'~GelSlno. 10);

10< (W I • 0: I • to\.IIlI<AAoIIno.GoIso.. 0: " 0)


m.._S_~.. I"""''''['l·_S_'_''''''[I\; m_fOuI .... """'I;)·~i~
. _cue ..........
,
CM:OMtp...-. . o.
,
_COMCOIIjo<1::~~~y'ro..o~)

..... COMCOo!c<l.:$o1OUC~{

,
-~,~.
-~,~.
const I;DW_,'

_CONoodMa ,,~~
~
.....-.
, ... Il..
",_~ .... _.~.GoISi..

...""' •• 0:'. ~G.t$It.


m_fOuIpUII.tau(I[ • fOuIpUl.Io;u('l.
0''' ' )
o. ' CI);

/I .......
",-fOuI~ . S.$it' ~GotSinI). ' 01:
~.SoISin~.LIoodEn"GoO~o..O) .
",-tMa~....SIl.. ~...... uLft,GoISilo 10); o.
,
CSCrIof COMCOI:ojoQ..$InoamGolVoI (W iIIII:IQ)
CSlnngClT"",,:
mJM.".......C .......MtSll.. (I""'PM\Co.orvo.GoIS ... o.• 00): aTomp . ~_ ("%1 ,011". d/m.fSOIpoIrUjilrodo.<)J).
, .... v ......
10< (1nl I 0 0.1. """~ .GocSiH 0: ... )
"'.IOo~"\IOio'ItS Flo 100.......•........ N:
,....... caTomp.:

t.. 0 • 0; I. u..o'''''''''''''''Err.GoISloo 0 : ... )


m.u..o,fIl'W.Mod!'" [I] • IM'~ ~
,....·O :I. ~ ..E....GoOSinO: .. ·1
m_~uEn~· u..oopl'MM'uEn(O\.
w_ . old . _.... mOlrloo.
tor ~ . 0; I. u..o~eur. •. G"SiI.. 0; ,..) Itm~_·~
"'~C_fl·~~~ .tm~SOQ_~SoI.
.~-~
'/m~_'~
.(""""O"O ... _ _ _ $OI)d_m~ _ _Sot.

,._IIl.
..... C~ .. SoI~ ....... t"'"""~ .... _OCI....,
....
'{m~"')_m~1I4l:
~-~
.~$upI.UIIOQ-~~
1(m..Pl'''~~_m....ol'''~
. ~"'OMoIII>Jd""''',.pI._T~IOMOIIIo;
.....IT.... ~OCI.... $OI.SI. . (fTlmoI' .... OB.GOISi.. o. 10):
,,,.IT_ _ s..SIz. (fTlmoI'OCI ....GoISiu o. '01. ••___
......."".....,....,
cue-. .. ""'OMC_
_ _.. ~ .
'Io<(WI.
M_O.I.lT.............Go<SIz. 0:" ' )
m_lT_OCI ... (l[._....... ~t.
_"""""~m.~_ . GotSIHO. II N8'J!
1NumOuI..........ooOwo"...su._
,~-
....... IO~
co.oSl.t. 0; 11 N8III ....... ttOm

CPIr......,
1 1 _ .....'''' ..... - -
StOl>R~""
$IO!'f1:. opI.O ......... , .... s .. {mJSI.ocIySIOI.HOoI.otIj;

• _.,. """ _ _ _ tnalIIca

""""'---
/lcnodo .......- . .
..... C.OJ,IC.Otojec:Ll.oIO..<.IMsn _ ~ I;~' 1o<~1~0:1'm.._odySI"_" · ')

, SI."".SIIM...........1IotAI (I. ..... c....- (IN ........... ~) .

/I ""'"panl._l.....,<ft~ft ... _ ._~_no

,
• (m._""'SItO_.Go<Si.. 0 o. coOo.o.puISItO_ Gel"'. <» 'Cm..o;$OfII!"-,MfIlo- .Tnl
....._ _ · _'r_.OIp").
1I0OI.. _ _ • TftUE.
10< (1011 • 0: I • m.._ .... '''._GoOSIz. 0: ,..)
...,-,.~opR.~.Im_cIIlOflR_ .. 'iIo):
..
R.E· St.""."-,,,,~ c r."..,(m_o$I.pII.""",_, .""

.- -,......_ .fllT_·
• (m.CIOulputS" ..mNomoS(q I' tsOul"...Stto~omos(;D
_·~Al.se.
• ..... SI ... _ ......
rw (W 1fIpoI. 1: IfIpoI co ~ _ •• )
n no~l . •• (..... )Ob"_J 10< r'"
I'I'Imo 0 0: rr.....
,".lSI.OdySI"_ Ir.'>e") • MMlI900lI .. Od

~~ . lOt (loll '


1OuO"... • ' . IOUOI"'I •• 1NurnO<.<pb; 1OuO.... ·)

• • _OIOUlI"'I ........ _ _. _ _ J.{rll~")SIopR~D,.,.....,ro"oP4 ·


_($!.,.R--"". _.pl'TompJ:
,
I {m_tsOul"...SttoarnN.........O.,S1.. 0" ..a...,oo..JSItO...".......... GoOSil. 01 )

d_" "' .
",-""._cTII:Ul.; . , .... ~._ , .. _",,,,,_cue·1Q
,CooI<OUC~_onO :

"--
• _ _" ......... oI . . . . "'.............. _ .... _ .......... 021:AO
'(I'IL_ _ outputs
-~.
lot (Iollo 0; t. "'JOuI.... SOto ......OeIstr. 0: ... )
((CIOS1t'o""'~~1lioConroecl tm..caN_; ,
Iaf 0 0 0; , . mJSl.-,....-"'" ... )

• rnIz ....... _
.od pain..- OI'ItyS
..... ,_ . ( _ ... SItO_ _ .GoISi.. 0, '0).
, • (<I(m.fT1mof"OCIonjlJl. 2.. 50)

...,.,.,--
~"...SItO

"'-_"'_~$oISIz. faOoI:puO _ _ • O. 101;

10< ~ I ~ 0: t • _IIUIS",_ ..... o.OoIS1 .. (); ",)


",.coOoJIpuISWomNoma('l • coouc,:..oSltO-.....o(I~

'I.._""""'10_"""" t-... ........ _ .. OOI


,
11lOIII}

..,
,0I ......coCIo.q>o\SItoomN_.GoI"'. 0 : ...)
0;

,
1..- (1nl I' 0. J • m..J"SeodOoc-'""I..~.Go<SIz. 0: "'J

.-~-­
'~_O·· ...
CIOSIro ..... pIO$IlH'rr 0 (C1O$Itum~1YIl
.... ~ mm. 1; mm. c .......... OdySIOIoHor'It ..;Ir......)

._. -
0
tsOuloodUeamN""o(llJ

,,
r(d{m.~OCI<M'I(m"nO--III> 2.50) '10. _ ........ .,10 ... ono
m..pOu1"...Slnr""'"fil 0 pIOSI" .... ;
...
,
:

'(m.I>I!""_
'''Q .
................
0: 1. ~S1IOWI\I , OOISil. (); ... )
((CIOSItO...~(Ift._ ~
Iot"'ko l ; ~ "

InilSlepR_ · IT"..... ~
~_o_~_ .

,
1~.00)
m.._~··l

11 got ..... _ _ OM ....... m.J$l.ocIyS ...........on


: /I ""OIO ...JSto~ ... -I· ..,...
"'- _..".._ . ):
,
..., CDMCOojoeI::IkIMO>.'CI\oncIOI {oonSI CDWOfIIAn." lMoxCo_..j u"", ... p .. """, .. mtlIt.
CMoI/trr. $iO$>A_" • (CMoIrt&")$.pR_~rSI.pR_) :

E-5
Appendi x E Extracts o f the Integrating ADMC Algorithm from the SCA DA Svstcm

, ..... ,.,1_·--.
1of(W llhpuI . I . """,<·IN_""",,, .."", ..)
,'ld(mjT"_..."""T_IP>le-)Oj
10' ;
.~ ...........

, """')OII:IIU1 ·l ;jCIo.Cp.II .· ~;jOotllU1 '· )


,
"" .... _. 1. _ ,om.lSl.ao!yStOI_: t •• )

_""i.'
.... jo 1\")"iM.o"nOLoIlU1I' jCMfI<.(
1I .....
",,~. ("5ltpRftIIWIl(~~
II~
.. ISto""
_ .." _
• (m..-SI ....,SI.·_.... k ).11 ...... .. 0
CU-. SltpROOfIIoIaI • ~opR.-.,roSloofl.1O\.
",,~SoqIIJil·I"SltI>!'I............-1/OWIPoIOI: ""1""
, .......;..... -.--..... .......)
,... ,
, ...... jOu1lN1 • I. jOYO"", •• INo.mOUp<.to;

It stt ...... Jerll


tout"", •• )

,""1""_.,......... _ ........) 101Il0(l.1)_ . ........


IoIJo{l< .,~.~
("m..pOII..... """'X"DJ • ("SlopflespMol)l ........ JjOutp,oI).

("m...s>Ql'lMlM .......s.t)/iDl • ("5l.""~JjOu!I><II1 ;

,
.~ --
,11....
,IOtO.,.' •. ..:I..)
Fio· " ' " " (""IH\o\..GOf" ......,.
_.""'. · ~I_ 1I ......... lolinOmotn:<

,
IOt(lnl)· l .j.·.........a...p<.to · .....- . J o · I
,•••
.... ~.t.rTOno"""'-ISI...,,_IT..... )

'''._-0
.a!o-.ou.p.u·",.~
' pMI{I'Ie. '"U.:II '.~' ,
l(o$(mjT""""''''on(IllrNoIP > lo--$OJ

•• 10 ' ;

,, ''''''*{I'... ''W.lIIII·.I....~'IIoII·
,
t ...... _ · . ; ........ ~ ......··)

101_ · .. ,1 ·_ · ........

_-_
tpMOl (F". "",. ""~I.I~.-.J'
G (m.rouo~iIfoP<o<· t D • CI(m.~",on{ITlmo-ID .
'_(I''',.
,,
'pMI (F". "",.

.,
11 ........ _ . - · ···

........ _-"""'" .......


m.POPonl..oopM........... c .... 1II< (_,."", •• mjOsolimou1 _ _ •
~ • oTI..JSI.... 'SI .. _

...~s.t ...... CM_~· ......


matn.._.' IIIJ$IOO<!y$l,,-onI;
• _ _ _INumOu\pIU
..).
.. · .'_~
IOIAO ••,.......... . . . -_--...---_.. ... ~.~) .
.........
m..,PMo¥t_otob. _CM . ..i,,~~. ' 1No.mOU-.

rotG' I ;I • • "'................o+IoigN 0:+0 .• )


'''CWJ · 1.1 ""'..,PM...S ... ' M......_O:"'·I
('I"!"u>MovIS","",-)r;x,l ' 0,0,
""'
c .. _ · S'opR. """"l...,NT"G·
(e"_')SIopfIl"""OI.o\tI'rtI"'.J$IoacrySl ........... on . 11 lOt •• t ; I <0 iNwrIOuIp,oIs: 10.)
e.u_' Slopfl. _ _ ~G.
,
... (lnlmno · o:rr..... <~IT...... ,

.,,
~,SIejII\~.~.2~
~ Slopfll>IIMIIOdaI?flEG • rlI1t11f1~5llffi"EG).
..
r~·""" Sect..oSllNTEGJ;
,.. (JTmo. t ; I11rno • • m....1$I.0dySt01OHoriJ ..; rr....... j
~t<l!/n.IT_~ID· lo--$OJ . ~. _ ....
,
W_" . , .IT..... ·~;
("m...f!Mo-.S~poI.IO\II>;)(IncIur-1

.CN_ ..... __ ........


no,..ot..... _ . __
• !I(m.,..~ ... O<S[~ID •

, ..
c.t.IOIno~.~

"'.~ ' 11'<kmInpols)!

,
lot .... _ •
1nl i51.~.
t. ~om....iS1I....,SlI1_"", _")
I11rno • ""-.JSl.IIIyS1.. _ _ • r. ... _ ~ M0
... l$I~flPINT£G • ISNP'!-.:
W
......,._M_
..."rt"" . .... (I$Ii'PRotSP. noJSI.~-· Il!

,
CM...,.. SIos>R."""ot • (CM_'SI.pII...... ~iS!.I>R."'I.
ro<(HlIr>puo ol .NOPY! '·~ ;lItoQoA ·· ) "'.sol-rrill)M_ ....... c~(o/'IIornOI.<""'"
......-.c-;
· ... ~ •.

, ,Iot.· ,"<· . . . _·--.......: ..


1NIornOoolpoU '
, ....... jOo.Op.t. I ;~. · ~ jOutp,o.. j ·j

1I",_fofll
Inlta(l- t)'lNumlnp<.to·
..... (k-I)~· jOo.Op.t:
n.1IIoC: ,• a'
fofr... J·,.I··~ · ~.I'·)
0
, . . . . . . 101 _ _ _

..
("II>~~.O _ O
• (jSlooRllOINTEC '.lSI.pII_
_ ·CH"~··OI

r~·I"SI~~ ("I"II,.Pt.-rtllDl.Ol!b'Ioo;)('1Iil·1.0;

-
~ .......s.tXiIiII.

,
C·Sloplleopol.l MJli '.I'UOIjOuIP'AJ;
, , rm..,pI.-rrilO" 0IJI>:)('1Cil·0.0.

,
., . _ ,.. ~OI.lC·IG----- ..- · -..

.......,sc-.SoIOMC"'I...._cm~ ;

,.r.m.,_... "
/J Onf)' UpI... tho ~19OfIII' 01 0 001, _ . e... _ ROd ._
• TransI ... a ... ...- ~r.lno '''' tho _ po£ilIono

,
..... (101 . . . . - -; 10·)

r......,alClJlWl" o$(m. IMOpIVI''-''''' D;


r......,aOdw)fitil° CI(m.~'D ;
,
....__ ......
fof (1nl Jot; /<oWurnO\ItfM.U; ).. )

,1...... 1».00; ......... . w. ••) . ...... & 1IoIoy<MI_

~o_c-... r_ · ......~on.
.......1SI.. ... ySI .. _
.,
._---
~ . ., ;

..
....,9Q!IHlMOIIIII.Sei ...... CMII/U (i/'M\IIII:oW • m~ ....
~ . ..._ _ oGySI"_Oft),

IOf(JTmo. I. mm. .. m....ISI.OO3ySl .. _ ...;IT...... )

E-6
Appendix E Extracts o f the Integrating ADMC Algorithm from the SCADA System

....,.... · "*"'e.......
~..-.....~ --~ .... ....
_""","",,,,- ' ~"".1S1.~-.ootI :
"""O... ·Mw~
~ . _....,.·"""'O"_ . .. IS'McIy$l_ . ... ,
_n_ . lN.....".I:U!.·~put.·"'-1!S,.ocIyS! ... H<wIzon).
m..pM.. _ _ CUotrIIo

, -..............-~'Ift..JSIoody-
-.......~'irM1Ou1puts
.................IS1.~ .

,
111<(1-1.1-<-..-0. .. . )
....-. _
"'.)'PaCIw.0II0 • _
CVed .. (lNumlnpulo • Z·;NumQu!p,U"lNum.In!>u101:
CV_ (IHumtnpo.U • 2""iNwnOu1p1.U _ _ •
......
,
-
~· elbltbc~~.
_ _ Cl.t*W ............... ~~

~
~
~
_
.
,"Only do I """,pill, R... t<t nil ..... c6oIInuo!ion
............-·Mw~(IHum ......... ·:- ~ · _ _

"'JII1_ · ...... c.. _ _


___ ·2 ~..........au1~ :

· ~"""""'O"_ .
p,ots.

-. ~~:
. 11... .u..IOt pIOOWog ........ od_~_ "'JIIodw . _~-..u . ~~
~~~ :
~s.wue_~Ij:
m..J>Sco<lDoo->-htDMC_
"'...PO_. _C_
--"~~J.
("'--"2~'INurr!Ou1p,ots.

m-"","""",._C"1NIo"n1"""'.·l'iHtrnI"""'.~ :
~OI:
__
m...PSU<l~s.tDUC$I.ocIyS"'-", {JrI)SI''''''''''_''J:
. ~~

--.~~:
• . . - - poosI 0I.tp01 " ' - " ......... tfOJF_·_~~ ·
'{Jr\JIP'~_"-""'~' 1NomOII:_~"m.JIM'~"" _"""' •. n-..... _ _ _):
",--""... ~ • • MwCVoctof~. • ....._ocIyS!lI-"on):
'~. I1Ou1p,01C11 __ ..a)G_' ~p....",.poIC"",_,
m.)lOoul:lltPoO/OUtpulCl\ollgul<l • Mw C _ ~_ .
mJatu<ly$l"-,,,,):
, I.' ••
"'0·
,
~ . m.)S<ooclySUj_ ... I+ ' )

("mJIP ... Ou1putC.....X~. 0.0.


rm...,oo.DIIPOI1Ou1putC" ItIQI'"""l1'l • 0 0: u .......... 1110<>. _....,.. io ,..".
~
m..Jl>'SlocUd·
. -~~­
~._cv_~).

'"-"T
m~ .... · _cv_~ :
_e.._~

_od1olollelNTEGCORR • _ ev.co.. ~_) .


_odMoYolNTEGCORR ......... cv ...... ~ :
___:
MwCNMlk~ . on.JSleodJSI._ .... OI.

,
.~

rm...Jll',' t, do-.p,()(II.I(COSUum~.omo(I-lD->R.od
{JrI.csN.... ).
,,.....~l · O .O.

,
IOfQ' I: " . _np.I!o. ... )

11 ... . . . - . . ..... _ ............. -


t''''~~. (!CIOSh . . ,..~ 1~>R...
(001._>:
_ ....$J.ocUd;. ({CIOSI'""'')m...... '''"'' SO''' "'''''~ I D-~FI.od {JrI....... IIII*).
W!m..J>paGw) Go ... ,..........- : U .. I I I I _ ............ ,.......... WCO ...
•~.OtIgl_' mJIIII"W."",
'{Jr\~_ • .......a-- :
• (mJIO~_.....,oodw:
:
,
1Ot""~·

r~
1: ~ .....iSI.~ ...· O; ~ •• )
....I· •. ~
'{Jr\~_.~ :
.{Jr\...".....,..,""'"'. m~ :
I 1m..Pl' _ _ ' mJl6o<tw .
,
Wlm.bTompEMIIIod) 8o<£NtM{F..... SI!).
'(/nJII _ _ .m..PI
r ""-' _ _ lfU#'odw odw : . _ ..... _ lOt --.."Hl"EGRAI. ~ CXlfIRI;:CTIOHS 111 _ _
~"" ___ ""-'"'l
'(/n~po.<)_,~ :
'~~)GoIel,~pulC"onoe:
W{JrI.JI/'.-npo.<) _ . m...pPr-.<I<IjI<II:
, r_ _
""~.I.I •• "-puto: .. . )
lNT1!oeORl'lX~ • 0 0".
r {Jr\JlTOS) _mJlTnI : r~OCOfIRodJJI' 0.0;
.~INTlGe(lRl'Q_~GeORR.
'~od_lHTI!GCORRod)_._-noeOltRall :
11 kI up 1nitI...SIImot. . . 80 .. l1li v_, HI ill \101 ~ .......

, e - ..
101 0nI rT· I.IT'· m,JS1eody_IT" )

,1"'(1001·,.'.-_10.)
"""_·~1$ItfII'1~·,t._.O

, ! .. j1nOJ. ' : J"~"")

lIOt.odtIJ~\IoIIio.oI_ · ..... i o _

,
NSOOuplnll! .............
IOtfT·' .rT .·~_""IT")

,
.... ..II·U.·~ .. · )

, on.
k>< j1nO!· ' ;J " ~I* · 1

• !fOI..~f.Go<OKI"'..IIl.d_JtO:)I _"-""" _ _
1of1nO~'",_ 1
,

E-?
Appendix E Extracts of the Integratin g ADM C Algorithm from the SCA DA System

,
""/l1li1_1 ; 1,'--.,)0·)

,
tar /l1li1- 1.1'" lHurnQo.o:ow: fo·)
-, .., -
~_O. _I ;
I""n\JIIOIIIiN • 1.0:

rm..-Nil'l- "'_Wl ....


rmJl8>dllPl·I.Q.m.JA8OCl .
,
-
• _ 0 ... " ' - ' " ' SoII_

, I ' ~~[I<!'OO: ... ,.... .... . ...... _

,. . . ·1.1.·_......
U S . " " _ ........ allMC"""

('mJ>lod)fl) • 0.0;
10·· )
.rm~JI;I·o
_0001 ____.o.... _

(""'~.OCI)M • 0 .0:
(""'JII..OCI)r.)· 0 ,0;
("m.J>$f'oOd)ll)· 0.0;
m~SeIDUCoOd(~O ·OI; ' ltJN1 .. 0 .. _ ~ 10 WIt COMC1 posIIioM

11 s.. "" _ ."....,. Cl pa'_Of_or.lIat...., 0IiQ""


,
"""'l;~;jo·)

,lor 0"' ... "iNun'>1nputs; 10·)


,
("m..JOOOOS)(iIiJ· «m...!MoprMMooIE .... 'D;
"" I)oj rr. ' . IT<"<'O_.... I41$UlooHot1ioft; IT •• )

~....-........t-') · ~.ii1., . O .• __ -'Il1'0


('m........"._CH\o)l_.(1-1)~_oJI·'.ct
1·"'-"'*"""Ii'..' ....,..""'...
".,.. t<lwolQhO
·(,.iN_.....
I . (I-'I~·t)· 0.0. 11

,1ar""' /" ' ...


("~_."'OlI_·('~).(1-')~ ..... I·iI·OIt.

, ""I..iS1.I41~·~jo . ) . _ . _. ' _. .....,., .... 0"""


, ""'(Ioj.'iNurn1np..tI.,.iNumItoput"_,....;J
'OfG" ..... •• )

.
r"'-""""lI;Nt.onI"""'. · (1-1 J' iN\.mOuOpoA> •....ISt.I41S, ... HOI'.on·lI •
("......,oo.d)(' .. ,;

......-
(·"'___<W1gIl_ _ · lI-l)~"III.JiSIo.o01St-..""'i ' , •.•<"""-""·2_ _ ·.........outpul . • · ·)

,
• T,""""",,_ Man.. ~ ' or tOg<li _ _
,r... Cl- .... --....I · ~,....~-...JSto~o-.I+ · )

)
,
.-
.~

('m~I·)·O_' .
) ~., . O.
""(10 • . _ 1 0·',
)
("mJ>F"""')f.X."'.O. R ... ·.·*""'_ ,

I N'*"'"_ .....
"" /0'11 ~ . , ; ~ . 'mJ$1ot<lyS,.,,-,,,; ." 1
_~

("m...oI'odWjf_ . (1-')~"Joo.)SM~'
l"LISIo""'SUot-.~~~· (1-
1)'"iNumOutput.-n •
f"M..pI!Ood){illm.JS'."'JSI,,~·_pur··I).

' T_O_ ........ ~Io ... _~


)
' _rH_~"" __ ,""'(100,,_ ,10·)
,
,,,,,," •• 1< _ _ 1+.) rmJ>O~IIlIlI'

,
"""-....... OOW'_ ..... D;
lot (1111/" ' ; "'iNumOoI1_; )+ . )
,
1« (\<oII" . ............a..._:I*· )

I Jf,*"",,_'''_~ ___.''''''
to< "'" k• •• l <-""'J'!oOClf$tal_ '··1

101 "'1.-1,
,
-.-
1(1.1.>0) W lk • IN ...... ""'""'"< '.IN""'O"O .....I • (l-1)"INImOIor ...... t
(""\...I'O_IUI"'-I·
m.JOO<I·~C'O'WCO·,)_ · ,·1D:.NB

-
,
, (""'J>F~~*iI­
"·O'IumOuI_'m_lSteOllyS,.-.on'
(nUS,.O<IyS101._on-lJ~·D
~"t1·~ ' ().1)_·~·0 .0:
,
...... , : ••• """"""",)+.)

,
""(!nO " ' ; _ co IN ....., _ ; _•• ,

~).O .O:

•....,.a.a...... IolOCI .....


,.,
0,""
.... (!nO I" I; ... _ _ . ~·-.o..tpuIJ...... lSte...,-oHart>on.
)

.
) N M\lST TOGGle R....,,,, Of'~ __ "'0I..-0b0ll0n fW _ _
lor"",,_ 1; ",-toR_. ~AUII! .

,
" _'w.-...~'m-""""Y _ _ """ " )
,------------_.._--
)

_ _ _ OIOP"""",IO.

E-8
Append ix E Extracts of the Integrating ADMC Algorithm from the SCADA System

,""(1- ..... • _ _ 1.. )

,.... OoC"" . .... ~ ......."""".. _.Jo·,

~'_
1NurnOu1p!ft' m..csOwtpu1_GooSin 0:' _from
• m..csI"""'SIt.omN .......... S!a:. (I; • inpu1o •• 0Me0t;0c:t ("Vs,
0Ne0tt0CI

""'"
.-
1_ ~lt
",_"",r_1"W./p4ot•• 1lWOfl~_'000), C""'r_· . God.""_ · ~..a..~

"'-~""" ,""!P'....•__ : I..)

11 UN
'_~ 5 0Me
... odoplOtiatl_' 10 UWo< normol po"~_,,. "" 1000(IoIW-":
Iji..~~~ ..._;su~s.-.", • • ,
f"roUIGaII'lM'I • D:
_Ooh~·c-)(IrO)dwr_.~

'1100.0:
_ _r_.po:J'
,
.... (lnljo,.i<~ ......I$I·~_:j · · 1

,
f (!)o ..r ........... .,.~· "\JT'OnO,....... oI!
'I~""'~J ·
C''''JGod'~'~

11 """""""01. "'..... 01,.. _ _ ... _1nl.... od.",......


~ , ..
r~p· o.>~""IIiI.

,
!NT1!GAAI. ... CCUI.01MTOII
'('m_~f.Gaa)
' ~2tarllOUd'~'-poOC"-,
' .. 00C I' '.1.' ~""' .. fo ' j(""'_od-m!GeORJllodl/il'
C_Im_ _ _"" · , 0"."'- ...............' 10 · 1
t ..

,
C('m.JlOOul>leP'~oa:l)[,j ·

("_odIoIovtlNTEGCORRodJIiD; 100(001'-":
,,·-.........·~'"iHI.mOo.opo.U· "'_iSIdotJSI_ .... ijII.'"
~J-O:

,,.. (InI""'..... ~ : jo . ,

._............. _----_ ...


1NutnOu""'s):

r.. o·u··~po.tt: .. ·l
_-
r ....,oo....,....Ou1""'C"OIIII..... X, · (tII_W.od, SI........u..... 'I
• iNwnOuIpo.Ul- ('m-""~t

• _ _ .".. .... oI".. .... _ _ .... WTEGAAI.


')·~

')~
,loo ", \0,.

.)" .....' ')o._.....r"~"


~._
\< _ _iSIoooclJSUl.........., • •• )

C·mJG...mx;NumI ...... 1)-


..._ISI.O<IJSlM_"'iI .
......
~

• C_) CfILISI.~5I ..
....n
. ) · C · m.,.llOolllllo"""~~ ' ).........ou>_ · 1.

_''''''''_.... Jo~)
.•
_..,·z·

ACCUl>A1MTOIl ""000IC-.."" ~r_I\lIUIS · (I-

, .... ~.,:luiNl..<llOvl""'"' .. ·1 1)·""""'O"<_..._~Jo~)


• «IOuIIIo1 C/OI..ISIaacfySIM--.. ,.
r~GCOIII'I)(4 •
c_)m __ __ ,
O,)~~(>.o').~_ • •.

,
r.o·C("ln..JIP._~Kil ·

c · ~ .. od_m~GeOR R ~;n.

' ~"'..JIP0~ ' ~l (0<1I01..)HTEG • _oIodMoYolHl"EGCOIUbd


'... ~· ' .I
' " (1nl
..IT....INunOu!_:fo .)
. 0;1T'ono .IJ'I\.I$tu<IySt...- ..... 'I, " -.. ) , ""(1nl"".1N<.mInpuI':
I... 0'" .. _ fo ' l

c-....JIP~ . IT"_ . ~.
("m../>P.~~.~').~ ijII.<-..........~ ·M.mOurp..u · m_iSl.~Sh1-...: (k •• )
("oTU'Goonlli@I ' O:
II~ "",,'npo,t ...,.......... IIItOug" .. od. ( _ , . . .........
, "" ' .';' .0_10·)
.... (InI1TIrno • ' : ITImo < (tII..IS!.odysu.-. .... C!. ~+)
)KIinltt~
,
t .. (IoI)o , : ... ~ : Jo . )

~-- . (I.

, ')~""'~_OII"'i1'
C_)tn..IS I .~S'"_z''' •
{"_~ EClCOIIItodIIIt

')~-...JSt~"""~I·
~ ..................
• (_lftI..iIlI.ody$l" _ _ •
11 tt . -...ry.
BOOI. ..... ~T ... ~
' om"","~ '!... _ ... OMCObjo<1IO gO! • N....
,
C·... ~o<I~NTEOOOIUIodIGt

,
Irm..~

",_bT""'PEn_. TRU~. "loIok• . . . . - - . . . . .• .,.,"''''''''God


s.1fAa ... (TRVl): f'tII...pGod) • ("nuIQod). C'm.,pGod')· ('l'II.JoGoorn • ("InJGod) .

" God h.. _ """ ..od . _ •___ • __ ._ .. _

1l 1oIc_ " , - 0 I .. _
cvOCOO<~ ,

,
""(Io • • ~"fo · )

("m../>POSIOutpuI~)f1 ' C/I\..~_")'~

(rc;ooa.. ... ')m~omo(I-'D->' R .od (m_tsN_) •


r"'J".-.o...po,t)1I);
11( ...~~l(lt , o.tal.l(~""_lIOjIoIII 11 ........ rncIiQiOfI 01 "'- _ .... _1IOjI

~tRDoI..~'_
~"'l'
• C(C1O$ltHm""~""'D->'R_ "'-tsN.....,· ,
I (m_bUMMapI)

("In~puI)(l)' (CCIOSIto_"",.POuI~ I ~."


( .....-~,
11 .. _ ............. ona 1IncI .......1'II1t1l. _

,
.... ~o • • I < o I N _ I.. '

~-~.Ody$lOI_o1)]:
- . -, 0.1» T. .
'_V~ U;IO\.
o..op..c--- --
("m..p>:StOI:U:l)jII"'.JSI. " " " . _... · Oj • ~ OfOfW!(\I ...... •...101 •. 11 . 20IOi • .et ''''0,'' '1011.11_2·'''11.61
CCCIOSO .. om'Jm...plnpu1Str. ."'., .. ' D->-R.o<ICm..aN.... ):
I "'-'·"'.GI
_'M'.rm...P"Ot<lll'~~_-""' · ' tTt:GCORRodII'~f ..
._ - . e ' .NtTt:OCORIIt<I)IlI.("............-rrGcOft1l!X1j.("......-

._.
OIodMOvolN'"T1!GCORR)(2]):
11 VI!<I'" ObsttvO\lon M_ God .h_
«(CM....wno~_O ·kI_""'(V~' ..

,
. ~""- . ,..~
.... , . ' ..... ~ Io·)

, '''0·,;1''--':10' )

c-....J!Godlfom·D.D:

E·9
Appendix E Extracts of the Integrating ADM C Algorithm from the SCADA System

~'OO;

...----......-----.- IG
11 rrnotUlXlrtl to< ""'plrtIotI 01 MOll'!

·~·t~ · ~r,~ · ~'~l{rn.)S! • ...,U.OHon<Oft-


(('1IuIGod) ' r ~ od) ' '''.,JIGod-~TtotI09OM'IO '
r m.,J>flod)) ' ......... 0'
II Enoo' _ _
...~- .j.~:
,

. ~, .. .,ft
"_
....~.

•"'_ _ • ~
~ ' (("ftI..,JIIM). rwo.Jll<a<ll · rwo.,PGa<ll) ·
rm..,pM.cI) ' m""'od-.> T ~ · ("'nUQ.cI).

........... • rm.JlllOd) • rm.J>llad) • ("ftUIpOd. otIg) •


("IoUII<.od) • ~ . . . ~ - ("'In.,PGa<ll ' ('\'n.JlllOd»):
11 NB : ("mJ>SP • .." • .....,.,."... ... ...., g ..... r.no; 1_lntegr_ 01
" _ _ ""'_oSIlay....-....mll..

,
'or (1nl IT • 1. IT co fI\.JSOIOdySUIIlHOrizot>, IT " )

,
""0001·1;1-__..10 · )

,
IOt(lrorJo •• ) •• _ _ :j..)

............. ...-0 .......... OUO _ w,og.g'03 .~

1«m_~Gadl/t'<I\..O£.cI"",,*.1tO» """_
• R EG IAAAI~O $Ol1JT1ON 0PTl0N
... ..,._Ioo'~S,oI_?
,
....~. ("ftIJIG.cI) ' t"'m...P!"..,..,: .. IIMSIOmI
....~. rwo..JlMootwl·",~l~·
tf"m...pG"""l · rm..,pM""" · "'.,JIG ...... ~l'---O .
rm....oRad)) IrwotwO:
IIErrof _ _ _ _

....~·~ · ~·("ftI~ · ("ftI.PG·,·..lI ·


~·~Tr--'O . ("ftIJ>O.....,_

11_..........
''''_ _ • rwo......-J ' r"'.JII>OdooI · rm....,e....., · rwo_ _. O<Og)

rm..w"""): .Idot>OfYInIIAlMn
11 NB : {"I'IIJ$P'od) , _ _ .......
...w-n __ .anppedOUO _ r.o.KII OI03
11'_
{"I'II~ ' ~ •• -{"I'II...J>Sh""-{"I'IIJIG""'"

If"'" Int~ 01
"~RT~""IiGI<IOK""lIf.r~.
_ ._--_._-- .•- --- -_.._._ IQ
"'~s.tA<I"" _ P'IOI'" (TRue.

.lJ>od_ ...............
,
f ~m. bI'I"""*" ...... Ol)

,Ioo'(IoI, .. ~ .. ·)

1I 000_.code
_ . OOIO.r...... (ao..bIIX-'" ..... · (W)/II.._TOrIo) I ".10.11.
,
I~TOrIo.·m..JT"Inolnl_ '£ "'.IItP~U"'_~

,
loo' 000 ' .1 . ••••,'.-'S.. odySI _ _ -.: •• • )

1nI1· (k·')'oNumOuop<.tl ' ~


'-'_OI~
(((; .. ~O~~ ... {"OMCcaIco ..'__Ion!l.'''''''
lIJIdat. ,,""on:
_ ... eoodfil·~""""*"""·'(I­ 1oIesMOI80... (!.IB.J(;ON.lli"fU:I$J()..
')'~""'''''_L$O.~'iI­
......-...- ,
........ rw.-_
"'.~"" .GoIlkt.CounIO .ICIOII · {lrO)P..rTmoIrO_. lk

._-
"'~$oIOIoICaoo« ll.lIOo<JW);

, ,
I (Od,TOrIo ~ • ......,-r................ U 1"'.or..PTIv._"""""e U "'. 1I£rooOIod)

,
""",lTo '.IT .o"'_ISI'~-":IT " )

_1nINI'....)
"'__ r ..... ' 0 (IrO)rn_~orv,, · tOClO;

,
'or(lnll· 1.1 <.
"11J1d'" ...... __ I noco...... . _ .• NB'
- ,.
,
' or()nlJ . ' . J'. ~p<.tI : I"')

,
.~.
r{tm...~ .. ,NlEG~. I>f.<I"-• ..,)
.... plot\otI IOf lnIo-g'"1>tI\I $"... .... ~
lI$uPP'O" ._-
1I.-._.1rIpoOIAX,
(;V_ "'- _lnp<.Otl(WllUmlnPub · ~;
~

CVOClor "",,""SoIpoWo (\HIoo*IpM . ....~on) :


..... "",,""hIpoInI

<;V_~_ ' '''~ :


(;-~- .....
~- ... ):

'or (lnll":' c ·~;" ·l

,
1o<000~·0;~~~~··)

11 i'fOT1!. OMC _1npuO • OM(; ...... _ ........... .-so


M• .-rnpubll • rr.... . •
~[ «CIOS!re"""lr'I...P' ''IIUt 5lto"'''"'~ ' [)-
~ R .'" (m,csNamoJ:
"",,""s..poinb[, . JnN · ~ · ~lD :

,_.
~ . ""- ' ''''-'''I ' _ . ............. D:
,~ . IT\'nt · ~.«rn..~;. l D :

, 1I ... . . . - - _ _ ...... GoII_

--___
'' ... . - 0 1 . . - ..... .,..011Il10_· _

"
_ IOCll""INTEGIl.ATINQ
~
_
,
""(10 . . ..- - . ,. ... )

r"l,Plod)[i). r~l) :
"~-

evl<lorOpon~ G ~ · ",-~_·"'''I.
Cv.aor O\qIuIA<um!N"11[G(IH<no"-"!:
~SoIoue.O<I{lrmJlON)I;J); ~C · (""rnJI8OlJNTEGj" r _-.wrfGCORR).

,
""0001"1. ......-0-·....· · /'-· )
cv.ctorCraclCotrooclio~ · ~"J :

oa
1I_~'_tor~

_
... _
'""II ....... ("ftI..w.awJ[_,~ . (l- t )~ ,
loo' (lilt 1"1: .......I O p I k r i _..: 1'. )

"'~~IJ.~ • Of
_~.~-..eo" .~JolI­
..,...t...
1)'INumOIItp.U ' I.
~ .... OMC<Wg!W(jJ.~' 11 _ _ ,.....

,
loo' (1nl , . , : '··m.JSI'odyStoI_-= •••)
_1IOodiik·
1nt ~ · ' · I :
~or"Gl
[_npu! .· (l-1)~pu\S·mJSl·" 1 51 11 'HorIz ...

t~"
__ · \'l"I\..PO*I.origl
' (l-1)~ "",lSIeodyllll!_ ...

.., lM.J$'ady$UoI_",,",,"-,~ ••.

E-\ O
Appendix E Extracts of the Integrat ing ADM C Algorithm from the SCADA Svstcm

_. "~poAAoI;UmWIt:alo ° r_ _ _ I>o_"" oocumooIoI«I .



... . . , ;I •• ~ · m.~.·2.io . )
("In~trJIII· ' · O:

m..JrI'I_· ......
·_0 __
~. OpenlO<l9ClVl'" • Ir\IlU.SeIPolrllO, CV_~ ...... • .._ _ ·2).

m.--.-...... .~ ... (~: •• ""lP_


m..,.DLPTOV ..'IR....,;"g·TR\.E:
QUOdtlli<:~ r", doII_

0'M)It0 TInadII):
"'JO-hMUOO ....... cv_~ · ~ ;
, ".~TIYoICI' c.-.-TIYoICI (NU.l. o. '""""""_...... NIJLI.. _ _ 'D).

.-
.....,JIOeUMUCIO ° -("mJIU"'~) ' ~
• gboIa!o

cv_~~·".~ :
00lputMIN. 00.(puIWJ!. _~ ono! IAAJI~
,
'~ .....III.P~"~MI«I)

11 odju>I ....-.. ......


CV_OutpuIMAX(iNumOul.... · ~:
..~o_cv_~· .....~
CV_MAl<OuOpo.te_~ · "'.~) :
,m._nm. .GoIr.... CounI O· 1000 ' Iio'«rn..f'T\lMlnlOl'Vlll. I~

lot ~ • I: I •• INumOurJIUIO: 10.)

,
1OI (ItoI ~'O:ITIrM''' _ _ ; IT'_')

11 NOT~ : IIMC modoOl""'" • OMC obj'" "'p<.C"'" Woo _


rr.._" I 'IT'. ". '-..0.0_
~I' __ ~ I D:

~·<l(m..IOIiIIp.O_o(I.'D;
1AAJl000000CI""'II*I)"""'1 • __1M..e"""'IIHfIo'D:
rm~JtII11Iol· ([CIOSttI_~~*""I~'D->R.'"
,
( I n . _ ).

.- --,-.
• en",o _ .. _ _ ""'""
~'_CI..ioM ___ ~p.to . .....~.:t :

.......
ew.ur.0I.~~''''''-.
w..no..<p.to . ....._ .:t: ,11-,,_01_
I!m,.~" _ _NOI'~'8LHOLlITION)

cv...., OI.V.... (INurrIOU:p.iO • m.~) :


IOIO'l:I<O~ ' ~ : io' )
1tNrnOuI_ ·"'.JNuml""C_:)o') - ,: I~OJo>-SoIS1-..r ... ( ' N o _ .. LP

,
r., OnIJ' 1.) c·
_ _ _t
, ",._.BHp (hI8.ICONASTfilIS!Q:

,,-,,_01_
OI.~ "lI ·'J·("In~

,
-,
0l~1i'7)' -('I'nJll.-T~t ' !m,.Il.PEmIt •• $~~CTIVEI,IN$OUNOEO)

OI.V_· 0utp0aMIH ·\"Ift..pf'fo....o.... rO .~-...to) ' «C~O~SOi!iil"'....sotl ... ("\.P~_


rm.,JlDellaMUOO):

IotO·': I •• iHIo'nOuI_·~io·1
rn..JII.Proo-.~_~~~~
,.... _~ (JotII.ICON.o.$TER)$J().

OI.V_sl'I:I):

OI.V_'~·~'I""'~--" ·
rrryOolO."" 100):
~--
._._.-
'rr..goI-"'-..o..rr,...SUOorntlomos.GoISlz. 0:
~p<.Ct' ..... N """".,..,_

---
IotO·l .l c.INumOI.C ..... · ~"".)

.-
~.~~(OI..~~ ...T"Mft.
OI.V-.r<1l); CV"" .. CIoIoM {"InJOoI1'MUOO).
r... (InOI·, . '~.~ · "'.~ ..·)
..............
ew.ur.~(~ ......~ .
~ · ·I""'~· 'I·('onJlRnoI1Jfo'2I:

~."'._ . l) : m.PIoOWI'III._ ('0eh.I0):


CV_~V_.@'l""'O'O_· ..... ~);
11 ... _ .. 0MC0tf0<I
... d·I;I.·~ · .....~o:io .)
,
,.. 0nI)' I:J"IN\ImO<JI_' mJN.... )0.) borConIr_ , _"'.1OIoI,....1""'.P"<'-,.0I01..,..r:tJj .
""~., : . ~ · _ _ po\S,io·)

DtloMJiII:
OI'Il.~'Ii"lI·lt·~ "'.lOIoIpuI ...... !dI/1\...IOuI~'D ......lOuIp.O.): 'CIip .. caM .....
, OI'Il.ConttrMts(illj"'2) • +--t.
.....lOuIpuI·_(~'D . ~:
((CIOSIto ... ~Sln!.,...,.,,...........Cfto.._. "'.lOuIp.O.) :
ORI,.V_ • -MA.I{(IoIpo.cO\anOe. 'rnJlOelloMUOO:
t", O. 1. 1._IN!.<nOuIpo,Q • . . . . . - 10 ' 1
rn..JII.Proo-.~(C~(ORI.~a..otorThM .
0I'Il.~) :

ORlV""" t.lA)(().r!putCIIango. ~IJQO;

1ot~ ·' .I <·~ · .....-..-. io.J .. ,


-..-.-.
_ ....,.PLI'foa:
dtiel, m...JlR_

_l11..,IOcIat.n.JOO:
<1010.. "'-"""" ..... 011<,....
m...oLf'!<ov".o.cIdCoNI.."" (CC«>slrorr.. (ORL~;~
OIlLV~;D) .
L...T1Wo.
,
,
--
'M:I""", _ _ _
_ CD"'COOIjoa··u...""-.,.,,..., ~
....
C _ ...
......
CM""", ILCOnstrWots (;NumInpuI. '
~
y_~·"'.~on).
m...~
~ . ~:
....VEtrtot·IItJIlP~."..,.. r~" "mJlR...... ~) :
""d· ,:I.· __ ·..... ~io .) ,m...1II.P""""'F"risI>o<I • TRUE..

,
Iot .... J·,.I~~ · "'~)O· J

,... ,:'\IIi", _ .. _
\/Cid COMeOIlIo<' .. SoI~ (6001. 0€naIII0d)
1L~·2· 1 1'!'n\..J>Oy'IM~
...._
, 1L~5"lIt · -('m~

,
.~ U ""- __
11 _10 _ _ ..,., _ _ .... _ ...... _ ......... _
ILV_•• I"""""IN· 0penI.00p0utpuI • ('0\.J00rftM_ • rm.,oo..or..ouoo):
• ..., oIi/oCI_ .... _
1ot~· , .I _""- · ~ ....) ~ ~T_' TRUI!:
rn~~1nI (CCOftSI1'8IrII (lLConIIraInIsliJ. Gi'llItITII.... lOt (110 1• 0: 1• m..;IOjlUIStro....... GelSIz. 0: " ' 1
'LV_or·n): .«(~,." .......... _MlA/~~O,.~
"_o'AL$E:
,.. Q.. 0: 1• .....,ouJp<.C.su....... Q.oIsq. 0: " . )
.(({CK)SIrt ... ~$Wt.....r.~~O,."-1
""~.'.I •. ~ · ~" .)
..~.~cce--.(IL~i~u...'"""'-ILV~iDl :
OT_·'-.LSE.

Itapllm; ..
~". __ CV_ _ · ~·:t :
,
IC.TMIP)
A"OoW _Q->o ............. rone ......... _ _ _ _ ... '*"11

--
_c.,.~_:.

It ..... ....,.."""
C _ yT _'~~T_O · .",~ ·
'1!""',
1010' 1: 1<0 "'~I»Siz_O."·) . - a l . _ _ ........
~ F nJ(~ .,.", f"T_'IO·')12D:
101 • • 0:1 ..................... _ _ 0 . 10. )
, ... ...oighIIrIg «(CIOSln!..,."....JIItIPoIISlnI~ p.c:o.NAmol.

E- !!
! J:
Ilil
~i~.l
L! f L~
.2

"
~ f a1 I
..

i!
~

i I n
~- i I• -'
_!
I
. . ;; : I, i

~I
iItl i!il, _
f

!,
I:
' f
iIH
'I i

III1 !_Ill! , Pi
.: if
jl
. 0

'Il~ f ~ ! ~~2
~' I- "UI' n
, - I ~,

.~
..f~ "; if"tj'
~I;; :~
. ' • i • 1 , Ell

" ~' , 'I i' : Ih 'i "is,' jLiH t ~ ~,i


!
i ~ "i
- -,~l .
E
~

§I
,:,
E_.
~!. ~ :;; ~
;1 I:i t
_•0'. 1-,.
" !
~

•i ; l! .11-
X',.
'
• 'I !. ! ~,;,~
1,:- .'1~
I la~ t I ' .. ~ ! -
i ~;. ? Y'I: i .;.-
.!- - ,X ".
.li ~)
j
,~
~ ,..
~ ~ "
. ..
~~l ~ !mLi _..
li.s:J _
.~H q! d L,m
v

lit lL'·
f!
!
lOO.!
si itt.:.
II 'I Id!0'1I
,,~~I'
I 0 X if

I
~- - Hn L"-·

i
,
!
- g .. 1-
I -".
_ .... .r.l!_
!
_ I."
".1..11 _ ".
-y. 1 -
- 1"'-'-

'"
E
., "'
-~
-5
o
!
d
J!
d
I!
; ,
~
P
!
" i -I -la
!

If i' I!
~ &
> I

i I!
__ 111 11= l lili

!~ •i, !~ ~ 1I! I!
.n i 11
~..,
it
!g 1ft tfi
i'
·1 i'
i
H H~
_'"
I, i I i I. i I f , If ~ d f' i I, q ~ I
J

d ~ t,
t.52 ~ ~ 5

~I
~
c

<:
,s _ <
__ ,',s _ I' _
..
~ "_ a,}
.. __ - _ ",
_ l~ _ ",_
" - I}
" _ ",;.
_ ~ I - ",;. I -
_ _ 12
-
_ 3,~.
_ I - ",
12... __ I
."
~i~ _
B
_ _
"-I'
,!<>;',.
_ _ ..
i g ••
B·'
!, - . --
.-,
!
!
Appendix E Extracts of the Integrating ADMC Algorithm from the SCADA Svstem

, .......... _
VW"_WH ....OQQ I {1.U'U......",._.. ot))
..................
.... DlU"i\.o<ItNI,! ..,..·
-{"'JIOrAAI_.~T'OMp<I'" 0 ......
'~~IIIb:)'-"O ' '''~'''T~O '
-"""oog"""GM"""' .
'm....IJOynM""" •

''''~

N T... _

N CVt<l " T ~: _
. T... ·("rIUIIIOlM_orItl · {"'II\~·~. _

..
NIor (10 1.1<' _ , ......... : 1··)

"
• ~·tI.O;

N -<"InJP.od) • rmJIP'od)' "'.JII'rrI-" . t("'I1JIOO<!)) • rm.;o::;orIl).


r"l.JlGodI). ('nIJGod»)' ('nI _ _ :
• ("JrIJP''''l ' T.. • ("ftIJCIoiS2) • ("mJI>M_orI;):
• .... 001.1<· _ ' .. · )

"
.,
11 rm..J>OocIlIlJIIJ' 1.0 ,

'_MMOO1211 Td
11 <110< V.IuoI(,IXII:
0U!;>uI--------
11 T.... ('nIJIIIOI...lmEG) • 1·~_INT'EGCORRod) .
• ~_ "T,U''IIo'.• r_'IIo •• ' .. ,·'IIo. ... ,".,..'IIo. ... OII'·'IIoI...
otno'lloU''''.ToOOl'J·TntJ1I·{'nI.,PSP·'''III I.{'nI,JIP'0<!)I:z).('IouIP'0<!)I1 1{'n1..;!'''
O)I~D .
, 5p\nI!IV_.. '~,".'IIo ' . II~' 1I".{,mJIP'0<!)I11{'''',.PI''''')(1II.
',~~~~~-:

E-13

Вам также может понравиться