# Leveraging Urban Water Distribution Systems with Smart Sensors for Sustainable Cities
## 5 Experimental Results
### Lugo Scenario  
A base demand of 147.73 L/s was calculated using:  
\[B_{D}=\frac{\text{average\_consumption}\times\text{inhabitants}}{86,400} \tag{1}\]  
where average consumption is 130 L/inhabitant-day and the population is 98,189. Negative flow values indicated opposite connection directions between nodes. Valves were simulated  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c} \hline \hline
**Node** & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** & **9** & **10** & **11** & **12** & **13** & **14** & **15** & **16** & **17** & **18** & **19** & **20** & **21** & **22** & **23** & **24** & **25** & **26** & **27** & **28** \\ \hline
**\#inhab. Lugo** & 50 & 60 & 100 & 70 & 35 & 41 & 13 & 74 & 13 & 86 & 24 & 25 & 44 & 10 & 9 & 5 & 11 & 13 & 16 & 17 & 20 & 90 & 88 & 73 & 68 & 50 & 98 & 8 \\
**\#inhab. Moratalla** & 50 & 100 & 140 & 90 & 67 & 75 & 42 & 31 & 98 & 86 & 67 & 23 & 52 & 73 & 35 & 62 & 20 & 47 & 83 & 90 & 17 & 70 & 120 & 10 & 31 & 5 & 4 & 6 \\ \hline
**Node for Balerma** & 1 & 10 & 100 & 101 & 102 & 103 & 104 & 105 & 106 & 107 &by adjusting pipe roughness. For a working point of 5 L/s, we obtained a diameter of 165 mm and a pump head of 32.5 mWc. The general pump characterization expression is:  
\[\text{Head}=43.33-0.4334\times(\text{Flow})^{2} \tag{2}\]  
The node with the highest saving is the one with the ID \"Junc Node28\" with a total of 648,000 L/day, and the node with the lowest saving is the one with the ID \"Junc Node8\" with a total of 42,744.65 L/day. Total savings are the sum of all individual savings, resulting in 2,558,047.42 L/day. The linear regression in Figure 5 shows a positive trend, predicting node demand based on base demand values. The linear regression between base demand and pipe diameter (Figure 5) indicates increased base demands with increasing pipe diameters. \[B_{D}=0.18472808\times\text{diameter}+119.06156712 \tag{3}\]  
This positive trend reflects the expected increase in base demand as pipe diameters increase. Larger pipes are generally installed to handle greater water flows in areas of higher demand, such as those with denser populations or more commercial activity. The model's slope (0.1847) indicates a moderate increase in base demand with diameter, suggesting a proportional scaling of resources required to maintain sufficient water supply across varying node demands. The high intercept value (119.06 L/s) is consistent with the baseline demands associated with the core network, which supports a large urban population. If we compare the values of base_demand and demand_lps obtained, we obtain the linear regression shown in Figure 6. This figure illustrates how the blue data points represent the data used to train the model: the simulation values. The red line represents the line of best fit generated by the model itself, which follows the trend of the data points. In this case, we select one of the base demand values previously calculated, such as 169.88 L/s to interpret the results. The model predicts that the node will demand nearly 140 L/s by drawing an invisible vertical line. If the calculated base demand is lower, the model predicts a lower demand from the node. The model thus determines the slope and intercept values that best predict the node's demand. The close fit between the predicted and actual values demonstrates the accuracy of the linear regression model in predicting local demand based on base demand values. The red trend line's consistency with the data points further validates the model's effectiveness in estimating demand changes across different nodes. The predicted values help to identify  
Figure 5: Linear regression between \(B_{D}\) and pipe diameter in Lugo. nodes where water supply may exceed actual demand, allowing for targeted optimization interventions. Figure 7 displays resource savings per optimized node, with the highest saving node achieving 648,000 L/day.