key: cord-1009047-7lz06a7a authors: Abbasi, Zohreh; Zamani, Iman; Mehra, Amir Hossein Amiri; Shafieirad, Mohsen; Ibeas, Asier title: Optimal Control Design of Impulsive SQEIAR Epidemic Models with Application to COVID-19 date: 2020-06-30 journal: Chaos Solitons Fractals DOI: 10.1016/j.chaos.2020.110054 sha: 53e576ec6df4ac294d29445e1ae2a3de21a1f31f doc_id: 1009047 cord_uid: 7lz06a7a quarantined individuals (Q), called SQEIAR model. The dynamic of SQEIAR model is defined by six ordinary differential equations that describe the numbers of Susceptible, Quarantined, Exposed, Infected, Asymptomatic, and Recovered individuals. The goal of this paper is to reduce the size of susceptible, infected, exposed and asymptomatic groups to consequently eradicate the infection by using two actions: the quarantine and the treatment of infected people. To reach this purpose, optimal control theory is presented to control the epidemic model over free terminal optimal time control with an optimal cost. Pontryagin's maximum principle is used to characterize the optimal controls and the optimal final time. Also, an impulsive epidemic model of SQEIAR is considered to deal with the potential suddenly increased in population caused by immigration or travel. Since this model is suitable to describe the COVID-19 pandemic, especial attention is devoted to this case. Thus, numerical simulations are given to prove the accuracy of the theoretical claims and applied to the particular data of this infection. Moreover, numerical computations of the COVID-19 are compared with diseases like Ebola and Influenza. In addition, the controller is evaluated with system parameters identified by using actual data of China. Finally, the controller tuned with the estimated parameters of the Chinese data is applied to the actual data of Spain to compare the quarantine and treatment policies in both countries. model, in addition to Susceptible, Exposed, Infected, Asymptomatic, and Recovered individuals (SEIAR), we added a new group of people called "people in quarantine". In addition to continuous-time systems, system dynamics can also be described by discrete-time SEIR epidemic models [4, 5] . To furthermore study about discrete-time SEIR epidemic models with time delay, readers are referred to [6] . It is obvious that transportation among regions has also a strong impact on the dynamic evolution of a disease which can spread the infection on a large scale. Thus, [7] considers an SEIR epidemic model and investigated the impact of transport-related infection between two cities. Generally, the number of the population may grow because of travel or immigration during a period. Therefore, impulsive change of population should be considered, which is generates an impulsive epidemic model. The phenomena of 'impulsive epidemic model' has important biological meaning in epidemic models. Impulse is included in epidemic disease models, which greatly improves biological background [8] . There are some studies examining this subject including [9] where a system of impulsive functional differential equations is studied by using new computational techniques for impulsive differential equations and [10] , that investigated the stability of impulsive delayed nonlinear hybrid differential systems. Accordingly, in this paper, we consider a number of susceptible, infected, asymptomatic and exposed individuals as an impulsive additive population to the community on a daily basis, which describe the fact that the coronavirus is spread by the travel of people unaware of the disease that is added to the population impulsively. Among these models which have used impulsive strategy, impulsive control has attracted many interests, which in this article can be seen as an example of this impulsive control [11] [12] [13] [14] . Optimal control methods are used to control numerous kinds of models especially dynamic epidemic models [15] [16] [17] [18] [19] [20] . The adaptability and relative simplicity of optimal control methods can lead to the improvement of the strategies to control the different kinds of diseases [21, 22] . Human mobility is a critical issue in epidemic models. Thus, for studying the transmission of infectious diseases and improving epidemic control we also can use the large-scale systems. We refer to [23] that deals with the application of optimal control in large-scale systems that can also be used in epidemic systems. Therefore, in this paper, the optimal control strategy is applied to the SQEIAR model to decrease the number of susceptible, infected, exposed and asymptomatic individuals in the optimal time. It has been proved that as a result of this that the number of people in quarantine and the total population is increased. China, where the virus first began to spread in late 2019, has seen an obvious reduction in its rate of new cases and people known to be infected have since recovered, this is only for strict quarantine and treatment of infected people. Also, Spain is another country hit by COVID-19. Therefore, in this study, the accuracy of the controller designed on the estimated parameters using real data of China has also been examined and the process of controlling COVID-19 in both countries will be investigated. Accordingly, in this paper, it was decided to compare the results of the study with the actual data to evaluate the performance of this controller. This paper is divided into 7 sections: In the first section, we introduce and explain the SEIAR model in detail, after that the optimal control strategy is applied to the SQEIAR dynamic model in section 2. Also, an impulsive SQEIAR epidemic model is introduced in section 3. In section 4 the proposed controller applied to impulsive SQEIAR epidemic model. In the following and in the fifth section, the results of simulations under different cases are presented. The comparison of the results of this study with other diseases and actual data is mentioned in section 6. and finally, in section 7 the article ends with conclusions. In this section, we explain the SEIAR epidemic model taken from [3] but we skipped births and natural mortality (because of the low rate in [3] ). This assumption is feasible since the total population does not change significantly during the spreading time and we aim at controlling the disease as quickly as possible. The nonlinear SEIAR epidemiological model includes five non-negative state variables ( ) ( ) ( ) ( ) and ( ) that are defined as Susceptible, Exposed, Infected, Asymptomatic, and Recovered people, respectively. Here, ( ) represents the number of individuals who are susceptible to the infection (i.e. they are not infected yet). When a susceptible individual gets infected (i.e. becomes exposed to the infection, they move to the exposed people group ( ( )) that denotes the number of individuals who are exposed to infection (they are infected but they cannot transmit the virus). Finally, they reach a level that can transmit the disease at the rate of but a fraction of them have symptoms and the other fraction does not have any visible symptoms. We call them infected and asymptomatic and they are denoted by ( ) and ( ), respectively. The fraction of exposed people moves to the infected people group and can transmit the infection to the others and the fraction ( ) of them goes to the asymptomatic people group who are infected with no symptoms of infection ( ( )) The fraction of infected people become recovered at the rate of and the remaining of them (the fraction ( )) will die because of the infection. Therefore, ( ) denotes the recovered people from the virus, and finally, ( ) is the total population size. Figure 1 shows a flow diagram of SEIAR dynamic model. The dynamic model is mathematically described as: ). The state variables and parameters are positive values. For further study, view [3, 24] . Since the vaccines that we have against the virus do not work and recovery depends on the strength of the immune system, many of those who have died were already in poor health. So, at the moment, the best way to prevent the spread of the virus is to quarantine susceptible people against the infection. Therefore, in this section, we want to use optimal control theory to eradicate the epidemic within the shortest pre-defined period of time (for example 10 days) by quarantining susceptible people and by applying antiviral therapies to infected people. A number of susceptible people must become quarantined at the rate of ( ), that means they move to a group called quarantined people, described by ( ). After eradication of the disease the total size of people almost includes the quarantined and recovered people ( ( ) ( ) ( )) because a percentage of infected people will die because of infection and not all of them recover. Figure 2 shows the flow diagram of SQEIAR dynamic model in the presence of the controller (i.e. the addition of the extra state In optimal control theory, the main objective is the minimization of the number of the susceptible, infected, exposed and asymptomatic population while minimizing the cost of applying the controls ( ) ( ( ) , treatment), and controls ( ) ( ( ) quarantine) in an optimal time interval. Therefore, the problem is to minimize the cost function with a free terminal optimal time control: , and are the gains of the infected, asymptomatic, exposed, and susceptible individuals, respectively. Also, and are the gains of controllers with final fixed pre-defined time . ( ) is a positive increasing function such that ( ) . In other words, we want to reach the optimal controls ( ( ) ( )) in an optimal terminal time ( ) such that ( ( ) ) * ( ( ) ) ( ) + and ( ( ) ) * ( ( ) ) ( ) + The set of admissible controls defined by and as * ( ) ( ) is measurable, ( ) , -+ and similarly * ( ) ( ) is measurable, ( ) , -+. The necessary conditions for optimality are expressed by: Here, the gradient . / is the derivative of ( ) with respect to and is final time Since ( ) is constant value (The final value of all states is known) then and is Hamiltonian, given as: . Therefore, in this study the Hamiltonian yields as: To calculate the necessary conditions, we use Pontryagin's maximum principle as follows: Theorem. Given optimal controls ( ( ) ( )) and solutions ( ) ( ) ( ) ( ) ( ) and ( ) of the corresponding system, there exists adjoint variables ( ) ( ) ( ) ( ) ( ) and ( ) that satisfy where, ( ) . By using the optimality conditions, we can solve the optimal controls as ( ) and ( ) . Therefore: and we can calculate the optimal final time ( ) by: therefore, by applying using the characterization of the optimal control, the following optimality system to optimal control is obtained as: The adjoint equation are also obtained as: (because of the positivity of parameters and states), therefore, ( ) changes are subtractive. Since ( ) then, ( ) converges asymptotically to zero in the finite time. By zeroing ( ) it can be concluded that ( ) ( ) and Eq. ( ) turns into ̇( ) ( ) where and ( ) , thereupon, ( ) converges exponentially to zero. And so on, ( ) ( ) ( , ( ) ) then it will become zero over time. According to the zeroing of ( ) and ( ) the Eq.( ) rewrite as ( ) ( ( )) ( ) in which ( ) therefore ( ) . Also, the change of ( ) is also zero and remain at its maximum value as a result of zeroing ( ). ( ) converges to its maximum value as well indirectly because of zeroing the infected and asymptomatic people. Consequently, the control objective is attained. To control the pandemic diseases, disease time control has more priority and we should be able to drive the disease model to the disease-free equilibrium point in the shortest possible time. Our purpose is to minimize the number of susceptible, exposed, infected and asymptomatic people in the optimal time. Therefore, we considered the cost function with a free terminal optimal time control. By minimizing the cost function, the rates (quarantine and treatment rates) computed that give us input optimal controls, that is, if we quarantine the people at the rate ( ) and treat them at the rate ( ). Then, we can eradicate the disease in the shortest possible time. In this section, an impulsive SEIAR epidemic model is introduced due to sudden change that may occur for any reason, including travel and immigration for the whole population of the study area. Figure 3 displays the diagram of impulsive SEIAR dynamic model. The dynamic of SEIAR model changes as follows: where are integer numbers in which and ( ) which indicates the rate of new people being impulsively added to the population. Travel or immigration is the reason for this sudden change in population to groups ( ) that is modeled as impulsive action in the model system. These individuals are added to the groups of the population once a day. In the real world, the people who are added include susceptible, infected, exposed and Λ ( ) ( ) ( ) asymptomatic people. As a result, this population affects most of the groups and they add a population to each of these groups on a daily basis. The controller must also be able to counteract the effects of this sudden and daily increase in this population. In this section, the controller design equations for the new model are modified. Also, Figure 4 shows the applied controller on impulsive SQEIAR epidemic model. In this way, Eq. ( ) is changed as follows: Similarly to the previous section, the problem is to minimize the cost function that is written as Eq.3. So, the optimal controls are written as: therefore, the adjoint equation are also obtained as: ⌋ ( ) then, the change of ( ) is also decreasing and converges to zero. Proof of Remark 4: fact that according to the positivity of parameters and states, is always true. (because is time) then, the change of ( ) is decreasing and converges to zero ( ) . Eq. ( ) can be written as: In the worst case ( ( ) for all ) then ∑ ( ) and the Eq. ( ) rewrite as: Since the dynamic is in continuous time, then the number of parts of a day is a large number then , that is always true. As a result, the Eq. ( ) exist in whole period then it can be concluded that the change of ( ) is also decreasing and converges to zero. We need to examine the validity of the following equation: . Therefore, , which is never true because of all three parameters are positive. b) If ( ) then ∑ ( ) . Therefore, , thereupon and since and is positive, as a result, is never true. From (a) and (b), Eq. ( ) is not true. So, it can be concluded, when Eq. ( ) is not true then Eq. ( ) is definitely and always true. As a result of this, the change of ( ) is also decreasing and converges to zero ( ( ) ) Since, we proved the number of susceptible and exposed coverage to zero, therefore, the dynamics of the asymptomatic (Eq ( )) changes as follows: ⌋ ( ), therefore, ∑ ( ) and the change of ( ) is also decreasing and converges to zero ( ( ) ) Remark 7: Since ( ) and ( ) converged to zero then it is possible to deduce Eq. ( ) reformed as: If we can prove ( ( )) ⌊ ⌊ ⌋ ⌋ ( ) then, the change of ( ) is decreasing and converges to zero. In similar way for susceptible people: Proof of Remark 7: 1. According to positivity of parameters, therefore, If then ( ) . Therefore, this equation is always true. 2. If then ( ) ( ). Since ( ) is the control input and ( ( ) ) then ( ) So in the worst case ( ( ) ) we can write , therefore, this equation is always true. We proved the number of infected ( ), susceptible ( ), exposed ( ) converged to zero then the Eqs. ( ) and ( ) reformed as ̇( ) ̇( ) , it is noticeable that when the change of them is zero, then they remain on their maximum value. After investigating the effect of the proposed controller on SQEIAR and impulsive SQEIAR model, we should simulate our result. Therefore, we outlined the results of our work in the next section as simulation result. In this section, a numerical result is given to corroborate the theoretical results presented in the two previous sections. Section 5.A illustrates the result of optimal control applied on the SQEIAR dynamic model while Section 5.B investigates the impact of the controller on sudden population change on this dynamic and presents the results. The initial parameter values of the SQEIAR epidemic model is shown in Table 1 and the model is applied to the case of SARS-Cov-2. Also, the values of the parameters in our epidemic model based on experimental data are from [25] and [26] . Some values have changed based on the specific case of COVID-19 according to [2] . The Figures below show the difference between the number of people from all of the groups in the both cases of absence and presence of the controller over the period shown. The plot of people without any control of them is illustrated in red, while the plot of people with control are shown in blue. Figure 5 compares the number of asymptomatic people without any control applied and the number of them with control (including quarantining the susceptible people and antiviral treatment of infected people). It is clear that the number of asymptomatic people decreased rapidly to zero (in approximately 20 day). Also, the peak difference between the number of people when the infection is uncontrolled by the time, we applied the controller on the dynamics is almost 1400. This indicates that the controller has been able to reduce the number of asymptomatic people involved. As shown in Figure 6 the number of infected people increased from 500 to just over 2200 only in 10 days when there wasn't any control of them. But when we applied the controller, the infected people have also been going down and converge to zero in about 15 days, and the process of control has not caused to exceed the number of infected over 500. In Figure 7 , from the first day to day five, there was a big increase in the number of exposed people. By contrast, there was a big fall in the number of them controlled by the proposed controller in almost ten days. Figure 8 gives information about the number of susceptible people with and without control in 15 days. It is noticeable that control the infection by quarantining susceptible people has been effective, therefore, the number of susceptible people fell by 8000 to zero in around five days. Figure 9 compares the number of recovered individuals with and without the applied controller. We can see a decrease in the number of recovered individuals with the controller over the 35-day period. It is noticeable that in almost 15 days only about 2500 of them are recovered and remained at 2500. The reason for this is obvious because when people are quarantined against the infection, fewer people will get infected then fewer people will recover which is discussed in greater detail in Figure 13 . Figure 10 also shows when there was no control over the infection, the number of quarantined individuals was zero and with the control of them, the number gradually increases, which is normal. Looking at Figure 11 , when the controller applied to the dynamic, more people survive because the total number of the population equals the number of recovered and quarantined people. The reason that the total number of people is not exactly equal to 10,000 people is that 3.5% of infected people die from their infection. Figure 12 shows the absolute difference between ( ) with and without the controller, it can conclude the difference between them reaches to a constant value (approximately 315), meaning the controller has managed to keep 315 more people alive. In Figure 13 , there are two separate cases: with no control and with control. In the case of people under control, more than half of the recovered people went down while quarantined people are almost 7200, therefore a total of them is approximately 10,000( 9970). It is noticeable that the majority of susceptible people are quarantined and there are fewer infected people to become recovered. While in the case of people without the controller the number of recovered people rose to around 9660 and there are any quarantined people, therefore, a total of them is about 9660. as a result, the total number of alive people with control is more than the case without control. Approximately 200 more people have survived from infection when the infection is under control which is very significant in a community of 10,000 people. The following figures compare the number of people from different groups introduced before with and without the controller. The difference between these figures and the figures of Section 5.A is that in this section, some people are being added at variable rates ( ) to susceptible, exposed, infected and asymptomatic individuals every day. This fact means the number of these people will never be zero but the controller has been able to overcome this population growth and eradicate the disease. There is a number of asymptomatic people that is added to the asymptomatic group of travelers and migrants entering the society every day at variable rates and they do not allow declining the population of asymptomatic individuals. They are also causing the epidemic to continue, so with proper and optimal control, we must prevent it from spreading in the community. Figure 14 illustrates the number of asymptomatic people decreasing daily and it eventually reaches 250 and remains stable. This is because populations that come into society every day change suddenly and prevent this decline. On the other hand, the blue line shows that the controller has been able to overcome this population stagnation and reduce their numbers. Since those who are added to the society (by travel or immigration) also include the infected individuals which cause the outbreak, daily injections of people on to the whole population under study have a profound effect on the number of infected people too. The controller was also able to reduce the number of infected people because if the infected population was not controlled, approximately 500 people in the community would infect and spread the disease daily. But the reason for the population staying constant is that as infected people are added to the population daily, some of them recover and go to the recovered group and some die from the infection then the population almost reaches stability and remains constant that is controlled by the controller, and finally the number of infected people has fallen to zero shown in Figure 15 . In Figures 16 and 17 , it can be observed the impact of the sudden population increase on the number of exposed and susceptible individuals, respectively. The controller reduced the population of susceptible individuals to zero within five days and the population of exposed individuals to the lowest possible extent. Fig.16 . Time evolution of exposed people with and without controls with the impulsive rate of growth. As previously mentioned, the number of individuals in quarantine is equal to zero when there is no control over the disease, but when we implement the controller, the number of people in quarantine increases. It is noticeable in Figure 13 that the number of people in quarantine when no population enters the community is approximately 7200, but in Figure 18 when people come into the community that included susceptible people too, the same number must also be quarantined daily. Thus, there was about 700 increase in numbers and the number of people in quarantine went up to approximately under 8000. The number of recovered people has also increased compared to the time when there was no sudden injection of the population because those who enter the community include infected people who go to the recovered group after the recovery and increase the number of recovered people. While some people are adding to the population and there is no control over it, the number of recovered people is greater than when the population is controlled because in a controlled case, because the susceptible individuals are rapidly quarantined and fewer people get infected and eventually recover. The total number of people in the quarantine plus the recovered ones in the controlled case is higher because in the uncontrolled case there were no quarantined people at all, but in the controlled case, the people in the quarantine are all healthy and have a large share in society. The reason for the daily increase in the ( ) ( ) plot is that the population of the community is dynamic, not closed and a number is added to the population every day. ( ̇( ) ) Figure 19 shows the number of changes in the total population size each day when there is no control over dynamic compared with the number of them under proposed optimal control. As shown, we were able to keep more of the population alive with the controller compared with when the infection was spreading without any control. Figure 20 shows the absolute difference between the whole population with and without the controller. The difference between them is a constant value (equal to 350), meaning the controller has managed to keep 350 more people alive per unit of time. This section is divided into four sub-section, in the first and second sub-section (A and B, respectively), the results of the controller applied to the impulsive epidemic model are compared for two different diseases (Ebola Virus Disease (EVD) and influenza). In the following sub-section C, the simulation result for three types of diseases (COVID-19, Ebola, and Influenza) are compared together. Finally, the comparison of simulation results with real data of China and Spain is also given in the last sub-section. The parameters of each disease are represented in Table 3 . As it can be seen in Figure 21 , the number of susceptible people is reduced in only 5 days when the controller is applied to the impulsive epidemic model. There is a big fall in the number of exposed people when the controller is applied to the dynamic and this reduction is acceptable for Ebola disease because the rate of ( ) is low, that is, the exposed people, go to the infected and asymptomatic group at a lower rate. Also, since the population is considered dynamic, some people are added every day (whether traveling or migrating) and it prevents the population of groups from declining rapidly. Despite the Ebola virus disease is a severe, often fatal illness in humans and its case fatality rate is 90% the controller was still able to reduce the number of infected significantly. When recovered people were controlled, the number of them is increased by almost 550 people and reached to almost 1300 in 40 days. According to Figure 22 and as stated in detail in the preceding sections, the controller was able to properly control the susceptible individuals and move them to the quarantined people group. Also, the number of infected and exposed people converged to zero in only 10 days with the controller. The number of asymptomatic people with the controller has also reached its lowest level and the reason it takes longer to reach zero is that there is no direct controller on it and zeroing of this is as a result of zeroing of the other groups, which are discussed in detail in Remark 6. Recovered people in the presence of controller are reduced compared to when there was no control over them because when there is no control over the disease, the number of infected people is higher, so the number of recovered will be more, also the death rate in influenza is less than Ebola. In the end, the number of people in quarantine with controllers has reached its peak. As it can be seen in Figure 23 .a, the controller was able to control the dynamic and the susceptible individuals are quarantined in all three disease groups. In Figure 23 .b, the number of exposed people in both influenza and corona groups are converged to zero by the controller in ten days. But the number of exposed people in the Ebola disease group is reached to zero later because the rate of in this disease is lower than the other group and prevents exposed individuals from joining groups and rapidly. In Remark 5, it is proved that eventually reaches zero. Figure 23 .c shows the number of infected people went down by controller and according to Figure 23 .d in every three groups, the number of asymptomatic people converged to zero later because there was no direct controller on them, but in the end, according to the evidence in Remark 6, they eventually got to zero. Since exposed people have a higher rate of infection ( ) in coronavirus (according to Table 3 ), so more of them get infected and eventually more of them will be recovered, which is quite evident in Figure 23 .e. The number of recovered people in Ebola is lower than the other two groups, this reduction is acceptable for Ebola disease because the mortality rate ( ) is very high therefore there are fewer infected people, as a result, fewer recovered people. Finally, in Figure 23 .f, the susceptible individuals are well quarantined and the number of people in the quarantine group is increased. In this sub-section, divided into two prats (1 and 2), the accuracy of the designed controller is examined by the actual data of China. Then, the controller, whose parameters were estimated using actual data of China, is applied to the actual data of Spain to show the applicability of quarantine and treatment policies in both countries. To evaluate the SQEIAR epidemic model, we need to study a successful model of this type of operation (quarantine and treatment). China has been one of those countries involved with the virus that has been able to control and eventually eradicate it. Therefore, in this part, the results of this study are compared to the actual data from China, to find out the efficiency of the designed controller. If we look at the total population of cities infected with coronavirus in China, they are approximately 80,000,000 people. The number of those who have tested positive for the coronavirus and recovered people given by the National Health Commission of the People's Republic of China (from 22 January 2020 to 22 March 2020) [28] shown in Figure 24 respectively. According to [29] , about 20% of those who have tested positive for the coronavirus have no symptoms of the disease (asymptomatic people) and the rest of them are infected. Using this real data, the number of other states can be estimated. Since (Basic Reproduction Number [3] , [30] ) equal to 2 then the value of ( ) can be calculated as ( ) ( ) ( ), that is, each person whether asymptomatic or infected can infect two other people and by assuming 98% of people are quarantined, the number of susceptible people can easily be calculated as ( ) ( ) ( ) ( ) ( ) ( ) ( ). If the model output is considered as the total number of quarantined and recovered people, therefore, the parameters of the system can be identified by actual data given from [27] . For this purpose, we consider ( ) , -, and are known, it is possible to calculate the parameter estimation vector via the above equation directly. Replacing the obtained parameters in the model of this study and comparing the responses, the following results are obtained. If new data is added to the system while system is estimating at the same time, it should be used recursive Identification as described in detail [31] . As seen in Figure 25 , the results of applying the controller on the original model are compared to a model whose parameters are estimated using real data, and the total number is scaled for a population of 10,000. In part ( ), when the controller is applied to the model using the identified parameters, the rate of reduction of the susceptible individuals is lower than before (when the controller is applied to the original model), which is also justified in reality but ultimately achieved zero. Part ( ) shows the diagram of the exposed people, when the model parameters were identified by using real data, initially had a peak, but the controller converged it to zero in about twenty days. Part ( ) of Figure 25 shows that unlike quarantine and treatment in the real-world, the peak in the number of infected people does not show up in modeling, but eventually converges to zero. In part ( ), similar to part ( ), the diagrams of the asymptomatic population have a higher peak than people in the modeling, and have growth about 1800 in population, but have finally become zero by the 30th day. A valid point can be found in part ( ) is the reduction in the population of recovered people (with real data) and the reason for this is that the recovery time is actually longer and more delayed in realworld society. Part ( ) shows the quarantine of individuals at a rate of 98 percent, which is equal in both cases, and 98 percent of the total population (10,000) are quarantined successfully. As can be seen from the results of these studies and since China, where the virus originated from, have implemented quarantines and got good results and also quarantine is by far one of the most effective ways to prevent the spread of the disease like coronavirus that there is still no vaccine for them. So, it is concluded that without the quarantine, the disease spreads very rapidly and will be highly fatal and catastrophic. In this part, similar to part 1 process, the results obtained from applying the desired controller to the disease and the actual data are compared. In part 1, unknown parameters are estimated using real data from China. In Figure 26 , 2 diagrams are compared. The diagram in blue shows the number of confirmed cases in Spain, which is based on actual data, extracted from the Health Alert and Emergency Coordination Centre (from 24 Feb to 29 May 2020) [32] . The red graph shows the number of declining trends in the number of infected people when the controller is applied. The controller parameters are estimated by the actual data from China. As it is known, if Spain had taken the process of controlling the COVID-19, it could have controlled the disease well and within about 20 days. In the case that the desired controller applied to the model, the number of infected people has finally reached approximately 62,500, but in the case without the controller, the number of infected people has reached 100,000 and has an upward trend after 85 days, which has reached zero in the shortest time in the controlled case. It is essential to note that the evidence in this paper, given from modeling studies, proves how quarantine affects the COVID-19 outbreak. Putting quarantine in place early and combining it with medical treatment is critical if it is to be effective to control the spread of COVID-19. Also, the quarantining of travelers from a country involved with COVID-19 reduces disease transmission and deaths and also makes greater cost-savings. However, if the government enact strict laws to ban rallies and quarantine and other different ways to getting people away from rallies like: Isolation, social distancing, community containment, driving ban and etc., in the shortest possible time, it can be expected that the COVID-19 prevalence will decline in the next few months. In this paper, the SEIAR dynamic epidemic model was improved with a new group of people called quarantined people (SQEIAR). The goal of this article was to eradicate the infection by decreasing the number of infected, exposed, and asymptomatic and quarantining the susceptible people with optimal control that applied to the SQEIAR model. Two control actions are employed to achieve this objective: quarantine and treatment of infected individuals. The Pontryagin's maximum principle was used to describe the optimal controls and the optimal final time. Also, an impulsive epidemic model was considered to indicate the sudden growth in population and that model was controlled by optimal control strategy. The presented approach is suitable to describe models for infectious diseases caused by a group of viruses called coronavirus for which there is no vaccine yet. Thus, the theoretical results were illustrated for the case of COVID-19. Our simulation results of the COVID-19 were compared with Ebola and Influenza. Also, numerical simulation corroborated our theoretical results. Then, the system parameters were identified using actual data of China. Eventually, the process of quarantine and treatment of China and Spain was compared by applying the controller with the estimated parameters using actual data of China. Prevention Strategies for Mathematical Model MERS-Corona Virus with Stability Analysis and Optimal Control World Health Organization (WHO), Coronavirus Observer-Based Adaptive PI Sliding Mode Control of Developed Uncertain SEIAR Influenza Epidemic Model Considering Dynamic Population Stability Analysis and Observer Design for Discrete-Time SEIR Epidemic Models Observer Design for SEIR Discrete-Time Epidemic Models Stability Analysis of Uncertain Switched Singular Time-Delay Systems with Discrete and Distributed Delays Optimal Control and Stability Analysis of an Epidemic Model with Population Dispersal An Impulsive Delayed SEIRS Epidemic Model with Saturation Incidence Dynamics of a Novel Nonlinear SIR Model with Double Epidemic Hypothesis and Impulsive Effects Exponential Stability of Impulsive Delayed Nonlinear Hybrid Differential Systems Switched Impulsive Control of the Endocrine Disruptor Diethylstilbestrol Singular Model Fuzzy Affine Impulsive Controller On Singular Hybrid Switched and Impulsive Systems Fuzzy Impulsive Control with Application to Chaos Control Optimal Control of Innate Immune Response Free Optimal Time Control Problem for a SEIR-Epidemic Model with Immigration of Infective Optimal Control Strategy for SEIR with Latent Period and a Saturated Incidence Rate Optimal Control of Singular Large-Scale Linear Systems Optimal Control of SIR Epidemic Model with State Dependent Switching Cost Index Optimal Control in Epidemiology Analysis, Simulation and Optimal Control of a SEIR Model for Ebola Virus with Demographic Effects Ebola Model and Optimal Control with Vaccination Constraints Optimal Control of Large-Scale Singular Linear Systems Via Hierarchical Strategy A Model for Influenza with Vaccination and Antiviral Treatment Pattern of Early Human-to-Human Transmission of Wuhan 2019 Novel Coronavirus (2019-nCoV) Early Transmission Dynamics in Wuhan, China, of Novel Coronavirus-Infected Pneumonia Estimating the Reproduction Number of Ebola Virus (EBOV) During the 2014 Outbreak in West Africa National Health Commission of the People's Republic of China (NHC) Estimating the Asymptomatic Proportion of Coronavirus Disease 2019 (COVID-19) Cases on Board the Diamond Princess Cruise Ship Reproduction Numbers and Sub-Threshold Endemic Equilibria For Compartmental Models of Disease Transmission Recursive Identification of Continuous Two-Dimensional Systems in the Presence of Additive Colored Noise Health Alert and Emergency Coordination Centre This work was supported in part by the Basque Government through project IT1207-19.