## 4 Fuzzy Control Structure for Supervisory Ejector Cycle and Multi-Solar Collector Systems
### Layer 1: Fuzzy Control of Solar Collector System  
Two sets of sensor inputs are presented in Figure 3: temperature sensor of the solar collectors \(T_{c}\) and temperature sensor of tank \(T_{s}\). A controller output is distributed to regulate the mass flow \(\dot{m}\) to the manifolds. The control problem in a tank with an energy supply from the solar collectors is to keep the outlet temperature near a desired set-point. This reference is set by operating conditions imposed by supervisory control, which are fixed by the different modes of operation defined by the operator or end user and the climatic conditions of the moment. Moreover, the plant is a nonlinear solar thermal system exposed to disturbances, such as inlet temperature changes, variations in ambient temperature and changes in solar radiation. All these characteristics make it difficult to control and maintain the performance and reliability of nonlinear solar thermal plants. For the controller design, a mathematical model is created by performing an energy balance in each solar collector and in the generator. Equation (1) shows the output temperature \(T_{S}\) of the generator  
Figure 3: Layer 1: Fuzzy control of the solar collector system. Figure 2: Fuzzy control of supervisory ejector cycle and multi-solar collector systems. with regard to time [50]. This dynamic equation is maintained as a function of the working fluid mass flow \(\dot{m}\) of each solar collector, considering constant properties as the density \(\rho_{f}\) = 998.2 kg/m\({}^{3}\), specific heat \(C_{pf}\) = 4182 j/kg K and the tank volume \(\forall_{T}\) = 0.180 m\({}^{3}\). This equation also considers the energy requirements of the refrigeration cycle, \(T_{R_{out}}\), which use R134a as the refrigerant fluid with a mass flow of \(\dot{m}_{R}\) = 0.0567 kg/s and specific heat of \(C_{PR}\) = 1443 j/kg K:  
\[\frac{dT_{s}}{dt}=\frac{\dot{m}_{1}T_{1}\ +\ \dot{m}_{2}T_{2}...\dot{m}_{n}T_{n}} {P_{f}\forall_{T}}-\frac{\left(\dot{m}_{1}\ +\ \dot{m}_{2}...\dot{m}_{n}\right)T_{S}}{P_{f} \forall_{T}}-\frac{\dot{m}_{R}C_{PR}}{P_{f}\forall_{T}C_{pf}}\big{(}T_{R_{out} }-T_{R_{in}}\big{)}\,. \tag{1}\]  
To provide the thermal energy to the generator, an arrangement of vacuum tube solar collectors is required. These collectors consist of a heat pipe inside a vacuum-sealed tube and have shown that the combination of a selective surface and an effective convection suppressor can lead to good performance at high temperatures. The vacuum envelope reduces convection and conduction losses, so that the collectors can run at higher temperatures than the flat plate [51]. For the analysis, the solar collectors are divided into two thermal systems: the vacuum tubes and the storage tank. Equation (2) expresses the energy balance of the storage tank, taking into account that the tank walls are adiabatic, where \(T_{S}\) represents the output temperature of the generator, \(T_{T}\) is the output temperature of the tank, \(T_{a}\) is the temperature of the vacuum tubes, \(N\) is the total number of vacuum tubes in each solar collector, (\(\dot{m}_{conv}\)) is the natural convection mass flow rate and \(M_{t}\) = 292.6345 kg, which is the mass of water in the tank:  
\[\frac{dT_{T}}{dt}=\left[\left(\dot{m}\left(T_{S}-T_{T}\right)\right)+\left(N \cdot\dot{m}_{conv}\left(T_{a}-T_{T}\right)\right)\right]\frac{1}{M_{t}}. \tag{2}\]  
The differential Equation (3) shows the energy balance of water inside the tubes, considering heat losses by radiation to the atmosphere.