1 Introduction

By using the methods developed by the authors in [13], the codimension one and two bifurcations for some neural network models with time delays have been studied; see [419] for example and the references therein. But except the authors in [20, 21] who have carried out the Hopf bifurcation of some models with n neurons, there are few codimension two bifurcation results about the neural network models with n neurons and more delays. Recently, the BT bifurcation, Hopf-transcritical, and Hopf-pitchfork bifurcations of the following model:

$$ \begin{aligned} &\dot{u}_{1}(t)=-ku_{1}(t)+a f\bigl(u_{1}(t-r)\bigr)+b_{1}g_{1} \bigl(u_{2}(t-\tau_{2})\bigr), \\ &\dot{u}_{2}(t)=-ku_{2}(t)+a f\bigl(u_{2}(t-r) \bigr)+b_{2}g_{2}\bigl(u_{1}(t-\tau_{1}) \bigr), \end{aligned} $$
(1.1)

have been studied by Yuan and Wei in [10]. Guo et al. in [11] analyzed the fold and Hopf bifurcations, fold-Hopf bifurcations and Hopf-Hopf bifurcations of system (1.1) with \(k=1\), \(g_{1}=g_{2}=f\).

In the follow-up the authors in [12] studied the stability and bifurcation of the following four coupled model:

$$ \begin{aligned} &\dot{u}_{1}(t)=-ku_{1}(t)+ f\bigl(u_{1}(t-r)\bigr)+g_{1}\bigl(u_{4}(t- \tau_{4})\bigr), \\ &\dot{u}_{2}(t)=-ku_{2}(t)+ f\bigl(u_{2}(t-r) \bigr)+g_{2}\bigl(u_{1}(t-\tau_{1})\bigr), \\ &\dot{u}_{3}(t)=-ku_{3}(t)+ f\bigl(u_{3}(t-r) \bigr)+g_{3}\bigl(u_{2}(t-\tau_{2})\bigr), \\ &\dot{u}_{4}(t)=-ku_{4}(t)+ f\bigl(u_{4}(t-r) \bigr)+g_{4}\bigl(u_{3}(t-\tau_{3})\bigr). \end{aligned} $$
(1.2)

Fan et al. in [17] considered the following coupled model of two neurons:

$$ \begin{aligned} &\dot{u}_{1}(t)=-u_{1}(t)+a \tanh\bigl(u_{1}(t-\tau_{v})\bigr)-a_{12}\tanh \bigl(u_{2}(t-\tau _{2})\bigr), \\ &\dot{u}_{2}(t)=-u_{2}(t)+a_{21}\tanh \bigl(u_{1}(t-\tau_{1})\bigr)-a\tanh \bigl(u_{2}(t- \tau_{v})\bigr), \end{aligned} $$
(1.3)

the coupling strengths will change their signs. The authors developed the universal unfolding of BT bifurcation with \(Z_{2}\) symmetry at the origin of the system (1.3) in the special case of \(\tau_{v}=0\), \(\tau_{1}=\tau_{2}=\tau>0\), and \(a_{12}=a_{21}=b\).

The relation of systems (1.1) and (1.2) motivates us to extend the system (1.3) involving n neurons, i.e., the following system:

$$\begin{aligned}& \dot{u}_{1}(t)=-u_{1}(t)+a f_{1} \bigl(u_{1}(t-\tau_{s})\bigr)-a_{2m,1}g_{2m} \bigl(u_{2m}(t-\tau_{2m})\bigr), \\& \ldots, \\& \dot{u}_{i}(t)=-u_{i}(t)+(-1)^{i+1}a f_{i}\bigl(u_{i}(t-\tau_{s})\bigr)+(-1)^{i}a_{i-1,i}g_{i-1} \bigl(u_{i-1}(t-\tau_{i-1})\bigr), \\& \ldots, \\& \dot{u}_{2m}(t)=-u_{2m}(t)-a f_{2m} \bigl(u_{2m}(t-\tau_{s})\bigr)+a_{2m-1,2m}g_{2m-1} \bigl(u_{2m-1}(t-\tau_{2m-1})\bigr), \end{aligned}$$
(1.4)

where m is an integer, \(a>0\) is the feedback strength, \(\tau_{s}\) is the feedback delay; \(\tau_{1}, \tau_{2}, \ldots, \tau_{2m}\) denote the connection delays, \(a_{12}, a_{23}, \ldots, a_{2m-1,2m}, a_{2m,1}\) represent the connection strengths. Each neuron comes with a delayed self-feedback and a delayed connection from the other neuron, and one neuron is excitatory and the other inhibitory. As regards the relations of each neuron one can see Figure 1.

Figure 1
figure 1

Architecture of the model with 2 m neurons, m is an integer.

For simplicity, we assume

(H1):

\(f_{i}(0)=g_{i}(0)=0\), \(f_{i}'(0)=g_{i}'(0)=1\), \(i=1,2,\ldots,2m\).

The universal unfoldings about the BT bifurcation at the origin of system (1.4) will be given. Therefore, our study is not trivial and our results are general.

The rest of this paper is organized as follows: in Section 2, the conditions under which the origin of system (1.4) is a BT singularity are demonstrated; in Section 3, the second- and third-order normal forms at the BT singularity of the coupled system are presented; in Section 4, some bifurcation diagrams and numerical simulations are shown.

2 The existence of BT singularity

Since the origin is always the equilibrium of system (1.4), linearizing system (1.4) at the origin yields

$$\begin{aligned}& \dot{u}_{1}(t)=-u_{1}(t)+au_{1}(t- \tau_{s})-a_{2m,1}u_{n}(t-\tau_{2m}), \\& \ldots, \\& \dot{u}_{i}(t)=-u_{i}(t)+(-1)^{i+1}a u_{i}(t-\tau_{s})+(-1)^{i}a_{i-1,i}u_{i-1}(t- \tau_{i-1}), \\& \ldots, \\& \dot{u}_{2m}(t)=-u_{2m}(t)-a u_{2m}(t- \tau_{s})+a_{2m-1,2m}u_{2m-1}(t-\tau_{2m-1}). \end{aligned}$$
(2.1)

Then the corresponding characteristic equation is

$$ F(\lambda)=\bigl((\lambda+1)^{2}-\delta \mathrm{e}^{-2\lambda\tau_{s}}\bigr)^{m}+(-1)^{m+1} \beta^{m} \mathrm{e}^{-2m\lambda\tau_{0}}=0, $$
(2.2)

where \(\delta=a^{2}\), \(\beta^{m}=a_{12}a_{23}a_{34}\cdots a_{2m-1,2m}a_{2m,1}\), \(\tau_{0}=\frac{\tau_{1}+\tau_{2}+\cdots+\tau_{2m}}{2m}\).

By (2.2) we can obtain

$$ \begin{aligned} &F(0) =(1-\delta)^{m}+(-1)^{m+1} \beta^{m}, \\ &F'(0) =2m(1-\delta)^{m-1}(1+\delta\tau_{s})-2(-1)^{m+1}m \tau_{0}\beta ^{m}, \\ &F''(0) =4m (m-1 ) (1-\delta)^{m-2}(1+ \delta \tau_{s})^{2}+2m(1-\delta)^{m-1}\bigl(1-2 \delta\tau_{s}^{2}\bigr) \\ &\hphantom{F''(0) ={}}{} +(-1)^{m+1}2m^{2}\tau_{0}^{2} \beta^{m}. \end{aligned} $$
(2.3)

Solving \(F(0)=0\), we have \(\delta=\beta+1\), then by \(F'(0)=0\) we have \(\beta=\frac{1+\tau_{s}}{\tau_{0}-\tau_{s}}>0\), which implies \(\delta=\frac{1+\tau_{0}}{\tau_{0}-\tau_{s}}\) and then

$$F''(0)=(-1)^{m-1}{\frac{2m ( 1+\tau_{{s}} ) ^{m-1} ( 2\tau_{{0}}+2 \tau_{{s}}\tau_{{0}}+1+2\tau_{{s}} ) }{ ( \tau_{{0}}-\tau_{{s}} ) ^{m-1}}} \neq0. $$

To show that the origin of system (1.4) is a BT singularity, we should investigate the conditions under which all the roots of (2.2), except \(\lambda=0\), have negative real parts.

Let \(\delta=\beta+1\). First, when \(\tau_{s}=\tau_{0}=0\), solving (2.2) one can obtain \(\lambda_{1}=0\) and \(\lambda_{2}=-2\).

Second, when \(\tau_{s}\neq\tau_{0}\), we assume \(\tau_{s}=0\), then (2.2) can be written as

$$ F(\lambda)=\bigl[(\lambda+1)^{2}-(\beta+1) \bigr]^{m}+(-1)^{m+1}\beta ^{m}\mathrm{e}^{-2m\lambda\tau_{0}}=0, $$
(2.4)

if \(\lambda=iq\) (\(q>0\)) is a root of (2.4), then it needs \((iq+1)^{2}-(\beta+1)=-\beta\mathrm{e}^{-2iq\tau_{0}}\), i.e.,

$$ -{q}^{2}-\beta+\beta\cos ( 2q\tau_{{0}} ) +i \bigl( 2 q- \beta\sin ( 2q\tau_{{0}} ) \bigr)=0, $$

by separating the real and negative parts of the above equation and a simple computation we have

$$ \left \{ \textstyle\begin{array}{l} \cos(2q\tau_{0})=\frac{\beta+q^{2}}{\beta}, \\ \sin(2q\tau_{0})=\frac{2q}{\beta}. \end{array}\displaystyle \right . $$
(2.5)

Hence, q should satisfy the equation \(q^{2}+2\beta+4=0\), due to \(\beta>0\), a positive q does not exist.

When \(\tau_{s}\neq0\), then \(\lambda=iw\) (\(w>0\)) is a root of (2.2) if and only if w satisfies the following equation:

$$ (iw+1)^{2}-(\beta+1)\mathrm{e}^{-2iw\tau_{s}}=-\beta \mathrm{e}^{-2iw\tau_{0}}, $$
(2.6)

then one can obtain

$$ \left \{ \textstyle\begin{array}{l} 1-w^{2}=(\beta+1)\cos(2w\tau_{s})-\beta\cos(2w\tau_{0}), \\ 2w=\beta\sin(2w\tau_{0})-(\beta+1)\sin(2w\tau_{s}), \end{array}\displaystyle \right . $$

which yields

$$ \bigl(1-w^{2}\bigr)^{2}+4w^{2}=( \beta+1)^{2}+\beta^{2}-2\beta(\beta+1)\cos\bigl(2w( \tau_{0}-\tau_{s})\bigr). $$
(2.7)

We rewrite (2.7) as

$$ \cos\bigl(2w(\tau_{0}-\tau_{s})\bigr)= \frac{2\beta(\beta+1)-2w^{2}-w^{4}}{2\beta(\beta+1)}. $$
(2.8)

To investigate the existence of positive root of (2.8), we first consider the following equations:

$$ \cos\bigl(2w(\tau_{0}-\tau_{s})\bigr)=0,\qquad \frac{2\beta(\beta+1)-2w^{2}-w^{4}}{2\beta (\beta+1)}=0, $$

which, respectively, have the positive roots

$$ w_{0}=\frac{\pi}{4(\tau_{0}-\tau_{s})},\qquad w_{*}=\sqrt{-1+\sqrt{ \beta ^{2}+(\beta+1)^{2}}}. $$
(2.9)

It is easy to verify that (2.8) does not have a positive root w if \(w_{*}< w_{0}\) and has a positive root if \(w_{*}\geq w_{0}\). To make this clear one can see Figure 2.

Figure 2
figure 2

The distribution of the roots of ( 2.8 ).

Together with the above discussion, we have the following lemma.

Lemma 2.1

Let (H2) \(\delta=\frac{1+\tau_{0}}{\tau_{0}-\tau_{s}}\), \(\beta=\frac{1+\tau_{s}}{\tau_{0}-\tau_{s}}\), \(\tau_{0}>\tau_{s}\), \(w_{*}< w_{0}\). Then all the roots of system (2.2), except \(\lambda=0\), have negative real parts, i.e., the origin of system (1.4) is a BT singularity, where \(w_{0}=\frac{\pi}{4(\tau_{0}-\tau_{s})}\), \(w_{*}=\sqrt{-1+\sqrt{\beta^{2}+(\beta+1)^{2}}}\).

3 Normal forms of BT bifurcation

From Lemma 2.1 we know that when (H1) and (H2) hold, then system (1.4) at the origin will undergo a BT bifurcation. In the following, we will generalize the methods introduced in [1, 3] to compute the second- and third-order normal forms of the BT bifurcation. For simplicity, as the authors have done in [17], we take \(a_{12}=a_{2m,1}=b\) and choose a and \(a_{21}\) as the bifurcation parameters, i.e., we consider \(a=a_{0}+\alpha_{1}\) and \(a_{12}=a_{2m,1}=b_{0}+\alpha_{2}\), where \(\alpha_{1}\) and \(\alpha_{2}\) are all near \((0,0)\) and \(\delta=a_{0}^{2}=\frac{1+\tau_{0}}{\tau_{0}-\tau_{s}}\), \(\beta=\frac{1+\tau_{s} }{\tau_{0}-\tau_{s}}\), \(\beta^{m}=a_{12}^{0}a_{23}a_{34}\cdots a_{2m-1,2m}a_{2m,1}^{0}=b_{0}^{2}a_{23}a_{34}\cdots a_{2m-1,2m}\). Then system (1.4) becomes

$$ \begin{aligned} &\dot{u}_{1}(t)=-u_{1}(t)+(a_{0}+ \alpha_{1}) f_{1}\bigl(u_{1}(t-\tau_{s}) \bigr)-(b_{0}+\alpha_{2})g_{2m}\bigl(u_{2m}(t- \tau_{2m})\bigr), \\ &\dot{u}_{2}(t)=-u_{2}(t)-(a_{0}+ \alpha_{1}) f_{2}\bigl(u_{2}(t-\tau_{s}) \bigr)+(b_{0}+\alpha_{2})g_{1}\bigl(u_{1}(t- \tau_{1})\bigr), \\ & \ldots, \\ &\dot{u}_{i}(t)=-u_{i}(t)+(-1)^{i+1}(a_{0}+ \alpha_{1}) f_{i}\bigl(u_{i}(t-\tau_{s}) \bigr)+(-1)^{i}a_{i-1,i}g_{i-1}\bigl(u_{i-1}(t- \tau_{i-1})\bigr), \\ &\ldots, \\ &\dot{u}_{2m}(t)=-u_{2m}(t)-(a_{0}+ \alpha_{1}) f_{2m}\bigl(u_{2m}(t- \tau_{s})\bigr)+a_{2m-1,2m}g_{2m-1}\bigl(u_{2m-1}(t- \tau_{2m-1})\bigr). \end{aligned} $$
(3.1)

For simplicity, we rewrite system (3.1) as the following retarded functional differential equation (FDE) with parameters in the phase space \(C=C([-\tau_{1},0]; R^{n})\) [1]:

$$ \dot{U}(t)=L(\alpha)U_{t}+G(U_{t},\alpha), $$
(3.2)

with \(\varphi=(\varphi_{1},\varphi_{2}\cdots,\varphi_{n})^{T}\in C\).

The operator \(L_{0}=L(0)\) has the form

$$ L_{0}(\varphi)=\int_{-\tau_{1}}^{0}d\eta( \theta)\varphi(\theta)=Au(t)+\sum_{l=1}^{2m}B_{l}u(t- \tau_{l})+B_{2m+1}u(t-\tau_{s}). $$

Define Λ to be the set of eigenvalues with zero real part, for a BT bifurcation, we have \(\Lambda_{0}=\{0,0\}\), using the formal adjoint theory to decompose the phase space of an FDE. P denotes the generalized eigenspace associated with the eigenvalues in Λ, and \(P^{*}\) is the dual space of P. Then the phase space C can be decomposed as \(C=P\oplus Q\) by Λ, where

$$ Q=\bigl\{ \phi\in C:\langle\psi,\phi\rangle=0 \bigr\} . $$

Denote the dual bases of P and \(P^{*}\) by Φ and Ψ, respectively, satisfying \(\langle\Psi(s),\Phi(\theta)\rangle=I_{2}\), \(\dot{\Phi}=\Phi B\) and \(-\dot{\Psi}=B\Psi\), with \(B=\bigl ({\scriptsize\begin{matrix}{} 0&1\cr 0&0 \end{matrix}}\bigr )\). Following similar methods to Lemma 3.1 in [3], we can obtain

$$ \Phi(\theta)= \begin{pmatrix} 1&\theta\\\phi_{21} &\phi_{22} +\theta\phi_{21} \\ \phi_{31} &\phi_{32} +\theta\phi_{31} \\ \cdots&\cdots \\ \phi_{2m,1} &\phi_{n2} +\theta\phi_{2m,1} \end{pmatrix} ,\qquad \Psi(0)= \begin{pmatrix} \psi_{11}&\psi_{12}&\cdots&\psi_{1,2m} \\ \psi_{21}& \psi_{22}&\cdots&\psi_{2,2m} \end{pmatrix}, $$

where

$$\begin{aligned}& \phi_{21}= \frac{b_{0}}{1+a_{0}},\qquad \phi_{31}= \frac{b_{0}a_{23}}{(1+a_{0})(-1+a_{0})},\qquad \ldots, \\& \phi_{i1}= \frac{b_{0}a_{23}a_{34}\cdots a_{i-1,i}}{(1+a_{0})^{\frac{i}{2}}(-1+a_{0})^{\frac{i}{2}-1}} \quad (i \mbox{ is even}), \\& \phi_{i1}= \frac{b_{0}a_{23}a_{34}\cdots a_{i-1,i}}{(1+a_{0})^{\frac{i-1}{2}}(-1+a_{0})^{\frac{i-1}{2}}}\quad (i \mbox{ is odd}), \qquad \ldots, \qquad \phi_{2m,1}=\frac{1+a_{0}}{b_{0}}; \\& \phi_{22}= \frac{b_{0}[a_{0}(\tau_{s}-\tau_{1})-1-\tau_{1}]}{(1+a_{0})^{2}},\qquad \phi_{32}= \frac{b_{0}a_{23}[a_{0}^{2}(2\tau_{s}-\tau_{1}-\tau_{2})+2+\tau_{1}+\tau _{2}]}{(1+a_{0})^{2}(-1+a_{0})^{2}}, \\& \ldots, \\& \phi_{i2}= \frac{b_{0}a_{23}a_{34}\cdots a_{i-1,i} [a_{0}^{2} ((i-1)\tau_{s}-\sum_{l=1}^{i-1}\tau _{l} )-a_{0}(\tau_{s}+1)+i-1+\sum_{l=1}^{i-1}\tau_{l} ]}{ (1+a_{0})^{\frac{i}{2}+1}(-1+a_{0})^{\frac{i}{2}}} \\& \quad (i \mbox{ is even}), \\& \phi_{i2}= \frac{b_{0}a_{23}a_{34}\cdots a_{i-1,i} [a_{0}^{2} ((i-1)\tau_{s}-\sum_{l=1}^{i-1}\tau _{l} )+i-1+\sum_{l=1} ^{i-1}\tau_{l} ]}{(1+a_{0})^{\frac{i+1}{2}}(-1+a_{0})^{\frac{i+1}{2}}}\quad (i \mbox{ is odd}), \\& \ldots, \\& \phi_{2m,2}= \frac{a_{0}(\tau_{2m}-\tau_{s})-(1+\tau_{2m})}{b_{0}};\qquad \psi_{21}= \frac{1+a_{0}}{\xi},\quad \xi=2m\tau_{s}+(1+\tau_{s})\sum _{l=1}^{2m}\tau_{l}+ \frac{2m}{2}, \\& \psi_{22}= -\frac{(-1+a_{0})\psi_{21}}{b_{0}},\qquad \psi_{23}= \frac{(1+a_{0})(-1+a_{0})\psi_{21}}{b_{0}a_{23}},\qquad \ldots, \\& \psi_{2i}= -\frac{(1+a_{0})^{\frac{i}{2}-1}(-1+a_{0})^{\frac{i}{2}}\psi _{21}}{b_{0}a_{23}a_{34}\cdots, a_{i-1,i}}\quad (i \mbox{ is even}), \\& \psi_{2i}= \frac{(1+a_{0})^{\frac{i-1}{2}}(-1+a_{0})^{\frac{i-1}{2}}\psi _{21}}{b_{0}a_{23}a_{34}\cdots a_{i-1,i}} \quad (i \mbox{ is odd}),\qquad \ldots, \\& \psi_{2,2m}= \frac{b_{0}\psi_{21}}{-(1+a_{0})}, \\ & \psi_{11}= \frac{1+a_{0}}{6m\xi^{2}}\Biggl[3a_{0}\xi \Biggl(\sum _{l=1}^{2m}\tau_{l}-2m \tau_{s} \Biggr) -\sum_{l=1}^{2m} \tau_{l} \Biggl(\sum_{l=1}^{2m} \tau_{l}+3m \Biggr) \\ & \hphantom{\psi_{11}={}}{}-\tau_{s} \Biggl(\sum_{l=1}^{2m} \tau_{l}+2m \Biggr) \Biggl(\sum_{l=1}^{2m} \tau_{l}-4m\tau_{s} \Biggr)\Biggr], \\ & \psi_{12}= -\frac{\psi_{11}(-1+a_{0})+\psi_{21}[a_{0}(\tau_{s}-\tau _{1})-1-\tau_{1}]}{b_{0}}, \\ & \psi_{13}= \frac{\psi_{11}(-1+a_{0})(1+a_{0})+\psi_{21}[a_{0}^{2}(\tau_{1}+\tau _{2}-2\tau_{s})-2-\tau_{1}-\tau_{2}]}{b_{0}a_{23}}, \\ & \ldots, \\ & \psi_{1i}= -\frac{\psi_{11}(1+a_{0})^{\frac{i-2}{2}}(-1+a_{0})^{\frac{i}{2}}}{ b_{0}a_{23}a_{34}\cdots a_{i-1,i}} -\frac{\psi_{21}(1+a_{0})^{\frac{i-4}{2}}(-1+a_{0})^{\frac{i-2}{2}} }{b_{0}a_{23}a_{34}\cdots a_{i-1,i}} \\ & \hphantom{\psi_{1i}={}}{}\times \Biggl[a_{0}^{2} \Biggl(\sum _{l=1}^{i-1}\tau _{l}-(i-1) \tau_{s} \Biggr)-a_{0}(\tau_{s}+1)-(i-1)-\sum _{l=1}^{i-1}\tau_{l} \Biggr] \quad (i \mbox{ is even}), \\ & \psi_{1i}= \frac{\psi_{11}(1+a_{0})^{\frac{i-1}{2}}(-1+a_{0})^{\frac{i-1}{2}}}{ b_{0}a_{23}a_{34}\cdots a_{i-1,i}} +\frac{\psi_{21}(1+a_{0})^{\frac{i-3}{2}}(-1+a_{0})^{\frac{i-3}{2}} }{b_{0}a_{23}a_{34}\cdots a_{i-1,i}} \\ & \hphantom{\psi_{1i}={}}{}\times \Biggl[a_{0}^{2} \Biggl(\sum _{l=1}^{i-1}\tau _{l}-(i-1) \tau_{s} \Biggr)-(i-1)-\sum_{l=1}^{i-1} \tau_{l} \Biggr] \quad (i \mbox{ is odd}), \\ & \ldots, \\ & \psi_{1,2m}= -\frac{\psi_{11}(1+a_{0})^{m-1}(-1+a_{0})^{m}}{ b_{0}a_{23}a_{34}\cdots a_{2m-1,2m}} -\frac{\psi_{21}(1+a_{0})^{m-2}(-1+a_{0})^{m-1} }{b_{0}a_{23}a_{34}\cdots a_{2m-1,2m}} \\ & \hphantom{\psi_{1,2m}={}}{}\times \Biggl[a_{0}^{2} \Biggl(\sum _{l=1}^{2m-1}\tau _{l}-(2m-1) \tau_{s} \Biggr)-a_{0}(\tau_{s}+1)-(2m-1)-\sum _{l=1}^{2m-1}\tau_{l} \Biggr]. \end{aligned}$$

The representation of \(\Psi(s)\) is given in the Appendix. Denote the Taylor expansion of \(\widehat{F}(u_{t},\alpha)\) with respect to \(u_{t}\) and α in system (3.1) as \(\widehat{F}(u_{t},\alpha)=\sum_{j\geq2}\frac{1}{j!}\widehat {F}_{j}(u_{t},\alpha)\), we have

$$\begin{aligned} \frac{1}{2}\widehat{F}_{2}(u_{t}, \alpha) =&A_{1}u(t)\alpha_{1}+A_{2}u(t)\alpha _{2}+\sum_{l=1} ^{2m+1} \bigl[B_{l1}u(t-\tau_{l})\alpha_{1} +B_{l2}u(t-\tau_{l})\alpha_{2}\bigr] \\ &{}+\sum_{i=1} ^{2m+1}\sum _{0\leq k\leq j\leq2m+1}D_{ikj}u_{i}(t-\tau_{k})u(t- \tau_{j}), \end{aligned}$$
(3.3)

where \(\tau_{0}=0\).

Using (3.3) and the formulas obtained in [3], we deduce the second order of the BT bifurcation normal form as follows.

Theorem 3.1

Let (H1) and (H2) hold. Then the delay differential system (3.1) can be reduced to the following two-dimensional system of ODE on the center manifold at \((u_{t},\alpha)=(0,0)\):

$$ \begin{aligned} &\dot{z}_{1}=z_{2}, \\ &\dot{z}_{2}=k_{1}z_{1}+k_{2}z_{2}+ \eta_{1}z_{1}^{2}+\eta_{2}z_{1}z_{2}+ \mathit{h.o.t.}, \end{aligned} $$
(3.4)

where

$$\begin{aligned}& k_{1}= \psi_{2}^{0} \Biggl(A_{1}+\sum _{l=1} ^{2m+1}B_{l1} \Biggr)\phi _{1}^{0}\alpha_{1}+\psi_{2}^{0} \Biggl(A_{2}+\sum_{l=1} ^{2m+1}B_{l2} \Biggr)\phi_{1}^{0}\alpha_{2}, \\& k_{2}= \Biggl\{ \psi_{1}^{0} \Biggl(A_{1}+ \sum_{l=1} ^{2m+1}B_{l1} \Biggr) \phi_{1}^{0}+\psi_{2}^{0} \Biggl[ \Biggl(A_{1} +\sum_{l=1} ^{2m+1}B_{l1} \Biggr)\phi_{2}^{0}-\sum_{l=1} ^{2m+1}\tau_{l}B_{l1} \phi_{1}^{0} \Biggr] \Biggr\} \alpha_{1} \\& \hphantom{k_{2}={}}{}+ \Biggl\{ \psi_{1}^{0} \Biggl(A_{2}+ \sum_{l=1} ^{2m+1}B_{l2} \Biggr) \phi_{1}^{0}+\psi_{2}^{0} \Biggl[ \Biggl(A_{2} +\sum_{l=1} ^{2m+1}B_{l2} \Biggr)\phi_{2}^{0}-\sum_{l=1} ^{2m+1}\tau_{l}B_{l2} \phi_{1}^{0} \Biggr] \Biggr\} \alpha_{2}, \\& \eta_{1}= \psi_{2}^{0} \Biggl(\sum _{i=1} ^{2m+1}\sum_{0\leq k\leq j\leq2m+1}D_{ikj} \phi_{1}^{0}\phi_{i1}^{0} \Biggr), \\& \eta_{2}= 2\psi_{1}^{0} \Biggl(\sum _{i=1} ^{2m+1}\sum_{0\leq k\leq j\leq m}D_{ikj} \phi_{1}^{0}\phi_{i1}^{0} \Biggr)+ \psi_{2}^{0}\Biggl\{ \sum_{i=1} ^{2m+1}\sum_{0\leq k\leq j\leq2m+1}D_{ikj}\bigl( \phi_{1}^{0}\phi_{2i}^{0}+ \phi_{2}^{0}\phi_{i1}^{0}\bigr) \\& \hphantom{\eta_{2}={}}{}-\sum_{i=1} ^{2m+1}\sum _{0\leq k\leq j\leq2m+1}(\tau_{k}+\tau_{j})D_{ikj} \phi_{1}^{0}\phi_{i1}^{0}\Biggr\} . \end{aligned}$$

If \(\eta_{1}\neq0\) and \(\eta_{2}\neq0\) hold, the bifurcation curves related to the perturbation parameters \(\alpha_{1}\), \(\alpha_{2}\) are as follows [9, 22, 23]:

  • TB: \(k_{1}=0\) (transcritical bifurcation occurs),

  • \(H_{0}\): \(k_{2}=0\), \(k_{1}<0\) (Hopf bifurcation from the zero equilibrium point),

  • \(H_{1}\): \(k_{2}=\frac{\eta_{2}}{\eta_{1}}k_{1}\), \(k_{1}>0\) (a Hopf bifurcation from the non-trivial equilibrium),

  • \(H_{c}^{0}\): \(k_{2}=\frac{\eta_{2}}{7\eta_{1}}k_{1}\), \(k_{1}<0\) (a homoclinic bifurcation with the zero equilibrium point),

  • \(H_{c}^{1}\): \(k_{2}=\frac{6\eta_{2}}{7\eta_{1}}k_{1}\), \(k_{1}>0\) (a homoclinic bifurcation from the non-trivial equilibrium).

A numerical example is given in Section 4 (see Figures 3-5).

If \(f_{i}''(0)=g_{i}''(0)=0\), then \(\eta_{1}=\eta_{2}=0\), system (3.1) is degenerate. To determine the dynamics near BT bifurcation we need to calculate the higher-order normal form. As [1, 22] we have

$$ g_{3}^{1}(z,0,\mu)=\bigl(I-P_{I,3}^{1} \bigr)\tilde{f}_{3}^{1}(z,0,\mu)=\operatorname{ Proj}_{\operatorname{Im}(M_{3}^{1})^{c}}\tilde{f}_{3}^{1}(z,0,\mu), $$
(3.5)

where

$$\begin{aligned} \tilde{f}_{3}^{1}(z,0,\mu) =&f_{3}^{1}(z,0, \mu)+\frac{3}{2}\bigl[\bigl(D_{z}f_{2}^{1} \bigr) (z,0,\mu )U_{2}^{1}(z,\mu)+\bigl(D_{y}f_{2}^{1} \bigr) (z,0,\mu)U_{2}^{2}(z,\mu) \\ &{}-\bigl(D_{z}U_{2}^{1}\bigr) (z,\mu )g_{2}^{1}(z,0,\mu)\bigr]. \end{aligned}$$

It is easy to obtain

$$ f_{3}^{1}(z,0,\mu)= \left( \textstyle\begin{array}{l} \psi_{11}[a_{0}f_{1}'''\varphi_{1}^{3}(-\tau _{s})-b_{0}g_{2m}'''\varphi_{2m}^{3}(-\tau_{2m})] \\ \quad {}+\psi _{12}[-a_{0}f_{2}'''\varphi_{2}^{3}(-\tau_{s}) +b_{0}g_{1}'''\varphi_{1}^{3}(-\tau_{1})] \\ \quad {}+\sum_{i=3}^{2m}\psi_{1i}[(-1)^{i+1}a_{0}f_{i}'''\varphi_{i}^{3}(-\tau _{s})+(-1)^{i}a_{i-1,i}g_{i-1}'''\varphi_{i-1}^{3}(-\tau_{i-1})] \\ \psi_{21}[a_{0}f_{1}'''\varphi_{1}^{3}(-\tau_{s})-a_{2m,1}g_{2m}'''\varphi _{2m}^{3}(-\tau_{2m})] \\ \quad {}+\psi_{22}[-a_{0}f_{2}'''\varphi_{2}^{3}(-\tau_{s}) +b_{0}g_{1}'''\varphi_{1}^{3}(-\tau_{1})] \\ \quad {}+\sum_{i=3}^{2m}\psi_{2i}[(-1)^{i+1}a_{0}f_{i}'''\varphi_{i}^{3}(-\tau _{s})+(-1)^{i}a_{i-1,i}g_{i-1}'''\varphi_{i-1}^{3}(-\tau_{i-1})] \end{array}\displaystyle \right), $$
(3.6)

where \(f_{i}'''=f_{i}'''(0)\) and \(g_{i}'''=g_{i}'''(0)\), \(i=1,2,3,\ldots,2m\), \(\varphi_{1}(\theta)=z_{1}+\theta z_{2}\), \(\varphi_{j}(\theta)=\phi_{j1}z_{1}+(\phi_{j2}+\theta\phi_{j1})z_{2}\), \(j=2,3,\ldots,2m\).

To obtain the third-order normal form, one needs the decomposition

$$ \mathrm{V}_{3}^{4}\bigl(R^{2}\bigr)= \operatorname{Im}\bigl(M_{3}^{1}\bigr)\oplus\operatorname{Im} \bigl(M_{3}^{1}\bigr)^{c}. $$

Then the canonical basis in \(\mathrm{V}_{3}^{4}X(R^{2})\) has 40 elements: \(((z,\alpha)^{3},0)^{T}\), \((0,(z,\alpha)^{3})^{T}\), and for the bases of \(\operatorname{Im}(M_{3}^{1})\) and \(\operatorname{Im}(M_{3}^{1})^{c}\) one can refer to [22]. By the definition of \(\operatorname{Proj}_{\operatorname{Im}(M_{3}^{1})^{c}}\) we have

$$\begin{aligned}& \operatorname{Proj}_{\operatorname{Im}(M_{3}^{1})^{c}}p= \left \{ \textstyle\begin{array}{l@{\quad}l} p, & p\in\operatorname{Im}(M_{3}^{1})^{c}, \\ 0, & p\in\operatorname{Im}(M_{3}^{1}), \end{array}\displaystyle \right .\qquad \operatorname{Proj}_{\operatorname{Im}(M_{3}^{1})^{c}} \begin{pmatrix} z_{1}^{3} \\ 0 \end{pmatrix} = \begin{pmatrix}0\\ 3z_{1}^{2}z_{2} \end{pmatrix} , \\& \operatorname{Proj}_{\operatorname{Im}(M_{3}^{1})^{c}} \begin{pmatrix}z_{1}\alpha_{i}^{2}\\ 0 \end{pmatrix} = \begin{pmatrix}0\\ z_{2}\alpha_{i}^{2} \end{pmatrix} , \qquad \operatorname{Proj}_{\operatorname{Im}(M_{3}^{1})^{c}} \begin{pmatrix}z_{1}\alpha_{1}\alpha_{2}\\ 0 \end{pmatrix} = \begin{pmatrix}0\\ \alpha_{1}\alpha_{2}z_{2} \end{pmatrix} , \\& \operatorname{Proj}_{\operatorname{Im}(M_{3}^{1})^{c}} \begin{pmatrix}z_{1}^{2}\alpha_{i}\\ 0 \end{pmatrix} = \begin{pmatrix}0\\ 2z_{1}z_{2}\alpha_{i} \end{pmatrix} . \end{aligned}$$

Together with (3.6) and by [22, 23] the third-order normal form of system (3.1) can be written as

$$ \begin{aligned} &\dot{z}_{1}=z_{2}, \\ &\dot{z}_{2}=k_{1}z_{1}+k_{2}z_{2}+cz_{1}^{3}+dz_{1}^{2}z_{2}+ \mathit{h.o.t.}, \end{aligned} $$
(3.7)

where \(k_{1}\) and \(k_{2}\) are the same as in (3.4), and

$$\begin{aligned}& c= \frac{1}{6}\Biggl[\psi_{21}\bigl(a_{0}f_{1}'''-b_{0}g_{2m}''' \phi_{2m,1}^{3}\bigr)+\psi _{22}\bigl(b_{0}g_{1}'''-a_{0}f_{1}''' \phi_{21}^{3}\bigr) \\& \hphantom{c={}}{}+\sum_{i=3}^{2m} \psi_{2i}\bigl((-1)^{i+1}a_{0}f_{i}''' \phi_{i1}^{3}+ (-1)^{i}a_{i-1,i}g_{i-1}''' \phi_{i-1,1}^{3}\bigr)\Biggr], \\& d= \frac{1}{2}\Biggl\{ a_{0}f_{1}''' \bigl(\psi_{11}-\psi_{21}\tau_{s}- \psi_{12}\phi _{21}^{3}-\phi_{21}^{2}( \phi_{22}-\tau_{s}\phi_{21})\psi_{22} \bigr) +b_{0}g_{1}'''( \psi_{12}-\tau_{1}\psi_{22}) \\& \hphantom{d={}}{}-b_{0}g_{2m}''' \phi_{2m,1}^{2}\bigl(\psi_{11}\phi_{2m,1}+( \phi_{2m,2}-\tau _{2m}\phi_{2m,1})\psi_{21} \bigr) \\& \hphantom{d={}}{}+\sum_{i=3}^{2m} \bigl[(-1)^{i+1}a_{0}f_{1}''' \phi_{i1}^{2}\bigl(\psi_{1i}\phi _{i1}+ \psi_{2i}(\phi_{i2}-\tau_{s}\phi_{i1}) \bigr) \\& \hphantom{d={}}{}+(-1)^{i}a_{i-1,i}g_{i-1}''' \phi_{i-1,1}^{2}\bigl(\psi_{1i}\phi_{i-1,1}+( \phi _{i-1,2}-\tau_{i-1}\phi_{i-1,1})\psi_{2i} \bigr)\bigr]\Biggr\} . \end{aligned}$$

Let \(\bar{t}=-\frac{|c|}{d}t\), \(w_{1}=\frac{d}{\sqrt{|c|}}z_{1}\), \(w_{2}=-\frac{d^{2}}{|c|\sqrt{|c|}}z_{2}\). Then system (3.7) becomes

$$ \begin{aligned} &\dot{w}_{1}=w_{2}, \\ &\dot{w}_{2}=v_{1}w_{1}+v_{2}w_{2}+sw_{1}^{3}-w_{1}^{2}w_{2}+ \mathit{h.o.t.}, \end{aligned} $$
(3.8)

where \(v_{1}=(\frac{d}{c})^{2}k_{1}\), \(v_{2}=-\frac{d}{|c|}k_{2}\), \(s= \operatorname{sgn}(c)\). From [15] we know the bifurcation of system (3.8) is related to the sign of s. If \(s=1\), we have

  • S: \(v_{1}=0\), \(v_{2}\in R\) (a pitchfork bifurcation),

  • H: \(v_{2}=0\), \(v_{1}<0\) (a Hopf bifurcation at the trivial equilibrium),

  • T: \(v_{2}=-\frac{1}{5}v_{1}\), \(v_{1}<0\) (a heteroclinic bifurcation).

In Section 4, we show a numerical example under the case of \(s=1\) (see Figure 9).

If \(s=-1\), we have

  • S: \(v_{1}=0\), \(v_{2}\in R\) (a pitchfork bifurcation),

  • H: \(v_{1}=v_{2}\), \(v_{1}>0\) (a Hopf bifurcation at the non-trivial equilibrium),

  • T: \(v_{2}=\frac{4}{5}v_{1}\), \(v_{1}>0\) (a homoclinic bifurcation),

  • \(H_{d}\): \(v_{2}=d_{0}v_{1}\), \(v_{1}>0\), \(d_{0}\approx0.752\) (a double cycle bifurcation).

4 Numerical simulation

To verify our main results in the previous sections, in this section, we choose system parameters and functions \(f_{i}(u_{i})\), \(g_{i}(u_{i})\) satisfying the conditions obtained in Sections 2 and 3 and give some numerical examples and simulations.

First, we take \(n=2\), \(f_{i}(u_{i})=\frac{(1+\epsilon)(\mathrm{e}^{u_{i}}-1)}{\mathrm{e}^{u_{i}}+\epsilon}\), \(g_{i}(u_{i})=\frac{\tanh (d_{i}u_{i})}{d_{i}}\) [10], \(i=1,2\), \(\epsilon=1.5\), \(d_{1}=2\), \(d_{2}=1\), \(\tau_{1}=6\), \(\tau_{2}=0=\tau_{3}=0\), \(a_{2,1}=a_{1,2}=\frac{\sqrt{3}}{3}\), \(a_{0}=\frac{2\sqrt{3}}{3}\). One can verify that all the conditions in (H1) and (H2) are satisfied. Moreover, \(f_{i}(0)=0\), \(f_{i}'(0)=1\), \(f_{i}''(0)\neq0\), \(g_{i}(0)=0\), \(g_{i}'(0)=1\), \(i=1,2\). Thus, the coefficients in (3.4) are \(k_{1}= 0.845299\alpha_{{1}}- 0.845299\alpha_{{2}}\), \(k_{2}=-0.0450298362\alpha _{1}+5.11682660736522\alpha_{2}\), \(\eta_{1}=0.07320508073\), \(\eta_{2}=0.1076706575\). The corresponding bifurcation curves of system (3.1) with \(m=1\) is obtained. (See Figure 3.)

Figure 3
figure 3

The bifurcation set and phase portraits for ( 3.4 ).

If we take \((\alpha_{1}, \alpha_{2})=(-0.01, -0.001)\) and initial conditions \((u_{1}(0), u_{2}(0))=(0.001, 0.001)\), then, in Figure 4(a), one can see that the equilibrium \((0,0)\) is a locally stable focus. However, when \((\alpha_{1}, \alpha_{2})=(-0.01, 0.007935)\), the origin loses its stability, and a periodic solution is bifurcated from the origin (see Figure 4(b)).

Figure 4
figure 4

The Hopf bifurcation from the zero equilibrium. (a) The time series with parameters \((\alpha_{1}, \alpha _{2})=(-0.01, -0.001)\) and initial conditions \((u_{1}(0), u_{2}(0))=(0.001, 0.001)\). (b) The time series with parameters \((\alpha_{1}, \alpha_{2})=(-0.01, 0.007935)\) and initial conditions \((u_{1}(0), u_{2}(0))=(0.001, 0.001)\).

Under initial values \((u_{1}(0),u_{2}(0))=(-0.02,-0.00001)\), if we take parameters \((\alpha_{1}, \alpha_{2})=(0.01, 0.00053)\), then system (3.1) has a locally stable non-trivial equilibrium which, however, becomes unstable when the parameters \((\alpha_{1}, \alpha_{2})\) cross the Hopf bifurcation curve \(H_{1}\) to another side. One can see a periodic solution is bifurcated from the non-trivial equilibrium as shown in Figure 5.

Figure 5
figure 5

The Hopf bifurcation from the non-trivial equilibrium. (a) The time series with parameters \((\alpha_{1}, \alpha_{2})=(0.01, 0.000053)\) and initial conditions \((u_{1}(0), u_{2}(0))=(-0.02, -0.00001)\). (b) The time series with parameters \((\alpha_{1}, \alpha_{2})=(0.01, 0.006053)\) and initial conditions \((u_{1}(0), u_{2}(0))=(-0.02, -0.00001)\).

Second, when \(f_{i}''(0)=g_{i}''(0)=0\), we also give an example with \(m=2\) where \(\tau_{1}=\tau_{2}=\tau_{3}=\tau_{4}=2\), \(\tau_{s}=0\), \(a_{23}=0.7\), \(a_{34}=\frac{\sqrt{2}}{2}\), \(a_{41}=\frac{\sqrt{2}}{2}\), \(a_{0}=\frac{\sqrt{6}}{2}\), \(a_{12}=\frac{\sqrt{2}}{2}\), \(f_{i}(u_{i})=g_{i}(u_{i})=\tanh(u_{i})\), \(i=1,2,3,4\). One can verify \(s=1\), thus, with the parameters \(\alpha _{1}\) and \(\alpha_{2}\) changing in the small neighborhood of \((0,0)\), system (3.1) can undergo a pitchfork bifurcation, a Hopf bifurcation, and a heteroclinic bifurcation. The corresponding bifurcation diagram is exhibited in the parameter plane \((\alpha_{1}, \alpha_{2})\) (see Figure 6).

Figure 6
figure 6

The bifurcation set and phase portraits for ( 3.7 ) with \(\pmb{m=2}\) .

It can be seen that when \((\alpha_{1}, \alpha_{2})=(-0.001,-0.001)\), three trajectory curves with different initial values consistently converge to the origin \((0,0,0,0)\), i.e., the zero equilibrium is a locally asymptotically stable focus under the given parameters \(\alpha_{1}\) and \(\alpha_{2}\). Keeping the initial conditions fixed, we move the perturbation parameter \((\alpha_{1}, \alpha _{2})\) until they across the pitchfork bifurcation curve S to another side, then the origin becomes unstable. Simultaneously, two local stable non-zero equilibria are bifurcated from the origin, which leads to system (3.1) undergoing a pitchfork bifurcation. In Figure 7, we see that system (3.1) has two local stable foci when \((\alpha_{1}, \alpha_{2})=(-0.001,-0.006)\).

Figure 7
figure 7

Pitchfork bifurcation is shown with initial values \(\pmb{(u_{1}(0),u_{2}(0),u_{3}(0),u_{4}(0))=(0.00053, 0.004, 0.0002, 0.0004)}\) (green curve), \(\pmb{(-0.00053, -0.004, -0.0002, -0.0004)}\) (blue curve), \(\pmb{(0.5, 0.4, 0.3, 0.4)}\) (red curve). (a) The time series when \((\alpha_{1},\alpha_{2})=(-0.001, -0.001)\). (b) The time series when \((\alpha_{1},\alpha_{2})=(-0.001, -0.006)\).

Above the line S, we let \((\alpha_{1},\alpha_{2})\) pass the Hopf bifurcation curve H, and take \((\alpha_{1},\alpha_{2})=(-0.001, 0.005)\), then the zero equilibrium loses stability, which yields a stable periodic solution as shown in Figure 8.

Figure 8
figure 8

Hopf bifurcation from the origin with initial values \(\pmb{(u_{1}(0),u_{2}(0),u_{3}(0),u_{4}(0))=(0.00053, 0.0004, 0.0002, 0.0004)}\) (blue curve), \(\pmb{(-0.153, -0.04, -0.02, -0.04)}\) (green curve), and parameters \(\pmb{(\alpha_{1},\alpha_{2})=(-0.001, 0.005)}\) . (a) The phase portrait in the plane \((u_{4},u_{1})\). (b) The time series in the plane \(({t},u_{1})\).

When the parameters \((\alpha_{1},\alpha_{2})\) are located under the bifurcation of \(S^{+}\), and near \(S^{+}\), all solutions will approach the outer stable periodic solution excluding equilibria and the stable manifold of the trivial equilibrium (see Figure 9(a)). However, when \((\alpha _{1},\alpha_{2})\) are chosen at the upper-left side of the curve S, then the solutions of system (3.1) are attracted to the corresponding non-zero equilibria if the initial conditions are close to one of the two non-zero equilibria (see the green and blue curves in Figure 9(b)). But if the initial conditions are chosen sufficiently far from the two non-zero equilibria, then the solutions approach the outer stable periodic solution (see the red curve in Figure 9).

Figure 9
figure 9

Initial values \(\pmb{(u_{1}(0),u_{2}(0),u_{3}(0),u_{4}(0))=(0.00053, 0.004, 0.0002, 0.0004)}\) (blue curve), \(\pmb{(0.00053, 0.004, 0.0002, 0.0004)}\) (green curve), \(\pmb{(0.5, 0.4, 0.05, 0.4)}\) (red curve). (a) \((\alpha_{1},\alpha _{2})=(0.001, 0.002)\). (b) \((\alpha_{1},\alpha_{2})=(0.001, 0.0018)\).