1 Introduction

Different aspects of stable coexistence and survival of species in an ecological system have been studied by biologists and mathematicians. Ecologists have also considered whether chaotic behavior occurs in biological systems. Schaffer and Kot [28] give examples of real world chaos in systems such as the Canadian lynx cycle, outbreaks of Thrips imaginis, and others. Costantino et al. [8] famously observed chaotic behavior in cultures of flour beetles (Tribolium castaneum) in the 1990s. Around the same time, Sugihara and May [33] investigated the chaotic trajectories of real world time series data on measles, chickenpox and marine phytoplankton. Becks et al. [4] also observed chaotic behavior for certain values of dilution rates of a chemostat experiment. They studied a predator-prey system consisting of a bacterivorous ciliate and two bacterial prey species.

Furthermore, models of two prey and one predator [12], a three species food chain [13], microbial systems [19], multi-trophic ecological systems [32], and plankton models [10, 16, 23] have exhibited chaos for biologically relevant parameters. In [39], instances in the biomedical field are presented where chaos has been observed. Some examples are the response of cardiac and neural tissue to pacing stimuli, fluctuations in leukocyte counts in patients with chronic myelogenous leukemia, and ventricular tachycardia. It is also observed that there is no real insight on how to prevent or eliminate chaotic arrhythmia and the concept of making small perturbations to the chaotic system might be more useful. In [9], it is suggested that chaotic behavior of populations carries evolutionary advantages. They argue that since very small changes in the initial conditions of a chaotic system can greatly alter the system’s trajectory, one doesn’t need to change the system completely to obtain a desired outcome.

However, survival and chaos have mostly been studied as separate topics. The goal of this work is to demonstrate how chaotic behavior can indeed be used to ensure the survival and thriving of the species involved in a system by employing a practical control such as harvesting of the predator. We provide such a control algorithm that takes advantage of chaotic trajectories to lead a system from a situation where one or more of the species may not survive to a state where in the long term all the species are sufficiently far from extinction.

The outline of the remainder of the paper is as follows: Sect. 2 presents a mathematical definition of survival of the species in a system and discusses methods for control through chaos. Section 3 presents the control algorithm we propose. Section 4 contains applications of the algorithm to predator-prey models which include harvesting of species.

2 Survival and Chaos

During the 1960s, there were doubts among biologists that either local or global asymptotic stability was not enough to describe population behavior. R.C. Lewontin [21] and J. Maynard Smith [22] give an intuitive approach to dynamic boundedness and permanence, where permanence means that the species remain at a safe threshold from extinction. There were, however, no mathematical ideas that seemed helpful in treating these concepts. To remedy this, the idea of persistence, that is

$$\displaystyle \begin{aligned} \limsup _{t \rightarrow \infty} x_i(t) > 0 \mathrm{~for~ all ~species~} x_i \end{aligned} $$

was introduced in [11] for the autonomous model \(\dot {x_i} = x_if_i(x) \text{ for } i=1, \dots ,n\).

A disadvantage of this concept is that orbits of a persistent system may approach the boundary \(\partial \mathbb {R}^n_+\), thus bringing species dangerously close to extinction. In his paper, Schreiber [29] discusses multiple definitions of persistence based on [6, 7] and their dependence on perturbations.

The stronger condition of permanence that avoids this difficulty was introduced in [30] and is based on the boundary \(\partial \mathbb {R}^n_+\) being repelling. Proving that a system is permanent is far from trivial. Below we present several approaches for showing that a system has the property of permanence.

In [2], a system is said to be permanent if the boundary (including infinity) is an unreachable repeller or, equivalently, if there exists a compact subset in the interior of the state space where all orbits starting from the interior eventually end up. The focus in [2] is primarily on ecological systems of the type

$$\displaystyle \begin{aligned} \dot{x_i} = x_if_i(x) \mathrm{~on~} \mathbb{R}^{n}_+ \end{aligned} $$

and replicator equations

$$\displaystyle \begin{aligned} \dot{x_i} = x_i(f_i(x)-\sum x_if_i ) \end{aligned} $$

which have been widely investigated in population genetics, population ecology, the theory of prebiotic evolution of self-replicating polymers and socio-biological studies of evolution. The concept of permanence, however, can be applied to a wide range of systems of differential and difference equations.

A sufficient condition for permanence is also presented in [2] with the help of an average Lyapunov function P. The function P is defined on the state space, vanishing on the boundary and strictly positive in the interior, such that \(\dot {P} = P\psi \) where ψ is a continuous function with the property that for some T > 0,

$$\displaystyle \begin{aligned} \dfrac{1}{T} \int_0^T \psi(x(t))dt > 0 \text{ for all } x \text{ on the boundary}. \end{aligned} $$

Another method for proving that a system is permanent is given in [15] and will be restated here as Theorem 1. We first need the following definitions.

Definition 1 ([15])

Consider a system of the type

$$\displaystyle \begin{aligned} \dot{x_i} = x_if_i(x) \text{ for } i=1, \dots, n. \end{aligned} $$
(1)
  • A rest point (steady state) \(\bar {x}\) is saturated if \(f_i(\bar {x}) \leq 0 \text{ for all } i\) (the equality sign must hold whenever \(\bar {x_i}>0\)). A rest point in the interior is trivially saturated. The quantities \(f_i(\bar {x})\) are the eigenvalues of the Jacobian at \(\bar {x}\) whose eigenvectors are transversal to the boundary face of \(\bar {x}\). Thus they are called transversal eigenvalues.

  • A degenerate saturated rest point is one which has a zero transversal eigenvalue.

  • A regular rest point is one which has non-zero eigenvalues.

  • If \(\bar {x}\) is a regular rest point, then the index \(\mathbf {i}(\bar {\mathbf {x}})\) is the sign of the Jacobian \(D_{\bar {x}}f\). Hence

    $$\displaystyle \begin{aligned} i(\bar{x}) = (-1)^{k} \end{aligned} $$

    where k is the number of real negative eigenvalues of the Jacobian. For n = 2, for example, the index of a center, a sink, or a source is + 1, while that of a saddle is − 1.

  • A boundary rest point is a rest point with at least one zero coordinate.

Theorem 1 ([15])

If the system (1), does not have regular saturated boundary rest points, then it is permanent.

Our goal is to take advantage of the chaotic behavior of a non-permanent system in order to make it permanent. To this end, we employ control theory on the chaotic orbits to push the system into permanence.

We first notice the following connection between survival and chaos.

Theorem 2

Three-dimensional continuous chaotic systems are persistent.

Proof

If a system is not persistent and one of the species dies out, then the dimension is reduced to two and thus the system cannot be chaotic by the Poincaré–Bendixson Theorem. □

Among the first proponents of using a chaotic attractor to control a system were E. Ott et al. [25]. They observed that a chaotic attractor has typically embedded within it an infinite number of unstable periodic orbits. In their method (OGY), the approach was to first determine some of the unstable low-period periodic orbits that are embedded in the chaotic attractor and then choose one which yields improved system performance. They then tailored their small time-dependent parameter perturbations so as to stabilize the existing orbit.

T. L. Vincent [37] first provides a motivation of why chaotic behavior in nonlinear systems is useful to set up a control design. He mentions that chaotic behavior is useful in moving a system to various points in the state space without changing the system drastically. The reasoning is very similar to the one used for the OGY method in [25]. The chaotic control algorithm in [37] requires two ingredients: a chaotic attractor and a controllable target. If chaos does not exist, it can be created using open loop control (where the control function is a function of time). A controllable target is any subset of the domain of attraction to an equilibrium point, under a corresponding feedback control law, that has a non-empty intersection with the chaotic attractor. The controllable target should be large enough so that one does not have to wait too long for the system to reach it. The algorithm is applied on three different systems: the Hénon map, bouncing ball system, two-link pendulum system. The first two are discrete and the third is a four-dimensional continuous system. Further detailed examples on how to control an inverted pendulum and a bouncing ball were provided in [38].

Several other control methods were described in [24, 26, 27, 31], to name a few. Here, we adopt the algorithm in [37] as a foundation of our control method due to ease of computation and adaptability to different models.

The next two sections provide details on the control algorithm we propose and its applications to predator-prey models.

3 The Chaotic Control Algorithm (CCA)

We are introducing a control algorithm, CCA (chaotic control algorithm), which is based on the algorithm presented in [37, 38]. CCA is designed to be applied on systems which already have chaotic orbits but are not permanent. The output of the algorithm is the required closed loop control (i.e. a control function of the state of the system) which pushes the system into permanence.

Consider the system of non-linear differential equations given by

$$\displaystyle \begin{aligned} \dot{X} = F \left[X,U \right] \end{aligned} $$
(2)

where \(F=\left [ F_1, \dots F_{N_X} \right ]\) is an N X-dimensional vector function of the state vector \(X=[X_1,\dots X_{N_X}]\), and control vector \(U=[U_1,\dots U_{N_U}]\). The control will, in general, be bounded. Assume that for all t there exists a control \(\hat {U}(t)\) such that (2) has a chaotic attractor and is non-permanent. Also assume that for a specified constant control, \(\bar {U}\), there is a corresponding rest point of interest which is near the chaotic attractor where the system is permanent. The rest point \(\bar {X}\) is such that

$$\displaystyle \begin{aligned} F(\bar{X},\bar{U}) = 0 \end{aligned} $$
(3)

Notice that the rest point need not be stable after optimal control is applied since we are only interested in making the system permanent.

The steps of the CCA are outlined next.

  1. Input:

    Rest point \(\bar {X}\) and control \(\bar {U}\) such that (3) is satisfied. In particular, \(\bar {U}\) is chosen such that (2) is permanent.

  2. Output:

    Optimal closed loop control which pushes the chaotic, non-permanent system into permanence.

  3. 1.

    Linearizing \(\dot {X} = F \left [X,U \right ]\) about the rest point \(\bar {X}\) we have

    $$\displaystyle \begin{aligned} \dot{x} = Ax + Bu \end{aligned} $$
    (4)

    where

    \(x = X- \bar {X}, ~~u = U- \bar {U}, ~~A = \dfrac {\partial F}{\partial X} \Big |{ }_{\bar {X},\bar {U}},\) and \(B = \dfrac {\partial F}{\partial U} \Big |{ }_{\bar {X},\bar {U}}.\)

    Now the origin is the rest point for (4) with control u(t) ≡ 0. We are going to obtain a control such that the origin becomes stable.

  4. 2.

    The linear quadratic regulator (LQR) method determines gains K such that under full state feedback of the form

    $$\displaystyle \begin{aligned} u(x) =-Kx \end{aligned} $$
    (5)

    a quadratic performance index is minimized. The performance index is the infinite integral of the quadratic form x tQx + u tRu where Q and R are symmetric positive definite matrices to be chosen as part of the control design process.

    The gain matrix K is given by

    $$\displaystyle \begin{aligned} & K =R^{-1}B^{T}S \end{aligned} $$

    and the matrix S is determined by solving the Riccati equation given by

    $$\displaystyle \begin{aligned} SA + A^{T}S - SBR^{-1}B^{T}S = -Q. \end{aligned} $$
  5. 3.

    Under full state feedback control given by (5), the linearized system is given by

    $$\displaystyle \begin{aligned} \dot{x} = \hat{A}x \end{aligned} $$
    (6)

    where

    $$\displaystyle \begin{aligned} \hat{A} = A-BK. \end{aligned} $$

    A Lyapunov function of the form

    $$\displaystyle \begin{aligned} V(x) = x^{t}Px \end{aligned} $$
    (7)

    may now be determined for the linear stable controlled system (6) using the continuous Lyapunov equation

    $$\displaystyle \begin{aligned} P\hat{A}+\hat{A}^{T}P = -\hat{Q} \end{aligned} $$

    where \(\hat {Q}\) is a positive definite matrix.

    For the stable linear system, starting from any point in state space, the solution obtained for P will result in the property that \(\dot {V}<0\) for every point of the linear system (6) except at the origin where V = 0. This will prove that the origin is asymptotically stable for (4). This, in turn, implies that for the nonlinear system (2), the rest point will be asymptotically stable in some neighborhood containing the rest point.

Figure 1 is a flowchart depicting CCA.

Fig. 1
figure 1

Flowchart for the chaotic control algorithm (CCA) described in Sect. 3

We next apply the CCA and demonstrate how using the chaotic nature of a system, one can transform it from non-permanent to permanent.

4 Applications of the CCA to Predator-Prey Models

We now investigate two different types of predator-prey models. The models are of Lotka-Volterra type and Leslie-Gower type. In each case harvesting of one species is introduced and chaotic behavior is observed for certain parameter values. For the same parameter values, non-permanence of the species is also observed. Using the CCA from Sect. 3, we construct a closed loop control (i.e. a control which is a function of the state of the system) which steers the system towards permanence. The systems were chosen for their different types of functional responses and since harvesting of one species was relatively easy to introduce.

4.1 Control Through Harvesting in a Predator-Prey Model

First we apply the control algorithm to a Lotka-Volterra type two-prey, one-predator model from [3] where the predator is harvested at a constant rate. Here the harvesting of the predator will act as a control.

The population dynamics model involves three interacting species, namely the prey N 1 and N 2 and the predator P. The harvesting is given by a harvesting function H(P). The dynamics is described by Lotka-Volterra type equations given by

$$\displaystyle \begin{aligned} \begin{aligned} {} \dot{N_1} &= N_1(r_1-a_{11}N_1-a_{12}N_2-a_{13}P)\\ \dot{N_2} &= N_2(r_2-a_{21}N_1-a_{22}N_2-a_{23}P)\\ \dot{P} &= P(-r_3+a_{31}N_1+a_{32}N_2)-H(P). \end{aligned} \end{aligned} $$
(8)

We consider the harvesting function H(P) = H p where H p is a constant and 0 < H p < 1. This is known as constant harvest quota. The parameters chosen are the same as in [3] and are as follows:

r 1 = r 2 = r 3 = a 11 = a 12 = a 22 = a 23 = 1, a 21 = 1.5, a 32 = 0.5, a 13 = 5, a 31 = 2.5.

Since a 12 < a 21, the first prey has a competitive advantage, i.e. N 1 is the dominant and N 2 the sub-dominant prey. Consider the two-dimensional subsystem of the preys without predation:

$$\displaystyle \begin{aligned} \dot{N_1} &= N_1(r_1-a_{11}N_1-a_{12}N_2)\\ \dot{N_2} &= N_2(r_2-a_{21}N_1-a_{22}N_2). \end{aligned} $$

The relation

$$\displaystyle \begin{aligned} a_{11}a_{22}-a_{12}a_{21}<0 \end{aligned} $$

implies that the system does not have an interior rest point, that is, the species N 1 and N 2 cannot coexist. This shows that without predation, either one of the prey species N 1 or N 2 will die out [40].

4.1.1 Boundedness of the Solutions

Following methods similar to those in [1, 5, 34], we now prove that all solutions of (8) which initiate in \(\mathbb {R}^3_+\) are uniformly bounded.

Let W = N 1 + N 2 + 2P. Then \(\dot {W} = \dot {N_1} + \dot {N_2} + 2\dot {P}.\) Along the solutions of (8), we have

$$\displaystyle \begin{aligned} \dot{W} &= N_1(1-N_1-N_2-5P)\\ &+ N_2(1-1.5N_1-N_2-P)\\ &+ 2P(-1+2.5N_1+0.5N_2)-2H_p\\ & = N_1(1-N_1)+N_2(1-N_2)-2.5N_1N_2-2P-2H_p\\ & \leq N_1(1-N_1)+N_2(1-N_2)-2P. \end{aligned} $$

For each constant D > 0, the following inequality holds:

$$\displaystyle \begin{aligned} \dot{W} + DW &\leq N_1(1-N_1+D)+N_2(1-N_2+D)+2P(D-1). \end{aligned} $$

Now if we take D such that 0 < D < 1 and the maximum value \(\dfrac {1+D}{2}\) of both the expressions N 1(1 − N 1 + D) and N 2(1 − N 2 + D) with respect to N 1 and N 2 respectively, we see that \(\dot {W} + DW \leq 1+D = K\) which implies that \(0 \leq W(N_1,N_2,P) \leq \dfrac {K}{D} + W(N_1(0),N_2(0),P(0))e^{-Dt}\) and so \(0 < W \leq \dfrac {K}{D} \quad \text{as } t\rightarrow \infty .\) Therefore, all solutions of (8) that initiate in \(\mathbb {R}^3_+\) are confined in the region.

4.1.2 The Harvesting Model

We now consider the harvesting model

$$\displaystyle \begin{aligned} \begin{aligned} {} \dot{N_1} &= N_1(1-N_1-N_2-5P)\\ \dot{N_2} &= N_2(1-1.5N_1-N_2-P)\\ \dot{P} &= P(-1+2.5N_1+0.5N_2)-H_p\\ \end{aligned} \end{aligned} $$
(9)

with control U = H p. The control \(\hat {U}\) for which chaos is observed is \(\hat {U}= H_p=0.02\) [3]. The chaos is indicated by a positive Lyapunov exponent 0.0474 at the initial conditions (0.4899, 0.2040, 0.0612). This is the interior rest point.

Since we want to demonstrate how the system can be steered towards permanence, we first check that the original system is non-permanent for these parameter values. The system is of the form \(\dot {x_i} =x_if(x_i)\) where x 1 = N 1, x 2 = N 2, x 3 = P and

$$\displaystyle \begin{aligned} f_1(N_1,N_2,P) &= 1-N_1-N_2-5P\\ f_2(N_1,N_2,P) &= 1-1.5N_1-N_2-P\\ f_3(N_1,N_2,P) &= -1+2.5N_1+0.5N_2-\dfrac{0.02}{P}. \end{aligned} $$

According to Theorem 1, the system is permanent if it does not have regular, saturated boundary rest points, i.e for the rest point \(\bar {x}\), \(f_i(\bar {x}) > 0\) for some i when \(\bar {x}_i=0\).

For this particular system, consider the biologically valid rest points \(\bar {x}=(\bar {N_1}, \bar {N_2}, \bar {P})\) and the values of \(f_i(\bar {x}) > 0\) for some i when \(\bar {x}_i=0\).

We see in Table 1 that the system does indeed have a saturated rest point, namely B = (0.9236067978, 0, 0.1527864045e − 1), so it is not permanent.

Table 1 Check for permanence of (9) using boundary rest points

Figure 2 is a representation of the chaotic manifold with the chosen set of parameters and initial condition set to the interior rest point.

Fig. 2
figure 2

Chaotic manifold for h = 0.02 [3] and the initial conditions (N 1 = 0.4899, N 2 = 0.2040, P = 0.0612)

4.1.3 Application of CCA [18]

The specific control that will lead the harvesting model towards permanence is \(\bar {U}=H_p=0.035\) and the interior rest point of the system

$$\displaystyle \begin{aligned} \dot{N_1} &= N_1(1-N_1-N_2-5P)\\ \dot{N_2} &= N_2(1-1.5N_1-N_2-P)\\ \dot{P} &= P(-1+2.5N_1+0.5N_2)-0.035 \end{aligned} $$

is \(\bar {X}=(N_1, N_2, P)=(0.5816, 0.0549, 0.0727)\). The system is found to be permanent by checking the boundary rest points using the MATLAB code [18] given in the Appendix. In the code, the boundary rest points are calculated and checked to see if they are regular saturated rest points. If the rest points are not saturated, it is concluded that the system is permanent by Theorem 1.

So \(\bar {X}= (0.5816,0.0549,0.0727)\).

For the linearization step we calculate the matrices A and B as

$$\displaystyle \begin{aligned} A &= \dfrac{\partial F}{\partial X} |{}_{\bar{X},\bar{U}} = \begin{bmatrix} -0.5816 & -0.5816 & -2.9080\\ -0.0824 & -0.0549 & -0.0549\\ 0.1817 & 0.0363 & 0.4814 \end{bmatrix},\\ B &= \dfrac{\partial F}{\partial U} |{}_{\bar{X},\bar{U}} = \begin{bmatrix} 0 \\ 0 \\ -1 \end{bmatrix}. \end{aligned} $$

We choose the matrices Q = I 3 and R=[1] which are positive definite.

Applying the lqr routine of MATLAB, the gains matrix K is obtained as

$$\displaystyle \begin{aligned} K= \begin{bmatrix} 0.2761 & -0.2112 & -2.1591 \end{bmatrix}. \end{aligned} $$

Thus our feedback control given by (5) is

$$\displaystyle \begin{aligned} u(x) &= -Kx \\ & = -0.2761N_1-0.2112N_2-2.1591P. \end{aligned} $$

To confirm that the origin is asymptotically stable, the Lyapunov function has also been calculated. From Step 3 of the algorithm, we have

$$\displaystyle \begin{aligned} \hat{A} &= A-BK\\ &= \begin{bmatrix} -0.5816 & -0.5816 & -2.9080\\ -0.0824 & -0.0549 & -0.0549\\ 0.4579 & -0.1749 & -1.6777 \end{bmatrix}. \end{aligned} $$

We choose \(\hat {Q}=Q=I_3\) and we obtain P using the lyap function in MATLAB:

$$\displaystyle \begin{aligned} P = \begin{bmatrix} 1.4209 & -4.0725 & 0.7023\\ -4.0725 & 17.5405 & -2.3263\\ 0.7023 & -2.3263 & 0.7322 \end{bmatrix}. \end{aligned} $$

For the above matrix, V (x) = x tPx will satisfy \(\dot {V}<0\) by construction of P.

The chaotic nature disappears when h = 0.035 as seen in Fig. 3.

Fig. 3
figure 3

Permanence and absence of a chaotic manifold when h = 0.035, initial conditions (N 1 = 0.5816, N 2 = 0.0549, P = 0.0727)

The system is now permanent, with harvesting still possible thanks to the chaotic orbit which we took advantage of as we applied the CCA.

4.2 Control Through Harvesting in a Food-Chain System

The next system consider is of a simple prey-specialist predator-generalist predator (for example, plant-insect pest-spider) interaction based on the model found in [17, 20, 35]. In the system below, harvesting of the prey is considered as a control.

$$\displaystyle \begin{aligned} \begin{aligned} {} \dot{x} &= a_1x-b_1x^2- \dfrac{wxy}{x+D}-hx\\ \dot{y} &= -a_2y+ \dfrac{w_1xy}{x+D_1} - \dfrac{w_2yz}{y+D_2}\\ \dot{z} &= cz^2 - \dfrac{w_3z^2}{y+D_3}. \end{aligned} \end{aligned} $$
(10)

In this model, a prey population of size x serves as the only food for the specialist predator population of size y. This population, in turn, serves as favorite food for the generalist predator population of size z. The equations for rate of change of population size for prey and specialist predator are according to the Volterra scheme (predator population dies out exponentially in absence of its prey). The interaction between this predator y and the generalist predator z is modeled by the Leslie-Gower scheme where the loss in a predator population is proportional to the reciprocal of per capita availability of its most favorite food. The basic characteristic of the Leslie-Gower model is that it leads to a solution which is asymptotically independent of the initial conditions and depends only on the intrinsic attributes of the interacting system, that is, the parameters w, w 1, and so on [36].

After introducing harvesting to the existing model, we observed chaos and non-permanence [18]. The hx term models the harvesting function being proportional to the population of the prey (constant harvest effort).

The constants are all positive and are described as follows.

a 1  ::

intrinsic growth rate of the prey population x;

b 1  ::

strength of intra-specific competition among the prey species;

w,  w 1 ,  w 2 ,  w 3  ::

the maximum values which per capita growth can attain;

D,  D 1  ::

the extent to which the environment provides protection to the prey x;

a 2  ::

intrinsic death rate of the predator y in the absence of the only food x;

D 2  ::

the value of y at which the per capita removal rate of y becomes w 2∕2;

D 3  ::

the residual loss in z population due to severe scarcity of its favorite food y;

c::

the rate of self-reproduction of the generalist predator z. The square term signifies the mating frequency is directly proportional to the number of males and females;

h::

harvesting rate of the prey x.

The parameter values (except for h) are taken as in [35] and are given below.

  • a 1 = 1.93, b 1 = 0.06, w = 1, D = 10, a 2 = 1, w 1 = 2

  • D 1 = 10, w 2 = 0.405, D 2 = 10, c = 0.03, w 3 = 1, D 3 = 20.

The above parameter choices are so that the system is bounded and there is possibility of chaotic behavior for different values of h.

4.2.1 Equilibrium Analysis [18]

The possible biologically viable equilibria are \(E_0=(0,0,0) \text{, } E_1=(\dfrac {a_1-h}{b_1},0,0) \text{, }\) \( E_2=(\bar {x},\bar {y},0)\), and the interior rest point E 3 = (x , y , z ).

For E 1 to be biologically relevant, we need

$$\displaystyle \begin{aligned} \begin{aligned} {} a_1-h>0 \implies h<a_1 =1.93. \end{aligned} \end{aligned} $$
(11)

E 2 is obtained by solving the subsystem

$$\displaystyle \begin{aligned} a_1-b_1x- \dfrac{wy}{x+D}-h &=0\\ -a_2+ \dfrac{w_1x}{x+D_1} &=0. \end{aligned} $$

Thus \(E_2=(\bar {x},\bar {y},0) = (10,20(1.33-h),0)\). Again for E 2 to be biologically viable we need

$$\displaystyle \begin{aligned} 1.33-h>0 \implies h<1.33. \end{aligned} $$
(12)

E 3 = (x , y , z ) is the solution of the following system.

$$\displaystyle \begin{aligned} a_1-b_1x- \dfrac{wy}{x+D}-h &=0 {} \end{aligned} $$
(13a)
$$\displaystyle \begin{aligned} -a_2+ \dfrac{w_1x}{x+D_1} - \dfrac{w_2z}{y+D_2} &=0 {} \end{aligned} $$
(13b)
$$\displaystyle \begin{aligned} cz - \dfrac{w_3z}{y+D_3} &=0. {} \end{aligned} $$
(13c)

From (13c), we have

$$\displaystyle \begin{aligned} cz - \dfrac{w_3z}{y+D_3} &=0 \\ c - \dfrac{w_3}{y+D_3} &=0 \\ \implies y* = \dfrac{w_3}{c} -D_3 = 13.33 >0. \end{aligned} $$

From (13a),

$$\displaystyle \begin{aligned} (a_1-h-b_1x)(x+D) &= wy^{*}\\ 0.06x^2-(1.33-h)x+(-5.97+10h)&=0. \end{aligned} $$

For real roots, we need

$$\displaystyle \begin{aligned} (1.33-h)^2-4(0.06)(-5.97+10h)\geq 0. \end{aligned} $$

Solving for h using Maple’s solve command (up to four significant figures), we get

$$\displaystyle \begin{aligned} h \leq 0.7411 \text{ or } h \geq 4.3189. \end{aligned} $$

For the rest point to be biologically valid, we need at least one positive root to the equation 0.06x 2 − (1.33 − h)x + (−5.97 + 10h).

According to Descartes’ Rule of Signs, if h ≤ 0.7411, then we have one sign change of the coefficients. So there is at least one positive root.

Therefore, x exists if

$$\displaystyle \begin{aligned} h \leq 0.7411. \end{aligned} $$
(14)

From (13b),

$$\displaystyle \begin{aligned} \dfrac{w_2z^{*}}{y^{*}+D_2} &=-a_2+ \dfrac{w_1x^{*}}{x^{*}+D_1} \\ z^{*} &= \dfrac{y^{*}+D_2}{w_2}(-a_2 + \dfrac{w_1x^{*}}{x^{*}+D_1})\\ z^{*} &= 57.605(\dfrac{x^{*}-10}{x^{*}+10}) \\ z^{*} \text{ exists if } x^{*}>10. \end{aligned} $$

4.2.2 Conditions for Permanence

We use Lyapunov functions to derive conditions for permanence [14, 18]. Assume the boundary rest points \(E_0=(0,0,0) \text{, } E_1=(\dfrac {a_1-h}{b_1},0,0) \text{, } E_2=(10,20(1.33-h),0)\) exist and there are no periodic orbits on the boundary. We need h < 1.33 for the system (10) to be permanent. To see this, let the Lyapunov function be \(\sigma (X) = x^{p_1}y^{p_2}z^{p_3}\), where p 1, p 2, p 3 are positive constants. Clearly σ(X) is a non-negative C 1 function defined in \(\mathbb {R}^3_+\). Consider

$$\displaystyle \begin{aligned} \psi(X) &=\dfrac{\dot{\sigma}(X)}{\sigma(X)}\\ &= p_1\dfrac{\dot{x}}{x} +p_2\dfrac{\dot{y}}{y} +p_3\dfrac{\dot{z}}{z}\\ &= p_1 \left( a_1-b_1x- \dfrac{wy}{x+D}-h \right)\\ & \, + p_2 \left( -a_2+ \dfrac{w_1x}{x+D_1} - \dfrac{w_2z}{y+D_2} \right) \\ & \, + p_3 \left( cz - \dfrac{w_3z}{y+D_3} \right). \end{aligned} $$

To show permanence, we need ψ(X) > 0 for all equilibria \(X \in \text{ bd} \mathbb {R}^3_+\), i.e. the following conditions have to be satisfied.

$$\displaystyle \begin{aligned} \psi(E_0) &= p_1(a_1-h)-p_2a_2 >0 {} \end{aligned} $$
(15a)
$$\displaystyle \begin{aligned} \psi(E_1) &= p_2(-a_2+\dfrac{w_1(a_1-h)/b_1}{(a_1-h)/b_1+D_1}) >0 {} \end{aligned} $$
(15b)
$$\displaystyle \begin{aligned} \psi(E_2) &= 0. \end{aligned} $$
(15c)

We note that by (11) and by increasing p to a sufficiently large value, ψ(E 0) can be made positive.

From (15b) we have the following requirement.

$$\displaystyle \begin{aligned} -a_2+\dfrac{w_1(a_1-h)/b_1}{(a_1-h)/b_1+D_1} &> 0\\ -a_2+\dfrac{w_1(a_1-h)}{(a_1-h)+b_1D_1} &> 0 \\ \dfrac{2(1.93-h)}{(1.93-h)+0.06*10} &> 1. \end{aligned} $$

Solving we get

$$\displaystyle \begin{aligned} h < 1.33. \end{aligned} $$
(16)

Therefore, from inequalities (11), (12), (14), and (16) we see that we need h ≤ 0.7411 for the existence of an interior rest point and permanence.

4.2.3 Control Algorithm Using Harvesting [18]

Now suppose the harvesting coefficient h = 0.93. This violates the condition for permanence and we also notice that the system is chaotic by the presence of a positive Lyapunov exponent 1.4427. We can use the chaos to bring the system back to permanence with final control U(t) = h = 0.1. The system

$$\displaystyle \begin{aligned} \begin{aligned} \dot{x} &= 1.93x-0.06x^2- \dfrac{xy}{x+10}-0.1x\\ \dot{y} &= -y+ \dfrac{2xy}{x+10} - \dfrac{0.405yz}{y+10}\\ \dot{z} &= 0.03z^2 - \dfrac{z^2}{y+20} \end{aligned} \end{aligned} $$
(17)

has interior rest point \(\bar {X}=(x=23.955,y=13.333,z=23.679)\). The system is in fact permanent using the boundary rest points and the analysis in Sect. 4.2.2.

Applying CCA, we find the matrices A and B:

$$\displaystyle \begin{aligned} A &= \dfrac{\partial F}{\partial X} \Big|{}_{\bar{X},\bar{U}} = \begin{bmatrix} -1.1603 & -0.7055 & 0\\ 0.2313 & 0.2349 & -0.2314\\ 0 & 0.5046 & 0 \end{bmatrix}\\ B &= \dfrac{\partial F}{\partial U} \Big|{}_{\bar{X},\bar{U}} = \begin{bmatrix} -23.9555 \\0 \\0 \end{bmatrix}. \end{aligned} $$

We again choose the matrices Q = I 3 and R = [1].

Applying the lqr routine of MATLAB, the gains matrix K is obtained as

$$\displaystyle \begin{aligned} K= \begin{bmatrix} -0.9630 & -1.0716 & -0.9891 \end{bmatrix}. \end{aligned} $$

Thus our feedback control given by (5) is

$$\displaystyle \begin{aligned}u(x) = -Kx = -0.9630x-1.0716y-0.9891z.\end{aligned}$$

To confirm that the origin as asymptotically stable, the Lyapunov function is also been calculated. From Step 3 of the CCA, we have

$$\displaystyle \begin{aligned} \hat{A} &= A-BK\\ &= \begin{bmatrix} -24.2299 & -26.3759 & -23.6950\\ 0.2313 & 0.2349 & -0.2314\\ 0 & 0.5046 & 0 \end{bmatrix}. \end{aligned} $$

We choose \(\hat {Q}=Q=I_3\) and we obtain P using the lyap function in MATLAB.

$$\displaystyle \begin{aligned} P = \begin{bmatrix} 179.7359 & -85.1218 & -89.0194 \\ -85.1218 & 80.7233 & -0.9909\\ -89.0194 & -0.9909 & 90.3612 \end{bmatrix}. \end{aligned} $$

For the above matrix, V (x) = x tPx will satisfy \(\dot {V}<0\) by construction of P.

In [35], harvesting was introduced and chaos was also observed. Non-permanence was also observed but with the CCA, we calculated an optimal harvesting level that led to permanence.

5 Conclusions

By demonstrating that the chaotic behavior of a system can be used as a control to obtain permanence for the system, we shed more light over the significance of chaos in ecological systems.

We investigated two predator-prey models in which instances of chaos and non-permanence were observed for different values of a harvesting parameter. To take advantage of the chaos present in the system, we applied a control algorithm (CCA) which used the chaotic orbits in the system to obtain a closed loop control which pushed the system into a permanent state. Thus chaos enabled the species to remain at a safe threshold value from extinction.

6 MATLAB Code to Determine Permanence Using Boundary Rest Points [18]

This code determines the permanence of the systems considered in Sect. 4 using boundary rest points. The system is said to be permanent if it does not have regular, saturated rest points. The code first finds the boundary rest points and then checks to see if they are saturated.

%Check for permanence function [r,check] = Perm_Check2(system, p) sys_harvest=1;%From the harvesting paper by Azar et.al sys_Upad=3;%Multiple attractors and crisis route  -Upadhyay if system == sys_harvest  syms x1 x2 x3; %parameters r1 = p(1); r2 = p(2); r3 = p(3); a_11=p(4); a_12=p(5); a_13=p(6); a_21 = p(7); a_22=p(8); a_23=p(9); a_31=p(10); a_32=p(11); H = p(12); %Harvesting function f1=(r1-a_11∗x1-a_12∗x2-a_13∗x3); f2=(r2-a_21∗x1-a_22∗x2-a_23∗x3); f3=(-r3+a_31∗x1+a_32∗x2 - H/x3); xp1 = x1∗f1== 0; xp2 = x2∗f2== 0; xp3 = x3∗f3== 0;  S = solve([xp1,xp2,xp3]); V=double([S.x1 S.x2 S.x3]);%gives us the rest points F= double([subs(f1,S) subs(f2,S) subs(f3,S) ]); %F gives f_i values at the rest points end %Multiple attractors and crisis route -Upadhyay if system ==sys_Upad syms x1 x2 x3 real; %parameters a1=p(1); b1=p(2); w=p(3); D=p(4); a2=p(5); w1=p(6); D1=p(7); w2=p(8); D2=p(9); c=p(10); w3=p(11); D3=p(12); h=p(13); %harvesting coefficient f1= a1-b1∗x1-(w∗x2/(x1+D))-h; f2= -a2+w1∗x1/(x1+D1)-w2∗x3/(x2+D2); f3= c∗x3-w3∗x3/(x2+D3); xp1 = x1∗f1== 0; xp2 = x2∗f2== 0; xp3 = x3∗f3== 0;  S = solve([xp1,xp2,xp3]); V=double([S.x1 S.x2 S.x3]);%gives us the rest points F= double([subs(f1,S) subs(f2,S) subs(f3,S) ]); %F gives f_i values at the rest points end [m,n]=size(V); for i = 1:m  %To get the interior rest point     if all(V(i,:)>0)         r=V(i,:);         break;     else         r=[0 0 0];     end     if any(V(i,:)<0)         V1=V([1:i-1,i+1:end],:); %To make sure rest                           pts are valid biologically         F1=F([1:i-1,i+1:end],:);     else         V1=V;     end end flag=0; [m1,n1]=size(V1); if all(r>0) %doing the check for permanence if there                           is an interior rest point     for i=1:m1         for j=1:n1             if V1(i,j)==0                 if F1(i,j) >=0                     check = 1;                     flag=1;                     break;                 else                     check =0;                 end             end             if (flag==1)                 break;             end         end         if (flag==1)                 break;         end     end else     check=0; end