# Assessment of the Water Quality of WWTPs' Effluents through the Use of Wastewater Quality Index
## 2 Materials and Methods
### Calculation of the Wastewater Quality Index  
The flow chart of WWQI calculation is presented in Figure 2.  
The WWQI used in this study was adopted from [52] and is based on the sum of the water quality sub-indices of each parameter measured:  
\[\mathrm{WWQI}=\sum_{i=1}^{n}\mathrm{SI_{i}} \tag{1}\]  
where SI is the water quality sub-index of each parameter.  
The SI is calculated according to the Equation (2):  
\[\mathrm{SI}=\mathrm{W_{i}}\cdot\mathrm{q_{i}} \tag{2}\]  
where \(\mathrm{q_{i}}\) is the quality rating and \(\mathrm{W_{i}}\) is the relative weight.  
The quality rating (\(\mathrm{q_{i}}\)) is calculated using Equation (3):  
\[\mathrm{q_{i}}=100-\left(\frac{\mathrm{C_{i}}}{\mathrm{S_{i}}}\right)\cdot 100, \tag{3}\]  
where \(\mathrm{C_{i}}\) is the water quality parameter concentration in each sample and \(\mathrm{S_{i}}\) is the water quality standard set by the respective legislation.  
In this study, for pH, the desired limit interval is considered:  
\[\mathrm{S_{i}}=100-\frac{100(\mathrm{excursion})}{(8.5-6.5)} \tag{4}\]  
If the measured value (\(\mathrm{C_{i}}\)) is within the desirable limit (\(6.5\leq\mathrm{C_{i}}\leq 8.5\)), there is no excursion and \(\mathrm{S_{i}}\) is equal to 100. If \(\mathrm{C_{i}}>8.5\), the excursion equals to \(\mathrm{C_{i}}\)--8.5. If \(\mathrm{C_{i}}<6.5\), the excursion equals to 6.5--\(\mathrm{C_{i}}\).  
Figure 2: Flow chart of WWQI calculation.  
The relative weights (\(W_{i}\)) for each parameter are obtained from Equation (5):  
\[W_{i}=\frac{w_{i}}{\sum_{i=1}^{n}w_{i}}, \tag{5}\]  
where \(w_{i}\) is the weight of each parameter measured and \(n\) is the number of parameters measured.  
The WWQI is computed using the relative weights (\(W_{i}\)) assigned to each of the water quality parameters based on (i) equal weightage (\(WWQI_{N}\)), (ii) expert judgement (\(WWQI_{Exp}\)) and (iii) PCA factor loadings for their overall importance for sustaining water quality (\(WWQI_{PCA}\)) [37]. When the equal weightage is used, a weight of 1 was assigned to all the 10 studied parameters.  
Ascribing weighting to the studied water quality parameters influences the final WWQI value [35]. Usually, expert panels are used to assign weightings based on the environmental significance of the parameter, guideline values and use of the water body [32]. In the current study, when the expert judgement approach is used, the highest weight of 5 was assigned to parameters which have major effects on water quality--the priority substances Cd, Ni and Pb. A weight of 4 was assigned to the specific substance (Cr) and the eutrophication-causing parameters (COD, TN and TP). TSS and EC were assigned a weight of 3 and a minimum of 2 was assigned pH, which is considered as the least harmful.  
In PCA weighting approach, the weights of water quality parameters (\(w_{i}\)) are assigned based on the eigenvalues and factor loadings of PCs with eigenvalues higher than 1:  
\[w_{i}=\frac{\sum_{K=1}^{n}(E_{K}P_{ik})}{\sum_{k=1}^{n}E_{K}}, \tag{6}\]  
where \(E_{K}\) is the eigenvalue of PCs, \(P_{ik}\) is the factor loadings of parameters and n is the number of PCs with eigenvalues higher than 1.  
The relative weights (\(W_{i}\)) for all three weighting approaches are calculated according to the Equation (5).  
Finally, the WWQI is evaluated through a simple comparison to the categories shown in Table 3 according to the originally proposed WQI scheme and a modified one, reflecting Bulgarian legislation.  
The Bulgarian legislation follows the adopted WFD, with the main difference being the proposed scaling--the \"Fair\", \"Poor\" and \"Very poor\" water status is combined into a \"Moderate\" water status. The modified scale was used from this point on.