Modular statistical system for an integrated environmental control

In this paper series, we will examine the relation between the smart grid and the next generation of buildings. The new objective is now to design buildings so that the energy exchange takes place in time suitable for both sides. The building takes energy from the grid and give it back at different time because in the next generation of buildings they are equipped in advanced control system that controls energy storage for several hours and the new or retrofitted building can eliminate energy peaks and valleys for itself and assist the smart grid in equalization of the load. The control systems include monitoring and modeling of energy use and indoor environment to arrive to a weather-based prediction, Therefore, in part 1 of the paper series we address collecting, processing and analysis of the measurement data that can be done by the new modular statistical software alone or in conjunction with a dedicated neural network. We want to minimize energy use and maximize the thermal comfort of the occupants. Using the modular structure of the database, data transformation technologies and other existing tools, the modular statistical software (MSS) has been created to process large amounts of data as input to the decision-making algorithm. This is to enable buildings automated control (BAC) to take over the control of heating/cooling, ventilation, illumination and other performance aspects that relate to sustainability of built environment.


Introduction
For the last century, large manufacturing plants delivered electrical power to different locations, and buildings were amongst the important receivers. During the last decade, however, in some countries and some seasons, buildings started sending energy to the grid. In this action a new era of technology was started, namely the era of distributed energy sources that are tied though the information technology The energy crisis in 1970's started the process of changes in our way of dealing with buildings. Yet the focus has been on construction of new buildings, neglecting the needed reductions in energy use for conditioning and utilization of buildings [1,2,3]. For this reason, we a small international network of researchers decided to develop a universal template for all types of buildings, new and old, in all different climates [4]. Until recently, large variability in climate and service conditions, differences in economic constrains, combined with lack of focus in building physics prevented the development of a universal approach. Yet, recently the situation has changed. With introduction of integrated design process (IDP) and introduction of an energy modeler in the IDP team, the issues of energy and indoor environment started getting the recognition they deserve. As an example we can report a Geo-solar Exergy Storage Technology (GEST) project that introduced dynamic approach, with daily and seasonal changes to reduce heating and cooling loads. To this end, the building was retrofitted with a skin, either outside or inside the existing building enclosure that linked solar panels and geothermal storage with passive house technology [5]. Thus, what was originally developed as an affordable, low-tech solution for including heat storage in cold climates is today merged with the environmental quality management (EQM) concepts [6] and modern control technology [7,8,9,10,11,12,13].
In this manner, we provide a proven method to expand the current capability for retrofitting existing buildings to near zero energy use in cold climates [13,14,15,16,17]. The experience gained with do-it-yourself affordable methods is now combined with the leading edge of Building Science linking the concept of low exergy thermal storage into a system comprising of a heat-pump-based, heating/cooling and ventilation that are integrated building enclosure incorporated as a new basis for retrofitting buildings in a cold climate. This system operates in a dynamic fashion to maintain an adaptable indoor climate satisfying comport requirements in all climates between tropical South and snowy North. Yet such a system cannot operate without equally advanced thinking in integrated control of building automatics.

Objectives and scope of this work
We want to minimize energy use and maximize the thermal comfort of the occupants. Using the modular structure of the database, data transformation technologies and other existing tools, the modular statistical software (MSS) has been created to process large amounts of data as input to the decision-making algorithm. This is to enable buildings automated control (BAC) to take over the control of heating/cooling, ventilation, illumination and other performance aspects that relate to sustainability of built environment.
We reiterate the research priorities need to focus and start advanced retrofitting of old buildings [4]: (a) Replacement of the current one-issue at the time analysis with whole-building optimization; building as a system instead of a set of independent tasks. (b) Development of performance models that include cost-benefit evaluation and energy use. They may be different for the conceptual design than those used for in-service optimization. (c) Introduce for all types of building projects (new and existing), a two-stage construction process where during the stage one we optimize the investment cost and during the stage two we optimize the energy reduction. Our ultimate goal is to develop models for energy efficiency and indoor environment (b) for use in the whole building optimisation (a). The process of optimisation is continuous, it starts in the a in the conceptual design and continue after the construction is completed in the occupancy stage. During the conceptual design, step (b), located between architectural and economic design clusters presents the scope of our focus:  Step 1 addresses space organization, all passive energy measures and factors affecting indoor environment such as thermal comfort, indoor air quality, acoustics, daylight, illumination, hot and sewer water management, aesthetics and building resilience in the disaster situations  Step 2 deals with the building automatic control system that integrates heating, cooling, ventilation, and other indoor climate controls including the geothermal and solar means for energy generation and storage  Stage 3 provides an economic analysis to determine the level of investment that should stop the construction of the initial building or the initial stage of retrofitting. In other words, to what extent the photovoltaics should be included in stage one of the construction or retrofitting process To explain step 2, we need to explain why including building automatics is critical to the design of the next generation of energy efficient buildings. The information basis contains a large number of data from different parameters some of them are critical others interacting. As an example, we can take an air temperature and relative humidity. The latter does not have effect on the process but chnges the occupant response to the temperature change.
A seldom realized fact is that all energy models used today, are parametric and therefore not suitable for making decisions during the design process [14]. Parametric models compare effects of changing a factor while keeping other factors constant. So, for a parametric model to predict human reaction one must create a complex of air temperature, relative humidity velocity of air movement and radiative exchange of heat. Using a single measurable parameter such as temperature is today the standard for heating or cooling processes.
Generally speaking, parametric energy models cannot deal with a synthesis similar to one that happens in the field performance of a building, where interaction between several factors modifies the outcome. So, to solve the logistic problem of energy optimization, we need to do the monitoring and modeling of the field energy performance and use models in the context of providing direction for the operating system.

Modular statistical software (MSS)
In the process of evaluation of the measured parameters we need to create a performance model that will be the basis for building-automatics. To this end we must know which factors exert critical and which are interacting in the effective influence on the operation of the selected aspect of building performance. Until now, the statistical analysis dealt with one or a few parameters while the real effect depends on interaction a number of parameters. Effectively, if temperature was a critical factor, the heating/ cooling systems were controlled by this single factor. Yet, we know that the occupant reacts on air temperature, radiative heat exchange, relative humidity of air and air movement.
Therefore, the software called MSS goes further (see Fig. 1). It allows searching for interactions and trends, evaluating their influence on the factor being optimized, eliminating outliers i.e. values outside of the statistical validity and observations collected in a situation that do not represent typical use conditions. It woks in the cloud, determines interactions between two selected variables, performs basic and multi-parameter analysis with assumed error of the first or second type, performs analysis of ANOVA, MANOVA, regression and trends for prediction. Working with MSS we are rapidly informed which variables are critical and which be considered as additional for continuation of the analysis.
As we are analyzing all measured data, we may look for trends and deviations from expected results because effects of seasons or locations if those are marked input information. Please note that the MSS input must characterise processes such as heating, cooling, ventilation, maintaining relative humidity of air, recirculation of indoor air, illumination, information defining exterior climate and indoor environment as well as characterize the source of inputs. Results from the MSS calculations can be used in two ways: (a) Direct application to the steering and controls of the building automatics (b) Selecting input data for the performance model of building automatic controls (BAC) The choice between (a) and (b) is made depending on the following:  if prediction is within the range of tested parameters,  how significant is the degree of interaction between critical parameters?  If the histogram or results shows that Gauss probability distribution can be used.
In case when these three conditions are fulfilled if the modular statistical software (MSS) provides sufficient information about trends, one transfer the information directly to the control the BAC system, otherwise one selects the input data to the neural networks constituting the BAC performance model.

Performance BAC model
Working with integrated systems of low-energy buildings one obtains a very large datasets from a few parallelly operating subsystems, that must be separated between different rooms for each of four climatic seasons. The data are allocated in a computer cloud, (e.g. using server SQL). While in the initial stage we must collect much more data than later because we do not know if the forecasting information can be obtained from MSS or output from MSS will go to the performance BAC model. Furthermore, we don't know which method we will use in the performance BAC model to establish trends. In the second part (yet to come) we will show superposition, normalization and transformation of variables i.e., a very broad methodology of using artificial neural networks to establish forecasting need for optimization of heating/cooling and ventilation of a low-energy building.
So, the first problem that MSS had to solve is handling large volumes of data through a remote analysis for the response of a building components to a change in the climate and expressing it in terms of probability. Furthermore, we are dealing with sub-systems and different modes of heat transfer (radiation, air flows, conduction) that have different time constant and we need to use different combination control settings to compensate for the future weather changes while we are controlling the rate of changes in the dynamic indoor environment (we use adaptable indoor climate instead of constant climate). In short, to predict changes in the control setting of the related equipment when the goal is to provides both the minimum energy and good indoor environment is rather complicated procedure. This is why we develop the system in two stages. If the first stage gives a satisfactory precision of forecasting it will be used as input to the BAC. If the requirement of precision is not met, the MSS will perform all statistical analysis and prepare data set for entry to the second stage. In the second stage the neural network will determine trends needed to control equipment's response to climate changes.

The MSS architecture
The system contains three interacting modules:  Data interpreter to transform the measured data to the structure used by the tool,  Client and climate databases,  Client application -a software to perform the analysis and graphic presentations Note: When the client's infrastructure comprises of a number of interacting computers, we recommend using dedicated server for communication between the three above listed modules.

Data interpreter
Measured properties, with the help of windows software, are moved from the source of the client database to the application database either direct or through the server. As an option, there can be a periodically running task giving access to the client database.

Database
The structure of database does not change as it is designed for a rapid access to the measured values. The role of the interpreter is clear, it transforms the information to the one compatible with Microsoft SQL Server 2014. The table structure in Figure 2 represents testing several indoor spaces and design of the table permits a rapid access to the information while the character of testing is preserved.

Business logic layer
This is a collection of all functional relationships that are needed for the client application. It handles input, transformation and analysis of values from the database and delivering them to the client application. This part of the software is separated from the functional relationships of the server module. All the statistics used in the data analysis are handled by the engine R of the statistical calculations.

Client application
Visual presentation of the analysis results. This is a module for communication though the graphic interface of the user. Typically, the user needs to perform the following analyses: linear regression, histogram and the degree of agreement with a Gauss probability distribution. Figures 3 and 4 illustrate application of the MSS to measurements used in publication [7]. On the basis of these results we can make a decision if one needs to continue to the stage 2 i.e. application of the neural network. Of course, in the case shown in Figures 3 and 4 we need to use the neural network [8,9,10].

Tools and technologies used in the MSS system
To develop the modular statistical software, we used the tools and technologies offered by .NET Framework and language C#. Graphical interface of the user is based on Windows Presentation Foundation. During description of the interface elements we used language XAML while using project template Model-view-view-model (MVVM). For presenting a large volume of measurements in graphical form we use an effective library SciChart.
A communication between the client application and database goes through the layer of the business logic. The MSS transfers the configuration of analysis selected by the user and waits on the resulting action.

Concluding remarks and future development
In the review article, entitled "On the next generation of low energy buildings" [19] we have briefly presented reasons for introduction of a new technology entitled 'Environmental Quality Management' (EQM) that highlights: (a) occupants are the primary concern and (b) the technology is to keep them comfortable while (c) making the buildings efficient. While technical criteria of acceptance for different climates varies, yet the process of optimization is the same in all cases. The name also implies that a passive house can be a platform to which other renewable energy sources are attached with the view to achieving the required indoor environment quality. For details see [6,9,20,21].
Those papers explain why the next generation of low-energy buildings must include building automatic controls. Now we are starting a series of papers entitled "Decision-making algorithms for sustainable built environment" to examine the relation between the smart grid and the next generation of buildings. The emerging need is to design buildings so that the energy exchange takes place in time suitable for both sides. Therefore, either new or retrofitted buildings must control energy storage for several hours. Controlled energy storage may eliminate energy peaks and valleys for the building and assist the smart grid in equalization of the 24-hour load.
The integrated and complex (involving both energy and indoor environment) technologies such as EQM has many variables that must be simultaneously analysed. To this end we are working on co-simulation of existing computerized numerical models [20,21] on another end we use neutral networks because they permit inherent integration of variables [7]. Yet, while the neural network models give us a lumped parameter solution the control systems are based on handling several single variables at the same time. So. the modular, statistical software (MSS) fills a very important gap in the commercialization of the EQM technology.
Within an interdisciplinary scientific cooperation, a programming solution has been developed that allows collection, processing and analysis of measuring data coming from buildings, that use energy-saving construction technologies to minimize energy consumption and maximize the thermal comfort of users. The software analyzes data from many areas, among others: sensors monitoring internal states of temperature, humidity and CO2 content, air conditioning, ventilation, heating etc. as well as power sources. The use of modern information technologies, many statistical analyses and a wide range of configuration options allows to comprehensively assess the energy efficiency of a building [22,23,24,25,26,27,28,29]. The modular structure and the option of parameterizing the system allows user to tailor the solution to a specific object. The project has wide opportunities to expand and develop system modules, inter alia, a direct connection to building automation.
We decided on presenting the issue of "Decisionmaking algorithms for sustainable built environment" in four parts. Part 1 explains two stages in handling the monitoring data with focus on modular statistical software. Part 2 will discuss in detail application of the neural network and their relation to numerical models, Part 3 will deals with a case study of a research character where model of BAC performance is used decide on priorities in retrofitting of the existing building, Part 4 deals with a case study of a research character where a pre-formed control box is required for delivery with the heat pump operation.