Simulation Convergence Strategy

A building energy system can be composed of multiple components, e.g., Building, Thermal Energy Storage (TES), Heat Pump, Battery, Photovoltaic System or Electric Vehicle. Based on its relations, components can be interconnected, exchanging information, mass fluxes or energy within every time step. Under ETHOS.HiSim, these components and connections together form the setup function, which later is passed to Simulator to perform the calculations.

For instance, take the building energy system containing Building, Weather, Photovoltaic System and Occupancy depicted in Fig. 2. Component Weather has the output irradiance that is the input itself of Building and Photovoltaic System, to calculate the building thermal equilibrium and electricity generation respectively. Component Occupancy has outputs as number of residents which is used as input by Building to calculate heat naturally generated by human bodies.

None

Fig. 2 Non Circular Building Energy System

Certain building energy system might contain circular dependencies as in the case of Fig. 3. In this setup function, Building provides information to Heat Pump Controller, that itself activates the Heat Pump, that heats the Thermal Energy Storage, that heats the Building.

Alternative text

Fig. 3 Circular Building Energy System and its Components Connections

Inputs and outputs are nothing but shared values among the components. In other words, once a component performed its internal calculations, all its output values are updated, and so are the input values of other components that they are connected to. The updated input values are used for the internal calculation, which themselves generate new output values, and so on progressively throughout all components.

In the case of circular dependencies, a once previously calculated value can be overwritten, leading to the uncertainty values for the building energy system. This Circular Substitution is complemented by ETHOS.HiSim framework with the Anti-Oscillation-Switch Method to determine all the values of the simulation.

Circular Substitution with an Anti-Oscillation-Switch Method

Circular Substitution works in an iterative manner within one single time step, overwriting common shared inputs and outputs among the components. To illustrate this concept, take the building energy system depicted in Fig. 3.

Once the setup function has been implemented and the components and connects have been passed to the Simulator, the simulator itself run all the internal calculations time steps for every single component, sequentially, as they were added to the simulator. To correctly determine the values of all outputs for a specific time step, the Simulator performs multiple trial iterations within that time setup.

Before starting the trials, all values are filled by default with zero. For the :numref:`` example, the Simulator starts with the component Building. In the first iteration of the current time step, the component Building requires heating, yielded in the new update output. Once Simulator performs the internal calculation of Building, the output Building Heating Demand is updated, as shown in Fig. 4 . Circular Substitution works in an iterative manner within one single time step, overwriting common shared inputs and outputs among the components. To illustrate this concept, take the building energy system depicted in Fig. 3.

Building In The First Iteration

Fig. 4 Component Building in the first iteration

Next, Simulator performs the internal calculation of Thermal Energy Storage. Since this is the first time step as well, the output values is filled with the simulation start value as shown in Fig. 5. The Building Heating Demand is kept the same as the result from the Building calculation.

Building and TES in the first iteration

Fig. 5 Building and TES in the first iteration

Analogously, Simulator performs the internal calculation of Heat Pump and Heat Pump Controller. Given the heating requirement from Building, Heat Pump and Heat Pump Controller update their outputs to start the heating process, as shown in Fig. 6. As Building requires heating, Heat Pump Controller passes an activation signal to Heat Pump.

First Iteration

Fig. 6 First Iteration

For the next iteration, as the Heat Pump receives the signal for activation, it updates its heating power, which itself starts the heating process of the Thermal Energy Storage, as shown in Fig. 7

Second Iteration

Fig. 7 Second Iteration

Because the Thermal Energy Storage is being heated up, its initial thermal energy cannot be the same as its start value. Hence, its temperature is once again updated with a higher value, as shown in Fig. 8.

Third Iteration

Fig. 8 Third Iteration

Finally, the correct temperature of the Thermal Energy Storage is reiterated until all values converged in the iteration 4 and 5 as shown in Fig. 9.

Forth and Fifth Iteration

Fig. 9 Forth and Fifth Iteration

In case after 10 iterations no convergence has been reached, Simulator would tell all oscillating components to just stick to the last value. Forcing the components to stick to the last iterated value is the technique called Anti-Oscillation-Switch.