Top Banner
Institutionen för systemteknik Department of Electrical Engineering Examensarbete Fault Detection of Hourly Measurements in District Heat and Electricity Consumption Examensarbete utfört i Reglerteknik vid Tekniska högskolan i Linköping av Andreas Johansson LITH-ISY-EX-3637-2005 Linköping 2005 Department of Electrical Engineering Linköpings tekniska högskola Linköpings universitet Linköpings universitet SE-581 83 Linköping, Sweden 581 83 Linköping
71

Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Aug 04, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Institutionen för systemteknikDepartment of Electrical Engineering

Examensarbete

Fault Detection of Hourly Measurements in District

Heat and Electricity Consumption

Examensarbete utfört i Reglerteknikvid Tekniska högskolan i Linköping

av

Andreas Johansson

LITH-ISY-EX-3637-2005

Linköping 2005

Department of Electrical Engineering Linköpings tekniska högskolaLinköpings universitet Linköpings universitetSE-581 83 Linköping, Sweden 581 83 Linköping

Page 2: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without
Page 3: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Fault Detection of Hourly Measurements in District

Heat and Electricity Consumption

Examensarbete utfört i Reglerteknik

vid Tekniska högskolan i Linköpingav

Andreas Johansson

LITH-ISY-EX-3637-2005

Handledare: David Törnqvist

isy, Linköpigs universitet

Cecilia Malm

Tekniska Verken i Linköping AB

Examinator: Torkel Glad

isy, Linköpigs universitet

Linköping, 18 February, 2005

Page 4: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without
Page 5: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Avdelning, Institution

Division, Department

Division of Automatic ControlDepartment of Electrical EngineeringLinköpings universitetS-581 83 Linköping, Sweden

Datum

Date

2005-02-18

Språk

Language

� Svenska/Swedish

� Engelska/English

Rapporttyp

Report category

� Licentiatavhandling

� Examensarbete

� C-uppsats

� D-uppsats

� Övrig rapport

URL för elektronisk version

http://www.control.isy.liu.se

ISBN

ISRN

LITH-ISY-EX-3637-2005

Serietitel och serienummer

Title of series, numberingISSN

Titel

TitleFeldetektion av Timinsamlade Mätvärden i Fjärrvärme- och Elförbrukning

Fault Detection of Hourly Measurements in District Heat and Electricity Con-sumption

Författare

AuthorAndreas Johansson

Sammanfattning

Abstract

Within the next years, the amount of consumption data will increase rapidly asold meters will be exchanged in favor of meters with hourly remote reading. A newrefined supervision system must be developed. The main objective of this thesisis to investigate mathematical methods that can be used to find incorrect hourlymeasurements in district heat and electricity consumption, for each consumer.

A simulation model and a statistical model have been derived. The modelparameters in the simulation model are estimated by using historical data of con-sumption and outdoor temperature. By using the outdoor temperature as in-put, the consumption can be simulated and compared to the actual consumption.Faults are detected by using a residual with a sliding window. The second modeluses the fact that consumers with similar consumption patterns can be groupedinto a collective. By studying the correlation between the consumers, incorrectmeasurements can be found.

The performed simulations show that the simulation model is best suited forconsumers whose consumption is mostly affected by the outdoor temperature.These consumers are district heat consumers and electricity consumers that useelectricity for space heating. The fault detection performance of the statisticalmodel is highly dependent on finding a collective that is well correlated. If thesecollectives can be found, the model can be used on district heat consumers as wellas electricity consumers.

Nyckelord

Keywords Fault Detection, Hourly Measurements, District Heating, Electricity Consumption

Page 6: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without
Page 7: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Abstract

Within the next years, the amount of consumption data will increase rapidly asold meters will be exchanged in favor of meters with hourly remote reading. A newrefined supervision system must be developed. The main objective of this thesisis to investigate mathematical methods that can be used to find incorrect hourlymeasurements in district heat and electricity consumption, for each consumer.

A simulation model and a statistical model have been derived. The modelparameters in the simulation model are estimated by using historical data of con-sumption and outdoor temperature. By using the outdoor temperature as in-put, the consumption can be simulated and compared to the actual consumption.Faults are detected by using a residual with a sliding window. The second modeluses the fact that consumers with similar consumption patterns can be groupedinto a collective. By studying the correlation between the consumers, incorrectmeasurements can be found.

The performed simulations show that the simulation model is best suited forconsumers whose consumption is mostly affected by the outdoor temperature.These consumers are district heat consumers and electricity consumers that useelectricity for space heating. The fault detection performance of the statisticalmodel is highly dependent on finding a collective that is well correlated. If thesecollectives can be found, the model can be used on district heat consumers as wellas electricity consumers.

v

Page 8: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without
Page 9: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Acknowledgements

This thesis could not have been carried out without the help from a number ofpersons, to whom I owe a great debt of gratitude and would like to thank for theirvaluable contributions.

First and foremost, my thanks go to all employees at Tekniska Verken i LinköpingAB, who has provided me with smile and laughter at the lunch brakes. EspeciallyI would like to thank my supervisor Cecilia Malm, who has guided me through thejungle of measurements and system databases. Mostly, thanks to my supervisorDavid Törnqvist at Linköpings universitet. Without your commitment and valu-able ideas, this report would not exist today. Special thanks to Sofia Petterssonfor valuable proofreading. Last, but not least, I would like to thank all my friendsin Lusen Big Band for all love and support during the time of my studies. Withoutyou guys, I would never made it this far. Thanks to all for your support and help!

Linköping, February 2005Andreas Johansson

vii

Page 10: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without
Page 11: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Contents

1 Introduction 1

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 Delimitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.5 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 System Overview 3

2.1 From Measurement Reading to Database . . . . . . . . . . . . . . . 32.2 Debit System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.3 Available Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 Data Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.5 Faults to be Detected . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Modeling 9

3.1 District Heat Characteristics . . . . . . . . . . . . . . . . . . . . . 93.2 Simulation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.2.1 Model Approach . . . . . . . . . . . . . . . . . . . . . . . . 113.2.2 Parameter Estimation . . . . . . . . . . . . . . . . . . . . . 123.2.3 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.2.4 Fault Detection . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3 Statistical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.3.1 Model Approach . . . . . . . . . . . . . . . . . . . . . . . . 163.3.2 Fault Detection . . . . . . . . . . . . . . . . . . . . . . . . . 173.3.3 How to Choose a Collective . . . . . . . . . . . . . . . . . . 18

4 Simulations and Results 19

4.1 Simulation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.1.1 Simulation Prerequisites . . . . . . . . . . . . . . . . . . . . 194.1.2 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.1.3 Fault Detection . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2 Statistical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.2.1 Finding the Collective . . . . . . . . . . . . . . . . . . . . . 234.2.2 Fault Detection . . . . . . . . . . . . . . . . . . . . . . . . . 25

ix

Page 12: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

5 Summary 29

5.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.1.1 Simulation Model . . . . . . . . . . . . . . . . . . . . . . . . 295.1.2 Statistical Model . . . . . . . . . . . . . . . . . . . . . . . . 30

5.2 Suggestions to Further Studies . . . . . . . . . . . . . . . . . . . . 31

Bibliography 33

A Figures — Simulation Model 35

B Figures — Statistical Model 47

Page 13: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Chapter 1

Introduction

1.1 Background

Today Tekniska Verken i Linköping AB has over 100 000 meters for electricity,district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. Within the next years the hourly remotereading will increase, as the old meters with yearly or monthly manual readingsare exchanged in favor of new meters with hourly measurement readings.

Today’s methods for checking the correctness of a collected measurement aresparse. The collected measurement is compared to a precalculated yearly con-sumption according to the consumers’ consumption pattern. The measurementsthat fail the test will be sent to a fault file for manual observation and correction.

As manual reading is being exchanged with remote reading, the amount of datawill increase rapidly. This yields new possibilities as well as new problems. Withthe methods used today, the measurements that fail the control will increase as theamount of data increase. Different types of temporary measure faults, not caughtby the present system, will be visible with hourly reading. Not checking the meterswith the human eye is also a risk. Meters that are broken, or has been damaged insome way, may be missed without a refined automated supervision system. Thepossibilities lie in the new amount of data together with an automated supervisionsystem that can detect incorrect measurements without manual inspection.

1.2 Problem Description

Research on finding incorrect measurements in consumption data has been doneby [1], [6] and [5]. In these studies, historical data have been used to predictthe total energy demand in a certain region. The consumption pattern variesfor each consumer. If district heating or electricity is used for space heating,the consumption pattern shows season variations, corresponding to temperaturechanges. For some consumers, especially industries, the consumption is higherduring weekdays, while other consumers have the same consumption irrespective

1

Page 14: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

2 Introduction

of the day or time of the year. Stochastic behavior, such as social factors, does alsoaffect the consumption. The influence from a specific consumer, does not affect thetotal demand that much. Fault detection of the total energy demand, can thereforebe seen as an easier problem. Since the task in this thesis is to detect faults in theconsumption for each consumer, the problem is to find a general model that canbe used on all types of consumers; both district heat and electricity consumers.

1.3 Objectives

The purpose of this thesis is to investigate mathematical methods that can beused to detect incorrect measurements in consumption data. To make these in-vestigations, mathematical models should be developed. Simulations should beperformed to verify the fault detection performance of the derived models.

1.4 Delimitation

The behavior of district heat and electricity consumption is quite a complexprocess. To cover everything during the period of a masters thesis is impossi-ble, therefore some delimitations has to be done.

• The study is limited to investigate fault detection of measurements in districtheat- and electricity consumption.

• The day mean value of district heat and electricity consumption is used inall modeling.

• The methods can not be evaluated on all consumers. A number of consumers,which can be seen as good representatives, will be used.

1.5 Thesis Outline

Chapter 2 is a review of how a measurement is generated, collected and stored.The common faults are also presented. In chapter 3 a simulation model and astatistical model are derived. These models are used in chapter 4 to simulate anddetect faults in district heat and electricity consumption. The report is concludedwith conclusions and suggestions for further studies in chapter 5. To make thereport easier to read, most of the figures from the performed simulations can befound in appendix A and B.

Page 15: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Chapter 2

System Overview

This chapter describes how a measurement reading is generated, collected, storedand treated by the system implemented today. Tekniska Verken AB has over 100000 meters for district heating, electricity, district cooling and water consump-tion. There are different types of meters depending on what is to be measured.Since this thesis focuses on district heating and electricity consumers, meters andmeasurements belonging to these fields are discussed. The different types of faultsthat can occur are described in section 2.5.

2.1 From Measurement Reading to Database

Figure 2.1 shows a typical installation of a district heating supply system. Thehot water from the supplier passes a heat exchanger and is returned back to thesupplier. Prior the heat exchanger, the supply temperature and the volumetricflow is measured. When the hot water has left the heat exchanger, the returntemperature is measured. Temperatures and flow are fed into a calculator. Theflow is registered as pulses/liter, i.e., when a certain volume has passed the metera pulse is generated to the calculator. Depending on the consumer, meters withdifferent resolutions are installed. Typical values can be 2.5 liters, or 25 liters togenerate a pulse. There are different types of meters that use propellers or ultra-sound to measure the flow. The calculator computes the district heat consumptionQ according to the formulae

Q =

v1∫

v0

kδT dv

where δT = Supply temp − Return temp, v = Volumetric flow and k is the heatcoefficient. k is a function of temperature and pressure. The calculator performsthe integration and uses a built-in table with k-values for the current temperatureand pressure. More on how the calculator works can be found in [9].

The principles of an electricity meter, is that voltage and current are measured.A calculator performs an integration to receive the consumed energy.

3

Page 16: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

4 System Overview

Supply pipe

Return pipe

Building

Heat exchanger

Supply temp

Return temp

Flow

Figure 2.1. A typical installation of a district heat supply system.

The supply and return temperatures, flow and consumption are passed on to aterminal that uses either S0-pulses or a serial protocol called MBUS. If S0-pulsesare used, a pulse is generated when a certain consumption has been registered,e.g., one pulse every kWh. With the MBUS-protocol, meter readings are collectedwithout using pulses. The actual function of this terminal, irrespective if S0-pulsesor the MBUS-protocol is used, is to transmit the information to the AutomaticMeter Reading (AMR). This is done via different media. The most common mediatypes are IP, Radio or the power line cables. Figure 2.2 shows a schematic overviewof how a measurement is generated, transmitted and stored.

Once a day, during nighttime, the hourly readings are collected by the AMR.These readings are later stored in a database called METER IN. This databasecontains constants that are used to scale the pulses to actual consumption, tem-perature etc. After the pulses have been scaled the data are stored in a seconddatabase called METER BAS. This database contains consumption in MWh, tem-perature in degrees Celsius etc. All data used in this thesis are data from thisdatabase.

2.2 Debit System

The system of today uses the measurements mostly to charge a consumer for itsconsumption. On the turn of the month an estimate of the year consumptionis calculated by the system. If the new estimated consumption differs from thepresent year consumption, the system will alarm and the consumer-id will be sentto a fault file. This fault file is inspected manually to find the explanation forthe deviation in consumption. If the changed consumption assumes to relate toa faulty meter, e.g., data is missing or is times ten as high as normal, the meterwill be inspected. If the change in consumption can be related to a change in the

Page 17: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

2.3 Available Data 5

Supply tempReturn tempFlow MBUS/S0

AMR DB

Consumption

Transmission

Electricity

CALC

CALC

District Heat

VoltageCurrent Consumption

Figure 2.2. A schematic overview over how the consumption from the calculator istransmitted and registrated by the AMR and stored in the DB.

consumption pattern, i.e., a change in energy needs, the previous year consumptionis replaced by the new estimated year consumption and the consumer will becharged according to this new year consumption.

2.3 Available Data

The data used in this thesis are the district heat consumption, electricity con-sumption and outdoor temperature. The outdoor temperature is collected fromSMHI1 as a day mean value. This is why the mean day district heat consumptionis used in the simulation model. If the hourly readings are to be used one has tobe able to measure the hourly outdoor temperatures. The day mean value of theelectricity consumption has been used in the statistical model, since it is easier tofind correlation in day mean values than in hourly measurements.

Depending on if S0-pulses or the MBUS-protocol are used to collect the mea-surements, the consumption is stored as actual consumption or meter readings.Actual consumption means the consumption during the last hour. Meter readingsstands for the accumulated consumption from the time the meter was installed.

If the measurements from a consumer are the actual consumption, the daymean consumption is calculated as 1

24

∑24

i=1y(i), where y is the consumption. If

the measurements are meter readings the day mean consumption is calculated as1

24(y(24) − y(1)).

1Swedish Meteorological and Hydrological Institute

Page 18: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

6 System Overview

2.4 Data Quality

In all model building one must ensure that the data to be used are free of outliersor other faults. Since the system of today mostly uses the data to charge the con-sumers, the incorrect measurements in the database are not corrected. As a result,there exist data in the database that is incorrect. The meaning of an incorrectmeasurement is also a bit vague. This is why the data must be investigated extracarefully prior the modeling. Datasets including obvious faults must be weededout. Another important fact is that one can not experiment with the measure-ments to find out more about the system characteristics. The only available dataare the historical measurement data stored in the database.

2.5 Faults to be Detected

Since the models in this thesis are to be used in fault detection and the conceptincorrect measurement is a bit vague, this has to be defined. Faults that can occurwill now be defined as different fault modes and a possible explanation to thisfault will be given.

• Fault mode 1 - The measurements suddenly diverge from the assumedconsumption.

This fault can arise from an incorrect meter, incorrect constant in thedatabase METER IN, missing data or a sudden change in energyconsumption for a consumer.

If some or any of the connections between the meter and AMR cease tofunction data will be missing. If the measurements are collected as actualconsumption, the consumption data from these time samples will be lostand stored as zeros in the database. If the measurements are collected asmeter readings, missing data will not result in lost consumption data. Onthe other hand, if data are missing, zeros will be followed by a peak inconsumption when the connection between the meter and AMR starts tofunction.

For example, if the consumption is ten times as high or low as assumed, themost likely explanation is an incorrect constant in the database METERIN. These faults can occur when a meter has been exchanged. Theconstants in METER IN are used to scale the pulses from the meters toconsumption in, MWh, kWh, etc. The constants are treated manually by asystem operator. Sometimes the constants are exchanged or in some otherway missed in the routines. For district heat meters, the constant can beexchanged with a factor 10. If the constants are mixed up in the routines,the district heat consumption can be ten times as high, or low, as it shouldbe. The constants for an electricity meter, can be exchanged with thefactors 10, 20, 30, 40, 60, 80, 100 and 120. This means that if the constant10 and 20 are mixed up, this can result in a consumption that is twice, orhalf the actual consumption etc.

Page 19: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

2.5 Faults to be Detected 7

It is often hard to tell if the deviation in consumption is related to anactual fault or a change in consumption. If a consumer suddenlydetermines to turn on or off the consumption this is not an actual “fault”.Such a change in energy consumption must therefore be considered as afault by the system.

• Fault mode 2 - The measurements slowly diverge from the assumedconsumption.

This fault arises from a faulty meter or a slow change in energyconsumption for a consumer.

When the meters have been in use they start to age. Even though metersare collected and calibrated continuously, the mechanical wear can result ina slowly increased or decreased consumption.

A slow change in consumption can also be explained by the fact that theconsumer has changed its energy needs. Since it is hard to separate thisfrom a faulty meter this must also be considered as a fault.

There are also cases when the consumer manipulates the meter to reduceits energy costs. These faults can be hard to detect, especially if a model isestimated from a dataset where the consumer has manipulated its meter. Ifthis is the case, this type of fault will be built in to the model.

Since the different faults that can occur does not have to be isolated, i.e., topoint out the exact type of fault that is present, the classification presented aboveis suitable for its purpose. To isolate the present fault one must have separatemodels for each component of the entire district heat supply system. Such modelshave been investigated in [1] but due to the limited time period for this thesis, thishas not been investigated further.

Page 20: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

8 System Overview

Page 21: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Chapter 3

Modeling

This chapter describes the main modeling work. Two model approaches are de-rived. The first model uses historical consumption and temperature data to es-timate model parameters. This model can be used to simulate the consumptionwith outdoor temperature as input. In the second model approach, consumerswith similar consumption patterns are grouped into a collective. The correlationbetween the consumers, are used to find deviations from the collective.

3.1 District Heat Characteristics

The energy demand for the district heat consumers is mainly due to their needfor space heating and hot tap water. The need of district heat for space heatingis mostly affected by the outdoor temperature. The need of hot tap water can beexplained by other factors [1], e.g., the time of the day.

In Figure 3.1 the district heat consumption for two different consumers areshown together with the outdoor temperature. It is obvious that the districtheat consumption and the outdoor temperature are correlated. A low outdoortemperature correspond to a high consumption and vice versa. During weekendsindustries often shut down. This is seen in the district heat consumption for theslaughter house which shows a typical weekday/weekend consumption pattern.The shopping mall on the other hand does not show the same weekday/weekendtrends since it is open almost 365 days a year.

An identical change in temperature can result in different consumption de-pending on the absolute value of the temperature. A temperature change of 5◦Ccorrespond to different consumption depending on the time of the year. Thisindicates that the system is nonlinear. As seen in Figure 3.2 the district heatconsumption is approximately linear up to a certain break point of about 14◦C.Above this breakpoint the district heat consumption is almost zero or at leastconstant. This phenomenon can be explained by the fact that no extra energy isneeded to warm the building above the break point. The breakpoint varies fromconsumer to consumer, depending on the isolation of the building. The influenceof this breakpoint will be discussed in section 4.1.1. For a building with good

9

Page 22: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

10 Modeling

0 50 100 150 200 250 300 350 400−20

0

20

40

degr

ees

C

Outdoor Temp 2001

0 50 100 150 200 250 300 350 4000

0.2

0.4

0.6

0.8

MW

h

District Heat 2001 − Shopping Mall

0 50 100 150 200 250 300 350 4000

1

2

3

day nr

MW

h

District Heat 2001 − Slaughter House

Figure 3.1. Outdoor temperature and district heat consumption for year 2001. Thetypical Weekday/Weekend trends can be seen in the consumption for the slaughter house.

isolation the breakpoint is lower and vice versa. The deviations in measurementsfor the slaughter house can be explained by the weekday/weekend trends.

The two consumers mentioned above are just an example of what the consump-tion pattern can look like. The different consumers on the district heat marketconsist of big industries, schools, shopping malls, detached houses etc. It is clearthat there exist diversity in consumption patterns for each consumer or consumertype.

The district heat characteristics can be summarized as

• It is time dependent

• It is weather dependent

• It is nonlinear

• There exist diversity in consumption patterns

Page 23: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

3.2 Simulation Model 11

−20 −15 −10 −5 0 5 10 15 20 250

0.1

0.2

0.3

0.4

0.5

0.6

0.7

MW

h

District Heat 2001 − Shopping Mall

−20 −15 −10 −5 0 5 10 15 20 250

0.5

1

1.5

2

2.5

Outdoor temperature − degrees C

MW

h

District Heat 2001 − Slaugther House

Figure 3.2. District heat consumption vs. outdoor temperature for the shopping malland the slaughter house. The district heat consumption is linear up to a break point ofabout 14◦C. The deviations in measurements for the slaughter house correspond to theweekday/weekend trends.

3.2 Simulation Model

One can assume that a consumer’s consumption pattern, i.e. the base consumptionwithout influence of the outdoor temperature, is the same from one year to another,unless the consumer decides to rebuild its house, a new family moves in, or theenergy need is changed in some other way. If this is the case the system shouldalarm to inform the district heat supplier that the consumer has changed its energyneeds. This assumption leads to the model described in the next section.

3.2.1 Model Approach

In [4] a simulation model for the total hot water demand in Reykjavik is presented.The simulation model presented in this thesis differs in the way that the districtheat consumption for a specific consumer is to be modeled, not the total demandas in the article. This model approach, with some modifications, will be used tosimulate the district heat consumption.

Page 24: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

12 Modeling

The consumption is divided into two parts. The first part is a time dependentpart that describes the base consumption of district heat for space heating andhot tap water. The second part is the weather dependent part that explains howthe district heat consumption is affected by the outdoor temperature. The modelcan be described as

y(t) = b(t) + w(t) + error (3.1)

Here b(t) is the base consumption corresponding to an outdoor temperaturespecified by the break point, i.e., approximately 14◦C. w(t) is the weather depen-dent part and is a function of the outdoor temperature. y(t) is the district heatconsumption. The last part is the stochastic error process.

The base consumption can be modeled as

b(t) = b0 + b1I(t) + b2 sin(2πt/365) + b3 cos(2πt/365)+

b4I(t) sin(2πt/365) + b5I(t) cos(2πt/365) (3.2)

where I(t) is a binary variable that is one for weekdays and zero otherwise. Thisis to describe the extra consumption during weekdays. The sine and cosine termsdescribe how the district heat consumption varies throughout the year even if theeffect of outdoor temperature is removed.

In Figure 3.3 the base adjusted district heat consumption for the slaughterhouse is plotted versus the outdoor temperature. This illustrates the use of thebase consumption in the model. The previous deviations in measurements corre-sponding to the weekday/weekend trends are now removed. With the base ad-justed consumption, a weather dependent part can be described as

w(t) = b6z1 + b7z2 (3.3)

wherez1 = max {BP − u(t), 0} and z2 = max {u(t) − BP, 0}

Here u(t) is the mean day outdoor temperature.Historical data for a consumer’s district heat consumption and the outdoor

temperature are used to estimate all parameters in a least square sense. Seesection 3.2.2 for details. This yields the predicted district heat consumption y(t) =

b(t) + w(u(t)), where b(t) is the predicted base consumption and w(u(t)) is thepredicted weather dependent part. The simulated district heat consumption thenbecomes ysim(t) = b(t) + wsim(u(t)), where u(t) is the outdoor temperature fromthe period that is to be simulated. The simulated consumption can be comparedto the actual consumption and then be used for fault detection.

3.2.2 Parameter Estimation

The parameter estimation procedure applies to the principle of minimizing thequadratic sum of the simulation error. Since the simulated consumption y(t) isa linear function of the parameters θ, i.e., y(t) = θT ϕ(t), the problem can besolved with linear regression. Here θ is a vector that contains the unknown model

Page 25: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

3.2 Simulation Model 13

−20 −15 −10 −5 0 5 10 15 20 250

0.5

1

1.5

2

2.5

MW

h

District Heat 2001 − Slaughter House

−20 −15 −10 −5 0 5 10 15 20 25−0.5

0

0.5

1

1.5

2

Outdoor Temperature − degrees Celcius

MW

h

Base Adjusted District Heat 2001

Figure 3.3. Illustration of the base demand part in the model. The base consumptionb(t) has been subtracted from the measured consumption. The base consumption parttakes care of the weekday/weekend trends as well as the season variations.

parameters and ϕ(t) is a vector that consists of the base functions in the model.If the consumption from n time samples are stored in Y and the correspondingvalues of the base functions are stored in Θ, the least square problem, for themodel defined in (3.1), can be formulated as

minθ

‖Y − Θθ‖ (3.4)

Y =

y(1)...

y(n)

Page 26: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

14 Modeling

θ =

b0

b1

b2

b3

b4

b5

b6

b7

Θ =

(

1 I(1) sin(2π1/365) cos(2π1/365) I(1)sin(2π1/365) I(1)cos(2π1/365) z1(1) z2(1)

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

1 I(n) sin(2πn/365) cos(2πn/365) I(n)sin(2πn/365) I(n)cos(2πn/365) z1(n) z2(n)

)

According to [3], the solution to (3.4) is given by the normal equations ΘT Θθ =ΘT Y . Finally the estimated parameters are given by

θ = (ΘT Θ)−1ΘT Y (3.5)

When calculating the matrix inverse (ΘT Θ)−1 numerical problems may occur.This can be handled by using the Matlab-command pinv that computes thepseudo inverse using singular value decomposition. More on numerical aspects formatrices and matrix inverses can be found in [3].

3.2.3 Validation

When a model has been derived it must be validated to find out whether themodel is suitable for its purpose. Since the purpose is to use the models for faultdetection the fault detection itself is a kind of validation. If the faults can bedetected by the chosen model the model can be seen as “good enough”. On theother hand there are several ways to validate a model [7]. An important factor isthe prediction error, which is defined as

ǫ(t) = y(t) − y(t) (3.6)

In the ideal case the simulation error should be white noise, i.e., ǫ(t) ∈ N(0, σǫ).When a model has been simulated, a histogram plot or a normal probability plotcan be used to verify if the simulation error is white noise or not.

To find out if all system dynamics are caught by the model, the auto correlationsequence of the simulation error can be studied. The auto correlation sequence isdefined as

Ry(t) =1

N

N−t∑

k=1

y(k)y(k + t) t ≥ 0 (3.7)

The simulation error can then be used to create an estimate of the standarderror of the model. This measure can be used to compare different models. Theestimated standard error, according to [4], is defined as

Page 27: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

3.2 Simulation Model 15

σ =

1

N

∑N

t=1ǫ2(t)

< y >(3.8)

where < y > is the mean consumption during the period that is studied.Another approach is to validate the model with data from separate periods. If

the results are consequent, this implies that the model approach is correct.These measures will be used and discussed further in section 4.1.2.

3.2.4 Fault Detection

To be able to detect the faults described in section 2.5, a residual and a thresholdmust be calculated. One approach is to use the prediction error (3.6). A residualshould be zero, or small, when no faults are present and over a certain thresholdwhen faults are present. To use the absolute prediction error as a residual is notsuitable, since the residual would be too sensitive for separate incorrect measure-ments. Instead, the residual can be seen as a model validity measure. A commonmethod is to determine how well the model can simulate the data over a certaintime period or time window. The residual can then be calculated as

r1(t) =1

L

t∑

k=t−L+1

ǫ2k (3.9)

where L is the length of the time window. The residual will be small when nofaults are present, i.e., when the difference in modeled consumption y and measuredconsumption y is small. If the residual exceeds a threshold, the measurement canbe seen as faulty and the system should alarm.

Since ǫ ∈ N(0, σǫ) the residual, according to [2], becomes χ2(L), i.e.,

r1(t) =1

σ2ǫ

1

L

t∑

k=t−L+1

ǫ2k ∈ χ2(L) (3.10)

A threshold can be calculated as

J =σ2

ǫ

LF−1(p|L) (3.11)

where F−1 is the inverse χ2 cumulative distribution function and p is theprobability of a false alarm.

Instead of using the squared simulation error ǫ2, as in (3.9), a residual withthe simulation error ǫ can be written as

r2(t) =1

L

t∑

k=t−L+1

ǫk (3.12)

Since ǫ ∈ N(0, σǫ), this residual becomes N(0, σǫ√L

), i.e.,

Page 28: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

16 Modeling

r2(t) =1

L

t∑

k=t−L+1

ǫk ∈ N(0,σǫ√L

) (3.13)

A threshold can be calculated as

J = F−1(p|0,σǫ√L

) (3.14)

where F−1 is the inverse N cumulative distribution function and p is the proba-bility of a false alarm.

In the fault free case, the false alarm probability is defined as

p = P (|r| > J) (3.15)

The residual and threshold are calculated from a dataset containing no faults.The residual from the simulated data is compared to the threshold. If the residualexceeds the threshold the measurement is considered to be incorrect, i.e.,

|r| > J ⇒ Fault or|r|J

> 1 ⇒ Fault (3.16)

The residuals (3.9) and (3.12) will be discussed further in section 4.1.3.

3.3 Statistical Model

Tekniska Verken i Linköping AB has more than district heat consumers. If themeasurements from an electricity or water consumer are to be used in fault detec-tion, the simulation model is not suitable, since the electricity or water consump-tion is not affected by the outdoor temperature in the same way as the districtheat consumption. While district heating is mostly used for space heating, theuse of electricity is more versatile. The electricity consumption is, e.g., affected bysocial factors that are difficult to describe with physical relations. On the otherhand, one can assume that there exist consumers that have the same appearancein consumption patterns. If the consumers with same consumption pattern can befound, they could constitute a collective. The correlation between the consumersin the collective can be used to find deviations from the collective. The deviationsindicate that a fault is present. If collectives can be found for all consumer types,district heating consumers, electricity consumers, water consumers etc., the modelapproach can be used on all kinds of consumers. This is the main motive for themodel derived in this section.

3.3.1 Model Approach

Assume that there exist a number of consumers that have similar consumptionpatterns. In the fault free case the consumers’ consumption should follow thesame consumption pattern. This is the same as the consumers’ are well correlated.The coefficient of correlation can be used to evaluate the correlation between the

Page 29: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

3.3 Statistical Model 17

consumers in a collective. According to [2], the coefficient of correlation betweentwo stochastic variables, X and Y , is defined as

ρ(X,Y ) =Cov(X,Y )

D(X)D(Y )ρ ∈ [−1, 1] (3.17)

If ρ = 0 X and Y are none correlated. ρ = 1 means that X and Y are 100%correlated. A negative value means negative correlation.

The Matlab-command corrcoef is used to calculate the correlation coefficientfor n consumers as

[R,P ] = corrcoef(M) (3.18)

M is an n × m matrix, with n consumers and m observations of the con-sumption. R is an n × n matrix, containing correlation coefficients between theconsumers’ in the collective. P is an n × n matrix containing p-values for test-ing the hypothesis of correlation, under the assumption that the observations arenormally distributed. The hypotheses are defined as

H0 : “Correlation” (3.19)

H1 : “No Correlation” (3.20)

If a p-value exceeds α, the null hypothesis is rejected with significance α andthe alternate hypothesis is accepted. Thus, the P -matrix can be used to detectwhen the consumption from a consumer deviates from the collective’s consumption.More on how the Matlab-command corrcoef works can be found in [8].

3.3.2 Fault Detection

At time t, the coefficient of correlation can be calculated by using a sliding win-dow of length L. This means that the collective should be correlated during Ltime samples. At each time sample, the R- and P -matrixes are updated and thehypothesis of correlation can be evaluated. The fault detection algorithm, whichis implemented in Matlab, can be summarized as

• At time t, calculate the R- and P -matrixes by using historical consumptiondata from L previous samples.

• Search the P -matrix for p-values that exceeds α. If one or more p-value inthe same column exceeds α, then the null hypothesis can be rejected, i.e., theconsumption for the consumer corresponding to this column deviates fromthe collective and a fault is detected.

• Same procedure for time t + 1.

The number of p-values that should exceed α to reject the null hypothesis, canbe varied. In the following simulations, the null hypothesis is rejected if one ormore p-value in the same column exceeds α. The implemented algorithm will bediscussed further in section 4.2.2.

Page 30: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

18 Modeling

3.3.3 How to Choose a Collective

The main condition for this model approach is that the consumers can be dividedinto collectives. Today the consumers are grouped into categories based on basicdata from SCB1. These groupings are too imprecise to serve as collectives; hencenew refined groupings must be done. The consumers in the collective must bechosen from a measurement technical point of view.

To divide all consumers into suitable collectives is a huge task. Since time is alimiting factor, the goal is not to find these collectives. Instead methods on howto find a suitable collective will be discussed.

Assume that there exist a number of consumers that can be seen as representa-tives of a collective. The model itself can be used to find out which consumers thatcan serve as a collective. If fault free data are used, faults must not be detectedduring L time samples. If a consumer does not belong to the collective, the faultdetection algorithm will interpret the consumers’ data as incorrect and a fault willbe registered. This approach is used in section 4.2.1.

1Statistiska Centralbyrån (Statistics Sweden)

Page 31: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Chapter 4

Simulations and Results

In this chapter simulations are performed for the two models derived in chapter3. The simulation model is validated using the model validity measures describedin section 3.2.3. District heat consumers with incorrect consumption are used toevaluate the fault detection performance. Two collectives are derived and used insimulations for the statistical model.

4.1 Simulation Model

During the time of this master thesis, several model approaches with differentnumber of parameters have been evaluated. By using the validity measures de-scribed in section 3.2.3, the proposed model in section 3.2.1 has been derived.To investigate the generality of the model, the proposed model has been used onsimulations on a number of consumers from different categories, i.e., consumerswith different consumption patterns. The model must cope with consumers thathave weekday/weekend trends and those who have not. To present the perfor-mance of the model, two consumers that can be seen as good representatives ofthe consumers on the district heat market will be used to validate the proposedmodel. The first consumer has little influence of weekday/weekend trends whilethe second consumer has big influence of weekday/weekend trends. Since the pur-pose is to detect incorrect measurements, the fault detection can be seen as theactual validation of the model. To evaluate the fault detection performance, fourconsumers with actual faults are simulated.

4.1.1 Simulation Prerequisites

All data that are used in the simulations are historical data of the district heatconsumption and outdoor temperature. Two datasets for each consumer are col-lected from the database METER BAS. The first data set is used to estimate themodel parameters and the second to validate the model. Since the model containsa time dependent periodicity of a year, the data used for parameter estimation

19

Page 32: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

20 Simulations and Results

should also contain data for a year. To find datasets that does not contain incor-rect measurements from two years is difficult. During a time period of two yearsit is not unlikely that faults occur. The system with remote reading is quite new,which also result in a reduced number of consumers to choose from.

The data used for validation should to the greatest possible extent be free ofoutliers or other obvious faults. Since the concept faulty data is a bit vague, it isdifficult to point out exactly when a measurement can be interpreted as incorrect.Therefore consumers that have periods containing obvious faults are sorted out.

The breakpoint, discussed in section 3.2.1, is set to 14◦C in all simulations. Thisbreakpoint varies for each consumer depending on the isolation of the building.Simulations has shown that the optimal breakpoint can vary from 10◦C up to16◦C. If the breakpoint is to be set as a model parameter, the parameters has tobe estimated with a nonlinear parameter estimation procedure. This has not beendone, since the standard error of a simulation over a year differs only with ±1-2% in the cases where the optimal and the chosen breakpoint differs as most. Abreakpoint of 14◦C can therefore be seen as a good representative of the consumers’breakpoints.

4.1.2 Validation

In Figure 4.1, the district heat consumption from the first consumer, with littleinfluence of weekday/weekend trends is simulated. The mean day district heatconsumption and day mean outdoor temperature from year 2001 is used to estimatethe model parameters. The solid line is the measured consumption y and thedotted line is the simulated consumption y. The standard error defined by (3.8)becomes 100σ2001 = 7.46. With the estimated model parameters and the mean dayoutdoor temperature from year 2003 the district heat consumption for year 2003 issimulated. The standard error for the simulated period becomes 100σ2003 = 10.66.The standard error for year 2001 is lower since the data are used to estimate themodel parameters. If the data from year 2003 is used to estimate the modelparameters and the data from year 2001 is simulated the standard error becomes100σ2003 = 10.05 and 100σ2001 = 8.26. The results are consequent which impliesthat the model approach is correct.

The simulations for the second consumer, with big influence of weekday/weekendtrends, are shown in Figure A.1. The standard error for year 2001 becomes100σ2001 = 15.40 respectively 100σ2003 = 16.66 for year 2003. When the modelparameters are estimated with data from year 2003 the standard error becomes100σ2003 = 16.01 respectively 100σ2001 = 15.83. The result is consequent also forthe consumer with big influences of weekday/weekend trends.

In the ideal case the simulation error should be white noise, i.e., ǫ ∈ N(0, σǫ).Figure A.2 and A.3 show histogram plots and auto correlation sequence of the sim-ulation error for the two consumers. As seen, the distributions for the simulationerrors differ from the ideal case, especially for the simulation on fresh data. Theauto correlation sequence shows that there are some periodicities in the simulationerror, not caught by the model. How this affects the fault detection performancewill be discussed in section 4.1.3.

Page 33: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

4.1 Simulation Model 21

0 50 100 150 200 250 300 3500

0.02

0.04

a

[MW

h]

0 50 100 150 200 250 300 350−5

0

5x 10

−3 b

[MW

h]

error

0 50 100 150 200 250 300 3500

0.02

0.04

c

[MW

h]

0 50 100 150 200 250 300 350−5

0

5x 10

−3

[MW

h]

d

day number

error

yy hatt

yy hatt

Figure 4.1. Consumer with little influence of weekday/weekend trends. Data from year2001 used for estimation (a). The solid line is the measured consumption and the dottedline is the simulated consumption. Simulation error for the estimated data (b). Datafrom year 2003 used for simulation (c). The solid line is the measured consumption andthe dotted line the simulated consumption. Simulation error for validation data (d).

4.1.3 Fault Detection

Thresholding

The two residuals derived in section 3.2.4 are tested on the first consumer withlittle influence from weekday/weekend trends. Data from the periods year 2001and year 2003, same as used for estimation and validation, are considered to becorrect. If a threshold is calculated from the dataset used to estimate the modelparameters, the threshold will be too low since the variance for ǫ2001 is lower thanthe variance for ǫ2003. A more fair method is to calculate the threshold for thefresh data from year 2003. The drawback is that correct data from two separateyears must be available.

In figure 4.2 the residual (3.9) is used. The threshold is calculated with thedataset from year 2003. The length of the time window is set to L = 30 and the

Page 34: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

22 Simulations and Results

false alarm probability to p = 0.01. With a false alarm probability of p = 0.01, nomore than 1% of the values from a correct data set should be over the threshold.With the calculated threshold (3.11), 30 measurements of 364, i.e., 8.2%, areconsidered as incorrect. This indicates that the threshold is too low which increasesthe risk that too many false alarms are generated. The explanation is that thesimulation error ǫ is not sufficiently normally distributed. This leads to an evenworse approximation of the χ2 distribution, especially for large windows L. Ifa time window of L = 5 is used, 4.7% of the measurements are considered asincorrect. The threshold is still too low.

0 50 100 150 200 250 300 3500

1

2

3

4

5

6

7x 10

−6 a

Residual with L=30

0 50 100 150 200 250 300 3500

0.2

0.4

0.6

0.8

1

1.2

1.4x 10

−5 b

day number

Residual with L=5

Figure 4.2. The residual 3.9 with L = 30 (a). The false alarm probability is set top =0.01. 8.2% percent of the measurements in the fault free case are considered asincorrect, i.e., the threshold is too low. If the window lenght is reduced to L =5, as in(b), 4.7% of the measurements are considered as incorrect. The threshold is still too low.

The reason to use residual (3.12) is that the calculations of the thresholdsshould be less sensitive towards the normal approximation of the simulation errorǫ. However, when simulations are performed the thresholds are too low even withthis approach. Since the use of this residual has not been proven to result in better

Page 35: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

4.2 Statistical Model 23

performance, the residual (3.9) will be used in the following simulations.

One approach to make the simulation error more normally distributed is toestimate an AR-model to the simulation error. This has been tested, but thethresholds are still too low even with this approach.

In Figure A.4, the consumption for year 2004 is simulated and the residual(3.9) is used. With the threshold calculated from the data set from year 2003,faults are detected around day 130 and day 300. The fault at day 300 is an actualfault and should be registered. It is not obvious that the fault detected aroundday 150 should be registered as a fault. This kind of fault can be explained bythe fact that the consumer uses more or less district heat than can be related to achange in outdoor temperature. If such faults should not be detected, theoreticalthresholds can not be used. Instead thresholds based on experience can be used.If the threshold is set too high, there is always a risk that actual faults are missed.The value of the threshold is a balance between detecting false alarms and missingactual faults.

Simulations

In the following simulations the residual (3.9) is used to detect actual faults asdescribed in section 2.5. Two simulations are performed for each consumer. Thefirst simulation uses a threshold calculated as in (3.11) with p =0.01, while thresh-olds based on experience is used in the second simulation. The length of the timewindow is set to L =10 in all simulations. Figures of the simulations can be foundin appendix A, Figure A.5-A.12.

The main results from the simulations can be summarized as follows

• The residual (3.9) can detect the faults defined in section 2.5.

• If the threshold is calculated as in (3.11) false alarms will be registered. Byusing a threshold based on experience the number of false alarms can bereduced without missing the actual faults.

• The simulations are performed on consumers from different categories withmore or less influence on weekday/weekend trends. Faults are detected irre-spective of the consumer category.

4.2 Statistical Model

4.2.1 Finding the Collective

Fault free district heat consumption for five consumers is shown in Figure 4.3.These consumers have been chosen, since they have a similar consumption patternand can therefore be seen as possible candidates of a collective. If all observationsof the consumption are used, the correlation matrix for the five consumers becomes

Page 36: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

24 Simulations and Results

R =

1.0000 0.9563 0.9519 0.9514 0.98230.9563 1.0000 0.9167 0.9550 0.97320.9519 0.9167 1.0000 0.9405 0.95930.9514 0.9550 0.9405 1.0000 0.97430.9823 0.9732 0.9593 0.9743 1.0000

To find the consumer that is least correlated, the R-matrix can be studied.The minimal column sum corresponds to the consumer that is least correlated. Inthis case, with all observations used, consumer three is least correlated.

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 5

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

5

Con

sum

er N

r

Detected Fault

Figure 4.3. Fault free district heat consumption for five consumers that can be seenas candidates of a collective. The fault detection algorithm, with L = 50 and α = 0.05,detects faults at the season change between summer/autumn for consumer four.

If the fault detection algorithm with L = 50 and α = 0.05 is used, faultsare detected for consumer four. The faults are registered during the change ofsummer/autumn. As seen in Figure 4.3, consumer four has a different consumptionpattern during the warmer period of the year. The consumption is suddenlylowered at the break of spring/summer and suddenly raised during the breakof summer/autumn. Such an appearance in consumption is quite common fordistrict heat consumers. If a window length of L = 50, or lower, is going to be

Page 37: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

4.2 Statistical Model 25

used, consumer four can not be a member of the collective, hence false alarms willoccur. It is also possible to raise the significance value α with the risk of missingactual faults. Consumer four must therefore be a member of a collective withthe same consumption pattern that suddenly changes the consumption duringseason breaks. The members of such a collective should have these changes inconsumption at approximately same date. If it turns out to be difficult to findsuch collectives, one must accept false alarms during season changes.

If consumer four is excluded from the collective and L is reduced to 40, faultsare detected for consumer three. This result is not surprising, since the method ofchecking the minimal column sum of the R-matrix, also indicated that consumerthree was least correlated among the collective members. If L = 45 and consumerone is excluded from the collective, the remaining four consumers can constitutethe collective.

The same procedure as above is used to find a collective of electricity con-sumers. Figure B.1 show fault free electricity consumption for five consumersthat are candidates of the collective. The correlation matrix, calculated with allobservations, becomes

R =

1.0000 0.7653 0.7108 0.7655 0.76650.7653 1.0000 0.8881 0.8851 0.91750.7108 0.8881 1.0000 0.8351 0.89470.7655 0.8851 0.8351 1.0000 0.85710.7665 0.9175 0.8947 0.8571 1.0000

As seen, the consumers in the electricity collective are not as correlated as theconsumers in the district heat collective. The consumption pattern for electric-ity consumers are often more stochastic, since the electricity consumption is alsoaffected by social factors. If the consumer uses district heat for space heating,the stochastic behavior of the consumers’ electricity consumption is of extra im-portance. Even though it is more difficult to find electricity consumers that arecorrelated, it is most likely that there exist electricity consumers that can con-stitute a collective. Despite the low correlation, these consumers will be used toevaluate the model on the electricity collective.

The minimal column sum correspond to column one in the R-matrix. Thisindicates that consumer one is least correlated. The consumption pattern for thisconsumer show more season variations than the rest of the consumers. The faultdetection algorithm, with L = 25 and α = 0.05, detects faults fore consumerone. Consumer one is therefore excluded from the collective. The four remainingconsumers will constitute the collective.

4.2.2 Fault Detection

The fault detection algorithm, described in section 3.3.2, is used on the two col-lectives derived in previous section. Since no datasets with actual faults havebeen found for the consumers in the two collectives, faults are introduced to themeasured consumption. The significance level is set to α = 0.05 in all simulations.

Page 38: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

26 Simulations and Results

District Heat Collective

In Figure B.2, a fault that corresponds to a constant error of a factor ten in ME-TER BAS is introduced in consumers two. At time t = 400−401, the consumptionis ten times as high as it should be. The fault detection algorithm, with L = 45, isable to detect the fault. If the same fault is introduced, but the duration is morethan one sample, the fault is still detected. The difference is that the fault will notbe detected L samples after the fault has occurred. This is illustrated in FigureB.3. The basic idea is that the fault detection algorithm is updated in real time.Hence the important fact is that a change in consumption is detected. Since thefault was detected at time t = 400, the system is informed that the consumptionfor consumer two is incorrect and the missed detections L samples after, is of littleimportance.

A fault that corresponds to a constant error in METER BAS, can also resultin a consumption that is one tenth as high as it should be. If such a fault appearsduring the warmer period of the year, the fault will not be detected for the chosendistrict heat collective. The consumption for the consumers in the collective istoo low to detect a fault of tenth the consumption. This is illustrated in FigureB.4, where such a fault is introduced to consumer two. If the fault occurs duringthe colder period of the year, when the consumption is higher, the fault will bedetected. This is illustrated in Figure B.5.

In Figure B.6, zeros are introduced to consumer three at time t = 550 − 551.With a window length of L = 45, the fault is missed. The fault is difficult todetect, since the consumption is almost zero even in the fault free case. If thiskind of transient and small fault is going to be detected, a shorter window lengthmust be used. A shorter window will thus result in false alarms for consumerthree. If zeros are introduced at time t = 550 − 638, the fault is detected 20 daysafter it has occurred. This is illustrated in Figure B.7.

A slow change in consumption, corresponding to an incorrect meter, can bemodeled with a linear trend of 10% increase per day. In Figure B.8, this fault isintroduced to consumer three. At time t = 450, the consumption slowly starts toincrease with 10% per day. With L = 45, the fault is detected at t = 470.

Electricity Collective

As described in section 2.5, the constants in METER IN that are used for electricityconsumers, can be exchanged with the factors 10, 20, 30, 40, 60, 80, 100 and120. The most difficult case, is to detect small deviations in consumption. Ifconstants 100 and 120 are mixed up, the consumption can be 120

100or 100

120times

as the actual consumption. Such small deviations in consumption have not beendetected in simulations for the electricity collective. Faults are detected first whenthe consumption is a factor 4, or 1

4of the actual consumption. A constant change

that result in a less change in consumption, will not be detected for this collective.In Figure B.9, a constant error with a factor 4 is introduced in consumer 2 at timet = 150. The fault is detected immediately. If the constant factor is set to 1

4, the

consumption is detected at time t = 160. This is illustrated in Figure B.10. If thesame fault is introduced to consumer three, the fault is almost missed. This can

Page 39: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

4.2 Statistical Model 27

be explained by the fact that consumer three is least correlated in the collective.When zeros are introduced, same results as for the district heat collective are

achieved. If a zero last for just one sample, the fault is not detected. If the faultis durable, it will be detected. Simulations of these two examples can be found inFigure B.11 and Figure B.12.

The fault detection algorithm is not able to detect a linear trend of 10% increaseper day on any of the consumers in the collective. The fault is detected when thelinear trend has been increased to 50% per day. In Figure B.13, a linear trendof 50% per day has been added to consumer four. The fault is detected with awindow length of L = 20. If the window length is decreased, the fault will bemissed. A slow change in consumption should be easier to detect with a longertime window. No such results have been found for this collective. The fault is stilldetected with a window length of L = 100, but the fault is not detected as quicklyas with the shorter time window. If a collective that is more correlated can befound, linear trends around 10% increase per day should be detected.

Summary

The fault detection algorithm has only been evaluated on the two collectives pre-sented above. Additional simulations must be done to find out how and if it ispossible to use this model approach. The main results from the performed simu-lations can be summarized as

• The ability to detect a fault is highly dependent on the correlation of thecollective and the choice of the window length L. As for the district heatcollective, sudden changes in consumption during season changes, will beregistered as a fault with a short time window, and neglected with a longtime window. The collective must therefore be correlated during L samples.

• If a long window length is used, transient faults will be missed. On the otherhand, it should be easier to detect a slow change in consumption with a longwindow length. A method for finding the optimal window length has notbeen found.

• Zeros are difficult to detect, especially for consumers with low consumption.Zero consumption arises mostly if the AMR cease to function. It is notlikely that connection fails for several hours or days. Since the day meanconsumption is used in this model, a zero value for one or more hour will nothave a large affect of the day mean value. An alternative method could beused to detect zero consumption. Zeros could be detected with a separatesystem function before the statistical model is used.

• Not all faults that correspond to an incorrect constant in METER IN hasbeen detected. For the district heat collective, such faults are missed if theyoccur during the warmer period of the year. For the electricity collective,faults are detected first when the consumption is a factor 4, or 1

4of the actual

consumption.

Page 40: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

28 Simulations and Results

• A slow increase in consumption of 10% has only been detected for the districtheat collective.

• How the number of consumers affects the collective has not been investigated.It is not likely that the same fault occurs at the same time. If this is thecase, a collective with several consumers, that are well correlated, should beless sensitive towards multiple faults.

Page 41: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Chapter 5

Summary

5.1 Conclusions

In this thesis, two models that can be used to detect incorrect measurements havebeen derived. The first model uses historical data of consumption and outdoortemperature to estimate model parameters. When the model parameters have beenestimated, the consumption can be simulated by using the outdoor temperature.The simulated consumption can be compared to the actual consumption to detectdeviations in consumption. The second model is a more statistical approach thatcompares the correlation between consumers that can be grouped into a collective.If measurements from a consumer in the collective are incorrect, this consumer willbe less correlated towards the other consumers in the collective. By studying thecorrelation between the consumers in the collective, incorrect measurements canbe found. The conclusions will be divided for each model.

5.1.1 Simulation Model

• The model is best suited for consumers whose consumption mostly is affectedby the outdoor temperature. These consumers are district heat consumers,and consumers that use electricity for space heating. Consumption, notcorresponding to a change in outdoor temperature, will be interpreted asa fault. Some other explanation to a change in consumption, other than achange in temperature, may exist. The number of sun hours and wind speeddoes most likely affect the consumption.

• The model can be used both on consumers that have an increased con-sumption during weekdays as well as those who have a similar consumptionthroughout the week.

• A residual with a sliding window has been used to detect incorrect mea-surements. A sudden change in consumption is easier to detect than a slowchange. The choice of the window length is of importance. A long window

29

Page 42: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

30 Summary

length makes it easier to detect a slow change in consumption, but transientfaults can be missed and vice versa.

• When theoretical thresholds have been used, the thresholds are too low,especially for large time windows. This can be explained by the fact thatthe simulation error is not sufficiently normal distributed. A low thresholdwill result in false alarms. The generated false alarms, often occur when theconsumption can be related to a small change in consumption, that can notbe explained by a change in temperature. If these small deviations should notbe registered as a fault, theoretical thresholds can not be used. Simulationshave shown that a threshold based on experience can be used to reduce thenumber of false alarms, without missing the actual faults.

• To estimate the model parameters, correct measurements from one year mustbe available. Since the measurements are not corrected, the measurementdatabase contains incorrect data of the historical consumption. If this modelis going to be used in practice, the incorrect measurements must be corrected.

5.1.2 Statistical Model

• The fault detection performance is highly dependent on finding a collectivethat is well correlated. If these collectives can be found, the model can beused on district heat consumers as well as electricity consumers.

• Today, the consumers are divided into groups according to basic data fromSwedish Statistics. These groupings are too imprecise to serve as collectives.New refined groupings must be done. The model itself can be used to findconsumers that can constitute a collective. In the fault free case, faults mustnot be detected. If a consumer does not belong to the collective, the modelwill interpret the consumers’ consumption as incorrect and a fault will beregistered.

• All faults that can occur have not been detected. As for the district heatcollective, small deviations during the warmer periods of the year are difficultto detect. For the electricity collective, faults were detected first when theconsumption was 4 or 1

4times the actual consumption. A slow increase

in consumption, corresponding to a trend, has not been detected for theelectricity collective. If collectives that are more correlated are used, thesefaults should be detected.

• Zeros are difficult to detect, especially for consumers with low consumption.Zero consumption arises mostly if the AMR cease to function. It is notlikely that connection fails for several hours or days. Since the day meanconsumption is used in this model, a zero value for one or more hour will nothave a large affect of the day mean value. An alternative method could beused to detect zero consumption. Zeros could be detected with a separatesystem function before the statistical model is used.

Page 43: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

5.2 Suggestions to Further Studies 31

5.2 Suggestions to Further Studies

The behavior of district heat and electricity consumption is a complex process.A lot of parameters can be varied in the derived models, and the parameters canvary for each consumer. Additional simulations and analyzes, especially for thestatistical model, are needed before any of the models can be implemented in asystem. Thus, the work in this thesis has left a foundation for further studies.

• Previous studies, [1], [6] and [5] have used the outdoor temperature, numberof sun hours and wind speed to create a cooling signal. It would be interestingto introduce these factors in the simulation model to see if this would makethe simulation more normally distributed. If this is the case, the theoreticalthresholds could be used.

• The optimal window length for the residual used to detect faults with thesimulation model has not been investigated. The window length is a balancebetween detecting transient faults and missing slow trends. One approachcould be to use several residuals that are sensitive towards a certain fault.The optimal window length, used in the fault detection algorithm in thestatistical model, must also be investigated further.

• The day mean value of the consumption has been used in all models. If thehourly measurements are to be used explicitly, one must be able to measurethe hourly outdoor temperature. It will also be more difficult to find corre-lation between the consumers’ hourly measurements, since the consumptionpattern during a day vary for each consumer. If the day mean consumptionis used, occasional incorrect measurements can be missed. This could besolved by checking the hourly measurements min/max values, prior the daymean value is calculated. For electricity consumers, the size of the fuse etc.,could be used to calculate the maximal physical possible consumption.

• The statistical model has only been used on two collectives. To investigatethis model approach, several collectives, both for district heat and electricityconsumers, must be derived.

• How the number of consumers affects the collective has not been investigated.It is not likely that the same fault occurs at the same time. If this is thecase, a collective with several consumers, that are well correlated, should beless sensitive towards multiple faults.

Page 44: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

32 Summary

Page 45: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Bibliography

[1] L. Arvastson. Stochastic Modeling and Operational Optimization in District

Heating Systems. Phd thesis lutfms-1015-2001, Centre of Mathematical Sci-ences, Lund Institute of Technology, Lund, Sweden, May 2001.

[2] G. Blom. Sannolikhetsteori och Statistikteori med Tillämpningar. Studentlit-teratur, Lund, Sweden, 4th edition, 1989. In Swedish.

[3] L. Eldén and L. Wittmeyer-Koch. Numerisk Analys - en introduktion. Stu-dentlitteratur, Lund, Sweden, 3rd edition, 1996. In Swedish.

[4] A. Holtsberg et al. Cross validation of dynamic models for heat demand.District Heating International, 23:594–600, 1994.

[5] R. Felix. Prediktion av elförbrukning med periodiska styckvis linjära mod-eller. Master’s thesis LuTFD2/TFMS-5052-SE, Department of MathematicalStatistics, Lund Institute of Technology, Lund, Sweden, Februari 1997.

[6] M. Jansson and A. Karlsson. Flerstegsprediktion av elförbrukning med använd-ning av väderfaktorer. Master’s thesis LuTFD2/TFMS-3044-SE, Departmentof Mathematical Statistics, Lund Institute of Technology, Lund, Sweden, No-vember 1995.

[7] L. Ljung and T. Glad. Modellbygge och Simulering. Studentlitteratur, Lund,Sweden, 2nd edition, 2004. In Swedish.

[8] The Mathworks. Matlab function reference.http://www.mathworks.com/access/helpdesk/help/techdoc/ref/

corrcoef.html.

[9] Swedish Standards Institution, SIS, Stockholm, Sweden. Heat Meters - Part:1

General Requirements, 1st edition, 6 1997.

33

Page 46: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

34 Bibliography

Page 47: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Appendix A

Figures — Simulation Model

0 50 100 150 200 250 300 3500

0.02

0.04a

[MW

h]

0 50 100 150 200 250 300 350−0.01

0

0.01b

[MW

h]

0 50 100 150 200 250 300 3500

0.02

0.04c

[MW

h]

0 50 100 150 200 250 300 350−0.01

0

0.01

[MW

h]

d

day number

error

error

yy hatt

yy hatt

Figure A.1. Consumer with big influence of weekday/weekend trends. Data from year2001 used for estimation (a). The solid line is the measured consumption and the dottedline is the simulated consumption. Simulation error for the estimated data (b). Datafrom year 2003 used for simulation (c). The solid line is the measured consumption andthe dotted line the simulated consumption. Simulation error for validation data (d).

35

Page 48: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

36 Figures — Simulation Model

−4 −2 0 2 40

20

40

60a

0 200 400 600 800−200

0

200

400b

−4 −2 0 2 40

20

40

60

80c

0 200 400 600 800−200

0

200

400d

−4 −2 0 2 40

20

40

60e

0 200 400 600 800−200

0

200

400f

Figure A.2. Consumer with little influence of weekday/weekend trends. Histogram ofthe simulation error in ideal case (a), on estimation data (c) and validation data (e).Auto Correlation Sequence for the simulation error in ideal case (b), on estimation data(d) and validation data (f).

Page 49: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

37

−4 −2 0 2 40

10

20

30

40a

0 200 400 600 800−200

0

200

400b

−4 −2 0 2 40

20

40

60

80c

0 200 400 600 800−200

0

200

400d

−4 −2 0 2 40

20

40

60e

0 200 400 600 800−200

0

200

400f

Figure A.3. Consumer with big influence of weekday/weekend trends. Histogram ofthe simulation error in ideal case (a), on estimation data (c) and validation data (e).Auto Correlation Sequence for the simulation error in ideal case (b), on estimation data(d) and validation data (f).

Page 50: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

38 Figures — Simulation Model

0 50 100 150 200 250 300 3500

0.02

0.04

[MW

h]

0 50 100 150 200 250 300 3500

5

10

15r/JNormalized threshold

0 50 100 150 200 250 300 3500

0.5

1

Detected fault=1

yy hatt

Figure A.4. The model parameters are estimated with data from 2001. The thresholdis calculated with data from 2003 and p =0.01. The window lenght is set to L =5. Theconsumption for 2004 is simulated and faults are detected around day 130 and day 150.The fault at day 150 is an actual fault. If the fault at day 130 is not to be detectedtheoretical thresholds can not be used.

Page 51: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

39

0 50 100 150 200 250 300 3500

1

2

3x 10

−3

[MW

h]

0 50 100 150 200 250 300 3500

50

100r/JNormalized threshold

0 50 100 150 200 250 300 3500

0.5

1

day number

Detected fault=1

yy hatt

Figure A.5. Fault detection using theoretical threshold. Actual fault related to a suddenchange in consumption occurs at day 330. With the theoretical threshold false alarmsare registered.

Page 52: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

40 Figures — Simulation Model

0 50 100 150 200 250 300 3500

1

2

3x 10

−3

[MW

h]

0 50 100 150 200 250 300 3500

20

40

60r/JNormalized threshold

0 50 100 150 200 250 300 3500

0.5

1

day number

Detected fault=1

yy hatt

Figure A.6. Same conditions as in A.5 but the threshold is set twice as high as thetheoretical threshold. No false alarms are registered but still the actual fault at day 330is detected.

Page 53: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

41

0 50 100 150 200 250 300 350

0

0.05

0.1

[MW

h]

0 50 100 150 200 250 300 3500

10

20

30

0 50 100 150 200 250 300 3500

0.5

1

day number

yy hatt

r/JNormalized threshold

Detected fault=1

Figure A.7. Fault detection using theoretical threshold. Actual fault related to missingdata occurs at day 345. With the theoretical threshold false alarms are registered.

Page 54: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

42 Figures — Simulation Model

0 50 100 150 200 250 300 350

0

0.05

0.1

[MW

h]

0 50 100 150 200 250 300 3500

5

10

15

r/JNormalized threshold

0 50 100 150 200 250 300 3500

0.5

1

day number

Detected fault=1

yy hatt

Figure A.8. Same conditions as in A.7 but the threshold is set twice as high as thetheoretical threshold. No false alarms are registered but still the actual fault at day 345is detected.

Page 55: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

43

0 50 100 150 200 250 300 3500

0.2

0.4

[MW

h]

0 50 100 150 200 250 300 3500

2000

4000

6000

8000r/JNormalized threshold

0 50 100 150 200 250 300 3500

0.5

1

day number

Detected fault=1

yy hatt

Figure A.9. Fault detection using theoretical threshold. Actual fault related to anincorrect constant in the database METER IN occurs at day 269. The consumption isten times as high as assumed. With the theoretical threshold false alarms are registered.

Page 56: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

44 Figures — Simulation Model

0 50 100 150 200 250 300 3500

0.2

0.4

[MW

h]

0 50 100 150 200 250 300 3500

1000

2000

3000

0 50 100 150 200 250 300 3500

0.5

1

day number

r/JNormalized threshold

Detected fault=1

yy hatt

Figure A.10. Same conditions as in A.9 but the threshold is set three times as high asthe theoretical threshold. No false alarms are registered but still the actual fault at day345 is detected.

Page 57: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

45

0 50 100 150 200 250 300 3500

1

2

3

[MW

h]

0 50 100 150 200 250 300 3500

2

4

6

8r/JNormalized threshold

0 50 100 150 200 250 300 3500

0.5

1

day number

Detected fault=1

yy hatt

Figure A.11. Fault detection using theoretical threshold. Actual fault related to a slowchange in the assumed consumption. The consumption starts to decrease around day225. With the theoretical threshold false alarms are registered.

Page 58: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

46 Figures — Simulation Model

0 50 100 150 200 250 300 3500

1

2

3

[MW

h]

0 50 100 150 200 250 300 3500

1

2

3

4

0 50 100 150 200 250 300 3500

0.5

1

day number

yy hatt

Detected fault=1

r/JNormalized threshold

Figure A.12. Same conditions as in A.11 but the threshold is set twice as high as thetheoretical threshold. No false alarms are registered but still the actual fault is detected.

Page 59: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

Appendix B

Figures — Statistical Model

0 50 100 150 200 250

200

300

400

Consumer 1

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

200

400

600

Consumer 2

Ele

ctric

ity [k

Wh]

0 50 100 150 200 25020

40

60

80

100

120

Consumer 3

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

10

20

30

40

50

Consumer 4

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

200

400

600

Consumer 5

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2501

2

3

4

5

Con

sum

er N

r

Figure B.1. Fault free electricity consumption for five consumers that can be seen ascandidates of a collective. The fault detection algorithm, with L = 25 and α = 0.05,detects faults for consumer four.

47

Page 60: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

48 Figures — Statistical Model

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.05

0.1

0.15

0.2

0.25

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.2. A fault is introduced at time t = 400 − 401 in consumer two. The faultcorresponds to a constant error of a factor 10 in METER BAS. The fault is detected.

Page 61: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

49

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.1

0.2

0.3

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.3. A fault is introduced at time t = 400 − 638 in consumer two. The faultcorresponds to a constant error of a factor 10 in METER BAS. The fault is detected,but is interpreted as correct L samples after it is detected.

Page 62: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

50 Figures — Statistical Model

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

Con

sum

er N

r

Figure B.4. A fault is introduced at time t = 150 − 638 in consumer two. The faultcorresponds to a constant error of a factor 1

10in METER BAS. The fault is not detected,

since the fault appears during the warmer period of the year.

Page 63: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

51

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.5. A fault is introduced at time t = 300 − 638 in consumer two. The faultcorresponds to a constant error of a factor 1

10in METER BAS. The fault is detected,

since the fault appears during the colder period of the year.

Page 64: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

52 Figures — Statistical Model

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 6000

0.01

0.02

0.03

0.04

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

Con

sum

er N

r

Figure B.6. Zeros are introduced to consumer three at time t = 550 − 551. The faultis not detected with a window length of L = 45. A shorter window lenght will result infalse alarms for consumer three.

Page 65: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

53

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 6000

0.01

0.02

0.03

0.04

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.7. Zeros are introduced to consumer three at time t = 550 − 638. The faultis detected with a window length of L = 45 at time t = 570.

Page 66: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

54 Figures — Statistical Model

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 1

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

Consumer 2

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.1

0.2

0.3

Consumer 3

Dis

tric

t Hea

t [M

Wh]

0 200 400 600

0.01

0.02

0.03

0.04

0.05

Consumer 4

Dis

tric

t Hea

t [M

Wh]

0 200 400 6001

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.8. A linear trend of 10% has been added to consumer three at time t = 450.The fault corresponds to an incorrect meter that has started to drive. The fault isdetected at t = 470.

Page 67: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

55

0 50 100 150 200 250

200

400

600

Consumer 1

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

100

200

300

400

500

Consumer 2

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

10

20

30

40

50

Consumer 3

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

200

400

600

Consumer 4

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2501

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.9. A constant error of a factor 4 is introduced in consumer two at time t = 150.The fault is detected at t = 150.

Page 68: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

56 Figures — Statistical Model

0 50 100 150 200 250

200

400

600

Consumer 1

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

20

40

60

80

100

120

Consumer 2

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

10

20

30

40

50

Consumer 3

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

200

400

600

Consumer 4

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2501

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.10. A constant error of a factor 1

4is introduced in consumer two at time

t = 150. The fault is detected at t = 160.

Page 69: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

57

0 50 100 150 200 250

200

400

600

Consumer 1

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2500

50

100

Consumer 2

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

10

20

30

40

50

Consumer 3

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

200

400

600

Consumer 4

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2501

2

3

4

Con

sum

er N

r

Figure B.11. Zeros are introduced in consumer two at time t = 140. The fault is notdetected with a window length of L = 20.

Page 70: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

58 Figures — Statistical Model

0 50 100 150 200 250

200

400

600

Consumer 1

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2500

50

100

Consumer 2

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

10

20

30

40

50

Consumer 3

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

200

400

600

Consumer 4

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2501

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.12. Zeros are introduces in consumer two at time t = 150− 273. The fault isdetected with a window length of L = 20.

Page 71: Institutionen för systemteknik · district heating, district cooling and water. Measurements are collected with in-tervals of once an hour, up to once a year. ... may be missed without

59

0 50 100 150 200 250

200

400

600

Consumer 1

Ele

ctric

ity [k

Wh]

0 50 100 150 200 25020

40

60

80

100

120

Consumer 2

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

10

20

30

40

50

Consumer 3

Ele

ctric

ity [k

Wh]

0 50 100 150 200 250

5000

10000

15000

Consumer 4

Ele

ctric

ity [k

Wh]

0 50 100 150 200 2501

2

3

4

Con

sum

er N

r

Detected Fault

Figure B.13. A linear trend of 50% has been added to consumer four. The fault isdetected at t = 210. A trend less than 50% will not be detected for this colective.