## 3 Results Discussion
### Fuzzy Logic Controller  
The development of a fuzzy-based reinforcing learning algorithm was seen as a way to attain good performance both in terms of SPF and in terms of on/off cycles. Reducing on/off cycles to a minimum can have a great impact on the expected life of circulators, increasing it significantly.  
The fuzzy controller was designed starting from the logic of case B where the independent quantity was the solar irradiance and the control variable the circulator speed. As mentioned in Section 2.3, the linguistic terms \"low\", \"medium\", and \"high\" were implemented with three triangular membership functions centred at about 0, 600, and 1200 W/m\({}^{2}\), respectively. The output membership functions were defined in the same way, with three triangular membership functions, equally distributed on the universe of discourse of the control parameter (between 0 and 1). The method used for the defuzzification phase was the centre of area [11; 66] and three rules were defined that related the three membership functions on the input with three membership functions on the output (low radiation with low speed, medium radiation with medium speed, and high radiation with high speed).  
In order to assess the robustness of the controller and to provide a connection to the RL algorithm, the FC controller was implemented with two different parametrizations of the input linguistic terms. In the first one, denoted by letter H, the membership functions were parameterized by the \"high\" radiation peak. In the second one, denoted by letter M, the parameterization was done by the \"medium\" peak. The two families of membership functions are shown in Figure 4, while the resulting control characteristics are shown in Figure 5. In the following tables, the yearly results of the H-FC are reported in Table 3, while those of the M-FC are reported in Table 4.  
Figure 7: Monthly profile of the solar pump on/off cycles between the four different control strategies.  
A higher level of \(\mathrm{SPF_{coll}}\) can be reached with the \"medium\" radiation setup, although this is attained decreasing the electrical consumption of the pump at the expanses of the captured solar energy (GSY). The \"high\" radiation setup, instead, achieved the maximum values in terms of \(\mathrm{SPF_{dhw}}\). Monthly data of \(\mathrm{SPF_{coll}}\) for the H-FC case were also reported in Figure 8 with different lines for seven different values of the parameter defining the family, from 0 to 1200 W/m\({}^{2}\). To ease comparison with the previous four control strategies shown in Figure 4, its bars were re-plotted in the background of this figure. Looking at this graph, the big difference notable is between case D and the FC with the action a7 (high radiation imposed at 1200 W/m\({}^{2}\)) that allows to reach the best performance in terms of \(\mathrm{SPF_{coll}}\).  
\begin{table}
\begin{tabular}{c|c|c|c|c|c|c|c|c|c} \hline \hline
**Action No.** & \multirow{2}{*}{\(\eta_{coll}\)} & \multirow{2}{*}{\(\mathrm{SPF_{coll}}\)} & \multicolumn{2}{c|}{**On/Off**} & \multirow{2}{*}{**GSY**} & \multirow{2}{*}{\(\mathbf{R_{G}}\)} & \multirow{2}{*}{\(\mathbf{W_{pump}}\)} & \multirow{2}{*}{\(\mathbf{D_{dhw}}\