# Optimal control of waste recovery process

Othman Cherkaoui-Dekkaki, Walid Djema, Nadia Raissi, Jean-Luc Gouzé, Noha El Khattabi

► To cite this version:

Othman Cherkaoui-Dekkaki, Walid Djema, Nadia Raissi, Jean-Luc Gouzé, Noha El Khattabi. Optimal control of waste recovery process. International Journal of Dynamics and Control, 2024, 10.1007/s40435-024-01484-7. hal-04711930

HAL Id: hal-04711930

https://inria.hal.science/hal-04711930v1

Submitted on 27 Sep 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Optimal control of waste recovery process

Othman Cherkaoui-Dekkaki¹*, Walid Djema², Nadia Raissi¹,
Jean-Luc Gouzé³, Noha El Khattabi¹

¹Department of Mathematics, LAMA Lab, Faculty of Sciences, Mohammed V University in Rabat, Morocco.

²Centre Inria d'Université Côte d'Azur, UniCA, Inria, BIOCORE project-team, Valbonne, France.

³Centre Inria d'Université Côte d'Azur, UniCA, INRAe, MACBES project-team, France.

*Corresponding author. E-mail: othman.dekkaki@um5r.ac.ma;

## Abstract

As society transitions away from fossil fuels towards renewable energy sources, finding alternatives that are reliable becomes imperative. Waste-to-energy bioprocesses are promising options due to their ability to operate independently of weather conditions or time of day, making them sustainable and potentially lucrative solutions. This paper proposes an updated bioeconomic model, based on previous research [10, 11], to analyze investment in waste-to-energy technology and its associated valorization of waste treatment. This conceptual model represents a generic framework for studying waste-to-energy processes. By taking technological constraints into account, the updated model aims to optimize energy production processes and establish a sustainable business model. Indeed, using dynamic modeling, investment and valorization strategies will be evaluated through a maximization criterion over a finite time horizon, which is stated as an optimal control problem. The effective control strategies are then determined using the Pontryagin's Maximum Principle. Furthermore, direct optimization methods are applied to derive and validate the effectiveness of the obtained optimal strategy. This approach allows for a thorough evaluation of the economic and environmental impacts in waste-to-energy technologies, identifying optimal investment and valorization strategies to promote sustainable waste management practices. In addition, a sensitivity analysis is conducted to evaluate the robustness of the studied model, and provide insights into biotechnological limitations. Finally, an extensive numerical exploration of the turnpike-like features that characterize the optimal long-term behavior of the investment problem is widely discussed.

**Keywords:** Optimal Control, Pontryagin principle, Bioeconomic modeling, Direct optimization, Sensitivity Analysis, Turnpike.

## 1 Introduction

As the world faces increasing environmental challenges, the need for sustainable waste management and innovative solutions, such as waste-to-energy systems, is more urgent than ever. These systems can significantly reduce waste production and its harmful effects on the planet, making waste recycling a crucial global priority. With landfill sites nearing capacity, it is evident that investments in modern landfill infrastructure and advanced technology are necessary. Additionally, reliable and consistent energy sources are required to achieve a sustainable future driven by renewable energy.

Moreover, population growth results in a significant rise in energy demand and waste generation. The conversion of waste into energy offers a viable alternative to the heavy dependence
on fossil fuels, which are highly polluting [33]. However, many initiatives aimed at promoting cleaner energy sources have limited impact due to their business models not being competitive with traditional fossil fuels. Therefore, improving the evaluation and optimization of these bioeconomic models for producing cost-effective alternative energy is essential for enhancing their profitability (see, e.g., [20, 30] and references therein).

Waste-to-energy processes provide a promising solution, addressing the challenges of waste management while generating clean energy for households and businesses. Despite the clear environmental benefits, current production levels are insufficient to meet global energy needs. Nevertheless, investment in waste treatment projects is increasing due to the rising costs of untreated waste storage, driven by stricter environmental policies (see, e.g., [2]). Thus, there is a growing need to better control, improve, and optimize the waste transformation process to make it more economically viable.

Household waste presents a substantial, untapped energy potential through various waste-to-energy systems. Among these, incineration is a widely used method in which waste is burned to produce heat, which is then used to generate steam, drive turbines, and produce electricity. In contrast, anaerobic digestion employs microorganisms to break down waste into biogas, comprising methane and carbon dioxide, which can be used for both heat and power generation. The energy recovered is primarily in the form of heat, biofuels, or electricity. The literature distinguishes two main types of energy recovery<fnref n="1" />:

1. Biogas recovery from household waste storage facilities and industrial anaerobic digesters [2].

2. Thermal treatment: incineration or co-incineration, gasification, and pyrolysis (heating biomass in the absence of oxygen) [27].

Additionally, ongoing research explores alternative processes such as pyrolysis and gasification, which involve heating waste in the absence of oxygen to produce syngas and bio-oil, respectively. Replacing fossil fuels with energy derived from household waste can significantly reduce greenhouse gas emissions, promoting a more sustainable energy landscape. Ensuring thorough consideration of environmental and public health concerns, along with optimizing system efficiency and financial viability, requires careful regulation of the energy recovery process. Specifically, the incineration process with energy recovery converts the heat from burning waste into pressurized steam, which is then used to generate electricity for local heating networks or neighboring industries. On the other hand, biogas from the fermentation of organic waste in landfills or industrial digesters can be used as electricity, heat, or biofuel. This biogas is mainly used to power vehicles running on natural gas and can supply the natural gas network if produced in sufficient quantities.

The literature shows a broad scientific focus on various technical recovery processes (combustion, anaerobic digestion, etc.; see e.g., [4, 12, 35, 39]). Typically, models focus on the technical aspects of the biological and physical processes involved in waste transformation, involving sets of biochemical reactions (for mechanistic models; see also, e.g., [4] for machine learning-based approaches), without considering the overall economic viability of the transformation processes.

Control theory offers a robust approach to addressing this limitation, providing tools for investigating fundamental system properties and optimizing bioprocesses. Numerous studies highlight the need for optimization in biological and biotechnological systems, including identification of bioprocess models, sensitivity and stability analysis, stabilization, and control ([19, 23, 25, 32]), with applications such as bioreactor control [29], anaerobic digestion [34], wastewater treatment [26], gene expression, and cancer [1, 17]. Additionally, many studies have underscored the importance of optimization in biological and biotechnological systems ([3, 6, 43]).

The application of sensitivity analysis and the identification of turnpike features have become pivotal in various fields, offering valuable insights for decision-makers and investors alike. Sensitivity analysis, as elucidated by Zamir et al. [44] and Van Henten [41], plays a crucial role in assessing the robustness of models, providing reassurance to stakeholders, particularly investors. This method enables a comprehensive examination of how variations in parameters affect outcomes, thereby enhancing the reliability and credibility of proposed

<footnote n="1">¹Adapted from Fnaude reports: French National Federation of Depollution and Environmental Activities.</footnote>
strategies.

Moreover, the identification of turnpike features, as explored by Trélat and Zuazua [40], Caillau et al. [9], and Djema et al. [18], holds significant implications for long-term investment strategies. By signaling the resilience of such strategies and minimizing the necessity for frequent policy adjustments, the turnpike property becomes a cornerstone for sustainable and efficient decision-making processes.

In this paper, we introduce a comprehensive bioeconomic model designed to emphasize the profitability of the entire waste transformation chain, including storage, processing, and valorization. Our model offers a thorough evaluation of the economic feasibility of waste-to-energy systems by avoiding the replication of specific valorization technologies and comparing diverse investment and valorization strategies using a common maximization criterion. This approach, which extends previous work [10, 11], adapts investment and valorization quotas to the state variable at each iteration. By employing optimal control techniques, specifically an optimal control problem (OCP), our model aims to maximize revenue from energy sales while minimizing production and treatment costs and constraining investment expenses. Examining the resulting OCP using Pontryagin's maximum principle (PMP; [36]), a key concept in optimal control theory. PMP is a powerful tool for solving OCPs involving dynamic systems with constraints on controls and state variables (see, e.g., [14, 22, 28, 36, 42]), have demonstrated their significant efficiency in addressing similar dynamic optimization problems in the biotechnological field, such as biogas production [21], microbial strains selection [16, 18], and microbial metabolite production [9]; and it is also widely used in the context of economic and bioeconomic optimization problems: [5, 13, 28, 37, 38]. A direct optimization method is also employed to describe and validate the optimal control strategies fully. This method involves iteratively updating control variables until the optimal solution is achieved, allowing for precise characterization of optimal control strategies and validating the proposed strategies' effectiveness. Through this direct optimization method, the study provides a comprehensive analysis of optimal control strategies for waste-to-energy systems, with the goal of maximizing profitability while minimizing costs. Additionally, the sensitivity analysis for the studied OCP is applied to investigate the robustness of the model and gain insight into the impact of parameter fluctuations on the control policy and overall profitability. This analysis forms an important step in validating the effectiveness and applicability of the developed optimal control strategies to offer useful guidance for decision-makers and stakeholders. Identifying the turnpike feature is especially valuable, signaling that long-run policies are credible and need much less frequent adjustments. This highlights the tendency for optimal policy to stay near a steady-state trajectory over a considerably long time horizon.

This paper is structured as follows. Sect. 2 formulates a comprehensive mathematical model incorporating various bioeconomic features. Sect. 3 presents the general optimal control problem (OCP). Sect. 4 provides PMP analysis of the stated OCP and discusses the existence of a singular curve along the optimal solutions. Sect. 5 numerically shows the tendencies of the optimal control using direct optimization through Julia-language and JuMP interface, considering different features arising from the PMP analysis. Sect. 6 employs sensitivity analysis to assess the impact of model parameters on the OCP strategies. Finally, Sect. 7 concludes the investigation by numerically exploring the turnpike feature, shedding light on the long-term behavior of optimal policies.

## 2 The mathematical model

Our aim is to develop a dynamic waste-to-energy system that takes into account the main stages of waste management, namely landfill and then waste treatment. The model presented focuses not only on efficiency in terms of energy production, but also takes into account the economic aspect of the activity. It is based on the model previously studied in [10, 11], but provides a more generic framework. Despite the fact that the model's design emphasizes generality, without alignment on any particular process, the approach is of significant value in enriching our intellectual and conceptual understanding of waste-to-energy conversion.

The valorization units, represented by the variable $K(t)$, denote the physical and possibly human capital invested in the activity. This capital depreciates at a constant rate $\gamma \in [0, 1]$.
over time, while it grows through the investment function $I(t)$, fostering the development of the valorization activity [31]. Firstly, the steps of waste collection, sorting, and transport, which occur before the waste-to-energy conversion process, are referred to as "upstream" steps. These initial stages are critical in generating the waste stream $\omega(t) \ge 0$, which serves as input for the subsequent transformation process. As waste $x(t)$ accumulates in landfills, it undergoes various natural and physical processes, including biodegradation$^2$. The biodegradation rate $\beta \in [0, 1]$ represents the fraction of waste lost per unit of time. Within the landfill, a valorization quota $q(t) \in [0, q_{max}]$ is applied to the available waste stock $x(t)$. This quota determines the portion of waste allocated for processing in the valorization units. Consequently, this allocation results in the removal of $q(t)K(t)x(t)$ from the waste stock $x(t)$ at time $t \ge 0$, representing the harvested waste ready for transformation. In the final phase, energy $E(t)$ is produced through the utilization of waste or harvested material in the processing units $K(t)$. The rate of this waste-to-energy conversion is represented by $\mu > 0$, which determines the overall efficiency of the process. Over time, the generated energy $E(t)$ depreciates at a constant rate $\alpha \in [0, 1]$. Additionally, a fraction of the generated energy, quantified as $\alpha_K K(t)$ with $\alpha_K \ge 0$, is used by the valorization units to operate at their maximum capacity.

Therefore, the process's dynamics can be mathematically represented by the following system:

$$ egin{cases} 
\dot{x}(t) = \omega(t) - (\beta + q(t)K(t))x(t), \\ 
\dot{K}(t) = I(t) - \gamma K(t), \\ 
\dot{E}(t) = \mu q(t)K(t)x(t) - \alpha E(t) - \alpha_K K(t). 
\end{cases} 
\quad (1) $$

With $(x_0, K_0, E_0)$ a given non-negative initial condition. To summarize, the variables and parameters in the system are defined as follows:

* $x: [0, T] \to [0, +\infty[$, an absolute continuous function, represents the cumulative quantity of waste at time $t$.

* $K: [0, T] \to [0, +\infty[$, an absolute continuous function, defines the capital dedicated to the activity at time $t$, which includes physical and possibly human capital.

* $E: [0, T] \to \mathbb{R}$, an absolute continuous function, represents the cumulative quantity of energy produced up to time $t$.

* $q: [0, T] \to [0, q_{max}]$, measurable a.e., defines the quota of recovered waste.

* $I: [0, T] \to [0, I_{max}]$, measurable a.e., defines the investment in the valorization activity.

* $\omega \in \mathcal{L}^1([0, T], \mathbb{R}^+)$, represent the waste streams entering the landfill at time $t$.

* $\beta \in [0, 1]$, biodegradation rate of waste.

* $\alpha \in [0, 1]$, rate of energy depreciation.

* $\gamma \in [0, 1]$, rate of capital depreciation.

* $\mu > 0$, proportional conversion rate of waste to energy.

* $\alpha_K \ge 0$, rate of energy redeployment by the valorization units.

* $T \ge 0$, the finite time horizon designating the end of the operating period in the landfill.

**Remark 1.** The mathematical model described by System (1) builds upon recent work in the bio-economy field, such as [10, 11]. In those earlier models, the waste stock $x$ and capital $K$ are interconnected, with their interaction primarily driven by energy dynamics. Our model advances this approach by introducing a time-variant waste stream $\omega(t)$, which provides a more realistic representation of the waste inflow. Additionally, we incorporate the conversion rate $\mu$, which determines the efficiency of waste-to-energy conversion. Furthermore, we incorporate the redeployment of energy, captured by the parameter $\alpha_K$, to reflect the utilization of generated energy within the valorization units. These enhancements enable a more comprehensive and accurate depiction of the waste-to-energy conversion process.

<footnote>$^2$Biodegradation is the natural breakdown of organic matter by microorganisms, which reduces the waste's mass or volume over time.</footnote>
### 3 Statement of the general OCP

Let $T > 0$ be the finite time horizon designating the end of the operating period in the landfill. This one is stipulated in the agreement between local authorities and investors. However, the possibility of an infinite end time can be considered in the future, when our focus shifts from profit maximization to a more sustainable approach toward the activity.

The instantaneous energy yield $E(t)$ is assumed to be sold at a constant unit price denoted as $p$, while also considering an actualization rate of $\delta$, a constant unit production cost of $c$, and a cost of investment. Thus the OCP of interest reads,

* The set of admissible controls associated with system (1) is defined by,

$$ \mathcal{I} = \{I : [0, T] \to [0, I_{\max}] \text{ measurable, } I(\cdot) \in [0, I_{\max}] \text{ a.e.}\} $$

$$ \mathcal{Q} = \{q : [0, T] \to [0, q_{\max}] \text{ measurable, } q(\cdot) \in [0, q_{\max}] \text{ a.e.}\} $$

where $I_{\max} > 0$ is the maximum possible amount of instantaneous investment, and $q_{\max} > 0$ is the maximum speed of waste recovery.

* Find admissible controls $(I, q)$ maximizing,

$$ J := \int_{0}^{T} e^{-\delta t} \mathcal{J}(t) dt, \qquad (2) $$

where,

$$ \mathcal{J}(t) = pE(t) - cq(t)K(t)x(t) - I(t)(c_1 + c_2I(t)), \qquad (3) $$

over a finite fixed-time horizon $[0, T]$.

The OCP can be seen as follows. The investment problem lies in selecting the optimal control strategy $(I, q)$, aiming to maximize the net profit derived from energy sales while at the same time constraining costs to remain below a predefined threshold.

In particular, our aim is to dynamically manage the costs associated with waste treatment and investment, ensuring they do not exceed potential profit margins. Valuable insights on this topic can be found in [31, 37].

Furthermore, considering a quadratic cost model, as mentioned in [10, 11, 31], appears to be a practical approach. This model is expressed as $I(t)(c_1 + c_2I(t))$, where $c_1$ and $c_2$ denote the costs associated with installation and maintenance investments, respectively.

**Proposition 1.** For each admissible control $u = (I, q)$ and any nonnegative initial condition $\xi_0 = (x_0, K_0, E_0)$, there exist a unique solution $\xi = (x, K, E)$ of the system (1) defined on the interval $[0, T]$. Furthermore, each trajectory is bounded.

*Proof.* The existence and uniqueness of the state variables corresponding to a given control solution of the system (1) are ensured by the Carathéodory property of non-autonomous ODEs (See, [24]). Specifically, consider the ODE

$$ \dot{\xi} = g(t, \xi, u) = (\omega(t) - (\beta + qK)x, I - \gamma K, \mu q K x - \alpha E - \alpha_K K). $$

The function $g: [0, T] \times \mathbb{R}^3 \times \mathbb{R}_+^2 \to \mathbb{R}^3$ satisfies the following properties:

* $g(t, \xi, u)$ is measurable in $t$ for fixed $\xi$ and $u$. ($\omega$ along with the admissible controls are measurable in $t$ a.e.)

* $g(t, \xi, u)$ is continuous in $\xi$ for fixed $t$ and $u$.

* For each fixed $u$, there exist $r \in \mathbb{R}$, such that:

$$ \exists h_r(t) \in \mathcal{L}^1([0, T], \mathbb{R}^+) \text{ such that } \|g(t, \xi, u)\| \le h_r(t) (1 + \|\xi\|) \text{ for all } \|\xi\| \le r \text{ and almost every } t. $$

Moreover,

$$ h_r(t) = \max \{\omega(t), \beta, \gamma, \alpha, \alpha_K, qr, \mu qr\} $$

This function $h_r(t)$ bounds the coefficients and control terms, ensuring that:

$$ \|g(t, \xi, u)\| \le h_r(t) (1 + \|\xi\|). $$
Thus, g is a Carathéodory function.

Next Step is proving that the trajectories are bounded. Indeed, for all $t \in [0, T]$ a.e., we have $\dot{K}(t) = I(t) - \gamma K(t)$, then $-\gamma K(t) \le \dot{K}(t) \le I_{\max}$, after a simple integration for the right side, and a simple comparison criteria for the left side, we get

$$0 \le K_0 \exp(-\gamma t) \le K(t) \le T I_{\max} + K_0.$$

Similarly, we prove that

$$0 \le x_0 \exp(-\int_0^t (\beta + q(s)K(s))ds) \le x(t) \le T \int_0^T \omega(t)dt + x_0 < +\infty,$$

Finally, To analyze the dynamics of E we consider the differential equation:

$$\dot{E}(t) = \mu q(t) K(t) x(t) - \alpha E(t) - \alpha_K K(t).$$

This is a first-order linear ODE with an inhomogeneous term $\mu q(t)K(t)x(t) - \alpha_K K(t)$. Given that $q(t)$, $K(t)$, and $x(t)$ are bounded, the solution for $E(t)$ can be expressed as:

$$E(t) = E(0)e^{-\alpha t} + \int_0^t (\mu q(s) K(s) x(s) - \alpha_K K(s)) e^{-\alpha(t-s)} ds,$$

Since all terms inside the integral are bounded and $\alpha > 0$, the exponential factor $e^{-\alpha(t-s)}$ ensures that the integral converges. Therefore, $E(t)$ will remain bounded. $\square$

**Proposition 2.** There exists at least one optimal control for the studied OCP.

*Proof.* We denote by $\xi = (x, K, E)$ the state variable and $u = (I, q)$ the control variable. Firstly, the vector field $f(\xi, u) = (\omega - (\beta + qK)x, I - \gamma K, \mu q K x - \alpha E - \alpha_K K)$ is linear with respect to $u$ and $C^{\infty}$ with respect to $\xi$. For each admissible control, there exist a bounded trajectory for the system (1) (See Proposition 1). Moreover, The control has its values in the set $U = [0, I_{\max}] \times [0, q_{\max}]$ that is convex and compact in $\mathbb{R}^2$. Furthermore, the integrand $L$ is linear with respect to $q$ and quadratic with respect to $I$, yielding the concavity of the integrand. Thus, the existence theorem ((OC2) stated in [14], section 23, Part IV) applies. $\square$

# 4 Pontryagin's maximum principle (PMP)

The utilization of the current-value Hamiltonian emerges as particularly advantageous in scenarios where the objective function integrates an actualization rate $\delta$. This approach holds promise, notably in eliminating exponential terms $e^{-\delta t}$ and the dependence on time $t$ in (2).

Let $H$ be the current-value Hamiltonian (as described in [28], Sect. 8 of Part II) which corresponds to the OCP studied, utilizing the system's dynamics and criterion (2),

$$H = pE - cqxK - I(c_1 + c_2I) + \lambda_1[\omega - (\beta + qK)x] + \lambda_2[I - \gamma K] + \lambda_3[\mu qxK - \alpha E - \alpha_K K], \quad (4)$$

or, equivalently,

$$H = h(X, \Lambda) + \tilde{h}xKq + h^{\dagger}(I), \quad (5)$$

where,

* $\tilde{h}(X, \Lambda) = pE + \lambda_1(w - \beta x) - \lambda_2\gamma K - \lambda_3\alpha E - \lambda_3\alpha_K K$

* $\tilde{h} = -c - \lambda_1 + \mu\lambda_3$

* $h^{\dagger}(I) = -I(c_1 + c_2I) + \lambda_2 I$

Here, $\lambda = (\lambda_1, \lambda_2, \lambda_3)$ represents the pseudo-co-state-vector. It is noteworthy that the pseudo-costates $\lambda_1, \lambda_2$, and $\lambda_3$ are slightly different from the conventional formulation of the costates
$\lambda_x$, $\lambda_K$, and $\lambda_E$ (see, [28]). This is because they adhere to the following dynamics:

$$ egin{cases} 
\dot{\lambda}_1 = \delta\lambda_1 - \frac{\partial H}{\partial x} = (\delta + \beta)\lambda_1 - \tilde{h}Kq, \\
\dot{\lambda}_2 = \delta\lambda_2 - \frac{\partial H}{\partial K} = (\delta + \gamma)\lambda_2 - \tilde{h}xq + \lambda_3\alpha_K, \\
\dot{\lambda}_3 = \delta\lambda_3 - \frac{\partial H}{\partial E} = (\delta + \alpha)\lambda_3 - p.
\end{cases} 
\quad (6) $$

In addition, since in the studied OCP, the final-state is free, the transversality conditions are given by,

$$ \lambda_i(T) = 0, \quad \forall i = 1, 2, 3. \quad (7) $$

Moreover, the PMP maximization condition implies that the admissible controls satisfy, for almost all $t \in [0, T]$

$$ (I(t), q(t)) \in \underset{I(t) \in [0, I_{\max}]; q(t) \in [0, q_{\max}]}{\operatorname{argmax}} H, \quad (8) $$

Since the controls are bounded (for further details, see [28], Sect. 10 of Part II), the maximization condition (8), we can use the Karush-Kuhn-Tucker conditions, resulting in the formulation of a Lagrangian:

$$ L = H + W_1(t)I(t) + W_2(t)(I_{\max} - I(t)) + W_3(t)q(t) + W_4(t)(q_{\max} - q(t)), $$

where $W_i(t) \ge 0$ are Lagrange multipliers. These multipliers satisfy the following conditions at the optimal values $I^*(t)$ and $q^*(t)$

* $W_1(t)I(t) = 0$ and $W_2(t)(I_{\max} - I(t)) = 0$ at the optimal $I^*(t)$.

* $W_3(t)q(t) = 0$ and $W_4(t)(q_{\max} - q(t)) = 0$ at the optimal $q^*(t)$.

To characterize $(I^*(t), q^*(t))$, we analyze the necessary optimality condition,

* The optimal control $I^*(t)$,

$$ \frac{\partial L}{\partial I} = \frac{\partial H}{\partial I} + W_1(t) - W_2(t) = \lambda_2(t) - c_1 - 2c_2I(t) + W_1(t) - W_2(t) = 0. $$

* The optimal control $q^*(t)$,

$$ \frac{\partial L}{\partial q} = \frac{\partial H}{\partial q} + W_3(t) - W_4(t) = \tilde{h}xk + W_3(t) - W_4(t) = 0. $$

Using standard optimality arguments, the optimal controls are characterized in the proposition 3.

**Proposition 3.** For almost all $t \in [0, T]$, where $T > 0$ is a fixed finite time horizon.

* The optimal control $I^*(t)$ satisfies,

$$ I^*(t) = \begin{cases} 0, & \text{if } \lambda_2(t) \le c_1, \\ \min\left\{\frac{\lambda_2(t)-c_1}{2c_2}, I_{\max}\right\}, & \text{if } \lambda_2(t) > c_1. \end{cases} \quad (9) $$

* The optimal control $q^*(t)$ satisfies,

$$ q^*(t) = \begin{cases} q_{\max}, & \text{if } \tilde{h} > 0, \\ 0, & \text{if } \tilde{h} < 0, \\ q_s(t), & \text{if } \tilde{h} \equiv 0, \text{ over } [t_1, t_2], t_1 < t_2, \end{cases} \quad (10) $$

where we recall that, $\tilde{h} = -c - \lambda_1 + \mu\lambda_3$.
Considering the derivative of the Hamiltonian with respect to $q$, which is expressed as:

$$ \frac{\partial H}{\partial q} = \tilde{h}xK. $$

It is evident that $xK \ge 0$, which prompts us to shift our focus towards analyzing the characteristics of $\tilde{h}$.

Furthermore, the behaviors of $\tilde{h}$ align closely with those explored in Proposition (4).

$$ \sigma = \tilde{h}xK. \qquad (11) $$

**Proposition 4.** The optimal control $q^*$ exhibits a pure bang-bang behavior (i.e. the optimal control does not have a singular phase $q_s$) if at least one of these conditions is not satisfied:

* $\alpha = \beta$, the energy depreciation, and the biodegradation are at the same rate.

* the cost of production $c$ reaches a critical value denoted $c_r$

$$ c = c_r = \frac{\mu}{\delta + \alpha}p. \qquad (12) $$

*Proof.* Given equation (10), it is observed that within the general framework, a singular arc denoted as $q_s$ may occur over a time interval not reduced to one point. We aim to investigate the validity of this claim, which refers to the possibility of a singular phase $q_s$ being present in the optimal control $q^*$. To achieve this, we assume that the singular arc $q_s(t)$ occurs over an interval $I = [t_1, t_2]$, where $t_1 < t_2$. That is, i.e.,

$$ \tilde{h}(t) = 0 \iff -c - \lambda_1(t) + \mu\lambda_3(t) = 0, \quad \forall t \in [t_1, t_2]. \qquad (13) $$

Thus, if $\tilde{h} \equiv 0$ over $I$, then its first derivative also satisfies, $\dot{\tilde{h}}(t) = 0$, i.e., $-\dot{\lambda}_1(t) + \mu\dot{\lambda}_3(t) = 0$, which gives,

$$ -(\delta + \beta)\lambda_1 + \mu(\delta + \alpha)\lambda_3 - \mu p = 0, \qquad (14) $$

Next, the second derivative of $\tilde{h}$ satisfies the equality:

$$ \ddot{\tilde{h}} = -(\delta + \beta)^2 \lambda_1 + \mu(\delta + \alpha)^2 \lambda_3 - \mu(\delta + \alpha)p = 0, \qquad (15) $$

which does not explicitly contain the control $q$. Through a process of successive derivation, we end up with, for all $n \ge 1$

$$ \tilde{h}^{(n)} = -(\delta + \beta)^n \lambda_1 + \mu(\delta + \alpha)^n \lambda_3 - \mu(\delta + \alpha)^{n-1} p = 0, \qquad (16) $$

which do not involve $q$.

Consequently, $\lambda_1$ and $\lambda_3$ must satisfy over the singular arc of $q$ the systems of $(n+1)$-linear equations:

$$ \left\{ \begin{array}{l} 0 = -\lambda_1 + \mu\lambda_3 - c, \\ 0 = -(\delta + \beta)\lambda_1 + \mu(\delta + \alpha)\lambda_3 - \mu p, \\ \dots\dots\dots\dots \\ 0 = -(\delta + \beta)^n\lambda_1 + \mu(\delta + \alpha)^n\lambda_3 - \mu(\delta + \alpha)^{n-1}p. \end{array} \right. $$

* **Case 1:** if $\alpha \neq \beta$, then the existence of a singular arc is ruled out. Indeed, when, $(\delta+\alpha)^n \neq (\delta+\beta)^n$, for all $n \ge 1$, leads to an overdetermined and inconsistent system of $(n+1)$-linear equations.

* **Case 2:** if $\alpha = \beta$ then the previous system reduces to,

$$ \left\{ \begin{array}{l} 0 = -c - \lambda_1 + \mu\lambda_3, \\ 0 = -\lambda_1 + \mu\lambda_3 - \frac{\mu}{\delta + \alpha}p, \end{array} \right. \qquad (17) $$

which is an exact determined system of linear equations, leading to, a special cost threshold

$$ c = c_r = \frac{\mu}{\delta + \alpha}p. $$
Thus, we conclude that the optimal control $q^*$ cannot have a singular phase if either one of the conditions (12) or $\alpha = \beta$ does not hold. $\square$

Furthermore, in the final stage of the optimization process, the trends of the co-state variables are provided by the transversality conditions (7). By utilizing the maximization condition expressed in (9) and (10), we can deduce that the optimal control $q^*$ and $I^*$ vanish near the end of the activity. In other words, at $T$ we get,

* Since $\lambda_2(T) = 0 \le c_1$, then there exists an $\varepsilon_1 > 0$ s.t. the optimal control $I^*$ activated over $[T - \varepsilon_1, T]$ is a bang-0, i.e.,

$$ \exists \varepsilon_1 > 0, \text{ s.t., } I^*(t) = 0, \text{ for } t \in [T - \varepsilon_1, T]. \quad (18) $$

* Since $\lambda_1(T) = 0$ and $\lambda_3(T) = 0$, if follows that $\tilde{h}(T) = -c < 0$. Consequently, there exists an $\varepsilon_2 > 0$ s.t. the optimal control $q$ activated over $[T - \varepsilon_2, T]$ is a bang-0, i.e.,

$$ \exists \varepsilon_2 > 0, \text{ s.t., } q^*(t) = 0, \text{ for } t \in [T - \varepsilon_2, T]. \quad (19) $$

# 5 Numerical results: Highlighting the optimal control features

We employ a direct optimization approach to address the OCP given in Sect. 3, following the methodology detailed in [7, 15]. This approach involves the use of direct numerical methods in the Julia programming language. Specifically, we take advantage of the JuMP interface and the Ipopt optimization package, following the procedures discussed in [15].

By discretizing the control and state variables, we transform the OCP into a finite-dimensional non-linear programming (NLP) problem [15]. In this section, we use a Crank-Nicolson scheme in the JuMP environment to discretize the state and control variables of the model (1), following the approach in [15]. The specific configuration parameters used in JuMP for all examples are shown in Table 1.

<table><caption>**Table 1** Discretization scheme and JuMP settings.</caption><thead><tr><th>Discretization method</th><th>Crank-Nicolson</th></tr></thead><tbody><tr><td>Time steps</td><td>4000</td></tr><tr><td>NLP tolerance</td><td>10<sup>-10</sup></td></tr></tbody></table>

<table><caption>**Table 2** Model parameters and criterion settings</caption><tbody><tr><td>ω</td><td>25</td></tr><tr><td>β</td><td>0.2</td></tr><tr><td>α</td><td>0.2</td></tr><tr><td>γ</td><td>0.2</td></tr><tr><td>δ</td><td>0.05</td></tr><tr><td>μ</td><td>0.8</td></tr><tr><td>p</td><td>1</td></tr><tr><td>c</td><td>1</td></tr><tr><td>c<sub>1</sub></td><td>1</td></tr><tr><td>c<sub>2</sub></td><td>1</td></tr><tr><td>T (final time)</td><td>30</td></tr><tr><td>α<sub>K</sub></td><td>0.2</td></tr></tbody></table>
## 5.1 Example A: Constant waste flow $\omega$

In this subsection, we look at a specific example featuring constant waste flow denoted as $\omega$. Our objective is to examine the trends and behaviors of the optimal control strategies in this scenario.

Figures 3-4 present the optimal control strategies, while Figure 1 illustrates the corresponding optimal trajectories. Furthermore, Figure 2 shows the co-state trajectories, and the resultant pseudo-covector. Notably, it is important to highlight that the pseudo-co-states, denoted as $\lambda_i$ for $i = 1, 2, 3$, satisfy the transversality conditions specified in equation (7) at the final time. Furthermore, the behaviors that align with the maximization conditions outlined in Proposition 1 (in Sect. 4) are visually represented in Figures 3-4.

<figure><img src="image_2.png" /><figcaption>**Fig. 1** The optimal trajectories $x(t)$, $K(t)$ and $E(t)$ in **Example A**, associated with the optimal controls in Figs. 3-4.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>**Fig. 2** On the left: the co-state trajectories obtained via JuMP in **Example A**. On the right: The optimal pseudo co-state trajectories ($\lambda_1, \lambda_2, \lambda_3$) in **Example A**, computed via the current-value Hamiltonian defined in equation (24), are reconstructed using the optimal co-states ($\lambda_x, \lambda_K, \lambda_E$).</figcaption></figure>

Furthermore, the optimal controls shown in Figs. 3-4 adhere to the description provided in Sect. 4 with their *bang-0* final phase in the control structure.

The optimal control $I^*$, as shown in Fig. 3, can be described in three distinct phases over the time interval $[0, T]$. The first phase is a *bang-0*, followed by a turnpike-like behavior, as reported in previous works [9, 18, 40], where $I^*(t)$ remains within the range of $]0, I_{max}]$, and the control stays close to a steady state $\bar{I}$ for most of the time. Finally, the optimal control ends with a *bang-0* phase. This behavior is consistent with the optimal trajectories of $x(t)$ and $K(t)$, as shown in Fig. 1, where a similar turnpike-like behavior is observed.

The optimal control $q^*$ features a *bang-qmax* phase, which represents the most profitable and productive stage for generating energy. The primary objective during this phase is to fill all the K-processing units with the maximum amount of waste possible, i.e., $q(t)x(t)$. This is achieved by driving the control to its upper limit, $q_{max}$, and maintaining it there as long as possible. The longer the waste processing units remain fully utilized, the more energy can be generated.
<figure><img src="image_4.png" /><figcaption>Fig. 3 The optimal control $q^*(t)$ obtained in Example A satisfies the necessary optimality conditions derived from PMP in Sect. 4. Specifically, $q^*(t)$ is bang-$q_{max}$ for all $t \in [0, T]$ where $\bar{h}(t)$ is positive, and bang-$0$ for all $t \in [0, T]$ where $\bar{h}(t)$ is negative, consistent with equation (10). Additionally, as established in Sect. 4, the last control phase is a bang-$0$.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Fig. 4 The optimal control $I^*(t)$ in Example A satisfies the necessary optimality conditions derived from the PMP. The blue line represents $I^*(t)$, which maximizes $h^*(I)$, while the dashed red line represents $(\lambda_2(t)-c_1)/2c_2$ and coincides with $I^*$ when it is positive. The control $I^*$ follows the description in Proposition 1 in Sect. 4, and the last phase is a bang-$0$ as established in the same section.</figcaption></figure>

After the bang-$q_{max}$ phase, a bang-$0$ phase follows towards the end of the process. We believe that this final phase is designed to steer the co-state trajectories toward satisfying the transversality conditions. In other words, it is necessary to ensure that the optimal controls and their associated co-states satisfy certain conditions at the final time, $T$. This ensures that the optimization problem is well-posed and that the optimal solution is unique.

As a result of this optimal control strategy, the energy produced $E(t)$ shows stable growth during the initial phases. This is due to the stable behavior observed in the optimal $x$ and $K$-dynamics, which resemble the turnpike-like phases<fnref n="3" />.

## 5.2 Example B: Waste flow step function $\omega(t)$

Consider a generalized scenario extending from Example A, where the waste flow $\omega(t)$ is represented by a step function (staircase pattern), specifically a piecewise constant function.

The objective of the optimal control problem remains consistent with that of the previous OCP, aiming to maximize the criterion (2)-(3). The model of the system, described by (1), incorporates weighting constants as outlined in Tab. 2. The final time is fixed at $T = 90$. Additionally, the initial conditions for the states are arbitrarily set to $(x^0, K^0, E^0) = (1, 7, 0)$.

Set the waste flow step function $\omega(t)$ as,

$$ \omega(t) = \begin{cases} 15, & \text{if } 0 \le t < 30, \\ 25, & \text{if } 30 \le t < 60, \\ 35, & \text{if } 60 \le t < 90, \end{cases} \qquad (20) $$

The optimal control $q^*$ adopts a bang-bang pattern, consistent with patterns observed in previous examples (refer to Fig. 3). Furthermore, the optimal investment control, $I^*$, exhibits three distinct phases over the interval $[0, T]$. Initially, there is a bang-$0$ phase, succeeded by a turnpike-like behavior, where $I^*(t)$ resides within the interval $]0, T[$ in close proximity to

<footnote n="3">³These turnpike-like phases are characterized by the control remaining close to a steady-state for most of the time, before undergoing a sharp transition towards the end of the process.</footnote>
<figure><img src="image_6.png" /><figcaption>**Fig. 5** The optimal trajectories $x(t)$, $K(t)$ and $E(t)$ in **Example B**, associated with the optimal controls.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>**Fig. 6** On the left: the co-state trajectories obtained via JuMP in **Example B**. On the right: The optimal pseudo co-state trajectories $(\lambda_1, \lambda_2, \lambda_3)$ in **Example B**.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Fig. 7** Left: the optimal control $q^*(t)$ obtained in **Example B** is almost similar to the one obtained in **Example 1**. Right: the optimal control $I^*(t)$ in **Example B** satisfies the necessary optimality conditions derived from the PMP. Furthermore, the fluctuation in waste flow affects the optimal strategy $I^*$, yielding similar tendencies as $\omega(t)$.</figcaption></figure>

a pseudo-steady-state $\bar{I}$ (noting that the value of $\bar{I}$ adjusts with variations in $\omega(t)$). At the end of the activity, the optimal investment ends with another *bang-*$\theta$ phase.

The optimal state trajectories, namely $x(t)$, $K(t)$, and $E(t)$, mirror the step function (staircase) pattern of the waste flow $\omega(t)$. This trend is similarly reflected in the co-state $\lambda_2$ of $K$ due to its explicit dependence on $x$. Consequently, the optimal investment $I^*$ exhibits similar tendencies during its turnpike-like phase.

In summary, the optimal control $q^*$ remains unaffected by changes in the trend of $\omega(t)$. On the other hand, the optimal investment $I^*$ appears to synchronize with the tendencies of $\omega(t)$, following patterns similar to those observed in previous examples. Additionally, the results obtained suggest a turnpike-like behavior in the optimal state trajectories and controls. This prompts us to consider a more thorough characterization of this phenomenon, which will be the focus of Sect. 7.

## 5.3 Example C: Periodic waste flow $\omega(t)$

Instead of a constant or step function pattern considered in earlier examples, we consider a periodic waste flow $\omega(t)$.
Household waste flow exhibits periodic tendencies due to various factors. These include cyclical human consumption patterns, seasonal weather changes affecting organic waste generation, and shifts in lifestyle such as remote work and online shopping. Modeling waste entering landfills can be done using a seasonal function given by:

$$ \omega(t) = \eta \sin^2 \left( t \frac{\pi}{\rho} \right) + \tau, \qquad (21) $$

where $\tau$ is the baseline waste stream recorded in low seasons, and $\eta$ is the maximal increment during high seasons. The period length is $\rho$, with the function $\sin^2(t\frac{\pi}{\rho})$ reflecting seasonal variation, peaking in high seasons and dipping in low seasons.

The objective of the optimal control problem is to maximize the criterion (2)-(3) under considerations similar to those of the previous OCP. We consider the model of system (1) with the weighting constants given in Tab. 2, fix the final time to $T = 30$, and set $\rho = 5$, $\eta = 20$ and $\tau = 15$ as the period, the maximum increment and the baseline waste amount, respectively. The initial conditions of the states are arbitrarily fixed as $(x^0, K^0, E^0) = (1, 7, 0)$.

<figure><img src="image_9.png" /><figcaption>**Fig. 8** The optimal trajectories $x(t)$, $K(t)$ and $E(t)$ in **Example C**, associated with the optimal controls in Fig. 10.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Fig. 9** On the left: the co-state trajectories obtained via JuMP in **Example C**. On the right: The optimal pseudo co-state trajectories $(\lambda_1, \lambda_2, \lambda_3)$ in **Example C**.</figcaption></figure>

The optimal control $q^*$ obtained in this case is a *bang-bang* control, similar to the one obtained in **Example A** (See, Fig. 3). However, the optimal control $I^*$ is different from the previous case. Fig. 4 shows that the control $I^*$ has three distinct phases over $[0, T]$. First, there is a *bang-0* phase, followed by a turnpike-like behavior where $I^*(t) \in ]0, T[$ stays periodically close to a steady-state $\bar{I}$ (note that the value $\bar{I}$ has not changed compared to **Example A**). Finally, another *bang-0* phase occurs over $[T - \epsilon, T]$.

As anticipated, the waste stock $x(t)$ and the energy produced $E(t)$ achieved in **Example C** exhibit a seasonal fluctuation, which is similar to the one observed in the flow of waste entering a landfill $\omega(t)$. However, the waste stock and energy production levels reached in
<figure><img src="image_11.png" /><figcaption>Fig. 10 Left: the optimal control $q^*(t)$ obtained in **Example C** is almost similar to the one obtained in **Example 1**. Right: the optimal control $I^*(t)$ in **Example C** satisfies the necessary optimality conditions derived from the PMP. Furthermore, the fluctuation in waste flow affects the optimal strategy $I^*$, yielding similar periodic tendencies as $\omega(t)$.</figcaption></figure>

**Example C** are comparable to those observed in **Example A**. Seasonal fluctuations in waste stock affect the co-state $\lambda_2$ of K due to its dependency on $x$. As a result, the investment $I^*$ shows similar fluctuations during its turnpike-like phase.

To summarize, the optimal control $q^*$ does not display any significant changes in its tendencies from the previous examples. This behavior can be attributed to the fact that it maximizes the harvesting rate $qxK$ when $q^*$ at bang-$q_{max}$ to fully utilize the available processing units K. However, the investment $I^*$ follows the overall trend observed in **Example A** and **Example B**, but more specifically, it adjusts to the waste fluctuations to invest in processing units that can handle the waste inflow effectively.

# 6 Sensitivity Analysis

In this section, we employ a sensitivity analysis to assess the impact of changes in model parameters on system dynamics and the resulting OCP strategies. Regarding parameter sensitivity, recurring tests were applied, where different parameter values were adjusted to examine their impact on the system's performance (e.g., [41],[44]).

## 6.1 Objective Function Sensitivity Analysis

The sensitivity analysis of the objective function concerning a model parameter can be efficiently computed through a series of steps. Initially, a benchmark objective function is established, equivalent to the original optimal control problem (OCP) objective function discussed in the preceding section. Subsequently, a perturbation is introduced to a chosen model parameter, thereby generating a perturbed model and, consequently, a perturbed OCP. Solving this perturbed OCP, akin to the methodology outlined in the prior section, yields a new objective function value for the perturbed model. This value is then subtracted from the benchmark objective function, resulting in the difference between the perturbed and original models. Dividing this difference by the perturbation provides valuable information on the sensitivity of the objective function with respect to the specific parameter of the model under consideration. Additionally, the relative sensitivity is formally defined through partial derivatives, as described in [44].

**Definition 1.** The relative sensitivity of the objective function J with respect to a parameter 'a', depending on differentiability, is defined as:

$$ \frac{\partial J a}{\partial a J} $$

Interpretation of the findings became evident through this process. A relative sensitivity metric higher than zero indicated that a small positive modification in the parameter resulted in an enhancement of the performance criterion value, whereas a metric lower than zero suggested a decrease. For instance, a relative sensitivity metric of 1 implied that a 1% alteration in the parameter should lead to a proportional 1% adjustment in the objective function value. When the relative sensitivity metric differed from one, the interpretation varied accordingly.

The findings of the sensitivity analysis are outlined in Table 3.

These findings indicate that:
<table><caption>**Table 3** The relative sensitivity of the objective function with respect to each specified parameter in a decreasing order of their absolute values.</caption><thead><tr><th>Parameter</th><th>Value</th><th>Perturbation</th><th>Original Obj</th><th>Perturbed Obj</th><th>Difference</th><th>Relative Sensitivity</th></tr></thead><tbody><tr><td>μ</td><td>0.8</td><td>0.008</td><td>884.49</td><td>898.17</td><td>13.68</td><td>1.546</td></tr><tr><td>p</td><td>1.0</td><td>0.01</td><td>884.49</td><td>897.77</td><td>13.28</td><td>1.501</td></tr><tr><td>α</td><td>0.2</td><td>0.002</td><td>884.49</td><td>874.25</td><td>-10.25</td><td>-1.158</td></tr><tr><td>ω</td><td>25.0</td><td>0.25</td><td>884.49</td><td>893.81</td><td>9.31</td><td>1.053</td></tr><tr><td>δ</td><td>0.05</td><td>0.0005</td><td>884.49</td><td>875.48</td><td>-9.01</td><td>-1.019</td></tr><tr><td>c</td><td>1.0</td><td>0.01</td><td>884.49</td><td>880.15</td><td>-4.35</td><td>-0.491</td></tr><tr><td>α<sub>K</sub></td><td>0.2</td><td>0.002</td><td>884.49</td><td>884.09</td><td>-0.40</td><td>-0.045</td></tr><tr><td>β</td><td>0.2</td><td>0.002</td><td>884.49</td><td>884.15</td><td>-0.35</td><td>-0.039</td></tr><tr><td>γ</td><td>0.2</td><td>0.002</td><td>884.49</td><td>884.37</td><td>-0.12</td><td>-0.013</td></tr><tr><td>c<sub>1</sub></td><td>1.0</td><td>0.01</td><td>884.49</td><td>884.43</td><td>-0.06</td><td>-0.006</td></tr><tr><td>c<sub>2</sub></td><td>1.0</td><td>0.01</td><td>884.49</td><td>884.46</td><td>-0.03</td><td>-0.002</td></tr></tbody></table>

* Parameters with positive relative sensitivity (e.g., $μ, p, ω$) suggest that an increase in the parameter value results in a higher objective function, while a decrease leads to a lower objective function. For example, increasing the waste flow into the landfill ($ω$) can generate more energy and consequently increase profits. Similarly, investing in improved waste-to-energy conversion technology ($μ$) can enhance profitability, as well as raising the energy selling price ($p$) if possible, can boost profit.

* Parameters with negative relative sensitivity (e.g., $α, δ, c$) indicate that as the value of the parameter increases, the objective function decreases, and vice versa. Higher values of parameters like the actualization rate ($δ$) correspond to lower profits over time. The significance of energy depreciation ($α$) is highlighted by its notably negative sensitivity value, emphasizing the need for high-quality technology to store or efficiently transfer energy to the user's system. Similarly, increased production costs ($c$) result in lower profitability, as more expenditure is required to produce the same goods.

* Parameters with relative sensitivities close to zero (e.g., $α_K, β, γ, c_1, c_2$) suggest minimal or no impact on the objective function. For example, both the biodegradation rate ($β$) and energy reuse ($α_K$) have similarly negligible negative effects on profitability. Similarly, the costs associated with maintenance and installation ($c_1, c_2$) have minimal negative impacts.

## 6.2 Impact of the Final Time-Horizon

To better understand the impact of the time horizon on the optimization process and optimal strategies, we maintain the same initial conditions and calculate the optimal solution for a variety of end times, represented by $T$.

<table><caption>**Table 4** Switching times, noted $t_1, t_2$, at different time horizons $T$ varying from 10 to 450.</caption><thead><tr><th>T</th><th>10</th><th>15</th><th>20</th><th>25</th><th>30</th><th>40</th><th>50</th></tr></thead><tbody><tr><td>t<sub>1</sub></td><td>3.0325</td><td>3.5437</td><td>3.8520</td><td>3.9312</td><td>3.9825</td><td>4.0100</td><td>4.0125</td></tr><tr><td>t<sub>2</sub></td><td>7.3225</td><td>12.4700</td><td>17.4150</td><td>22.4187</td><td>27.4275</td><td>37.4300</td><td>47.4375</td></tr><tr><td>T</td><td>60</td><td>70</td><td>80</td><td>90</td><td>130</td><td>175</td><td>-</td></tr><tr><td>t<sub>1</sub></td><td>4.0300</td><td>4.0425</td><td>4.0200</td><td>4.0275</td><td>4.0626</td><td>4.0687</td><td>-</td></tr><tr><td>t<sub>2</sub></td><td>57.4350</td><td>67.4275</td><td>77.4200</td><td>87.4575</td><td>127.4325</td><td>172.4187</td><td>-</td></tr><tr><td>T</td><td>200</td><td>250</td><td>300</td><td>350</td><td>400</td><td>450</td><td>-</td></tr><tr><td>t<sub>1</sub></td><td>4.1500</td><td>4.1875</td><td>4.2750</td><td>4.2875</td><td>4.3000</td><td>4.3875</td><td>-</td></tr><tr><td>t<sub>2</sub></td><td>197.4500</td><td>247.4375</td><td>297.5250</td><td>347.4625</td><td>397.5000</td><td>447.4125</td><td>-</td></tr></tbody></table>
<figure><img src="image_12.png" /><figcaption>**Fig. 11** On the left: the optimal control $I(t)$ for $t \in [0, 30]$. On the right: the optimal control $I(t)$ for $t \in [0, 60]$. The discerned pattern is characterized by an initial *bang*-0 phase, followed by a phase $I^*(t) \in ]0, I_{max}[$, and concluding with another *bang*-0 phase. In this context, $t_1$ and $t_2$ denote the switching times associated with the change in sign of $\lambda_2(t) - c_1$ from negative to positive to negative and are indicated in the graphs. Evidently, an extension of the final time $T$ results in an elongation of the time spent in the $I^*(t)$ phase, which corresponds to $t_2 - t_1$. Notably, this extension does not affect the durations of the *bang*-0 phases, namely $t_1$ and $T - t_2$. This trend is confirmed in Figure 12.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>**Fig. 12** We have replicated the same analysis as demonstrated in Figure 11 across a spectrum of $T$ values ranging from 15 to 450. For each $T$, we have determined the corresponding values of $t_1$ and $t_2$ (refer to Table 4). Subsequently, we've plotted the ratios of $(t_2 - t_1)/T$ against the varying values of $T$. This analysis solidifies the observation that the duration of the $I^*(t)$ phase becomes dominant as $T$ increases. This emerging turnpike feature will be further explored and discussed in Sect. 7.</figcaption></figure>

## 6.3 Impact of main parameters on optimal control strategies and state variables

### 6.3.1 Impact of the waste-to-energy conversion parameter

The conversion parameter $\mu$ serves as a representation of the technology invested in the process, with a higher value suggesting better technology employed in the activity. To verify this hypothesis, we chose to vary the value of $\mu$ and assess its impact on the optimal strategy. Keeping the same weighting constants as outlined in Table 2 (except for $\mu$), we maintain the final time at $T = 60$, and the initial conditions for the states are set to $(x^0, K^0, E^0) = (1, 7, 0)$.

<figure><img src="image_14.png" /><figcaption>**Fig. 13** On the left: the optimal control $I(t)$ for $\mu = 0.4$, $t \in [0, 60]$. On the right: the optimal control $I(t)$ for $\mu = 0.9$, $t \in [0, 60]$. The overall pattern is described by an initial *bang*-0 phase, followed by a phase $I^*(t) \in ]0, I_{max}[$, and concluding with another *bang*-0 phase. Notably, a higher level of investment is observed when $\mu$ takes on higher values. Additionally, as $\mu$ increases, there is an extended duration of investment (time spent in the $I^*(t)$ phase), corresponding to $t_2 - t_1$.</figcaption></figure>
<figure><img src="image_15.png" /><figcaption>**Fig. 14** On the left: the optimal control $q(t)$ for $\mu = 0.4$, $t \in [0, 60]$. On the right: the optimal control $q(t)$ for $\mu = 0.9$, $t \in [0, 60]$. The general pattern is characterized by spending the majority of the time in the bang-$q_{\max}$ phase and concluding with a bang-$0$ phase. Notably, as $\mu$ increases, there is a prolonged period of harvesting (time spent in the bang-$q_{\max}$ phase), which is denoted as $t_q$.</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>**Fig. 15** Above: the optimal trajectories $x(t)$, $K(t)$ and $E(t)$ for $\mu = 0.4$, $t \in [0, 60]$. Below: the optimal trajectories $x(t)$, $K(t)$ and $E(t)$ for $\mu = 0.9$, $t \in [0, 60]$. The general trends of the optimal trajectories remain similar across various values of $\mu$. However, there are noticeable differences: as $\mu$ increases, the waste level $x(t)$ tends to be lower, while the capital level $K(t)$ remains at a higher level. Additionally, the energy levels are higher when $\mu$ increases.</figcaption></figure>

### 6.3.2 Impact of the production cost parameter

The production cost $c$ functions as an economic parameter with the potential to significantly shape the characteristics of the optimal strategy. To deepen our comprehension of its influence, we systematically vary the cost $c$ and evaluate its impact on the optimal strategy. While conducting this analysis, we maintain the same weighting constants as detailed in Table 2, with the exception of $c$. Moreover, to ensure consistency, we keep the final time fixed at $T = 60$, and initialize the states at $(x^0, K^0, E^0) = (1, 7, 0)$.

<figure><img src="image_17.png" /><figcaption>**Fig. 16** On the left: the optimal control $I(t)$ for $c = 1.5$, $t \in [0, 60]$. On the right: the optimal control $I(t)$ for $c = 2.5$, $t \in [0, 60]$. A similar pattern is noticed in the optimal investment from previous examples that is an initial bang-$0$ phase, followed by a phase $I^*(t) \in ]0, I_{\max}]$, and concluding with another bang-$0$ phase. However, a lower level of investment is noted when $c$ takes higher values. Moreover, with an increase in $c$, the investment duration decreases (time spent in the $I^*(t)$ phase), corresponding to $t_2 - t_1$.</figcaption></figure>
<figure><img src="image_18.png" /><figcaption>Fig. 17 On the left: the optimal control $q(t)$ for $c = 1.5$, $t \in [0, 60]$. On the right: the optimal control $q(t)$ for $c = 2.5$, $t \in [0, 60]$. The overall pattern remains consistent with previous examples, where the majority of the time is spent in the bang-$q_{max}$ phase, concluding with a bang-0 phase. However, the harvesting period (time spent in the bang-$q_{max}$ phase) decreases with respect to the cost $c$.</figcaption></figure>

<figure><img src="image_19.png" /><figcaption>Fig. 18 Above: the optimal trajectories $x(t)$, $K(t)$ and $E(t)$ for $c = 1.5$, $t \in [0, 60]$. Below: the optimal trajectories $x(t)$, $K(t)$ and $E(t)$ for $c = 2.5$, $t \in [0, 60]$. The general trends of the optimal trajectories remain similar across various values of $\mu$. However, there are noticeable differences: as $c$ increases, the waste level $x(t)$ tends to be higher, while the capital level $K(t)$ remains at a lower level. Additionally, the energy levels are slightly lower when $c$ increases.</figcaption></figure>

# 7 Numerical Investigation of Turnpike Characteristics

## 7.1 Pseudo-Static Problem

Now, let us introduce the Pseudo-Static<fnref n="4" />-OCP problem corresponding to the Dynamic Optimal Control Problem (DOCP). In the static problem, our objective is to identify the system's steady state (1), at which the cost function (3) reaches its maximum value, without loss of generality we assume that $q_{max}$ is the most sustainable and steady harvesting speed.

The Pseudo-Static problem is outlined as follows:

$$ \max_{(x,K,E,I)} pE - cq_{\max}Kx - I(c_1 + c_2I), \quad \begin{cases} \omega - (\beta + q_{\max}K)x = 0, \\ I - \gamma K = 0, \\ \mu q_{\max}Kx - \alpha E - \alpha_K K = 0, \end{cases} \quad (22) $$

The Lagrangian $L$ is defined as

$$ L = pE - cq_{\max}Kx - I(c_1 + c_2I) + \ell_1[\omega(t) - (\beta + q_{\max}K)x] + \ell_2[I - \gamma K] + \ell_3[\mu q_{\max}Kx - \alpha E - \alpha_K K], \quad (23) $$

$$ \left\{ \begin{aligned} \frac{\partial L}{\partial x} &= \beta\ell_1 + (c + \ell_1 - \mu\ell_3)Kq_{\max} = 0, \\ \frac{\partial L}{\partial K} &= \gamma\ell_2 + (c + \ell_1 - \mu\ell_3)xq_{\max} + \ell_3\alpha_K = 0, \\ \frac{\partial L}{\partial E} &= \alpha\ell_3 - p = 0, \\ \frac{\partial L}{\partial I} &= -c_1 - 2c_2I + \ell_2 = 0, \end{aligned} \right. \quad (24) $$

The system can be seen as,

<footnote n="4">⁴Pseudo-Static since $\omega(t)$ is time-dependent.</footnote>
$$ 
\left\{ 
\begin{array}{l}
\beta\ell_1 + (c + \ell_1 - \mu\ell_3)Kq_{\max} = 0, \\
\gamma\ell_2 + (c + \ell_1 - \mu\ell_3)xq_{\max} + \ell_3\alpha_K = 0, \\
\alpha\ell_3 - p = 0. \\
\omega(t) - (\beta + q_{\max}K)x = 0, \\
I - \gamma K = 0, \\
\mu q_{\max}Kx - \alpha E - \alpha_K K = 0, \\
-c_1 - 2c_2I + \ell_2 = 0
\end{array}
\right. 
$$

The primary issue involves determining $\ell_1$ and $\ell_2$ explicitly, since most other variables are dependent on one of these two. Therefore, we will solve this problem considering the various behaviors of $\omega(t)$.

### 7.1.1 Constant waste flow $\omega$ as in Example A

Applying the identical parameters as listed in Table 2, straightforward calculations yield the following steady-state values: $\bar{I} = 0.446$, $\bar{q} = 2.0$, $\bar{x} = 5.359$, $\bar{K} = 2.232$ and $\bar{E} = 93.480$.

Moreover, under the same JuMP and fixed initial states $x(0) = 1$, $K(0) = 7$ and $E(0) = 0$. The optimal trajectories ($x(t)$, $K(t)$, $E(t)$) are illustrated in Fig. 19, and the optimal control is given in Fig. 20.

The numerical findings indicate the following characteristics:

* In Fig. 19, it is evident that optimal trajectories revolve around the steady point, especially when the optimal investment reaches $\bar{I} \in [0, I_{\max}]$. (which explains the turnpike-like behavior is observed in Example A (see, Fig. 1)),

* For sufficiently large $T$, the optimal trajectories (depicted in Fig. 19) and the optimal control solutions (presented in Fig. 20) of the DOCP mostly remain close to the solutions of the corresponding static-OCP.

<figure><img src="image_20.png" /><figcaption>Fig. 19 The optimal trajectories for $t \in [0, 60]$, associated with optimal control in Fig. 20, and the steady-state $\bar{x}, \bar{K}, \bar{E}$.</figcaption></figure>

<figure><img src="image_21.png" /><figcaption>Fig. 20 Left: the optimal control $q(t)$ for $t \in [0, 60]$. Right: the optimal control $I(t)$ for $t \in [0, 60]$.</figcaption></figure>
### 7.1.2 Step function waste flow $\omega(t)$ as in Example B

The staircase pattern exhibited by $\omega(t)$ imparts its characteristics onto both the optimal trajectories and the optimal control.

Utilizing the parameters specified in Table 2, along with JuMP settings and fixed initial states $x(0) = 1$, $K(0) = 7$, and $E(0) = 0$, the numerical results unveil the following characteristics:

* The optimal trajectories $x(t)$, $K(t)$, and $E(t)$, shows a turnpike like tendencies, while fitting perfectly with the pseudo-steady-state $\bar{x}(t)$, $\bar{K}(t)$, $\bar{E}(t)$.

* The optimal control $I^*(t)$ and $\bar{I}(t)$ have inherited both the staircase tendencies of $\omega(t)$. Moreover, one can notice that $I^*(t)$ is following $\bar{I}(t)$ over $t \in [0, T[$.

<figure><img src="image_22.png" /><figcaption>Fig. 21 The optimal trajectories for $t \in [0, 90]$, and the pseudo-steady-state $\bar{x}(t)$, $\bar{K}(t)$, $\bar{E}(t)$.</figcaption></figure>

<figure><img src="image_23.png" /><figcaption>Fig. 22 Left: the optimal control $q^*(t)$ for $t \in [0, 90]$. Right: the optimal control $I(t)$ for $t \in [0, 90]$.</figcaption></figure>
### 7.1.3 Periodic waste flow $\omega(t)$ as in Example C

The periodic tendency of $\omega(t)$ inherits its tendencies to the optimal trajectories and optimal control.

Applying the identical parameters as listed in Table 2, JuMP settings and fixed initial states $x(0) = 1$, $K(0) = 7$ and $E(0) = 0$.

The numeric results reveal the subsequent traits:

* The optimal control $q^*(t)$ is not affected by the periodicity of $\omega(t)$. This does not come as a surprise since it is supposed to be a bang-bang control.

* The optimal control $I^*(t)$ and the optimal trajectories $x(t), K(t), E(t)$ mimic the periodicity of $\omega(t)$, while being closer to $\bar{I}(t)$ and the associated pseudo-steady-states $\bar{x}, \bar{K}, \bar{E}$ when $\rho$ gets larger.

<figure><img src="image_24.png" /><figcaption>**Fig. 23** The optimal trajectories $x(t), K(t), E(t)$ and their associated periodic-steady-states $\bar{x}, \bar{K}, \bar{E}$ are affected by the change of periodicity of $\omega(t)$ while being closer together when $\rho = 300$ compared to Fig. 25.</figcaption></figure>

<figure><img src="image_25.png" /><figcaption>**Fig. 24** On the left: the optimal control $q^*(t)$ and $\bar{q}$ were not affected by the periodicity of $\omega(t)$, $\rho = 300$. On the right: the optimal control $I^*(t)$ and $\bar{I}(t)$ have inherited both the periodic tendencies of $\omega(t)$ and are closer together compared to Fig. 26.</figcaption></figure>

<figure><img src="image_26.png" /><figcaption>**Fig. 25** The optimal trajectories $x(t), K(t), E(t)$ and their associated periodic-steady-states $\bar{x}, \bar{K}, \bar{E}$ are exhibiting the same tendencies as $\omega(t)$ with period $\rho = 75$.</figcaption></figure>
<figure><img src="image_27.png" /><figcaption>**Fig. 26** Under the finite horizon $T = 150$ and the periodic function $\omega(t)$ with period $\rho = 75$. On the left: the optimal control $q^*(t)$ is almost all the time at the level of $\bar{q}$ that maximizes the Static-OCP. On the right: the optimal control $I^*(t)$ and $\bar{I}(t)$ have inherited both the periodic tendencies of $\omega(t)$, where $I^*(t)$ is tracking $\bar{I}(t)$.</figcaption></figure>

# 8 Conclusion

This paper presented a mathematical model for waste-to-energy systems and studied an optimal control problem using the Pontryagin Maximum Principle (PMP) and direct optimization methods. We examined optimal investment and control strategies over time and highlighted the turnpike phenomenon in various scenarios. Our sensitivity analysis confirmed the model's robustness, providing confidence to investors. The turnpike feature is valuable for investors, as it supports long-term strategies and reduces the need for frequent policy changes. In the future, we will explore specific energy transformation cases to better understand sustainable waste-to-energy systems.

# References

[1] Agrawal, D. K., Tang, X., Westbrook, A., Marshall, R., Maxwell, C. S., Lucks, J., Franco, E. (2018). Mathematical modeling of RNA-based architectures for closed loop control of gene expression. ACS synthetic biology, 7(5), 1219-1228.

[2] Ahring, B. K. (2003). Perspectives for anaerobic digestion. Biomethanation i, 1-30.

[3] Alford, J. S. (2006). Bioprocess control: Advances and challenges. Computers & Chemical Engineering, 30(10-12), 1464-1475.

[4] Ascher, S., Watson, I., & You, S. (2021). Machine learning methods for modelling the gasification and pyrolysis of biomass and waste. Renewable and Sustainable Energy Reviews, 111902.

[5] Aseev, S. M., Kryazhimskii, A. V. (2007). The Pontryagin maximum principle and optimal economic growth problems. Proceedings of the Steklov institute of mathematics, 257(1), 1-255.

[6] Bernard, O. (2011). Hurdles and challenges for modelling and control of microalgae for CO2 mitigation and biofuel production. Journal of Process Control, 21(10), 1378-1389.

[7] Betts, J.T. Practical Methods for Optimal Control and Estimation Using Nonlinear Programming, 2nd ed.; Advances in Design & Control; SIAM: Philadelphia, PA, USA, 2010; Volume 19, p. 427.

[8] Bonnans, F.J.; Giorgi, D.; Grelard, V.; Heymann, B.; Maindrault, S.; Martinon, P.; Tissot, O.; Liu, J. BOCOP: An Open Source Toolbox for Optimal Control—A Collection of Examples; Technical Reports, Project-Team Commands; Inria, Saclay: Palaiseau, France, 2017.

[9] Caillau, J. B., Djema, W., Gouzé, J. L., Maslovskaya, S., Pomet, J. B. (2022). Turnpike property in optimal microbial metabolite production. Journal of Optimization Theory and Applications, 1-33.
[10] Cherkaoui Dekkaki, O., El Khattabi, N., & Raissi, N. (2022). Bioeconomic modeling of household waste recovery. Mathematical Methods in the Applied Sciences, 45(1), 468-482.

[11] Cherkaoui Dekkaki, O., Djema, W., (2023). Optimal control of a bioeconomic model applied to the recovery of household waste. 2023 American Control Conference (ACC), San Diego, CA, USA, pp. 2135-2140.

[12] Chuka-ogwude, D., Mickan, B. S., Ogbonna, J. C., & Moheimani, N. R. (2022). Developing food waste biorefinery: using optimized inclined thin layer pond to overcome constraints of microalgal biomass production on food waste digestate. Jour. of Applied Phycology, 1-12.

[13] Clark CW. Mathematical Bioeconomics: The Mathematics of Conservation, 3rd Edition. Pure and Applied Mathematics: A Wiley Series of Texts, Monographs and Tracts. 2010;

[14] Clarke F. Functional Analysis, Calculus of Variations and Optimal Control. Springer-Verlag, London. 2013;

[15] Caillau, J. B., Ferretti, R., Trélat, E., Zidani, H. (2022). An algorithmic guide for finite-dimensional optimal control problems, Handbook of Numerical Analysis, Elsevier.

[16] Djema, W., Bayen, T., Bernard, O. (2022). Optimal Darwinian Selection of Microorganisms with Internal Storage. Processes, 10(3), 461.

[17] Djema, W., Bonnet, C., Mazenc, F., Clairambault, J., Fridman, E., Hirsch, P., Delhommeau, F. (2018). Control in dormancy or eradication of cancer stem cells: Mathematical modeling and stability issues. Journal of Theoretical Biology, 449, 103-123.

[18] Djema, W., Giraldi, L., Maslovskaya, S., Bernard, O. (2021). Turnpike features in optimal selection of species represented by quota models. Automatica, 132, 109804.

[19] Dochain, D. (Ed.). (2013). Automatic control of bioprocesses. John Wiley & Sons.

[20] Escamilla-García, P. E., Camarillo-López, R. H., Carrasco-Hernández, R., Fernández-Rodríguez, E., & Legal-Hernández, J. M. (2020). Technical and economic analysis of energy generation from waste incineration in Mexico. Energy Strategy Reviews, 31, 100542.

[21] Haddon A, Ramírez H, Rapaport A. Optimal and Sub-optimal Feedback Controls for Biogas Production. J Optim Theory Appl 183. 2019, 642-670. https://doi.org/10.1007/s10957-019-01570-3

[22] Harmand, J., Lobry, C., Rapaport, A., Sari, T. (2019). Optimal Control in Bioprocesses: Pontryagin's Maximum Principle in Practice. John Wiley & Sons.

[23] Harmand, J., Rapaport, A., Dochain, D., & Lobry, C. (2008). Microbial ecology and bioprocess control: Opportunities and challenges. Journal of Process Control, 18(9), 865-875.

[24] Hartman, P., (1982). Ordinary Differential Equations. Birkhäuser, Second Edition.

[25] Iglesias, P. A., & Ingalls, B. P. (Eds.). (2010). Control theory and systems biology. MIT press.

[26] Iratni, A., & Chang, N. B. (2019). Advances in control technologies for wastewater treatment processes: status, challenges, and perspectives. IEEE/CAA Journal of Automatica Sinica, 6(2), 337-363.

[27] Lombardi, L., Carnevale, E., & Corti, A. (2015). A review of technologies and performances of thermal treatment systems for energy recovery from waste. Waste
management, 37, 26-44.

[28] Kamien, M. I., Schwartz, N. L. (2012). Dynamic optimization: the calculus of variations and optimal control in economics and management. 2nd Edition, Advanced textbooks in economics, 31, Dover Publications, Inc.

[29] Mairet, F., & Gouzé, J. L. (2015). Hybrid control of a bioreactor with quantized measurements. IEEE Transactions on automatic control, 61(5), 1385-1390.

[30] Mohammadi, M., & Harjunkoski, I. (2020). Performance analysis of waste-to-energy technologies for sustainable energy generation in integrated supply chains. Computers & Chemical Engineering, 140, 106905.

[31] Moser, E., Grass, D., Tragler, G. (2016). A non-autonomous optimal control model of renewable energy production under the aspect of fluctuating supply and learning by doing. Or Spectrum, 38(3), 545-575.

[32] Murray, J. D. (2002). Mathematical biology: I. An introduction, Interdisciplinary Applied Mathematics (IAM, volume 17), Springer.

[33] Neri, E., Passarini, F., Cespi, D., Zoffoli, F., & Vassura, I. (2018). Sustainability of a bio-waste treatment plant: Impact evolution resulting from technological improvements. Jour. of Cleaner Production, 171, 1006-1019.

[34] Nguyen, D., Gadhamshetty, V., Nitayavardhana, S., & Khanal, S. K. (2015). Automatic process control in anaerobic digestion technology: A critical review. Bioresource technology, 193, 513-522.

[35] Ozgun, H. (2019). Anaerobic Digestion Model No. 1 (ADM1) for mathematical modeling of full-scale sludge digester performance in a municipal wastewater treatment plant. Biodegradation, 30(1), 27-36.

[36] Pontryagin, L.S. Mathematical Theory of Optimal Processes; Springer: Berlin/Heidelberg, Germany, 1964.

[37] Reed, W. J. (1988). Optimal harvesting of a fishery subject to random catastrophic collapse. Mathematical Medicine and Biology: A Journal of the IMA, 5(3), 215-235.

[38] Shell, K. (1969). Applications of Pontryagin's maximum principle to economics. In Mathematical Systems Theory and Economics I/II (pp. 241-292). Springer, Berlin, Heidelberg.

[39] Sialve, B., Bernet, N., & Bernard, O. (2009). Anaerobic digestion of microalgae as a necessary step to make microalgal biodiesel sustainable. Biotechnology advances, 27(4), 409-416.

[40] Trélat, E., & Zuazua, E. (2015). The turnpike property in finite-dimensional nonlinear optimal control. Journal of Differential Equations, 258(1), 81-114.

[41] Van Henten, E. J. (2003). Sensitivity analysis of an optimal control problem in greenhouse climate management. Biosystems Engineering, 85(3), 355-364.

[42] Vinter, R. Optimal Control, Systems and Control: Foundations and Applications; Birkhauser: Basel, Switzerland, 2000.

[43] Wang, Y., Chu, J., Zhuang, Y., Wang, Y., Xia, J., & Zhang, S. (2009). Industrial bio-process control and optimization in the context of systems biotechnology. Biotechnology advances, 27(6), 989-995.

[44] Zamir, M., Zaman, G., & Alshomrani, A. S. (2016). Sensitivity analysis and optimal control of anthroponotic cutaneous leishmania. PloS one, 11(8), e0160513.