**1. Introduction**

The energy-water nexus refers to all the processes representing linkages between the water system and the energy sector, including the trade-off of both resources [1]. The energy-water nexus has been given increasing interest worldwide in recent years, due to climate change, augmented global energy demand and significant water scarcity [2]. With the increasing renewable energy generation, the electricity supply becomes more and more variable, necessitating flexible energy demand sources, able to adapt to supply variability providing demand response (DR) [1]. DR has been defined as "changes in electric use by demand-side resources from their normal consumption patterns in response to changes in the price of electricity, or to incentive payments designed to induce lower electricity use at times of high wholesale market prices or when system reliability is jeopardized" [3].

Wastewater treatment is an energy-intensive sector and its energy demand is continuously augmenting due to the stringent requirements on treated water effluent quality, requiring advanced technologies for pollutant removal [4]. The energy consumption in wastewater treatment accounts for about 3.4% of the total electricity consumption in the United States, being the third largest electricity consumer [5]. Nowadays, the energy utilization and optimization in the wastewater treatment plant (WWTP) sector has become a growing concern, considering both the economic and environmental aspects [6]. WWTPs were generally not designed with energy efficiency as a main target. Furthermore, information about energy consumption and energy recovery in WWTPs is still unsatisfactory in the scientific literature [6].

Wastewater characterized by higher internal energy (in terms of influent chemical oxygen demand (COD) concentration and flow rate) leads to a more consistent energy consumption in the plant, together with an increased sludge production and an augmented bioreactor footprint [6]. Proven techniques that help to improve plant energy balance include anaerobic digestion (AD) [7,8], sludge incineration, photovoltaic generation and thermal energy recovery [6]. Energy recovery from wastewater treatment can help to reduce the overall economic costs and the related environmental impact [4], following sustainability and circular economy principles. Indeed, wastewater can contain up to 12 times the energy that is needed for its treatment. Following a paradigm change, wastewater can be seen no longer as a waste but as a resource, from which nutrients and valuable compounds can be recovered [9]. In addition, the energy surplus from wastewater treatment can be integrated into energy distribution systems, supplying external consumers [10].

DR was often modelled as a portion of the total system demand, that can be shifted from peak hours to o ff-peak hours [1]. In industrial process models, typically the energy prices are taken as an input and the DR potential is evaluated by comparing di fferent electricity tari ff schemes, adopting a model-based or data-driven approach [1]. The model-based approach involves the detailed description of the system performances, with thermodynamic and kinetic aspects [11]. However, considering that the resulting models often include a set of non-linear di fferential equations, the optimization models typically focus on process electricity demand, abstracted from the physical details. Considering WWTPs, wastewater flow-rate shows a daily pattern that coincides with the electricity demand pattern, having one peak in the late morning and another one in the early evening. Consequently, the electricity demand is high when the system demand is high. A treatment shift from peak to o ff-peak periods (for example from evening to night-time) could yield significant electricity expenditure savings [1].

The biological secondary treatment in WWTPs typically involves activated sludge (AS) technology, which is the most widely applied treatment worldwide to remove biodegradable carbon, suspended solids (SS) and nutrients from wastewater [12]. The available process models of the biological phase include the activated sludge model number 1 (ASM1), developed by International Water Association (IWA), which describes the biochemical processes within the aerated tank with 8 processes and 13 state variables [13]. Recent studies demonstrated that modelling diurnal energy prices variation by coupling the ASM1 model with an energy pricing and a power consumption model could enable the WWTP managing utility to reduce plant energy consumption [14]. However, as noted by some authors, a joint representation of the electricity system behavior and the wastewater treatment process in an integrated energy system has not been implemented at present. Nowadays, mathematical modelling and simulation tools are being increasingly applied to WWTP upgrading and optimization [15]: multi-objective optimization models, in particular, allow one to account for di fferent objective functions, with the aim of optimizing design and operations of a selected process [16].

Wastewater treatment consumes 0.5–2 kWh electric energy per m<sup>3</sup> of treated water, depending on the selected technologies and plant scheme [17]. The AS biological process is the highest electricity consumer in WWTPs (10.2–71% of total plant electricity consumption) [1], due to the need for continuously supplying oxygen to the basins, sustaining the aerobic degradation of the organic matter. In medium- and large-scale plants, AS systems account for 50–60% of the total electricity need, followed by the sludge treatment (15–25%) and recirculation pumping (15%) sections [18]. Research has actually focused on aeration optimization: the idea of increasing aeration e fficiency by water looping through a piping, including a venturi aspirator, was recently proposed [19], achieving an aeration e fficiency in the range of submerse aerators.

Interactive multi-objective optimization can support the designers when new WWTPs need to be built, but can also improve the performances of existing WWTPs, considering several conflicting criteria and parameters [20]. The multi-objective optimization was recently applied in a number of cases to the water and wastewater sector, with significant outcomes. A goal programming was

proposed in [21] to optimize industrial water networks, by using a mixed-integer linear programming as a very reliable a priori method, considering several antagonist objective functions, such as freshwater flow-rate, number of connections, total energy consumption. A fuzzy goal programming was instead investigated in [22], in order to optimize wastewater treatment by considering different energy costs, pollutant load, influent and effluent concentrations: the proposed model was subsequently applied to a full-scale plant in Spain. A process simulator, modelling wastewater treatment, and an interactive multi-objective optimization software, were studied in [20] as a practically useful tool in plant design and improvement; successively, the simulator was applied to a municipal WWTP. The control strategy optimization proved to be effective also to reduce greenhouse gas (GHG) emissions from wastewater treatment in a cost-effective manner, considering also operational costs and effluent concentrations. It was highlighted, in particular, that a meaningful GHG emission reduction can be achieved without relevant plant modifications, even if this can lead to an increase in ammonia and total nitrogen (TN) concentrations in the treated effluent [23].

In this work, DR was applied to wastewater treatment, considering several alternative solutions to improve WWTP energy consumption, with a positive expected outcome on the plant economic balance. A multi-decisional modelling approach was employed to evaluate the technical and economic feasibility of the different analyzed scenarios. Following a preliminary study and considering the lack of existing literature, it was decided to focus on compressed air tank installation to reduce economic expenses for aeration. The tank is filled during low energy demand periods (off-peak), pre-compressing the air for utilization during higher demand (peak load) periods. Recently, compressed air energy systems (CAES) have gained attention, due to their grea<sup>t</sup> power range and high energy density, making them an available solution in those contexts where the traditional storage technologies, such as pumped hydroelectric energy storage (PHES), cannot be implemented.

Recent research aimed at improving CAES round-trip efficiency through isothermal processes [24]. In [25], a way to decrease the energy dependency in CAES was investigated, taking advantage of transient flow. Differently from typical utilization of CAES, that includes a power production regulation purpose, as proposed in [26], in the present study the exploitation of a compressed air storage (CAS) system as an oxygen buffer in the wastewater treatment process is investigated. Literature analysis showed a lack of studies on such a dual usage of a CAS system; moreover, the proposed approach helps WWTPs to move toward smart energy systems, increasing the number of outputs from a single source, as suggested by [27].

Considering this general framework, an effort towards a reduction in energy costs in WWTPs is needed. As far as is known by the authors, this is the first study proposing compressed air introduction in WWTPs following DR principles to diminish operating costs for aeration, leading to a significant economic saving in a simple and practical way. The results can be useful for WWTP managing authorities, as well as for researchers. Two main scenarios were investigated in this work. The first scenario will consider the impact of the simple introduction of CAS in the plant, while the second one will forecast the integration of the self-made electricity by the biogas (produced in the AD process) into the compressed air system. The second identified scenario, in accordance with [24], allows higher renewable energy use, contributing to the sustainability perspective. The operating parameters, including plant potentiality (in terms of treated flowrate), influent characteristics (COD concentration), compressed air tank pressure and volume, were considered to evaluate the technical and economic convenience of the proposed solution to reduce WWTP operating costs. The paper is structured as follows. In Section 2, a framework describing the interaction between treatments, costs, and variables is proposed and the related design optimization model is explained. Results are reported in Section 3 for the two investigated scenarios, while discussion follows in Section 4 and conclusions are drawn in Section 5.
