## 3 Results and Discussion
### Fault Diagnosis  
The values obtained for the discriminant function of each class, \(g_{i}\), were compared in order to diagnose the flawed sensor operation. The discriminant function with the highest value indicated the class of the faulty sensor, and consequently, it diagnosed the fault. The values of the discriminant functions \(g_{i}\) were computed for each of the 15 min time-sampled measurements of the testing day no. 140, affected by the different types of faults (seven classes) and for measurements corresponding to normal operation (one class). They are presented in Figures 2-9. In order to reveal the moment of time within the first day after the fault appearance, when the fault is firmly and permanently diagnosed by the maximum discriminant function, a magnified representation of the time interval in the vicinity of this moment is presented in the special inserted detailed graphical representation. As may be observed in Figure 2, all of the \(g_{i}\) values confirmed the normal operation (faulty-free values) diagnosis after 16.5 h of the fault appearance. It is worth noticing that for the first part of the testing day (no. 140) when sensor faults are not yet fully developed, the discrimination between normal operation and faults is less evident. In Figure 3, the bias fault type diagnosis is performed after 2.5 h, for a time period of 5.75 h. After that period, the automatic controlled WWTP operation is driven progressively (due to the integral component of the PI controller) to low aeration and to values of the process variables that are becoming similar to those corresponding to the maximum values of the DO sensor and, as a result, the FDA discrimination is revealing the complete failure maximum class for the last part of the day. Drift diagnosis is firmly confirmed after 13.75 h, as it is shown in Figure 4. Drift fault effects are growing in time due to the intrinsic nature of this fault. Figure 3: Bias diagnosis: graphs of the FDA discriminant functions \(g_{i}(x)\) for each of the normal and seven fault classes, along the 24 h of the 140 th day and the detailed representation revealing the class of the observations and the time moment of the firm fault type identification. Figure 2: Normal operation diagnosis: graphs of the FDA discriminant functions \(g_{i}(x)\) for each of the normal and seven fault classes, along the 24 h of the 140 th day and the detailed representation revealing the class of the observations and the time moment of the firm normal operation identification. The diagnosis of wrong gain fault was confirmed after 14 h of the fault incidence moment. The graphical representation is shown in Figure 5. As the wrong gain fault was introduced by a time lag constant, the identification was relatively promptly achieved. The loss of accuracy fault was identified after 16.5 h of the fault start moment of action, as it is presented in Figure 6. Despite the irregular character of this fault, determined by the random component of the simulated faulty signal, the permanent discrimination type of fault was well achieved. Figure 4: Drift diagnosis: graphs of the FDA discriminant functions \(g_{i}(x)\) for each of the normal and seven fault classes, along the 24 h of the 140 th day and the detailed representation revealing the class of the observations and the time moment of the firm fault type identification. Figure 5: Wrong gain diagnosis: graphs of the FDA discriminant functions \(g_{i}(x)\) for each of the normal and seven fault classes, along the 24 h of the 140 th day and the detailed representation revealing the class of the observations and the time moment of the firm fault type identification. Figure 6: Loss of accuracy diagnosis: graphs of the FDA discriminant functions \(g_{i}(x)\) for each of the normal and seven fault classes, along the 24 h of the 140 th day and the detailed representation revealing the class of the observations and the time moment of the firm fault type identification.