WorksMathematics
Optimal Feedback Control of the Fokker-Planck Equation for an SIRS Epidemic Model
Abstract
We develop a Fokker–Planck feedback control framework for a stochastic susceptible–infected–recovered–susceptible (SIRS) epidemic model with three intervention mechanisms targeting disease transmission, loss of immunity, and recovery. The interventions are formulated as space- and time-dependent feedback controls that influence both the drift and diffusion coefficients of the underlying stochastic differential equations, allowing control of the probability distribution of epidemic states. We investigate the existence of optimal controls and derive first-order necessary optimality conditions involving a forward Fokker–Planck equation, a backward adjoint equation, and a Hamiltonian minimization condition. For numerical approximation, we combine a Chang–Cooper discretization of the diagonal drift–diffusion terms with a finite-difference treatment of cross-diffusion and a sequential quadratic Hamiltonian (SQH) algorithm for computing the optimal feedback policies. We also examine sufficient-decrease and convergence properties of the SQH iteration. Numerical experiments consider four epidemiological objectives involving cumulative infection burden, infection-threshold exceedance, terminal susceptible population, and a combination of running and terminal costs. The resulting feedback policies exhibit distinct spatial and temporal structures depending on the epidemiological objective. Monte Carlo simulations of the underlying stochastic system illustrate that the optimized interventions can substantially reduce infection growth and undesirable epidemic outcomes relative to uncontrolled dynamics. The proposed framework provides a distribution-based approach to stochastic epidemic control that integrates mathematical analysis, numerical optimization, and state-dependent intervention design.
Introduction
Mathematical modeling has long played an important role in understanding the transmission of infectious diseases and evaluating strategies for epidemic prevention and control. Beginning with the classical work of Kermack and McKendrick [16], compartmental epidemic models have provided a systematic framework for describing the evolution of susceptible, infected, and recovered populations. Among these, the susceptible–infected–recovered–susceptible (SIRS) model is particularly relevant to infectious diseases for which immunity is temporary or incomplete. By allowing recovered individuals to return to the susceptible class, the SIRS model accounts for reinfection and the possibility of recurrent epidemic outbreaks. Such dynamics motivate the development of intervention strategies that reduce transmission, limit the loss of immunity, and enhance recovery while accounting for the costs associated with implementing these measures.
Although deterministic epidemic models provide valuable insights into disease transmission, their predictions are based on prescribed parameter values and initial conditions. In practice, epidemic dynamics are influenced by substantial uncertainty arising from variations in contact patterns, transmission rates, recovery mechanisms, immunity duration, and environmental or behavioral factors. Stochastic epidemic models address these uncertainties by incorporating random perturbations into the governing dynamics. Several authors investigated stochastic epidemic dynamics using stochastic differential equations and established important results concerning positivity, extinction, persistence, stationary distributions and the effects of different types of noise [9, 13, 18, 23, 27]. See [1] for an overview of such models. Generally, stochastic differential equation models describe ensembles of possible epidemic trajectories rather than a single deterministic evolution. This distinction is particularly important when intervention strategies must account for the probability of severe outbreaks or other undesirable epidemiological outcomes.
Optimal control theory provides a mathematical framework for determining intervention strategies that balance epidemiological benefits against economic, logistical, and societal costs. In compartmental epidemic models, controls may represent nonpharmaceutical interventions that reduce transmission, vaccination or other measures that influence immunity, and treatment strategies that accelerate recovery [7, 20], and researchers have analyzed models incorporating confounding effects ranging from noncompliance with control measures [3, 21] to media coverage [8] to limited resources [14]. Classical optimal control formulations typically determine time-dependent interventions by minimizing a prescribed objective functional subject to the epidemic dynamics. In stochastic settings, optimal control can also be formulated through controlled diffusion processes and dynamic programming, as developed in the general theory of stochastic control [12]. However, time-dependent interventions do not explicitly adapt to the current epidemic state. Moreover, when the objective involves the likelihood of undesirable outcomes rather than only expected population levels, it is useful to consider the evolution of the entire probability distribution of epidemic states.
The Fokker–Planck (FP) equation offers a natural framework for this purpose. Associated with an underlying stochastic differential equation, the FP equation describes the temporal evolution of the probability density of the stochastic state variables. Consequently, an optimal control problem constrained by the FP equation allows interventions to influence the distribution of possible epidemic outcomes. This density-based perspective provides a direct way to incorporate objectives involving expected infection burden, probability mass in high-infection regions, and desirable terminal epidemic states. Furthermore, by allowing the controls to depend on both the epidemic state and time, the resulting formulation accommodates feedback intervention policies. Unlike purely time-dependent controls, these policies can assign different intervention intensities to different regions of the epidemic state space. While FP control has been applied biological and ecological models such as those for pedestrian motion [24] and biological imaging [2], it has not been broadly applied to epidemiological models with the exception of [22] where time-dependent controls were considered. Indeed, most work regarding FP control assumes time-dependent control or specially parameterized control ansatzes and, notably, does not consider control of the diffusive terms in the FP equation [5, 11].
Despite the modeling advantages, FP optimal control problems introduce mathematical and computational challenges. The probability density satisfies a time-dependent partial differential equation whose coefficients depend on the control variables. When the controls influence both the drift and diffusion coefficients, the resulting control-to-state mapping is highly nonlinear, and the diffusion operator may contain mixed spatial derivatives. Establishing existence of optimal controls and deriving necessary optimality conditions therefore requires an appropriate analytical framework for the controlled FP equation. The numerical approximation must also account for the nonnegativity and conservation properties of probability densities. The classical Chang–Cooper method [6] provides a useful structure-preserving discretization for drift–diffusion equations, although additional treatment is required for multidimensional systems with cross-diffusion.
Motivated by these considerations, we develop a FP optimal control framework for a stochastic SIRS epidemic model with three distinct intervention mechanisms. Stochastic perturbations are introduced into transmission, loss of immunity, and recovery, and the corresponding feedback controls modify both the deterministic transition rates and the stochastic fluctuations. The first control reduces transmission through nonpharmaceutical interventions, the second reduces loss of immunity, and the third increases the recovery rate. The resulting stochastic system induces a two-dimensional FP equation with a control-dependent diffusion matrix and nonzero cross-diffusion terms.
The principal contributions of this work are as follows. First, we formulate a distribution-based optimal control problem with space- and time-dependent feedback controls and a general objective functional incorporating intervention costs, running epidemic costs, and terminal costs. In particular, our problem includes controls in the diffusion terms of the FP equation. Second, we investigate the analytical properties of the associated control-to-state operator and develop existence and first-order optimality results using a forward FP equation, a backward adjoint equation, and a Hamiltonian minimization condition. Third, we construct a numerical framework combining Chang–Cooper discretization of the diagonal drift–diffusion terms, finite-difference approximation of the mixed diffusion term, and a sequential quadratic Hamiltonian (SQH) algorithm for computing feedback controls. We also investigate sufficient-decrease and convergence properties of the SQH iteration.
The numerical experiments consider four epidemiological objectives that demonstrate the flexibility of the proposed framework. The first minimizes cumulative infection burden, while the second penalizes epidemic states in which the infected fraction exceeds a prescribed threshold. The third introduces a terminal reward for maintaining a sufficiently large susceptible population, and the fourth combines threshold-based infection regulation with a terminal susceptible-state objective. For each scenario, we compute the evolving probability density and the corresponding feedback control maps. Monte Carlo simulations of the underlying controlled and uncontrolled stochastic differential equations are then used to examine the effects of the optimized interventions on individual epidemic trajectories and their ensemble behavior.
The remainder of the paper is organized as follows. Section 2 introduces the controlled stochastic SIRS model, derives the associated FP equation, and formulates the feedback optimal control problem. Section 3 develops the analytical framework, including existence of an optimal control and first-order necessary optimality conditions. Section 4 presents the numerical approximation of the forward FP and backward adjoint equations together with the SQH algorithm and its convergence analysis. Section 5 presents numerical experiments under different epidemiological objectives and compares the resulting controlled and uncontrolled stochastic dynamics.
A controlled stochastic SIRS model and FP equation
We begin from the following controlled Susceptible-Infected-Recovered-Susceptible (SIRS) dynamics which model the spread of a generic disease in a generic region:
Here represents the constant introduction of new members into the population, and represents the natural death rate. A basic assumption of this model is that the population is homogeneous and well-mixed so that infection spreads via mass action with rate and infected individuals recover at rate . The parameter represents loss of immunity whereby recovered individuals become susceptible again. We supply the policy-maker with three control variables by which they may inhibit disease spread:
(a) for some - this is reduction in infectivity due to governmentally enacted non-pharmaceutical intervention measures,
(b) for some - reduction in loss of immunity (perhaps due to vaccination or other treatment efforts),
(c) for some - increase in recovery rate due to treatment efforts.
Due to the highly volatile nature of epidemic disease spread, we also add stochasticity to the model, and specifically following [13, 23], we assume that there is some uncertainty in the rate parameters . Thus we formally replace with , and likewise with . Finally, we assume that and that the initial conditions are normalized so that . Under these conditions, we see that the total population described by (1) (and indeed by the stochastic generalization) will be constant: . Thus we can write , and drop this compartment. With all these assumptions, we introduce the controlled, stochastic SIRS model:
We write the dynamics in the general form in the form
where , , and is a 3 dimensional Brownian motion with independent components. In this notation, the drift and diffusion functions are
For notational convenience, we set . We record some important observations regarding the model.
By the arguments in [13, 23], if and , then is a forward invariant set for the dynamics, meaning that we can take and let where is supported in .
Our admissible control actions take values in the rectangle .
All the components of the functions and and their -derivatives are continuous in and thus bounded on .
The Fokker-Planck equation corresponding to (3) is
where the flux is defined componentwise by
We now formulate an optimal control problem. We are interested in feedback control, so we consider for each where . Note that because the controls enter into (4) in the diffusion coefficients, we need very regular controls to guarantee nice properties of the solution. Some of this additional regularity will be required for the ensuing proof of existence of minimizers for the optimal control problem in theorem 3.5 (and the preceding lemmas), and yet more is required for the proof of the Pontryagin Minimum Principle in theorem 3.8. Accordingly, we take
for a fixed positive constant . We consider a relatively generic cost functional
where and are, at a minimum, bounded. For particular theorems, these functions will be required to satisfy further conditions as specified below.
Our optimization problem can then be stated abstractly as follows
Here the functions express the preferences of the policy-maker. The control cost represents represents any political, economic, of logistical costs associated with implementing control measures. For example, this could encode the loss of gross domestic product (GDP) incurred when requiring businesses to close or the costs associated with manufacturing and distributing vaccines. The running cost and final cost implicitly define the desirable or undesirable epidemic outcomes. For example, recalling that , a policy-maker may set , meaning that more cost is assessed when there is more probability density associated with states where the infectious population is larger.
Analysis of the FP optimal control problem
We prove existence of a minimizer for (7) via analysis of the control-to-state map. Before this, we need a basic existence result.
Definition 3.1. For a fixed control function and initial condition , a function is formally defined to be a weak solution of (4) if it satisfies and
for all and a.e. .
Theorem 3.2. Fix . Then for any there is a unique weak solution of (4) with
Moreover, and are uniformly bounded over choices of . Further,
and if almost everywhere in , then almost everywhere in for all .
The proof of this theorem is classical so we omit it, but comment on some facets. Existence and uniqueness of the solution follows as in [10 Ch. 7.1]. The uniform boundedness over choices of controls follows since and and their spatial derivatives are uniformly bounded for . Conservation of the integral follows by taking in (8), and nonnegativity follows by setting at each time and establishing the bound , whereupon the result follows by Grönwall’s inequality since . Note that because is a probability density function, we will henceforth always assume that and , whereupon we have these same properties for for all times . We note that theorem 3.2 does not require much regularity for the controls , so for this theorem the regularity in our control space is sufficient but certainly unnecessary.
From theorem 3.2, we have a well defined control-to-state operator
, the weak solution of (4) with control map . (9)
We prove existence of a solution of (7) through analysis of . We proceed with two lemmas and then state existence of minimizers as a theorem. In all of the following work, we equip with the -topology induced by the norm
Additionally, whenever a subsequence with some property is mentioned, we implicitly pass to this subsequence, but to avoid excessive notation, we do not rename the sequences.
Lemma 3.3. The control-to-state operator is weakly closed.
Proof. Take a sequence of controls such that in and in . We need to prove that and .
By the Banach–Alaoglu theorem and compatibility of weak limits, along a subsequence, we can achieve in and in for some , . Now for any , and any first order partial derivative , we see
By weak convergence of to and of to , this gives
implying that is weakly differentiable with weak partial , and
by weak lower semicontinuity of the norm. Finally, weak convergence also preserves pointwise a.e. bounds, as follows by testing against appropriately designed indicator functions, and thus for almost every . We conclude that .
It remains to prove that . By theorem 3.2, the sequence is bounded in . Since we have compact-continuous embeddings
the Aubin-Lions lemma [25 Ch. III, Prop. 1.3] yields a subsequence of which converges strongly to in . Since for a.e. and , the sequence is uniformly bounded and uniformly Lipschitz, whereupon the Arzela-Ascoli theorem gives uniformly along a subsequence. Because is continuous and uniformly bounded, this allows us to conclude that in via the dominated convergence theorem (and similarly for and their spatial derivatives). Finally to prove that , we fix . Considering (8), there are three terms to address. The pairing behaves nicely since in . The term is controlled since both and strongly in . And upon expanding, the terms
are controlled since is uniformly bounded and converges strongly to in , and weakly in . Thus we find that is a weak solution of (4) corresponding to ; that is, .
Lemma 3.4. The control-to-state operator is weak-to-strong continuous in the -topology. That is, if and in , then in .
Proof. Suppose and in . Once again, is a bounded sequence in , and thus any subsequence is bounded in . Hence by the Aubin-Lions lemma [25 Ch. III, Prop. 1.3], we can pass to a further subsequence which converges strongly to some . By the closure guaranteed in lemma 3.3, we must have . Hence we have prove that every subsequence of has a further subsequence which converges strongly to in . By the Urysohn subsequence principle [26 §2.1.17], we have that in .
We recall before stating our existence theorem that the functions are used in the definition of the cost functional in (6).
Theorem 3.5. Assume that is convex and lower-semicontinuous, , and . Then there exists a solution —and corresponding weak solution of (4)—of the minimization problem (7).
Proof. Define
Recall that and for all . Then whenever satisfy the given assumptions,
Thus we can take a sequence with corresponding such that . Since is, in particular, a bounded sequence in , there exists a subsequence converging weakly to some and by the weak closure in lemma 3.3, we have . By the weak-to-strong continuity in lemma 3.4, we have in . Considering the definition of the cost functional in (6), the conditions that is nonnegative, convex and lower-semicontinuous guarantee that the map is weakly lower-semicontinuous, and the integral terms involving the are preserved under limits simply by convergence of , since , are bounded. Thus we have
proving that the pair is a solution of (7).
Given this, we would like to prove first order necessary conditions for optimality akin to the classical Pontryagin Minimum Principle. To do so, we need a notions of an adjoint solution and a Hamiltonian.
For functions , , , we define the formal Lagrangian by
Here the adjoint function is playing the role of a Lagrange multiplier. Integrating by parts and expanding , we have
where we have enforced the zero flux boundary condition . The adjoint equation is derived by enforcing
for arbitrary smooth test functions satisfying . Computing formally, this yields
Solutions to (10) are considered in a weak sense analogous to (8) above. That is, is a weak solution of (10) if and
for all and a.e. . For fixed , existence and uniqueness follow directly as in [10 Ch. 7.1]. Regularity can then be upgraded to via standard parabolic regularity results [19 Thm. 7.35]. This is the main reason that we need so much additional regularity for our control space. With controls uniformly bounded and taking values in the compact rectangle , the maps and are in which allows for the increased regularity.
Theorem 3.6. If and , then for any , there is a unique weak solution of (10) with
Further, if , then and is uniformly bounded over choices .
We henceforth assume that so that we have uniformly bounded for any finite .
We then formally define the Hamiltonian
Note that depends on implicitly through ; we have suppressed this dependence to reduce the notational burden.
We prove that the optimal control map can be characterized as a pointwise minimizer of this Hamiltonian. Before doing so, we prove a lemma relating the cost functional and the Hamiltonian.
Lemma 3.7. For two control maps with respective solutions of (4), we have
where is the solution of (10) corresponding to .
Proof. We compute
where in the middle equality we have used (11) with , and in the last we have integrated by parts in and canceled boundary terms. But now with playing the role of the test function in (8), we see that all terms with drop out of (13) since is the weak solution of (4) corresponding to . Thus we arrive at
where in the last equality we have replaced using that is a weak solution of (4). This completes the proof.
Theorem 3.8. Suppose that the state-control pair is a solution of (7) and that is the corresponding solution of (10). Then for any ,
That is, is a pointwise minimizer of the Hamiltonian when evaluated at the optimal state and costate pair.
Proof. The proof utilizes the classical needle variation technique. Supposing that is optimal, we fix a point and . Define the set
and the control map
In what follows, is the fixed constant value in , while depends on . Assuming is the state map corresponding to and is the adjoint map corresponding to , lemma 3.7 tells us that
where are the indented integrals. Now the map
is in , so by the Lebesgue differentiation theorem
as long as is a Lebesgue point for this function. Thus, taking the limit as in (16), we arrive at (15) so long as . We see
where is the Fokker-Planck flux defined in (5). Now strongly in by a standard parabolic stability estimate [10 Ch. 7, Thm. 2]. However, we recall that for sufficiently regular , is uniformly bounded over choices of controls for any . Taking large enough, we have that is compactly embedded in [15 Thm. 3.14], [17 Ch. II, Lem. 3.3]. This implies that uniformly along a subsequence. Assuming is a Lebesgue point of , the term in the parentheses remains bounded as and thus by uniform convergence of . The integral is treated identically. Because such points comprise almost all of , passing to the limit in (16) shows that
as desired.
Given this, the first order necessary optimality conditions for this system are as follows.
Numerical approximation
In this section, we describe the numerical methods used to solve the FP optimal control problem (7). The numerical procedure consists of finite-difference approximations of the forward FP equation (4) and the backward adjoint equation (10), coupled through the sequential quadratic Hamiltonian (SQH) method. The latter iteratively updates the space- and time-dependent feedback control by pointwise minimization of a quadratically augmented Hamiltonian.
Numerical approximation of the forward FP equation
Let
denote a uniform discretization of , and let denote the numerical approximation of the probability density . Since represents a probability density, the numerical treatment of the forward FP equation should, as far as possible, retain the fundamental structural properties of the continuous problem. In particular, the numerical solution should remain nonnegative, conserve total probability under the zero-flux boundary condition, and accurately balance drift and diffusion without introducing spurious oscillations. For this reason, we use a two-dimensional Chang–Cooper discretization for the drift and diagonal diffusion terms.
We write the controlled FP equation as
where
The diagonal contributions in (18) can be written in conservative flux form as
and
This motivates the modified drift coefficients
In the implementation, these quantities are evaluated at the corresponding cell faces using finite differences of the diagonal diffusion coefficients. At an -face , define
and analogously at an -face,
The Chang–Cooper weights are determined by
with the limiting value
The quantity measures the relative strength of drift and diffusion across a grid cell. Thus, unlike a standard centered discretization, the Chang–Cooper weighting automatically biases the numerical flux in a manner determined by the local drift–diffusion balance. For example, the discrete flux through the face may be written in the form
where
Similarly,
The diagonal drift–diffusion contribution at an interior grid point is therefore represented by the conservative flux difference
A principal advantage of the Chang–Cooper construction is that the drift and diffusion terms are not discretized independently. Instead, the weighting in (19) is chosen from their local ratio. For one-dimensional FP equations, this construction is well known to preserve nonnegativity under the appropriate time-step restriction and to reproduce the correct discrete equilibrium associated with zero probability flux. In the present two-dimensional implementation, the same construction is applied direction-by-direction to the diagonal drift–diffusion contributions. This significantly reduces the artificial numerical diffusion and spurious oscillations that may arise from a straightforward centered approximation.
The diffusion matrix in the present stochastic SIRS model is not diagonal, so the FP equation also contains the mixed term
This contribution is treated separately. Setting
we use the centered approximation
Consequently, if denotes the Chang–Cooper discretization of the diagonal drift–diffusion terms and denotes the approximation (20), the full explicit update can be written schematically as
Thus the diagonal part is advanced using Chang–Cooper fluxes, while the cross-diffusion generated by the common transmission noise is included through a centered mixed-derivative correction. This is the same decomposition used in the numerical implementation.
The time discretization in (21) is explicit, and therefore the time step must be chosen sufficiently small relative to the spatial mesh and the magnitudes of the drift and diffusion coefficients. Under the corresponding stability restriction, the Chang–Cooper component of the scheme retains the positivity-preserving character of the underlying discretization. Because the mixed derivative is added separately by a centered explicit approximation, positivity of the complete two-dimensional update is not automatic for an arbitrary time step. We therefore use a sufficiently fine temporal grid and monitor the minimum value of the computed density throughout the calculation.
An equally important property is conservation of total probability. For the continuous FP equation,
and hence the zero-flux boundary condition implies
The discrete Chang–Cooper terms are written as differences of neighboring numerical fluxes, so the interior contributions telescope when summed over all grid cells. Thus conservation reduces to the treatment of the boundary fluxes.
Accordingly, after every forward Euler update, the zero-flux boundary condition from (4) is imposed directly. Because the diffusion matrix contains the off-diagonal term , the normal flux cannot be enforced using only the diagonal diffusion coefficients. For example, on a vertical boundary the condition involves
whereas on a horizontal boundary,
The boundary values of the density are therefore reconstructed so that the complete normal probability flux, including the cross-diffusion contribution, vanishes. The four corner values are obtained by averaging the neighboring boundary values. With this treatment, the spatial discretization retains the conservative character of the FP equation.
Numerical approximation of the adjoint equation
The adjoint equation (10) is solved backward in time from the terminal condition
Unlike the forward equation, which is written in conservative FP form, the adjoint equation is discretized directly in its backward Kolmogorov form,
The face-centered drift coefficients used by the forward Chang–Cooper solver are first averaged to the spatial grid points. For interior grid points, the first derivatives are approximated by centered differences,
while the diagonal second derivatives are approximated by the usual three-point formulas. The mixed derivative is approximated by
Consequently, if denotes the resulting spatial finite-difference operator, the backward time update takes the form
The adjoint boundary condition
is also enforced directly at every backward time step. Thus, on the vertical boundaries the discretization accounts for the coupling between and , while on the horizontal boundaries it accounts for the coupling between and . The corner values are again obtained by averaging adjacent boundary values.
A sequential quadratic Hamiltonian method
We employ the sequential quadratic Hamiltonian (SQH) method to numerically resolve the optimal feedback maps. A full exposition of the SQH method with worked examples can be found in [4].
The SQH method is an iterative procedure based on successive quadratic perturbations of the Hamiltonian (12). For a penalization parameter and a current control approximation , we define the augmented Hamiltonian
The quadratic term restricts the magnitude of the change in the control between consecutive SQH iterations. In particular, increasing forces the new control to remain closer to the previous iterate, whereas decreasing permits a larger update.
Starting from an initial control , the corresponding forward FP solution and adjoint solution are computed. At iteration , the new feedback control is obtained pointwise in by solving
This pointwise update is particularly convenient for the present problem because the three control components can be obtained explicitly and subsequently projected onto their admissible intervals.
For the mixed control cost used here, the pointwise minimization leads to explicit candidate values for each control. Writing
the updates implemented numerically are
and
where denotes projection onto the interval . After updating the controls, the drift and diffusion coefficients are recomputed and the forward FP equation is solved again.
The magnitude of the control update is measured by
The iteration terminates when or when a prescribed maximum number of iterations has been reached.
To determine whether the candidate control is accepted, we employ a sufficient-decrease criterion. Specifically, the candidate is accepted when
If this condition fails, the candidate control and state are rejected, the previous iterate is restored, and the quadratic penalization parameter is increased according to
If the sufficient-decrease condition is satisfied, the candidate control is accepted, the corresponding adjoint equation is solved, and the penalization parameter is decreased according to
Thus, the SQH procedure adaptively balances the size of the control update against the decrease obtained in the objective functional.
Analysis of the SQH method
We next establish some properties of the SQH iteration. The first result gives a sufficient-decrease property analogous to that obtained for time-dependent controls, with the control norm now taken over the full space-time domain .
Theorem 4.1. Let and be generated by the SQH method applied to (7), with . Then, for the current value of the SQH penalization parameter,
In particular, if , then
where
Proof. By definition of the SQH update, for almost every ,
In particular, choosing gives
Using the definition of the augmented Hamiltonian, we therefore obtain
for almost every . Integrating over and applying the Hamiltonian identity derived in § 3 gives
which proves (26).
As a consequence of Theorem 4.1, we obtain a basic convergence property of the accepted SQH iterates.
Theorem 4.2. Suppose that the accepted SQH iterations satisfy . Then
(a) the sequence is decreasing and converges to some
(b)
Proof. Statement (a) follows immediately from (26), since the objective functional is bounded below. For statement (b), using gives
Summing from to yields the telescoping estimate
Since the objective functional is bounded below, the right-hand side remains bounded as . Hence
which implies
In particular, for any prescribed tolerance , the stopping criterion
is eventually reached along the accepted SQH iterates. Moreover, the continuity properties of the control-to-state map established in § 3 imply that the corresponding changes in the FP states also tend to zero.
We finally give a stronger convergence statement for the mixed – control cost used in the numerical experiments. Define the SQH update map
by
where and denotes the corresponding adjoint state.
Theorem 4.3 (Convergence of SQH for the mixed – cost). Assume that
and suppose that, for a fixed , the SQH update map is Lipschitz continuous and satisfies
for all admissible controls , with some . Then the SQH iteration
converges strongly in to a unique fixed point . Moreover, if
and is the corresponding adjoint state, then
for almost every .
Proof. Under assumption (28), is a contraction on . Hence, by the Banach fixed-point theorem, there exists a unique such that
and
At the fixed point,
Since the quadratic SQH penalty vanishes at ,
Therefore the fixed-point condition gives
for almost every , which is precisely the pointwise Hamiltonian minimum condition.
Numerical results
In this section, we present numerical results for the FP optimal control framework computed using the SQH algorithm. We set , so that the total population in the underlying SIRS model approaches unity. The state variables are the susceptible and infected fractions, , and the FP equation is solved on the computational domain . We discretize each spatial direction using 50 grid points and take the final time to be , with 10001 temporal grid points.
We take the transmission, recovery, and loss-of-immunity parameters to be , , and , respectively. The three feedback controls , , and act by reducing transmission, reducing loss of immunity, and increasing recovery, respectively. Their admissible ranges are
Thus, unlike time-dependent open-loop interventions, the controls obtained from the FP formulation are feedback policies whose values depend on both the current epidemic state and time.
The initial probability density is taken to be a two-dimensional Gaussian centered at . Specifically, the numerical implementation uses
restricted to the computational domain and normalized numerically to have unit mass. This represents uncertainty in the initial epidemic state around a population consisting predominantly of susceptible individuals with a small initially infected fraction.
Stochasticity is introduced through uncertainty in the transmission, loss-of-immunity, and recovery mechanisms. In the controlled stochastic system, the corresponding diffusion amplitudes are modulated by the same feedback controls that modify the drift, so that the transmission noise is scaled by , the loss-of-immunity noise by , and the recovery noise by . In the simulations presented here, the baseline noise amplitudes are taken to be .
The objective functional combines the state-dependent epidemic cost with a mixed penalty on the three feedback controls. In particular, the control contribution has the form
where we take . The contribution penalizes the overall amount of intervention and can promote sparse or concentrated control actions, while the quadratic term regularizes the controls and discourages excessively large interventions.
Scenario 1. In the first scenario, we consider the running cost , . Thus, infection is penalized continuously throughout the time interval, with larger values of the infected fraction incurring a proportionally larger state cost. No terminal-state cost is imposed. This provides a baseline test of the feedback-control framework in which the objective is to reduce the cumulative infection burden while balancing this reduction against the cost of the three interventions. The resulting controlled FP density and optimal feedback controls are shown in Figure 1. The controlled density evolves toward states with smaller values of , while the feedback maps show how the three interventions are deployed over the state space and time. The control reduces transmission and hence suppresses the transition from susceptible to infected individuals, reduces the loss of immunity and therefore limits the return of recovered individuals to the susceptible class, and increases the recovery rate and promotes the transition from infected to recovered individuals. The distinct spatial and temporal structures of these controls illustrate how the optimizer combines prevention of new infections, retention of immunity, and enhanced recovery to reduce the cumulative infection burden.

Figure 1. Controlled FP solution and optimal feedback controls. The columns correspond, from left to right, to the initial time , the midpoint , and the final time . The first row shows the controlled probability density , while the second, third, and fourth rows show the optimal feedback controls , , and , respectively.
The corresponding controlled and uncontrolled stochastic simulations are shown in Figure 2. In the uncontrolled system, the susceptible fraction decreases substantially while the infected fraction undergoes a pronounced increase, whereas the optimized feedback policy considerably limits both the loss of susceptible individuals and the growth of the infected population. The ensemble means exhibit the same qualitative behavior as the individual realizations. The mean controls evaluated along the controlled stochastic trajectories show how the state-dependent feedback policy is implemented dynamically: provides the principal

Figure 2. Monte Carlo simulations of the controlled and uncontrolled stochastic system. The top row shows the controlled stochastic trajectories for the susceptible state and infected state , together with the mean feedback controls evaluated along the stochastic trajectories. The bottom row shows the corresponding uncontrolled stochastic trajectories and mean controls. The individual curves represent stochastic realizations, while the emphasized curve denotes the ensemble mean.
mechanism for suppressing new infections, while acts by retaining individuals in the recovered class and promotes removal from the infected class through enhanced recovery. Thus, the stochastic simulations confirm that the feedback controls reduce the infection burden relative to the uncontrolled dynamics while adapting the intervention to the evolving epidemic state.
Scenario 2. In this scenario, we consider running cost function , and zero terminal cost. This imposes no state penalty while the infected fraction remains below , but strongly penalizes excursions above this threshold. This is meant to represent the goal of “flattening the curve” so as to not overwhelm the healthcare system. The controlled FP density and optimal feedback controls are shown in Figure 3. In contrast to Scenario 1, the optimizer is not rewarded for reducing throughout the entire state space; instead, control is valuable primarily when it reduces the probability of entering or remaining in the penalized region . This is reflected in the state-dependent structure of the feedback maps. The control reduces transmission and therefore limits the flow from the susceptible to the infected class, reduces loss of immunity and retains individuals in the recovered class, and increases recovery and promotes removal from the infected class. Together, these mechanisms reshape the probability density so as to limit its movement into states with infection levels above the prescribed threshold, while avoiding unnecessary intervention in regions where the infection-dependent running cost vanishes.

Figure 3. Controlled FP solution and optimal feedback controls. The columns correspond, from left to right, to the initial time , the midpoint , and the final time . The first row shows the controlled probability density , while the second, third, and fourth rows show the optimal feedback controls , , and , respectively.
The corresponding controlled and uncontrolled stochastic simulations are shown in Figure 4. The uncontrolled trajectories exhibit a pronounced increase in the infected fraction, with trajectories entering the region that is strongly penalized by the objective, together with a substantial decrease in the susceptible population. Under the optimized feedback policy, the growth of the infected population is markedly suppressed and the stochastic trajectories are largely kept away from the high-infection region, while the decline in the susceptible population is also reduced. The mean controls along the stochastic trajectories illustrate the mechanism by which this threshold regulation is achieved: suppresses the generation of new infections, reduces the return of recovered individuals to the susceptible class, and enhances the removal of infected individuals through recovery. The resulting behavior highlights the principal feature of this scenario: rather than minimizing infection uniformly, the feedback strategy allocates control effort specifically to reduce the probability and extent of excursions above the prescribed infection threshold.

Figure 4. Monte Carlo simulations of the controlled and uncontrolled stochastic system. The top row shows the controlled stochastic trajectories for the susceptible state and infected state , together with the mean feedback controls evaluated along the stochastic trajectories. The bottom row shows the corresponding uncontrolled stochastic trajectories and mean controls. The individual curves represent stochastic realizations, while the emphasized curve denotes the ensemble mean.
Scenario 3. In this scenario, we consider , , so that there is no running state cost and the objective instead provides a terminal reward for states in which the susceptible fraction exceeds the prescribed level . The resulting controlled FP solution and optimal feedback controls are shown in Figure 5. Since the objective acts only through the terminal susceptible population, the feedback controls are selected according to their ability to steer the probability density toward states satisfying at the final time. The control contributes directly to this objective by reducing transmission and hence limiting the loss of susceptible individuals to the infected class. The control has a different effect: it reduces the return of recovered individuals to the susceptible class and therefore does not directly promote a larger value of , while increases recovery from the infected to the recovered class and can influence the subsequent evolution of both and . The resulting feedback maps therefore reflect the different contributions of these three mechanisms to the terminal susceptible-state objective rather than a direct penalty on the infected population during the time interval.

Figure 5. Controlled FP solution and optimal feedback controls. The columns correspond, from left to right, to the initial time , the midpoint , and the final time . The first row shows the controlled probability density , while the second, third, and fourth rows show the optimal feedback controls , , and , respectively.
The corresponding controlled and uncontrolled stochastic simulations are shown in Figure 6. In the uncontrolled system, transmission produces a substantial decline in the susceptible population, whereas the optimized feedback policy limits this loss and maintains the controlled trajectories at larger values of . This behavior is consistent with the terminal reward, which favors realizations that reach the final time with . Although the objective contains no direct running penalty on , the controlled infected trajectories are also affected because the interventions alter the transitions among the susceptible, infected, and recovered populations. In particular, suppresses the transition, suppresses the transition, and enhances the transition. The mean controls along the stochastic trajectories consequently illustrate a policy designed primarily to preserve the susceptible population at the terminal time, rather than to minimize the infected fraction throughout the entire time horizon.

Figure 6. Monte Carlo simulations of the controlled and uncontrolled stochastic system. The top row shows the controlled stochastic trajectories for the susceptible state and infected state , together with the mean feedback controls evaluated along the stochastic trajectories. The bottom row shows the corresponding uncontrolled stochastic trajectories and mean controls. The individual curves represent stochastic realizations, while the emphasized curve denotes the ensemble mean.
Scenario 4. In this scenario, we consider , , combining a threshold-based running penalty on infection with a terminal reward for maintaining the susceptible fraction above the prescribed level . The controlled FP density and optimal feedback controls are shown in Figure 7. In this case, the feedback policy must balance two state objectives: limiting the probability of occupying states with during the evolution and steering the terminal density toward states with . The control is particularly relevant to both objectives because reducing transmission suppresses the transition, simultaneously limiting the growth of infection and preserving susceptible individuals. The control reduces the loss of immunity and therefore suppresses the transition, while increases recovery and enhances the transition. The different state- and time-dependent structures of the three feedback maps reflect how the optimizer combines these mechanisms to balance suppression of

Figure 7. Controlled FP solution and optimal feedback controls. The columns correspond, from left to right, to the initial time , the midpoint , and the final time . The first row shows the controlled probability density , while the second, third, and fourth rows show the optimal feedback controls , , and , respectively.
infection above the threshold with the terminal susceptible-population objective. The corresponding controlled and uncontrolled stochastic simulations are shown in Figure 8. The uncontrolled trajectories exhibit a substantial decrease in the susceptible fraction together with an increase in infection that carries the population into the penalized region . Under the optimized feedback policy, the growth of the infected population is reduced while a larger susceptible fraction is maintained, reflecting the simultaneous influence of the running and terminal objectives. The mean feedback controls along the stochastic trajectories show how the three intervention mechanisms contribute to this behavior: reduces the generation of new infections and the associated loss of susceptible individuals, retains recovered individuals in the immune class by reducing the transition, and accelerates recovery through the transition. Thus, Scenario 4 illustrates how the feedback framework balances short-term regulation of excursions above the infection threshold with the terminal objective of maintaining a sufficiently large susceptible population.

Figure 8. Monte Carlo simulations of the controlled and uncontrolled stochastic system. The top row shows the controlled stochastic trajectories for the susceptible state and infected state , together with the mean feedback controls evaluated along the stochastic trajectories. The bottom row shows the corresponding uncontrolled stochastic trajectories and mean controls. The individual curves represent stochastic realizations, while the emphasized curve denotes the ensemble mean.
Conclusion
In this work, we developed a FP optimal control framework for a stochastic SIRS epidemic model with three intervention mechanisms targeting disease transmission, loss of immunity, and recovery. By incorporating space- and time-dependent feedback controls into both the drift and diffusion coefficients, the proposed approach enables interventions to influence the probability distribution of epidemic outcomes rather than individual trajectories alone. We investigated the existence of optimal controls and derived first-order necessary optimality conditions involving a forward Fokker–Planck equation, a backward adjoint equation, and a Hamiltonian minimization condition. For numerical computation, we combined a Chang–Cooper discretization with a finite-difference treatment of cross-diffusion and a SQH algorithm, together with an analysis of its convergence properties. Numerical experiments involving four epidemiological objectives demonstrated how the resulting feedback policies adapt to different goals, including reducing cumulative infection, limiting excursions above an infection threshold, and maintaining a desired susceptible population at the terminal time. Monte Carlo simulations further illustrated the effectiveness of the optimized controls relative to uncontrolled stochastic dynamics. Future work will focus on extending the framework to more complex epidemic models, strengthening the analysis and numerical treatment of degenerate diffusion, and incorporating epidemiological data for model calibration and validation.
Acknowledgements
S. Roy was supported by the US National Science Foundation grant nos. 2212938, 2309491, 2230790.
References
- [1]Linda JS Allen. A primer on stochastic epidemic models: Formulation, numerical simulation, and analysis. Infectious Disease Modelling, 2(2):128–142, 2017.DOI
- [2]Mario Annunziato and Alfio Borzì. A fokker–planck approach to the reconstruction of a cell membrane potential. SIAM Journal on Scientific Computing, 43(3):B623–B649, 2021.DOI
- [3]Marcelo Bongarti, Christian Parkinson, and Weinan Wang. Optimal control of a reaction-diffusion epidemic model with non-compliance. European Journal of Applied Mathematics, 37(2):313–338, 2026.
- [4]Alfio Borzì. The Sequential Quadratic Hamiltonian Method: Solving Optimal Control Problems. Chapman and Hall/CRC, 2023.
- [5]Tim Breitenbach and Alfio Borzì. The pontryagin maximum principle for solving fokker–planck optimal control problems: T. breitenbach, a. borzi. Computational Optimization and Applications, 76(2):499–533, 2020.DOI
- [6]J. S. Chang and G. Cooper. A practical difference scheme for fokker–planck equations. Journal of Computational Physics, 6(1):1–16, 1970.DOI
- [7]Jihad C. Dagher and Christian Parkinson. Optimal lockdowns under constraints. Economic Inquiry, 63(2):523–544, 2025.DOI
- [8]Mamadou L Diagne, Folashade B Agusto, Herieth Rwezaura, Jean M Tchuenche, and Suzanne Lenhart. Optimal control of an epidemic model with treatment in the presence of media coverage. Scientific African, 24:e02138, 2024.
- [9]Stefania Maria Buccellato Elisabetta Tornatore. On a stochastic sir model. Applicaciones Mathematicae, 34(4):389–400, 2007.
- [10]Lawrence C Evans. Partial differential equations, volume 19. American mathematical society, 2022.
- [11]Arthur Fleig and Roberto Guglielmi. Optimal control of the fokker–planck equation with space-dependent controls. Journal of Optimization Theory and Applications, 174(2):408–427, 2017.DOI
- [12]Wendell H. Fleming and H. Mete Soner. Controlled Markov Processes and Viscosity Solutions. Springer, 2 edition, 2006.DOI
- [13]Alison Gray, David Greenhalgh, Liangjian Hu, Xuerong Mao, and Jiafeng Pan. A stochastic differential equation sis epidemic model. SIAM Journal on Applied Mathematics, 71(3):876–902, 2011.DOI
- [14]Elsa Hansen and Troy Day. Optimal control of epidemics with limited resources. Journal of Mathematical Biology, 62(3):423–451, 2011.DOI
- [15]Bei Hu. Blow-up theories for semilinear parabolic equations, volume 2018. Springer Science & Business Media, 2011.
- [16]W. O. Kermack and A. G. McKendrick. A contribution to the mathematical theory of epidemics. Proceedings of the Royal Society of London. Series A, 115(772):700–721, 1927.DOI
- [17]Olga Aleksandrovna Ladyzhenskaja, Vsevolod Alekseevich Solonnikov, and Nina N Ural’tseva. Linear and quasi-linear equations of parabolic type, volume 23. American Mathematical Soc., 1968.
- [18]Alberto Lanconelli and Matteo Mori. Itô vs stratonovich stochastic sir models. Applied Mathematics Letters, 134:108368, 2022.DOI
- [19]Gary M Lieberman. Second order parabolic differential equations. World scientific, 1996.
- [20]Xing Lü, Hong-wen Hui, Fei-fei Liu, and Ya-li Bai. Stability and optimal control strategies for a novel epidemic model of covid-19. Nonlinear Dynamics, 106(2):1491–1507, 2021.DOI
- [21]Chloe Ngo, Christian Parkinson, and Weinan Wang. Optimal control of an sir model with noncompliance as a social contagion. Mathematical Biosciences, page 109822, 2026.DOI
- [22]Christian Parkinson and Souvik Roy. A fokker-planck framework for control of epidemics. Journal of Mathematical Biology, 93(4):47, 2026.arxiv.org/abs/2601.20181
- [23]Christian Parkinson and Weinan Wang. A compartmental model for epidemiology with human behavior and stochastic effects. Mathematical Biosciences, page 109588, 2025.arxiv.org/abs/2507.01046
- [24]Souvik Roy, A. Borzì, and Abderrahmane Habbal. Pedestrian motion modelled by fokker–planck nash games. Royal Society Open Science, 4(9):170648, 2017.DOI
- [25]Ralph Edwin Showalter. Monotone operators in Banach space and nonlinear partial differential equations, volume 49. American Mathematical Soc., 2013.
- [26]Terence Tao. An introduction to measure theory, volume 126. American Mathematical Soc., 2011.
- [27]Elisabetta Tornatore, Stefania Maria Buccellato, and Pasquale Vetro. Stability of a stochastic sir system. Physica A: Statistical Mechanics and its Applications, 354:111–126, 2005.DOI