91
Probabilistic Calibration of Building Energy Models For Scalable and Detailed Energy Performance Assessment of District-Heated Multifamily Buildings Lukas Lundström Mälardalen University Doctoral Dissertation 318

Probabilistic Calibration of Building Energy Modelsmdh.diva-portal.org/smash/get/diva2:1452412/FULLTEXT02.pdf · 2020. 7. 10. · sh shading or sheltering sky sky temperature or sky

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

  • ISBN 978-91-7485-473-2ISSN 1651-4238

    Address: P.O. Box 883, SE-721 23 Västerås. SwedenAddress: P.O. Box 325, SE-631 05 Eskilstuna. SwedenE-mail: [email protected] Web: www.mdh.se

    Probabilistic Calibration of Building Energy ModelsFor Scalable and Detailed Energy Performance Assessment of District-Heated Multifamily Buildings

    Lukas Lundström

    Mälardalen University Doctoral Dissertation 318

    Luka

    s Lun

    dströ

    m P

    RO

    BAB

    ILISTIC C

    ALIB

    RA

    TION

    OF B

    UILD

    ING

    ENER

    GY M

    OD

    ELS2020

  • Mälardalen University Press DissertationsNo. 318

    PROBABILISTIC CALIBRATION OF BUILDING ENERGY MODELS

    FOR SCALABLE AND DETAILED ENERGY PERFORMANCEASSESSMENT OF DISTRICT-HEATED MULTIFAMILY BUILDINGS

    Lukas Lundström

    2020

    School of Business, Society and Engineering

  • This thesis is based on work conducted within the industrial post-graduate schoolReesbe – Resource-Efficient Energy Systems in the Built Environment. The projectsin Reesbe are aimed at key issues in the interface between the business responsibilitiesof different actors in order to find common solutions for improving energy efficiencythat are resource-efficient in terms of primary energy and low environmental impact.

    The research groups that participate are Energy Systems at the University of Gävle,Energy and Environmental Technology at the Mälardalen University, and Energy andEnvironmental Technology at the Dalarn University. Reesbe is an effort in close co-operation with the industry in the three regions of Gävleborg, Dalarna, and Mälardalen,and is funded by the Knowledge Foundation (KK-stiftelsen).

    www.hig.se/Reesbe

    Copyright c© Lukas Lundström, 2020ISBN 978-91-7485-473-2ISSN 1651-4238Printed by E-Print AB, Stockholm, Sweden

  • Mälardalen University Press DissertationsNo. 318

    PROBABILISTIC CALIBRATION OF BUILDING ENERGY MODELSFOR SCALABLE AND DETAILED ENERGY PERFORMANCE

    ASSESSMENT OF DISTRICT-HEATED MULTIFAMILY BUILDINGS

    Lukas Lundström

    Akademisk avhandling

    som för avläggande av teknologie doktorsexamen i energi- och miljöteknik vid Akademinför ekonomi, samhälle och teknik kommer att offentligen försvaras torsdagen den10 september 2020, 10.00 i Milos + digital (Zoom), Mälardalens högskola, Västerås.

    Fakultetsopponent: Angela Sasic, Chalmers University of Technology

    Akademin för ekonomi, samhälle och teknik

  • AbstractThere is a global need to reduce energy consumption and integrate a larger share of renewable energy production while meeting expectations for human well-being and economic growth. Buildings have a key role to play in this transition to more sustainable cities and communities.

    Building energy modeling (BEM) and simulation are needed to gain detailed knowledge ofthe heat flows and parameters that determine the thermal energy performance of a building. Remote sensing techniques have enabled the generation of geometrical representations of existing buildings on the scale of entire cities. However, parameters describing the thermal properties ofthe building envelope and the technical systems are usually not readily accessible in a digitized form and need to be inferred. Further, buildings are complex systems with indoor environmental conditions that vary dynamically under the stochastic influence of weather and occupant behavior and the availability of metering data is often limited. Consequently, robust inference is needed to handle high and time-varying uncertainty and a varying degree of data availability.

    This thesis starts with investigation of meteorological reanalyses, remote sensing and onsite metering data sources. Next, the developed dynamic and physics-based BEM, consisting of a thermal network and modeling procedures for the technical systems, passive heat gains and boundary conditions, is presented. Finally, the calibration framework is presented, including a method to transform a deterministic BEM into a fully probabilistic BEM, an iterated extended Kalman filtering algorithm and a probabilistic calibration procedure to infer uncertain parameters and incorporate prior knowledge.

    The results suggest that the proposed BEM is sufficiently detailed to provide actionable insights, while remaining identifiable given a sufficiently informative prior model. Such a prior model can be obtained based solely on knowledge of the underlying physical properties of the parameters, but also enables incorporation of more specific information about the building. The probabilistic calibration approach has the capability to combine evidence from both data and knowledge-based sources; this is necessary for robust inference given the often highly uncertain reality in which buildings operate.

    The contributions of this thesis bring us a step closer to producing models of existing buildings, on the scale of whole cities, that can simulate reality sufficiently well to gain actionable insights on thermal energy performance, enable buildings to act as active components of the energy system and ultimately increase the operational resilience of the built environment.

    ISBN 978-91-7485-473-2ISSN 1651-4238

  • The theory of probabilities is basically onlycommon sense reduced to a calculus.

    — Pierre-Simon Laplace

  • Sammanfattning

    För att minska miljöpåverkan och den globala uppvärmningen behöver ener-gianvändningen effektiviseras och en högre andel förnybar och ofta variabelenergiproduktion integreras, samtidigt som ekonomisk tillväxt och människorsvälbefinnande behöver tillgodoses. Energieffektivisering och digitalisering avbyggnader spelar en viktig roll för att möjliggöra att av dessa mål nås.

    Modellering och simulering av byggnaders energianvändning behövs för attfå detaljerad kunskap om de värmeflöden och parametrar som avgör en byg-gnads energiprestanda. Framsteg inom flygburen laserskanning har möjlig-gjort skapandet av geometriska modeller av det befintliga byggnadsbeståndet.Parametrar som beskriver byggnaders termiska egenskaper och de tekniskasystemen är emellertid ofta inte tillgängliga i ett digitaliserat format och be-höver estimeras. Byggnader är komplexa system där temperaturer och ener-gianvändning varierar dynamiskt under stokastiskt inflytande av väder, hur debrukas, och egenskaper i delsystem och komponenter; och trots framsteg i dig-italiseringen så är tillgång till sensordata från byggnader ofta begränsat. Föl-jaktligen behöver robusta estimeringsmetoder kunna hantera varierande graderav osäkerhet och datatillgänglighet.

    Denna avhandling börjar med att undersöka tillgänglig information frånmeteorologiska reanalyser, fjärranalys och mätdata från byggnaden. Därefterpresenteras en dynamisk och fysikbaserad byggnadsenergimodell. Slutligenpresenteras en modellkalibreringsmetod bestående av en filtreringsalgoritmför att hantera osäkra tidsserier och en probabilistisk inferensmetod för atthantera osäkra parametrar och assimilera kunskapsbaserad information.

    Resultaten visar att byggnadsenergimodellen är detaljrik nog för att ge an-vändbara kunskaper om de delsystem och komponenter som avgör byggnadensfaktiska energiprestanda, men fortfarande identifierbar med hjälp informationsom kan erhållas enbart baserad på kunskap om modellparameternas fysiskaegenskaper. Vidare har den förslagna kalibreringsmetoden förmågan att as-similera information från både data- och kunskapsbaserade källor; vilket är enförutsättning för robust och skalbar inferens givet den stokastiska och icke-digitaliserade verklighet de flesta byggnader verkar i.

    Bidragen från denna avhandling tar ett steg närmare till att skapa modellerav existerande byggnader, för hela städer, vilka kan simulera byggnaderna till-räckligt verklighetstroget för att ge analyserbara kunskaper om byggnadersenergiprestanda, möjliggöra byggnader till att vara aktiva komponenter i en-ergisystemet och på sikt bidra till att skapa förutsättningar för övergången tillmer hållbara och smarta städer.

  • List of papers

    This thesis is based on the following papers, which are referred to in the textby their Roman numerals.

    I Heat Demand Profiles of Energy Conservation Measures inBuildings and Their Impact on a District Heating System.Published in Applied Energy (Lundström and Wallin, 2016).

    II Mesoscale Climate Datasets for Building Modelling andSimulation. Published in Proceedings of CLIMA 2016: 12th REHVAWorld Congress (Lundström, 2016)

    III Adaptive Weather Correction of Energy Consumption Data.Published in Energy Procedia, Proceedings of ICAE 2016:International Conference on Applied Energy . (Lundström, 2017)

    IV Development of a Space Heating Model Suitable for AutomatedModel Generation of Existing Multifamily Buildings — Case Studyin Nordic Climate. Published in Energies (Lundström, Akander, andZambrano, 2019)

    V Uncertainty in Hourly Readings from District Heat Billing Meters.Proceedings of SIMS 2019: 60th International Conference ofScandinavian Simulation Society (Lundström and Dahlquist, 2020)

    VI Bayesian Calibration with Augmented Stochastic State-SpaceModels of District-Heated Multifamily Buildings. Published inEnergies (Lundström and Akander, 2019)

    Paper I was previously included in the licentiate thesis entitled "Heat DemandProfiles of Buildings’ Energy Conservation Measures and Their Impact on Re-newable and Resource Efficient District Heating Systems" (Lundström, 2016)

  • Contents

    1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.1.1 District heating systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1.2 Actual energy performance of buildings . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1.3 Building energy modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1.4 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1.5 Time-varying uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    1.2 Identified research gaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3 Research questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.4 Objective and delimitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.5 Thesis outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2 Time-series data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.1 District heating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    2.1.1 Information entropy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.1.2 Uncertainty in hourly heat meters readings . . . . . . . . . . . . . . . . . . . 122.1.3 Case study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    2.2 Domestic hot water . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.3 Weather data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    2.3.1 Meteorological analyses and reanalyses . . . . . . . . . . . . . . . . . . . . . . . . 172.3.2 Satellite-derived solar irradiance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    2.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    3 A Dynamic Physics-Based Building Energy Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2 Thermal network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    3.2.1 Ratios and fractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.2.2 Heat transfer coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.2.3 Heat capacities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.2.4 Operative temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    3.3 Technical systems of district-heated multifamily buildings . . . . . . . . 283.3.1 Hydronic heating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.3.2 Domestic hot water . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.3.3 Heat losses piping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.3.4 Ventilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    3.4 Heat gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.4.1 Internal heat gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

  • 3.4.2 Solar heat gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.5 Boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    3.5.1 Weighted solar irradiance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.5.2 Shading reduction factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.5.3 Window blinds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.5.4 Sky temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.5.5 Exterior surface convective heat transfer coefficients . . . 363.5.6 Infiltration potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    3.6 Case study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383.6.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393.6.2 Comparing energy, temperature and solar heat gains . . . . 403.6.3 Node temperature profiles of external wall elements . . . . 413.6.4 Air infiltration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423.6.5 Sky temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423.6.6 Exterior surface convective heat transfer coefficients . . . 433.6.7 Shading reduction factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443.6.8 Window blinds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    3.7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    4 A Probabilistic Calibration Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.1 Probabilistic calibration with augmented stochastic state-space

    models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.1.1 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.1.2 Augmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.1.3 Nonlinear state estimation of a stochastic system . . . . . . . . . 494.1.4 Iterated Extended Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.1.5 Measurement noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524.1.6 Process noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    4.2 Case study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.2.1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.2.2 Bayesian parameter estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584.2.3 The behavior of the filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604.2.4 Data availability experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    4.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

    5 Conclusions and Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665.1 Conclusions in relation to the research questions . . . . . . . . . . . . . . . . . . . . . . . . 665.2 Challenges and potential future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

  • Nomenclature

    Abbreviations

    AHU Air Handling UnitBEM Building Energy ModelingDH District HeatingDCW Domestic Cold WaterDHW Domestic Hot WaterDHWC Domestic Hot Water CirculationHMC Hamiltonian Monte CarloLiDAR Light Detection And RangingMLE Maximum Likelihood EstimationRMSD Root Mean Square DeviationTRV Thermostatic Radiator ValvePDF Probability Density Function

    Symbols

    ∆t time interval [h]αsol solar absorption [-] or solar altitude [◦]η efficiency [-]γ azimuth angle [◦]κ areal heat capacity [Wh/(◦C ·m2s )]κρa heat capacity of air per volume [Ws/(l · ◦C)]φ normalized thermal power [W/m2fl]ρa density of air [kg/m3]σ standard deviationσ Stefan-Boltzmann constant, 5.67e-8 [W/(m2 ·K4)]θ centigrade temperature [◦C]θ set of unknown/uncertain parametersπ probability density distributionε Kalman filter innovationA continuous-time state transition matrixB continuous-time input coefficient matrixF state transition matrixG input coefficient matrixH measurement model matrixK Kalman gainP covariance matrixQ process noise covariance

    Continued on next page

  • R measurement noise covarianceS Kalman filter innovation covarianceu input vectorv measurement noise vectorw Process noise vectorx state vectory measurement vectorC coefficient [-] or normalized heat capacity [Wh/(◦C ·m2fl)]D,H,L distance, height, length [m]F, f factor/fraction [-]H information entropyH normalized heat transfer coefficient [W/(◦C ·m2fl)]H∗ modified building’s ceiling height [m]I solar or thermal irradiance [W/m2s ]L quantization levelsP building perimeter [m]Q quantity of thermal energy [kWh]R normalized thermal resistance [m2fl · ◦C/W]U thermal transmittance [W/(◦C ·m2s )]Uloc, U10m local wind speed [m/s], meteorological wind speed at 10 m height [m/s]g total solar energy transmittance [-]h surface coefficient of heat transfer [W/(◦C ·m2s )]n exponentqV specific air flow rate [l/(s ·m2fl)]q∗V potential specific air flow rate [Pa

    n/m2fl]r ratio [-]u control signal [-]

    Subscripts

    b building or basebl (window) blindsc,ci convective, convective interior surfacedi f ,dir diffuse, directe external (as in outdoor)el (building) elementew external wallsg f ground floorgl glazing (windows, doors etc)gr groundhor horizontaldhe domestic household electricityhyd hydronic heating systemim internal mass (internal walls, intermediate floors and adiabatic external walls)in f infiltration (uncontrolled air leakage)int internal (as in indoor)k time index, discrete-time

    Continued on next page

  • lmtd radiator logarithmic mean temperature differencem mass related conductance or capacitancemax maximumop operativeobst,ovh obstacle, overhangp pipepb proportional bandr,ri radiative, radiative interior surfaceret returnr f roofs stackse, si surface exterior, surface interiorset set-pointsh shading or shelteringsky sky temperature or sky thermal radiationsol solar radiation/heat gainstrd surface thermal radiation downwardssup supplysys systemt time index, continuous-timetb thermal bridgestot totaltrv thermostatic radiator valve(s)ve ventilationver verticalvi virtual ground layerw windww windward-orientedwi windowswma weighted moving average

  • Acknowledgments

    This research has been carried out under the auspices of the industrial post-graduate school Reesbe where the three participating universities (Universityof Mälardalen, University of Gävle, University of Dalarna), together with theKnowledge Foundation (KK-stiftelsen), the participating companies (Eskil-stuna Kommunfastigheter and Eskilstuna Energy and Environment) and Es-kilstuna City all contributed to make this dissertation possible.

    I would like to thank my supervisors Erik Dahlquist, Fredrik Wallin andJan Akander for their guidance and support. Extra thanks go to Jan Akanderfor your co-authorship in my later publications, where I felt we were able toreally push that boundary and contribute with new knowledge. I would liketo thank Jesús Zambrano for insightful discussions on mathematical modelingand Björn Karlsson for interesting discussions and recommending me for thisPhD candidate position.

    I would like to thank Eskilstuna Kommunfastigheter for the opportunity toconduct research while gaining work experience as both project manager andenergy strategist. Jan Helgesson, as company mentor, has always made me feelwelcome and ensured I was in positions where I could develop professionallyand gain insights of challenges relevant for the research. All my colleagues atMälardalens University, Eskilstuna Kommunfastigheter and Reesbe researchschool deserve a huge thank you for fruitful meetings, fikas, after work beersand support with both work- and research-related matters.

    My greatest and most important supporters, however, are those I have athome. Jessika and Lovis, thank you for all the joy and love you have givenme.

  • 1. Introduction

    This chapter introduces the background and motivation behind the work in thisthesis and discusses related previous research. Further, the identified researchgaps, research questions, objective and delimitation, and outline of this thesisare presented.

    1.1 BackgroundIn the past century, continuously increasing access to abundant, cheap andhigh-density energy sources has been a prerequisite and a driving force for thegrowth of modern society. In 2019, global energy use was ten times higherthan in 1919, and the share from fossil fuels was about 80% [8]. The dom-inant share of fossil fuel based energy is a major driver of global warming,which is the result of an increase of the greenhouse effect due to increasedconcentrations of CO2 and other greenhouse gases in the atmosphere. Humanwell-being, technological development and economic growth have thus be-come dependent on a non-sustainable harvesting of limited resources. There isa need to reduce energy consumption, integrate a larger share of renewable en-ergy production and mitigate environmental impacts, all while meeting expec-tations for human well-being and economic growth. In the European Union,the buildings sector accounts for 40% of final energy use [9]; energy-efficientbuildings have a key role to play in this transition to a more sustainable society.

    1.1.1 District heating systemsIn Sweden, most cities have extensive district heating (DH) networks. DHoperators have a share of about 55% of the heating market in the buildingsand service sector, and a share of 90% when considering only multifamilybuildings [10].

    District heating is a technical system with centralized heat production anda network of pipelines using hot water as an energy carrier to distribute heatto end users. DH enables the utilization of lower-value resources such as in-dustrial surplus heat, heat from bulky residual biomass and waste materials,thereby contributing to improved total energy system efficiency by avoidingthe use of high-exergy energy. Resource utilization can be further improvedby co-generation of heat and electricity in combined heat and power (CHP)plants. Figure 1.1 shows the merit order of operation of the plants and the heatload duration for the Eskilstuna DH system.

    1

  • 0

    50

    100

    150

    200

    250

    37 170 365

    MW

    Time, days

    Oil-HO

    Turbine bypass

    Bio-HO

    Bio-CHP

    Heat load

    Electricity prod.

    Peak Mid Base

    Figure 1.1. Duration plot showing the heat and electricity production (average dailyvalues) of the district heating system of Eskilstuna, Sweden. The marginal load isdivided into three periods: base, mid and peak load.

    Peak Mid Base Peak Mid Base

    a) duration plot b) temperature correlation plot

    37 170 3600.0

    0.1

    0.2

    0.3

    -15.0 -3.0 5.5 22.0Time, days Outdoor temperature, °C

    Avg

    . dai

    ly th

    erm

    al p

    ower

    , kW

    Buildingenvelope

    Householdelectricity

    Domestichot water

    Figure 1.2. Heat demand profiles for three energy-saving measures for a typicalSwedish multifamily building. The DH marginal production type (base, mid and peak)is indicated with shading in the background. The profiles are scaled to the annual totalof 1 MWh.

    2

  • Knowledge on how energy retrofitting of district-heated buildings impactsthe DH system, which was the objective of the Licentiate thesis [7] and PaperI, is essential for planning of sustainable communities. Figure 1.2 shows theimpact on the Eskilstuna DH system of a selection of energy-saving measures.These studies concluded that energy-conservation measures that decrease heatloss due to heat transfer (for example, by improving insulation of the build-ing envelope and heat recovery in the ventilation) lead to the most seasonallyevenly distributed heat load curve for the DH system. A more even heat loadacross the seasons increases the utilization rate of the base plant, improves theconditions for electricity co-generation and makes more on-demand capacityavailable that could potentially be used to integrate the growing share of in-termittent and weather-dependent electricity production in the Nordic energysystem. Thus, although buildings utilize large quantities of energy, there arepossibilities to reduce their energy use both with energy efficiency measuresthat are integrated when they are refurbished, and by supplying energy in amore efficient way.

    1.1.2 Actual energy performance of buildingsBuildings are complex systems with indoor environmental conditions and en-ergy use that vary dynamically under the stochastic influences of weather, oc-cupant behavior and component and equipment failures [11]. Consequently,there is often a discrepancy between the intended and actual energy perfor-mance of buildings, commonly known as the ’energy gap’ [12]. Senave et al.[13] defined three key elements for which thorough insight is required to assesenergy performance of existing buildings: (i) the thermal performance of thebuilding fabric, (ii) the efficiency of the technical systems, and (iii) the behav-ior of the users.

    Solar heat gains

    Internal gains

    Heating system

    Internal DHWC

    Space heatingOverheating

    Thermal mass

    Ventilation

    Transmission

    Figure 1.3. Heat balance of a district-heated Swedish multifamily building. The heightof the gray areas marks the relative share of the total heat flow over the heating season.

    Figure 1.3 shows the heat balance of a typical district-heated Swedish mul-tifamily building (from the case study of Paper VI). The middle bar of thefigure represents the conditioned space, the left bars show the passive heat

    3

  • District heating

    Solar heat gains

    Internal gains

    Heating system

    DHW

    Internal DHWC

    Space heating

    Ventilation

    Transmission

    InfiltrationManual venting

    AHU

    Thermal bridges

    Roof

    Windows

    External walls

    Ground floor

    Pipe network Internal mass

    Figure 1.4. Typical heat flows (over the heating season) in a DH-connected Swedishmultifamily building.

    gains and the controlled heat gain from the heating system, and the right barshows the heat losses. The gains and losses need to be in balance to maintainthe desired temperature of the conditioned space. ’Overheating’ in the figurerepresents the heat from the heating system that causes indoor temperatures torise above the desired set-point temperature, heat use that could potentially beavoided with improved control. The ’thermal mass’ represents the heat flowgoing back and forth between the conditioned space and the thermal massof building. Identifying the characteristics of the thermal mass is needed toachieve good control of thermal comfort and for application of more flexibleheat use. According to Kensby et al. [14], there is untapped potential in us-ing thermal mass as short-term thermal energy storage to shift heat demandfrom times when the district heat is produced at high cost and with negativeenvironmental impact to more favorable hours.

    In Figure 1.4, the heat balance of Figure 1.3 is expanded on the left sideto also show the total heat supply, segregated into heat used for the heatingsystem, domestic hot water (DHW), domestic hot water circulation (DHWC)and losses in the behind-the-meter piping network. Metering is often avail-able only for the total supplied heating, but more the detailed segregation isrequired to normalize energy use when for example reporting performanceratings for code compliance and green certification. Further, these heat flowshave distinct characteristics in terms of required temperature levels, weatherdependency and time patterns; information that is of interest for the DH opera-tor. On the right side of Figure 1.4, the heat losses are further segregated at thelevel of subsystems and components. This is typically the level of detail thatbuilding owners are interested in when identifying and applying energy-savingmeasures.

    4

  • 1.1.3 Building energy modelingThe total heating use is often the only heat flow that is metered and thus build-ing energy modeling (BEM) is required to identify other heat flows in thebuilding and the parameters governing these flows.

    BEM is often categorized into two major approaches: law-driven (forward)and data-driven (inverse) [15]. Law-driven models apply a given set of phys-ical laws that describe the system performance, whereas data-driven mod-els use system behavior as a predictor for system performance. Examplesof building engineering-based energy simulation software that utilize a law-driven approach include EnergyPlus [16] and IDA ICE1. Engineering-basedtools can offer flexibility regarding modeling the building’s subsystems andcomponents. Disadvantages of engineering-based tools include their require-ment for detailed information input and model configuration and that they tendto model how the building is designed to operate and not how it actually op-erates. Data-driven modeling approaches have gained considerable attentionin recent years; the review by Amasyali and El-Gohary [17] identified morethan 50 articles using data-driven approaches. In contrast to law-driven model-ing, data-driven models must be trained or calibrated, making use of meteringdata to determine model parameters and thereby resulting in robust simulatedpredictions of energy use. Data-driven approaches have the advantage of re-quiring less information input about the building itself. However, data-drivenapproaches may not perform well outside their training range and they oftenyield limited knowledge of underlying aspects that govern the energy use.

    Gray-box modeling combines law-driven and data-driven approaches, therebyleveraging the advantages and minimizing the disadvantages of both approaches.Gray-box models have parameters that are based on building physics and aretherefore interpretable as entities that describe the characteristics of the build-ing’s energy performance. However, they are often simplified and lumped toan extent that they cannot reveal many details about the building’s subsystemsand components. Gray-box models are calibrated to better match a building’sactual operation performance and can potentially also provide reasonable re-sults outside the range of the training data.

    Figure 1.5 shows a conceptualization of the relationship between modelcomplexity of above discussed model types, the required amount of informa-tion input and the potential insights the model can provide regarding the actualenergy performance of the building.

    1.1.4 CalibrationIn a review on methodologies and recent advancements in the calibration ofBEMs, Fabrizio and Monetti [18] concluded that automated models are of-ten simplified in order to reduce computational time, and as a result, more

    1http://www.equa.se/ida-ice

    5

    http://www.equa.se/ida-ice

  • Increasing complexity

    Required information input

    Potential insights

    Figure 1.5. Conceptualization of the relationship between model complexity, requiredamount of information input and the potential insights the model can provide on theactual energy performance of the building.

    complex models are difficult to handle in the calibration process. They alsohighlighted the importance of assessment of occupant behavior, “since build-ing usage is one of the main sources of uncertainty in building simulationmodels” [18].

    In recent years, stochastic calibration methods have become the standardapproach; they do not rely on single deterministic values for uncertain quanti-ties, but instead incorporate and explore a distribution of possible values [19].Using the Bayesian approach allows incorporation of any prior information orknowledge that could help in the inference of unknown parameters; informa-tion which is often available from literature, standards, energy performanceaudits or the modeler’s knowledge of plausible values based the underlyingphysics or previous experience. According to Chong and Menberg [20], theinformation content within datasets and the quality of prior knowledge limitsthe number of uncertain parameters that can be introduced in the model.

    Previous BEM calibration research can be grouped into research that usesrelatively simple state-space models with 2–4-state variables (for example Bacherand Madsen [21], Coffman and Barooah [22], Raillon and Ghiaus [23], Rouch-ier et al. [24]) and those working with calibration of detailed engineering-based models (for example, Chong and Menberg [20], Tian et al. [25], Ban-dera and Ruiz [26]). The benefits of simpler state-space models are that littleprior information about the building is needed and that they can be efficientlycomputed and used directly in Monte Carlo Markov chain-based inference.For engineering-based tools, the typical Bayesian approach is to approximatethe detailed model with a simpler surrogate or emulator model [20].

    6

  • 1.1.5 Time-varying uncertaintyA distinction is often made between two types of uncertainty: aleatory andepistemic uncertainty [27]. Aleatory uncertainly is due to inherent or naturalvariation of the system, and is often also called variability, or stochastic orirreducible uncertainty. Epistemic uncertainty arises from lack of knowledge,and is also called state of knowledge, subjective or reducible uncertainty [27]or, more expressively, as ‘things we could in principle know but don’t in prac-tice’ [28]. In the context of BEM, occupant behavior-induced uncertainties arelarge sources of epistemic and time-varying uncertainty. The modeling mightbe improved, and more metering data could be gathered, but in practice it isimpossible to fully reduce occupant behavior-induced uncertainty.

    Solar heat gains, internal heat gains, and heat use for domestic hot waterare inputs that contain high levels of time-varying uncertainty. Internal heatgains and DHW use are uncertain due to their dependency on occupant be-havior [28], whereas solar heat gains are uncertain due to both uncertainty ofoccupant behavior (such as shading operation) and the complexity involvedin modeling solar irradiance and shading from the surroundings [IV]. Aug-mented stochastic state-space models have been suggested as a suitable ap-proach to deal with such highly non-deterministic inputs: Kim and Park [29]used a detailed augmented state-space model (consisting of 15 states) to es-timate time-varying process disturbances attributed to uncertainty in internalheat sources and airflow, and Coffman and Barooah [22] augmented a simpli-fied two state-space model with a third disturbance state to account for unmea-sured disturbances attributed to occupant behavior.

    1.2 Identified research gapsA gap in the current state-of-the-art was identified in the lack of a BEM thatcan simulate reality sufficiently well to provide actionable insights while stillallowing for direct calibration in a scalable way. Figure 1.6 shows the iden-tified gap that the proposed BEM aims to fill. This BEM would be closer toestablished engineering-based simulation tools with respect to complexity andpotential to provide insights about the actual energy performance of the build-ing on the level of detail visualized in Figure 1.4, but would still be able to bedirectly calibrated (without an intermediate emulator step) in a similar manneras the 2–3-state gray-box BEM that is common in the literature. The methodwas first developed in Paper IV, further enhanced in Paper VI and is presentedand discussed in Chapter 3.

    Classic stochastic state-space modeling accounts for uncertainty in the out-puts and in the states, while inputs are considered as deterministic. Previousresearch has shown that state augmentation can be used to account for unmea-sured disturbances. However, further research was needed into how to achievea fully probabilistic BEM in which inputs are also defined with time-varying

    7

  • Increasing complexity

    Required information input

    Potential insights

    Identifiable / directly calibratable

    Figure 1.6. Conceptualization of the relationship between model complexity, requiredamount of information input, identifiability and potential insights.

    uncertainty. Further investigation was also needed into how to obtain andmodel the time-varying uncertainty of the inputs. The method was developedin Paper VI and is included in Chapter 4.

    Bayesian inference has gained attention in the BEM calibration literaturebecause of its ability to handle and propagate uncertainty, but it has so far beenused only with simpler models or with an intermediate emulator step whenused with engineering-based tools. In Paper VI a framework for performingsuch direct Bayesian inference (without an intermediate emulator step) wasdeveloped; it is presented and discussed in Chapter 4.

    Large-scale construction and calibration of detailed BEMs requires system-atically available and informative data sources. Practical knowledge (methodsand tools) on how to utilize meteorological reanalysis and satellite-based solarirradiance data sources for BEM simulations were missing at the onset of thisthesis work. Use of such data source has been a recurring topic in all the ap-pended papers, Chapter 2 summaries the main findings. Knowledge regardingthe on-site metering data that is available for the targeted building stock wasalso identified as a gap. Paper V investigated the quality of hourly readingsfrom DH-billing meters (included in Chapter 2). Paper VI investigated theusability of hourly indoor air temperature sensor readings and hourly billingmeter readings for domestic household electricity, domestic cold-water anddomestic hot-water billing (included in Chapter 2 and Chapter 4).

    8

  • 1.3 Research questionsBased on the identified research gaps, the following research questions wereformed:

    (Q1) What information from meteorological reanalysis, remote sensingand on-site metering data sources can be utilized for BEM calibra-tion in a scalable way?

    (Q2) What level of detail is required to obtain a BEM that can provideactionable insights on the building’s actual energy performance,yet still allow calibration in a scalable way?

    (Q3) What are the advantages and disadvantages of using a probabilis-tic BEM calibration approach?

    1.4 Objective and delimitationThe objective of this thesis is to provide a framework for probabilistic calibra-tion of BEMs that aims at fulfilling the following requirements:

    • Result in actionable insights regarding aspects governing the actualenergy performance of a building (including its subsystems and com-ponents)• Direct calibration (without an intermediate emulator step)• Scalable to entire building stocks• Integration of evidence from both data and knowledge-based sources,

    on both parameter and time-series level• Handle uncertainties and situations of low data availability

    The proposed framework was delimited to Swedish district-heated multi-family buildings. The targeted building stock is a suitable testing ground forlarge-scale BEM calibration, as it constitutes a large share of the Swedishbuilding stock, is relatively homogeneous, and provides relatively good metering-data availability due to the DH billing meter infrastructure. With additionalwork and adoption, the proposed framework could also be applied to otherbuilding types.

    1.5 Thesis outlineIn addition to addressing the research questions, this thesis is written to func-tion as a reference for the developed BEM (Chapter 3) and the probabilisticcalibration framework (Chapter 4). The contents of the chapters are as fol-lows.

    Chapter 1 introduces the background of energy performance in district-heated multifamily buildings and the previous research and challenges faced

    9

  • in calibrating building energy models. Furthermore, research gaps, researchquestions, objectives and delimitation are presented.

    Chapter 2 investigates the quality of hourly readings from DH billing me-ters (Paper V), describes the use of meteorological (re)analyses and satellite-derived solar irradiance as weather data sources in the BEM simulations (pa-pers II–VI) and investigates metering data sources carrying information aboutdomestic hot water use (Paper VI).

    Chapter 3 compiles, drawing from Paper IV and Paper VI, the determin-istic parts of the dynamic and physics-based BEM: the proposed thermal net-work; modeling of the technical systems of district-heated multifamily build-ing, solar and internal heat gains, and boundary conditions; and a case studycomparing results of the BEM with the established simulation software IDAICE.

    Chapter 4 transforms the deterministic model of Chapter 3 into a proba-bilistic model, including time-varying uncertainty in inputs. Furthermore, thischapter presents: an iterated extended Kalman filtering algorithm for nonlinearstate estimation; a probabilistic calibration procedure to assess parameter un-certainty and incorporate prior knowledge; a case study in which the proposedframework is tested with real buildings, the parameters are estimated withboth Hamiltonian Monte Carlo sampling and penalized maximum-likelihoodestimation optimization and the effect of different sources of time-series cali-bration data are investigated. This chapter is based on Paper VI.

    Chapter 5 presents the main conclusions in relation to the research ques-tions and further discusses some aspects. Finally, the challenges and potentialfuture work for the developed framework are addressed.

    10

  • 2. Time-series data

    This chapter investigates the quality of hourly readings from district heatingbilling meters (Paper V), describes the use of meteorological (re)analyses andsatellite-derived solar irradiance as weather data sources in the BEM simu-lations (papers II–VI), and investigates metering data sources carrying infor-mation about domestic hot water use (Paper VI).

    2.1 District heatingMany district heating (DH) operators collect hourly values from their heatbilling meters in centralized databases [30,31]. Such data are of high valuefor for building energy model calibration. In Sweden, DH operators are re-quired to share daily meter readings with their customers [32], while hourlyvalues need to be provided only if they are used in the pricing. Readingstypically available in district heat meter data management systems are hourlyaverages of energy and flow and hourly instantaneous samples of the primaryside supply and return temperatures [30]. Because of bandwidth constraints,only a finite number of bits are available, and recorded values are thereforequantized before transmission. Quantization can cause increased uncertainty,especially when the recorded value needs to be able to represent a large valuerange (for example, cumulative values). Therefore, hourly values transmittedfrom the heat meters can have quantization errors that are much larger than theaccuracy of the measurement equipment. Such large quantization errors canseverely deteriorate the quality of subsequent analyses.

    2.1.1 Information entropySandin et al. [30] suggested using information entropy ranking as a way ofidentifying heat meter readings with large quantization errors. Informationentropy (H) is defined as the sum of the negative binary logarithm log2(·) ofthe probabilities p(·) for each value xk in the time series of length n:

    H =−n

    ∑k=1

    p(xk) · log2 (p(xk)) (2.1)

    Two to the power of the entropy indicates the number of quantization lev-els (L) available in the meter readings: L ∝ 2H (provided that the observationperiod holds rich enough operation conditions). For example, H = 8 wouldindicate 256 levels and H = 4 would indicate 16 levels. However, information

    11

  • entropy depends on the actual operation conditions such as weather and theprobability of an observation to occur (i.e. meters repeating same observationquantities, due to design or even weather conditions, will get a lower informa-tion entropy value). Thus, the 2H estimate will generally result in fewer levelsthan what is available due to the meter configuration.

    2.1.2 Uncertainty in hourly heat meters readingsThe energy reading at time index k is denoted as Q1;k. The time-varying un-certainty of the energy readings is estimated as

    σ1;k = σ2met;k +∆Q2

    12(2.2)

    where σmet;k is the standard deviation (SD) at time index k due to uncertaintyof the meter equipment and ∆Q denotes the quantization step size of the en-ergy readings (i.e. the largest unit of measure, typically 1, 10 or 100 kWh).The ∆Q2/12 is a commonly used approximation of the variance for the quanti-zation effect used for noise modeling [33]. The uncertainty calculations of themeter equipment is adopted from the European Standard CEN 1434-1:2015[34]:

    σmet;k =√

    σ2f ;k +σ2t;k (2.3)

    where σ f ;k is the standard deviations of the flow meter at time index k andσt;k is the standard deviation of the temperature sensor pair and the calculator(where the temperature sensor pair is the dominating error source). Typicalaccuracy of Multical heat meters equipped with Ultraflow flow sensors (Kam-strup A/S, 2018) is used

    σ f ;k ={

    Q1;k (1+0.01qV ;p/qV ;k)/100, if qV ;k > qV ;i∆θ1;kqV ;ic(1+0.011qV ;p/qV ;i)/100, if qV ;k ≤ qV ;i

    σt;k ={

    Q1;k (0.6+6/∆θ1;k)/100, if ∆θ1;k > 22qV ;kc(0.6+6/2)/100, if ∆θ1;k ≤ 2

    (2.4)

    where Q1;k is the energy reading at time step k (accumulated heat use betweenk−1 to k), qV ;k is the flow rate reading at time step k (flow rate between k−1 tok), qV ;p is the permanent nominal flow rate , qV ;i is the inferior flow rate (wherethe meter shall function without exceeding the allowed accuracy), c is the heatcapacity of the fluids (assumed as a constant of 4.12 MJ/(K ·m3) [35]), and∆θ1;k is the average temperature difference between fluids calculated as

    ∆θ1;k = Q1;k/(qV ;k · c) (2.5)

    The quantization error of flow readings is generally lower than for the en-ergy readings, especially during operation conditions when the temperature

    12

  • difference is low (see visualization in Figure 3). Therefore, in case of largequantization errors, it can be more accurate to estimated energy use from flowand temperature readings:

    Q2;k = max(Q1;k−∆Q, min(Q1;k +∆Q, c ·∆θ2;k ·qV ;k)) (2.6)where ∆θ2;k denotes the temperature difference estimated from the tempera-ture readings. Due to the instantaneous nature of the temperature readings,the ∆θ2;k approximation can deviate much from the true average temperaturedifference. While, eq. 2.5 can be assumed to calculate the true average ∆θwhen the quantization error is negligible.

    Following equation estimates the time-varying standard deviation for theenergy use Q2:

    σ2;k =√(σ2;t;k)2 +

    (σ2;qe;k

    )2+(σmet;k)2 (2.7)

    where σ2;t;k denotes the uncertainty due to instantaneous nature of the temper-ature readings and σ2;qe;k denotes the quantization error due to low resolutionin the flow readings:

    σ2;t;k = Qp/200+0.02 ·Q2;k, σ2;qe;k =∆θ2:k ·∆qV · c√

    12(2.8)

    where Qp denotes the energy at nominal flow and ∆qV is the width of thequantization step size of the flow readings.

    The two energy variables Q1 and Q2 are not independent as they are derivedfrom the same metering equipment. Therefore, the two quantities are weightedas two dependent normal variables [36]

    Q0 =

    (σ22 −ρσ1σ2

    )Q1 +

    (σ21 −ρσ1σ2

    )Q2

    σ21 +σ22 −2ρσ1σ2

    σ20 =(1−ρ2

    )σ21 σ

    22

    σ21 +σ22 −2ρσ1σ2

    (2.9)

    where ρ denotes the correlation, which is assumed as

    ρ = 0.5 ·min(σ1,σ2)/max(σ1,σ2) (2.10)The practical impact of assuming a dependency between the variables is a

    more conservative conflated estimate (both on mean and uncertainty interval)than if the variables would be assumed fully independent.

    2.1.3 Case studyFor paper V a larger dataset was gathered: consisting of hourly time series,from 266 DH billing meters serving multifamily buildings located in Eskil-stuna, Sweden, for the year 2018. Most of the heat meters are Kamstrup Mul-tical 601 / 602 calculators equipped with Kamstrup Ultraflow 54 / 34 ultrasonic flow meters.

    13

  • Figure 2.1. Information entropy ranking of 266 heat meters.

    Figure 2.2. Three representative heat meters visualizing the impact of typically oc-curring quantization errors. Entropy of the hourly energy readings are given in thesubtitles. Top row: energy vs temperature difference between supply and return flows.Middle and bottom rows: energy vs standard deviation (absolute and relative).

    14

  • Figure 2.1 shows the 266 heat meters ranked by their calculated entropyfor both energy readings and flow readings. Figure 2.2 shows hourly energyreadings and the time-varying uncertainty for three example DH meters. Ascan be seen in the figure, the uncertainty of the calculated energy quantity(blue dots) dominates under most conditions due to the high uncertainty inthat the instantaneous temperature readings represent the average temperaturedifference for the whole integration step. However, when the quantizationerror is large, as for heat meter (a), the calculated energy quantity is a betterestimate than the energy readings (black dots), especially during low energyuse conditions. The conflated variable (purple dots) is a weighted estimatethat weights the two variables according to their empirically estimated time-varying uncertainties.

    2.2 Domestic hot waterBilling meter based DH readings typically consist of space heating, domes-tic hot water (DHW) use and heat losses. DHW use is inherently uncertaindue to dependency on occupant behavior [28]. The availability and qualityon metered hourly domestic hot water (DHW) varies greatly from buildingto building. In Paper VI three commonly occurring situations of data avail-ability regarding DHW were identified: (i) no hourly data, the DHW needsto be modeled; (ii) useful hourly domestic cold water metering exists; or (iii)actual hourly DHW use metering exists (metered for the whole building oraggregated from individual, per apartment, metering).

    Recent Swedish building regulations require that new buildings and build-ings that undergo a major renovation have separate DHW metering. However,in practice, hourly metered DHW use is still often not available. In Sweden,domestic cold water (DCW) use is often gathered with the same infrastructurethat is used for gathering DH use and such data are therefore available in asystematic way. However, the resolution of the hourly DCW values can beof poor quality (much of the current billing metering infrastructure was builtin a time when only monthly values were required). Also, the placement ofthe DCW meters can be quite different than the placement of DH meters, asexemplified in Figure 2.3.

    For paper VI individual DHW billing data was gathered. The dataset con-sists of hourly time series, grouped per apartment (799 in total), from 38 mul-tifamily buildings located in Eskilstuna, Sweden and was gathered from 2016to 2018. Figure 2.4 shows probability density distributions for hourly DHWuse based on that data. From the figure, it is apparent that there are diurnal andworkday-related patterns. When averaging over many apartments, the proba-bility density tends to follow a close-to-normal distribution. However, whenaveraging over a smaller number of apartments, the long right-tailed distribu-tion is better described as log-normal.

    15

  • DCW meter 3

    DCW meter 2

    4

    5

    6

    7

    1

    2 3

    DH meter 1DH meter 2

    District heatingLocal heatCold waterLocal cold water

    DCW meter 1

    Figure 2.3. District heating (DH) and domestic cold water (DCW) metering configu-ration for the case study buildings used in Paper VI.

    N = 4 N = 20 N = 50 N = 799

    0 40 80 120 0 10 20 30 40 0 10 20 30 0 5 10 15

    23222120191817161514131211109876543210

    Average, per apartment (N), hourly domestic hot water usage [l/h]

    Hou

    r of

    the

    day

    Mon−FriSat−Sun

    Figure 2.4. One year of DHW usage probability density distributions, grouped perhour and weekday: N denotes the number of apartments over which the measurementsare averaged.

    16

  • 2.3 Weather dataBEM calibration requires weather data describing the boundary conditions ofthe building site. The traditional approach has been to use data from nearbymeteorological stations or on-site metering. This section describes the alter-native data sources meteorological (re)-analyses and satellite-derived solar ir-radiance.

    2.3.1 Meteorological analyses and reanalysesMeteorological weather forecasting centers use sophisticated methods for dataassimilation, in which every few hours a previous forecast is combined withnewly available observations in an optimal way to produce a new best esti-mate of the state of the atmosphere, called analysis, from which an updated,improved forecast is issued. The European Centre for Medium-Range WeatherForecasts’ (ECMWF) produces such analyses on a global scale (see Figure 2.5for a schematic view). Reanalysis works in the same way, but aims to assimi-late historical observational data and spans a long time period that can extendback several decades or more.

    Data assimilation

    Observation system

    Observations Observations Observations

    Forecast Forecast ForecastAnalysisAnalysis

    Time

    Analysis

    Horizontal grid (latitude-longitude)

    Vertical grid (height or pressure)

    Medium-range forecast

    Forecast model

    Physical process in model

    Figure 2.5. The principle of the data assimilation process used for meteorologicalreanalyses.

    The Swedish Meteorological and Hydrological Institute (SMHI) releasesdata from its operational mesoscale analysis product MESAN [37], which cov-

    17

  • ers the Scandinavian countries with a current horizontal resolution of 2.5 km(11 km and 22 km for data released before 2017). Based on cloud informationproduced by MESAN, SMHI also produces and releases hourly data for solarradiation quantities, a modeling system called STRÅNG [38]. MESAN andSTRÅNG data were used in papers I, II and III. ERA5 is the fifth generationof the ECMWF global reanalyses and was released in 2016 [39]. This wasthe first of the ECMWF reanalyses to be produced as an operational servicerather than a research project. ERA5 data are available from 1950 to near tothe present time, at a global horizontal resolution of 31 km and hourly timesteps [40]. ERA5 data was used in papers IV and VI. The variables air temper-ature, ground temperature, wind speed, ground albedo and downward surfacethermal radiation (used to derive sky temperature) were used.

    Continuous development of meteorological (re)analysis systems results inhigher spatial and temporal resolution and improved accuracy. Using thesedata sources for energy modeling enables consistent time series for locationswhere metered datasets are lacking or of poor quality. It is also possible tocombine modeled and on-site metered data; for example, using metered datafor temperature, which is cheap and simple to meter, and modeled data forsolar, which is more expensive and cumbersome to meter.

    2.3.2 Satellite-derived solar irradianceWhen available, satellite-derived solar radiation sources perform better thanthose based on weather forecasts [41,42]. Solar irradiance has been estimatedfrom satellite images since the beginning of the satellite era in the 1980s. Ei-ther geostationary or polar-orbiting satellites can be used. Geostationary satel-lites orbit in the equatorial plane synchronous with the rotation of the earth(and are thus stationary relative to the earth) and are placed high enough (35000 km) to gather a full-disk view. Images from geostationary satellites havelimited spatial resolution but high and continuous temporal resolution. Po-lar orbiting satellites are placed at a much lower altitude (800 km) and thushave a much higher spatial resolution. As they move relative to the earth, theycover the whole globe, but have a non-continuous temporal resolution (passingthrough a specific location twice a day). The principle for obtaining surfacesolar irradiance from satellite images is shown in subfigure (a) in Figure 2.6.In most cases, a cloud (pixel 2) appears brighter in the field of view of thesatellite sensor than the ground (pixel 1). The main challenge lies in obtaininggood estimates for what should be observed by the sensor for any pixel if thesky was clear [43].

    Subfigure (b) in Figure 2.6 shows the coverage from the current Meteosatgeostationary satellite placed at prime meridian and 36 000 km above the equa-tor; the horizontal resolution is 0.05◦ (4–6 km for Europe) and the temporalresolution is up to 15 minutes. In northern latitudes (>60◦), the increasing

    18

  • Ground

    Space

    Pixel 1 Pixel 2

    a) b)

    -60 -40 -20 0 20 40 60

    -60

    -40

    -20

    0

    2

    0

    40

    60

    Direct normal radiation, SARAH-2, 2015-07-01 12:00

    Figure 2.6. (a) The principle for obtaining satellite-based solar irradiance data. (b)Example irradiance image of the full-disk view from the SARAH dataset.

    satellite viewing angle causes quality degradation [43]. The viewing angleshifts detected clouds northwards (southward in the southern hemisphere) andthe clouds are seen from the side (the plane-parallel approximation becomesless accurate). The quality is especially reduced at low solar altitudes, inearly morning and late afternoon, or in winter. Increased occurrence of snowalso makes estimates less reliable due to the increased impact from surfacesnow/cloud differentiation schemes.

    CAMS-rad [43] and SARAH [44] are two open data sources that are basedon the Meteosat prime geostationary satellite images. CAMS-rad is more end-user friendly, as it can be accessed as time series readily via an API inter-face1, from 2004 up to 2 days before the present time, with 15 minute tem-poral resolution and any missing periods already handled. A peer-reviewed Rclient interface has been produced and released as open source by the author2.SARAH is released in batches, and is currently available for 1983 to 2017 witha 30 minute temporal resolution. CAMS-rad was utilized in papers IV and VI,mainly due to the necessity for recent data.

    2.4 DiscussionSome of the benefits of using meteorological reanalysis such as ERA5 asa source for weather data are that the data are homogeneous, harmonized,have wide geographical coverage (global in the case of ERA5), provide vari-ables that are seldom measured locally (for example, solar irradiance, windor sky temperature), and are often readily and publicly accessible. Satellite-derived solar radiation sources tend to perform better than those based onweather forecast engines. However, for regions not covered by the geostation-

    1http://www.soda-pro.com/web-services/radiation/cams-radiation-service2https://github.com/ropensci/camsRad

    19

    http://www.soda-pro.com/web-services/radiation/cams-radiation-servicehttps://github.com/ropensci/camsRad

  • ary placed satellites (such as northern Sweden), methods based on weatherforecasts (such as ERA5 and STRÅNG) are required to obtain continuoustime series. Further, if the intention is energy use forecasting, then the modelcalibration is likely to benefit from using reanalysis data based on the sameweather forecast engine that is used for the forecast.

    The information entropy ranking method, suggested by Sandin et al. [30],is suitable for identifying meters with large quantization errors. The method isstraightforward to conduct as the only required inputs are the readings them-selves. However, it is dependent on the actual operation conditions, whichmakes it less suitable for comparison of meter readings from different timeperiods or different district heat operators.

    District heat operators should aim for information entropy at a minimum of5 bits per sample (approximately 32 observable quantization levels in a typi-cal year) to ensure qualitative hourly readings. To ensure high quality readingsfor the whole metering range and enable sub-hourly sampling, information en-tropy with at least 7 bits per hourly sample is required. For energy readingswith entropy less than approximately 5 bits per sample, the suggested confla-tion method can counteract part of the quantization error by merging infor-mation from the flow and the instantaneous temperature readings, especiallyduring low energy use conditions.

    The next generation of heat meters and data acquisition infrastructure [45]can provide data with higher resolution. However, it will take many years be-fore all current infrastructure is upgraded. Therefore, the suggested conflationmethod can play a role in improving hourly readings for many years to come.

    The proposed conflation method assumes normal distributions. However,the quantization error is uniform and can also be biased [33]. The used additivenoise approximation (∆2/12) is only valid if ∆ is small compared with thequantization levels L. The empirical uncertainty models are, however, likelyto be larger error sources than the conflation method or the additive noiseapproximation. Nevertheless, the proposed conflated energy quantity Q0 isexpected to be closer to the true mean values and have a tighter distributionthan Q1 and Q2 would by themselves.

    20

  • 3. A Dynamic Physics-Based Building EnergyModel

    The model was first introduced in Paper IV and then further developed in Pa-per VI. In this chapter all the deterministic parts are extracted and presentedin a coherent way: the proposed thermal network; modeling of the technicalsystems of district-heated multifamily buildings, solar and internal heat gainsand boundary conditions. This chapter also presents a case study comparingresults from the established simulation software IDA ICE.

    3.1 IntroductionA gap in the current state-of-the-art was identified for a BEM that can simulatereality sufficiently well to provide actionable insights while still allowing fordirect calibration in a scalable way. The BEM described in this chapter aimsto fill this gap: a BEM that more closely resembles established engineering-based simulation tools in terms of detail and potential to provide insights aboutthe actual energy performance of the building on the level of detail visualizedin Figure 1.4, but can still be directly calibrated (without an intermediate em-ulator step) in a similar manner to the simpler 2–3-state gray-box models thatare common in the literature.

    Figure 3.1 shows a schematic of an example of the targeted district-heatingmultifamily building type, consisting of a substation serving a single or mul-tiple building(s) with both space heating and heat for DHW use and includingheat losses in the DHW circulation and an eventual local pipe network. Theaim of the BEM described in this chapter is to model everything behind theheat meter, so that the heat meter readings can be used to calibrate the model.The entire code is implemented in the statistical modeling language Stan [46],which with its automatic differentiation capabilities enables use of the devel-oped BEM for derivative-based inference, as later demonstrated in Chapter4.

    The developed BEM consist of a 14-node thermal network (that is, a systemof 14 equations) which is a lumped and simplified version of the ISO 52016-1:2017 [47] standard and was therefore named ISO14N. The ISO 52016-1:2017 [47] standard, which replaces the now deprecated ISO 13790:2008 [48]standard, presents a set of calculation methods for a building’s energy needsand internal air temperatures. The hourly method described in the standardproposes a system of linear equations that model heat transfer through opaqueand transparent components of the envelope and air exchange between the in-ternal and external environments. The calculation produces hourly internal air

    21

  • CRTL

    CRTL

    Heat meter

    θe

    Flow meter

    DH returnDH supply

    Pipe networkCold water supply

    Radiators

    Taps

    Substation

    θset

    θset

    Domestic hot water circulation

    Radiators

    Taps

    θset

    Figure 3.1. A district heating substation serving multiple buildings.

    and component temperatures and heating and cooling loads. Each construc-tion component (for example, roof, windows and walls) is modeled as seriallyconnected resistance and capacitance (RC) thermal networks. Compared withthe deprecated ISO 13790:2008 [48] standard, the new hourly method moreclosely resembles established whole-building simulation software.

    3.2 Thermal networkFor Paper IV a dynamic BEM consisting of 14 node thermal network wasdeveloped; a lumped and simplified version of the ISO 52016-1:2017 [47]standard. It was originally presented in the same format as used in the ISO52016-1:2017 [47] standard; a linearly solvable system of linear equations.Here, it is expressed as a continuous-time state-space model

    dxtdt

    =Atxt +Btut (3.1)

    where x ∈ R14×1, A ∈ R14×14, B ∈ R14×9, and u ∈ R9×1 are the states (thetemperature nodes of the thermal network), continuous-time transition matrix,continuous-time input coefficient matrix, and input data vector of the ISO14Nthermal model, respectively, and the t subscript denotes time. The system 3.1can be simulated directly in continuous-time (as shown in Paper IV, or by firsttransforming it into discrete-time format (see Section 4.1.1) which is moreuseful format for the probabilistic calibration used in Chapter 4.

    Figure 3.2 visualizes the thermal network as a RC-network. All externalwalls (ew) are modeled as a lumped 3-node element, all window glazing (gl)are modeled as a lumped 2-node element, and the external roof (r f ) and theground floor (g f ) are modeled with 3-node elements. The remaining internalmass im (internal walls, intermediate floors, and adiabatic external walls) are

    22

  • External

    walls (ew)

    κ1 κ2 κ3

    h1 h2θ2 θ3

    Hve

    Htb

    Glazing

    (gl)

    h1 hsi

    Φsol

    θ2

    Heatingsystem

    κ1

    κ2

    κ3

    h1

    h2

    θ2

    θ3

    Roof (rf)

    κ3

    κ2

    κ1

    h2

    h1

    hsi

    hse

    θ2

    θ1

    Ground

    floor (gf)

    θ3

    θgr

    Internal

    mass (im)

    κ2 κ1

    h1θ1

    Cintθint

    hse

    θ1

    θ1

    θ1

    hsi

    Internalgains

    Heat transfer

    Radiative heat transfer

    θ2hse

    hse

    Φint

    Φhydκ1 κ2

    hsihsi

    θsky

    θe

    Figure 3.2. An RC-network representation of the proposed thermal network.

    23

  • A =−1·

    hse+h1 –h1 0 0 0 0 0 0 0 0 0 0 0 0

    –h1 h1+h2 –h2 0 0 0 0 0 0 0 0 0 0 0

    0 –h2 h2+hsi 0 0 – f ·hri 0 – f ·hri 0 – f ·hri 0 0 – f ·hri –hci0 0 0 hse+h1 –h1 0 0 0 0 0 0 0 0 0

    0 0 0 –h1 h1+h2 –h2 0 0 0 0 0 0 0 0

    0 0 – f ·hri 0 –h2 h2+hsi 0 – f ·hri 0 – f ·hri 0 0 – f ·hri –hci0 0 0 0 0 0 hse+h1 –h1 0 0 0 0 0 0

    0 0 – f ·hri 0 0 – f ·hri –h1 h1+hsi 0 – f ·hri 0 0 – f ·hri –hci0 0 0 0 0 0 0 0 h1 –h1 0 0 0 0

    0 0 – f ·hri 0 0 – f ·hri 0 – f ·hri–h1h1+hsi 0 0 – f ·hri –hci0 0 0 0 0 0 0 0 0 0 hse+h1 –h1 0 0

    0 0 0 0 0 0 0 0 0 0 –h1 h1+h2 –h2 0

    0 0 – f ·hri 0 0 – f ·hri 0 – f ·hri 0 – f ·hri 0 –h2 h2+hsi –hci0 0 –r ·hci 0 0 –r ·hci 0 –r ·hci 0 –r ·hci 0 0 –r ·hci ∗

    �[1/κ1 1/κ2 1/κ3 1/κ1 1/κ2 1/κ3 1/κ1 1/κ2 1/κ1 1/κ2 1/κ1 1/κ2 1/κ3 1/Cint

    ]>×14

    ∗ r ·hci + r ·hci + r ·hci + r ·hci + r ·hci +Htbu=

    [θe θsky φsol φint φhyd θgr Ihor Iver φve

    ]

    B =

    hce+(1−Fsky)hre Fskyhre 0 0 0 0 αsol 0 00 0 0 0 0 0 0 0 0

    0 0 fr;sol/∑r fr;int/∑r fr;hyd/∑r 0 0 0 0hce+(1−Fsky)hre Fskyhre 0 0 0 0 0 αsol 0

    0 0 0 0 0 0 0 0 0

    0 0 fr;sol/∑r fr;int/∑r fr;hyd/∑r 0 0 0 0hce+(1−Fsky)hre Fskyhre 0 0 0 0 0 0 0

    0 0 fr;sol/∑r fr;int/∑r fr;hyd/∑r 0 0 0 00 0 0 0 0 0 0 0 0

    0 0 fr;sol/∑r fr;int/∑r fr;hyd/∑r 0 0 0 00 0 0 0 0 hse 0 0 0

    0 0 0 0 0 0 0 0 0

    0 0 fr;sol/∑r fr;int/∑r fr;hyd/∑r 0 0 0 0Htb 0 fc;sol fc;int fc;hyd 0 0 0 1

    1/κ11/κ21/κ31/κ11/κ21/κ31/κ11/κ21/κ11/κ21/κ11/κ21/κ31/Cint

    ×14

    Figure 3.3. The state-space matrices of the thermal network. Colors indicate buildingelement: � roof (rf), external walls (ew), glazing (gl), internal mass (im) and groundfloor (gf). � denotes matrix element-wise multiplication and ∑r is the sum of theratios of all building elements

    24

  • represented with a 2-node element. Thus, the thermal network consists of 14unknown temperature nodes (including the internal air node θint).

    Figure 3.3 shows how the state-space matrices are constructed. Parametersare colored according to which building element they belong to (i.e. h1 in placeof h1;r f ). The purpose of the coloring is to better visualize how the couplingbetween the building elements, external environment, and the internal air nodeare constructed. The states of the elements are all kept normalized to persquare meter surface, while the internal node is normalized to per square meterfloor.

    3.2.1 Ratios and fractionsGeometrical data are given as ratios (r) between the total interior surface areaof each building element type and the total floor area (unit ms/mfl). Theseratios can be though of as weighting factors describing how large an impactone type of building element has on the average thermal balance of the wholebuilding. The ratios are estimated as follows

    rr f = rg f = 1/N f lrew = P ·H f l ·N f l/A f l− rglrim = (2−2/N f l)+1.5

    (3.2)

    where N f l is the number of floors of the building, A f l is the total floor areaof the building, P is the building perimeter, and H f l is the average internalfloor height. The term (2−2/N f l) in rim calculates the surface area of internalfloors and ceilings per total floor area and will result in a value between 0 and2, depending on the number of floors. The additional 1.5 constant representsthe internal walls, and it is based on the obsolete ISO 13790:2008 [48] stan-dard (where the ratio total interior surface area to floor area is given as 4.5).The glazing-to-floor area ratio rgl is a property that is often regulated in stan-dards and building codes, typically ranging between 0.1 and 0.2 for Swedishmulti-family buildings. The surface area fractions f are simply calculated bydividing the ratio (r) of each building element with the sum of all ratios of thefive building element types.

    The heat input from solar heat gains (φsol), internal heat gains (φint), andthe hydronic heating system (φhyd) are divided into a radiative and convectivefractions. fr is the fraction of radiative heat and fc is the fraction of convectiveheat ( fr = 1− fc). Default convective fractions from the ISO 52016-1:2017[47] standard are as follows fc;sol = 0.1, fc;int = 0.4, and fc;hyd = 0.4.

    The radiative heat transfer between the exterior surfaces and the the skyand surroundings depends on the sky view factors Fsky. For a non-shadedhorizontal roof the sky view factor is 1.0, and for non-shaded vertical elements(external walls and window glazing) the sky view factor is 0.5.

    25

  • 3.2.2 Heat transfer coefficientsThe surface interior heat transfer coefficients are given as

    hsi;el = hri +hci;el (3.3)

    where hri is the surface interior radiative heat transfer coefficient (assumedconstant at 5.13, the radiative heat transfer between two surfaces at 20◦C and0.9 emissivity) and hci;el is the surface interior convective heat transfer coef-ficient, and the subscript el denotes one of the five building elements. Thehci constants are taken from ISO 52016-1:2017 [47] (Table 25) and describeconventional convective transfer coefficients for interior surfaces oriented up-wards, horizontally, or downward:

    hci;r f = 0.7, hci;ew = hci;gl = hci;im = 2.5, hci;g f = 5.0 (3.4)

    The surface exterior heat transfer coefficients are calculated as follow

    hse;r f ;t = hre +hce;r f ;t , hse;ew;t = hre +hce;ew;thse;gl;t = hre +hce;gl;t , hse;g f = hgr;vi

    (3.5)

    where hre is the surface exterior radiative heat transfer coefficient (assumedconstant at 4.14, the radiative heat transfer between two surfaces at 0◦C and 0.9emissivity), hce;el;t is the time-varying exterior surface convective heat transfercoefficients (see Section 3.5.5), and hgr;vi is the heat transfer coefficient for avirtual ground layer calculated according to ISO 13370:2017 [49].

    In the ISO 52016-1:2017 [47] standard, opaque building elements are bydefault modeled with 5-nodes and window glazing with 2-node elements.The distribution of the thermal resistances are slightly weighted towards thecenter of the building elements, while heat capacity nodes are weighted de-pending on chosen class (mass concentrated externally, internally, inside, orequally). In this implementation, 3-node elements are used for the opaque el-ements; therefore, there is less flexibility in distributing the thermal propertiesover the elements. The thermal resistance is equally distributed

    h1;r f = h2;r f = 2/Rr f , h1;gl = 1/Rglh1;ew = h2;ew = 2/Rew, h1;im = 1/Rimh1;g f = 1/(Rg f /2+Rgr), h2;g f = 2/Rg f

    (3.6)

    where Rgr represent the thermal resistance a 0.5 m thick soil layer (0.25 m2s ·K/W)and the thermal resistances for the other elements are calculated as

    Rel = 1/Uel−1/(hsi;el)−1/hse;el (3.7)

    where Uel is the thermal transmittance of building element el.

    26

  • 3.2.3 Heat capacitiesThe heat capacity of 3-node building elements roof r f and external walls ew isdistributed according to Table 3.1. The table is based on the ISO 52016-1:2007standard but altered to suit 3-node elements. Table B.14 of ISO 52016-1:2007specifies areal heat capacity values (κm) according to five classes, from verylight to very heavy, 14–70 Wh/(◦C ·m2s ). The heat capacity of the other ele-ments is distributed as follows

    κ1;gl = κm;gl/2, κ2;gl = κm;gl/2κ1;im = κm;im/2, κ2;im = κm;im/2κ1;g f = κgr, κ2;g f = κm;g f /2, κ3;g f = κm;g f /2,

    (3.8)

    where κgr represent the areal heat capacity of a 0.5 m thick soil layer (280Wh/(K ·m2s )). The ISO 52016-1:2017 [47] and Paper IV have no thermalmass for the windows glazing. But in the state-space formulation all statesneed thermal mass, the window glazing is therefore given a low heat capacityof 5 Wh/(◦C ·m2s ).

    Table 3.1. Node heat capacity distribution for the 3-node building elements roof (r f )and external walls (ew). Class I: concentrated on interior side; Class E: concentratedon exterior side; Class IE: divided on interior and exterior side; Class D: equallydistributed; Class M: inside/centered.

    Node Class I Class E Class IE Class D Class M

    1 0.10 0.50 0.40 0.33 0.102 0.40 0.40 0.20 0.33 0.803 0.50 0.10 0.40 0.33 0.10

    3.2.4 Operative temperatureThe ISO 52016-1:2017 [47] calculates operative temperature as follows:

    θop;t = 0.5 · (θint;t +θint;r;mn;t) (3.9)

    where θint;r;mn is the mean radiant temperature, calculated as the area weightedmean of interior surface temperatures of all building elements. However,Equation (3.9) omits the impact of radiative heating from the hydronic heatingsystem. With radiator panels of the known surface area and surface temper-atures, their contribution to the operative temperature can be area-weightedin the same manner as interior walls. An equation that does not require suchdetailed knowledge of the heating system is proposed:

    θop;t = 0.5 · (θint;t +θint;r;mn;t +Chyd;r;mn · fr;hyd ·φhyd;t) (3.10)

    where Chyd;r;mn is a weighting and conversion coefficient expressing the impactof the radiative heating part of the hydronic heating system on the operative

    27

  • temperature. The unit of the Chyd;r;mn parameter is the same as that of a floorarea normalized thermal resistance, m2fl · ◦C/W. In Paper IV it was found thatsetting Chyd;r;mn = 0.02 resulted in reasonable results.

    3.3 Technical systems of district-heated multifamilybuildings

    3.3.1 Hydronic heating systemHeat dissipation from a hydronic heating system with radiator panels can beapproximated with the following non-linear equation [50,51]:

    φhyd;t = Hhyd · (θhyd;lmtd;t)nhyd ·utrv;t (3.11)

    where Hhyd is the specific radiator constant, nhyd is the radiator exponent (de-pends on the design and type, but a value of 1.3 is commonly used for typicalSwedish radiator panels [50,51]), utrv;t is the control signal from the localthermostatic radiator valve(s) (TRV), and θhyd;lmtd;t is the logarithmic meantemperature difference between the radiator and the internal air temperature,which is calculated as

    θhyd;lmtd;t =θhyd;sup;t −θhyd;ret;t

    ln(θhyd;sup;t − θ̂int;t

    )− ln

    (θhyd;ret;t − θ̂int;t

    ) (3.12)where θhyd;sup;t and θhyd;ret;t are the supply/return temperatures to/from theradiators, θ̂int;t is the estimated internal air temperature (based on the previoustime step for the first iteration). For Swedish multifamily buildings, θhyd;supis usually controlled by linear interpolation from a look-up table, consistingof value pairs specifying supply temperature set-points θhyd;sup;set at certainexternal air temperature θe.

    The following empirical equation was derived to estimate the return tem-perature:

    θhyd;ret;t = θhyd;sup;t −b · (θhyd;sup;t −θint;t−1)a

    a = nhyd−∆θhyd;d/200, b =∆θhyd;d

    (θhyd;sup;d−θint;set)a(3.13)

    where ∆θhyd;d is the temperature drop between supply and return temperaturesat design power output, θhyd;sup;d is the supply temperature at design poweroutput, and θint;set is the internal air set-point. Equation (3.13) was derivedempirically and chosen to suit common Swedish radiator configurations. Val-idation is provided as supplementary material to Paper IV.

    Thermostatic radiator valvesPaper IV used a proportional controller (P-controller) for the ThermostaticRadiator Valves (TRVs). In Paper VI an inverse logistic-function smoothed

    28

  • proportional-derivative-controller (PD-controller) was used (its more stableand better suited for automatic differentiation):

    ut =1

    1+ exp(−8/θpb · (εt −0.2 · (εt − εt−1))εt = θint;set − θ̂int;t

    (3.14)

    where θint;set is the set-point for desired indoor temperature, θpb is the propor-tional band of the TRV (typically ranging between 0.5–2.0 ◦C). The derivativepart is large enough to damp oscillations, but small enough to produce resultsthat in practice is the same as for a P-controller.

    3.3.2 Domestic hot waterThe following equation is used to estimate the heat required for DHW use:

    φ̂dhw;t = qV ;dhw;t ·4180 · (θdhw;set −θgr4;t), (3.15)

    where qV ;dhw (l/(s ·m2fl)) is the DHW water volume flow averaged per hour,4180 is the heat capacity of water in W · s/(l ·K)), θdhw;set is the desired set-point temperature of the DHW (typically around 55 ◦C, as that is the minimumtemperature required by Swedish building regulations), and θgr4 is the groundtemperature representative of the soil layer at 1.0–2.89 m (assumed to reflectincoming cold water temperature).

    When only the domestic cold water (DCW) use is known, the share of DCWused for preparation of DHW can generally be estimated as

    qV ;dhw;t = αk ·qV ;dcw (3.16)

    where αk varies, but has been reported to reach an average of 44-50% overtime [52].

    3.3.3 Heat losses pipingThis section details the modeling of two sources of heat losses: the local pip-ing network and DHW circulation (DHWC). In the case of a district heatingsubstation serving several buildings, a local piping network is needed to con-nect all buildings with the substation. The heat losses from this local pipingnetwork can comprise a substantial part of the heat use that is metered at thesubstation [53]. Following equation models a four-pipe configuration withseparate pairs of pipes for DHW and space heating

    φp;t = Ψp ·Lp/A f l · ((θdhw;set −θgr3;t)+utrv;t · (θhyd;sup;t −θgr3;t)+utrv;t · (θhyd;ret;t −θgr3;t))

    (3.17)

    29

  • where Ψp (W/(m ·K)) is the linear heat loss coefficient for the ground-buriedpipes, Lp (m) is the length of the piping network, A f l is the floor area fornormalization, θdhw;set is the set-point temperature for DHW (in Sweden, setabove 55 ◦C to avoid legionella growth and below 60 ◦C to avoid scolding), utrvis the control signal from the thermostatic radiator valves (modeling that theflow is turned off when there is no heat demand), θhyd;sup and θhyd;ret are thesupply and return temperatures of the hydronic heating system, respectively,and θgr3 represents ground temperature of soil layer at 0.28–1.0 m depth.

    The purpose of DHWC is to ensure that waiting time at the tap is short.Heat losses due to DHWC can be substantial and can depend on factors suchas design, craftsmanship, and insulation level of the DHWC system. For en-ergy calculations, a standard value of 4 kWh/(m2fl ·year) is often used. How-ever, a Swedish study [53] showed that heat losses varied between 2 and 28kWh/(m2fl ·year) in 12 studied multifamily buildings. The DHWC heat lossescan be divided into two parts: internal heat losses occurring within the build-ing (φdhwc;i) and external heat losses occurring in the eventual post-substationpiping network (φdhwc;e). Heat losses within the building contribute to theheating of the building and are assumed to be constant over the year. In thispaper, external DHWC heat losses are modeled as part of the heat losses fromthe piping network as described in Equation (3.17). In the rest of the paper,the symbol φdhwc refers only to the internal heat losses.

    3.3.4 VentilationHeat transfer due to ventilation is modeled as a sum of controlled ventilationin the air handling unit, infiltration and occupant-induced manual venting:

    φve;t = κρa · (θ̂int;t −θe;t) · (qV ;ahu · (1−ηahu)+qV ;in f ;t +qV ;mve;t) (3.18)

    where κρa is the heat capacity of air per volume 1.21 W · s/(l ·K), θ̂int;t isthe estimated internal air temperature (from the previous time step in the firstiteration), θe;t is the external air temperature, qV ;ahu is the specific air flow rate(l/(s ·m2fl)) for the air handling unit, ηahu is the temperature transfer efficiencyof the heat recovery unit, qV ;in f ;t is the specific air flow rate due to infiltration,and qV ;mve;t is the specific air flow rate due occupant-induced manual venting.

    InfiltrationInfiltration is driven by pre