Minimax Control using Random Sampling

About image About image About image

Example 1: Biochemical Process

We consider a biochemical process model \(Y\) of continuous culture fermentation. Let \(Y = (X, S, P) \in \mathbb{R}^3\) satisfies the differential system: \begin{equation*} \begin{cases} \overset{.}{X}(t) = -D X(t) + \mu(t) X(t)\\ \overset{.}{S}(t) = D \big( S_f(t) - S(t) \big) - \frac{\mu(t)X(t)}{Y_{x/s}}\\ \overset{.}{P}(t) = -D P + \big( \alpha\mu(t) + \beta \big) X(t)\\ \end{cases} \end{equation*}

where \(X\) denotes the biomass concentration, \(S\) the substrate concentration, and \(P\) the product concentration of a continuous fermentation process. The model is controlled by \(S_f \in [S_f^\mathit{min}, S_f^\mathit{max}]\). While the dilution rate \(D\), the biomass yield \(Y_{x/s}\) , and the product yield parameters \(\alpha\) and \(\beta\) are assumed to be constant and thus independent of the actual operating condition, the specific growth rate \(\mu : \mathbb{R} \rightarrow \mathbb{R}\) of the biomass is a function of the states:

\begin{equation*} \mu(t) = \mu_m\frac{\left( 1-\frac{P(t)}{P_m}\right) S(t)}{K_m + S(t)+\frac{S(t)^2}{K_i}} \end{equation*}

The goal is to maximize the average productivity presented by the cost function:

\begin{equation*} {\cal J}_{z_0,\varepsilon}(x(\cdot),u(\cdot))= \frac{1}{T}\int^T_0DP(t)dt \end{equation*}

with \(x(\cdot)=(X(\cdot),S(\cdot),P(\cdot))\) and \(x(0)\in B(z_0,\varepsilon)\) while satisfying the constraint on the state \(X\):

\begin{equation} \frac{1}{T}\int^T_0X(t)dt\leq 5.8 \end{equation}

In the following experiences presented in "Results" page (the bottom below), we consider a codomain \([28.7, 40]\) of the original continuous control function \(S_f(\cdot)\) which is discretized into a finite set \(U\), for the needs of our method.
After discretization, \(S_f(\cdot)\) is a piecewise-constant function that takes its values in the finite set \(U\) made of 2 values uniformly taken in \(\{28.7, 40\}\). The function \(S_f(\cdot)\) changes (possibly) its value every \(\tau\) seconds.
We take: \(z_0=(6.52, 12.5, 22.40)\), \(\varepsilon=0\), \(\tau = 3\), \(\Delta t=\tau/100\), \(T= 48\), \(K=T/\tau=16\). We consider an additive disturbance \(d\) with \(d(\cdot)\in {\cal D}= [-0.05,0.05]\).

We perform 3 experiences:
  • We randomly pick one sample over every \(100\) possible controls, which gives \(2^{16}/100 \approx 655\) samples.
  • We randomly pick one sample over every \(10\) possible controls, which gives \(2^{16}/10 \approx 6,554\) samples.
  • We consider all the possible controls, which gives \(2^{16} = 65,536\) samples.

These 3 experiences give the following results:
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.1618\) (the constraint on the state \(X\) is satisfied since \(\frac{1}{T}\int^T_0X(t)dt = 5.782 \leq 5.8\)). The CPU computation time of this example is 7 seconds.
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.1667\) (the constraint on the state \(X\) is satisfied since \(\frac{1}{T}\int^T_0X(t)dt = 5.794 \leq 5.8\)) The CPU computation time of this example is 18.69 seconds.
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.1677\) (the constraint is satisfied since \(\frac{1}{T}\int^T_0X(t)dt = 5.7995 \leq 5.8\)). The CPU computation time of this example is 200 seconds.

For each experience, we give the optimal control \(u^*\) and the evolution of \(X(t)\), \(S(t)\) and \(P(t)\). In the plans \(X\), \(S\) and \(P\), the red curve represents the Euler approximation \(\tilde{x}_{z_0}^{u^*}(t)\) of the solution without disturbance (\(d=0\)) as a function of time \(t\) using \(u^*\) and the green curves correspond to the borders of the tube centered around the red curve, that is \({\cal B}(t)\equiv B(\tilde{x}_{z_0}^{u^*}(t),\delta_{\varepsilon,D}^{u^*}(t))\) with \(\tilde{x}_{z_0}^{u^*}(0)=z_0\) and \(\delta_{\varepsilon,D}^{u^*}(0)=\varepsilon=0\).
We give also the evolution of \(\lambda(t)\), \(\gamma(t)\) and \(\delta(t)\) as a function of time \(t\).

Results Source code Readme

Example 2: Biochemical Process

We replicate here the same experiences as in the first example, but we remove now the constraint on the state \(X\). We take: \(z_0=(6.52, 12.5, 22.40)\), \(\varepsilon=0\), \(\tau = 3\), \(\Delta t=\tau/100\), \(T= 48\), \(K=T/\tau=16\). We consider an additive disturbance \(d\) with \(d(\cdot)\in {\cal D}= [-0.05,0.05]\).

We perform 3 experiences:
  • We randomly pick one sample over every \(100\) possible controls, which gives \(2^{16}/100 \approx 655\) samples.
  • We randomly pick one sample over every \(10\) possible controls, which gives \(2^{16}/10 \approx 6,554\) samples.
  • We consider all the possible controls, which gives \(2^{16} = 65,536\) samples.

These 3 experiences give the following results:
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.3775\) (The average of the state \(X\) is \(\frac{1}{T}\int^T_0X(t)dt = 6.289\)). The CPU computation time of this example is 8 seconds.
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.499\) (The average of the state \(X\) is \(\frac{1}{T}\int^T_0X(t)dt = 6.519\)). The CPU computation time of this example is 23.7 seconds.
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.505\) (The average of the state \(X\) is \(\frac{1}{T}\int^T_0X(t)dt = 6.5387\)). The CPU computation time of this example is 210 seconds.

For each experience, we give the optimal control \(u^*\) and the evolution of \(X(t)\), \(S(t)\) and \(P(t)\). In the plans \(X\), \(S\) and \(P\), the red curve represents the Euler approximation \(\tilde{x}_{z_0}^{u^*}(t)\) of the solution without disturbance (\(d=0\)) as a function of time \(t\) using \(u^*\) and the green curves correspond to the borders of the tube centered around the red curve, that is \({\cal B}(t)\equiv B(\tilde{x}_{z_0}^{u^*}(t),\delta_{\varepsilon,D}^{u^*}(t))\) with \(\tilde{x}_{z_0}^{u^*}(0)=z_0\) and \(\delta_{\varepsilon,D}^{u^*}(0)=\varepsilon=0\).
We give also the evolution of \(\lambda(t)\), \(\gamma(t)\) and \(\delta(t)\) as a function of time \(t\).

Results Source code Readme
About image About image About image
About image About image About image

Example 3: Biochemical Process

We replicate here the same experiences as in the first example, but we consider a biochemical system without disturbance (\(d=0\)) that satisfies the constraint on the state \(X\). We take: \(z_0=(6.52, 12.5, 22.40)\), \(\varepsilon=0\), \(\tau = 3\), \(\Delta t=\tau/100\), \(T= 48\), \(K=T/\tau=16\).

We perform 3 experiences:
  • We randomly pick one sample over every \(100\) possible controls, which gives \(2^{16}/100 \approx 655\) samples.
  • We randomly pick one sample over every \(10\) possible controls, which gives \(2^{16}/10 \approx 6,554\) samples.
  • We consider all the possible controls, which gives \(2^{16} = 65,536\) samples.

These 3 experiences give the following results:
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.1009\). We check that the constraint on the state \(X\) is satisfied since \(\frac{1}{T}\int^T_0X(t)dt = 5.7893 \leq 5.8\). The CPU computation time of this example is 1.644 seconds.
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.108\). We check that the constraint on the state \(X\) is satisfied since \(\frac{1}{T}\int^T_0X(t)dt = 5.7991 \leq 5.8\). The CPU computation time of this example is 3 seconds.
  • We get: \({\cal K}_{z_0,\varepsilon}(u^*)=3.1143\). We check that the constraint on the state \(X\) is satisfied since \(\frac{1}{T}\int^T_0X(t)dt = 5.7967 \leq 5.8\). The CPU computation time of this example is 21.76 seconds.

For each experience, we give the optimal control \(u^*\) and the evolution of \(X(t)\), \(S(t)\) and \(P(t)\). In the plans \(X\), \(S\) and \(P\), the red curve represents the Euler approximation \(\tilde{x}_{z_0}^{u^*}(t)\) of the solution as a function of time \(t\) using \(u^*\) and the green curves correspond to the borders of the tube centered around the red curve, that is \({\cal B}(t)\equiv B(\tilde{x}_{z_0}^{u^*}(t),\delta_{\varepsilon,0}^{u^*}(t))\) with \(\tilde{x}_{z_0}^{u^*}(0)=z_0\) and \(\delta_{\varepsilon,0}^{u^*}(0)=\varepsilon=0\).
We give also the evolution of \(\lambda(t)\) and \(\delta(t)\) as a function of time \(t\).

Results Source code Readme
Design: TemplateMo