# An Approach to Industrial Automation Based on Low-Cost Embedded Platforms and Open Software
## 4 Results
### Experimental Results  
Table 7 shows the results of the overshoot and settling time obtained in the experimental tests for the two control schemes. Figure 10 shows a screenshot of the local HMI of the process during operation, where the tank levels are registered. The FGS-PID reduces the settling time and overshoot in tank 2. Compared to simulation results (Table 5), the experimental results of the control system show similar performances. This fact is important because it demonstrates reliability in the design of the control schemes implemented in the low-cost PLCs. Additionally, these results demonstrate that there is moderate uncertainty in the dynamic model of the multi-tank system.  
Figure 11 shows the behavior of the control signal for valve 2 when the two proposed control schemes are used. The first part of the signal, in blue (first half, left of the graphic capture), corresponds to the control signal generated by the FGS-PID algorithm, where some chattering is observed due to changes in the PID parameters. The second part of the signal, in blue (second half, right of the graphic capture), corresponds to the control signal generated by the PID controller; this signal has a smoothed behavior. The overall performance of the system, as shown in Table 7, is better with the fuzzy + PID scheme.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Control Scheme** & **Overshoot Tank 1** & **Overshoot Tank 2** & **Settling Time** \\ \hline PID & 5.58\% & 8.21\% & 225 s \\ FGS-PID & 5.58\% & 7.65\% & 200 s \\ \hline \hline \end{tabular}
\end{table}
Table 5: Simulation results of the controllers’ transient response.  
Figure 10: Human to machine interface (HMI) screenshot.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Test Applied** &
\begin{tabular}{c} **Performance Index (12)** \\ **PID** \\ \end{tabular} \\ \hline Settling over a reference & 1.430 & 1.425 \\ Step reference changes & 1.543 & 1.522 \\ Leaks during the operation & 1.451 & 1.436 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Controller performance comparison during simulation.  
Figure 12 shows the behavior of the estimation in the presence of a leak in tank 1 when using the PID scheme. The residue signal, in red, reduces its value, allowing the leak to be detected when its value is below the threshold.  
To evaluate the fault detection system, leaks are induced in tanks 1 and 2, as well as simultaneous leaks. Alarm activation and deactivation times are determined while the fault is present. These tests were repeated 10 times to obtain their average and 95% confidence interval. The confidence intervals of the alarm activation time are shown in Figure 13; the labels with * on the x-axis indicate the existence of simultaneous leaks in the two tanks. In the case of tank 2, the use of the FGS-PID controller considerably reduces the alarm activation time by 51.33%. On the other hand, in the case of tank 1, when there are simultaneous leaks, the use of the FGS-PID controller increases the alarm activation time by 27.93%. In the other cases, due to the overlap between the confidence intervals, the times are considered to be equal using the two control schemes proposed.  
Figure 11: Control signal comparison for tank 2 when operating FGS-PID and PID control schemes.  
Figure 13: Confidence intervals for the activation time of the fault detection.