Abstract
This paper is focusing on intelligent rooftop greenhouses. An initial mathematical model implying recirculation factors for greenhouse and underneath building ventilation systems was upgraded in the sense of reducing interactions among parameters, by discarding the recirculation factors. The initial approach relied on basic fuzzy-interpolative temperature controllers working with a network of ventilation fans, adapted to the changes of the weather conditions and of the building configuration by means of a central expert adaptive rule base. This paper proposes a flexible distributed fans network, locally adapted, working under the control of temperature self-adaptive interpolative controllers. This approach enables us to adapt such buildings, that are now confined to warm temperatures, to a wide range of climates, to value a great part of renewable resources of our cities and to initiate a process of increasing the carbon offset at large scale. The new configuration is tested by simulations.
Intelligent rooftop greenhouses
This paper is dealing with intelligent greenhouses installed on the roofs (iRTG –Intelligent Rooftop Greenhouses), a recent development of the integrated roof-installed greenhouses (IRTG –Integrated Roof Rooftop Greenhouses), which at their turn, are a last decade development of the classical Rooftop Greenhouses (RTG), subject of Urban Agriculture [1].
In the frame of our team’s research program focused on the modeling and constructive optimization of IRTG/iRTG buildings, and having in mind future smart cities with smart infrastructures, capable to use in situ renewable energies (geo-thermal, solar, wind) and also to collect and manage rain waters by means of generalized iRTGs [2], we are now improving the previously communicated mathematical model of an iRTG [3–5], aiming to find a suitable control method of the system’s temperatures.
Comparing to the emerging urban buildings covered by vegetation (Fig. 1) or the conventional rooftop greenhouses [6, 7], our concept consists in replacing the useless conventional roofs by rooftop greenhouses and creating an integrated environment by mean of bidirectional airflows between the two segments of the iRTG system: rooftop greenhouse and interior of the building. The oxygen produced by plants is not scattered outside but driven into the interior of the building, while carbon dioxide produced by people and by other sources like cooking for instance, is driven to the plants, fertilizing them. On the other hand, comparing to IRTGs, which have a natural air exchange between rooftop greenhouse and building [6–8], iRTGs are imposing controlled bidirectional air flows between plants and inhabitants, and consequently bring an efficient energy management system and improve eventually the building’s metabolism. The fact that the plants are protected by greenhouses also enable iRTGs to operate in a broad variety of climates, while the present IRTG are confined mostly in warm climates [9, 10].

Green buildings.
A generic iRTG system mainly features a water-to-water heat pump, located in the basement, which can heat or cool the system on behalf of the geothermal energy (see Fig. 2). Other available sources of renewable energy: the greenhouse effect and photovoltaic panels, wind generators, air-to-air heat-pumps, etc. depending on the location of the iRTG and the local climate.

A generic iRTG.
The goal of this work is to improve the previous communicated iRTG mathematical model and to specify a suitable fuzzy-interpolative control method, self-adaptable to any constructive solutions.
The mathematical model
The first structural mathematical model of the iRTG system was proposed in 2018 [3]. The model is composed of six differential equations of first order, covering the thermic and the chemical composition of the air inside iRTG. The variables of the model are the following: V[m3] volumes, ρ[kg/m3] air density, c [J/kg °C] air specific heat, T[°C] temperatures, D[m3/s] air flows, α [W/m2 °C] mean heat transfer coefficients through walls, S[m2] radiant surfaces, of the walls, N number of persons, Po[W] mean power emitted by a person, PGE[W] power of the greenhouse effect, P[W] heating/cooling power, τ[s] time delays, C[kg/m3] gas concentrations, Q [kg/m3·s] gas emission flows (by plants and persons) and U, the recirculation factor. Thus [1-U(t)] represents the fresh outside air proportion in a ventilated air flow. Index G refers the greenhouse, B the building, RTG the IRTG ventilation system and E the environment.
The equations address the following output variables: TG, TB, CO2 G, CO2B, CCO2 G and CCO2B.
The variables through which we can adjust the outputs are PG, PB, DB ⟶G, DG ⟶B, DB and DG.
The control solution advanced in [5] was relying on two basic elements: two fuzzy-interpolative controllers for TG and TB and an adaptive centralized expert controller for the fans that are actively adjusting the air flows: DB ⟶G, DG ⟶B, DB and DG.
However, a striking feature of the highly nonlinear iRTG system is the high interactivity among all outputs. This is complicating the iRTG operation and the analyze of its performances.
Reducing interactivities as much as possible turns to become a key design issue. That is why in this paper we are reversing the solution:
–We replace the centralized adaptive expert systems with adaptive ventilation fans, distributing the adaptation task over all iRTG; such way adaptation is easier to perform even with sequential devices, matching the diverse conditions that are to be found in compartmented buildings (apartments, rooms with different orientations, etc.)
–We replace the basic fuzzy-interpolative controllers, employed so far, with Fuzzy Self Adaptive Interpolative Controllers (FSAIC) [11], with extremely high adaptive capacities.
We will focus on TG and TB, which are not just the targets of the control action but also leverages helping us to manage the energy of the entire iRTG. The ventilation fans can now be of different types, and they are not demanding any specific communication features, except the IoT ones.
An immediate modification of the mathematical model is to discard the recirculation factor U. The modified less interactive iRTG model becomes:
For the previous structural model, we developed a physical oriented Simulink implementation, shown in Fig. 3. Although this model seems more complicated that a space state one, when coming to execute simulations following various scenarios, we have immediate access to all the possible settings.

The Simulink implementation.
The 25 orange blocks help is tuning the model’s parameters. The magenta blocks are configuring the TG and TB controllers. We may choose either to apply direct values of PG and PB (Pset/Tset = 1) or to introduce temperature controllers and to call at the input the desired TG and TB values (Pset/Tset = 0).
The control of the nonlinear and distributed iRTG system is demanding highly self-adaptive features. In ref. [2, 3] we proposed a centralized expert protocol of adaptive rules to supervise and coordinate the ventilation fans, in any possible environment condition. The temperature controller was a PID interpolative-one, the Plane Surface Adaptive Interpolative Controller (PSAIC) [11]. PSAIC is designed to gradually turn PID in PD in case of perturbations or vice versa, in case of transient regimes.
The distributed ventilation fans network we propose now demands extraordinary adaptive capabilities, which can be supplied by another member of the fuzzy-interpolative controllers’ family: the Fuzzy Self Adaptive Interpolative Controller (FSAIC), see Fig. 4. PSAIC is supplemented by an adaptive corrector, performing on-line analysis of the operating regime by Phase Trajectory of the Error [11].

The fuzzy self-adaptive interpolative controller.
FSAICs are inspired by J.J. Buckley paradigm Universal Controller. We are usually working with normalized fuzzy-interpolative controllers that are connected to the controlled plants by means of input/output scaling factors (see Fig. 4).
The sizing of the iRTG system (walls, ventilated air flows, installed power, etc.) can be designed and verified by appropriate settings of the simulations.
Figure 5 presents one of the simulations, with TG = 18°C and TB = 22°C. Since plants are tolerant to mild overheating, we may allow TG to exceed 18 °C when TE is exceeding 18°C. In this regime the greenhouse can store heat, which will be used during nights or when weather is cloudy and cold.

iRTG operation with FSAIC control: TG = 18 °C, TB = 22°C.
The FSAIC controllers are presented in Fig. 6.

The FSAIC temperature controllers.
The same controllers were recently applied successfully at a highly nonlinear system: The Artificial Pancreas [12].
We tested the performance of Fuzzy Self-Adaptive Interpolative Controllers on our model of Intelligent Rooftop Greenhouse with distributed ventilation fans, for different environment conditions, with the ventilation fans set according to different scenarios.
This approach enables us to adapt such buildings, that are now confined to warm temperatures, to a wide range of climates and to initiate a process of increasing the carbon offset of our cities.
