1 Introduction

Diabetes mellitus, as a common chronic disease, is characterized by high concentration level of plasma glucose due to the body’s inability to produce insulin or the ineffective utilization of the insulin produced. Diabetes mellitus is generally classified into three main types: type 1 diabetes, commonly seen in children and young adolescents, is caused by the malfunction of the body’s immune system and almost no insulin is produced from the pancreas; type 2 diabetes, commonly seen in adults, is thought to be caused by the dysfunction of the glucose–insulin regulatory system such as insulin resistance, so that body cells cannot absorb glucose timely by utilizing insulin; and gestational diabetes, which is first detected during pregnancy for glucose intolerance of various degrees. In recent decades, the number of diabetic patients increased rapidly all over the world and diabetes has come to be seen as an epidemic disease worldwide. Long-term complications of this disease, including possible blindness, amputation and kidney failure, affect hundreds of millions of people around the world. Based on such a reality, many researchers are motivated to study the pathogenesis and therapy of diabetes and other problems associated with it.

Current therapies for diabetic patients include taking medications, insulin supplementation and dietary adjustment. The subcutaneous injection of insulin is usually carried out through a syringe or insulin pump. Insulin pump is a medical device to administrate insulin or its analogs. In clinical practice, an insulin pump is popularly used in the therapy for both type 1 and type 2 diabetes and it can greatly relieve the pain of diabetic patients [19]. Even so, the life style of the patients is still seriously affected, for example, patients have to inject insulin manually before meals to avoid hyperglycemia, and the injection dose needs to be carefully computed according to the carbohydrate to be ingested [4, 5]. So in recent years, researchers have been attempting to solve technological problem to develop an artificial pancreas [10, 11], which can substitute the endocrine functionality of a real and healthy pancreas [4, 12, 13].

In order to carefully choose the correct dose of insulin and the right time of injection, several mathematical models have been constructed and studied. However, most of these studies focused on the change of the glucose concentration after a sufficiently long time. But in some clinical situations, glucose concentration needs to be controlled under a certain level in a finite time. For example, critically ill patients whose plasma glucose is in an extremely high level need to drop their glucose concentration in a relatively short time. In this paper, we propose an impulsive differential equation model for insulin injection with finite-time control. Through qualitative analysis, we shall give the conditions under which the glucose concentration can be controlled in a range predefined.

The rest of the paper is organized as follows. In Sect. 2, a mathematical model of impulsive injection of insulin with initial and boundary value conditions is formulated. In Sect. 3, the existence of the solution is discussed by comparison theorem. Finally, some discussions and numerical simulations are provided in Sect. 4.

2 Model formulation

Mathematical models of insulin therapy for diabetes have played an important role in understanding the pharmacological mechanism of insulin in treating diabetes mellitus, and they are also applied to anticipate the efficacy of different therapeutic schedules. In order to design effective control strategies for plasma glucose, researchers have formulated many models to simulate interactions of glucose and insulin. For example, the glucose–insulin regulatory system of normal people was studied in [1418], and the insulin sensitivity is considered as a whole in [1922]. In order to determine the main cause of the sustained oscillation of the endocrine metabolic system, delay differential equation models are proposed in [2326]. Doran et al. [27] formulated a mathematical model to study the insulin therapy for critically ill patients in ICU and insulin infusion was considered. Noticed that the insulin injection is a relatively transient behavior in the whole course of therapy, so it can be see as a pulse. Impulsive differential equation models have a big advantage in describing such kind of behaviors. For now, several impulsive differential equation models have been proposed to study the impulsive injection of insulin in diabetes treatments [4, 9, 12].

Most of the studies in the literature focused on the dynamical behaviors in infinite time, corresponding to the long-term control of the plasma glucose level. However, in clinic practice, when the glucose concentration is at a level much higher than normal, the life of the patient will be threatened in a very short time. So how to lower the glucose concentration in a given time is considered by the doctor. That is to say, the glucose concentration is required to be reduced to a normal level in a given time which is finite. As far as we know, there is very little study about the finite-time control of the glucose concentration. Based on our previous work about glucose control, in this paper we construct a new mathematical model for the finite-time control of plasma glucose, and qualitatively analyze conditions under which the goal of control can be achieved.

In [4], Huang et al. extended the model proposed by Li, Kuang and Mason [16, 23] by incorporating periodic impulsive injection of insulin, and the model is as follows:

$$ \left \{ \textstyle\begin{array}{ll} \left . \textstyle\begin{array}{l} { \frac{d G(t)}{dt}}= G_{\mathrm{in}} - \sigma_{2} G - a (c + \frac{mI}{n + I} )G + b, \\ { \frac{ dI(t)}{dt}}= \frac{\sigma_{1}G^{2}}{\alpha_{1}^{2}+G^{2}} - d_{i} I(t), \end{array}\displaystyle \right \}, \quad t\neq k\tau, \\ \left . \textstyle\begin{array}{l} G(t^{+})=G(t), \\ I(t^{+})=I(t)+\sigma, \end{array}\displaystyle \right \}, \quad t=k\tau, \end{array}\displaystyle \right . $$
(1)

where \(G(t)\) and \(I(t)\) are the glucose concentration and insulin concentration in the plasma at time t, respectively. \(G_{\mathrm{in}}\) is the average glucose input, \(\sigma_{2}G(t)\) represents the insulin-independent glucose uptake and \(aG(c+\frac{mI(t)}{n+I(t)})\) stands for the insulin-dependent glucose consumption. \(b>0\) and \(d_{i}>0\) are the hepatic glucose production rate and the insulin degradation rate, respectively. \(\frac{\sigma_{1}G^{2}(t)}{\alpha_{1}^{2}+G^{2}(t)}\) represents the insulin secretion reacted to the elevated glucose concentration. \(\sigma_{1}\), \(\sigma_{2}\), \(\alpha_{1}\), a, c, m and n are positive and have same meanings as in [4]. The parameters \(\sigma(\text{mU})>0\) and \(\tau(\text{min})>0\) are the dose and period of insulin injection, respectively, that is, \(\sigma(\text{mU})\) insulin is injected impulsively each τ time. The moment immediately after the kth injection is denoted \(t=k\tau^{+}\) here.

Model (1) was proposed to study the change of the glucose concentration in infinite time with periodic injections of insulin, and the authors of [4] did provide several injection strategies in the long term to lower plasma glucose level efficiently and reduce the economic cost of the patients. However, considering some common clinic situation when a patient is threatened by a high plasma glucose level, the glucose concentration is required to be controlled within an ideal range by injecting insulin in a given time. The long-term injection strategies are no longer applicable in this case. In view of this situation, we propose the following differential equation model with impulsive injection of insulin and finite-time control of glucose:

$$ \left \{ \textstyle\begin{array}{ll} \left . \textstyle\begin{array}{l} { \frac{d G(t)}{dt}}= G_{\mathrm{in}} - \sigma_{2} G - a (c + \frac{mI}{n + I} )G + b, \\ { \frac{ dI(t)}{dt}}= \frac{\sigma_{1}G^{2}}{\alpha_{1}^{2}+G^{2}} - d_{i} I(t), \end{array}\displaystyle \right \}, \quad t\neq k\tau, \\ \left . \textstyle\begin{array}{l} G(t^{+})=G(t), \\ I(t^{+})=I(t)+\sigma, \end{array}\displaystyle \right \}, \quad t=k\tau, \\ G(0)=G(0^{+})=G_{0}>0,\qquad G_{L}< G(T)\leq G_{U}< G_{0}, \\ I(0)=I(0^{+})=I_{0}>0, \end{array}\displaystyle \right . $$
(2)

where T is a given finite time, τ is still the period of insulin injection and \(k=1,2,\ldots, {p-1}, p\tau=T\). \(\sigma (\text{mU}) >0\) is also the dose in each injection. \(G_{0}\) is the initial level of the glucose concentration which is much higher than the normal level. \(G_{U}\) and \(G_{L}\) are the upper and lower bounds of plasma concentration that people can tolerate. If the glucose concentration is controlled between \(G_{U}\) and \(G_{L}\), both hypoglycemia and hyperglycemia can be avoided. Our aim is to make sure that the concentration of the plasma glucose is controlled between \(G_{U}\) and \(G_{L}\) at the moment T after \(p-1\) times impulsive injection of insulin with dose σ.

3 Finite-time control of glucose

In this section, we consider the finite-time control of glucose by analyzing the system (2). Firstly, we formulate two comparison systems for variable I, study the relationship between the comparison systems and system (2) and get some basic properties. Then we give the upper and lower bounds of the two comparison systems. The conditions under which the system (2) has a solution are finally obtained.

3.1 Preliminary

From the first and third equations of the system (2), we can get

$$ \begin{aligned}[b] G(T)={}&G_{0}\exp \biggl[- \int_{0}^{T} \biggl(\sigma_{2}+ac+ \frac{am{I}(s)}{n+ {I}(s)}\biggr)\,ds \biggr] \\ & +(G_{\mathrm{in}}+b) \int_{0}^{T} \biggl[\exp\biggl(- \int_{u}^{T}\biggl(\sigma_{2} + ac + \frac {am{I}(s)}{n+{I}(s)}\biggr)\,ds\biggr) \biggr]\,du \\ ={}&G_{0}\exp\bigl[-(\sigma_{2}+ac)T\bigr] \exp\biggl[- \int_{0}^{T} \frac {am{I}(s)}{n+{I}(s)}\,ds\biggr] \\ & +(G_{\mathrm{in}}+b)\exp\bigl[-(\sigma_{2}+ac)T\bigr] \\ &\times \int_{0}^{T} \biggl\{ \exp\bigl[( \sigma_{2}+ac)u\bigr]\exp\biggl[- \int_{u}^{T} \frac{am{I}(s)}{n+{I}(s)}\,ds\biggr] \biggr\} \,du. \end{aligned} $$
(3)

Besides, according to the second and the fourth equations of the system (2), we formulate the following two comparison systems:

$$ \left \{ \textstyle\begin{array}{l@{\quad}l} \frac{dI_{1}(t)}{dt} = -d_{i} I_{1}(t),& t\neq k\tau, \\ I_{1}(t^{+})=I_{1}(t)+\sigma,& t=k\tau, \\I_{1}(0^{+})=I_{0}>0 \end{array}\displaystyle \right . $$
(4)

and

$$ \left \{ \textstyle\begin{array}{l@{\quad}l} \frac{dI_{2}(t)}{dt}=\sigma_{1} - d_{i} I_{2}(t) ,& t\neq k\tau, \\ I_{2}(t^{+})=I_{2}(t)+\sigma,&t=k\tau, \\ I_{2}(0^{+})=I_{0}>0, \end{array}\displaystyle \right . $$
(5)

where \(k=1,2,\ldots,p-1, p\tau=T\).

Obviously, we have \(I_{1}(t)\leq I(t)\leq I_{2}(t)\), \(t\in[0,T]\). Then, by integration, we get

$$ I_{1}(t)= I_{0}\exp(-d_{i} t)+\frac{\sigma\exp(-d_{i} t)(\exp(kd_{i}\tau )-1)}{1-\exp(-d_{i}\tau)} $$
(6)

and

$$ I_{2}(t)=\biggl(I_{0}-\frac{\sigma_{1}}{d_{i}}\biggr) \exp(-d_{i} t)+\frac{\sigma\exp(-d_{i} t)(\exp(kd_{i}\tau)-1)}{1-\exp(-d_{i}\tau)}+\frac{\sigma_{1}}{d_{i}}, $$
(7)

where \(t\in(k\tau, (k+1)\tau]\subset[0, T]\), \(k=0,1,\ldots,p-1\).

By calculation in [4], we know that, for \(k\tau ^{+}\leq b_{1}\leq b_{2}\leq(k+1)\tau\),

$$ \int_{b_{1}}^{b_{2}}\frac{am{I_{1}}(t)}{n+{I_{1}}(t)}\,dt = \ln \biggl( \frac {n+{I_{1}}(b_{2})}{n+{I_{1}}(b_{1})} \biggr)^{-\frac{am}{d_{i}}}. $$
(8)

Similarly, we can get from the system (5), for \(k\tau ^{+}\leq b_{1}\leq b_{2}\leq(k+1)\tau\),

$$ \begin{aligned}[b] \int_{b_{1}}^{b_{2}}\frac{am{I_{2}}(t)}{n+{I_{2}}(t)}\,dt = {}& \frac{am}{d_{i}} \int _{b_{1}}^{b_{2}}\frac{\sigma_{1}}{n+{I_{2}}(t)}- \biggl( \frac{d\ln (n+{I_{2}}(t))}{dt} \biggr) \,dt \\ ={} &\frac{am}{d_{i}} \int_{b_{1}}^{b_{2}}\frac{\sigma_{1}}{n+{I_{2}}(t)}\,dt-\frac {am}{d_{i}} \int_{b_{1}}^{b_{2}} \biggl(\frac{d\ln(n+{I_{2}}(t))}{dt} \biggr)\,dt \\ = {}& \frac{am}{d_{i}} \int_{b_{1}}^{b_{2}}\frac{\sigma_{1}}{n+{I_{2}}(t)}\,dt+\ln \biggl( \frac{n+{I_{2}}(b_{2})}{n+{I_{2}}(b_{1})} \biggr)^{-\frac{am}{d_{i}}}. \end{aligned} $$
(9)

According to (3) and (8), substituting \(I_{1}(t)\) for \(I(t)\), we have

$$ \begin{aligned}[b] G(T)\leq{}& G_{0}\exp\bigl(-( \sigma_{2}+ac)T\bigr)\exp\biggl(- \int_{0}^{T}\frac {amI_{1}(s)}{n+I_{1}(s)}\,ds \biggr) \\ &+(G_{\mathrm{in}}+b)\exp\bigl(-(\sigma_{2}+ac)T\bigr) \int _{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr)\exp\biggl(- \int_{u}^{T}\frac{amI_{1}(s)}{n+I_{1}(s)}\,ds\biggr)\,du \\ ={}&G_{0}\exp\bigl(-(\sigma_{2}+ac)T\bigr) \biggl( \frac{n+I_{1}(T)}{n+I_{0}}\biggr)^{ \frac{am}{d_{i}}} \\ &+(G_{\mathrm{in}}+b)\exp\bigl(-(\sigma_{2}+ac)T\bigr) \int_{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr) \biggl(\frac {n+I_{1}(T)}{n+I_{1}(u)}\biggr)^{ \frac{am}{d_{i}}}\,du \\ ={}&\exp\bigl(-(\sigma_{2}+ac)T\bigr) \bigl(n+I_{1}(T) \bigr)^{ \frac{am}{d_{i}}} \\ &\times\biggl\{ \frac {G_{0}}{(n+I_{0})^{\frac{am}{d_{i}}}}+(G_{\mathrm{in}}+b) \int_{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr) \bigl(n+I_{1}(u)\bigr)^{- \frac {am}{d_{i}}}\,du\biggr\} . \end{aligned} $$
(10)

Analogously, substituting \(I_{2}(t)\) into (3) for \(I(t)\), we have

$$ \begin{aligned}[b] G(T)\geq{} &G_{0}\exp\bigl(-( \sigma_{2}+ac)T\bigr)\exp\biggl(- \int_{0}^{T}\frac {amI_{2}(s)}{n+I_{2}(s)}\,ds \biggr) \\ &+(G_{\mathrm{in}}+b)\exp\bigl(-(\sigma_{2}+ac)T\bigr) \int _{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr)\exp\biggl(- \int_{u}^{T}\frac{amI_{2}(s)}{n+I_{2}(s)}\,ds\biggr)\,du \\ ={}&G_{0}\exp\bigl(-(\sigma_{2}+ac)T\bigr)\exp\biggl(- \frac{am}{d_{i}} \int_{0}^{T}\frac{\sigma _{1}}{n+I_{2}(s)}\,ds\biggr) \biggl( \frac{n+I_{2}(T)}{n+I_{0}}\biggr)^{\frac{am}{d_{i}}} \\ &+(G_{\mathrm{in}}+b)\exp\bigl(-(\sigma_{2}+ac)T\bigr) \\ &\times \int_{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr)\exp\biggl(-\frac{am}{d_{i}} \int_{u}^{T}\frac{\sigma _{1}}{n+I_{2}(s)}\,ds\biggr) \biggl( \frac{n+I_{2}(T)}{n+I_{2}(u)}\biggr)^{\frac{am}{d_{i}}}\,du . \end{aligned} $$
(11)

According to (6), we can get

$$\begin{aligned}& I_{1}(0)=I_{0}, \qquad I_{1}( \tau)=I_{0}\exp(-d_{i} \tau), \\& I_{1}(T)=\biggl(I_{0}+\frac{\sigma[\exp(d_{i}(p-1)\tau)-1]}{1-\exp(-d_{i}\tau)}\biggr)\exp (-d_{i} T), \\& \begin{aligned}[b] I_{1}(t)&\geq I_{0} \exp(-d_{i} t)+\frac{\sigma[\exp(-d_{i}\tau)-\exp(-d_{i} t)]}{1-\exp(-d_{i}\tau)} \\ &=\biggl(I_{0}-\frac{\sigma}{1-\exp(-d_{i}\tau)}\biggr)\exp(-d_{i} t)+ \frac{\sigma\exp (-d_{i}\tau)}{1-\exp(-d_{i}\tau)} \end{aligned} \end{aligned}$$
(12)

and

$$ \begin{aligned}[b] I_{1}(t)&=I_{0} \exp(-d_{i} t)+\frac{\sigma\exp(-d_{i}t)\exp(d_{i}\tau)(\exp (kd_{i}\tau)-1)}{\exp(d_{i}\tau)-1} \\ &\leq I_{0}\exp(-d_{i} t)+\frac{\sigma\exp(d_{i}\tau)(1-\exp(-d_{i} t))}{\exp (d_{i}\tau)-1} \\ &=\biggl(I_{0}-\frac{\sigma}{1-\exp(-d_{i}\tau)}\biggr)\exp(-d_{i} t)+ \frac{\sigma}{1-\exp (-d_{i}\tau)}, \end{aligned} $$
(13)

where \(k=0,1,2,\ldots,p-1, k\tau< t\leq(k+1)\tau\).

According to (7), we can get

$$\begin{aligned}& I_{2}(0)=I_{0}, \qquad I_{2}(\tau)=I_{0} \exp(-d_{i} \tau)+\frac{\sigma _{1}}{d_{i}}\bigl(1-\exp(-d_{i} \tau)\bigr), \\& \begin{aligned} I_{2}\bigl((p-1)\tau^{+}\bigr)={}&I_{0} \exp\bigl(-d_{i}(T-\tau)\bigr)+\frac{\sigma_{1}}{d_{i}}\bigl[1-\exp \bigl(-d_{i}(T-\tau)\bigr)\bigr] \\ & +\frac{\sigma[1-\exp(-d_{i}(T-\tau))]}{1-\exp(-d_{i}\tau)}, \end{aligned} \\& \begin{aligned} I_{2}(T)&=\biggl(I_{0}- \frac{\sigma_{1}}{d_{i}}+\frac{\sigma[\exp(d_{i}(p-1)\tau )-1]}{1-\exp(-d_{i}\tau)}\biggr)\exp(-d_{i} T)+ \frac{\sigma_{1}}{d_{i}} \\ &=I_{1}(T)+\frac{\sigma_{1}}{d_{i}}\bigl(1-\exp(-d_{i} T)\bigr), \end{aligned} \\& \begin{aligned}[b] I_{2}(t)\geq{}&\biggl(I_{0}- \frac{\sigma_{1}}{d_{i}}\biggr)\exp(-d_{i} t)+\frac{\sigma _{1}}{d_{i}}+ \frac{\sigma(\exp(-d_{i}\tau)-\exp(-d_{i} t))}{1-\exp(-d_{i}\tau)} \\ ={}&I_{0}\exp(-d_{i} t)+\frac{\sigma_{1}}{d_{i}}\bigl(1- \exp(-d_{i}t)\bigr) \\ & +\frac{\sigma}{1-\exp(-d_{i}\tau)}\bigl[\exp(-d_{i}\tau)-\exp(-d_{i}t) \bigr],\end{aligned} \end{aligned}$$
(14)

and

$$ \begin{aligned}[b] I_{2}(t)&\leq\biggl(I_{0}- \frac{\sigma_{1}}{d_{i}}\biggr)\exp(-d_{i} t)+\frac{\sigma _{1}}{d_{i}}+ \frac{\sigma(1-\exp(-d_{i} t))}{1-\exp(-d_{i}\tau)} \\ &=\biggl(I_{0}-\frac{\sigma_{1}}{d_{i}}-\frac{\sigma}{1-\exp(-d_{i}\tau)}\biggr) \exp(-d_{i} t)+\frac{\sigma}{1-\exp(-d_{i}\tau)}+\frac{\sigma_{1}}{d_{i}}. \end{aligned} $$
(15)

3.2 The upper and lower bounds of the comparison systems

In the following, we give the upper and lower bounds of the comparison systems (4) and (5). These results will be applied to discuss the existence of the solution of system (2) with initial and boundary value problem.

Proposition 1

If \(I_{0}\geq\frac{\sigma}{1-\exp(-d_{i}\tau)}\), then the system (4) satisfies \(I_{1}(t)\geq I_{1}(T)\triangleq I_{0}\exp(-d_{i} T)+\frac{\sigma[\exp(-d_{i}\tau)-\exp(-d_{i} T)]}{1-\exp (-d_{i}\tau)}\). If \(I_{0}< \frac{\sigma}{1-\exp(-d_{i}\tau)}\), then the system (4) satisfies \(I_{1}(t)\geq I_{1}(\tau)\triangleq I_{0}\exp(-d_{i} \tau)\).

Proof

For convenience, we denote \(q=\exp(-d_{i}\tau)\), then we know \(0< q<1\). From (6), we can easily get \(I_{1}(t)\) is monotonic decreasing on \((k\tau, (k+1)\tau]\), \(k=0,1,2,\ldots,p-1\). Besides,

$$I_{1}\bigl((k+1)\tau\bigr)=I_{0}q^{k+1}+ \frac{\sigma q (1-q^{k})}{1-q} $$

and

$$ \begin{aligned}[b] I_{1}\bigl[(k+1)\tau\bigr]-I_{1}[k \tau]&=I_{0}q^{k+1}+\frac{\sigma q (1-q^{k})}{1-q}-I_{0}q^{k}- \frac{\sigma q (1-q^{k-1})}{1-q} \\ &=I_{0}q^{k}(q-1)+\sigma q^{k}=q^{k} \bigl[\sigma-(1-q)I_{0}\bigr]. \end{aligned} $$
(16)

If \(I_{0}\geq\frac{\sigma}{1-\exp(-d_{i}\tau)}\), \(I_{1}(t)\) is monotonic decreasing on \((k\tau, (k+1)\tau]\) and \(\{I_{1}((k+1)\tau)\}\), \(k=0,1,2,\ldots,p-1\) is a monotonic decreasing sequence, then \(I_{1}(t)\geq I_{1}(p\tau)=I_{1}(T)=I_{0}\exp(-d_{i} T)+\frac{\sigma[\exp(-d_{i}\tau )-\exp(-d_{i} T)]}{1-\exp(-d_{i}\tau)}\).

Conversely, if \(I_{0}< \frac{\sigma}{1-\exp(-d_{i}\tau)}\), \(I_{1}(t)\) is monotonic decreasing on \((k\tau, (k+1)\tau]\) and \(\{I_{1}((k+1)\tau)\}\), \(k=0,1,2,\ldots,p-1\) is a monotonic increasing sequence, then \(I_{1}(t)\geq I_{1}(\tau)=I_{0}\exp(-d_{i} \tau)\). That completes the proof. □

Proposition 2

If \(I_{0}-\frac{\sigma_{1}}{d_{i}}>\frac{\sigma}{1-\exp (-d_{i}\tau)}\), then the system (5) satisfies

$$I_{0}>I_{2}(t)\geq I_{2}(T)\triangleq I_{1}(T)+\frac{\sigma_{1}}{d_{i}}\bigl(1-\exp(-d_{i} T)\bigr); $$

if \(I_{0}\geq\frac{\sigma_{1}}{d_{i}}\) and \(I_{0}-\frac{\sigma_{1}}{d_{i}}\leq\frac {\sigma}{1-\exp(-d_{i}\tau)}\), then the system (5) satisfies

$$I_{2}(t)\geq I_{2}(\tau)\triangleq I_{0} \exp(-d_{i} \tau)+\frac{\sigma _{1}}{d_{i}}\bigl[1-\exp(-d_{i}\tau) \bigr] $$

and

$$ \begin{aligned}[b] I_{2}(t)\leq{}& I_{2}\bigl[(p-1) \tau^{+}\bigr]\\ ={}&I_{2}\bigl[(T-\tau)^{+}\bigr]\triangleq I_{0}\exp \bigl(-d_{i}(T-\tau)\bigr) \\ & +\frac{\sigma_{1}}{d_{i}}\bigl[1-\exp\bigl(-d_{i}(T-\tau)\bigr)\bigr]+ \frac{\sigma[1-\exp (-d_{i}(T-\tau))]}{1-\exp(-d_{i}\tau)}. \end{aligned} $$

Proof

From (7), we know that if \(I_{0}\geq\frac {\sigma_{1}}{d_{i}}\), then \(I_{2}(t)\) is monotonic decreasing on \((k\tau, (k+1)\tau]\), \(k=0,1,2,\ldots,p-1\). Besides,

$$I_{2}\bigl((k+1)\tau\bigr)=I_{0}q^{k+1}+ \frac{\sigma_{1}}{d_{i}}\bigl(1-q^{k+1}\bigr)+\frac{\sigma q (1-q^{k})}{1-q} $$

and

$$I_{2}\bigl((k+1)\tau^{+}\bigr)=I_{0}q^{k+1}+ \frac{\sigma_{1}}{d_{i}}\bigl(1-q^{k+1}\bigr)+\frac {\sigma(1-q^{k+1})}{1-q}. $$

By calculation, we can easily get

$$ \begin{aligned}[b] I_{2}\bigl[(k+1)\tau\bigr]-I_{2}[k \tau]&=I_{0}q^{k}(q-1)+\frac{\sigma_{1}}{d_{i}}q^{k} (1-q)+\sigma q^{k} \\ &=q^{k}\biggl[I_{0}(q-1)+\frac{\sigma_{1}}{d_{i}} (1-q)+\sigma \biggr]\\ &=q^{k}\biggl[(1-q) \biggl(\frac{\sigma _{1}}{d_{i}}-I_{0} \biggr) +\sigma\biggr] \end{aligned} $$
(17)

and

$$ I_{2}\bigl[(k+1)\tau^{+}\bigr]-I_{2}\bigl[k\tau^{+} \bigr]=q^{k}\biggl[(1-q) \biggl(\frac{\sigma_{1}}{d_{i}}-I_{0} \biggr) +\sigma\biggr]. $$
(18)

So if \(I_{0}-\frac{\sigma_{1}}{d_{i}}>\frac{\sigma}{1-\exp(-d_{i}\tau)}\), then \(I_{2}(t)\) is monotonic decreasing on \((k\tau, (k+1)\tau], \{I_{2}((k+1)\tau )\}\) and \(\{I_{2}((k+1)\tau^{+})\}\), \(k=0,1,2,\ldots,p-1\), are monotonic decreasing sequences, thus we get \(I_{2}(t)\geq I_{2}(T)\) and \(I_{2}(t)\leq I_{2}(0^{+})=I_{0}\) for \(t\in[0,T]\).

If \(I_{0}\geq\frac{\sigma_{1}}{d_{i}}\) and \(I_{0}-\frac{\sigma_{1}}{d_{i}}\leq \frac{\sigma}{1-\exp(-d_{i}\tau)}\), then \(I_{2}(t)\) is monotonic decreasing on \((k\tau, (k+1)\tau]\), \(\{I_{2}((k+1)\tau)\}\) and \(\{I_{2}((k+1)\tau^{+})\}\), \(k=0,1,2,\ldots,p-1\), are monotonic increasing sequences, thus we get \(I_{2}(t)\geq I_{2}(\tau)\) and \(I_{2}(t)\leq I_{2}((p-1)\tau^{+})=I_{2}[(T-\tau )^{+}]\) for \(t\in[0,T]\). That completes the proof. □

3.3 Existence of solution of system (2)

Now we discuss the existence of the solution of the system (2) for the finite-time glucose control.

For convenience, we denote

$$\begin{gathered} f_{i}(t_{1},t_{2})=\biggl(\frac{n+I_{i}(t_{2})}{n+I_{i}(t_{1})} \biggr)^{\frac{am}{d_{i}}},\quad i=1,2,\qquad G_{s}=\frac{G_{\mathrm{in}}+b}{\sigma_{2}+ac}, \\ D_{1}=\sigma_{2}+ac+\frac{am\sigma_{1}}{d_{i}(n+I_{2}(T))},\qquad D_{2}=\sigma _{2}+ac+\frac{am\sigma_{1}}{d_{i}(n+I_{2}(\tau))}.\end{gathered} $$

Theorem 3.1

Suppose that \(I_{0}-\frac{\sigma_{1}}{d_{i}}>\frac{\sigma}{1-\exp(-d_{i}\tau)}\) and the following two conditions hold:

$$ G_{0} f_{1}(0,T) -G_{s} \leq(G_{U}-G_{s}) \exp\bigl[(\sigma_{2}+ac)T\bigr] $$
(19)

and

$$ G_{0} \exp(-D_{1}T)+\frac{1}{D_{1}}(G_{\mathrm{in}}+b) \bigl(1-\exp(-D_{1}T)\bigr)\geq G_{L} f_{2}(T,0), $$
(20)

then the system (2) has a solution which satisfies the initial and boundary value problem.

Proof

According to Proposition (1) and inequality (10), we can get

$$\begin{aligned}& \begin{aligned}[b] &\int_{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr)\bigl(n+I_{1}(u)\bigr)^{-\frac{am}{d_{i}}}\,du\\ &\quad\leq \int _{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr) \bigl(n+I_{1}(T)\bigr)^{-\frac{am}{d_{i}}}\,du \\ &\quad=\bigl(n+I_{1}(T)\bigr)^{- \frac{am}{d_{i}}}\frac{1}{\sigma_{2}+ac}\bigl[\exp \bigl((\sigma_{2}+ac)T\bigr)-1\bigr], \end{aligned} \end{aligned}$$
(21)
$$\begin{aligned}& \begin{aligned}[b]G(t) \leq{}&\exp\bigl(-(\sigma_{2}+ac)T\bigr) \bigl(n+I_{1}(T)\bigr)^{ \frac{am}{d_{i}}} \\ &\times\biggl\{ \frac {G_{0}}{(n+I_{0})^{\frac{am}{d_{i}}}}+(G_{\mathrm{in}}+b) \bigl(n+I_{1}(T)\bigr)^{- \frac{am}{d_{i}}} \frac{1}{\sigma_{2}+ac}\bigl[\exp \bigl((\sigma_{2}+ac)T\bigr)-1\bigr] \biggr\} \\ ={}&G_{0} \exp\bigl(-(\sigma_{2}+ac)T\bigr)f_{1}(0,T)+G_{s} \bigl[1-\exp\bigl(-(\sigma_{2}+ac)T\bigr)\bigr]\leq G_{U}. \end{aligned} \end{aligned}$$
(22)

According to Proposition (2) and inequality (11), we have

$$\begin{gathered} \begin{aligned} \exp\biggl(-\frac{am}{d_{i}} \int_{0}^{T}\frac{\sigma_{1}}{n+I_{2}(s)}\,ds\biggr)&\geq\exp \biggl(-\frac{am}{d_{i}} \int_{0}^{T}\frac{\sigma_{1}}{n+I_{2}(T)}\,ds\biggr) \\ &=\exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(T))}\biggr), \end{aligned} \\ \exp\biggl(-\frac{am}{d_{i}} \int_{u}^{T}\frac{\sigma_{1}}{n+I_{2}(s)}\,ds\biggr)\geq\exp \biggl(-\frac {am\sigma_{1}T}{d_{i}(n+I_{2}(T))}\biggr)\exp\biggl(\frac{am\sigma_{1}u}{d_{i}(n+I_{2}(T))}\biggr), \\ f_{2}(u,T)\geq f_{2}(0,T),\end{gathered} $$

we can get

$$ \begin{aligned}[b] & \int_{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr)\exp\biggl(-\frac{am}{d_{i}} \int_{u}^{T}\frac{\sigma _{1}}{n+I_{2}(s)}\,ds\biggr) f_{2}(u,T)\,du \\ &\quad\geq f_{2}(0,T) \exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(T))}\biggr) \int_{0}^{T}\exp (D_{1}u)\,du \\ &\quad=\frac{f_{2}(0,T)}{D_{1}} \exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(T))}\biggr)\bigl[ \exp(D_{1}T)-1\bigr] \end{aligned} $$
(23)

and then according to (11)

$$ \begin{aligned}[b] G(T)\geq{}& G_{0}\exp\bigl(-( \sigma_{2}+ac)T\bigr)f_{2}(0,T) \exp\biggl(-\frac{am\sigma _{1}T}{d_{i}(n+I_{2}(T))} \biggr) \\ & +(G_{\mathrm{in}}+b) \exp\bigl(-(\sigma_{2}+ac)T\bigr) \frac{f_{2}(0,T)}{D_{1}} \\ &\times \exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(T))}\biggr) \bigl[\exp(D_{1}T)-1\bigr] \\ ={}&f_{2}(0,T) \exp(-D_{1} T) \biggl\{ G_{0} + \frac{G_{\mathrm{in}}+b}{D_{1}}\bigl[\exp(D_{1}T)-1\bigr] \biggr\} \geq G_{L}. \end{aligned} $$
(24)

That completes the proof. □

Theorem 3.2

Suppose that \(I_{0}\geq\frac{\sigma_{1}}{d_{i}}\), \(I_{0}\geq\frac{\sigma}{1-\exp (-d_{i}\tau)}\), \(I_{0}-\frac{\sigma_{1}}{d_{i}}\leq\frac{\sigma}{1-\exp(-d_{i}\tau )}\), inequality (19) and the following condition holds:

$$ G_{0} f_{2}(0,T)+\frac{1}{D_{2}}(G_{\mathrm{in}}+b) \exp(-am\tau)\bigl[\exp(D_{2}T)-1\bigr]\geq G_{L} \exp(D_{2}T), $$
(25)

then the system (2) has a solution which satisfies the initial and boundary value problem.

Proof

According to Proposition (2) and inequality (11), we have

$$\begin{aligned}& \begin{aligned} \exp\biggl(-\frac{am}{d_{i}} \int_{0}^{T}\frac{\sigma_{1}}{n+I_{2}(s)}\,ds\biggr)&\geq\exp \biggl(-\frac{am}{d_{i}} \int_{0}^{T}\frac{\sigma_{1}}{n+I_{2}(\tau)}\,ds\biggr) \\ &=\exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(\tau))}\biggr), \end{aligned} \\& \exp\biggl(-\frac{am}{d_{i}} \int_{u}^{T}\frac{\sigma_{1}}{n+I_{2}(s)}\,ds\biggr)\geq\exp \biggl(-\frac {am\sigma_{1}T}{d_{i}(n+I_{2}(\tau))}\biggr)\exp\biggl(\frac{am\sigma_{1}u}{d_{i}(n+I_{2}(\tau))}\biggr), \\& \begin{aligned} &\frac{n+I_{2}(T)}{n+I_{2}(T-\tau)} \\ &\quad= \frac{\frac{\sigma_{1}}{d_{i}} +\exp(-d_{i} \tau)[(I_{0}-\frac{\sigma _{1}}{d_{i}})\exp(-d_{i}(T-\tau))+\frac{\sigma(1-\exp(-d_{i}(T-\tau)))}{1-\exp (-d_{i}\tau)} ] }{\frac{\sigma_{1}}{d_{i}} +[(I_{0}-\frac{\sigma_{1}}{d_{i}})\exp (-d_{i}(T-\tau))+\frac{\sigma(1-\exp(-d_{i}(T-\tau)))}{1-\exp(-d_{i}\tau)} ] }, \end{aligned} \\& f_{2}(u,T)\geq f_{2}(T-\tau,T)\geq\exp(-am\tau), \end{aligned}$$

then we get

$$ \begin{aligned}[b] & \int_{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr)\exp\biggl(-\frac{am}{d_{i}} \int_{u}^{T}\frac{\sigma _{1}}{n+I_{2}(s)}\,ds\biggr) f_{2}(u,T)\,du \\ &\quad\geq\exp(-am\tau) \exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(\tau))}\biggr) \int _{0}^{T}\exp(D_{2}u)\,du \\ &\quad=\frac{\exp(-am\tau)}{D_{2}} \exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(\tau))}\biggr) \bigl[ \exp(D_{2}T)-1\bigr]. \end{aligned} $$
(26)

According to (11)

$$ \begin{aligned}[b] G(T)\geq{}& G_{0}\exp\bigl(-( \sigma_{2}+ac)T\bigr)f_{2}(0,T) \exp\biggl(-\frac{am\sigma _{1}T}{d_{i}(n+I_{2}(\tau))} \biggr) \\ & +(G_{\mathrm{in}}+b) \exp\bigl(-(\sigma_{2}+ac)T\bigr) \frac{\exp(-am\tau)}{D_{2}} \\ & \times\exp\biggl(-\frac{am\sigma_{1}T}{d_{i}(n+I_{2}(\tau))}\biggr) \bigl[\exp(D_{2}T)-1\bigr] \\ ={}&\exp(-D_{2}T) \biggl\{ G_{0} f_{2}(0,T) \\ &+ \frac{(G_{\mathrm{in}}+b)\exp(-am\tau)}{D_{2}}\bigl[\exp(D_{2}T)-1\bigr] \biggr\} \geq G_{L}. \end{aligned} $$
(27)

By a similar discussion to Theorem 3.1, we can also get \(G(T)\leq G_{U}\). That completes the proof. □

Theorem 3.3

Suppose that \(I_{0}\geq\frac{\sigma_{1}}{d_{i}}\), \(I_{0}\leq\frac{\sigma}{1-\exp (-d_{i}\tau)}\), \(I_{0}-\frac{\sigma_{1}}{d_{i}}\leq\frac{\sigma}{1-\exp(-d_{i}\tau )}\), inequality (25) and the following condition holds:

$$ G_{0} f_{1}(0,T)-G_{s} f_{1}(\tau, T)\leq\bigl(G_{U}-G_{s} f_{1}(\tau, T)\bigr)\exp \bigl((\sigma_{2}+ac)T\bigr), $$
(28)

then the system (2) has a solution which satisfies the initial and boundary value problem.

Proof

Because \(I_{0}\geq\frac{\sigma_{1}}{d_{i}}\) and \(I_{0}\leq\frac {\sigma}{1-\exp(-d_{i}\tau)}\), we have \(I_{0}-\frac{\sigma_{1}}{d_{i}}\leq\frac {\sigma}{1-\exp(-d_{i}\tau)}\).

According to Proposition (1) and inequality (10), we can get

$$\begin{aligned}& \begin{aligned}[b] &\int_{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr)\bigl(n+I_{1}(u)\bigr)^{-\frac{am}{d_{i}}}\,du\\&\quad\leq \int _{0}^{T}\exp\bigl((\sigma_{2}+ac)u \bigr) \bigl(n+I_{1}(\tau)\bigr)^{-\frac{am}{d_{i}}}\,du \\ &\quad=\bigl(n+I_{1}(\tau)\bigr)^{- \frac{am}{d_{i}}}\frac{1}{\sigma_{2}+ac}\bigl[ \exp\bigl((\sigma_{2}+ac)T\bigr)-1\bigr], \end{aligned} \end{aligned}$$
(29)
$$\begin{aligned}& \begin{aligned}[b] G(t) \leq{}&\exp\bigl(-(\sigma_{2}+ac)T\bigr) \bigl(n+I_{1}(T)\bigr)^{ \frac{am}{d_{i}}} \\ &\times\biggl\{ \frac {G_{0}}{(n+I_{0})^{\frac{am}{d_{i}}}}+(G_{\mathrm{in}}+b) \bigl(n+I_{1}(\tau)\bigr)^{- \frac{am}{d_{i}}} \frac{1}{\sigma_{2}+ac}\bigl[\exp \bigl((\sigma_{2}+ac)T\bigr)-1\bigr] \biggr\} \\ ={}&G_{0}\exp\bigl(-(\sigma_{2}+ac)T\bigr)f_{1}(0,T)+G_{s} f_{1}(\tau,T) \bigl[1-\exp\bigl(-( \sigma_{2}+ac)T\bigr)\bigr] \\ \leq {}&G_{U}. \end{aligned} \end{aligned}$$
(30)

By a similar discussion to Theorem 3.2, we can also get \(G(T)\geq G_{L}\). That completes the proof. □

4 Numerical simulation and discussion

In this paper, we build an impulsive differential equation model with initial and boundary value conditions to study the finite-time control of glucose for the insulin therapy of diabetics. Compared with system (2.2) proposed in [4], our new model concentrates on the finite-time control of glucose under periodic injection of insulin. This is meaningful for some clinical situations, for example, seriously ill patients whose plasma glucose level is extremely high and needs to be controlled under certain level in a relatively short time. By applying comparison theorem, we obtain several results which guarantee that the glucose concentration drops to a safe level in a finite time. This potentially contributes to the insulin therapy for diabetics in the clinic.

According to the relationship of initial insulin level (\(I_{0}\)), injection dose (σ) and injection period (τ), we obtain sufficient conditions for the existence of solution of the system (2) (see Theorem 3.1, Theorem 3.2, Theorem 3.3). For every case, we give the upper and lower bounds of the glucose concentration. In clinic, we are more interested in the upper bound of the glucose level. The upper bound in Theorem 3.2 is the same as in Theorem 3.1, so there are two types of upper bound (see inequality (22) and (30)). Obviously, both \(f_{1}(0,T)=(\frac{n+I_{1}(0)}{n+I_{1}(T)})^{\frac{am}{d_{i}}}\) and \(f_{1}(\tau,T)=(\frac{n+I_{1}(\tau)}{n+I_{1}(T)})^{\frac{am}{d_{i}}}\) decrease monotonically with σ, so the upper bound of glucose level is a monotonically decreasing function of σ. That is to say, the upper bound of the glucose concentration we obtained in Sect. 3 will decrease with the increase of the injection dose.

However, the upper bound of the glucose concentration in \([0,T]\) is not necessarily the glucose concentration at time T (i.e. G(T)). In order to evaluate the control effect when the control objective (\(G_{L}< G(T)\leq G_{U}\)) is achieved, we perform a series of numerical simulations to explore factors that affect the control effect.

In our simulations, we set \(T=120\mbox{ min}\) and the other parameter values are chosen and adjusted from [16, 17, 20, 23, 24] and [18] (refer to Table 1). Just like in [16, 23] and [4], a unit conversion is made.

Table 1 Model parameter values from [4]

We first investigate the impact of the initial level of insulin concentration \(I_{0}\) on the glucose level. We set \(\sigma=500\mbox{ mU}\), \(\tau =30\mbox{ min}\), \(G_{0}=210\mbox{ mg/dl}\), and then try three different initial insulin concentration. Figure 1 shows that smaller \(I_{0}\) leads to longer time for the glucose concentration to drop to a safe level. In the whole period of T, the control effect is also better when \(I_{0}\) is smaller.

Figure 1
figure 1

Comparison of the profiles produced by Model (2) with different initial insulin values with \(G_{0}=210\mbox{ mg/dl}\), \(\sigma=500\mbox{ mU}\) and \(\tau=30\mbox{ min}\)

Then we study the injection strategy of insulin when the total injection is fixed. Since there is very little literature that considered the finite-time control of the glucose concentration, it is difficult for us to cite values of T from the literature. However, we believe that the value of T depends on physical conditions of specific patients and it can be larger or smaller in the clinical situation according to different patients. We here select a value of \(T=120\) to illustrate our results. For a predefined time \(T=120\mbox{ min}\), three different injection modes are practiced (see Fig. 2). Injection frequency is fixed as \(\tau=10\mbox{ min}, 30\mbox{ min}, 60\mbox{ min}\), respectively, and the corresponding dose is \(\sigma= 200\mbox{ mU}, 600\mbox{ mU and }1200\mbox{ mU}\). We compare the profiles and find similar result in [4] and [9], that is, with fixed total injection of insulin, impulsive injection with a smaller dose and shorter period is more effective for controlling plasma glucose level.

Figure 2
figure 2

Comparison of the profiles produced by model (2) with the same total insulin injection vs. different delivery periods

To understand the relationship between \(G(T)\) and the injection mode (σ and τ), we study Eqs. (2) and (3) together. In Eq. (3), we treat \(G(T)\) as a function of σ and τ (where σ and τ are hidden in the expression of \(I(t)\)). Figure 3 shows that glucose concentration at T is higher when the injection dose σ is smaller and the injection period τ is longer. Obviously, the surface \(G(T)(\sigma, \tau)\) intersects with the plane \(G(T)=190\), so if and only if the injection dose σ and the injection period τ fall in a certain region in the \((\sigma, \tau)\)-plane, the goal of glucose control (\(G(T)< G_{U}\)) can be achieved.

Figure 3
figure 3

Surface of \(G(T)\) as a function of σ and τ produced by Model (2) with \(G_{0}=210\mbox{ mg/dl}\), \(\sigma=400\mbox{ mU}\)

We also investigate the relationship of \(G(T)\) and σ for fixed τ, and the relationship of \(G(T)\) and τ for fixed σ (refer to Figs. 4 and 5). In Fig. 4, we set \(\tau=30\mbox{ min}, 20\mbox{ min}, 15\mbox{ min}\), respectively. The simulation implies that, for fixed τ, \(G(T)\) decreases with increasing σ. For different τ, the control effect is better when the insulin injections are more frequent. Figure 5 confirms that, for fixed injection dose, the glucose level at time T becomes higher when the injection period τ becomes longer.

Figure 4
figure 4

Comparison of the profiles produced by Model (2) with different injection doses with \(G_{0}=210\mbox{ mg/dl}\), \(\sigma=400\mbox{ mU}\)

Figure 5
figure 5

Comparison of the profiles produced by Model (2) with different injection periods with \(G_{0}=210\mbox{ mg/dl}\), \(\sigma=400\mbox{ mU}\)

From the simulation, we find that, as a function of σ and τ, \(G(T)\) is a monotone function of σ (or τ). However, we cannot obtain analytical result of this due to the complicated expression of \(G(T)\). We will continue this work in the future. According to some clinical situations, in addition to controlling the glucose level at time T (\(G_{L}< G(T)\leq G_{U}\)) in the model (2), we can also try other types of constraints. For example, integral constraints can be considered to control the glucose level in the whole time interval \([0, T]\) and a cost–benefit analysis can also be taken into account. Then the problem can be stated as finding the optimal control parameter σ and injection times \(t_{i}\) to minimize the objective function

$$J_{1}(\sigma,t_{1},t_{2},\ldots,t_{p})= \frac{p\sigma^{2}}{2}+ \int_{0}^{T}\biggl(G(t)-\frac {\alpha G_{U}+\beta G_{L}}{2} \biggr)^{2}\,dt $$

or

$$J_{2}(\sigma,t_{1},t_{2},\ldots,t_{p})= \frac{p\sigma^{2}}{2}+ \int_{0}^{T}\biggl(G(t)-\frac {\alpha G_{U}+\beta G_{L}}{2} \biggr)^{2}\,dt+ \int_{0}^{T}\bigl(G(t)-G_{L} \bigr)^{2}\,dt, $$

where \(0\leq\alpha, \beta\leq1 \) and \(\alpha+ \beta=1\). Insulin injections are not necessarily periodic, and \(t_{i}\) represents the time point of impulsive injection in \([0, T]\). We will continue these studies in our future work.