## Modelling and prediction of load in heating systems

### Ken Sejling

The subject of the present thesis is the construction of a dynamic model of the heat supply to district heating systems, and further, the investigation and development of methods for making on-line predictions of the heat demand. A particular problem, which is of importance for control of plant supply temperature, is the model description of how the variation of plant supply temperature is determining for the variation of the heat supply.

A district heating system is a distributed dynamic system with considerable transport delays in the distribution of heat. In Chapter 2 an introductory account of the configuration of a typical district heating system is given. The delimitation of the system to the surroundings is specified, and the external variates influencing the system are discussed.

Heat exchangers are used in district heating systems for heat transfer between primary transmission net and attached secondary distribution systems, and between distribution systems and subscriber installations. Chapter 3 describes the modelling of a heat exchanger carried out by expressing conservation of energy and mass in each compartment of a lumped system description. The compartmental model structure is used with the purpose of obtaining an approximation to the distributed heat transfer in the heat exchanger. Expressing conservation of energy and mass for each compartment leads to a set of differential equations which, by introduction of process and measurement noise, constitutes a stochastic time-continuous state space model for the outlet temperatures of the heat exchanger. The fact that the heat transfer depends of temperature and flow rate of the water implies nonlinear state dependence on these variates. In the chapter approximations within the class of linear state space models are investigated. The estimation is carried out in the time-continuous model formulation meaning that the parameters are physically interpretable. An advantageous implication of this is that it is possible to assess and compare the parameter estimates with values obtained from physical constants, system dimensions etc.

If a model describing the supply of heat and its dependence on external effects, e.g. ambient air temperature, should be based on a combination of physically based component models, the complete model would end up being exceedingly complex. In the present investigation this is not considered to be a viable way of obtaining a model for the supply of heat. Instead different classes of models are considered, and within each class of model the appropriate structure and parameterization are determined using statistical methods. Chapter 4 describes the application of nonparametric regression to the disclosure of the heat supply dependence on time of day, ambient air temperature and supply temperature. The insufficiency of the linear model class is made clear, and the character of required model extensions is indicated.

Chapter 5 contains an investigation of the capability of various model classes to describe the dynamic relations between the required heat supply and explanatory variates. A model within the class of linear transfer function models is estimated. Extensions to the linear transfer function models are estimated consisting of the addition of (1) transfer functions from squared ambient air temperature and mass flow scaled supply temperature and (2) transfer functions from ambient air temperature and supply temperature, where the gains have a smooth threshold dependence on ambient air temperature and inverse mass flow, respectively. In addition neural network models of feed forward type with two layers of neurons are estimated. The result is that all of the nonlinear models are capable of giving an improved description compared to the linear model. When it comes to validation of the estimated models on a different set of data the nonlinear transfer function models show to give the best performance. The modelling results are supplemented by a description of how they are used for prediction, and the use of j-step predictors and multi-step predictors are motivated.

Chapter 6 describes the results of RLS estimation with exponential forgetting of linear models for j-step prediction of heat demand. Exponential forgetting is applied to allow the linear model approximate the nonlinear relations at the operating point. Likewise, exponential smoothing of the heat production of each hour of the week superposed a value for each hour of the day (for faster adaption to level changes) is investigated. This is introduced into a state space model with 192 state variables, for which the Kalman filter is applied for update of the state vector. The conclusion from the investigation is that for prediction on shorter term than 24 hours the best prediction ability is obtained using RLS estimation with exponential forgetting of a linear model with trigonometric diurnal profile. For increasing prediction horizon, j, the performance of the two methods approaches each other. This is due to the observed result that the weight of the predictions on a diurnal profile increases with j, and consequently, as both contain a diurnal profile, their prediction abilities turn out to approach each other.

In an on-line implementation of a model it is evident that collected data may be contaminated with errors occurring either in the recording or transmission of data or, for instance, in the case of a heat supplying system as a consequence of interruption of operation. Robust estimation methods may be applied to minimize the influence of erroneous data (outliers) on the parameter estimates. Chapter 7 discusses the issue of robust estimation for outliers of innovation type (deviations from assumed innovation density) and additive type (errors in observations). An approach for the derivation of recursive robust estimation algorithms, having the estimator given by a criterion to be minimized, is proposed and used to obtain two algorithms for recursive robust estimation with exponential forgetting of AR parameters. In a simulation study they are compared to RLS and a modification of RLS, where observations are treated as missing if the prediction error, compared to an estimated scale parameter, exceeds a specified bound. The simulations show that the derived algorithms give estimation results, which are similar to their off-line counterparts. However, it is also demonstrated that the crucial effect of additive outliers, resulting in severe bias on parameter estimates, is only down-weighted and not removed by any of the proposed estimation methods.