The escalating energy demands of municipal wastewater treatment plants (WWTPs) necessitate innovative approaches for sustainable operation. This research presents a comprehensive thermo-economic optimization framework for retrofitting conventional activated sludge systems into integrated anaerobic digestion-biogas combined heat and power (CHP) configurations. A dual-objective optimization strategy was developed to simultaneously maximize system exergy efficiency and minimize payback period, addressing both thermodynamic performance and economic viability. Seven decision variables were selected including hydraulic retention time (HRT), organic loading rate (OLR), digestion temperature, CHP engine specifications (number and capacity), and amine-based biogas purification parameters (mass flow rate and concentration). Non-dominated Sorting Genetic Algorithm II (NSGA-II) generated 25 Pareto-optimal solutions, with LINMAP method selecting the optimal configuration. Application to Kashan WWTP (200, 000 person-equivalent capacity) revealed optimal parameters of HRT=18. 2 days, OLR=3. 5 kg VS/m 3 ·day, and digestion temperature=36. 5°C with three 250-kW biogas engines. The optimized system achieved 19. 8% exergy efficiency and 4. 06-year payback period, producing 2, 847 m 3 /day biogas upgraded to 96. 8% methane purity, generating 750 kW electrical and 420 kW thermal power. Economic analysis confirmed viability with net present value of 825, 272, internal rate of return of 13. 1%, and levelized cost of energy at 0. 089/kWh. Environmental benefits included 1, 247 tons annual CO 2 -equivalent emission reductions (64% reduction) and 74% electrical self-sufficiency. Sensitivity analysis demonstrated robust resilience under 30% capital cost increases. Comparative analysis revealed superior performance over single-objective approaches: exergy maximization achieved 23. 7% efficiency but extended payback to 6. 8 years, while economic optimization reduced payback to 3. 2 years but compromised exergy efficiency to 15. 4%. This research establishes the first comprehensive exergy-based optimization framework for WWTP retrofitting, integrating seven operational and design variables across three subsystems (anaerobic digestion, biogas upgrading, and CHP) with amine-based purification, advancing beyond previous three-variable biogas quantity optimization approaches. • Novel exergy-based optimization outperforms biogas quantity methods in WWTP CHP retrofit • NSGA-II optimizes seven variables: HRT, OLR, digestion temperature, CHP configuration • Achieved 19. 8% exergy efficiency with 4. 06-year payback for 200, 000 PE capacity plant • Generated 750 kW electrical power and 1, 247 tons annual CO 2 emission reduction • LINMAP selection enables 74% energy self-sufficiency in municipal wastewater treatment
Sanaye et al. (Sun,) studied this question.