1 Introduction

In Mackey and Glass [1], Mackey and Glass described a physiological system as the delay differential equation (DDE):

$$ \dot{p}(t)=-\gamma p(t)+ \frac{\beta\theta^{n}p(t-\tau)}{\theta ^{n}+p^{n}(t-\tau)},\quad t \geq0. $$
(1.1)

Here, \(p(t)\) denotes the density of mature cells in blood circulation, τ is the time delay between the production of immature cells in the bone marrow and their maturation for release in circulating bloodstreams, β, θ, γ, and \(n\geq3\) are all positive constants and

$$ \frac{\beta}{\gamma}>1. $$
(1.2)

In [1], Michael C. Mackey and Leon Glass associated the onset of a disease with bifurcations in Eq. (1.1). The fluctuations were caused in peripheral, while blood cell counts in chronic granulocytic leukemia (CGL). So studying the dynamics of Eq. (1.1) is significant to medical research.

Various bifurcations exist in nonlinear dynamical systems, such as complex circuits, networks, and so on. Bifurcations can be important and beneficial if they are under appropriate control. In [2], a nonlinear feedback control method was given, in which a polynomial function was used to control the Hopf bifurcation. Bifurcation control refers to the task of designing a controller to suppress or reduce some existing bifurcation dynamics of a given nonlinear system, thereby achieving some desirable dynamical behaviors [3,4,5,6,7]. In [8], a hybrid control strategy was proposed, in which state feedback and parameter perturbation were used to control the bifurcations. In [9], a discrete-time delayed feedback controller was presented and studied. Proportional-integral-derivative (PID) controller is a widely used control method for dynamics control in a nonlinear system for its superior performance [10,11,12,13,14]. The results show one can delay or advance the onset of bifurcations by changing the control parameters, including the proportional control parameter and the derivative control parameter.

The discussion on the importance of discrete-time analogues in preserving the properties of stability and bifurcation of their continuous-time counterparts has been studied by some authors. For example in [15], the authors considered the numerical approximation of a class of DDEs undergoing a Hopf bifurcation by using the Euler forward method. Motivated by the works on bifurcation control, we adopt a proportional-derivative (PD) feedback control Euler scheme in which a proportional control parameter and a derivative control parameter are used to control the Neimark–Sacker bifurcations. By selecting appropriate control parameters, we obtain that the dynamic behavior of a controlled system can be changed. Especially, a derivative controller can significantly improve the speed of response of a control system. As far as we know, the numerical controlled dynamics for DDES by a PD feedback controller has been rarely studied.

The rest of the paper is organized as follows. In the next section, for a DDE of Mackey–Glass system with PD controller, we analyze the local stability of the equilibria and existence of the Hopf bifurcation. The main results are obtained in Sect. 3. Among them, by using a PD controlled Euler algorithm, the dynamics of the numerical discrete systems are derived according to the Neimark–Sacker bifurcation theorem. In Sect. 4, by applying the theories of discrete bifurcation systems, the direction and stability of bifurcating periodic solutions from the Neimark–Sacker bifurcation of controlled delay equation are confirmed. Section 5 gives numerical examples to illustrate the validity of our results.

2 Hopf bifurcation in DDE via a PD controller

Under the transformation \(p(t)=\theta x(t)\), Eq. (1.1) becomes

$$ \dot{x}(t)=-\gamma x(t)+ \frac{\beta x(t-\tau)}{1+x^{n}(t-\tau)}. $$
(2.1)

\(x_{\ast}\) is a positive fixed point to Eq. (2.1), and \(x_{\ast}\) satisfies

$$ x_{\ast}=\sqrt[n]{\frac{\beta}{\gamma}-1}. $$
(2.2)

Apply a PD controller to system (2.1) as follows:

$$ \frac{\mathrm{d}x}{\mathrm{d}t}= \biggl[-\gamma x(t)+\frac{\beta x(t-\tau )}{1+x^{n}(t-\tau)} \biggr]+k_{p} \bigl(x(t)-x_{\ast} \bigr)+k_{d} \frac{\mathrm {d}}{\mathrm{d}t} \bigl(x(t)-x_{\ast} \bigr), $$
(2.3)

where \(k_{p}\) is the proportional control parameter, and \(k_{d}\) is the derivative control parameter.

Set \(\tilde{x}(t)=x(t)-x_{\ast}\). Equation (2.3) becomes

$$ \frac{\mathrm{d}\tilde{x}}{\mathrm{d}t}=\frac{1}{1-k_{d}} \biggl[-\gamma \bigl( \tilde{x}(t)+x_{\ast} \bigr)+\frac{\beta (\tilde{x}(t-\tau)+x_{\ast })}{1+(\tilde{x}(t-\tau)+x_{\ast})^{n}}+k_{p} \tilde{x}(t) \biggr]. $$
(2.4)

The linearization of Eq. (2.4) at \(\tilde{x}=0\) is

$$ \frac{\mathrm{d}\tilde{x}}{\mathrm{d}t}=\frac{1}{1-k_{d}} \biggl[(k_{p} - \gamma)\tilde{x}(t)+\gamma \biggl(n \biggl(\frac{\gamma}{\beta}-1 \biggr)+1 \biggr) \tilde{x}(t-\tau) \biggr], $$
(2.5)

whose characteristic equation is

$$ \tilde{\lambda}=\frac{1}{1-k_{d}} \biggl[(k_{p}- \gamma)+ \gamma \biggl(n \biggl(\frac{\gamma }{\beta}-1 \biggr)+1 \biggr)e^{-\tilde{\lambda}\tau} \biggr]. $$
(2.6)

For \(\tau=0\), the only root of Eq. (2.6) is

$$ \tilde{\lambda}=\frac{k_{p}-\gamma+\gamma(n(\frac{\gamma}{\beta }-1)+1)}{1-k_{d}}< 0, $$
(2.7)

here \(k_{d}<1\) and

$$ \textstyle\begin{cases} \frac{\beta}{\gamma}>1>\frac{n\gamma}{n\gamma-k_{p}},\quad k_{p}< 0\mbox{ or } k_{p}>n\gamma,\\ \frac{\beta}{\gamma}>\frac{n\gamma}{n\gamma-k_{p}}>1,\quad 0< k_{p}< n\gamma. \end{cases} $$
(2.8)

Let \(u(t)=x(\tau t)\), then Eq. (2.1) can be written as

$$ \begin{aligned} \dot{u}(t)=-\gamma\tau u(t)+ \frac{\beta\tau u(t-1)}{1+u^{n}(t-1)}. \end{aligned} $$
(2.9)

\(u_{\ast}\) is a positive fixed point to Eq. (2.9), and \(u_{\ast}\) satisfies

$$ u_{\ast}=x_{\ast}=\sqrt[n]{\frac{\beta}{\gamma}-1}. $$
(2.10)

Apply a PD controller to system (2.9) as follows:

$$ \frac{\mathrm{d}u}{\mathrm{d}t}= \biggl[-\gamma\tau u(t)+\frac{\beta\tau u(t-1)}{1+u^{n}(t-1)} \biggr]+k_{p}\tau \bigl(u(t)-u_{\ast} \bigr)+k_{d} \frac{\mathrm {d}}{\mathrm{d}t} \bigl(u(t)-u_{\ast} \bigr). $$
(2.11)

Set \(z(t)=u(t)-u_{\ast}\). Equation (2.11) becomes

$$ \frac{\mathrm{d}z}{\mathrm{d}t}=\frac{1}{1-k_{d}} \biggl[-\gamma\tau \bigl(z(t)+u_{\ast} \bigr)+\frac{\beta\tau(z(t-1)+u_{\ast})}{1+(z(t-1)+u_{\ast })^{n}}+k_{p}\tau z(t) \biggr]. $$
(2.12)

The linearization of Eq. (2.12) at \(z=0\) is

$$ \frac{\mathrm{d}z}{\mathrm{d}t}=\frac{1}{1-k_{d}} \biggl[(k_{p} \tau- \gamma \tau)z(t)+\gamma\tau \biggl(n \biggl(\frac{\gamma}{\beta}-1 \biggr)+1 \biggr)z(t-1) \biggr], $$
(2.13)

whose characteristic equation is

$$ \lambda=\frac{1}{1-k_{d}} \biggl[(k_{p}\tau-\gamma \tau)+\gamma\tau \biggl(n \biggl(\frac {\gamma}{\beta}-1 \biggr)+1 \biggr)e^{-\lambda} \biggr], $$
(2.14)

with \(\lambda=\tilde{\lambda}\tau\) for \(\tau\neq0\).

Let iω be a root of Eq. (2.14) if and only if

$$ (1-k_{d})\mathrm{i}\omega=(k_{p}\tau-\gamma\tau)+\gamma \tau \biggl(n \biggl(\frac {\gamma}{\beta}-1 \biggr)+1 \biggr)e^{-\mathrm{i}\omega}. $$

Separating the real and imaginary parts, we have

$$ \textstyle\begin{cases} \gamma\tau(n(\frac{\gamma}{\beta}-1)+1)\cos\omega+(k_{p}\tau-\gamma\tau )=0,\\ \gamma\tau(n(\frac{\gamma}{\beta}-1)+1)\sin\omega+(1-k_{d})\omega=0, \end{cases} $$
(2.15)

such that

$$ \biggl(\gamma\tau \biggl(n \biggl(\frac{\gamma}{\beta}-1 \biggr)+1 \biggr) \biggr)^{2}=(k_{p}\tau- \gamma\tau )^{2}+(1-k_{d})^{2} \omega^{2}, $$

that is,

$$ \omega=\frac{\tau}{1-k_{d}}\sqrt{ \biggl(\gamma \biggl(n \biggl( \frac{\gamma}{\beta }-1 \biggr)+1 \biggr)+(k_{p}-\gamma) \biggr) \biggl( \gamma \biggl(n \biggl(\frac{\gamma}{\beta }-1 \biggr)+1 \biggr)-(k_{p}- \gamma) \biggr)}. $$
(2.16)

According to (2.6), (2.8), (2.14), and (2.16), this is impossible if and only if \(k_{d}<1\) and

$$ \textstyle\begin{cases} \frac{n\gamma}{n\gamma-k_{p}}< 1< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad (2-n)\gamma< k_{p}< 0,\\ 1< \frac{n\gamma}{n\gamma-k_{p}}< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad 0< k_{p}< \gamma. \end{cases} $$
(2.17)

For \(\frac{\beta}{\gamma}>\frac{n\gamma}{k_{p}+(n-2)\gamma}\), here \(k_{d}<1\), \((2-n)\gamma< k_{p}<0\) or \(0< k_{p}<\gamma\), let

$$ \tau_{k}=-\frac{(1-k_{d})w_{k}}{\gamma[n(\frac{\beta}{\gamma }-1)+1]\sin w_{k}},\quad k=0,1,2,\ldots. $$

Set

$$ \textstyle\begin{cases} \omega_{k}=\frac{\tau_{k} }{1-k_{d}}\sqrt{(\gamma(n(\frac{\gamma}{\beta }-1)+1)+(k_{p}-\gamma))(\gamma(n(\frac{\gamma}{\beta }-1)+1)-(k_{p}-\gamma))},\\ \quad k=0,1,2,\ldots. \end{cases} $$

Let \(\lambda_{k}=\alpha_{k}(\tau)+\mathrm{i}\omega_{k}(\tau)\) denote a root of Eq. (2.14) near \(\tau=\tau_{k}\) such that \(\alpha_{k}(\tau _{k})=0\), \(\omega_{k}(\tau_{k})=\omega_{k}\). We obtain the following result.

Lemma 1

\(\alpha_{k}'(\tau_{k})>0\).

Proof

By differentiating both sides of Eq. (2.14) with respect to τ, we obtain

$$ \frac{\mathrm{d}\lambda}{\mathrm{d}\tau}=\frac{\gamma(n(\frac{\gamma }{\beta}-1)+1)e^{-\lambda}+k_{p}-\gamma}{1-k_{d}+\gamma\tau(n(\frac {\gamma}{\beta}-1)+1)e^{-\lambda}}. $$

Therefore,

$$ \frac{\mathrm{d}\lambda}{\mathrm{d}\tau} \Big|_{\tau=\tau_{k}}= \frac{\gamma (n(\frac{\gamma}{\beta}-1)+1)\cos\omega_{k}+k_{p}-\gamma-\mathrm {i}\gamma(n(\frac{\gamma}{\beta}-1)+1)\sin\omega_{k}}{1-k_{d}+\gamma \tau(n(\frac{\gamma}{\beta}-1)+1)(\cos\omega_{k}-\mathrm{i}\sin\omega _{k}) } =\frac{A+B\mathrm{i}}{C+D\mathrm{i}}, $$

here

$$\begin{aligned} &A=\gamma\biggl(n\biggl(\frac{\gamma}{\beta}-1\biggr)+1\biggr)\cos \omega_{k}+k_{p}-\gamma;\qquad B=-\gamma\biggl(n\biggl( \frac{\gamma}{\beta}-1\biggr)+1\biggr)\sin\omega_{k}; \\ &C=1-k_{d}+\gamma\tau\biggl(n\biggl(\frac{\gamma}{\beta}-1\biggr)+1 \biggr)\cos\omega_{k};\qquad D=-\gamma\tau\biggl(n\biggl( \frac{\gamma}{\beta}-1\biggr)+1\biggr)\sin\omega_{k}. \end{aligned}$$

This implies that

$$ \begin{aligned} &\alpha_{k}'( \tau_{k})=\frac{AC+BD}{\Delta_{c}} & =\frac{\tau[(\gamma(n(\frac{\gamma}{\beta}-1)+1))^{2}-(k_{p}-\gamma )^{2}]}{\Delta_{c}}>0, \end{aligned} $$

where \(\Delta_{c}=C^{2}+D^{2}\). The result is confirmed. □

Theorem 1

For systems (2.3) and (2.11), we give the following statements:

  • If

    $$ \textstyle\begin{cases} \frac{n\gamma}{n\gamma-k_{p}}< 1< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad (2-n)\gamma< k_{p}< 0,\\ 1< \frac{n\gamma}{n\gamma-k_{p}}< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad 0< k_{p}< \gamma, \end{cases} $$
    (2.18)

    and \(k_{d}<1\), then \(u=u_{\ast}\) is asymptotically stable.

  • If \(\frac{\beta}{\gamma}>\frac{n\gamma}{k_{p}+(n-2)\gamma}\), here \(k_{d}<1\), \((2-n)\gamma< k_{p}<0\) or \(0< k_{p}<\gamma\) (when \(k_{p}=0, \frac{\beta}{\gamma}>\frac{n}{n-2}\)), then \(u=u_{\ast}\) is asymptotically stable for \(\tau\in[0,\tau_{0})\) and unstable for \(\tau>\tau_{0}\). Equations (2.3) and (2.11) undergo a Hopf bifurcation at \(u=u_{\ast}\) when \(\tau=\tau_{k}\) for \(k=0, 1, 2,\ldots\) .

3 Neimark–Sacker bifurcation analysis of the PD control Euler method

This section concerns the stability and bifurcation of the numerical discrete PD control system. We implement the PD control strategy [10,11,12,13].

Set \(y(t)=u(t)-u_{\ast}\). Equation (2.11) becomes

$$ \frac{\mathrm{d}y}{\mathrm{d}t}=\frac{1}{1-k_{d}} \biggl[-\gamma\tau \bigl(y(t)+u_{\ast} \bigr)+\frac{\beta\tau(y(t-1)+u_{\ast})}{1+(y(t-1)+u_{\ast })^{n}}+k_{p}\tau y(t) \biggr]. $$
(3.1)

When \(k_{d}=0,k_{p}=0\), Eq. (3.1) is the uncontrolled system.

Employing the Euler method to Eq. (3.1) yields the difference equation

$$ y_{n+1}=y_{n}+\frac{h}{1-k_{d}} \biggl[(k_{p}-\gamma)\tau y_{n}-\gamma\tau u_{\ast}+ \frac{\beta\tau(y_{n-m}+u_{\ast})}{1+(y_{n-m}+u_{\ast})^{n}} \biggr], $$
(3.2)

here \(h=\frac{1}{m}\), \(m\in\mathbb{Z}\), \(y_{n}\) is an approximate value to \(y(nh)\).

Providing a new variable \(Y_{n}=(y_{n},y_{n-1},\ldots,y_{n-m})^{T}\), we can rewrite (3.2) as

$$ Y_{n+1}=F(Y_{n},\tau), $$
(3.3)

where \(F=(F_{0},F_{1},\ldots,F_{m})^{T}\), and

$$ F_{k}= \textstyle\begin{cases} y_{n-k}+\frac{h}{1-k_{d}}[(k_{p}-\gamma)\tau y_{n-k}-\gamma\tau u_{\ast }+\frac{\beta\tau(y_{n-m-k}+u_{\ast})}{1+(y_{n-m-k}+u_{\ast})^{n}}],& k=0,\\ y_{n-k+1},\quad 1\leq k \leq m. \end{cases} $$
(3.4)

Clearly the linear part of map (3.3) is

$$ Y_{n+1}=AY_{n}. $$
(3.5)

Here

A= [ 1 + h ( k p γ ) τ 1 k d 0 0 0 h γ τ ( 1 + n ( γ β 1 ) ) 1 k d 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 ] .
(3.6)

The characteristic equation of A is

$$ \lambda^{m+1}- \biggl(1+\frac{h(k_{p}-\gamma)\tau}{1-k_{d}} \biggr) \lambda^{m}-\frac {h\gamma\tau(1+n(\frac{\gamma}{\beta}-1))}{1-k_{d}}=0. $$
(3.7)

Lemma 2

If \(k_{d}<1\) and

$$ \textstyle\begin{cases} \frac{\beta}{\gamma}>1>\frac{n\gamma}{n\gamma-k_{p}},\quad k_{p}< 0\textit{ or }k_{p}>n\gamma,\\ \frac{\beta}{\gamma}>\frac{n\gamma}{n\gamma-k_{p}}>1,\quad 0< k_{p}< n\gamma, \end{cases} $$
(3.8)

then all the roots of Eq. (3.7) have modulus less than one for sufficiently small \(\tau>0\).

Proof

For \(\tau=0\), Eq. (3.7) becomes

$$ \lambda^{m+1}-\lambda^{m}=0. $$

The equation has an m-fold root \(\lambda=0\) and a simple root \(\lambda=1\).

Consider the root \(\lambda(\tau)\) such that \(|\lambda(0)|= 1\). This root is a \(C^{1}\) function of τ. For Eq. (3.7), we have

$$ \frac{\mathrm{d} \vert \lambda \vert ^{2}}{\mathrm{d}\tau}=\lambda\frac{\mathrm{d}\overline{\lambda}}{\mathrm{d}\tau }+\overline{\lambda} \frac{\mathrm{d}\lambda}{\mathrm{d}\tau}. $$

If \(k_{d}<1\) and (3.8) are satisfied, then

$$ \frac{\mathrm{d} \vert \lambda \vert ^{2}}{\mathrm{d}\tau} \Big|_{\lambda=1,\tau=0}=\frac{2h(k_{p}-\gamma +\gamma(n(\frac{\gamma}{\beta}-1)+1))}{1-k_{d}}< 0. $$
(3.9)

Consequently, all roots of Eq. (3.7) lie in \(|\lambda|<1\) for sufficiently small \(\tau>0\). □

Lemma 3

If the step-size h is sufficiently small, \(k_{d}<1\) and

$$ \textstyle\begin{cases} \frac{n\gamma}{n\gamma-k_{p}}< 1< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad (2-n)\gamma< k_{p}< 0,\\ 1< \frac{n\gamma}{n\gamma-k_{p}}< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad 0< k_{p}< \gamma, \end{cases} $$
(3.10)

then Eq. (3.7) has no root with modulus one for all \(\tau>0\).

Proof

When two roots of characteristic equation (3.7) pass through the unit circle, a Neimark–Sacker bifurcation occurs. Assume that there exists \(\tau^{\ast }\) such that \(e^{\mathrm{i}\omega^{\ast}}, \omega^{\ast}\in(-\pi,\pi]\) is the root of characteristic equation (3.7). Then

$$ e^{\mathrm{i}(m+1)\omega^{\ast}}- \biggl(1+\frac{h((k_{p}-\gamma)\tau^{\ast })}{1-k_{d}} \biggr)e^{\mathrm{i}m\omega^{\ast}}- \frac{h\gamma\tau^{\ast }[n(\frac{\gamma}{\beta}-1)+1]}{1-k_{d}}=0. $$
(3.11)

Hence, separating the real and the imaginary parts gives

$$ \textstyle\begin{cases} \cos\omega^{\ast}-(1+\frac{h((k_{p}-\gamma)\tau^{\ast })}{1-k_{d}})-\frac{h\gamma\tau^{\ast}[n(\frac{\gamma}{\beta }-1)+1]}{1-k_{d}}\cos m\omega^{\ast}=0,\\ \sin\omega^{\ast}+\frac{h\gamma\tau^{\ast}[n(\frac{\gamma}{\beta }-1)+1]}{1-k_{d}}\sin m\omega^{\ast}=0. \end{cases} $$
(3.12)

We get

$$ \cos\omega^{\ast}=1+ \biggl(\frac{h\tau^{\ast}}{1-k_{d}} \biggr)^{2}\frac {(k_{p}-\gamma-\gamma[n(\frac{\gamma}{\beta}-1)+1])(k_{p}-\gamma+\gamma [n(\frac{\gamma}{\beta}-1)+1])}{2(1+\frac{h((k_{p}-\gamma)\tau^{\ast })}{1-k_{d}})}. $$
(3.13)

By virtue of the step-size h being sufficiently small, \(k_{d}<1\) and (3.10) being satisfied, we obtain \(\cos\omega^{\ast}>1\), which yields a contradiction. So Eq. (3.7) has no root with modulus one for all \(\tau>0\). □

If \(\frac{\beta}{\gamma}>\frac{n\gamma}{k_{p}+(n-2)\gamma}\), here \(k_{d}<1\), \((2-n)\gamma< k_{p}<0\) or \(0< k_{p}<\gamma\) and the step-size h is sufficiently small, then \(|\cos\omega^{\ast}|<1\). From (3.13) we know that

$$\begin{aligned} \omega_{k}^{\ast}={}&\arccos \biggl(1+ \biggl( \frac{h\tau_{k}^{\ast}}{1-k_{d}} \biggr)^{2}\frac {(k_{p}-\gamma-\gamma[n(\frac{\gamma}{\beta}-1)+1])(k_{p}-\gamma+\gamma [n(\frac{\gamma}{\beta}-1)+1])}{2(1+\frac{h(k_{p}\tau_{k}^{\ast}-\gamma \tau_{k}^{\ast})}{1-k_{d}})} \biggr) \\ &{} +2k \pi,\quad k=0,1,2,\ldots, \biggl[\frac{m-1}{2} \biggr], \end{aligned}$$
(3.14)

where \([\cdot]\) denotes the greatest integer function. It is clear that there exists a sequence of the time delay parameters \(\tau _{k}^{\ast}\) satisfying Eq. (3.12) according to \(\omega=\omega_{k}^{\ast}\).

Lemma 4

If the step-size h is sufficiently small, let \(\lambda _{k}(\tau)=r_{k}(\tau)e^{\mathrm{i}\omega_{k}(\tau)}\) be a root of Eq. (3.7) near \(\tau=\tau_{k}^{\ast}\) satisfying \(r_{k}(\tau _{k}^{\ast})=1\) and \(\omega_{k}(\tau_{k}^{\ast})=\omega_{k}^{\ast}\), then

$$ \frac{\mathrm{d}r_{k}^{2}(\tau)}{\mathrm{d}\tau} \Big|_{\tau=\tau_{k}^{\ast}, \omega=\omega_{k}^{\ast}}>0. $$
(3.15)

Proof

According to Eq. (3.7), we obtain

$$\begin{aligned} &\lambda^{m}=\frac{\frac{h\gamma\tau}{1-k_{d}}[n(\frac{\gamma}{\beta }-1)+1]}{\lambda-[1+\frac{h\tau(k_{p}-\gamma)}{1-k_{d}}]}, \\ &\frac{\mathrm{d}r_{k}^{2}(\tau)}{\mathrm{d}\tau} \Big|_{\tau=\tau_{k}^{\ast }, \omega=\omega_{k}^{\ast}}=2\Re \biggl( \overline{\lambda} \frac{\mathrm{d}\lambda }{\mathrm{d}\tau} \biggr) \Big|_{\tau=\tau_{k}^{\ast}, \omega=\omega_{k}^{\ast}} \\ &\phantom{\frac{\mathrm{d}r_{k}^{2}(\tau)}{\mathrm{d}\tau} \Big|_{\tau=\tau_{k}^{\ast }, \omega=\omega_{k}^{\ast}}} =\frac{2(1-k_{d})[(1-k_{d})(2m+1)+(k_{p}-\gamma)\tau](1-\cos\omega )}{\tau\Delta_{d}} \Big|_{\tau=\tau_{k}^{\ast}, \omega=\omega_{k}^{\ast}}>0, \end{aligned}$$

where \(\Delta_{d}=((1-k_{d})(m+1)\cos\omega-m(1-k_{d})-(k_{p}\tau -\gamma\tau))^{2}+((1-k_{d})(m+1)\sin\omega)^{2}\), therefore this completes the proof. □

Theorem 2

In view of system (3.2), if the step-size h is sufficiently small, \(k_{d}<1\), the following statements are true:

(1) If

$$ \textstyle\begin{cases} \frac{n\gamma}{n\gamma-k_{p}}< 1< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad (2-n)\gamma< k_{p}< 0,\\ 1< \frac{n\gamma}{n\gamma-k_{p}}< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad 0< k_{p}< \gamma, \end{cases} $$

then \(u=u_{\ast}\) is asymptotically stable for any \(\tau>0\);

(2) If \(\frac{\beta}{\gamma}>\frac{n\gamma}{k_{p}+(n-2)\gamma}\), here \((2-n)\gamma< k_{p}<0\) or \(0< k_{p}<\gamma\), then \(u=u_{\ast}\) is asymptotically stable for \(\tau\in(0,\tau_{0}^{\ast})\) and unstable for \(\tau>\tau_{0}^{\ast}\). Equation (3.2) undergoes a Neimark–Sacker bifurcation at \(u=u_{\ast}\) when \(\tau=\tau_{k}^{\ast}\) for \(k=0,1,2,\ldots,[\frac{m-1}{2}]\).

Proof

(1) If \(k_{d}<1\) and

$$ \textstyle\begin{cases} \frac{n\gamma}{n\gamma-k_{p}}< 1< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad (2-n)\gamma< k_{p}< 0,\\ 1< \frac{n\gamma}{n\gamma-k_{p}}< \frac{\beta}{\gamma}< \frac{n\gamma }{k_{p}+(n-2)\gamma},\quad 0< k_{p}< \gamma, \end{cases} $$

from Lemmas 2 and 3, we know that Eq. (3.7) has no root with modulus one for all \(\tau>0\). Applying Corollary 2.4 in [16], all roots of Eq. (3.7) have modulus less than one for all \(\tau>0\). The conclusion follows.

(2) If \(\frac{\beta}{\gamma}>\frac{n\gamma}{k_{p}+(n-2)\gamma}\), here \(k_{d}<1\), \((2-n)\gamma< k_{p}<0\) or \(0< k_{p}<\gamma\), applying Lemmas 3 and 4, we know that all roots of Eq. (3.7) have modulus less than one when \(\tau\in(0,\tau_{0})\), and Eq. (3.7) has at least a couple of roots with modulus greater than one when \(\tau>\tau_{0}^{\ast}\). The conclusion follows. □

Remark 1

Through the above conclusions of Lemmas 24 and Theorem 2, for the step-size h is sufficiently small, due to \(\frac{\beta}{\gamma}>\frac {n\gamma}{k_{p}+(n-2)\gamma}\), here \(k_{d}<1\), \((2-n)\gamma< k_{p}<0\) or \(0< k_{p}<\gamma\) (when \(k_{p}=0, \frac{\beta}{\gamma}>\frac{n}{n-2}\)), we can delay (or advance) the onset of a Neimark–Sacker bifurcation by choosing appropriate control parameters \(k_{p}\) and \(k_{d}\).

4 Direction and stability of the Neimark–Sacker bifurcation in a discrete control model

In the previous section, we have verified the conditions for the Neimark–Sacker bifurcation to occur when \(\tau=\tau_{k}^{\ast}\) for \(k=0,1,2,\ldots,[\frac{m-1}{2}]\). In this section we continue to study the direction of the Neimark–Sacker bifurcation and the stability of the bifurcating periodic solutions when \(\tau=\tau_{0}^{\ast}\) using the techniques from normal form and center manifold theory [17, 18].

$$\begin{aligned} y_{n+1}={}& \biggl(1+ \frac{h\tau(k_{p}-\gamma)}{1-k_{d}} \biggr)y_{n} \\ &{}+\frac{h\tau\gamma[n(\frac{\gamma}{\beta}-1)+1]}{1-k_{d}} y_{n-m}+\frac{1}{2}\frac{h\tau\gamma}{1-k_{d}} \frac{n(\beta-\gamma )[(n-1)\beta-2n\gamma]}{\beta^{2}u_{\ast}}y_{n-m}^{2} \\ &{}+\frac{1}{6}\frac{h\tau\gamma}{1-k_{d}}\frac{n(\beta-\gamma )[(n^{2}-1)\beta^{2}-6n^{2}\beta\gamma+6n^{2}\gamma^{2}]}{\beta ^{3}u_{\ast}^{2}} y_{n-m}^{3}+O \bigl( \vert y_{n-m} \vert ^{4} \bigr). \end{aligned}$$

So, we can rewrite system (3.2) as

$$ Y_{n+1}=AY_{n}+\frac{1}{2}B(Y_{n},Y_{n})+ \frac {1}{6}C(Y_{n},Y_{n},Y_{n})+O \bigl( \Vert Y_{n} \Vert ^{4} \bigr), $$

where

$$\begin{aligned} &B(Y_{n},Y_{n})= \bigl(b_{0}(Y_{n},Y_{n}),0, \ldots,0 \bigr)^{T}, \\ &C(Y_{n},Y_{n},Y_{n})= \bigl(c_{0}(Y_{n},Y_{n},Y_{n}),0, \ldots,0 \bigr)^{T}, \end{aligned}$$

and

$$ \begin{aligned} &\tilde{a}_{0}=1+ \frac{h\tau(k_{p}-\gamma)}{1-k_{d}}, \\ &\tilde{a}_{1}=\frac{h\tau\gamma[n(\frac{\gamma}{\beta }-1)+1]}{1-k_{d}}, \\ &b_{0}(\phi,\phi)=\frac{h\tau\gamma}{1-k_{d}}\frac{n(\beta-\gamma )[(n-1)\beta-2n\gamma]}{\beta^{2}u_{\ast}} \phi_{m}^{2}=\widetilde {b}\cdot\phi_{m}^{2}, \\ & c_{0}(\phi,\phi,\phi)=\frac{h\tau\gamma}{1-k_{d}}\frac{n(\beta-\gamma )[(n^{2}-1)\beta^{2}-6n^{2}\beta\gamma+6n^{2}\gamma^{2}]}{\beta ^{3}u_{\ast}^{2}} \phi_{m}^{3} =\widetilde{c}\cdot\phi_{m}^{3}. \end{aligned} $$
(4.1)

Let \(q=q(\tau_{0}^{\ast})\in \mathbb{C}^{m+1}\) be an eigenvector of A corresponding to \(e^{\mathrm{i}\omega_{0}^{\ast}}\), then

$$Aq=e^{\mathrm{i}\omega_{0}^{\ast}}q,\qquad A\overline{q}=e^{-\mathrm{i}\omega _{0}^{\ast}} \overline{q}. $$

We also introduce an adjoint eigenvector \(q^{\ast}=q^{\ast}(\tau)\in {\mathbb{C}^{m+1}}\) having the properties

$$A^{T}q^{\ast}=e^{-\mathrm{i}\omega_{0}^{\ast}}q^{\ast},\qquad A^{T}\overline{q}^{\ast}=e^{\mathrm{i}\omega_{0}^{\ast}} \overline {q}^{\ast}, $$

and satisfying the normalization \(\langle q^{\ast},q\rangle=1\), where \(\langle q^{\ast},q\rangle =\sum_{i=0}^{m}\overline{q}_{i}^{\ast}q_{i}\).

Lemma 5

([19])

Consider a vector-valued function \(p: \mathbb{C} \longrightarrow\mathbb{C}^{m+1}\) by

$$p(\xi)= \bigl(\xi^{m},\xi^{m-1},\ldots,1 \bigr)^{T}. $$

If ξ is an eigenvalue of A, then \(Ap(\xi)=\xi p(\xi)\).

According to Lemma 5, we have

$$ q=p \bigl(e^{\mathrm{i}w_{0}^{\ast}} \bigr)= \bigl(e^{\mathrm{i}mw_{0}^{\ast}},e^{\mathrm {i}(m-1)w_{0}^{\ast}}, \ldots,e^{\mathrm{i}w_{0}^{\ast}},1 \bigr)^{T}. $$
(4.2)

Lemma 6

Suppose \(q^{\ast}=(q_{0}^{\ast},q_{1}^{\ast},\ldots ,q_{m}^{\ast})^{T}\)is the eigenvector of \(A^{T}\) corresponding to eigenvalue \(e^{-\mathrm{i}w_{0}^{\ast}}\), and \(\langle q^{\ast},q\rangle =1\). Then

$$ q^{\ast}=\overline{K} \bigl(1,\tilde{a}_{1}e^{\mathrm{i}mw_{0}^{\ast}}, \tilde {a}_{1}e^{\mathrm{i}(m-1)w_{0}^{\ast}},\ldots,\tilde{a}_{1}e^{2\mathrm {i}w_{0}^{\ast}}, \tilde{a}_{1}e^{\mathrm{i}w_{0}^{\ast}} \bigr)^{T}, $$
(4.3)

where

$$ K= \bigl[e^{-\mathrm{i}mw_{0}^{\ast}}+m\tilde{a}_{1}e^{-\mathrm{i}w_{0}^{\ast}} \bigr]^{-1}. $$
(4.4)

Proof

Assign \(q^{\ast}\) satisfies \(A^{T}q^{\ast}=\overline{z}q^{\ast}\) with \(\overline{z}=e^{-\mathrm{i}w_{0}^{\ast}}\). Then there are

$$ \textstyle\begin{cases} \tilde{a}_{0}q_{0}^{\ast}+q_{1}^{\ast}=e^{-\mathrm{i}w_{0}^{\ast }}q_{0}^{\ast},\\ q_{k}^{\ast}=e^{-\mathrm{i}w_{0}^{\ast}}q_{k-1}^{\ast},\quad k=2,3,\ldots ,m,\\ \tilde{a}_{1}q_{0}^{\ast}=e^{-\mathrm{i}w_{0}^{\ast}}q_{m}^{\ast}. \end{cases} $$
(4.5)

Let \(q_{m}^{\ast}=\tilde{a}_{1}e^{\mathrm{i}w_{0}^{\ast}}\overline{K}\), by the normalization \(\langle q^{\ast},q\rangle =1\) and direct computation, the lemma follows. □

Let \(T_{\mathrm{center}}\) denote a real eigenspace corresponding to \(e^{\pm\mathrm{i}w_{0}^{\ast}}\), which is two-dimensional and is spanned by \(\{\Re(q),Im(\bar{q})\}\), and let \(T_{\mathrm{stable}}\) be a real eigenspace corresponding to all eigenvalues of \(A^{T}\), other than \(e^{\pm\mathrm{i}w_{0}^{\ast}}\), which is \((m-1)\)-dimensional.

All vectors \(x\in\mathbb{R}^{m+1}\) can be decomposed as

$$ x=vq+\bar{v} \bar{q}+y, $$

where \(v\in\mathbb{C}\), \(vq+\bar{v} \bar{q}\in T_{\mathrm{center}}\), and \(y\in T_{\mathrm{stable}}\). The complex variable v can be viewed as a new coordinate on \(T_{\mathrm{center}}\), so we have

$$ \begin{aligned} &v= \bigl\langle q^{\ast},x \bigr\rangle , \\ &y=x- \bigl\langle q^{\ast},x \bigr\rangle q- \bigl\langle \overline{q}^{\ast},x \bigr\rangle \overline{q}. \end{aligned} $$

Let \(a(\lambda)\) be a characteristic polynomial of A and \(\lambda_{0}=e^{\mathrm{i}w_{0}^{\ast}}\). Following the algorithms in [17] and using a computation process similar to that in [15, 19], we have

$$ \begin{aligned} &g_{20}= \bigl\langle q^{\ast},B(q,q) \bigr\rangle , \\ &g_{11}= \bigl\langle q^{\ast},B(q,\overline{q}) \bigr\rangle , \\ &g_{02}= \bigl\langle q^{\ast},B(\overline{q},\overline{q}) \bigr\rangle , \\ &g_{21}= \bigl\langle q^{\ast},B(\overline{q},w_{20}) \bigr\rangle +2 \bigl\langle q^{\ast },B(q,w_{11}) \bigr\rangle + \bigl\langle q^{\ast},C(q,q,\overline{q}) \bigr\rangle , \end{aligned} $$

where

$$ \begin{aligned} &w_{20}=\frac{b_{0}(q,q)}{a(\lambda_{0}^{2})}p \bigl( \lambda_{0}^{2} \bigr)-\frac {\langle q^{\ast},B(q,q)\rangle }{\lambda_{0}^{2}-\lambda_{0}}q-\frac{\langle \overline {q}^{\ast},B(q,q)\rangle }{\lambda_{0}^{2}-\overline{\lambda_{0}}} \overline {q}, \\ &w_{11}=\frac{b_{0}(q,\overline{q})}{a(1)}p(1)-\frac{\langle q^{\ast },B(q,\overline{q})\rangle }{1-\lambda_{0}}q-\frac{\langle \overline{q}^{\ast },B(q,\overline{q})\rangle }{1-\overline{\lambda_{0}}} \overline{q}. \end{aligned} $$

So, we can get an expression for the critical coefficient \(c_{1}(\tau_{0}^{\ast})\)

$$ c_{1} \bigl(\tau_{0}^{\ast} \bigr)= \frac{g_{20}g_{11}(1-2\lambda_{0})}{2(\lambda _{0}^{2}-\lambda_{0})}+\frac{ \vert g_{11} \vert ^{2}}{1-\overline{\lambda _{0}}}+\frac{ \vert g_{02} \vert ^{2}}{2(\lambda_{0}^{2}-\overline{\lambda _{0}})}+\frac{g_{21}}{2}. $$
(4.6)

By (4.1), (4.2), and Lemma 6, we get

$$ c_{1} \bigl(\tau_{0}^{\ast} \bigr)= \frac{K}{2} \biggl(\frac{\widetilde {b}^{2}}{a(e^{2w_{0}^{\ast}\mathrm{i}})}+\frac{2\widetilde {b}^{2}}{a(1)}+\widetilde{c} \biggr). $$
(4.7)

We obtain the stability of the closed invariant curve by applying the Neimark–Sacker bifurcation theorem [20]. The results are as follows.

Theorem 3

If \(\frac{\beta}{\gamma}>\frac{n\gamma}{k_{p}+(n-2)\gamma}\), here \(k_{d}<1\), \((2-n)\gamma< k_{p}<0\), or \(0< k_{p}<\gamma\), then \(u=u_{\ast }\) is asymptotically stable for any \(\tau\in[0,\tau_{0}^{\ast})\) and unstable for \(\tau>\tau_{0}^{\ast }\). An attracting (repelling) invariant closed curve exists for \(\tau>\tau_{0}^{\ast}\) if \(\Re[e^{-\mathrm{i}w_{0}}c_{1}(\tau_{0}^{\ast })]<0\) \((>0)\). (When \(k_{p}=0,k_{d}=0\), we obtain the results of the uncontrolled system.)

Remark 2

The proportional control parameter \(k_{p}\) and the derivative control parameter \(k_{d}\) could decide the dynamics of system (3.2), e.g., the stability, the amplitude of the closed invariant curve, and the direction of the bifurcation [4, 7, 10, 17, 19].

5 Numerical simulations

The purpose of this section is to validate the effectiveness of the PD control Euler method in Sects. 24 by numerical examples.

Let \(\beta=0.2, \gamma=0.1, n=10\), then \(u_{\ast}=1\). From Table 1 we can see the different values of \(\tau_{0}\) by choosing \(k_{p},k_{d}\) with the PD control Euler method. For \(h=1/10\), at different \(k_{p},k_{d}\), the results are shown in Figs. 15.

Figure 1
figure 1

The numerical solution of Eq. (2.11) with PD control Euler method corresponding to \(k_{p}=0.09,k_{d}=0.2\) when (a) \(\tau=2.5\), (b) \(\tau=3.5\)

Figure 2
figure 2

The numerical solution of Eq. (2.11) with PD control Euler method corresponding to \(k_{p}=0,k_{d}=0\) when (a) \(\tau=3\), (b) \(\tau=5\)

Table 1 The values of \(\tau_{0}\) of the PD control Euler method

From Figs. 3 and 4 and Table 1, we could argue that the PD control Euler method enlarges the stable region by choosing control parameters \(k_{p}<0,k_{d}<1\). From Figs. 1 and 5, we could obtain that the PD control Euler method narrows the stable region by choosing control parameters \(k_{p}>0,k_{d}<1\).

Figure 3
figure 3

The numerical solution of Eq. (2.11) with PD control Euler method corresponding to \(k_{p}=-0.2,k_{d}=0.2\) when (a) \(\tau=5\), (b) \(\tau=7\)

Figure 4
figure 4

The numerical solution of Eq. (2.11) with PD control Euler method corresponding to \(k_{p}=-0.2,k_{d}=-0.2\) when (a) \(\tau=7\), (b) \(\tau=10\)

Figure 5
figure 5

The numerical solution of Eq. (2.11) with PD control Euler method corresponding to \(k_{p}=0.09,k_{d}=0.8\) when (a) \(\tau=0.6\), (b) \(\tau=0.8\)

At the same time, for the purpose of comparison, we choose the same the proportional control parameter \(k_{p}=0.09\), the different derivative control parameters \(k_{d}=0.2\) (Fig. 1) and \(k_{d}=0.8\) (Fig. 5). The results show that the derivative controller can significantly improve the speed of response of a control system.

6 Conclusions

In this paper, the problem of a proportional-derivative (PD) feedback numerical control method for Mackey–Glass system has been studied. In Sect. 2, for DDE of Mackey–Glass system with PD controller, we analyzed the local stability of equilibria and existence of the Hopf bifurcation. In Sects. 3 and 4, the PD control numerical strategy can delay (or advance) the onset of an inherent bifurcation. Some computer simulations were performed to illustrate the theoretical results. According to the theoretical and numerical analysis, by choosing a different proportional control parameter \(k_{p}\) and a derivative control parameter \(k_{d}\), we can enlarge (or narrow) the stable region and postpone (or advance) the onset of the Neimark–Sacker bifurcation. PD control laws proved effective since they made the control system fairly sensitive to the parameter. In our future work, we intend to widen the application scopes of our theories.