Reaction – diffusion equation with nonlocal boundary condition subject to PID-controlled bioreactor

We study a system of two parabolic nonlinear reaction–diffusion equations subject to a nonlocal boundary condition. This system of nonlinear equations is used for mathematical modeling of biosensors and bioreactors. The integral-type nonlocal boundary condition links the solution on the system boundary to the integral of the solution within the system inner range. This integral plays an important role in the nonlocal boundary condition and in the general formulation of the boundary value problem. The solution at boundary points is calculated using the integral combined with the proportional-integral-derivative controller algorithm. The mathematical model was applied for the modeling and control of drug delivery systems when prodrug is converted into active form in the enzyme-containing bioreactor before the delivering into body. The linear, exponential, and stepwise protocols of drug delivery were investigated, and the corresponding mathematical models for the prodrug delivery were created.


Introduction
Our mathematical model belongs to an intensely studied class of problems, namely differential equations subject to nonlocal boundary conditions.Nonlocal boundary conditions are commonly referred to as the boundary (or initial) conditions describing the relationship between the desired solution values on multiple points.Unlike classical boundary conditions, nonlocal conditions do not describe the values of the solution or its derivative in a particular range of the single boundary point.The expressions describing the nonlocal boundary conditions may contain integral expressions of the desired solution, as is the case with our model.This is commonly called a problem with nonlocal integral conditions.
Historically, the oldest mathematical works on the nonlocal conditions seem to be the book [19] and the article [14].Here these conditions are known as the "more general boundary conditions" [21].These works, however, have not attracted much attention.As far as we know, the first mathematical models with nonlocal conditions describing real physical processes appeared in scientific journals in the 1960s [2,11].These works, although not immediately, have attracted more consideration in scientific publications, especially in mathematical journals.
A relatively large number of mathematical models with nonlocal conditions describing real processes in a number of applications have been created over the last few decades.Among notable applications, there are heat conduction, thermoelasticity, hydrodynamics, semiconductor devices, ecology, geophysical flows, population dynamics, electrochemistry, and biotechnology (see [3-5, 10, 13, 18] and the references therein).
The main peculiarity of the present work is a sufficiently detailed explanation of the physical principles that were the basis of the nonlocal boundary condition, which reflects the control (regulation) principle.The described control system is based on four mechanisms: the given control function (set-point function), the monitoring signal (integral value, measured process variable), the control signal (computed by the PID controller), and a mechanical device providing the boundary value.
In this article, we study a system of two parabolic nonlinear reaction-diffusion equations subject to a nonlocal boundary condition.This system of nonlinear equations is used for mathematical modeling of biosensors and bioreactors [1].Our purpose of this paper is to provide a mathematical model suitable for the monitoring of the product molar flow into the body.To this end, a control system is used to monitor the outflow of a bioreactor through manipulation of its input parameters.
This model not only provides a set of diffusion-reaction equations, but also describes the underlying physical process together with its possible applications.
Today about 5-10% of newly introduced drugs are prodrugs [15,22].They are more stable and sometimes possess special parameters necessary for the treatment [22].In the body, or even in the cell, they are converted into an active form.Very often, enzymatic conversion of a prodrug to an active form is applied.For these purposes, enzymatic capacity of the body is explored [22].
However, this approach has some limitations.There is a limited number of suitable enzymatic systems in the body and/or too low enzymatic activity.Also, there is a problem with side products of the enzymatic conversion of the prodrug into an active form.Sometimes, side products are toxic or causing undesirable effects in the body.
In some cases, before delivering the drug into the body, a prodrug outside the body should be activated.Immobilized enzyme-containing flow-through reactors can be used in this case, the prodrug on the inlet of the reactor and an active form on the outlet.https://www.mii.vu.lt/NASuch a construction has numerous advantages.Inside the reactor, we can organize any enzymatic system possessing suitable specificity and necessary activity.We can organize a polyenzymatic system capable of consuming the side products and converting them into safe products, or simply locking them within the reactor.However, enzyme-containing reactors are not very stable due to inactivation of an immobilized enzyme.Enzymecontaining reactors possess different activities due to the variability of the conditions of the production technology.Each reactor must be calibrated before the installation and should be controlled during the whole cycle of operation.Performance of such bioreactors can be monitored by controlling the concentration of the active drug at the output of the reactor.Based on these data, the concentration of the prodrug can be monitored to achieve necessary level of the active drug on the exit or necessary dynamics of the drug to be delivered into the body.However, this is not always possible.Sometimes, the active drug at the output cannot be detected by suitable instruments because the drug is immediately consumed or diffused.In some cases, it is possible to control the enzymatic process inside the bioreactor.For example, the hydrolysis process is led by the production of ions.This means that the conductivity of such media is increasing.Sometimes, side products of hydrolysis (or oxidation) are electrochemicaly active and can be easily detected.For this purpose, it is necessary to construct an analytic system inside the biochemical reactor.
The article is divided into sections.In Section 2, we describe the model with PID control, giving an introspection into related models is provided in Section 3. In Section 4, we describe the process in the bioreactor.Section 5 contains the numerical results illustrated by charts and descriptions.

The mathematical model
We analyze a system of two differential equations widely used in mathematical modeling [1].The key feature of this model is the nonlocal boundary condition that combines two different components of the solution.
We consider the boundary value problem for the system of two nonlinear diffusionreaction equations with initial conditions and boundary conditions The last nonlocal boundary condition is Here Q(t) is a given function (set-point), and K p , K i , and K d are nonnegative coefficients for the proportional, integral, and derivative terms.
The error function e(t) defines the difference between the required product molar flow Q(t) and the measured flow The nonlocal boundary condition (4) links the value of S(x, t) on the boundary where x = d to the integral value of P (x, t) in the inner range [n, m].The main peculiarity of the boundary condition ( 4) is its nonlocality due to the integration not only in the space domain [n, m], but also in the time domain [0, t].The PID controller continuously evaluates the error value e(t) and attempts to minimize the error over time by adjusting the control variable S(d, t) to a new value determined by (4).
We examine the problem of maintaining the molar outflow of a drug (product), which may vary over time.It is worth noting that the properties of the physical process prohibit direct measurements at the boundary of the bioreactor; therefore, the viable options are to regulate either the concentration or the flow of the substrate (or both).In the present work, the substrate concentration is regulated.

Analysis of mathematical models
In this section, we provide a number of important properties of the mathematical model ( 1)-( 4).We comprehensively examine how the nonlocal condition (4) differs from those of other authors.Also, we briefly point out analysis and numerical solution methods for the boundary value problems with nonlocal conditions.
First of all, notice that in the boundary value problem, the value of S(d, t) is not given; instead, condition (4) is stated.
Several other mathematical models subject to nonlocal conditions link the solution within the range boundaries to the integral across the entire range.A typical example is given in [4], where the author describes the quasi-static flexure of a thermoelastic rod.In this case, the entropy η(x, t) satisfies the equation https://www.mii.vu.lt/NA and two nonlocal boundary integral conditions In many articles [3,6,10], the authors study mathematical models subject to nonlocal conditions that include the solution or its derivative values only over the boundary points.In the one-dimensional case, there are only two points, the endpoints of the interval.Various nonlocal conditions based only on the values of the solution at the endpoints are rather widely analyzed in numerical analysis, peculiarly w.r.t. the stability of difference schemes (see [6] and references therein).
All the previously discussed mathematical models with nonlocal conditions are defined by a single second-order differential equation.The mathematical model ( 1)-( 4) is defined as a system of two differential equations with nonlocal condition (4), which links the solutions of the equations S(d, t) and P (x, t).One of the first mathematical models that considers a system of two differential equations subject to nonlocal conditions was published in the monograph [17], where the mathematical models that describe the processes occurring in bioreactors are studied.Bioengineers widely use the mathematical model of an ideal reactor, the purpose of which is prediction of changes in the considered system.
The processes occurring in the bioreactors are defined as a system of two differential equations (1), which are similar to the equations considered in the present study, but are subject to a different kind of nonlocal conditions (4).The conditions stated in [17] are defined only at the boundary points.Now we proceed to point out another more peculiarity of the model ( 1)-( 4).It is worth noting that our goal is not to simply solve problem (1)-( 4) once with given parameter values.Instead, we focus on picking the boundary substrate concentration S(d, t) in such a way that the product value P (x, t) would possess a specific property defined beforehand.In the simplest case, we aim to obtain the value of S(d, t) that minimizes the absolute value of e(t).
In this sense, the mathematical model ( 1)-( 4) is similar to (but does not fully match) the inverse problem with the overdetermination (observation) condition.
The class of inverse problems is closely related to the issue of control.Namely, the nonlocal (typically, integral) condition is used together with, and not instead of, the boundary or initial conditions.This extra condition is usually termed as the overdetermination (or observation) condition.The reasoning behind the use of such a condition is the necessity of finding not only the solution itself, but also an unknown function of the equation, typically interpreted as a characteristic of the energy source.An example of this can be found in [12].
Another example [20] concerns the situation where the overdetermination condition is not a boundary condition, but instead the value of the final solution.In this case, it is required to solve a second-order parabolic equation with the usual boundary conditions and, in addition, the final overdetermination condition.This additional condition means that the value of the solution at time T must coincide with the given function, and hence, the equation contains this unknown function (a characteristic of the source).The physical interpretation of this problem is related to the issue of the environmental safeguard in densely populated cities [20].For comparison purposes, it is worth noting that in our case the overdeterminantion condition takes a more complicated form and requires a particularly fine minimization of e(t).
Yet another trait of model ( 1)-( 4) is that the nonlocality in clause (4) in the general case is twofold: first, w.r.t. the spatial variable x and, second, w.r.t. the time t.These two types of nonlocality are different, and, as far as we know, both have not been jointly addressed in the references.
The spectrum of the differential operator plays an important role in the stability of the numerical solutions of simpler mathematical models with nonlocal conditions [6][7][8][9][10]16].Note that the parameter values of the nonlocal condition can significantly change the structure of the spectrum.Therefore, the theoretical study of the considered mathematical model ( 1)-( 4) subject to the double integral is an important task and poses new challenges for numerical experiments.
As a final remark, the mathematical models with nonlocal conditions describing real physical processes have been strongly encouraging the theoretical studies of differential equations and numerical methods.
Many authors who considered the problems subject to nonlocal conditions emphasized that the nonlocal boundary value problems have certainly been one of the most rapidly growing areas in various application fields.Hence, the development of numerical methods for solving the nonlocal boundary value problems has also been an important research area.The authors of the present article agree with these statements, but also prefer to rephrase them.In our opinion, the progress made in the study of numerical methods subject to nonlocal boundary value problems is indeed significant.However, there is still not enough feedback from the numerical methods studies toward practical applications.Too few works are devoted to the study of the new effects in application areas subject to nonlocal boundary value problems.Such effects cannot be identified using the normal classical conditions.Therefore, by the present article we try to strengthen the feedback effect of the mathematical models with nonlocal conditions.

The physical model
Let us consider the enzymatic reaction where S is a substrate of the enzyme considered as a prodrug, and P is one of the products of the enzymatic reaction to be controlled and considered as the active drug https://www.mii.vu.lt/NA (or the side product).We expect that the concentration of side product correlates with the concentration of the active drug.Therefore, we consider as P the concentration of the active drug, which can be monitored by an independent method (usually, electrochemical and sometimes optical).The enzymatic conversion of substrate can be derived as the Michaelis-Menten process: where V P is the product generation rate at a particular point within the bioreactor.Suppose that an enzyme is immobilized in a drug delivery system named as a bioreactor (Fig. 1).The enzyme is uniformly distributed in the bioreactor.The layer containing the immobilized enzyme is permeable for substrate, which means that the substrate S can diffuse in the bioreactor with diffusion coefficient D S .When substrate molecules reach the active center of the immobilized enzyme, the substrate is converted into the product P at the rate V p .The product P diffuses inside the bioreactor with diffusion coefficient D P .The concentration of the product P on the boundary of the bioreactor is given by P 0 .Inside the bioreactor, an electrode wire net (electrode) is deposited in order to perform the electrochemical monitoring of the enzymatic reaction.On the outer surface of the bioreactor, a reservoir with variable concentration of substrate is deposited.Let us consider that the concentration of the substrate S can be monitored depending on the response of the electrochemical electrode.
The given bioreactor can be represented as an active transdermal patch.The transdermal patch is applied to the patient's skin; one side of the transdermal patch delivers the drug (product) to the patient, whereas the other side is equipped with a controlled substrate (prodrug) supply system, which is designed to alter the substrate concentration or its flow.The transdermal patch is equipped with two electrodes that measure the electrochemical characteristics of the specific drug.In this way, it controls the concentration of the drug in the inner range of the transdermal patch.
The treatment process requires the drug to be transferred to a patient in accordance with the therapeutic protocol.This can be either a constant flow or a function of the time, e.g., in the early treatment stage the drug flow must start at a high value and then gradually decline as the treatment progresses, or the drug dose must continually rise until reaching a prescribed value.

Results
Depending on the disease and the patient's medical condition, a specific treatment protocol should be applied.During the treatment process, the patient must receive a strictly prescribed drug dose.We provide three treatment protocols: linear, exponential, and stepwise.
A numerical modeling was performed using a computer program developed by the authors.It implements an explicit finite difference scheme using a forward difference at time and a second-order central difference for the space derivative.The integral was computed by the Simpson rule.The computed values of a substrate were used as an input for the product value computation at the next step.The model properties are defined in Table 1, and all the additional properties are presented later in the text.
The control algorithm was applied to three treatment protocols, which are presented by different functions Q(t).The results of the linear treatment protocol modeling are shown in Fig. 2, where Q(t) is a linear function.
Here we see how the PID controller performs over the set-point function Q(t), which was set to the linear treatment protocol mode.In the beginning of the process, the substrate concentration in the reactor is zero, and the value of the error function is high; therefore, we observe that the substrate concentration from the beginning up to half a second is relatively high, whereas the flow of the product is rising until it reaches the set-point.We observe a little product flow overshoot and a slight drop until it reaches the required level set by the set-point function.Later, while the product flow value is close to the set-point, we observe the monotonous decrease in substrate concentration.
The second treatment protocol uses the exponential function Q(t).Basically, the exponential treatment protocol (Fig. 3) differs from the linear one only in the derivative of the set-point function, which is changing over time.Initially, the absolute value of the derivative is larger, but over time it decreases.From the beginning of the process we have an overshoot of the product flow, which is reduced later on.The smaller the absolute value of the derivative of the set-point function, the quicker the stabilization of the control mechanism.Accordingly, for this short (3 seconds) treatment process, it is more difficult to stabilize in the beginning.
The third protocol uses the stepwise function Q(t).The peculiarity of this protocol is that the drug flow over time decreases in steps and the required drug flow value is a piecewise constant function.
The stepwise treatment protocol (Fig. 4) is different from both the linear and exponential ones.In this case, the set-point function Q(t) is discontinuous.The PID control algorithm with experimentally selected values of the parameters (K p , K i , K d ) is able to control the process of this kind.As long as the product flow has not reached the set-point value, the control process is similar to the linear or exponential ones.Later on, the controller adjusts the substrate concentration, which in turn stabilizes the product flow.When the set-point function value changes, the substrate concentration should be adjusted accordingly.Starting from the 2nd second, we see a rapid decrease of the substrate concentration, which then increases again until stabilization.
Here we model a short-time treatment process (only 3 seconds), whereas the real treatment process requires considerably more time.
These examples visually demonstrate the control mechanism and its ability to satisfy the requirements for a variety of treatment protocols (represented as different set-point functions Q(t)).During this short modeling time, the control mechanism is able to stabilize and maintain a complex process.A numerical study revealed that the long running treatment processes can apply the existing model, as the critical actions were maintained at the short periods of time (see Fig. 4, time 0-0.5 s and 2-2.5 s).

Conclusions
In the present article, we propose a new type of nonlocal boundary condition for the parabolic reaction-diffusion equation system applied to the bioreactor modeling.The condition is nonlocal w.r.t. the time and space domains.
The double integral of this type in the nonlocal condition poses new challenges for numerical experiments related to this mathematical model.The spectrum of the differential operator plays an important role in the stability of the numerical solutions of simpler mathematical models with nonlocal conditions.The parameter values of the nonlocal condition can significantly change the structure of the spectrum.Therefore, the theoretical study of the considered mathematical model is an important task.https://www.mii.vu.lt/NAThe mathematical model was applied for the modeling operation and control of drug delivery systems when the prodrug is converted into an active form in the enzymecontaining bioreactor before being delivered into the body.The linear, exponential, and stepwise protocols of drug delivery were investigated, and the corresponding mathematical models for the prodrug delivery were created.

Table 1 .
Model constants and properties.