+ All Categories
Home > Documents > Modelling and control of nonlinear dynamic systems -...

Modelling and control of nonlinear dynamic systems -...

Date post: 15-Apr-2018
Category:
Upload: trandiep
View: 216 times
Download: 2 times
Share this document with a friend
55
Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No. WFW 97.075 Master’s thesis Professor : Prof.dr.ir. J.J. Kok Coaches : Dr.ir. M.J.G. van de Molengraft Ir. G.Z. Angelis Ir. E. J.P. Rutten (Philips Lighting Eindhoven) Eindhoven, November 1997 Eindhoven University of Technology Department of Mechanical Engineering Section Systems and Control
Transcript
Page 1: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Modelling and control of nonlinear dynamic

systems

R.H.A. Hensen Report No. WFW 97.075

Master’s thesis

Professor : Prof.dr.ir. J.J. Kok Coaches : Dr.ir. M.J.G. van de Molengraft

Ir. G.Z. Angelis Ir. E. J.P. Rutten (Philips Lighting Eindhoven)

Eindhoven, November 1997

Eindhoven University of Technology Department of Mechanical Engineering Section Systems and Control

Page 2: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Modelling and control of nonlinear dynamic systems

R.H.A. Hensen

12th November 1997

Page 3: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Abstract

The requirements for the quality of automatic control in process industry increase signifi- cantly due to the increased complexity with respect to the production processes and sharper specifications of product quality. In general, it can be stated that the performance obtain- able for controlled nonlinear production processes is directly related to the accuracy of the underlying process model.

In this report, two nonlinear black box modelling approaches are discussed for the iden- tification of equation error and output error models. The black box NARX models are represented by (i) neural networks and (ii) local models respectively. For the identification, a nonlinear numerical optimization has to be performed which is described for the two modelling met hods.

The nonlinear models are used in model based control schemes during two simulation studies. For a two-tank system, subjected to constraints on both inputs and outputs, model based predictive control is applied using the two different models. In order to illustrate an indirect inverse control scheme the control of a nonlinear MIMO system with dead time between inputs and outputs is considered.

Local models seem to be a promising representation for nonlinear production processes. The use of nonlinear models with model based predictive control is demonstrated and deserves further research. A stability study of the nonlinear model is possible for a special type of local models, i.e., local state space models, by solving Linear Matrix Inequalities.

Page 4: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Contents

1 Introduction 8

2 Black box modelling based on NARX models 10 2.1 NARX model representation using neural networks . . . . . . . . . . . . . . . 11

2.1.1 Prediction model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.2 Simulation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2.1.3 Nonlinear optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.1.4 Optimization methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.2 NARX model representation using local models . . . . . . . . . . . . . . . . . 16 2.2.1 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.3 Local state space models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3 Nonlinear model based control 21 3.1 Nonlinear MPC algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 Indirect inverse control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4 Simulations 25 4.1 Example: a 12th order MIMO state space model . . . . . . . . . . . . . . . . 25

4.1.1 Prediction model using multilayer neural network . . . . . . . . . . . . 25 4.1.2 Simulation model using recurrent network . . . . . . . . . . . . . . . . 27 4.1.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4.2 Two-tank system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.2.1 Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.2.2 Results and discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.2.3 Nonlinear model based predictive control . . . . . . . . . . . . . . . . 38 Indirect inverse control of a nonlinear MIMO System . . . . . . . . . . . . . . 40 4.3.1 Servo Behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.3.2 Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.3.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.3

4.4 Nonlinear mass system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.4.1 System description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.4.2 Stability analysis of the autonomous system . . . . . . . . . . . . . . . 45 4.4.3 Harmonically excited system . . . . . . . . . . . . . . . . . . . . . . . 46 4.4.4 Controller design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

5 Conclusions 49

4

Page 5: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

CONTENTS

6 Recommendations

A What is a neural network?

51

54

5

Page 6: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

List of Figures

2.1 Prediction model using neural network . . . . . . . . . . . . . . . . . . . . . . 1 2 2.2 Simulation model using neural network . . . . . . . . . . . . . . . . . . . . . . 13 2.3 Optimization of simulation model . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.4 Three stop criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.5 Local modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.1 Model Predictive Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2 Model Predictive Control scheme . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3 Indirect inverse control scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.1 BP method and LM method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.2 Increasing process orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.3 A simulation model using process orders n = m = 6 . . . . . . . . . . . . . . 27 4.4 A simulation model using process orders n = m = 4 . . . . . . . . . . . . . . 28 4.5 Two-tank system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.6 Training dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.7 Validation dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.8 Optimization with Levenberg-Marquardt method . . . . . . . . . . . . . . . . 32 4.9 Definition of operating points for the local models . . . . . . . . . . . . . . . . 33 4.10 Interpolation functions for the twelve regimes . . . . . . . . . . . . . . . . . . . 34 4.11 Validation dataset versus prediction linear model response . . . . . . . . . . . 36 4.12 Validation dataset versus various model responses . . . . . . . . . . . . . . . . 37 4.13 Validation dataset versus two neural network model responses . . . . . . . . . 37 4.14 Optimal performance for desired trajectories subjected to input constraints . 39 4.15 Two mass damper spring system . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.16 The tracking errors e l , e2 for first set of reference trajectories . . . . . . . . . 41 4.17 The tracking errors e l , e2 for second set of reference trajectories . . . . . . . . 42 4.18 The tracking errors e l , e2 for disturbance z11 . . . . . . . . . . . . . . . . . . . 43 4.19 The tracking errors e l , e2 for disturbance va . . . . . . . . . . . . . . . . . . . 43 4.20 Nonlinear one degree of freedom dynamic system . . . . . . . . . . . . . . . . . 44 4.21 Level surfaces of Lyapunov function and response of autonomous system . . . 46 4.22 Two possible solutions yh and y1j2h . . . . . . . . . . . . . . . . . . . . . . . . 47 4.23 Simulation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.24 Control input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

A.l Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 A.2 Two common used activation functions . . . . . . . . . . . . . . . . . . . . . . 55

6

Page 7: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

List of Tables

4.1 Definition of symbols for the two-tank system . . . . . . . . . . . . . . . . . . 30 4.2 33 4.3 NSSE for prediction model using different modelling methods . . . . . . . . . . 35 4.4 NSSE for prediction model used as simulation model . . . . . . . . . . . . . . . 36 4.5 NSSE for simulation model using different modelling methods . . . . . . . . . 36

Definition of operating points for the local models . . . . . . . . . . . . . . . .

4.6 SSE of control for different model types . . . . . . . . . . . . . . . . . . . . . . 39

7

Page 8: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Chapter 1

Introduction

A production process must often work under various operating conditions. The characteris- tics of the production process change under different operating conditions. Control of such processes can be a difficult task. In general, it can be stated that the performance obtainable for controlled nonlinear processes is directly related to the accuracy of the underlying process model. Due to the presence of nonlinearities in the process one possibility is to describe the process in different process areas under diEerent operating conditions with several linear models. Even then, it may be necessary to update the obtained models frequently, because the dynamic characteristics of a plant may change and modelling errors can become too large. One way to handle these time varying aspects in the process is to adapt the models on-line.

There are several approaches to control a nonlinear process under varying operating con- ditions:

o A robust controller based on a simple model of the process that works well in the presence of model uncertainty.

o A controller based on a nonlinear model of the process that is valid for a large set of operating conditions.

o An adaptive controller that will try to compensate for varying process characteristics using on-line identification.

o A gain scheduling controller that chooses its tuning parameters depending on the mo- mentane operating conditions.

However, these approaches have a number of drawbacks. A robust controller will have to sacrifice bandwidth to achieve robustness. A nonlinear state space model that is valid for different operating conditions may be complex and expensive to identify. An adaptive or self- tuning controller is often based on a linearized input-output model, for instance an ARMAX model. When the process changes operating regimes, it is necessary to discard old information in order to adapt to process characteristics in the new operating regime, since the linear ARMAX model will be a linearization of the system about the current operating point. Since the parameter estimator should be slower than the process dynamics in order to be robust, the controller cari exhibit poor performance during rapid transition between operating regimes. Gain scheduling controllers do not contain a feedback loop to decide whether the chosen controller performs well.

8

Page 9: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

1. Introduction

In this report, black box modelling based on NARX models will be presented in order to overcome the above mentioned modelling drawbacks. First, an introduction is given on ARX models and the nonlinear equivalent , i.e., NARX models. Second, two different rep- resentations for the NARX models are discussed. The identification of the various models is the main objective of this report. The models can be used for, e.g., analysis of the process under consideration or controller design. In Chapter 3 two model-based control schemes are introduced using these NARX models to illustrate the control of nonlinear dynamic systems. The models and coiltrol schernes are tested by simuia,tions in Chapter 4. The conciusions of this research will follow and finally recommendations for further research will be given.

9

Page 10: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Chapter 2

Black box modelling based on NARX models

For linear systems, a black box model representation is the ARMAX model

where y ( t ) are the process outputs at time t , g ( t ) are the equation errors at time t , i3 is a parameter matrix;

-P

T T - - 1 ) = [y -P (t - 1lT , f ,yp( t - n)T,ap(t)T, * * . ,up@ - m ) T , g ( t - l ) T , . . . , g ( t - I) ]

is the information vector at time t - 1 with y E E T 1 g E IRT and up E IR'. As mentioned before, the ARMAX model family consists of input-output models, which means that the model structure and parameters have not necessary a direct interpretation in terms of physical phenomena or physical parameters. Input-output models may be preferred above state space models when the process knowledge is limited or when it is difficult or complex to apply first principles. This is often the case for nonlinear physical-chemical systems. In that case a NARMAX (Nonlinear ARMAX) [i, 21 model representation can represent a large class of dynamical systems:

-P

where f is a nonlinear function with range and domain given by the information vector. The problem is now how to represent this function. In the last decade, several generic nonlinear structures for f have been proposed, e.g.,

o Neural network parameterization [3, 41

o Generic representation based on local models [5]

These two representations will be discussed in this chapter. For simplicity, the measured disturbances of the process g ( t ) are neglected in the rest of the report. These models are also known as ARX for the linear case and NARX for the nonlinear case.

10

Page 11: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

For the linear ARX models there are two possible model structures known which also can be used for the NARX models:

o The prediction model, also known as equation error model

o The simulation model, also known as output error model

These two NARX model structures can be used for both the neural network parameterization

The choice for one of the model structures depends on the purpose of the model. If a model is used to predict many samples ahead as in a Model Predictive Control (MPC) scheme a simulation model is inore appropriate. On the other hand, if the model is used to predict only one sample ahead a prediction model is the simplest solution.

a d the !oca! mGde!s pararrieterization.

2.1 NARX model representation using neural networks

Over the past decades the application of artificial neural networks for the identification and control of nonlinear dynamic systems has grown immensely. Relevant features which encour- age the use of neural networks are:

o the ability to represent nonlinear relations,

o adaptation and learning in uncertain systems, provided through both off-line and on-line weight adaptation, and

o the generalization of different input-output process data.

Two classes of neural networks which have received considerable attention in recent years are (i) feedforward neural networks and (ii) recurrent networks [ 6 ] . From a system’s point of view, multilayer networks represent static nonlinear maps while recurrent networks are represented by nonlinear dynamic feedback systems. Hence, the use of recurrent networks seems to be more appropriate for the identification and control of nonlinear dynamic systems.

The two NARX model structures, i.e., prediction model and simulation model, using neural networks result in the two neural network classes mentioned, i.e., feedforward neural networks and recurrent networks.

2.1.1 Prediction model

A prediction model predicts the next output of a dynamic system for a given input, the time delayed inputs and time delayed outputs of the real dynamic system

where y denotes the real process outputs and gm the predicted model outputs. The nonlinear function f will be described by a neural network as in Fig. 2.1. The

tapped delay line (TDL) is responsible for respectively the time delayed inputs and time delayed outputs of the real process. For a short introduction into neural networks the reader is referred to Appendix A. The showi1 network structure is known as a feedforward multilayer perceptron network (MPN). The nonlinear function f for a 2-layer neural network with input

-P

T T - - 1) = [y -P (t - qT,. . . ,y -P (t - n)T,u,(t)T,. . . ,up@ - m) ]

11

Page 12: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

Process I Y (i) *

-P

Figure 2.1: Prediction model using neural network.

can be described by

-m Y ( t ) = f(6?@ - 1)) = N($(t - - ~ ) , W , W , b I , b 2 ) = W 2 ( C ( W l N - - 1) + bl)) + b2

where Wi is the weight matrix associated with the i-th layer, vector bi represents the bias values for each neuron in the i-th layer and E(.) is a nonlinear operator with C(2) = [a(zl), . . . , u(z,)IT where u(.) is a differentiable, nonlinear, monotonic increasing function and m is the number of neurons in the hidden layer. The parameters to be identified, i.e., Wi, bi, will further be pointed out as 8. For ease of discussion, the above network with 2 layers, n inputs, m neurons in the hidden layer and 1 linear output neurons will be denoted as belonging to the class [4]:

2.1.2 Simulation model

In a simulation model, the time delayed outputs needed at the input of the model are fed back from the output of the model itself, i.e.,

-m Y (i) = f ( 8 , g m ( t - i),. . . ,yrn@ - 4,up( t ) , . . . ,up(t - 4) (2.4)

where gm are the simulated model outputs. The nonlinear function f is described by a recurrent network as in Fig. 2.2. The structure

of the used neural network is the same as used in the prediction model with the difference in the input vector g. The input vector E consist of past simulated model outputs which are fed back to the input. The nonlinear function f for a 2-layer recurrent network with input vector

$@-i I Q ) = [ y ( t -118) T , . . . ,-m(t-nIB)T,U,(t) T,...,Uli(t-m) T T 1 - -m

can be described by

12

Page 13: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

Figure 2.2: Simulation model using neural network.

where the variables W1, W2, bi and b2 and the nonlinear operator E(.) are defined the same way as for the prediction model.

2. i. 3

The optimization of the weight matrices and the bias vectors in the neural network is nonlinear due to the nonlinear relation between the network output and its weights. Conceptually, there are two methods to optimize the NARX models using neural networks, i.e., (i) general learning [7] and (ii) specialized learning [8]. In the first approach the model is identified off-line using input-output data {aP,gp} of the process. On the other hand, specialized learning is an on- line optimization of the model using input-output samples during operating of the process. The model is continuously updated and therefore adaptive. In this report, general learning is considered for both prediction and simulation models as in Fig. 2.3.

Nonlinear optimizat ion

Optimization 1

I I I Process

-P Y ( t )

Figure 2.3: Optimization of simulation model.

An important aspect of the optimization is the dataset {ap,y 1. i n the input data se- quence, all the system 'modes' must be excited in the frequency range under consideration [9]. However, persistent excitation alone is not sufficient to obtain nonlinear models. Ran-

P

13

Page 14: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

dom excitation is required with a magnitude covering the whole dynamic range of interest, because it may not be expected that neural networks do extrapolate the system’s dynamics very well, i.e., outside the region where measurements are available. The obtained dataset is divided into two datasets of the same length. One set is used for the optimization of the neural network (training dataset) while the second one validates the capability of the network to generalize (validation dataset).

For the nonlinear optimization of the models an optimization criterion has to be defined. The - __ optimization criterion applied here is the minimization of the normaIizec! sum of w1lared YU

errors (NSSE)

< T 1

minimize J ( 8 ) = - ~ ( t ) ~ g ( t ) t=l 2T

where T is the length of the training dataset and ~ ( t ) = y ( t ) - y ( t ) at instant t of the training dataset.

As mentioned before, the nonlinear optimization is performed with the training dataset and the resulting model is validated with the validation dataset. The iterative optimization is stopped when the objective function Ea. 2.5 for the validation dataset is minimized. In other words, the optimization is stopped when the relative decrease of this criterion equals zero or is smaller than a certain specified stop value

-P -m

Due to the iterative optimization methods a stop criterion is needed.

Jval

stop when l e n-l - Jlal J Z f 1

where Jva1 is the objective function for the validation dataset, n is the iteration step and E is the stop value. Another termination criterion is used to specify a stop value for Jiaz

stop when Jnaz 5 E

where Jva1 is the objective function for the validation dataset, n is the iteration step and E is the stop value. A third stop criterion is the number of iterations

stop when n 2 nmax

where nmax is the maximal number of iterations. The three stop criteria are shown in Fig. 2.4.

2.1.4 Optimization methods

The Back-Propagation (BP) method [ lo , 41 is the most well-known method for the optimiza- tion of the weights and biases in neural networks. Although this first order method is easy to implement, steepest descent methods like this one can suffer from extremely slow convergence. Furthermore, the solution of the optimization problem may be trapped in a local minimum due to the down hill search technique. A more appealing approach is the Levenberg-Marquardt (LM) optimization method [9], which incorporates second order information.

These two optimization algorithms using the a priori knowledge of the neural network parameterization and structure are modified for MIMO models based on optimization al- gorithms for MISO models of the Neural Network Based System Identification Toolbox in

14

Page 15: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

# iterations

A

C?ver!earning t i "\\ i Validation dataset

n m a x

Figure 2.4: Three stop criteria.

MATLAB. Both the Back-Propagation and the Levenberg-Marquardt algorithm can be used for the optimization of prediction models using multilayer neural networks, also known as static learning. With some modification both algorithms can also optimize simulation models using recurrent networks, also known as dynamic learning. This modification is nothing more than a generalization of the existing algorithms for MIS0 models of the above mentioned Toolbox. The difference between static and dynamic learning is introduced by the depen- dence of the model outputs gm(t) of past model outputs gm(t - 1 I O), . . . ,gm(t - n I O) for simulation models using recurrent networks. This means that the sensitivity functions of the model outputs to its weights O, used in both the BP and the LM algorithm, depend also on past sensitivity functions. This can best be illustrated by differentiating Eq. 2.4 with respect to a weight between the input and the hidden layer

where na is the order of past outputs. The second term on the right hand side of Eq. 2.6 shows this dependence. For prediction models with static learning this term is zero, because the model outputs ym(t) are independent to past outputs y (t - 1 I O), . . . y (t - n I O) -m -m

= O ' d p E {i,. . . ,na} aYm(t) -m ( t - P )

15

Page 16: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

2.2 NARX model representation using local models

A generic representation using local models is proposed by [5]. This approach is illustrated by Fig. 2.5, where @ is the set of all operating points. A vector 4 E @ is a possible operating point for the process. The process will typically operate in @OT @ or @I C as shown in Fig. 2.5(a). A set of simple linear local models describing the process well in different parts of @, which are pictured in Fig. 2.5(b), can form a complete model by introducing smooth interpolation between the local models. Model validity Fünctions for each local model are required and indicate the validity of the local models as a function of the operating point. By definition, a local model is valid only within a limited operating regime. With the local model representation, the problem of building a global model is reduced to the problem of building a set of local models.

Assume the set of local models f ; such that

To each such local model, a model validity function pi E [O, 11 is associated which by definition is close to 1 for those operating points 4 where the model f ; is valid and close to O elsewhere. A typical choice for the validity function pi is a Gaussian function

p . - e-+($-$;)T%-9;) z -

where 4. is the operating point in which local model f ; is valid and r is a weight matrix . -a

(a) The set of possible operating points a, but the process typically operates in the operating regimes @O and @I.

(b) Several local models are used to cover all possible operating points in <p.

Figure 2.5: Local modelling

16

Page 17: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

Now a set of normalized interpolation functions w; E [O, 11 can be defined

where N is the number of local models used to compose one global model. This implies that for any 4 E @ the sum of the normalized interpolation functions equals 1, i.e., Egl w;(4) - = 1.

Ea. 2.2 can be written as

without loss of accuracy in the model for the operating regime where the local models are valid. The global model is not valid for operating points where none of the local models are good. Hence, the accuracy of the model depends on the number of local models and the validity functions corresponding to these local models.

The local models can have different structures. The most common used local models are:

o ARX local mode!, Ist order Taylor enpamior, of f aroiind $i corresponding to the operating point 4.. In that case a local model is defined as follows: -a

where 0; and O; are the parameters.

o State space models based on first principles.

In this section the optimization of the NARX models using ARX local models will be discussed. In the last section of this chapter the state space local models approach will be explained in combination with a stability study.

2.2. i Optimization

As for the NARX representation using neural networks, the local model approach can be divided in the same two model structures, i.e., prediction model and simulation model. The difference between the two model structures are the same as for neural networks with respect to the information vector or input vector - $(t - 1). For the prediction model the input vector uses past process outputs y whereas the simulation model uses past model outputs y .

The objective function which has to be minimized during an off-line identification is -P -m

17

Page 18: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

where T is the length of the dataset {gP,gp} and g ( t ) = y ( t ) - y ( t ) at instant t of the training dataset with y,(t) equals Eq. 2.7.

For prediction models, an important property of Eq. 2.7 is that all local models fi are linear in the parameters. Hence, the nonlinear model composed by interpolating the linear local models will also be linear in the parameters. The optimization is reduced to a linear regression optimization which can be solved with a least squares estimator. The model can be written in the linear regression form

-P -m

y ( t ) = BTy(t - - 1) -m

where 6 are all the parameters of all the local models and - y(t - 1) is the regression vector. For the prediction model, the objective function becomes

In the optimal solution ûopt, the gradient of J with respect to 6 is zero

In this way for every dimension of y an optimization can be performed and an optimal parameter set can be found. For dimension one this results in

-P

The optimal solution Oopt can be found by solving the following set of normal equations r, T 1 I T

These normal equations can be written in matrix-vector notation by defining the following matrices

The normal equations are written as

[rTr] eopt = rTyp from which the solution Oopt for all the dimensions of y is obtained via

-P

For simulation models, the model is nonlinear in its parameters as opposed to the pre- diction models. The regression vector - y(t - 1 I 6 ) depends on the parameter matrix 6 . The objective fuxticri becomes

18

Page 19: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelline; based on NARX models

To solve this pseudo-linear least squares problem a nonlinear iterative optimization technique must be used. The optimization can be performed with the Levenberg-Marquardt method or the steepest descent method which are the same optimization algorithms as for the neural networks.

2.3 Local state space models

Local state space model structures are desirabie when knowledge of the fundamental mecha- nisms in a process is available. By interpolating the first principle local state space models a global model can be obtained. These local state space models describe the process behaviour adequately within small operating regimes. Globally, a large number of interacting physical phenomena can be observed with this method.

Consider the problem of representing a model for the system S:

where g E lRn is the state vector, a E Rs is the input vector and - y E IRT is the measured oüipüt vector. Again, mode! validity fxnctions p i ($ ) and a set, of normalized interpolation functions zui(4) are needed to construct a global model which are defined in the same way as in section 2.27

When the local state space models are all linear with equal structure the local models can be defined as

- x = ai+AiAii+BiAui - y = c;+CiAgi+DiAa.i

This model is obtained by linearizing Eqs. 2.8, 2.9 about operating point gi, ui and by defining

af Ax. -4 = g-ga Ai = IEi&

AU. -z = %-ai au i%&

ci = - 1 z . 2 1 . ai = f(ii,ui) ax -2>-z

ci = S(Zi ,Ui> Di = g IE&

B. = - 1 &i a

With these definitions, the nonlinear system from Eqs. 2.8, 2.9 is approximated by:

N - Ir: = C ( a i + Ai& + BiAui)~;($)

i=l N

- y = C ( C i + CiAZi + m b & ) W i ( $ > - i=l

This model representation with linear local models can be viewed as an apparently affine linear model representation where the matrices A, B , C, D and vectors a, c are functions of the operating point - #I

19

Page 20: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

2. Black box modelling based on NARX models

From a stability point of view, the question arises whether the global model composed of local state space models is stable. For the special case where a ( 4 ) = c ( 4 ) = O the global model can be investigated on stability properties with the Linear Matrix Inequalities (LMI) theory [ll]. First a convex combination of a finite set of dynamical systems is defined where the global model under consideration is described with its system matriz

Now the system matrix can be written as a conwez combination of the system matrices S1,. . . , S N where Si corresponds with the system matrix belonging to the local state space model Ai, Bi, C;, Di. This means that for any operating point - 4 there exist real numbers wi(4) 1 O, with wi(4) - = 1 such that N

- N

S(4) - = Wi($)Si i=l

In particular, this implies that the system matrices S(4) - at operating point - q5 belong to the convex hull of Si, . . . , S N , i.e.,

or

also called polgtopic linear diflerential and algebraic inclusions. The LMI toolbox in MATLAB provides software to define these system matrices and to analyze these dynamic systems with respect to stability. The following set of linear matrix inequalities has to be solved to prove quadratic stability of the above described global model

K = K ~ ~ O

2 0 ' d i = l , . . . , N -AFK - KAi -BTK + C;

-KBi i- C,T Di + DT

where a quadratic storage function V ( g ) = zTKg is found if and only if E( satisfies the above linear matrix inequalities.

20

Page 21: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Chapter 3

Nonlinear model based control

The requirements for the quality of automatic control in process industry increase significantly due to the increased complexity of the production processes and sharper specifications of product quality. At the same time, the available computing power rapidly increases. As a result, simulation models that are computationally expensive to evaluate, e.g., NARX models using neural networks, become applicable to rather complex systems. Model based control techniques, such as modei predictive control (MPC), are developed to obtain bette:: control performance. Model predictive control has been successfully introduced in several industrial plants. An important advantage of these control schemes is the ability to handle constraints on manipulated variables and internal variables, e.g., minimal and maximal flow through an actuated valve. In most applications of model predictive techniques, a linear model is used to predict the process behaviour over the horizon of interest [la, 131. Here, the models used to predict the process behaviour are the presented NARX simulation models from Chapter 2.

Another possible model based control scheme is the indirect inverse control scheme. This control method is useful for nonlinear systems which incorporate dead time between the inputs and outputs. In this control scheme, the model has to be a simulation model which represents the dynamics of the system without time delays.

3.1 Nonlinear MPC algorit hrn

The name "Model Predictive Control" arises from the manner in which the control law is computed, see Fig. 3.1. At the present time t the behaviour of the process over a prediction horizon Hp is considered. Using a nonlinear simulation model the process response to changes in the manipulated variables are predicted. Over the control horizon H,, the moves of the manipulated variables are optimized such that the predicted responses have certain desirable characteristics. Only the first optimized change in the manipulated variables are actually fed into the plant. At time t + 1 the optimization is repeated with the horizon shifted by one time step ahead.

21

Page 22: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

3. Nonlinear model based control

target } .......................................................... ~ ..... .... i_ \

L, ii i> c: <, o \'

o (> o

Cl o

/m(t + 1) ". I

~ - ......... - ........ .............

t ' t + l I t + 2 t +'Hp

Control Horizon *

Prediction Horizon

Figure 3.1: Model Predictive Control.

where

r , A =

Y = -m

y,,s(t) =

H p =

Hc =

- u(t) =

h ( t ) =

h = 1 =

diagonal weight matrices model outputs reference trajectories

prediction horizon control horizon manipulated variables

u(t + 1) - u(t) equality constraints inequality constraints

In Fig. 3.2 the nonlinear model based predictive control scheme is shown. An important consideration in nonlinear MPC is the computing time it takes to optimize

the objective function. For the control system to work, the minimum has to be identified in a time faster than the period between two following control actions. As stated before, the computing power has grown to such high level that these computations should not be a bottle-neck in using nonlinear MPC.

22

Page 23: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

3. Nonlinear model based control

. O timizing I? * a gorithm min J ( g )

. -P Y (t> Process c

L Nonlinear Y,(t)

Figure 3.2: Model Predictive Control scheme.

-

3.2 Indirect inverse control

simulation model

An indirect inverse control scheme can be used to control nonlinear systems with dead time between input and output. The indirect inverse control scheme is depicted in Fig. 3.3.

r

* . Process up (t> N-controller A

Y (t - 4 -P 2 - b

Y (i> -P *

Figure 3.3: Indirect inverse control scheme.

TDL

where

- d =

Y ( t ) = -P

=

=

g;( t 4) =

is(t 4) =

u ( t ) = -P

- Nonlinear Yrn(t>

dead time process outputs

model outputs reference trajectories

y (t - cl) - y (t - ci), identification error

innovation signal manipulated variables

-P -m

simulation model

The NARX input-output models described in Chapter 2 can be used as a simUlatior, model in the control scheme. The models can be identified from input-output process data by eliminating the dead time from the input-output data with correlation techniques [9]. In

2 - b

23

TDL i (t - b, O) -S

T +

Page 24: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

3. Nonlinear model based control

the same way an inverse dynamic controller can be identified with the input-output relation

If the inverse dynamics of the system are unstable this controller can not be determined. Hence in the linear case, this control method is only possible for minimum phase systems, where the zeros of the transfer function are within the unit circle. For non-minimum phase systems this problem can be overcome by deriving a static inverse of the systems dynamics instead of a dynamic inverse. In this report the inverse dynamics wiii be identified using a neural network.

The performance of the control scheme depends on the accuracy of (i) the model repre- senting the process and (ii) the inverse controller characterizing the inverse dynamics of the process. To compensate modelling errors ci(t - b), an innovation signal &(t - b) is added to the model outputs y ( t ) . The innovation signal is defined as -m

t -1 i (t - b) = K ci(t - b) + T ~ T , c;(kTs - b) + T''T~ [ci(t - b) - ci(t - 1 - d ) ] [ k=O

-S

where

K = diagonal proportional gain matrix T, = sample time ri = diagonal integral gain matrix T d = diagonal derivative gain matrix

Due to the dead time, these parameters of the innovation signal are limited. Increasing the parameters will cause an unstable closed loop system.

3.3 Discussion

The choice of control scheme strongly depends on the system to control. Most production process are subjected to constraints on manipulated variables and internal variables. Hence, MPC is the best solution for these systems. Another adventage of the MPC scheme is the ability to handle non-minimum phase systems (in the linear case), because no dynamic inverse has to be identified. Production processes show often dead time between inputs and outputs of the system. For this type of system the indirect inverse control scheme with the additional innovation signal might be a solution. The question whether MPC can handle dead time is to be answered yet. One possible solution may be the construction of one nonlinear simulation model containing the dead time between inputs and outputs. MPC, with a prediction and control horizon larger than the largest dead time, might in combination with this model be a good choice to improve the quality of the automatic control.

24

Page 25: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Chapter 4

Simulations

In this chapter several simulation studies are described to illustrate the proposed optimiza- tion methods, modelling approaches and control schemes. In Section 4.1 an example of the optimization methods for neural networks is given and the results are discussed. The different modelling methods and the nonlinear model based predictive control scheme will be demon- strated with a two-tank system in Section 4.2. In Section 4.3 the indirect inverse control scheme is used to control a nonlinear MIMO system with dead time. in the last section of this chapter, a stability study is performed for a nonlinear mass system. For this piecewise linear system a low effort controller is designed.

4.1 Example: a l Z t h order MIMO state space model

For the illustration of the static learning versus dynamic learning using neural networks, a linear discrete 12th order MIMO state space model is used. This model simulates a quartz- glass tube production process in one operating point. In state space representation the model is:

i(k + 1) = A i ( k ) + Bu,(k) -P y (IC) = Ci(F>+Du,(k)

where i(k) E IR1’ is the state vector at instant F, gp(F) E R’ is the input vector and y (F) E R’ is the output vector. A,B,C and D are time-invariant matrices. This model will be referred to as the process to be modelled.

In this linear case a sufficient condition for generating a dataset {uP,y } to identify the parameters is persistent excitation of the model. Within the bandwidth of the process two filtered random input signals were employed to excite the model. The length of the input signals was chosen 800 samples with a sample frequency f s = = [Hz]. The dataset was equally split in a training dataset and a validation dataset both with a length of 400 samples. The iterative optimization is terminated with the following stop values E = O . l % , E = l op5 and nmaz = lo4.

-P

P

4.i. i Prediction model using mdtllzyer nema! network

After defining the optimization criterion, the network input, number of hidden neurons and the network output have to be specified. For the sake of comparison, the number of hidden

25

Page 26: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

neurons is set to 4 for all the neural networks applied during this example. It should be noted that there are no solid theoretical grounds for the number of neurons in the hidden layer. The determination of the number of hidden neurons is based on experiments with increasing number of hidden neurons. The optimal number of hidden neurons is found when the performance of the neural model, tested on the validation dataset, decreases. Every hidden neuron consists of the same sigmoïd activation function. For the output of the network linear neuron activation functions are used and the number of outputs are the same as for the process. Iìxestigation of the 12th order MIMO state space rilcde! (prccess) SE,CWS that the orders corresponding to y ( k ) and g p ( k ) in Eq. 2.3 are n = 6 and m = 6. These orders with the input-output dimensions of 2 result in a 26th dimensional network input vector $I. Hence, the nonlinear function Af belongs to the class Af&,q,2. The weights and biases of thenetwork are random initialized between -0.5 and 0.5.

-P

Back-Propagation method with learning rate = 10-4 100

i o

w w z

10-2

""O 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 # lterat1O"s

(a) Back-Propagation

Levenbeio-Marauardt method Levenberg-Marquardt method 1 o3

10-1

10-2

. . . . . . . . . . . . . . . . . . 10-1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 o"

w w

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . , 1 ° ' t 1 1. . . . . . . . . . : . . . . . . . . . . . 1 . 4

O 10 20 30 40 50 60 70 80 90 100 #iterations

(b) Levenberg-Marquardt

Figure 4.1: BP method and LM method

In Fig. 4.1 the normalized sum of squared errors (NSSE) is shown for both the training dataset and the validation dataset versus the number of iterations. The Back-Propagation method is terminated by exceeding the maximal number of iterations where the Levenberg- Marquardt method is stopped by JITz 5 E. The LM method performs significant better and faster than the BP method.

So far, the orders corresponding to y ( k ) and g,(k) in Eq. 2.3 were known. In a general case, only a dataset {ap, y,} is at hand without the knowledge of the process orders. A NARX model can than be identified by increasing the orders n and m from 1 to the optimal orders where the minimum of the objective function for the validation dataset is found. This is illustrated in Fig. 4.2 where the mean NSSE of the validation dataset of 10 optimizations versus the increasing model orders is shown. The optimizations are performed with the LM method and are terminated at n = 200. The figure shows a decreasing NSSE for increasing process orders n, m. The optimal process orders for the excited bandwidth of the process is n = m = 4 or higher.

-P

26

Page 27: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

J---- _ - - 1 O2O0

I

I . . . . . . _ - . . . . . . . . . . - - . . . . . . . . . I

. . 10'50.

,< Fl I . . , . .

- Training dataset . . ,

. ' ',\ . 2 \ . ' I

: ;- . < : i I . \ - - - -

10'00 - w m . . I ' ' 2

I . . . .

. . - . . - . , \ I . ,j . . . .

. . : :,;, t

. . . . t. . . . . . . . . . . . . . . .

. . . .

. . . . . . . .

1 0 - ~ ~ ~ io io io

NSSE for increasinq process orders n,m 10

f 1 J

Y t 1 0-6,

order n,m

Figure 4.2: Increasing process orders.

4.1.2

For the comparison the same class of networks is used for the identification of a simulation model, i.e, J V & , ~ , ~ , which is expected to have better simulation capabilities than the prediction model. Hence, the LM method for static learning was modified for the purpose of dynamic learning. The optimization of the simulation model will only be performed with the LM method. The following stop criteria are used (i) E = O%, (ii) E = lop5 and (iii) nmaz = lo4. Both the training NSSE and the validation NSSE are shown in Fig. 4.3 for the model orders n = m = 6. In Fig. 4.3(a), dynamic training is performed where the optimization is

Simulation model using recurrent network

Dynamic learning for simulalm model with order n=m=6

-Training dataset

10-2

I 10 20 30 40 50 60 70

10-31

#iterations

(a) Dynamic learning (b) Static learning

Figure 4.3: A simulation model using process orders n = m = 6

terminated by the first stop criterion. On the contrary) static training and validation as a simulation model gives unstable validation results) see Fig. 4.3(b).

In the previous section it was concluded that a prediction model could be identified with

27

Page 28: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

process orders n = m = 4. A simulation model is also identified with these process orders as can be seen in Fig. 4.4. Comparing static and dynamic learning shows for both learning

Dvnamic leamino for simulation model with order n = m 4

I\ i ’, ‘ti I

. . . . . . . . : . , . . . .

. . . . . ‘O40 ;o ;o 50 ;o 1;o 4 0 l k 160 180 200

#iterations

(a) Dynamic learning

Stalk learnina lor simulation model with order n=m4 1 o’

lo1

q .terat O”*

( 1 ) ) St aíic learning

Figure 4.4: A simulation model using process orders n = m = 4

methods stable validation results where the dynamic learning is a monotonic decreasing func- tion and more smooth than the static learning. The identification of a simulation model with dynamic learning is more stable due to the more accurate sensitivity functions used during the optimization.

4.1.3 Conclusions

For the identification of either prediction or simulation models, the Levenberg-Marquardt optimization algorithm is preferred above the Back-Propagation method due to the use of second order information.

Prediction models should be identified with a static trainings method. On the contrary, simulation models need a dynamic trainings method to assure a stable optimization procedure. The sensitivity functions used in the dynamic training are more difficult to derive than for the static training which makes dynamic learning more complex and computational more expensive.

In a general case, where only a dataset is at hand without the knowledge of the process orders, the optimal model orders can be determined by increasing the model orders. The optimal model orders are found when the objective function for the validation dataset is minimal.

28

Page 29: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

4.2 Two-tank system

In order to illustrate the use of the proposed modelling techniques in nonlinear MPC, a simulation study is performed on a two-tank system. The two-tank system is given in Fig. 4.5 and Table 4.1. For the two-tank system, the differential equations are

(4.1) (4.2)

Due to the nonlinear right hand side terms of the Eqs. 4.1, 4.2, e.g., A, 6, the two-tank system is nonlinear.

Fl ( t )

Figure 4.5: Two-tank system.

First, the example is modelled with the various presented methods and the results are Then the nonlinear models are used in the nonlinear model based predictive discussed.

control scheme described in Chapter 3 and the control performance is compared.

4.2.1 Modelling

The identification of the different black box models, i.e., neural networks and local ARX models, is performed by optimizing the specified criteria from Chapter 2 using a training dataset {E,&} , where E = [FI F2] E lRT*2, h = [hl hz] E lRT*2 and T is length of the

29

Page 30: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Symbol Value Unit Description F1 0-0.2 l/s Flow, control input F 2 0-0.1 l/s Flow, control input F l/s Flow out hl 0-1 dm Height in tank 1, measured output h2 0-0.5 dm Height in tank 2, measured output Al 10 dm2 Area in tank 1 A-2 5 dm2 Area in tank 2 LS Level sensor

Table 4.1: Definition of symbols for the two-tank system.

dataset. This dataset should excite all the system 'modes' in a specified frequency range due to the nonlinearities in the two-tank system. To cover all operating areas and dynamic range of interest for the two-tank system a stair case input signal superposed with a filtered random input signal is used. A good static transfer between input and output is obtained by adding a static dataset to the dynamic training dataset. The length of the input signal was chosen 2500 samples with a sample frequency f s = & = 1 [Hz]. In Fig. 4.6(a) the dynamic and static input signals are depicted and in Fig. 4.6(b) the output. data.

Input data fortraining dataset 0.1, I

0.08

. 0.06 - I

i! 0.04 u.

." 0.02

- I

a - O

I 500 1000 15w 2000 2500 -0.04

t samples

Output data for training dataset

500 1000 1500 2000 2500 #samples

(a) Input data (b) Output data

Figure 4.6: Training dataset

The validation of the models after identification is performed with a validation dataset. This validation dataset is obtained the same way as the training dataset using other input signals. The length of the input signal was also chosen 2500 dataset is shown in Fig. 4.7.

The black box NARX representation of the two-tank system

samples and the validation

can be written as

30

Page 31: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Input data for validation dataset

I Output dataforvalidation dataset

500 1000 1500 2000 2500 500 1000 1500 2000 2500 ii samplos #samples

(a) Input data (b) Output data

Figure 4.7: Validation dataset

where

Nonlinear modelling using neural networks

The datasets are used to optimize the parameters in the neural network models for the two model classes, i.e., prediction model and simulation model. For the prediction model, the feedforward neural network becomes

hm(t) = f (Q, $(t - 1 ) ) = N(hl(t - 1),h2(t - l ) ,Fdt) ,Fz( t>,Q)

For the simulation model, the recurrent network can be written as

h&) = f(Q,$(t - 1 I Q>) = N ( h m ( t - 1 IQ),Fi(t>,F2(t) ,Q)

where the nonlinear function N belongs to the class N,22,2 for both the models with 2 hidden neurons which consist of the same sigmoïd activation function. The parameters (weights and biases) of the network are random initialized between -0.5 and 0.5 for the prediction model.

The Levenberg-Marquardt method is used to optimize the parameters for both the neural network models. The optimization is stopped by one of the following stop criteria E = O%, E = 4.8 the normalized sum of squared errors (NSSE) is shown for both training and validation dataset versus the number of iterations. Fig. 4.8(a) illustrates the static optimization results of the prediction model and Fig. 4.8(b) the dynamic optimization results of the simulation model. The parameters for the dynamic optimization are initialized with the optimized parameters

and n,,, = 500 which are tested on the validation dataset. In Fig.

31

Page 32: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

of the prediction model. The dynamic optimization is performed with the dynamic part of the training and validation dataset, i.e., the first 1850 samples.

Static Optimization with Leven berg-Marquardt method 10 I

I I i \ I

' O ' t

I 5 t o 15

#iterations

(a) Prediction model

Dvnarnic odimization with Levmbera-Marauardt method

I va,aa;,on aataset

1 o"

w <B . . . . . . . .

to-'

l i t i I

50 1 O0 150 200 250 300 # iterations

(b) Simulation model

Figure 4.8: Optimization with Levenberg-Marquardt method

For both the static and dynamic optimization the minimum NSSE for the validation dataset E = 0% is used as stop criterion.

Nonlinear modelling using local ARX models

For the NARX representation using local ARX models, the prediction model is defined as

hm(t) = f(Q,$(t - 1)) N

= E(@ + QT($(t - - 1) - -a $.))Wi($(t - 1)) i=l

and for the simulation model this becomes

h&) = f ( b @ - 1)) N

i=l

The global NARX model is

- 1 I - gi>)wi(9(t - 1))

constructed by interpolating the local ARX models with the normalized interpolation functions w; for i = 1,. . . , N . To formulate the normalized interpolation functions the validity functions p; have to be defined which depend on the operating point - 4. For the two-tank system the operating point is derived from the height in each tank:

4 = 1 hl 1 - I h 2 I

L J

In Fig. 4.9 the possible operating points and the contours of the validity functions for N = 12 local models are shown. The validity functions are Gaussian functions as described

32

Page 33: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

h2

0.5 4”

Figure 4.9: Definition of operating points for the local models.

in Section 2.2 with the same weight matrix for all the local models:

o 0.001 o.oo2 O 1 The operating points 4 . , where the local models are valid, are summed in Table 4.2. The normalized interpolation functions are defined by the validity functions and are depicted in Fig. 4.10.

-a

Local model 1 2 3 4 5 6 7 8 9 10 11 12 hl 0.2 0.2 0.2 0.4 0.4 0.4 0.6 0.6 0.6 0.8 0.8 0.8 h2 0.05 0.2 0.35 0.05 0.2 0.35 0.05 0.2 0.35 0.05 0.2 0.35

Table 4.2: Definition of operating points for the local models.

33

Page 34: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Normalized interpolation functions w-i

1

Height in tank 2, h 2 Height in tank 1 h-3

Figure 4.10: Interpolation functions for the twelve regimes.

By substituting hml, hm2 in hl, h2 the formulation for the simulation model is found. The presented definitions of the validity functions and normalized interpolation functions are independent of the structure of the local model, i.e., local ARX model or local state space model. Hence, the definitions are valid for both the modelling methods.

For the parameter estimation of the prediction model the normal equations described in Section 2.2.1 are solved.

The parameters for the simulation model are optimized with a standard iterative least squares solver leastsq from MATLAB. The optimal parameters for the prediction model are taken as the initial parameters for the optimization of the simulation model. As for the dynamic optimization with the recurrent network, optimization is performed only with the dynamic part of the training and validation dataset.

Nonlinear modelling using local state space models

The local state space models are continuous time simulation models. Therefore, no difference between prediction and simulation models has to be made. The obtained global model can be used f ~ r both model structures. Interpolation of the local state space models uses the same validity and normalized interpolation functions as for the local ARX models described in the previous section.

34

Page 35: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

The local state space models for operating point 4 . with i = 1,. . . , 1 2 can be written as -a

Ax. -a = ai+Ai&+Bu

where

The global model is composed of the local state space models 8s fo!lows

12

- h = C(U~ + AiAgi + Bg)wi($) i=l

4.2.2 Results and discussion

The results of the optimizations of the different modelling techniques are given in Tables 4.3-4.5 and Fig. 4.11-4.13. The results represent the normalized sum of squared errors tested on the validation dataset. For the identification of a prediction model the dynamic and static part of the validation dataset are considered where for the simulation model only the dynamic part of the validation dataset is used.

Modelling method NSSE Neural network 2.4836e-04 Local ARX models 2.4997e-04 Local state space models 2.5023e-04 Linear model 3.4584e-04

Table 4.3: NSSE for prediction model using different modelling methods.

From Table 4.3 and Fig. 4.11 can be concluded that the differences are neglectable for the prediction models using the different nonlinear modelling approaches. Comparing the nonlinear modelling methods with a linear model, which is a linearized model about h = [0.4 0.2IT, the difference is very small. The main reason for this small difference is the large time constant of the system combined with the one step ahead prediction. The dynamics are too slow to distinguish nonlinear modelling benefits over the linear model.

The next step is to test these prediction models as simulation models. For the ease of comparison with the simulation models, the NSSE given in Table 4.4 are obtained with the dynamic part of the validation dataset. The first two black box NARX prediction models

35

Page 36: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Zoom section of validation dataset compared with linsai model

Time

(a) Tank 1

Zoom Section of validation dataset compared wth itnear model 1 , I i , , ,

006-

004-

002; , , , , , , 100 150 200 250 300 350 400 450 500 550

Time

(b) Tank 2

Figure 4.11: Validation dataset versus prediction linear model response.

perform less accurate as simulation model as for the one step ahead prediction. These two models need a dynamic optimization to increase the performance as simulation models. The local state space models and the linear model are continuous time simulation models and therefore there performance is optimal as in Fig. 4.12.

- Modelling method NSSE Neural network 8.5623e-04 Local ARX models 1.940e-02 Local state space models 2.7587e-04 Linear model 4.010e-03

Table 4.4: NSSE for prediction model used as simulation model.

In Table 4.5 the NSSE for the dynamic optimized simulation models are given. The optimization for the neural network is discussed in previous sections and the result compared with the prediction neural network model used as simulation model is given in Fig. 4.13. The dynamic optimization of the local ARX models appeared to be difficult due to bad conditioning of the optimization problem. Further research should be done to get good simulation local ARX models. On the other hand, with the results of the local state space models a best expected performance of the simulation local ARX models is given. Comparing the nonlinear modelling approaches to the linear model a performance increase of factor 15 to 40 is reached.

Modelling method NSSE Neural network 1.0458e-04 Local ARX models Local state space models 2.7587e-04 Linear model 4.010e-03

Table 4.5: NSSE for simulation model using different modelling methods.

36

Page 37: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Zoom section of validation dataset compared wilh various models Zoom section of validation dataset compared wiih various models

06

o 5

~ 0 4 I

-03 oi

- 2

c $02 c

o 1

O

200 400 600 800 1000 1200 1400 1600 Time

(a) Tank 1

Figure 4.12: Validation dataset

O 200 400 600 800 1000 1200 1400 1600 Time

(b) Tank 2

versus various model responses.

Zoom section of validation dataset compared wth two neural models

1

o 9

O 8

07 T

c' $0 5

YO 6

z

$04

03

O2

o 1

O

c

200 400 600 800 1000 1200 1400 1600 Time

(a) Tank 1

Zoom section of validation dataset compared wth two neural models

05

O45

0 4

TO 35 0 :I 0 3 z P O 25 1 2 o2

O 15

o1

O 05

O O 200 400 600 800 1000 1200 1400 1600

Time

(b) Tank 2

Figure 4.13: Validation dataset versus two neural network model responses.

The composition of the local models, defined by the operating point -a 4 . and validity func- tions p i , depends on the a priori knowledge of the nonlinearities in the system to be modelled. For the two tank system, the nonlinearities are a function of the two tank heights and not of the two input flows. Hence, the choice of the local model definitions along the two tank heights is evident which results in a two dimensional validity function. The number of local models increases exponential with the dimensions needed to construct the validity functions. For example, 3 local models along n dimensions give 3n local models. The increasing number of local models will also increase the number of parameters to be identified.

One of the most important parts of the identification for all the modelling variants is the training and validation dataset. As stated before, the training dataset has to excite all the system 'modes' in a specified frequency range due to the nonlinear characteristics of most systems which can represent various production processes. In the two-tank system example

37

Page 38: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

a dataset can be simulated and the system outputs can be investigated on its characteristics, e.g., whether all system 'modes' are excited or whether the whole operating range of interest is covered. These experiments are normally not allowed in a real production process due to pro- duction waste and loss of production time. For the local modelling approach another problem arises: are all the local models persistently excited to identify them? To answer this question the global dataset should be filtered by multiplying this dataset with the validity function belonging to the local model under consideration. In other words, the global dataset is split in the same number of datasets as there are local modeis chosen. The obtained datasets can be investigated on the previously addressed properties and can be used for the identification of the separate local models. On the other hand, experiments for the identification of linear models about an operating point are commonly performed on production processes. These linear local models are used in linear model based control schemes, e.g., Internal Model Con- trol [14, 151. These identification datasets are nothing more than the filtered global dataset belonging to each local model. Therefore, these experiments should be performed at the predefined operating points corresponding to the local models or the operating points of the local models should be defined by the datasets at hand. The main advantage is the use of familiar and allowable experiments. A disadvantage is the number of experiments needed, which can be large, to construct an accurate global nonlinear model.

Besides this nonlinear natwe, production processes are often time wrying. The r,on!ir,ear model should be adapted on-line to compensate for the changing dynamics of the plant. For slow dynamic changes both black box models, ie . , neural networks and local ARX models, can be adapted using on-line optimization techniques, e.g., Back-Propagation or least squares methods. The advantage of using the local model approach is the adaptation of only the models valid for the current operating regime. This will not change the dynamics of the nonlinear model outside the "active" local models. For a neural network model, which is one global model, this is not the case with the possibility of losing knowledge of the dynamic properties outside the current operating conditions.

4.2.3

Due to constraints on the inputs and outputs of the two-tank system, the model based pre- dictive control algorithm is chosen to control the system. First, the controller parameters and constraints have to be specified. Second the various nonlinear models are used in the MPC scheme and the performance is compared.

Nonlinear model based predictive control

Const ra in ts and controller parameters

The constraints for both the inputs and outputs are inequality constraints which are defined as followed

O 5 Fi I 0.2 O I F2 I 0.1 0 I h m i I 1 O I h,z I 0.5

The prediction horizon and control horizon are both set to 5 samples and the weight matrices of the objective fEnction which has t u Se Einimized are

38

Page 39: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

= [:, i ] In Fig. 4.14(a) the reference trajectories for the two-tank system are shown with the MPC performance using the real system as model. This is the optimal performance subjected to the constraints as can be seen in Fig. 4.14(b) where the input constraints are valid.

I '0 50 100 150 2

Tlme 250 300 350

O 2

o 18

O 16

O 14 - I >o12

1 -

o i

o O8

O 06 2

O O4

o o2

O O 50 i 00 150 200 250 300 350

Time

(a) Reference trajectories and optimal tracking (b) Control inputs subjected to constraints

Figure 4.14: Optimal performance for desired trajectories subjected to input constraints

Results and discussion

The results of the nonlinear MPC scheme using the various simulation models are compared with the optimal performance shown in Fig. 4.14(a). In Table 4.6 the sum of squared errors are given, where the error is the optimal performance minus the performance obtained with the simulation model under consideration. The control performance using the nonlinear models is

Modelling method SSE Neural network 6.5156e-04 Local ARX models -

Local state space models 8.5245e-04 Linear model 2.3038e-03

Table 4.6: SSE of control for different model types.

better than the linear MPC. The differences are not very large due to the small nonlinearities and robustness of the MPC scheme. Again, the result of the local state space models is the best performance obtainable from a simulation local ARX model.

39

Page 40: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

4.3 Indirect inverse control of a nonlinear MIMO System

In this section a simulation study of a nonlinear two mass damper spring system will be discussed to illustrate the indirect inverse control scheme. The nonlinear system is shown in Fig. 4.15. The duffing spring is responsible for the nonlinear behaviour of the system. System

q2, u2 7732

/ ///////////A

Figure 4.15: Two mass damper spring system

constants are m1 = m2 = 1, b = 1, k = 1 and p = 0.1. The continuous state space differential equations of the system are defined as followed

where x is the state

The displacements of the masses are measured with a time delay of 0.25 seconds,

q i ( t - 0.25) - y ( t ) = [ q2(t - 0.25) ]

The nonlinear model and N-controller will be identified using a recurrent network repre- sentation,

-m Y = N(y,(k - 1 h J k - 2) ,u(a-L(k - l),@m)

= JJ(yTefw,gm(k - $Y -m (5 - 2) , i (k - W c )

for the simulation model and

-

for the N-controller. For the identification of the nonlinear simulation model and controller, the system is excited with white noise with a magnitude covering the whole dynamic range

40

Page 41: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

of interest and the time delay is removed from the dataset. The dataset, 1000 samples at a sampling frequency of 20 [Hz], is equally split in a training and validation dataset. The parameters of the model and the controller are optimized with the Levenberg-Marquardt method.

The values for the parameters of the innovation signal & ( k - d), where the closed loop system still was found to be stable, are

K = 0.01 T; = 0.05 r d = 0.05

and the time delay d equals 5 samples.

(ii) robustness. Both features are performed with and without the innovation signal. Two features of the control schemes are tested and compared, i.e., (i) servo behaviour and

4.3.1 Servo Behaviour

An important aspect of the control scheme is the ability to decouple the outputs of the nonlinear system. This is tested with the following reference trajectories:

i k

20 y i r e r ( k ) = --(i - e - z )

1 k

10 yz,,,(k) = -(i -e-””)

In Fig. 4.16 the tracking errors for both the outputs are shown. The tracking errors become zero with the innovation signal added to the model outputs.

Trackmg emr for y_l_ref=-l120’(1 -exp(-ki75)) Tracking ermr for y_Z_ref=l I1 O’(1 -exp(-MS))

O 100 2M) 3W 400 500 600 700 800 9M) 1WO O 1W 200 3 W 4W 500 600 700 800 9W k k

Figure 4.16: The tracking errors e1,e2 for first set of reference trajectories

The servo behaviour is also tested with other reference trajectories 1 27rk 2Tk

20 200 150 yiTef(k) = -sin(-)cos(--)

30

In Fig. 4.17 the tracking errors are plotted and again improves the innovation signal the performances of the control scheme significantly.

41

Page 42: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Trackmg enor of y~2~ref=i/iO.(i-e~(-i/25))

N 6 - a'

O 1W 200 3W 4W 500 600 700 800 900 1000 k

Figure 4.17: The tracking errors e1,e2 for second set of reference trajectories

4.3.2 Robust ness

To determine the robustness of the proposed control scheme a disturbance signal u is added to position 41 from time instance k = 300. Two different disturbance signals are tested, i.e.,

1 211 = -

3000 1 27rk

3000 300 112 = -sin( -)

The reference trajectories are the first set of trajectories defined in the previous section. The results of this set of reference trajectories

1 k

20 Yiref ( k ) = --(i - e-=) 1 k -(i - e-=)

10

and disturbance signal 211 are shown in Fig. 4.18. The additional innovation signal compen- sates the disturbance completely.

The tracking errors with the second disturbance signal 212 are shown in Fig. 4.19, where the additional innovation signal decreases the disturbance influence with a factor 10.

4.3.3 Conclusions

The control schemes decouples the outputs well and performs within an accuracy of 1% of the desired trajectories. Hence, the servo behaviour of the control scheme is good. The added innovation signal improves the tracking significant due to the 'observer' action. The robustness of the controller is good in the configuration with the additional innovation signal. This configuration seems to be an interesting scheme for further study.

42

Page 43: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

c - __,__l,------.--_.___

-1 -

-2

-3-

-4- 0'

-5

-6

-7

-8

-9

Figure 4.18: The tracking errors e1,e2 for disturbance 211

- - WSh lnnoYa1iQ0 %loa!

-

-

-

-

-

O 100 200 300 400 500 600 700 800 900 1wO

Tracking error of y_l_ref=-i/20'(1 -exp(-l<rr5)) o o1

o 008

o O06

O 004

o O02

- 0 ml -0 O02

-0 004

-0 O06

-0 O08

-oo10 100 200 300 400 500 600 700 800 900 1000 k

k

Figure 4.19: The tracking errors e1,e2 for disturbance 212

4.4 Nonlinear mass system

To illustrate the stability analysis for the special case of local state space models described in section 2.3, a piecewise linear mass system is considered.

During operation, most mechanical systems produce noise due to the excitation of the system itself. This noise production is in general a non desirable side effect of mechanical systems. For a class of mechanical systems, i.e., nonlinear dynamic systems, it might be possible to reduce this noise production by controlling the excited system. In this chapter a one degree of freedom mechanical system will be studied which illustrates the noise production and the noise reduction by controlling the excited system.

4.4.1 System description

The considered system is pictured in Fig. 4.20 where q is the measured position of the excited mass m, k is the nonlinear spring, b is the damping, p is the harmonic excitation and u is the control input. This system can be described with the local state space modelling approach as

43

Page 44: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Figure 4.20: Nonlinear one degree of freedom dynamic system.

explained in Section 2.3. With this method the following system description is found n

where

- x =

c =

[ K I O 1

-b m

B2

1 v y < o o v y > o

o v y < o 1 v y 2 0

i i

44

Page 45: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

4.4.2

For the autonomous case, the system can be written as the following differential equation

Stability analysis of the autonomous system

- a = A ( d i

y = ci where A(y) is a convex combination of Al, A2 for all y or

A(y) E co(A1, A2) 'd Y

This system is asymptotically stable if there exist a K = KT > O such that

A ~ K + K A ~ < o A t f K f K A 2 < O

If such K exists then the considered autonomous system is stable irrespective of how fast the position variations of A(y) take place. In this case a quadratic storage function V ( g ) = gTK: is found. A feasibility test is performed on these LMI's with an infeasible outcome. This means for this test the system is not quadratic stable.

To redüce conservatism of the quadratic stability test, qüadïatic Lyapünov fiinctions for piecewise linear systems are considered. In this case a candidate Lyapunov storage function is of the form

where P and q E #? are chosen so that both quadratic forms are positive definite. Note that the Lyapunov function candidate is constructed to be continuous and piecewise quadratic. The search for appropriate values of q and P can be done by numerical solution of the following LMI's

P > O A T P + P A ~ < o

P+qCTC > o AT(P + qCTC) + ( P + qCTC)A2 < O

with C = [i O ] . With the LMI Toolbox in MATLAB the LMI's where tested feasible. Hence, one global quadratic Lyapunov function is obtained. The level surfaces of the computed Lyapunov function is plotted with dashed lines in Fig. 4.21. The solid line is the response of the autonomous system with initial state

xo= I -l J -0.1 -

45

Page 46: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

Traiectories of the switchina svstem.

Figure 4.21: Level surfaces of Lyapunov function and response of autonomous system.

4.4.3 Harmonically excited system

If the above described system is excited harmonically this will result in two possible periodic solutions for y within some excitation frequencies. These two periodic solutions are:

o an unstable harmonic solution yh with the same frequency as the excitation frequency.

o a stable 1/2 subharmonic solution g1/2h with half the frequency as the excitation fre- quency.

Fig. 4.22 shows both solutions for an excitation frequency f e = 37 [Hz]. The nonlinear dynamics is best illustrated in the acceleration figure where a bend in the acceleration of the solutions is seen when the position changes its sign.

The noise level produced by this excitation is a function of the amplitude of the solution. From the figures can be stated that the unstable harmonic solution will reduce the vibration level due to the lower amplitude of its solution than the stable subharmonic solution. This vibration reduction might be accomplished by controlling the excited system with the control input u. In order to design a control input with minimal control effort, which locks the solution y to the unstable harmonic solution yh, the error equation is formulated with e = yh - y:

mih + b$h + Sigh + fnz(yh) = Asin(wt) mj + by + Sly + f n i ( y ) = Asin(wt) + U

which by substitution leads to

më + b6 + h e + f n z (yh ) - f n i ( y ) = -u

or

më + be + h e + fnz (yh) - fn i (gh - e ) = -u

46

Page 47: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

, ' L

-0.1

-0.2 -2

-0.3

-2.5

(a) Position for both solutions (b) Velocity for both solutions

- ., ' '

: I .

I $ I

. s : r . , . I , . , -

; , . I :

, '.-<'

20

( c ) Acceleration for both solutions

-. , : , \

-

Figure 4.22: Two possible solutions Y h and Y1/2h

-50

-60

where

< ' $ 1 , I $ 1

- .,

Now the nonlinear error equation can be divided in four linear error equations for four different regimes. These are:

më + b& + k i e + k2e = k 2 y h - u e I Yh A Yh < O rnë + b i + k;e + kae = -u e 5 Y h A Yh 2 0 rnë + b i + k ie e > Y h A Yh 2 0 më + b i + k ie - -U e > Y h A Y h < 0

= -k2Yh - u -

47

Page 48: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

4. Simulations

4.4.4 Controller design

Now it is possible to design a controller for the four regimes separately. The objective is to find a stabilizing controller that results in the same stable linear equation error for the four regimes. Possible control inputs for the four different regimes are:

U = k2Yh- k2e v e 5 Y h AYh < 0 u = -k2e e 5 Y h A Y h 2 0 o, w = -ky?Ji, Y e > 3 h A 3 h 2 O u = o e > Y h A Y h < 0

which gives for the error equation mëf b6 f k i e = O . During simulations this control strategy performs well as shown in Fig. 4.23. In Fig. 4.24 the needed control input u is pictured which

O O 1 O 2 O3 04 O 5 O 6 07 0 8 O 9 1 Time Time

Figure 4.23: Simulation results.

shows the discontinuous characteristics of the controller. Furthermore, it can be concluded that the control input decreases which meets the objective to design a low effort stabilizing controller.

Figure 4.24: Control input.

48

Page 49: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Chapter 5

Conclusions

For the modelling of nonlinear systems two black box modelling methods based on NARX models can be used. These NARX models for the identification of either prediction or simu- lation models are represented by

o Neural networks

o Local ARX models

The choice of the nonlinear optimization procedure during the identification of the mod- els depends on the purpose of the model. When the model is a one step ahead predictor the optimization is static where for a simulation model this is dynamic. For the neural network representation, the static optimization Levenberg-Marquardt method was extended for the identification of simulation models (dynamic optimization). The dynamic learning algorithm assures a stable optimization procedure due to the computation of more accurate sensitivity functions. For the local ARX models representation, the unknown parameters in the predic- tion model are determined by solving normal equations. The optimization algorithm for the simulation local ARX models has to be developed yet. The dataset, used during identification, should excite all the system 'modes' in a frequency range of interest. For nonlinear systems persistent excitation alone is not sufficient and ran- dom excitation is required with a magnitude covering the whole dynamic range of interest. The dataset is split into two parts, i.e., a training dataset and a validation dataset. The opti- mization, which minimizes an objective function, is performed with the trainings dataset and the validation dataset is evaluated every iteration. The numerical optimization is terminated by a stop criterion, e.g., when the objective function evaluated with the validation dataset is minimal.

The performance obtainable from the various nonlinear modelling methods depends on the complexity of the problem. For a complex system with strong nonlinearities, the construction of the local models might be expensive due to the large number of local models needed to obtain an accurate model. This means also an increase of (i) the number of parameters to be identified and (ii) the size of data needed to identifiy these parameters. On the other hand, the definition of the neural networks, e.g., number of hidden neurons or number of layers, is not an obvious matter. Hence, the choice of modelling type should be considered carefully using all the information and data of the system to model.

49

Page 50: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

5. Conclusions

The control of the nonlinear systems based on the nonlinear models is demonstrated for two control schemes, i.e., nonlinear model based predictive control and indirect inverse control. The nonlinear MPC scheme, handling constraints, gives better performance than the linear MPC scheme. Though the differences are not very large due to the small nonlinearities in the shown example. The indirect inverse control is tested for a nonlinear system with dead time. With an additional innovation signal, which can be seen as an 'observer action', the control scheme compensates (i) modelling errors and (ii) disturbances. The parameters of the innovation sigoal are lim-ited by the dead time cawing wstable closed loop behxrioiir.

For a special case of local models, i.e., local state space models, a stability study can be performed by solving Linear Matrix Inequalities. A continuous quadratic storage function (Lyapunov) was found for an autonomous nonlinear mass system. For the harmonically excited system a low effort controller is designed which locks the excited system in an unstable periodic solution with a lower amplitude.

50

Page 51: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Chapter 6

Recommendations

In this last chapter, recommendations will be given for further research. The dynamic optimization for the simulation local ARX models give problems with the

optimization tools at hand. A Levenberg-Marquardt algorithm using the knowledge of the local ARX model structure could be an improvement in conditioning terms and convergence speed. Together with the algorithm for the optimization of the neural networks these tools may tackie various modelling types and problems.

An on-line adaptation mechanism of the nonlinear model is needed when the process under consideration is time varying. For both neural networks and local ARX models these on-line adaptations are possible and the algorithms are at hand. The local models seem to be more appealing for this purpose due to the selective update of the dynamic characteristics of the model.

Most production processes show dead time between inputs and outputs due to for instance delayed measurement of the outputs. This normally means loss of bandwidth for the controlled closed loop system. To overcome these problems, the dead time can be modelled in the local models to obtain one nonlinear simulation model with dead time between inputs and outputs. The model predictive control scheme, with a prediction and control horizon larger than the largest dead time, will in combination with this model be a good choice to improve the quality of the automatic control.

The stability study for the local state space models should be extended to cover a larger range of models. With the LMI theory an optimal control synthesis for the control of nonlinear systems can be deduced. It may also be possible to describe the optimization performed in the MPC scheme in an LMI description based on the local state space models.

51

Page 52: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

[i] S.A. Billings and W.S.F. Voon. Least squares parameter estimation algorithms for non- linear systems. Int. J. Systems Sience, 15:601-, 1984.

[2] I. J. Leontaritis and S.A. Billings. Input-output parametric models for non-linear systems. Int. Journal of Control, 41:303-344, 1985.

[3] K.J. Hunt and D. Sbarbaro R. Zbikowski P.J. Gawthrop. Neural networks for control systems- a survey. Automatica, 28:1083-, 1992.

[4] K.S. Narendra and K. Parthasarathy. Identification and control of dynamical systems using neural networks. IEEE Transactions on Neural Networks, 1(1):4-27, March 1990.

[5] T.A. Johansen and B.A. Foss. Nonlinear local model representation for adaptive systems. Int. Conf. on Intelligent Control and Instrumentation, 2:677-682, February 1992.

[6] W. J. Bouman. Systeemidentificatie met neurale netwerken. Master’s thesis, Eindhoven University of Technology, Januari 1994. Faculty of Physics NR-1853.

[7] E. Levin and R. Gewirtzman F.G. Inbar. Neural network architecture for adaptive system modelling and control. Neural Networks, 4:185-191, 1991.

[8] W.H. Schiffmann W.H. Geffers. Adaptive control of dynamic systems by back propaga- tion networks. Neural Networks, 6:517-524, 1993.

[9] P.P.J. van den Bosch and A.C. van der Klauw. Modeling, Identification and Simulation of Dynamical Systems. CRC Press, Inc., 1994.

[lo] P.J. Werbos. Backpropagation through time: What it does and how to do it. Proceedings of the IEEE, 78(10):1550-1560, October 1990.

[li] S. Boyd and L.E. Ghaoui E. Feron V. Balakrishnan. Linear Matrix Inequalities in System and Control Theory. SIAM, 1994.

[la] C.E. Garcia and M. Morari. Internal model control. 1. a unifying review and some new results. Ind. Eng. Chem. Process Des. Dev., 21:308-323, 1982.

[13] C. Cutler and B. Ramaker. Dynamic matrix control: A computer control algorithm. Proc. 1980 Joint Automatic Control Conference, 1980.

[14] A.C.P.M. Backx and A.A.H. Damen. Identification of industrial mimo processes for fixed controllers. part 1: General theory and practice. Journal A , 30(2):3-12, 1989.

52

Page 53: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

BI B LIOG RAPHY

[15] A.C.P.M. Backx and A.A.H. Damen. Identification of industrial mimo processes for fixed controllers. part 2: Case studies. Journal A , 30(2):33-43, 1989.

53

Page 54: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

Appendix A

What is a neural network?

A neural network consists of neurons and connections between them. This the following diagram:

Network input

X -

Network

t

Y2 ___)

output

is illustrated in

O Neuron ~ Connection

Figure A.l: Neural Network.

The network used is a feedforward multilayer perceptron network which means the network input is propagated forward to the network output. Each neuron incorporates a differentiable, nonlinear, monotonic increasing biased function, e.g., a linear function or a sigmoïd function. In Fig. A.2 these two functions are characterized. Although other activation functions are possible these two functions are the most common used activation functions. The output of each neuron is the outcome of the biased function of the neuron input

Y = f(.+b) where

y = neuron output f = neuron function x = neuron input b = bias

A neural network consists of several layers of one or more neurons. The neurons of two consecutive layers are connected with weights. In other words, the input of a neuron in the

54

Page 55: Modelling and control of nonlinear dynamic systems - TU/ealexandria.tue.nl/repository/books/521664.pdf · Modelling and control of nonlinear dynamic systems R.H.A. Hensen Report No.

A. What is a neural network?

X

1

0.5 /--. -n

+ o H v

%--0.5

-1

X

(a) Linear activation function (b) Sigmoïd activation function

Figure A.2: Two common used activation functions

second layer is the sum of weighted outputs of all the neurons of the first layer I-1 1-1 = CWij Y i

i

where

xj 1 = input o f j th neuron in zth layer

w!T1 = weight of output of ith neuron in ( I - l)th layer 83

y;-l - - output of ith neuron in ( I - layer

For a two layer neural network, which is considered in this report, the following matrix representation can be given

-1 y = f i(Wii+b,)

-2 Y = f 2 ( W 2 Y 1 + d 2 ) = fi(W2 (f i(W1i + b d + b2)

where

- - Y1

Y2

fi =

f 2 =

wi =

w2 =

bi =

bz =

- -

- x =

output vector of hidden layer output vector of neural network neuron function in hidden layer neuron function in output layer weight matrix between input vector g and hidden layer weight matrix between hidden layer and output layer input vector of neural network bias vector of hidden layer bias vector of output layer

55


Recommended