**6. The Passeig de Gracia simulator case study**

plotted on Fig. 10. The agreement between the real plots and the estimated one is very good at each prediction time, especially for the energy consumption, that is one of the key variables influencing the cost function described in paragraph 6.2 and, as a consequence, the results of

PElSF1\_p01

BN Dymola

BN Dymola

Funzione Dymola BN

Figure 10.Fig. 10: Comparison between real energy consumption of station fan PELSF1 and the estimated one by AF-BN (a), the real air change per hour and the estimation by AF-BN (b) and

**Figure 10.** Comparison between real energy consumption of station fan PELSF1 and the estimated one by AF-BN (a), the real air change per hour and the estimation by AF-BN (b) and comparison between the real PL3 temperature and

In this section, we will report the implementation of a Bayesian Network predictor for the environmental control of the aforementioned test-bed given by Passeig De Gracia (PdG) metro station in Barcelona, Spain. The purpose of this section is to provide readers with an example regarding how Bayesian Networks can be embedded within a large MPC control framework, and how their predictions can be exploited for optimal control. The environmental control has been based on MPC because of the great complexity of the thermal and airflow dynamics in the underground environment, and of the time length of their characterising constants. The metro station underground

*PElSF1\_p01 ACOPL3\_p01 TemPL3\_p01 RMSE* [W] *NRMSE* (%) *RMSE* [kg/s] *NRMSE* (%) *RMSE* [°C] *NRMSE* (%) 326.28 0.024784 2.24 0.097566 0.91 0.13406

**Table 2.** Errors obtained for the whole prediction cycle with *H*=24 hours in the three prediction cases shown in Fig. 10.

comparison between the real PL3 temperature and the estimation by TP-DBN (c).

the loop managed by the controller.

a)

26 Dynamic Programming and Bayesian Inference, Concepts and Applications

b)

<sup>26</sup> ACOPL3\_p01

<sup>20</sup> TemPL3\_p01

c)

7. The Passeig de Gracia simulator case study

the estimation by TP-DBN (c).

In this section, we will report the implementation of a Bayesian Network predictor for the environmental control of the aforementioned test-bed given by *Passeig De Gracia* (PdG) metro station in Barcelona, Spain. The purpose of this section is to provide readers with an example regarding how Bayesian Networks can be embedded within a large MPC control framework, and how their predictions can be exploited for optimal control. The environmental control has been based on MPC because of the great complexity of the thermal and airflow dynamics in the underground environment, and of the time length of their characterising constants. The metro station underground environment is mainly characterised by huge thermal inertia caused by the terrain surrounding the station, and by relevant contributions to the indoor temperature and pollutants levels provided by air flows. Indoor air flows are determined by a number of sources that influence the station with different time frequencies and during different daytimes. The outdoor wind flow, quite frequent in a coastal station like Barcelona, affects directly the shallowest levels of the station, and determine the air pressure configuration at the interfaces of the deepest levels that may favour or impede the mechanically air supply, depending on their mutual disposal. The train transit causes the well-known piston effect. The approaching trains act as pistons compressing the air into the station platform, and leaving trains act as pulling pistons, reversing the flows. The frequency of this effect depends on the train schedule and, in our case, can be assumed about 180 sec on the average. The train piston effect causes relatively high-speed air transients with many local turbulences that affect also the platform neighbouring spaces. A third relevant source of air exchange, which is usually neglected in standard analyses, is due to the air buoyancy caused by the temperature difference between the indoor and the outdoor environments. This effect becomes substantial during the night, because of the absence of the other sources and of the greater temperature difference. Buoyancy effect causes relatively slow and laminar airflows that move air form the rail tunnels to the outside through the station's spaces.

Within this scenario, the problem of controlling the forced ventilation in an optimal way, through the fan speed, cannot be approached but with an MPC technology. Within the MPC framework, the definition of the weighting coefficients of the cost function, that maximize energy saving without compromising comfort and air quality in different operating conditions (see section 6.2), and without affecting normal operation of the station (due to safety reasons), required the development of a co-simulation architecture. Thus, the Bayesian predictor and the MPC logics has been embedded in a simulation environment that accurately reproduces the thermal and air-flow dynamics of the outdoor and indoor environments, and the trains and passenger flows. The development of the models that contribute to the simulation environment required in depth preliminary analysis by means of Finite Element Modelling, and a number of on-site surveys, that became necessary to determine the magnitude of the phenomena and to subsequently calibrate the models. Once they have been calibrated and included in the simulation architecture, the environmental models resemble the same dynamic of the measured environment, thus allowing for scenario analysis and control sizing.
