Dynamic energy performance assessment using a digital shadow for sludge incineration in wastewater treatment plants Authors: Behrouz Adibimanesh, Sylwia Polesek-Karczewska, Paulina Hercel, Atieh Khodadadi, Sanja Lazarova-Molnar Published: 2026 ABSTRACT AbstractThe rapid growth of the global economy and rising energy costs have underscored the need for efficient energy utilization across various sectors. To address this, we developed a novel data-informed digital shadow framework, enhancing energy management within a closed-loop control system, particularly in wastewater treatment facilities. Our approach centers on reducing biogas consumption in the fluidized bed reactor, a crucial component of the incineration process. The digital shadow simulates the entire incineration section by extracting model parameters for key components, including the furnace, dryer, mixer, and heat exchangers, from both physical models and operational data. System-level simulation was performed in AnyLogic software, integrating analytical calculations with data from positioning sensors. The model was informed by operational plant data and validated against historical system data. Evaluation of five operating scenarios demonstrated the capability of the digital shadow to capture system behavior and support operational decision-making. The evaluation of dynamic energy performance identified the most effective scenario, achieving a 40% reduction in biogas consumption while maintaining furnace operation within the temperature range specified by European standards. These findings demonstrate the effectiveness of the digital shadow approach and highlight its potential to deliver substantial annual cost savings in wastewater sludge incineration systems.Keywords: Digital shadow, Dynamic system, Energy performance, Simulation, AnylogicSubject terms: Energy science and technology, Engineering, Environmental sciences Introduction Population and economic growth are driving a rapid surge in global energy demand. Worldwide energy consumption in the industrial sector is projected to grow at an average annual rate of 1.4%1. Uncertainty over fossil fuel reserves and rising energy costs have raised energy security concerns2. At the same time, adopting green energy and reducing waste are vital for sustainability3. Consequently, improving energy efficiency is now a key strategy to cut emissions, boost security, and enhance production performance2. In response, the Fourth Industrial Revolution emphasizes smart systems that enable energy sustainability through the full digitization and integration of industrial value chains4. Energy efficiency in industrial systems is a critical aspect of modern manufacturing and production processes, aiming to reduce energy consumption while maintaining or enhancing productivity5. The drive towards energy-efficient industrial systems encompasses a wide range of practices, including the optimization of manufacturing processes6, the adoption of energy-efficient technologies7, and the implementation of energy management systems8. However, achieving higher levels of energy efficiency in industrial systems is not without its challenges. These challenges include the high initial cost of implementing energy-efficient technologies, the changes in existing systems, and a lack of understanding of the long-term benefits of energy efficiency. To effectively address these challenges, researchers recommend adopting a data-driven approach9. Among the various energy-intensive processes in wastewater treatment, sludge management remains a significant contributor to overall energy consumption. One very often used method for reducing the volume and hazardous nature of sewage sludge is incineration. This process particularly popular in regions where land availability is limited, environmental regulations are strict, and energy recovery is prioritized. The primary reasons for sludge incineration include substantial volume reduction, elimination of pathogens and harmful organic compounds, and the minimization of landfill use. Incineration facilitates more efficient waste utilization and offers potential for energy recovery by further combustion process. However, this process also poses challenges, such as high operational costs, stringent emission regulations, and the need for careful handling of residual ash. With regard to wastewater treatment systems, there are a few works suggesting solutions for lowering energy consumption. These include traditional approaches such as statistical analysis and numerical modeling, as well as advanced methodologies incorporating artificial intelligence (AI) and machine learning (ML) techniques. The work of Sun et al.10 gathers the technologies and methods used for energy saving in wastewater treatment plants. It highlights the challenges of the wastewater treatment industry and the benefits of energy recovery technologies, especially those based on green energy. The authors discuss various solutions. One of them is renewable sources applications, e.g. solar and wind energy, heat pumps, biomass, etc. in order to support the wastewater treatment plant (WWTP) energetic demands. Another widely discussed aspect in this article is the WWTP processes evaluation, control, and optimisation. Sludge treatment is a process of sludge stabilisation, reduction, and harmless treatment. Next, the disposal includes sludge landfill, land use, composting, and thermochemical treatment technologies. This paper summaries the methods for energy consumption reduction at almost every step of the whole wastewater utilisation process. Another work of Di Fraia et al.11 developed a method to define energy performance indicators, related to the overall energy consumption, and then couple the indicators with removal efficiency. The analysis is based on the assumption that in order to improve pollutants removal, additional, more sophisticated processes are needed, and therefore energy consumption might increase. Therefore, the authors decided to analyse not only energy consumption but its consumption in relation to the efficiency of the WWTP in terms of water cleaning. A large database of data from about 300 wastewater treatment plants, gathered from various sources, was used for the analysis. The authors tested their models with the existing wastewater plant in Italy and demonstrated that their approach can be useful for assessing potential energy-saving solutions. The work of Al-Dahidi et al.12 presents a comprehensive approach for assessing the feasibility of waste heat recovery (WHR) in wastewater treatment plants (WWTPs) with two main objectives. First, an artificial neural network (ANN) model is developed to predict WHR potential based on operational data. Second, an economic analysis is conducted, focusing on the integration of organic rankine cycle (ORC) and seasonal thermal energy storage systems. While the study highlights the benefits of WHR systems in WWTPs, including energy efficiency, cost savings, and environmental improvements, it does not address the integration of advanced control strategies for optimizing ORC performance under varying operating conditions. Yu et al.13 use statistical regression methods for analyzing the possibilities of controlling and reducing energy consumption of municipal wastewater treatment plants. The authors based on a dataset of daily records gathered within one year, including the energy consumption of unit chemical oxygen demand, which was a measure of energy consumption for pollutants’ removal. Using Bayesian semi-parametic quantile regression, the authors concluded that the most influential parameters in terms of energy consumption are chromium concentration and wastewater temperature. Ding et al.14 presented a controlled object model for municipal solid waste incineration (MSWI). The model details the MSWI process flow, dividing the incinerator into distinct regions and constructing material and energy balance equations for each subsystem. It consists of three main parts: the analysis of the MSWI process based on a grate incinerator, the division of solid and gas phases to develop material balance equations, and the deduction of energy transfer processes using thermodynamic principles. The model was validated using data from an MSWI plant in Beijing, China. Although the model provides a solid foundation for MSWI process control, it does not address the system’s optimal performance or operating point. Although many approaches have been developed to enhance energy efficiency in wastewater treatment plants, issues such as optimizing complex processes, forecasting system behavior under varying conditions, and applying advanced control strategies continue to pose significant challenges. This is where digital twin (DT) technology offers a transformative approach by providing real-time virtual representations of physical systems. The term “digital twin” was originally introduced by Grieves in 2002 at the University of Michigan15. As we illustrated in Fig. 1, a DT comprises three essential components. Firstly, DT involves a real-world entity, which could be anything from a single machine to a complete factory. Secondly, DT contains a data-driven simulation model which includes algorithms that define the simulation, along with machine learning and data mining techniques to extract the model from data, and the software that implements these algorithms. Additionally, DT encompasses connectivity elements such as IoT (Internet of Things) systems. Lastly, the DT incorporates data that the real-world entity has produced or is producing. Data is a critical aspect that significantly affects the achievement of the digital modeling goal effectiveness9. Constituent parts of a digital twin in a manufacturing system16. DT can be also utilized for monitoring and improving energy efficiency in industrial systems, offering significant potential for optimization. DTs actively assist industries in understanding and modeling the energy consumption behavior of systems, analyzing the system regarding different scenarios, optimizing processes to reduce energy consumption, and predicting and comparing the impacts of each change before implementation in the real system. Although DTs are extensively utilized in numerous fields, research specifically addressing their role in energy management within different industrial systems is still not widespread. As a result, we undertook a comprehensive literature review centered on the application of simulation techniques for improving energy efficiency in industrial systems. Generally, simulation models can be constructed following one of these approaches: discrete event simulation (DES), agent-based simulation (ABS), continuous or system dynamics (SD), and hybrid simulation (HS). Among these approaches, System Dynamics (SD), contrary to DES technique, stands out for its ability to model continuous processes and dynamic behaviors over time, making it particularly effective for analyzing complex, evolving industrial systems17. These models are often used to simulate and enhance the energy efficiency of the processes that evolve continuously, such as chemical reactions in a plant or the flow of materials in a manufacturing process. A recent review by Wang et al.18 synthesizes the current state of digital twin applications in wastewater treatment technology, highlighting their potential to enhance operational efficiency, predictive maintenance, and decision-making across various facets of WWTPs and sewage networks. Their work underscores the growing interest in integrating digital twins into wastewater infrastructure, providing a comprehensive overview of existing research and applications. In a related study, numerical modeling combined with real-time monitoring was applied to optimize the aeration system in a wastewater treatment plant, achieving an estimated 20% improvement in energy efficiency. The study demonstrated that predictive modeling and dynamic adjustment strategies can significantly enhance energy management and support more effective plant operation planning19. Harrou et al.20 conducted a study focused on developing short-term forecasting models for energy consumption in wastewater treatment plants using data-driven soft sensors. They compared traditional time-series methods with deep learning approaches. The results showed that adaptive models enhance the accuracy of energy consumption forecasts. This improvement supports more effective operational and environmental planning. Canete et al.21 proposed an adaptive neural-network-based soft sensor to predict effluent characteristics in wastewater treatment, coupled with a genetic algorithm for optimized control. The approach was tested on a large-scale activated sludge simulation model. It demonstrated reduced operational costs, compliance with legal effluent constraints, and potential for real-time implementation with improved control over biological processes. The SD has also been applied to model and manage waste treatment systems, focusing on the interaction of economic, social, and environmental variables. For example, a hybrid framework combining SD with multi-objective optimization has been developed to enhance decision-making in waste-to-energy management22. It achieved significant environmental and financial improvements over traditional simulation approaches. Cheng et al.23 proposed a SD model to evaluate the economic potential of using landfill gas for waste leachate evaporation at a regional incineration plant in Chengdu, China. By comparing two scenarios with varying leachate evaporation and landfill gas utilization ratios, they identified an optimal scenario that improved economic performance by 35%. This scenario offered a promising alternative treatment method with potential environmental benefits. However, the model’s limitations, such as unaddressed environmental impacts and economic assumptions, were acknowledged. Another work developed an SD model to optimize municipal solid waste management by analyzing resource use, waste treatment options, and cost structures24. The findings suggest that increasing waste sorting efforts and operational productivity can lead to improved financial outcomes. This adaptable model offers valuable insights for decision-making in diverse regions, as demonstrated through a case study in Brazil, where it helped reduce reliance on landfills. Digital twin technology has been applied to simulate energy consumption and flow in simplified systems. However, its potential extends to modeling energy flow in closed-loop control systems, offering substantial opportunities for advancement. With this, it can support the optimization of wastewater sludge management through thermal treatment methods. These involve the sludge incineration, which is a well-established technology. With its major advantages as the significant reduction in the input sludge volume, and the destruction of toxic organic compounds and pathogens due to high process temperature, as well as odour minimization25,26 is considered a good option, despite the high costs it entails to ensure an effective and environmentally safe combustion process. These consist of the energy-expensive costs of dewatering, drying and auxiliary fuel27 and high costs that have to be incurred for the efficient exhaust gas purification systems28. Since sewage sludge management and processing is said to contribute up to 50% of the total cost of wastewater treatment28, an increased drive has been observed to reduce the energy consumption through sludge energy recovery within the system for its drying or for generating electricity29,30. Chang et al.31 reported that, as far as the incineration of dried sludge is considered, the recovered energy is close to the amount of energy used in the process, although the authors pointed out that available data on energy consumption and recovery are limited. Guided by the comprehensive overview of the state of the art, to our best knowledge, sludge incineration as a widespread technology, but demanding in terms of specific process requirements, has not lived up to the DT based optimization models. Recently, Song et al.32 considered smoldering as a potential technology for high-water content sewage sludge treatment due to low energy consumption and cost, as well as simple operation. They developed a digital twin system based on the back propagation neural network model to predict the characteristics of sewage sludge smoldering, while aiming at improving process velocity, and reducing the concentrations of CO/NOx emissions. Though the authors obtained a satisfactory agreement between predictions and experimental data, they pointed out to the method limitations. These include the necessity of developing a hybrid modeling approach, integrating a universal smoldering mechanism with the data-driven method to preserve data training efficiency, as well as the need for adjustment and optimization of the parameters when scaling up the system. It should be noted that, depending on the degree of data integration between physical and digital entities, the literature distinguishes digital twins into three subcategories: digital model, digital shadow and digital twin. In this classification, a Digital Model relies on manual data exchange, a Digital Shadow enables automated one-way data flow from the physical system to the digital representation, and a digital twin requires bidirectional integration between the digital and physical domain33. This interpretation is consistent with Torfs et al.34, who emphasize that a digital twin should maintain an automated live connection to the real entity and evolve continuously with it over time. In this study, we present a data-informed digital shadow framework integrated with analytical solutions developed using in-house codes. This model is designed to simulate energy consumption in a closed-loop control system, specifically tailored for wastewater treatment facilities, including the sewage sludge incineration, which is of interest in the present study. Given that the system is continuous, we implemented system dynamics (SD) to model the processes accurately. One of the key challenges when simulating a coupled continuous system is accounting for circular dependencies to avoid system lock-ups. Our approach directly addresses this issue, marking a significant step forward in the practical deployment of plant-informed simulation environments. This study presents a novel application of a digital-shadow-based framework for dynamic system analysis of a wastewater treatment subsystem. Unlike traditional modeling, the digital twin framework developed in this work allows for dynamic plant-informed simulation of the physical system. By using operational plant data and simulating various operational scenarios, the DT method shows how different parameters (biogas flow as auxiliary fuel, moisture content in the sludge, combustion air temperature and flow) influence WWTP sludge incineration system performance. This information helps with guiding decision-making toward sustainable configurations, higher efficiency and cost savings. The novelty lies not only in the integration of digital shadow within a closed-loop WWTP system but also in the demonstration of how digital simulations can actively drive system improvements, enhancing operational efficiency, resource recovery, and environmental compliance. Description of a closed-loop incineration system of WWTP This case study builds upon the findings of the previous study detailed in paper35, extending the research and applying its methodologies to the incineration system operated in the wastewater treatment plant, which processes an average of 4000 kg/h of dewatered sludge. Initially, raw wastewater undergoes screening and homogenization, followed by aerobic and anaerobic bio-treatment to eliminate contaminants. Subsequently, the water treatment process involves mechanical dewatering and compaction of sewage sludge (SS) using membrane presses and centrifuges, before entering the incineration system. In the present study, the focus is on the sewage sludge incineration system of the WWTP. It must comply with European standards that are regulated under Directive 2010/75/UE on Industrial Emissions (modernized version of Directive 2010/76/UE), which defines strict technical requirements, operational conditions and emission limits for waste incineration, in accordance with the BAT (best available techniques) guidelines. This primarily includes the incineration temperature, which is regulated to a minimum of 850C (and must be maintained for at least 2 seconds) to ensure the destruction of hazardous compounds (dioxins and furans). A simplified configuration of the sewage sludge incineration system of the WWTP is considered to investigate the energy consumption of the system (Fig. 2). It comprises a rotary dryer, a fluidized bed furnace (FBF), a condenser, a bag filter, a scrubber, a mixer, and three heat exchangers (HEX1, HEX2, HEX3). The process begins with the super-heated steam in the rotary dryer absorbing moisture from the sludge. The pre-dried sludge is incinerated in the FBF, and the resulting fumes are used to heat steam in HEX1. Excess steam is then expelled to the condenser. Airflow, temperature, and composition are regulated by a mixer before entering HEX2. The flue gas is subsequently routed to HEX3 to preheat the combustion air for the fluidized bed, and the exhaust heats the ambient air in HEX3 before passing through the bag filter and scrubber, reducing hazardous material concentrations before release into the environment. Biogas generated in the anaerobic digestion part of a wastewater treatment plant is injected into the fluidized bed when bed temperature drops. This drop is typically caused by high moisture content or operational fluctuations, and the biogas injection helps to stabilize combustion. Simplified diagram of the analyzed sewage sludge incineration system of the WWTP. Methodology The methodology involves a multi-step process, incorporating data collection, analytical calculations using in-house codes written in Fortran and Python, and simulation modeling in AnyLogic. Schematic explanation of the procedure is presented in Fig. 3. In the first step, analytical calculations of flue gas composition and temperature of combustion were conducted. Then, the obtained information, together with the gathered measurement data were used for the further calculations. The simulation of the wastewater treatment plant was conducted using AnyLogic software, with the main objective of predicting the reactor temperature over a 24-h period. The model was then validated with the use of the real data gathered in the system of the wastewater treatment plant. The system operating data included the sludge flow rate, biogas flow rate, sludge moisture content, air temperature, steam temperature at the inlet and outlet of heat exchanger No. 3, temperatures of flue gases at the inlets and outlets of heat exchangers 1, 2 and 3. The available dataset covered a 24-h period only, as access to longer-term operational records was restricted by data-access and security constraints associated with the wastewater treatment plant. Although a longer dataset would enable a more comprehensive assessment under a wider range of operating conditions, the present study uses the available data as an initial basis for model development and proof-of-concept validation. Graphical explanation of the performed analysis. Analytical calculations In addition to the acquired data, it was necessary to estimate additional parameters, such as flue gas composition, and combustion temperature, and their influence on the furnace temperature. In the first step, the gas composition and combustion temperature were calculated for three moisture contents of sludge (20%, 30%, and 40%) and three recirculation rates (20%, 30%, and 40%). For each combination of moisture and recirculation rate, the analysis was performed for ten λ (excess-air ratio) values ranging from 1.14 up to 2.38. Then, based on the obtained data, a linear regression model was used in order to estimate a function for the furnace temperature. Flue gas stream: chemical calculations To determine the amount of flue gas and composition, chemical calculations were performed considering a global reaction of combustion of sewage sludge. A general empirical formula of for the sludge was assumed with , , , defined based on the chemical sludge composition. The combustion with air excess was taken into account with the resulting flue gas composed of the basic compounds such as , , and , according to the reaction: where n denotes the number of moles and λ is the excess air ratio which is expressed by: In the above, AFR represents air-to-fuel ratio, and stand for the mass of oxidizer and dry sewage sludge, respectively. The resulting flow rate of flue gases was determined from the mass balance equation: where represents the mass rate of ash. Knowing the chemical composition of the fuel (sludge), based on the above equations, the amount of , , , and , and the flue gas stream were calculated for various configurations of moisture, recirculation rate and excess air ratio. Combustion temperature In the sewage sludge combustion system, part of the exhaust gas is recirculated back to the combustion chamber. This is mainly to control the process temperature and keep it at the required level that prevents emissions. To simulate the process with flue gas recirculation the computation method involved two steps. In the first one, the combustion temperature for the process stage with no recirculation was determined as the initial process temperature for the next step. Here, the energy balance for the furnace chamber includes the input energy of: (i) dry sewage sludge (), (ii) moisture contained in the sludge (), (iii) oxidizer () and (iv) sludge chemical energy (), and the outflow thermal energy of: (v) flue gas (), (vi) steam () and (vii) removed ash (), and is written as where In the above, stands for the mass flow rate, c is the specific heat, whereas T represents temperature, h is the specific enthalpy, is the mass fraction of moisture in the sludge at the inlet to the furnace and is the mass fraction of i-th gas component. Subscripts , , and represent ash, flue gas, and water/steam, respectively. The quantity is the higher heating value of the sludge. Superscript in stands for the inlet parameter value. The enthalpies of compounds were determined using the RefProp database36. To calculate the combustion temperature sought, the iteration method was applied. Based on the parameters obtained at the first step, for the set flow rate of a recirculated flue gas , the composition of an oxidizing gas mixture supplied to the furnace chamber and the resulting flue gas composition were calculated, according to the system of mass balance equations: where out refers to the outlet flue gas stream from the combustion system. The combustion temperature was then recalculated, solving iteratively the modified energy balance for the recirculation-type system, formulated as: where and represent the energy of recirculated and the remaining (outlet) flue gas streams, respectively: which allowed to calculate the temperature of combustion, needed for the next step of the analysis. Following the stoichiometric calculations, five factors influencing the furnace temperature were established: sludge flow rate (), sludge moisture content (), mixed air flow rate () and temperature (), and the recirculation rate (R). The regression model was fitted using 90 data points generated from the analytical thermochemical calculations. The regression structure was selected systematically as a second-order polynomial including linear, quadratic, and two-factor interaction terms in order to capture the nonlinear and coupled effects of the operating variables on furnace temperature. The resulting equation should therefore be interpreted as a computationally efficient metamodel of the analytical thermochemical calculations rather than as a direct first-principles combustion model. Based on this regression structure, an equation for calculating the furnace temperature as a function of these five factors was derived in Python: Values of coefficients can be found in the Appendix. In the further step, the determined function was implemented into the AnyLogic software in order to simulate the wastewater treatment system work in various conditions. Dynamic simulation in AnyLogic Systems of ordinary differential equations and partial differential equations serve as mathematical frameworks, extensively applied in scientific and engineering fields for dynamic system modeling37,38. A governing equation describes the relationships among variables, such as temperature or chemical concentration, representing state variables in a dynamic system. The equations are derived from general empirical observations and specific hypotheses, such as the first law of thermodynamics. However, in real-world systems, formulating governing equations becomes challenging due to the complexity of the system and the simultaneous occurrence of multiple phenomena, leading to uncertainties in existing principles. With advancements in sensor technology, it is now possible to sample data from dynamic systems, opening doors for extracting insights into their physical behavior. This has sparked increased interest in recent years in creating data-driven techniques to uncover the governing equations behind these dynamic systems39. Comprehending the behavior of dynamic systems through data is an important scientific and practical problem, particularly in engineering where testing many scenarios during prototyping is necessary. In the present study, the dynamic behavior of the model is represented through time-varying operational data introduced into the AnyLogic simulation over the 24-h period, with recorded plant values updated at 1-min intervals. At each simulation step, the measured inputs are used to update the coupled mass- and energy-balance calculations of the furnace, mixer, dryer, and heat exchangers. Because the system is thermally and operationally interconnected, the calculated state of each component influences the simulation of the overall system at the subsequent time step. In this way, changes in one part of the process propagate through the interconnected components over time. The model therefore represents a dynamically coupled process simulation driven by time-dependent plant data, rather than a fully mechanistic transient model with explicit delay or storage-state equations for each unit. Modeling in AnyLogic The procedure of the simulation is presented on the scheme in Fig. 4. To initiate the modeling process in AnyLogic, our primary objective is to determine the heat transfer occurring within heat exchanger 1 (HEX1). This involves calculating the mass flow rate of steam entering the heat exchanger. Leveraging recorded data for the inlet and outlet temperatures of HEX1, we can compute the heat transferred between the flue gas and steam () utilizing the equation: where denotes the mass flow rate of steam, and and represent the enthalpies of the steam at the inlet and outlet of HEX1, respectively. Diagram of the simulation procedure. To model the enthalpy of steam within the simulation, a linear correlation has been established based on the properties of water at atmospheric pressure h=2.0514 T+2465.740. The assumption of negligible pressure drop is considered in this correlation. It allows for a simplified yet accurate estimation of enthalpy values without the need for direct table lookup. In the subsequent step, the mass flow rate of the flue gas is determined by utilising the heat transfer in the heat exchanger. Assuming a constant specific heat for the flue gas (), and considering the temperature differences between the outlet and inlet of the flue gas, the mass flow rate of the flue gas can be calculated from: Moving to the next stage in HEX2, heat transferred in heat exchanger 2 is determined by utilising the previously obtained mass flow rate of the flue gas. By considering the temperatures of the flue gas at the inlet and outlet of HEX2, the heat flow can be calculated using the equation: Next, the mass flow of the mixed air passing through HEX2 and entering the furnace is determined. Initially, the volume flow rate of the mixed air is recorded. To obtain the density of the mixed air, an assumption is made that the temperature of the mixed air falls within the range of 200 to 300 C. With this assumption, the dynamic parameter of mass flow is obtained by multiplying the density of the mixed air with the recorded volume flow rate: Within the mixer, a portion of the flue gas from HEX3 is combined with the ambient air preheated in HEX3, forming the mixed air stream that enters HEX2. With the known mass flow rates of the mixed air and the flue gas, and considering the recirculation percentage of the flue gas obtained through analytical solution employing the mass conservative equation, the mass flow rate of the ambient air can be determined from the relationship: Further, the temperature of the supplied air after HEX3 is determined using the equation: utilizing the thermal output of HEX3 calculated for the known mass flow rate of the flue gas and the inlet and outlet temperatures, given as: and assuming the ambient temperature () of the air in September at the water treatment plant location is approximately 14 C. When returning to the mixer, the temperature of the mixed air entering HEX2 is determined. With the known mass flow rate of the mixed air, the mass flow rate of the preheated ambient air along with its temperature after HEX3, the mass flow rate of the flue gas, and the recirculation percentage, energy conservation in the mixer allows for the calculation of the temperature of the mixed air using the equation: Moving forward to HEX2, the temperature of the mixed air exiting HEX2 and directed to the furnace is determined. Utilising the heat transferred in HEX2, along with the known mass flow rate of the mixed air and its temperature at the inlet of HEX2, the temperature at the outlet of HEX2 can be calculated using the equation: Finally, as described in the previous subsection, the linear regression analysis of analytical results was performed and utilised. This regression model takes into account key parameters, such as the mass of sludge and moisture, recirculation percentage, air flow rate, air temperature, and the amount of biogas. By inputting these functions into the regression model, we obtain an estimated temperature of the flue gas. Results and discussion Model validation In our validation process, we meticulously compared the simulated furnace temperature with historical sensor data, specifically focusing on observations from the 1st of September 2021, as depicted in Fig. 5. The analysis is based on a 24-h dataset. It includes daily fluctuations in inflow rate, temperature, and sludge characteristics. These short-term dynamics are critical for evaluating the immediate responsiveness and stability of the simulation model. Although access to longer-term operational data was limited by plant data restrictions, we acknowledge that an extended dataset would enable a more comprehensive validation across varying operational scenarios, such as seasonal changes or maintenance cycles. Nonetheless, the 24-h data serves as an initial basis for validating the short-term dynamic behavior of the model. By running the simulation model under conditions mirroring those of the historical period, we sought to ensure its accuracy in replicating real-world dynamics. Comparison of measured and simulated reactor temperature. The comparison revealed a reasonable alignment between the simulated and measured reactor temperatures, indicating that our simulation model captures the essential behavior of the system. This was supported by quantitative metrics such as mean squared error (MSE), mean absolute error (MAE), and the coefficient of determination (R-squared). With an MSE of 331.53, an MAE of 11.78, and an R-squared value of 0.71, the model was able to reasonably reproduce the observed trends and provided meaningful insights into the system’s dynamics. The most noticeable deviations, particularly around 04:00, 06:00, 13:00, and 19:00, coincide with intervals of biogas injection into the furnace. These periods are associated with rapid thermal adjustments in the system, which the current model captures only approximately. This suggests that the dynamic response to auxiliary fuel injection could be represented more accurately in future work. While not fully capturing all variations, this level of correspondence suggests that the simulation offers a useful first-order representation of the system for the purposes of analysis and proof-of-concept assessment. Furnace output Figures 6, 7 and 8 show relations between various parameters of the fluidized bed furnace. Furnace temperature in relation to excess air fuel ratio is shown in Fig. 6. Obviously, the decrease in the excess air ratio is inseparably connected with the temperature increase. The two plots, however, show a slight variation in temperature with the change in moisture content (Fig. 6a) and the recirculation rate (Fig. 6b) for a given excess air ratio. In the first case, representing the case of a recirculation rate at the level of 30%, the decrease in moisture content from 40 to 20% corresponds to a slight temperature increase (of about 30 degrees) for a high excess air ratio (of 2.2). With a decreasing excess air ratio, the decreasing moisture causes even more temperature growth. The influence of the recirculation rate is very similar. Recirculation decreasing from 40 to 20% results in a slight increase in temperature. This effect is more pronounced at lower excess air ratios. Furnace temperature under different conditions: (a) influence of moisture content and excess air ratio (recirculation rate 30%), (b) influence of recirculation rate and excess air ratio (moisture content 30%); Sludge flow 4 tons/h. Influence of recirculation rate and excess air ratio on: (a) CO2 concentration, (b) O2 concentration; (Operating conditions: sludge flow 4 tons/h, moisture content 30%). Influence of moisture content and excess air ratio on: (a) CO2 concentration, (b) H2O concentration; (operating conditions: sludge flow 4 tons/h, recirculation rate 30%). Figure 7 shows the influence of recirculation rate and excess air ratio on and concentration. As expected, concentration (Fig. 7a) is increasing with the decrease in the excess air ratio. Simultaneously, concentration (Fig. 7b) is increasing with an increase in the excess air ratio. Recirculation seems to have a very small or no influence on both and concentrations in the investigated range. Finally, Fig. 8 displays the influence of moisture and excess air ratio on and concentrations. It seems that moisture has either a very small or no influence on the concentration (Fig. 8a). However, when it comes to concentration (Fig. 8b), it obviously increases with an increase in the moisture content in the sludge. Scenario simulation The Pearson correlation analysis was conducted to investigate the relationships between various operational parameters, such as: sludge flow, recirculation rate, biogas flow, mixed air temperature, mixed air flow, moisture and furnace temperature. It should be noted that Pearson correlation captures only linear pairwise relationships and does not account for nonlinear interactions, causal dependencies, or potential confounding effects between variables. Therefore, the results should be interpreted as indication and possible trend and not a rigorous sensitivity or influence analysis. The correlation coefficients shown on the heatmap in Fig. 9 provide insight into the strength and direction of linear relationships between these parameters. Pearson correlation. Starting from the negative correlations, the value of the Pearson correlation coefficient for the recirculation rate and the moisture of the sludge indicated that an increase in the recirculation rate is justified for processing the sludge with a lower moisture content. This correlation is evident owing to the fact of achieving higher combustion temperatures for less-moisturized fuels. A negative correlation is also observed between sludge moisture and furnace temperature and mixed air flow . These values, suggesting a weak, although not yet negligible relation, show that lower moisture levels in the sludge contribute to higher process temperatures, and thus are associated with an increased need for combustion air to provide the required temperature level. The positive correlation between recirculation rate and mixed air flow of very high value shows strong linear dependence between these two. This obviously indicates that an increase in recirculation rate, related to its adjustments aimed to maintain optimal conditions within the system, corresponds with an increase in mixed air flow. A strong positive correlation is also shown between the biogas flow and mixed air temperature , suggesting that higher biogas flow rates translate into the elevated temperatures of the mixed air, owing to heat released during biogas combustion and the corresponding flue gas temperature rise. Another strong positive correlation coefficient was obtained for sludge feeding rate and sludge moisture , which clearly illustrates an increase of moisture in the system as the amount of sludge fed increases. Moreover, the moderate positive correlation between biogas flow and furnace temperature suggests that as the biogas flow increases, the furnace temperature also tends to increase. Similarly to the mixed air temperature, this relationship can be explained by the fact that higher biogas flow can enhance combustion efficiency, and in consequence raise the furnace temperature. This interrelation is also expressed through the positive moderate value of the correlation coefficient between furnace temperature and mixed air temperature . Following this analysis, different scenarios in AnyLogic were considered based on the manipulation of the most influencing factors: biogas flow, sludge moisture, mixed air temperature and mixed air flow. Scenario analysis In order to find the best solution for energy-saving in a wastewater treatment plant, the basic scenario, and five other proposed scenarios were simulated and compared. Each scenario characterised with different biogas flow rate, sludge moisture, mixed air temperature, and mixed air flow. These parameters were selected based on the Pearson correlation analysis described above. Based on the analysed options, the best proposed solution was selected. The basic scenario is a simulation of the process with the same working conditions, as for the recorded data, used for both input data, and later the validation of the model. Further analysis includes 5 scenarios with parameters with parameters changed from the baseline (reference) scenario. The other proposed scenarios focus on reducing the costs and efficiency of the wastewater treatment plant with the optimisation of the biogas amount used in order to enhance the decomposition processes in the fluidized bed furnace. Since the reduction of the biogas flow rate causes the temperature drop in the furnace, the aim here was to find an optimal solution, where the biogas consumption is lowered, but the temperature in the furnace is kept above 850C, which is required for the correct and complete combustion, and satisfies the relevant regulations that involve the best available techniques (BAT) in the incineration of sewage sludge41. The daily fluctuations of biogas consumption in the real case scenario is presented in Fig. 10. Daily fluctuations in biogas consumption fed into the furnace. Multi-factor scenario The change in the parameters for each proposed scenario is gathered in Table 1. The values are expressed in the percentage increase or decrease of the initial value of the parameter in the basic (reference) scenario, since the values varied in time in the 24 h period. The simulated temperature changes during this time are presented in Figures 11 and 12. The red lines represent temperatures over 850C, while the blue lines, below this value. Green areas indicate time periods, where the biogas was injected into the furnace in order to keep the required temperature level. The time in which the biogas was injected is the same for the basic scenario, and all of the other scenarios. The difference is the lower flow rate of the injected biogas, and therefore, lower total consumption. Table 1Scenario simulation plan (up and down arrows denote increase or decrease of the parameter).SchemeBiogas flowSludge moistureMixed air temperatureMixed air flowScenario 130% ⇓5% ⇑20% ⇑10% ⇑Scenario 230% ⇓30% ⇓5% ⇓10% ⇑Scenario 340% ⇓35% ⇓10% ⇓15% ⇑Scenario 440% ⇓40% ⇓10% ⇓20% ⇑Scenario 545% ⇓40% ⇓20% ⇓15% ⇑ Scenario simulation plan (up and down arrows denote increase or decrease of the parameter). Furnace temperature variation for different scenarios. Furnace temperature variation for optimal scenario - scenario 4. The results across various scenarios show that in order to choose the favorable operating case involves a trade-off between the unacceptable operation duration and total biogas consumption. The unacceptable operation duration is the total time (within simulated 24 h), in which the temperature in the furnace dropped below 850C, which is the minimum combustion temperature demanded by European regulations. The basic scenario demonstrates 421 min of unacceptable operation duration and of biogas consumption. Scenario 1 assumed the decrease of 30% of biogas flow, and an increase in sludge moisture (5%), mixed air temperature (20%), and mixed air flow (10%), see Table 1. These changes resulted in a slightly increased unacceptable operation duration of 448 min, but with a significantly reduced biogas consumption of . For Scenario 2 it was also proposed to decrease the biogas flow by 30%, while the sludge moisture decreased by 30%, the mixed air temperature decreased by 5%, and the mixed air flow increased by 10%. This solution shows an improvement with a decreased unacceptable operation duration of 317 min, maintaining the biogas consumption at . Next, scenario 3, assumes a 40% decrease in biogas flow, a 35% decrease in sludge moisture, a 10% decrease in the mixed air temperature, and a 15% increase in mixed air flow. This continues the trend with further reduced unacceptable operation duration of 351 min, while biogas consumption lowered to . Scenario 4, by further decreasing the sludge moisture and inreasing the mixed air flow, presents an even more optimized performance, achieving 281 min of unacceptable operation duration and of biogas consumption. Finally, scenario 5 attempts to further reduce biogas consumption (45% decrease). While showing the highest unacceptable operation duration of 449 min, scenario 5 achieves the lowest biogas consumption at . This showed that a further decrease in biogas flow causes the drop of the furnace temperature below the accepted level. Therefore, the best proposed scenario is scenario 4, which allows for both the reduction of the unacceptable operation duration and the biogas consumption. The biogas consumption was decreased by 40% when compared with the real-life case, and the unacceptable operation time decreased from 421 min to 281 min per day, which is 33% less. At the same time, the average fluidized bed temperature for scenario 4 is 867C, while for the basic scenario, it is 5 degrees lower (Fig. 13). Comparison of operational metrics. Conclusions and final remarks The study covers the analysis of a sewage sludge incineration system of the wastewater treatment plant and searches for possibilities of reducing costs and finding energy savings solutions for the existing real-life system. This work successfully demonstrated the development and implementation of a real-time digital twin for energy optimization in wastewater treatment, specifically targeting biogas consumption in the incineration process. By combining physical modeling, real-time data integration, and simulation in AnyLogic, we achieved a dynamic and accurate representation of the fluidized bed reactor and related components. However, it should be noted that the model validation was performed using a single 24-h high-resolution dataset. Unfortunately, it is the only complete dataset available for this study. While this dataset captures daily variability, it does not reflect longer-term fluctuations such as seasonal effects, variations in sludge characteristics, or operational disturbances. Therefore, the presented results should be interpreted as a proof-of-concept demonstration rather than a fully validated industrial solution. Five different scenarios with varying conditions were analysed using the developed model and the best solution predicted a 40% decrease in biogas consumption compared to real-life data (from 273 down to 164 ). Simultaneously, the duration of low-temperature combustion processes was reduced from 421 to 281 min per day. It should be noted that, in the context of sludge incineration, maintaining temperatures above critical thresholds (e.g., 850 C) is essential. Therefore, model accuracy near this threshold is of particular importance and requires further investigation in future work. This solution indicates the potential for significant resource savings and improved efficiency of the WTTP’s energy use. However, to achieve this, the sludge moisture needs to be decreased by 40%. Since drying is an energy-consuming process, this must be considered to ensure the net benefits align with the plant’s energy optimization goals. This is an important direction for further research to support the development and extension of the presented study. In particular, a comprehensive energy balance of the system, including sludge dewatering, drying processes, and their energetic interaction with the incineration system, is required to properly assess the overall energy performance. Such an approach would allow evaluation of whether the reduction in biogas consumption corresponds to a net energy benefit or a shift in energy demand between process stages. However, the findings presented here underscore the potential of digital twin technology to significantly enhance energy efficiency, reduce operational costs, and contribute to more sustainable industrial processes. The model presented in this work demonstrates the potential of a scenario-analysis framework for similar systems. It can be used as a great tool for analysing many possible solutions and alignments of the interrelating conditions and parameters of the system, reducing the need for expensive or time-consuming testing methods. The model can be easily adjusted and continuously updated with real-time data, while maintaining its accuracy and relevance over time. This adaptability is a key feature of digital twin technology, by making the model a base component for developing a digital twin of the system that enables dynamic monitoring, predictive analysis, and helps in decision making in a virtual environment mirroring real operations. Future work should focus on extended validation using longer and more diverse datasets, including different operating conditions, to assess model robustness. In particular, further analysis of residuals, potential bias, and model performance near critical operating thresholds will be necessary to support reliable real-time decision-making in industrial applications. Acknowledgements The author would like to express sincere gratitude to the Helmholtz Information and Data Science Academy (HIDA) for providing financial support, enabling a short-term research stay at Karlsruhe Institute of Technology to gain expertise in Digital Twin technology and dynamic simulation within the systems, data, simulation and energy (SYDSEN) research group. The author also acknowledges AnyLogic for providing the University Researcher version of their simulation software, which was instrumental in developing and validating the Digital Twin models presented in this study. List of symbols Mass flow rate, kg/s Temperature, K Energy flux, W Excess air ratio Subscripts and superscripts Air Ambient, fresh Chemical Dry Flue gas Furnace Heat exchanger Inlet Mixed Outlet Oxidizer Recirculated Steam Sewage sludge Acronyms Digital twin Heat exchanger Waste heat recovery Wastewater treatment plant Appendix CoefficientValue 67.399069 − 0.010030 − 0.286220 0.064924 2.714628 48.050224 3918.999760 51.002435 161.145341 0.000116 16.180075 − 0.320674 0.000011 − 0.009688 3528.291102 − 690.424030 0.064924 48.050224 51.002435 0.000116 − 0.320674 − 0.040971 − 2.526874 0.247516 240.928215 Author contributions CRediT authorship contribution statement Behrouz Adibimanesh writing-original draft, conceptualization, software, methodology, investigation, validation, visualization, formal analysis, resources. Sylwia Polesek-Karczewska writing-original draft, writing—review and editing, resources, formal analysis. Paulina Hercel Writing-original draft, writing—review and editing, visualization. Atieh Khodadadi writing—review and editing, investigation, re-sources,visualization. Sanja Lazarova-Molnar supervision, funding acquisition, investigation, writing—review and editing, resources. Funding Open Access funding enabled and organized by Projekt DEAL. This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. Data availability The data that support the findings of this study are available from the corresponding author upon reasonable request. Declarations Competing interest The authors assert that no potential competing financial interests or personal relationships are appeared to affect this study. The authors declare no competing interests. Declaration of generative AI and AI-assisted technologies in the writing process During the preparation of this work, the authors used ChatGPT to assist with enhancing grammar and improving writing clarity. After using this tool/service, the authors reviewed and edited the content as needed and take(s) full responsibility for the content of the published article. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Contributor Information Behrouz Adibimanesh, Email: b.adibimanesh@imp.gda.pl. Atieh Khodadadi, Email: atieh.khodadadi@kit.edu. References Associated Data Data Availability Statement The data that support the findings of this study are available from the corresponding author upon reasonable request.