**5. Conclusions**

The economic optimization of the electricity consumption in existing wastewater treatment plants (WWTPs) following the demand response (DR) principle was proposed in the present study, focusing on the biological treatment, which is known to consume the highest share of electricity in WWTPs. A compressed air storage system, composed of an air compressor and a storage tank, was proposed, considering di fferent operating pressures and volumes. The modelled WWTP characteristics were influent COD concentration and treated flowrate. Two scenarios were analyzed, one with simple air storage integration and the second forecasting the implementation of the air storage system with on-site electricity production from biogas. The results highlight that a short payback time can be obtained considering the actual Italian electricity market conditions, in particular by selecting larger storage volumes. Air storage volume was shown to be the most significant factor a ffecting the output economic indices, if compared to air pressure and WWTP characteristics. Biogas integration from anaerobic digestion (AD) process would allow one to increase the economic profitability of the investment, with favorable applicability in medium and large-scale WWTPs. A following phase of the work is forecast to study the available devices for commercial air storage systems and air expanders to implement a complete CAES, as well as to study in a deeper manner WWTP dynamic process conditions.

**Author Contributions:** The authors worked collectively on the manuscript preparation. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** The authors acknowledge CAFC S.p.A. company for input data for the model. The Company's line of business includes the distribution of water for sale for domestic, commercial, and industrial use, together with wastewater collection and treatment.

**Conflicts of Interest:** The authors declare no conflict of interest.
