1 Introduction

A global proliferation of harmful algal blooms (HABs) has caused significant harm to human and animal health, fisheries, tourism, ecosystem and environment in last decades [1]. For instance, according to the United States National Oceanic and Atmospheric Administration, HABs are responsible for more than 50% of improper decrease of marine mammals [2]; in addition, the United States Environmental Protection Agency estimated that HABs influence 65% of the major estuaries of the United States, costing $2.2 billion every year [3].

The toxins released by harmful phytoplankton may be responsible for HABs [4, 5]: the rise in density of a phytoplankton population may influence the growth of some other populations by producing allelopathic toxins or stimulator, leading to blooms [6]. Accordingly, in recent years, numerous phytoplankton models with allelopathy were dissected (see, e.g., [69]). Particularly, Bandyopadhyay [9] tested the following competitive model with allelopathy:

$$ \textstyle\begin{cases} \frac{\mathrm{d}\Psi _{1}}{\mathrm{d}t}=\Psi _{1} (r_{1}- \alpha _{11}\Psi _{1}-\alpha _{12}\Psi _{2}-\beta \Psi _{1}\Psi _{2}^{2} ), \\ \frac{\mathrm{d}\Psi _{2}}{\mathrm{d}t}=\Psi _{2} (r_{2}- \alpha _{21}\Psi _{1}-\alpha _{22}\Psi _{2} ),\end{cases} $$
(1)

where \(\Psi _{i}\) means the population density, \(r_{i}>0\) represents the growth rate, \(\alpha _{ii}>0\) is the intraspecific competition rate, \(\alpha _{ij}>0\) (\(j\neq i\)) means the interspecific competition rate, \(i,j=1,2\); \(\beta >0\) measures the allelopathic interaction. In model (1), \(\beta \Psi _{1}^{2}\Psi _{2}^{2}\) is the allelopathic interaction term proposed by Solé et al. [8] based upon experimental data of two phytoplankton species, Heterocapsa triquetra and Chrysocromulina polylepis (the allelopathic species).

Nevertheless, the environmental random disturbances (for example, the variations of PH, temperature, and nutrition [10]) frequently act on the evolution of plankton [1119]. Mandal and Banerjee [12] assumed that the environmental random disturbances are the white noise which mainly acts on the growth rates of the plankton with

$$ r_{i}\rightarrow r_{i}+\gamma _{i} \dot{B}_{i}(t), $$

they [12] tested the following stochastic competitive model with allelopathy:

$$ \textstyle\begin{cases} \mathrm{d}\Psi _{1}=\Psi _{1} (r_{1}-\alpha _{11}\Psi _{1}-\alpha _{12} \Psi _{2}-\beta \Psi _{1}\Psi _{2}^{2} )\,\mathrm{d}t+\gamma _{1} \Psi _{1}\,\mathrm{d}B_{1}(t), \\ \mathrm{d}\Psi _{2}=\Psi _{2} (r_{2}-\alpha _{21}\Psi _{1}-\alpha _{22} \Psi _{2} )\,\mathrm{d}t+\gamma _{2}\Psi _{2}\,\mathrm{d}B_{2}(t),\end{cases} $$
(2)

where \(\gamma _{i}^{2}\) means the intensity of the white noise, \((B_{1}(t),B_{2}(t))\) is a two-dimensional Brownian motion defined on a certain complete probability space \((\Omega ,\mathcal{F},\{\mathcal{F}_{t}\}_{t\geq 0},\mathrm{P})\). The authors [12] tested the existence, uniqueness, boundedness, and stochastic permanence of the solution of model (2).

However, the growth rates of plankton organisms often shift from one regime to a dramatically different one because of some abrupt environmental disturbances (see [14, 18, 19]) which cannot be portrayed by the white noise. For example, the growth rate of microalgae at 30°C is about twice that at 20°C (see [10]). An effective approach to depict these abrupt disturbances is to make use of a continuous-time finite-state Markov chain (see [14, 1821]). Let \(\eta =\eta (t)\) be an irreducible right-continuous Markov chain with the state space \(\mathbb{X}=\{1,\ldots,L\}\), the generator \((q_{ij})_{L\times L}\), and the stationary distribution π. Incorporating \(\eta (t)\) into system (2), we derive the following regime-switching model:

$$ \textstyle\begin{cases} \mathrm{d}\Psi _{1}=\Psi _{1} (r_{1}(\eta )-\alpha _{11}(\eta ) \Psi _{1}-\alpha _{12}(\eta )\Psi _{2}-\beta (\eta ) \Psi _{1}\Psi _{2}^{2} )\,\mathrm{d}t+\gamma _{1}(\eta )\Psi _{1}\,\mathrm{d}B_{1}(t), \\ \mathrm{d}\Psi _{2}=\Psi _{2} (r_{2}(\eta )-\alpha _{21}(\eta ) \Psi _{1}-\alpha _{22}(\eta )\Psi _{2} )\,\mathrm{d}t +\gamma _{2}( \eta )\Psi _{2}\,\mathrm{d}B_{2}(t).\end{cases} $$
(3)

Stationary distribution (which can be regarded as a stable “stochastic positive equilibrium”) has propelled to the forefront in researches of stochastic models (see [13, 14, 19]). However, little research has been conducted to test the stationary distribution of model (2) or (3). For these reasons, in this paper, by taking advantage of some previous approaches and results mainly in [22], sufficient criteria are offered to ensure that model (3) possesses a unique ergodic stationary distribution (UESD) in Sect. 2. Furthermore, we proffer that the above criteria are sharp under certain conditions. In Sect. 3, some critical functions of regime-switching on the existence of a UESD of the model are disclosed and numerically manifested by means of some real data. Section 4 proffers the conclusions and the Appendix provides the mathematical proofs.

2 Theoretical results

For \(i=1,2\), consider the stochastic logistic equation below:

$$ \mathrm{d}\widetilde{\Psi }_{i} =\widetilde{\Psi }_{i} \bigl[r_{i}(\eta )-\alpha _{ii}(\eta ) \widetilde{\Psi }_{i} \bigr]\,\mathrm{d}t +\gamma _{i}(\eta ) \widetilde{\Psi }_{i}\,\mathrm{d}B_{i}(t), \quad \bigl( \widetilde{\Psi }_{i}(0), \eta (0)\bigr)=\bigl(\Psi _{i}(0), \eta (0)\bigr).$$
(4)

For Eq. (4), taking advantage of Theorem 6 in [23] results in

$$ \limsup_{t\rightarrow +\infty }\ln \widetilde{\Psi }_{i}(t)/t\leq 0, \quad i=1,2. $$
(5)

Furthermore, in accordance with [24], if \(\overline{a}_{i}>0\), then Eq. (4) possesses a UESD \(\Gamma _{i}(\cdot \times \cdot )\) on \(\mathbb{R}_{+}\times \mathbb{X}\), where

$$ \overline{a}_{i}=\sum_{j\in \mathbb{X}}\pi _{j} a_{i}(j), \qquad a_{i}(j)=r_{i}(j)- \frac{\gamma _{i}^{2}(j)}{2}, \quad i=1,2. $$

For model (3), it is trivial to check that if \(\overline{a}_{i}<0\), then the species i will become extinct, i.e., \(\lim_{t\rightarrow +\infty }\Psi _{i}(t)=0\), \(i=1,2\). Accordingly, from here on, we suppose that model (3) complies with \(\overline{a}_{1}>0\) and \(\overline{a}_{2}>0\).

Now we provide our first theoretical result.

Theorem 1

If \(\bar{b}_{1}>0\) and \(\bar{b}_{2}>0\), then model (3) possesses a UESD concentrated on \(\mathbb{R}_{+}^{2}\times \mathbb{X}\), where

$$ \overline{b}_{1}=\overline{a}_{1}-\sum _{j\in \mathbb{X}} \int _{0}^{+ \infty }\alpha _{12}(j)x\Gamma _{2}(\mathrm{d}x,\mathrm{d}j),\qquad \overline{b}_{2}= \overline{a}_{2}-\sum_{j\in \mathbb{X}} \int _{0}^{+ \infty }\alpha _{21}(j)x\Gamma _{1}(\mathrm{d}x,\mathrm{d}j). $$

Remark 1

If \(\alpha _{il}(\eta (t))\equiv \alpha _{il}\), a positive constant, \(i,l=1,2\), then model (3) is replaced by the following special case:

$$ \textstyle\begin{cases} \mathrm{d}\Psi _{1}=\Psi _{1} (r_{1}(\eta )-\alpha _{11}\Psi _{1}- \alpha _{12}\Psi _{2}-\beta (\eta ) \Psi _{1}\Psi _{2}^{2} ) \,\mathrm{d}t+\gamma _{1}(\eta )\Psi _{1}\,\mathrm{d}B_{1}(t), \\ \mathrm{d}\Psi _{2}=\Psi _{2} (r_{2}(\eta )-\alpha _{21}\Psi _{1}- \alpha _{22}\Psi _{2} )\,\mathrm{d}t+\gamma _{2}(\eta )\Psi _{2} \,\mathrm{d}B_{2}(t).\end{cases} $$
(6)

In light of [24], for model (4), if \(\overline{a}_{1}>0\) and \(\overline{a}_{2}>0\), one derives

$$ \sum_{j\in \mathbb{X}} \int _{0}^{+\infty }\alpha _{ii}(j)x\Gamma _{i}( \mathrm{d}x,\mathrm{d}j) =\overline{a}_{i}, \quad i=1,2. $$
(7)

Accordingly, for model (6),

$$ \overline{b}_{1}=\overline{a}_{1}- \alpha _{12} \frac{\overline{a}_{2}}{\alpha _{22}}, \qquad \overline{b}_{2}= \overline{a}_{2}- \alpha _{21}\frac{\overline{a}_{1}}{\alpha _{11}}. $$

An interesting problem follows from Theorem 1: what happens if \(\bar{b}_{1}<0\) or \(\bar{b}_{2}<0\)? For model (3), this problem is difficult, hence we test model (6) and derive the following results.

Theorem 2

For model (6), let \(\alpha _{11}\alpha _{22}>\alpha _{12}\alpha _{21}\).

  1. (i)

    If \(\overline{b}_{1}<0\), \(\overline{b}_{2}>0\), then species 1 becomes extinct and the transition probability of \((\Psi _{2}(t),\eta (t))\) converges weakly to \(\Gamma _{2}\).

  2. (ii)

    If \(\overline{b}_{1}>0\), \(\overline{b}_{2}<0\), then species 2 becomes extinct and the transition probability of \((\Psi _{1}(t),\eta (t))\) converges weakly to \(\Gamma _{1}\).

Remark 2

Under the assumption \(\alpha _{11}\alpha _{22}>\alpha _{12}\alpha _{21}\), one can deduce that \(\overline{b}_{1}<0\) and \(\overline{b}_{2}<0\) cannot be valid at the same time. Accordingly, under \(\alpha _{11}\alpha _{22}>\alpha _{12}\alpha _{21}\), sharp criteria for the existence of a UESD of model (6) are \(\overline{b}_{1}>0\) and \(\overline{b}_{2}>0\).

3 Discussions and applications

The theoretical results disclose several critical functions of regime-switching on the stability of system (3). To manifest these functions more directly, we probe model (6) with \(L=2\). Accordingly, system (6) jumps between the following two subsystems:

$$ \textstyle\begin{cases} \mathrm{d}\Psi _{1}=\Psi _{1} (r_{1}(1)-\alpha _{11}\Psi _{1}- \alpha _{12}\Psi _{2}-\beta (1) \Psi _{1}\Psi _{2}^{2} )\,\mathrm{d}t+ \gamma _{1}(1)\Psi _{1}\,\mathrm{d}B_{1}(t), \\ \mathrm{d}\Psi _{2}=\Psi _{2} (r_{2}(1)-\alpha _{21}\Psi _{1}- \alpha _{22}\Psi _{2} )\,\mathrm{d}t+\gamma _{2}(1)\Psi _{2} \,\mathrm{d}B_{2}(t),\end{cases} $$
(8)

and

$$ \textstyle\begin{cases} \mathrm{d}\Psi _{1}=\Psi _{1} (r_{1}(2)-\alpha _{11}\Psi _{1}- \alpha _{12}\Psi _{2}-\beta (2) \Psi _{1}\Psi _{2}^{2} )\,\mathrm{d}t+ \gamma _{1}(2)\Psi _{1}\,\mathrm{d}B_{1}(t), \\ \mathrm{d}\Psi _{2}=\Psi _{2} (r_{2}(2)-\alpha _{21}\Psi _{1}- \alpha _{22}\Psi _{2} )\,\mathrm{d}t+\gamma _{2}(2)\Psi _{2} \,\mathrm{d}B_{2}(t).\end{cases} $$
(9)

For models (8) and (9), suppose

$$ \overline{a}_{i}=\sum_{j=1,2} \pi _{j} \bigl(r_{i}(j)-\gamma _{i}^{2}(j)/2 \bigr)>0, \quad i=1,2,\qquad \alpha _{11}\alpha _{22}-\alpha _{12}\alpha _{21}>0. $$
(10)

We can deduce from Theorems 1 and 2 that

(A):

if \(\overline{b}_{1}>0\) and \(\overline{b}_{2}>0\), then model (6) possesses a UESD concentrated on \(\mathbb{R}_{+}^{2}\times \mathbb{X}\);

(B):

If \(\overline{b}_{1}<0\) and \(\overline{b}_{2}>0\), then species 1 becomes extinct and the transition probability of \((\Psi _{2}(t),\eta (t))\) converges weakly to \(\Gamma _{2}\);

(C):

If \(\overline{b}_{1}>0\) and \(\overline{b}_{2}<0\), then species 2 becomes extinct and the transition probability of \((\Psi _{1}(t),\eta (t))\) converges weakly to \(\Gamma _{1}\).

Accordingly,

  1. (I)

    if both subsystems (8) and (9) possess the corresponding UESD on \(\mathbb{R}_{+}^{2}\) (i.e., \(b_{i}(j) > 0\), \(i, j = 1, 2\)), the hybrid model (6) still possesses a UESD on \(\mathbb{R}_{+}^{2}\times \{1,2\}\) owing to \(\overline{b}_{i}=\sum_{j=1,2}\pi _{j} b_{i}(j) >0\), \(i=1,2\).

  2. (II)

    An interesting question is what happens if one subsystem possesses a UESD on \(\mathbb{R}_{+}^{2}\) but the other does not. Under such circumstances, the hybrid model (6) may possess a UESD on \(\mathbb{R}_{+}^{2}\times \{1,2\}\) or not. If the Markov chain satisfies \(\overline{b}_{1}>0\) and \(\overline{b}_{2}>0\), then (6) possesses a UESD on \(\mathbb{R}_{+}^{2}\times \{1,2\}\); if the Markov chain satisfies \(\overline{b}_{1}<0\) or \(\overline{b}_{2}<0\), then a species in (6) will become extinct, namely, model (6) does not possess a stationary distribution on \(\mathbb{R}_{+}^{2}\times \{1,2\}\).

  3. (III)

    The case when neither (8) nor (9) possesses a stationary distribution on \(\mathbb{R}_{+}^{2}\) is similar to the case (II). Nevertheless, there is an interesting finding: under such circumstances, the hybrid system (6) could possess a UESD on \(\mathbb{R}_{+}^{2}\times \{1,2\}\), namely, the regime-switching could make the UESD on \(\mathbb{R}_{+}^{2}\times \{1,2\}\) appear.

Now let us reflect these functions by means of some real data of Heterocapsa triquetra and Chrysocromulina polylepis (the allelopathic species) presented by [8] (see Table 1).

Table 1 Parameter values

Compute that

$$\begin{aligned}& a_{1}(1)=r_{1}(1)-\frac{\gamma ^{2}_{1}(1)}{2}=0.02>0,\qquad a_{1}(2)=0.48>0,\\& a_{2}(1)=0.32>0,\qquad a_{2}(2)=0.12>0, \\& \alpha _{11}\alpha _{22}-\alpha _{12}\alpha _{21}=1.49\times 10^{-9}>0, \\& b_{1}(1)=a_{1}(1)-\alpha _{12} \frac{a_{2}(1)}{\alpha _{22}}=-0.0162< 0,\qquad b_{2}(1)=0.4664>0, \\& b_{1}(2)=0.3145>0,\qquad b_{2}(2)=-0.016< 0. \end{aligned}$$

In accordance with (B) and (C), in state 1, Heterocapsa triquetra becomes extinct (see Fig. 1(a)) while in state 2, Chrysocromulina polylepis becomes extinct (see Fig. 1(b)). This suggests that neither subsystem (8) nor subsystem (9) possesses a stationary distribution on \(\mathbb{R}_{+}^{2}\). Now we let π change.

  1. (I)

    Let \(\pi =(0.5,0.5)\), then \(\overline{b}_{1}=\sum_{j=1,2}\pi _{j}b_{1}(j)=0.1491>0\), \(\overline{b}_{2}=0.2252>0\). In accordance with (A), the hybrid model (6) possesses a UESD on \(\mathbb{R}_{+}^{2}\times \{1,2\}\), see Fig. 1(c) and Fig. 1(d).

    Figure 1
    figure 1

    Model (6) with \(L=2\) and parameter values given in Table 1: (a) a trajectory of subsystem (8), which manifests that Heterocapsa triquetra becomes extinct; (b) a trajectory of subsystem (9), which manifests that Chrysocromulina polylepis becomes extinct; (c) a trajectory of the hybrid system (6), which manifests the two species are coexistent; and (d) the density function of the solution of the hybrid system (6) at \(t=3000\)

  2. (II)

    Let \(\pi =(0.96,0.04)\), then \(\overline{b}_{1}=-0.0029<0\), \(\overline{b}_{2}=0.445>0\). In accordance with (B), the first species, Heterocapsa triquetra, becomes extinct.

  3. (III)

    Let \(\pi =(0.03,0.97)\), then \(\overline{b}_{1}=0.305>0\), \(\overline{b}_{2}=-0.0015<0\). In accordance with (C), the allelopathic species, Chrysocromulina polylepis, becomes extinct.

4 Concluding remarks

In this article we developed a stochastic phytoplankton model with allelopathy and regime-switching, and offered sufficient criteria to ensure that the model possesses a UESD concentrated on \(\mathbb{R}_{+}^{2}\times \mathbb{X}\) (see Theorem 1). Furthermore, we proffered that the above criteria are sharp under certain conditions (see Remark 2). The results manifested that regime-switching could lead to the appearance of the UESD concentrated on \(\mathbb{R}_{+}^{2}\times \mathbb{X}\) (see Fig. 1).

Biologically, the existence of a UESD concentrated on \(\mathbb{R}_{+}^{2}\times \mathbb{X}\) suggests that the two species in model (3) are stably coexistent. As a result, the findings of this article suggest that if the Markov chain spends enough time in the desired state such that \(\bar{b}_{1}>0\) and \(\bar{b}_{2}>0\), then the two species in model (3) are stably coexistent; otherwise, the coexistence of the two species may be threatened, especially, if the Markov chain spends much more time in the undesired state such that \(\bar{b}_{i}<0\), then the species i in model (6) becomes extinct, \(i=1,2\).

Some issues deserve further investigation. To begin with, as pointed out above, for model (3), what happens if \(\overline{b}_{1}<0\) or \(\overline{b}_{2}<0\) is still unknown. Another interesting issue is to test other random perturbations, for instance, Lévy jumps. The motivation is that the evolution of plankton is frequently influenced by some abrupt disturbances which could not be depicted by model (3) and one might resort to the Lévy jumps. When the Lévy jumps are evaluated, model (3) is replaced by

$$ \textstyle\begin{cases} \mathrm{d}\Psi _{1}(t)=\Psi _{1}(t^{-}) (r_{1}( \eta )-\alpha _{11}(\eta )\Psi _{1}(t^{-})-\alpha _{12}(\eta )\Psi _{2}(t^{-}) -\beta (\eta ) \Psi _{1}(t^{-})\Psi _{2}^{2}(t^{-}) )\,\mathrm{d}t \\ \hphantom{\mathrm{d}\Psi _{1}(t)=} {} +\gamma _{1}(\eta )\Psi _{1}(t^{-}) \mathrm{d}B_{1}(t)+\int _{z\in \mathcal{Z}}f_{1}(z)\Psi _{1}(t^{-}) \widetilde{F}(\mathrm{d}t,\mathrm{d}z), \\ \mathrm{d}\Psi _{2}(t)=\Psi _{2}(t^{-}) (r_{2}( \eta )-\alpha _{21}(\eta )\Psi _{1}(t^{-})-\alpha _{22}(\eta )\Psi _{2}(t^{-}) )\,\mathrm{d}t \\\hphantom{\mathrm{d}\Psi _{2}(t)=} {} +\gamma _{2}(\eta )\Psi _{2}(t^{-}) \,\mathrm{d}B_{2}(t) +\int _{z\in \mathcal{Z}}f_{2}(z)\Psi _{2}(t^{-}) \widetilde{F}(\mathrm{d}t,\mathrm{d}z),\end{cases} $$

where \(\mathcal{Z}\) is a subset of \(\mathbb{R}_{+}\), is a compensated Poisson random measure. Finally, for certain single-species model without switching, one can obtain the explicit form of the density function of the UESD (see, e.g., [25, 26]), the properties of the density function of the UESD of model (3) are unclear, yet. We leave the above three issues for further consideration.