nonlinear system modelling using output error ... - Semantic Scholar

1 downloads 0 Views 170KB Size Report
email: {G.Gray|D.Murray-Smith|Y.Li|K.Sharman}@eng.gla.ac.uk. Keywords: Parameter identification, Nonlinear models, Local model networks, Model validation.
NONLINEAR SYSTEM MODELLING USING OUTPUT ERROR ESTIMATION OF A LOCAL MODEL NETWORK

Gary J. Gray, David J. Murray-Smith, Yun Li & Ken C. Sharman Centre for Systems and Control & Dept. Electronics and Electrical Engineering University of Glasgow Glasgow, Scotland, UK. email: {G.Gray|D.Murray-Smith|Y.Li|K.Sharman}@eng.gla.ac.uk

Keywords: Parameter identification, Nonlinear models, Local model networks, Model validation. ABSTRACT The local model network is a set of models, each describing the same dynamic system but at different operating points. The outputs of these local models are weighted according to the current operating point and summed to give the local model network output. A local model network can be constructed from nonlinear continuous local models. The parameters of the local models can be identified using output error or maximum likelihood estimation. The results of this parameter identification can then be used as part of a structural estimation procedure indicating how parameters change with system parameters. This network can be simulated using a variable step length algorithm in a format amenable to a standard simulation program. An example is given in which the flow in a coupled tank system is analysed. INTRODUCTION It is often the case that one physical model cannot represent the complete operating range of a dynamic system. System dynamics can change significantly with a change in the system operating conditions. Local model networks represent such a system with multiple models. Each local model is valid for a specific operating region. The parameters of the local model network can be identified using data encompassing the complete operating range of the system. Many parameter estimation algorithms are available (Beck and Arnold 1977; Iliff 1989), but if the parameters are identified using an output error method, the estimates are less affected by measurement noise and there is more flexibility in the selection of experimental data. The resulting parameter estimates can be used to identify how the model structure changes with operating point.

This paper concerns estimates of numerical parameters of nonlinear local models within a local model network. An output error method is used to estimate the local model parameters and an efficient method of simulating such local model networks is presented. LOCAL MODEL NETWORKS 1

f^1 (

)

y^1



2

f

^( ) 2

y^2



)



P nA

f^nA (

y^

)

y^nA



Figure 1 General architecture of a local model network Local model networks were developed by Johansen and Foss (Johansen and Foss 1992, 1993). A local model network is a set of models weighted by some activation function as in Figure 1. The same input signal is fed to each model and the outputs are weighted according to some scheduling variable or variables, ϕ, (1) where y(t) is the model network output, ρi(ϕ) is the basis function of the i’th model, n is the number of models, and yi(t) is the local model output and a function of time. The weighting or activation of the local model is calculated using an activation function. An example is the Gaussian equation (shown in Figure 1), (2)

where ρ is the activation, ϕ is the scheduling variable, ci is the centre point and σi is the width for that particular local model. Activation is a function of the scheduling variable, which could be a system state, an input, or some other system parameter. It is also feasible to schedule on more than one variable and to establish a multi-dimensional local model network (Murray-Smith 1994b). The basis functions are normalised so their sum is equal to unity at every point. Figure 2 shows an example of the basis function plot for an evenly-spaced, five model, onedimensional local model network using a Gaussian activation function.

prediction method - the discrete time equations describing the system are solved for the parameters. This method assumes that all the necessary data are available and of good quality. For linear systems, this can be done using singular value decomposition. This is analogous to equation error estimation in the continuous time domain. In equation error or onestep identification, the individual differential equations describing the system are solved for the parameters using force data. i.e. the data is the derivative of the state variable. (3) where x is the state vector and u is the system input. Such data is not always available or of as high quality as state data. Equation error estimation requires the derivatives of all the states. If this means that data has to be differentiated, noise problems can result. Equation error estimation is also prone to bias errors in the parameter estimates due to measurement and process noise. IDENTIFICATION OF A CONTINUOUS TIME LOCAL MODEL NETWORK USING OUTPUT ERROR ESTIMATION

Figure 2 Basis functions of an evenly spaced local model network with Gaussian activation functions The individual component models of a local model network could be different nonlinear models of widely varying structure. However, a common configuration is for each model to have the same linear model structure and for certain model parameters to be different for each model. Usually these models are discrete but continuous models are also possible (Murray-Smith 1994b). These parameters can then be identified from experimental data (Gawthrop 1995). There are two components to identifying a local model network - its structure and its parameters. The network structure is the number of local models, their respective centres and widths, and the activation function. The local model network parameters describe the local models themselves. These parameters could be the complete set of coefficients for a linear model, numerical parameters of a nonlinear model, or even switches which altered the local model structure. For linear models, parameter identification is often done in the discrete domain with a one-step

In output error estimation, the system equations are integrated to give model output and the error between data and model output is minimised. Output error estimation is robust to Gaussian measurement noise and if a maximum likelihood cost functions is used, it is also robust to process noise (Maine and Iliff 1981). Output error estimation is often more convenient as state data is usually more reliable and more readily available than derivative data. It is also not necessary to have data for every output in a multi-output system. The estimation can be weighted towards the outputs for which the data is considered most reliable. The cost function is usually minimised using some kind of Gauss-Newton optimisation, in this case incorporating a modification derived by Box and Kanemasu and later modified by Bard (Beck and Arnold 1977). Local v. Global Estimation There are two ways of identifying the local model parameters of a local model network - local estimation and global estimation. In local estimation, each local model is identified individually. That is, the local model is identified from the experimental data by weighting the estimation with the basis function time history for that particular local model. This means that the estimation is biased around the

centre point of that particular local model. Local estimation works well for discrete systems (MurraySmith 1994b) as it gives local models which have some meaning in that operating region and that can be considered independently from the other local models in the network. However, local estimation can only work with single point or equation error estimation. Equation error estimation is not always possible because experimental data for all the equations is required and it should have low levels of noise contamination for reasonable estimation results (Beck and Arnold 1977). In output error estimation, the model states are integrated from time zero with the recorded test input. This means that the states of each local model must be integrated from the start time, even if that local model is not activated until a later time in the simulation effectively meaning that the local model is being used outside its zone of activation. The estimation algorithm will be attempting to fit everything from the simulation start time to the local model zone of activation instead of just the area of activation so not just the local model is estimated and the local model estimation results are meaningless.

model, this could be used as a tool for structure determination. A plot of the estimated parameters against centre point positions could give valuable insight into model structure. The outcome of this structure estimation process shows how system dynamics change with system operating point. This information could give insight into physical model structure or it could be used to validate nonlinear models of the system. The parameters should of course be estimated with different data sets and input shapes to validate this element. SIMULATION OF A CONTINUOUS TIME LOCAL MODEL NETWORK To evaluate the output of a local model network, the output of each local model must be calculated, then multiplied by the relevant basis function, then summed to give the network output (Figure 1). For a discrete system, this updating can be done at the sampling interval (Johansen and Foss 1992), but this update time is not so obvious for continuous systems. Each model is integrated over some time interval, tu, (4)

The solution is to use global estimation with an output error technique. Global estimation is where all the local model parameters are estimated together treating the network as one large model. This could mean that the individual local models have less relevance on their own since they have been identified only as part of a network (Murray-Smith 1994b). The output error method does however give better results when available data is restricted and contaminated with noise as is often the case with real dynamic systems. Model Structure Estimation from Local Model Network Identification Results The output of the identification is a set of models - each valid at a different part of the scheduling space according to the local model centre point, activation function shape and width. The network can be taken as a whole to give a nonlinear representation of the dynamic system being modelled (Gollee 1994). Each individual local model can also said to be representative of the dynamic system in its operating region. A third interpretation results from an investigation of how the local model parameters vary with the scheduling variable. With careful selection of the parameters to be estimated in each local

where yi is the local model output, fi is the function describing the local model, and tj is the start time of the interval. The outputs of these models at the end of this time interval are weighted and summed as in equation (1). This output is then used as the initial condition, y0 for the next time segment and equations (4) and (1) are iterated. Selection of the update time is not trivial. For accuracy, it should be as small as possible. One practical realisation of this would be the smallest integration step size of all the models. This would mean using a smaller than necessary step size for much of the integration substantially increasing computation time. A substantial computation overhead also arises from the necessity to integrate each individual model separately even where the models differ only in parameters, not structure. The subsequent weighting and summing of the local model outputs at regular intervals can also cause problems with implementation in some simulation programs perhaps necessitating dedicated simulation code for local model networks. It is possible to speed up the simulation substantially. As the update time tends to zero,

(5)

This means that the local model network can be simulated by weighting the derivatives of the states, summing them, and integrating the local model network as one model. This can only be done if the update time is taken to be zero at the limit. This is because the local states of each model are dependent on the local states of the other models because they are set equal to the global states (weighted sum of local states) at the update interval. A variable step size integration algorithm (interval halving) maintains accuracy by verifying that taking a shorter step would not improve accuracy by more than a specified tolerance. This operation can also be used to control the update time of the local model network and therefore integrate the local model network as one continuous system, (6) where te is the end time of the simulation. By summing the models before integration in this way, the number of states to be integrated is dramatically reduced, significantly speeding up the simulation. This set of differential equations has the same

number of states as each local model and is of a format that can easily be implemented in most proprietary simulation programs with the proviso that a variable step size integration algorithm is used. The practical realisation of this method is that if the local model structure is represented as a set of nonlinear differential equations, (7) the RHS of these equations need only be weighted by the basis function and summed to give the RHS of the differential equations describing the network thus, (8) Where a fixed step communication interval is necessary, for identification for example, this method can be used to integrate between the steps. EXAMPLE : THE TWIN TANK SYSTEM As an example, a coupled water tank system is (Murray-Smith 1994a) considered in this section. The system consists of two coupled water tanks with a connecting pipe between them, an input to the first tank, and an output pipe from the second tank. The system is nonlinear since even at the simplest approximation, the flow through the orifice varies as the square root of the water depth. The system is shown in Figure 4.

Figure 3 Results of local model network estimation of coupled tank system parameters cd1 and cd2

Local model network identification was used to determine how the two discharge coefficients (cd1 and cd2) vary with system state. The scheduling variable in this case was chosen to be H2 since this represents the pressure differential along the outlet pipe (affecting cd2) and also contributes to the pressure differential across the connecting pipe between tanks one and two (affecting cd1).A higher concentration of models at the lower values of H2 was employed because it was already known that the variation of cd2 at these values was greater.

vi

H1 H2 Q v1 Q vo

Figure 4 Twin tank system

It is known that for this system, the flow between the tanks and particularly in the output pipe is nonlinear and the main modelling error. By estimating the discharge coefficient of the outlet pipe (cd2 in equation (12)) as a local model parameter while scheduling on tank depth which is proportional to the pressure differential along the outlet pipe, an empirical relationship between flow and pressure differential can be established and this information could be used to help develop a model for the structure. The fluid flow in and out of the tanks is described by, (9)

(10) where Qvi is the flow into tank one, Qv1 is the flow from tank one to tank two, and Qvo is the output flow from tank two. A1 and A2 are the cross-sectional areas of tanks one and two respectively. H1 is the depth of the water in tank one and H2 is the depth in tank two. If the connecting pipe and the output pipe are assumed to be orifices, Bernoulli’s theorem applies and the flow can be calculated thus, (11) (12) where cd1 and cd2 are empirical discharge coefficients for the connecting pipe and the output pipe respectively, a1 is the area of the orifice between tanks one and two and a2 is the area of the orifice out of tank two.

The local model network parameters were estimated globally using an output error NewtonRaphson method. The experimental inputs were designed to give a ramp like response in H2 so as to excite every operating region of the local model network. A random binary pulse of magnitude 10% of maximum input size was superimposed on this signal. Two such experiments were run and the data from both sets and for H1 and H2 were used for the identification (Figure 3.a). The parameters cd1 and cd2 were estimated for each local model and this information was used to attempt to determine some relationship between these coefficients and H2. The distribution of the local model activation functions is shown in Figure 3.b. The results are displayed as plots of parameter value against scheduling variable with error bars derived from the Cramer-Rao bounds (Figure 3.c). The error bounds are larger where the local models are closer together. This is because those local models are effectively working with less data. The results show that cd2 varies significantly with the depth of tank 2 and that equation (12) is not valid for this range of operating conditions. With further experiments, the variation of cd2 with tank 2 depth could be determined more precisely and additional modelling methods employed to ascertain the nature of the flow in the outlet pipe. CONCLUSIONS A continuous time local model network can give a useful representation of a dynamic system. If the local models are of the same structure, they can be weighted and summed before integration substantially speeding up the simulation. This allows the local model network to be represented as a set of nonlinear differential equations which can be integrated on most proprietary simulation programs. Output error estimation can be applied to local model networks giving unbiased estimates even with noisy data and works with output data even when

not all the states are available. The parameter estimates of all the local models can give structural information - specifically, how some part of the model changes with operating condition.

Murray-Smith, R., 1994b, A local model network approach to nonlinear modelling, Ph.D. thesis, University of Strathclyde, Glasgow, Scotland.

The above methods were applied to the identification of the flow in the twin water tank system. The outlet pipe discharge coefficient cd2 was found to increase significantly at low levels of tank two water depth.

Gary Gray received a B.Eng. degree in Avionics from Glasgow University in 1989 and a Ph.D. entitled ’Development and Validation of Nonlinear Models for Helicopter Flight Mechanics’ from the department of Electronics and Electrical Engineering at Glasgow University. Since working for one year as a Royal Society research fellow at the DLR Institute of Flight Mechanics in Braunschweig, Germany, he has been employed as a Research Assistant in the Department of Electronics and Electrical Engineering at Glasgow University. Current research interests include the application of evolutionary programming methods such as genetic programming and simulated annealing to system modelling and control.

ACKNOWLEDGEMENTS This research is supported by the UK Engineering and Physical Sciences Research Council under grant GR/K24987 ("Evolutionary Programming for Nonlinear Control"). The authors would like to thank the other members of the evolutionary computing research group for their useful discussions. REFERENCES Beck, J.V. and K.J. Arnold, 1977, Parameter Estimation in Engineering and Science, John Wiley and sons, New York. Gawthrop, P.J., 1995, "Continuous-time local state local model networks’, Proceedings of 1995 IEEE conference on Systems, Man and Cybernetics, Vancouver, British Columbia. Gollee, H., K. J. Hunt, N. de N. Donaldson, J. C. Jarvis, and M. K. N. Kwende, 1994, "A mathematical analogue of electrically stimulated muscle using local model networks", In Proc. 33rd IEEE Conf. on Decision and Control, Lake Buena Vista, Florida, pp. 1879-1880. Iliff, K.W., "Parameter Estimation for Flight Vehicles", 1989, Journal of Guidance, Control and Dynamics, Vol. 12, No. 5:609-622. Johansen, T.A. and B.A. Foss, 1992, "A NARMAX model representation for adaptive control based on local models", Modelling, Identification and Control, vol. 13, no. 1: 25~39. Johansen, T.A. and B.A. Foss, 1993, "Constructing NARMAX models using ARMAX models", International Journal of Control, 58:1125-1153. Maine, R.E. and K.W. Iliff, 1981, "Formulation and implementation of a practical algorithm for parameters estimation with process and measurement noise", SIAM J. Appl. Math., Vol. 41, No. 3: 558~579. Murray-Smith, D.J., 1994a, Continuous Simulation, Chapman and Hall, London.

System

BIOGRAPHIES

David Murray-Smith was born in Aberdeen in 1941. He received his B.Sc.(Eng.) and M.Sc. degrees at the University of Aberdeen. Following a period of industrial employment with the Inertial Systems Department, Ferranti Ltd., in Edinburgh, he gained a temporary post at the University of Glasgow as an Assistant in Electrical Engineering. He was subsequently appointed to a post of Lecturer in the Department of Electronics and Electrical Engineering in 1967 and gained his Ph.D. degree from Glasgow University in 1970. Later he became a Senior Lecturer and Reader in the same Department and since 1985 he has held the position of Titular Professor. Born in Sichuan, China, Yun Li obtained a (1st Class) B.Sc. in Radio Electronics from University of Sichuan in 1984, an M.Sc. in Electronic Engineering from University of Electronic Science and Technology of China in 1987, and a Ph.D. from University of Strathclyde in 1990 (Thesis: Concurrent Architectures for Real-Time Control). During 1989 and 1990, he worked for Industrial Systems and Control Ltd., Glasgow, first as consultant Control Engineer for National Engineering Laboratory and later as post-doctoral Research Engineer for the company’s DTI sponsored Advanced Control Technology Club. He has been a Lecturer at the University since January 1991 and an Adviser of Studies since September 1995. Born in Glasgow, Ken Sharman obtained a B.Sc. in Electronics and Electrical Engineering (1st. class honours) and a PhD (Thesis: "Directional Spectral Analysis for Sensor Arrays") from University of Strathclyde, where he worked as a lecturer until 1989. Dr. Sharman joined the University of Glasgow in 1989, where he currently teaches Digital Signal Processing, Acoustics and Audio Programming.