## 2 Methods and Models
### The Fuzzy Logic Controller
#### 2.3.2 Thermal Load Following  
In contrast, the objective of the developed fuzzy logic control is to ensure that the user thermal demand is satisfied by the CHP plant according to a thermal-load-following approach. In other words, the CHP plant modifies its operation control based on the thermal energy demand of the user. Next, the design of the thermal load following control logic is discussed.  
With reference to the developed fuzzy logic controller, the considered inputs were the thermal power output from the solar field (\(P_{\text{LFR,out}}\)), the average temperature of the TES unit (\(T_{\text{TES,av}}\)), the outlet temperature of the diatthermic oil from the solar field (\(T_{\text{LFR,out}}\)),  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & & **1** & **2** & **3** & **4** & **5** & **6** & **7** \\ \hline \multirow{2}{*}{\(T_{\text{oil,in}}=210\)\({}^{\circ}\)C} & Temperature (\({}^{\circ}\)C) & 73.14 & 163.66 & 168.57 & 135.32 & 85.57 & 72.00 & 113.93 \\  & Pressure (bar) & 2.1 & 17 & 17 & 2.1 & 2.1 & 2.1 & 17 \\ \hline \multirow{2}{*}{\(T_{\text{oil,in}}=150\)\({}^{\circ}\)C} & Temperature (\({}^{\circ}\)C) & 72.34 & 115.85 & 120.77 & 110.63 & 80.00 & 72.00 & 97.28 \\  & Pressure (bar) & 2.1 & 6.5 & 6.5 & 2.1 & 2.1 & 2.1 & 6.5 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Temperature and pressure of the different state points in the ORC unit with varying inlet temperatures of the diatthermic oil at the evaporator.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**OM** & **Rules** \\ \hline \(-1\) & \(T_{\text{TES,av}}\geq T_{\text{TES,max}}\)1  \\ \hline \hline \end{tabular}
\end{table}
Table 3: The “if then... else... “ rules of the baseline control strategy.  
the temperature difference between the outlet temperature of the diathermic oil from the solar field and the average temperature of the TES (T\({}_{\rm diff}\)), the period of the day when the load is expected to be higher than the rest of the day (Time), and the system information (System\({}_{\rm info}\)) about the overall performance of the plant, as further detailed in Section 2.3.2.1. Qualitatively speaking, the variable Time was introduced to account for loads that increase at specific times in a day (e.g., a school building, an office, etc.), while the variable System\({}_{\rm info}\) provides feedback information about how well the thermal following is performing. These variables can belong to specific fuzzy sets via membership functions, where the choice of their shapes and values is made based on the knowledge of the system engineer and according to the experience derived from trial-and-error procedures. The trapezoidal membership functions shown in Figure 4 were considered. Please note that when the (thermal) load is distributed all over the day, then the Time variable can be neglected.  
The control policy was, instead, based on a Mamdani fuzzy inference system [30], which synthesizes a set of linguistic control rules. In Table 4, a set of 16 rules for a residential load model is reported, where the Time variable is neglected. In Table 5, a set of 21 rulesfor a school is reported, where the load is expected to be concentrated in the time period 7 a.m.-1 p.m. Finally, the fuzzy control action was defuzzied according to the center-of-area method, thus returning the OM to be selected.