1 Introduction

At the end of 2019, a novel coronavirus disease (COVID-19) was declared as a major health hazard by World Health Organization (WHO). At present, this disease is rapidly growing in many countries, and the global number of COVID-19 cases is increasing at a rapid rate. This coronavirus is a kind of enveloped, single stranded and positive sense virus which belongs to the RNA coronaviridae family [1, 2]. In early December of 2019, this infectious disease has begun to outbreak in Wuhan, the capital city of Hubei province, China. Until now, the epidemic in China is basically under control, but there are still many infections around the world. To defeat the epidemic, scientists in different fields investigated the COVID-19 from different points of view. Those aspects include pathology, sociology perspective, the infection mechanism and prediction [3,4,5,6,7,8].

In the history of mankind, there are many other outbreak and transmission of diseases such as dengue fever, malaria, influenza, pestilence and HIV/AIDS. How to built a proper epidemiological model for these epidemics is a challenging task. Some scientists treat the disease spread as a complex network for forecast and modeling [9, 10]. For the COVID-19, Bastian Prasse et al. [10] designed a network-based model which is built by the cities and traffic flow to describe the epidemic in the Hubei province. At present, the SIS [11, 12], SIR[13] and SEIR [14, 15] models provide another way for the simulation of epidemics. Lots of research works have been reported. It shows that those SIS, SIR and SEIR models can reflect the dynamics of different epidemics well. Meanwhile, these models have been used to model the COVID-19 [16, 17]. For instance, Tang et al. [17] investigated a general SEIR-type epidemiological model where quarantine, isolation and treatment are considered. Moreover, there are also other methods for modeling of the COVID-19 [18, 19]. Wang et al. [19] applied the phase-adjusted estimation for the number of coronavirus disease 2019 cases in Wuhan. Thus in this paper, we try to propose a SEIR model to simulate the process of COVID-19.

Chaos widely exits in nature and man-made systems including those biological systems [20,21,22,23,24]. According to the famous Logistic map, it shows that the natural evolution of the population size could be chaotic. However, it is not a good thing to find chaos in the SEIR model. Unfortunately, chaos in the SIR, SIS and SEIR models has been investigated by many researchers. Generally, the seasonality and stochastic infection are introduced to the system for the nonlinear dynamics. For instance, Kuznetsov and Piccardi [25] investigated the bifurcations of the periodic solutions of SEIR and SIR epidemic models with sinusoidally varying contact rate. Meanwhile, the fractional-order SEIR epidemic model has aroused research interests of scientists. He et al. [26] investigated the epidemic outbreaks using the SIR model, and a hard limited controller is designed for the control of the system. However, on the one hand, those SIR and SEIR models cannot always show the nature of the COVID-19, and we need to modify the system. On the other hand, the nonlinear dynamics of the system should be investigated. Thus, we need to get more information on the dynamics of the epidemic system.

The rest of this paper is organized as follows. In Sect. 2, the modified SEIR model is designed and the descriptions of the system are presented. In Sect. 3, the SEIR model is applied to the COVID-19 data of Hubei province where the PSO algorithm is introduced to estimate the parameters. In Sect. 4, the seasonality and stochastic infection are introduced to the model and the dynamics of the system is investigated. In Sect. 5, the structure, parameters on the dynamics of the system and how to control the epidemic of the system are discussed. Section 6 is the summary of the analysis.

2 SEIR modeling of the COVID-19

The classical SEIR model has four elements which are S (susceptible), E (exposed), I (infectious) and R (recovered). Thus, \(N=S+E+I+R\) means the total number of people. The basic hypothesis of the SEIR model is that all the individuals in the model will have the four roles as time goes on. The SEIR model has some limitations for the real situations, but it provides a basic model for the research of different kinds of epidemic.

Based on the basic SEIR model, we proposed a new model which is denoted by

$$\begin{aligned} \left\{ \begin{array}{l} \dot{S} = - \frac{S}{N}\left( {{\beta _1}{I_1} + {\beta _2}{I_2} + \chi E} \right) + {\rho _1}Q - {\rho _2}S + \alpha R\\ \dot{ E} = \frac{S}{N}\left( {{\beta _1}{I_1} + {\beta _2}{I_2} + \chi E} \right) - {\theta _1}E - {\theta _2}E\\ {\dot{I}}_1 = {\theta _1}E - {\gamma _1}{I_1}\\ \dot{I}_2 = {\theta _2}E - {\gamma _2}{I_2} - \varphi {I_2} + \lambda \left( \varLambda + Q \right) \\ \dot{R} = {\gamma _1}{I_1} + {\gamma _2}{I_2} + \phi H - \alpha R\\ \dot{H} = \varphi {I_2} - \phi H\\ \dot{Q} = \varLambda + {\rho _2}S - \lambda \left( {\varLambda + Q} \right) - {\rho _1}Q \end{array} \right. , \end{aligned}$$
(1)

where S, E, \(I_1\), \(I_2\), R, H and Q are the system variables. The descriptions of those variables are presented in Table 1. The description of the system parameters is illustrated in Table 2, and the relationship between different variables is shown in Fig. 1. In this model, the infectious class is divided into two parts, \(I_1\) and \(I_2\). Meanwhile, we consider the quarantined class and hospitalized class in the model according to the real situation. For example, if one got coronavirus-like symptoms or comes from other place like abroad, he or she needs to be in quarantine for at least 14 days.

Fig. 1
figure 1

Flowchart of the proposed SEIR model for COVID-19

Table 1 Description of the system variables
Table 2 Description of the system parameters

Obviously, as shown in Fig. 1, we consider two main channels in the proposed model. The first one goes to \(S\rightarrow E\rightarrow I_1\rightarrow R\), and the second channel goes to \(S\rightarrow Q\rightarrow I_2\rightarrow H\rightarrow R\). The first case shows the natural process of the epidemic, and it is a typical SEIR model. The second channel considers the control from the government including the quarantine and hospital. As a result, the designed model is an improved version of the SEIR model.

If there is no quarantine (\({\rho _2}=0\)), hospital treatment \(\phi =0\) and the recovered is immune to the virus (\(\alpha =0\)), the model becomes to the classical SEIR model. However, there are always quarantine and hospital treatment. Meanwhile, there is no evidence that the recovered is immune to the COVID-19. Thus, we need to considered these factors in the model. In this paper, we have \(N\ne S+E+I_1+I_2+R+Q+H\) according to Eq. (1) since there is an external input \(\varLambda \). Obviously, N is not a constant and it varies over time when \(\varLambda \ne 0\). Since there are a large population under voluntary home quarantine. Thus, for a chosen place, N is not the total population of that place, but it can be estimated by adding the final number of recoveries and deaths.

3 Estimation of the model parameters

3.1 The PSO algorithm

Particle swarm optimization (PSO) algorithm is a famous population-based stochastic optimization algorithm motivated by intelligent collective behavior, such as the foraging process of bird group [27]. In PSO algorithm, each particle represents a bird, and the algorithm starts with a random initialization of the particle locations. For one iteration, each particle keeps track of its own best position and the population’s best position to update its position and velocity. Considering a one-dimensional optimization problem, the velocity and the position of the particle i is defined by

$$\begin{aligned} \begin{array}{l} {V_i}(t + 1) = \omega (t){V_i}(t) + {c_1}{r_1}[{P_{b,i}}(t) - {X_i}(t)]\\ + {c_2}{r_2}[{P_g}(t) - {X_i}(t)] \end{array}, \end{aligned}$$
(2)

and

$$\begin{aligned} {X}_{i}(t+1)={X}_{i}(t)+{V}_{i}(t+1), \end{aligned}$$
(3)

where \(V_i(t)\) and \(X_i(t)\) are velocity and position of the particle i at the t-th iteration, respectively. \(c_1\) and \(c_2\) are the learning factors. \(r_1\) and \(r_2\) are random numbers between 0 and 1. \(P_{b,i}(t)\) represents the best position of the particle i at the t-th iteration, and \(P_{g}(t)\) represents the population’s best position at the t-th iteration. \(\omega \) is called inertia weight, which is very important for the search process of PSO algorithm. Here, it is defined by [28]

$$\begin{aligned} \omega (t)=(\omega _{\mathrm{max}}-\omega _{\mathrm{min}})e^{-500(t/T)^2}+\omega _{\mathrm{min}}, \end{aligned}$$
(4)

where t and T are the current and maximum iterations of the PSO algorithm, respectively, and \(\omega _{min}\) and \(\omega _{max}\) are the minimal and maximum value of the inertia weight, respectively. Suppose that we meet a minimum optimization problem, the implementation steps of the PSO algorithm are summarized as follows:

  • Step 1: The position of each particle is randomly initialized.

  • Step 2: Calculate the fitness value \(F(X_i(t))\) of the particle i, and find the \(P_{b,i}(t)\) and the \(P_{g}(t)\).

  • Step 3: If \(F(X_i(t)) < F(P_{b,i}(t))\), then replace the \(P_{b,i}(t)\) by the \(X_i(t)\).

  • Step 4: If \(F(X_i(t)) < F(P_{g}(t))\), then replace the \(P_{g}(t)\) by the \(X_i(t)\).

  • Step 5: Calculate the inertia weight by Eq. (4).

  • Step 6: Update velocity and position of the particle i according to Eqs. (2) and (3), respectively.

  • Step 7: Repeat the Steps 3–6 until the termination criterion is satisfied.

3.2 Parameter estimation

In this section, through the actual COVID-19 data from Hubei province, the PSO algorithm is utilized to estimate the parameters of the proposed SEIR model to fit the real situation. The COVID-19 data come from the official website of the Wuhan Municipal Health Commission (http://wjw.wh.gov.cn/), and some actual data are listed in Table 3.

In the face of the pressure of epidemic prevention and control, Wuhan government announced to seal off the city from all outside contact on January 23rd, 2020. Then, other cities in Hubei province also took the “closure city” measure. The COVID-19 epidemic situation of Hubei is relatively stable after January 23rd, 2020, so we chose to study the data between January 24th and April 12th.

Table 3 Actual COVID-19 data from Hubei (January 24th to February 8th)

The initial values setting of SEIR model is presented in Table 4, where N is the total population of Hubei affected by the COVID-19 epidemic in January 24th, 2020, and E is calculated based on the number of confirmed patients. \(I_1\) is an estimated value based on \(I_2\), and the other initial values are originated from the actual data.

Table 4 Initial values of the SEIR model

The system parameters of SEIR model are calculated by the actual data, as shown in Table 5. However, there is no accurate statistics of the rate of infectious to hospitalized \(\varphi \) and the recovered rate of quarantined infected individuals \(\phi \). Here, the two parameters are estimated by the PSO algorithm with the actual data of R and H. The settings of PSO algorithm are set as: population of particle swarm \(NP=40\), learning factors \(c_1=c_2=2\), maximal iteration \(T=100\) and the search spaces \(\varphi , \phi \in (0, 0.1]\).

Table 5 System parameters of SEIR model

The COVID-19 epidemic situation in Hubei is divided into two stages: the outbreak stage (the first 19 days) and the inhibition stage (the 20th day to the end).

In the outbreak stage, according to the actual data of R and H, the \(\varphi \) and the \(\phi \) are estimated to \(\varphi =0.2910\), \(\phi =0.0107\), respectively. The error convergence curve of PSO is shown in Fig. 2. After the outbreak stage, due to the continuous assistance from other provinces and other countries, the epidemic in Hubei began to enter the inhibition stage. In this stage, the error convergence curve of PSO is given in Fig. 3, and the estimated \(\varphi \) and \(\phi \) changed to \(\varphi =0.0973, \phi =0.0416\), respectively.

Fig. 2
figure 2

The error convergence curve of PSO algorithm in the outbreak stage

The estimated and actual trajectories in the two stages are shown in Fig. 4. In the first stage, although there are some errors between the estimated number and the actual number, it shows that the estimated values match well with the real situation. However, the accuracy is not satisfying in the second stage which shows that the real data are smaller than the estimated values, but the trend is basically the same.

There are two reasons for the deviation. One is that only two parameters, namely the rate of infectious to hospitalized \(\varphi \) and the recovered rate of quarantined infected individuals \(\phi \), are estimated, while the rest of the parameters are set as a matter of experience. Moreover, the control measures for containing the outbreak are more and more powerful; thus, the system parameter should be time varying variables. For instance, compared with the outbreak stage, the hospitalization rate decreased a lot, and the cure rate increased nearly four times, which means that the number of confirmed infected cases is declining a lot and the number of patients recovering is increasing rapidly.

Fig. 3
figure 3

The error convergence curve of PSO algorithm in the inhibition stage

Fig. 4
figure 4

Actual and estimated trajectories for the epidemic situation in Hubei province

4 Nonlinear dynamics of the model

4.1 SEIR model with seasonality and stochastic infection

The 0–1 test algorithm is employed to verify the existence of chaos in the model. If a set of discrete time series \(x(n) (n = 1, 2, 3, \ldots )\) represents a one-dimensional observable data set obtained from the modified SEIR system, then the following two real-valued sequences are defined as [30]

$$\begin{aligned} \left\{ \begin{array}{l} p\left( n \right) = \sum \nolimits _{j = 1}^n {x \left( j \right) \cos \left( {\theta \left( j \right) } \right) } \\ s\left( n \right) = \sum \nolimits _{j = 1}^n {x \left( j \right) \sin \left( {\theta \left( j \right) } \right) } \end{array} \right. , \end{aligned}$$
(5)

where \(\theta \left( j \right) = j\eta + \sum \limits _{i = 1}^j {x \left( i \right) } \), and \(\eta \in \left[ {\frac{\pi }{5},\frac{{4\pi }}{5}} \right] \). By plotting the trajectories in the (ps)-plane, the state of the system can be identified. Usually, the bounded trajectories in the (ps)-plane imply the dynamics of the time series is regular, while Brownian-like (unbounded) trajectories imply chaos.

The seasonality is widely found in the epidemic models [26, 29], and it can make the system more complex. Indeed, there is no report showing that the effect of seasonality for COVID-19 spread since this epidemic outbreaks only about half year until now. But we try to introduce the seasonality to the system and analyze chaos in the system from an academic point of view. Meanwhile, there are individual differences and many unpredictable factors in the epidemic infection. Thus, the noise is an important factor considered in our analysis. Here, three cases are analyzed to show how the system parameter \(\alpha \), seasonality and stochastic infection affect the dynamics of the system.

Case 1: The parameter \(\beta _1\) contains seasonality and stochastic infection, and the three contact and infection rate parameters are defined as

$$\begin{aligned} \left\{ \begin{array}{l} {\beta _2} = 30.03,\chi = 30.40\\ {\beta _1}\left( t \right) = {\beta _0}\left( {1 + {\varepsilon _1}\sin \left( {2\pi t} \right) + {\varepsilon _2}\xi \left( t \right) } \right) \end{array} \right. , \end{aligned}$$
(6)

where \(\beta _0=2\times \beta _1=60\), \(\varepsilon _1\) and \(\varepsilon _2\) are degree of the seasonality and stochastic infection, respectively. \(\left\langle \xi \left( t \right) \right\rangle \) is the white Gaussian independent noises, and it has the properties of \(\left\langle \xi \left( t \right) \right\rangle =0\) and \(\left\langle {\xi \left( t \right) ,\xi \left( \tau \right) } \right\rangle = \delta \left( {t - \tau } \right) \).

The analysis results of the system with different parameters are shown in Fig. 5. In Fig. 5a, b, we set \(\varepsilon _1=0\), \(\varepsilon _2=0\) and \(\alpha =0.08\). It shows that the system is convergent to a limited region. Thus, the system is not chaotic without the seasonality and stochastic infection. When \(\varepsilon _1=0.8\) and \(\varepsilon _2=0\), the system has seasonality but no stochastic infection. It shows that the system now is chaotic according to the \(p-s\) plot. As shown in Fig. 5c that the attractor looks like a limited circle. However, there are many lines in the “circle” as it is illustrated in Fig. 5d. If \(\varepsilon _1=0.8\) and \(\varepsilon _2=0.2\), there are both seasonality and stochastic infection in the system. At this time, the complex dynamics is observed in the system, as shown in Fig. 5f–h.

Case 2: The parameter \(\beta _2\) contains seasonality and stochastic infection, while the other two infection rate parameters are constants. Thus, the parameters are defined as

$$\begin{aligned} \left\{ \begin{array}{l} {\beta _1} = 30,\chi = 30.40\\ {\beta _2}\left( t \right) = {\beta _0}\left( {1 + {\varepsilon _1}\sin \left( {2\pi t} \right) + {\varepsilon _2}\xi \left( t \right) } \right) \end{array} \right. , \end{aligned}$$
(7)

where \(\beta _0=2\times \beta _2=60\), \(\varepsilon _1\) and \(\varepsilon _2\) are the degree of the seasonality and stochastic infection, respectively. Firstly, we let \(\varepsilon _1=0.8\) and \(\varepsilon _2=0\). If \(\alpha =0.02\), \(\alpha =0.03\), \(\alpha =0.04747\) and \(\alpha =0.08\), different kinds of chaotic attractors are shown in Fig. 6a–d, respectively. Meanwhile, we let \(\varepsilon _1=0.8\) and \(\varepsilon _2=0.2\), the chaotic attractors with different values of \(\alpha \) are shown in Fig. 6e–h. The \(p-s\) plots of attractors of Fig. 6b–d are shown in Fig. 6i–k, respectively. It verifies the existence of chaos in the model.

Case 3: The parameter \(\chi _1\) contains seasonality and stochastic infection, and \(\beta _1\) and \(\beta _2\) are contacts. As a results, the parameters in this case are given by

$$\begin{aligned} \left\{ \begin{array}{l} {\beta _1} = 30,{\beta _2}\left( t \right) = 30\\ \chi = {\chi _0}\left( {1 + {\varepsilon _1}\sin \left( {2\pi t} \right) + {\varepsilon _2}\xi \left( t \right) } \right) \end{array} \right. \end{aligned}$$
(8)

where \(\beta _0=2\chi =60.8\), \(\varepsilon _1\) and \(\varepsilon _2\) are the degree of the seasonality and stochastic infection, respectively. Let \(\varepsilon _1=0.8\), \(\varepsilon _2=0\) and \(\alpha =0.0133\), the phase diagram is shown in Fig. 7a. It shows in Fig. 7b that the attractor is chaotic. If we set \(\varepsilon _2=0.2\), the phase diagram is illustrated in Fig. 7c, where a much wider range in the phase space when the system has stochastic infection. When \(\varepsilon _1=0.8\), \(\varepsilon _2=0\) and \(\alpha =0.08\), the phase diagram is shown in Fig. 7d, while the time series are shown in Fig. 7e.

The proposed system is an improved SEIR system with quarantined class and hospitalized class. As with other SIR and SEIR models, this model can also generate chaos with given parameters. And the existence chaos is verified by the 0–1 test method.

In this section, we consider the dynamics of the proposed SEIR model. In Refs. [26, 29], the parameters of the SEIR model are set where the infection rate \(\beta \) is set as quite large values. For instance, in Ref. [29], \(\beta =108\) for the proposed SEIR Dengue fever model. To investigate chaos in the proposed model, the parameters are set as \(\beta _1=30\), \(\beta _2=30.0300\), \(\chi =30.40\), \(\rho _1=1/14\), \(\rho _2=0.002\), \(\theta _1=20.054\), \(\theta _2=20.12\), \(\varphi =0.00009\), \(\phi =0.8\), \(\lambda =0.4\) and \(N=10^6\). The initial conditions of the model are given by \([S, E, I_1, I_2, R, H, Q]=[94{,}076, 4007, 262, 524,31, 100, 1000]\).

Fig. 5
figure 5

Dynamics analysis results of case 1 with different parameters. Phase diagram a and time series b of the system with \(\varepsilon _1=0\), \(\varepsilon _2=0\) and \(\alpha =0.08\); phase diagram c, its partial enlarged drawing d and \(p-s\) plot e with \(\varepsilon _1=0.8\), \(\varepsilon _2=0\) and \(\alpha =0.08\); phase diagram f, its partial enlarged drawing g and \(p-s\) plot h with \(\varepsilon _1=0.8\), \(\varepsilon _2=0.2\) and \(\alpha =0.08\)

Fig. 6
figure 6

Dynamics analysis results of case 2. Phase diagrams with \(\varepsilon _1=0.8\), \(\varepsilon _2=0\) and \(\alpha =0.02\) a, \(\alpha =0.03\) b, \(\alpha =0.04747\) c and \(\alpha =0.08\) d; phase diagrams with \(\varepsilon _1=0.8\), \(\varepsilon _2=0.2\) and \(\alpha =0.02\) e, \(\alpha =0.03\) f, \(\alpha =0.04747\) g and \(\alpha =0.08\) h; \(p-s\) plots of \(\varepsilon _1=0.8\), \(\varepsilon _2=0\) and \(\alpha =0.03\) i, \(\alpha =0.04747\) j and \(\alpha =0.08\) k

Fig. 7
figure 7

Dynamics analysis results of case 3. Phase diagram a and \(p-s\) plot b with \(\varepsilon _1=0.8\), \(\varepsilon _2=0\) and \(\alpha =0.0133\); phase diagram c with \(\varepsilon _1=0.8\), \(\varepsilon _2=0.2\) and \(\alpha =0.0133\); phase diagram d and time series e with \(\varepsilon _1=0.8\), \(\varepsilon _2=0.2\) and \(\alpha =0.08\)

4.2 Bifurcation analysis of case 2

To further analyze dynamics of the system, we choose case 2 as an example to show the bifurcations of the proposed system. The parameters are set as \(\beta _1=30\), \(\beta _2=30.0300\), \(\chi =30.40\), \(\rho _1=1/14\), \(\rho _2=0.002\), \(\theta _1=20.054\), \(\theta _2=20.12\), \(\varphi =0.00009\), \(\phi =0.8\), \(\lambda =0.4\) and \(N=10^6\). The initial conditions of the model are given by \([S, E, I_1, I_2, R, H, Q]\)=[94076, 4007, 262, 524,31, 100, 1000].

Firstly, let \(\varepsilon _1=0.8\), \(\varepsilon _2=0\), and the parameter \(\alpha \) varies from 0.02 to 0.08 with step size of 0.00024. The bifurcation diagram is shown in Fig. 8a. Meanwhile, if \(\varepsilon _2=0.2\), the corresponding bifurcation diagram is shown in Fig. 8b. Obviously, the bifurcation diagram of Fig. 8a has no noise, while that in Fig. 8b does. It shows that the stochastic infection makes the system fluctuate more volatile.

Secondly, let \(\alpha =0.08\), \(\varepsilon _2=0\), and the parameter \(\varepsilon _1=0.8\) varies from 0.02 to 0.08 with step size of 0.004. The bifurcation diagrams with \(\varepsilon _1\) are shown in Fig. 9. It shows that when there exists stochastic infection, the bifurcation diagram shows more complex behaviors of the system.

As shown in Figs. 8 and 9, it shows that the system has rich dynamics with both parameters \(\alpha \) and \(\varepsilon _1\). When the system has stochastic infection, the system will become more complex. We hold the opinion that chaos is also the nature of the system, and the seasonality and the temporary immunity rate can change the dynamics of the system.

Fig. 8
figure 8

Bifurcation diagrams of the system with the variation of parameter \(\alpha \) a \(\varepsilon _1=0.8\), \(\varepsilon _2=0\); b \(\varepsilon _1=0.8\), \(\varepsilon _2=0.2\)

Fig. 9
figure 9

Bifurcation diagrams of the system with the variation of parameter \(\varepsilon _1\) a \(\alpha =0.08\), \(\varepsilon _2=0\); b \(\alpha =0.8\), \(\varepsilon _2=0.2\)

4.3 Complexity of the case 2

In this section, the spectral entropy (SE) algorithm [31] is employed to analyze complexity of the proposed SEIR system, and steps are presented as follows.

For a given time series {x(n), n=0, 1, 2, \(\cdots \), L-1} with a length of L, let \(x(n)=x(n)-\overline{x}\), where \(\overline{x}\) is the mean value of time series. Its corresponding discrete Fourier transform (DFT) is defined by

$$\begin{aligned} X(k)=\sum _{n=0}^{L-1}x(n)e^{-j2{\pi }nk/L} , \end{aligned}$$
(9)

where \(k=0, 1, \cdots , L-1\) and j is the imaginary unit. If the power of a discrete power spectrum with the \(k_{th}\) frequency is \(|X(k)|^{2}\), then the “probability” of this frequency is defined as

$$\begin{aligned} P_{k}=\frac{|X(k)|^{2}}{\sum _{k=0}^{L/2-1}|X(k)|^{2}} . \end{aligned}$$
(10)

When the DFT is employed, the summation runs from \(k=0\) to \(k=N/2-1\). The normalization entropy is denoted by [31]

$$\begin{aligned} SE\left( {{x^L}} \right) = \frac{1}{{\ln \left( {N/2} \right) }}\sum \limits _{k = 0}^{N/2 - 1} {{P_k}\ln \left( {{P_k}} \right) } , \end{aligned}$$
(11)

where \(\mathrm{ln}(N/2)\) is the entropy of a completely random signal. Obviously, the more balanced the probability distribution is, the higher complexity (the larger entropy) the time series is. The larger measuring value means higher complexity, and vice versa.

Based on the above complexity algorithms, multiscale complexity algorithm is designed. For a one-dimensional discrete time series \(\{x(n): n=0, 1,\ldots , N-1\}\), the consecutive coarse-grained time series are constructed by [32]

$$\begin{aligned} {y^\tau }(j) = \frac{1}{\tau }\sum \limits _{(j - 1)\tau }^{j\tau - 1} {x(j)} , \end{aligned}$$
(12)

where \(1\le j \le [N/\tau ]\), \(\tau \) is the scale factor which represents the length of the non-overlapping window, and \([\cdot ]\) denotes the floor function. Obviously, when \(\tau =1\), the sequence \(y^{\tau }\) is the original sequence \(\{x(n),n=0,2,3,\cdots ,L-1\}\). Thus, the complexity of \(y^1\) is the complexity of the original sequence. In this paper, the multiscale complexity is defined as [31]

$$\begin{aligned} \mathrm{{MSE}} = \frac{1}{{{\tau _{\max }}}}\sum \limits _{\tau = 1}^{{\tau _{\max }}} {\mathrm{{SE}}({y^\tau })} . \end{aligned}$$
(13)

In this paper, we set \(\tau _{max}=20\).

Fix \(\varepsilon _1=0.8\) and vary the parameter \(\alpha \) from 0.02 to 0.08 with step size of 0.00024. MSE complexity analysis results are shown in Fig. 10a, b, where Fig. 10a for \(\varepsilon _2=0\) and Fig. 10b for \(\varepsilon _2=0.2\). Fix \(\alpha =0.08\) and the parameter \(\varepsilon _1\) varies from 0.1 to 1 with step size of 0.0036. The complexity analysis results with \(\varepsilon _1\) are shown in Fig. 10c, d. Here, \(\varepsilon _2=0\) is employed in Fig. 10c, while \(\varepsilon _2=0.2\) is used in Fig. 10d. The complexity analysis results with parameters show that the stochastic infection does not affect the complexity of the system. The system has higher complexity when \(\alpha \) takes values between 0.03 and 0.06, and \(\varepsilon _1\) takes those values which are larger than 0.6.

Fix \(\varepsilon _2=0\), vary \(\alpha \) from 0.02 to 0.08 with step size of 0.0006 and \(\varepsilon _1\) varies from 0.1 to 1 with step size of 0.009. The complexity analysis result in the \(\alpha -\varepsilon _1\) plane is shown in Fig. 11. Obviously, the higher complexity region is located in the right side of the parameter plane, where \(\alpha \in [0.4,1]\) and \(\varepsilon _1 \in [0.025, 0.055]\).

Fig. 10
figure 10

MSE analysis results of the system with the variation of parameters \(\alpha \) and \(\varepsilon _1\) a \(\varepsilon _1=0.8\), \(\varepsilon _2=0\) and \(\alpha \) varying; b \(\varepsilon _1=0.8\), \(\varepsilon _2=0.2\) and \(\alpha \) varying; c \(\alpha =0.08\), \(\varepsilon _2=0\) and \(\varepsilon _1\) varying; d \(\alpha =0.08\), \(\varepsilon _2=0.2\) and \(\varepsilon _1\) varying

Fig. 11
figure 11

MSE analysis results of the system with the variation of both parameters \(\alpha \) and \(\varepsilon _1\)

Since the complexity measure results are obtained based on the generated time series, MSE provides an effective way for the dynamics analysis of the system. When there is higher complexity, the behavior of the model is more complex, vice versa. For a epidemic system, high complexity means outbreak. Thus, we can use the complexity measure algorithm to monitor the dynamics of the proposed SEIR system.

5 Discussion

In this paper, the parameters of the system are mainly chosen by two means including the references and the PSO algorithm. Usually, the parameters can be set according to the existing work. For instance, the contact and infection rate parameters are defined according to Refs. [26, 29]. Also, there are some other references which show some parameters of the system. Moreover, since there is actual COVID-19 data from Hubei province, we use the PSO algorithm to estimate the parameters of the system. As shown above, the system has rich dynamics with the given parameters, especially when the parameters \(\beta _1\), \(\beta _2\) and \(\chi \) have seasonality and stochastic infection. The existence of chaos is verified by the 0–1 test, and complexity of the generated time series is measured. Here, different sets of parameters are summarized in Table 6. It should noted that, when the parameters are set as the set A, they seem “large.” However, those parameters should be multiplied by S/N. Thus, they are reasonable for the proposed model. According to our analysis, it shows that chaos are found in the system with those “large parameters.” In fact, we want to explore the nonlinear dynamics of the proposed system and to study how does chaos occur in the system.

Table 6 Values of the parameters for different cases

Figure 12 shows the evolution of the system with different parameters. The parameters used the Set D, and different colors lines in the figure including magenta color lines (M), blue color lines (B), red color lines (R) and green color lines (G) are obtained using the following parameters:

  1. M

    \(\lambda =0.0004\), \(\varphi =0.009\), \(\alpha =0.0\),

  2. B

    \(\lambda =0.04\), \(\varphi =0.009\), \(\alpha =0.0\),

  3. R

    \(\lambda =0.0004\), \(\varphi =0.8\), \(\alpha =0.0\),

  4. G

    \(\lambda =0.04\), \(\varphi =0.8\), \(\alpha =0.5\).

It shows that the number of infected class (\(I_1\), \(I_2\)) and hospitalized class (H) is different with different parameters. When \(\varphi =0.0009\), there is a peak value for \(I_2\). It means that if the hospital reception capacity is limited, the infected class (\(I_2\)) will increase dramatically. However, when \(\varphi =0.8\), the infected class (\(I_2\)) keeps a relative low level; thus, the infection can be controlled well. As shown in Fig. 12, when \(\alpha =0.5\), it is quite difficulty for the system to become convergent. The reason is obvious because those recovered can be infected again, and a closed loop system is observed. Because no reports show that the recovered class is immune to the COVID-19, we need to be aware of those recovered to be infected again. Here, the evolution of the system with parameters of set E is shown in Fig. 13, which shows how all the classes of the system affect the dynamics. Generally, all the classes except the recovered class R will converge to zero. However, Fig. 13 is simulated with external input \(\varLambda =100\) and \(\alpha =0.5\). Since there is no evidence that the recovered class is immune to the virus, this makes the system hard to converge. Thus, it shows in Fig. 13 that these variables converge to zero slowly.

Fig. 12
figure 12

Evolution of the system with different parameters. a \(I_1\) with \(\varLambda =10\); b \(I_2\) with \(\varLambda =10\); c H with \(\varLambda =10\); d \(I_1\) with \(\varLambda =100\); e \(I_2\) with \(\varLambda =100\); f H with \(\varLambda =100\)

Fig. 13
figure 13

Evolution of the system with parameters of set E

In the early stage of the COVID-19 epidemic, the epidemic situation in Hubei province presents an uncontrollable trend. However, due to the low population contact rate, high hospitalization rate and high cure rate, the epidemic was quickly controlled after 20 days. Therefore, the government’s attention, people’s self-awareness and sufficient medical resources are the key to eliminate the threat of COVID-19.

To get better estimation results, we need to built a proper model and also need to set proper parameters for the systems. To the knowledge of authors, the parameters of the system change as time since the control from the government is different along with time. Thus, we can also treat the parameters as functions of time. If the values of \(\beta _1\), \(\beta _2\) and \(\chi \) are large, the system can even become chaotic. When \(\rho _2\) takes larger values, it means that there are more people which have like COVID-19-symptoms. In fact, the government should take stronger and harsher measures to increase isolation, especially there are many potential infections. Meanwhile, if the quarantine is done well, the values of \(\beta _1\), \(\beta _2\) and \(\chi \) will be also much smaller; thus, it is helpful to control the spread of the epidemic disease.

6 Conclusion

In this paper, a SEIR model is proposed for the COVID-19. Parameters of the system are estimated by the PSO algorithm, and dynamics of the system is investigated. Finally, how the parameters affect the dynamics of the system is discussed and the control strategies are presented. The conclusions of this paper are given as follows.

  1. (1)

    The proposed model has considered the quarantine and treatment, so it is more suitable for the dynamics of the epidemic of COVID-19.

  2. (2)

    The PSO algorithm provides a good way for parameter estimation of the SEIR model. And according to the application to the data of Hubei province, the accuracy is acceptable. The main trends of the epidemic evolution are illustrated.

  3. (3)

    Nonlinear dynamics of the system is investigated by means of bifurcation diagram, MSE algorithm and 0–1 test algorithm. It shows that, for the given parameters, if there exists seasonality and stochastic infection, the system can generate chaos.

  4. (4)

    Some control suggestions are suggested based on the proposed model. Meanwhile, we found that the dynamics of the system is different with different sets of parameters.