{'fraction_non_alphanumeric': 0.025459221160911094, 'fraction_numerical': 0.007421013960323292, 'mean_word_length': 4.779405520169852, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimal Coronavirus Optimization Algorithm Based PID Controller for High Performance Brushless DC Motor

: This paper presents an efﬁcient coronavirus optimization algorithm (CVOA) to ﬁnd the optimal values of the PID controller to track a preselected reference speed of a brushless DC (BLDC) motor under several types of disturbances. This work simulates how the coronavirus (COVID-19) spreads and infects healthy people. The initial values of PID controller parameters consider the zero patient, who infects new patients (other values of PID controller parameters). The model aims to simulate as accurately as possible the coronavirus activity. The CVOA has two major advantages compared to other similar strategies. First, the CVOA parameters are already adjusted according to disease statistics to prevent designers from initializing them with arbitrary values. Second, the approach has the ability to ﬁnish after several iterations where the infected population initially grows at an exponential rate. The proposed CVOA was investigated with well-known optimization techniques such as the genetic algorithm (GA) and Harmony Search (HS) optimization. A multi-objective function was used to allow the designer to select the desired rise time, the desired settling time, the desired overshoot, and the desired steady-state error. Several tests were performed to investigate the obtained proper values of PID controller parameters. In the ﬁrst test, the BLDC motor was exposed to sudden load at a steady speed. In the second test, the continuous sinusoidal load was applied to the rotor of the BLDC motor. In the third test, different operating points of reference speed were selected to the rotor of the BLDC motor. The results proved that the CVOA-based PID controller has the best performance among the techniques. In the ﬁrst test, the CVOA-based PID controller has a minimum rise time (0.0042 s), minimum settling time (0.0079 s), and acceptable overshoot (0.0511%). In the second test, the CVOA-based PID controller has the minimum deviation about the reference speed ( ± 4 RPM). In the third test, the CVOA-based PID controller can accurately track the reference speed among other techniques.


Introduction
Nowadays, the industrialized world needs good accuracy with fast manipulation [1]. Therefore, a high-performance actuator with an efficient control system becomes essential [2,3]. The brushless DC (BLDC) motor considers a permanent magnet synchronous machine that gives the advantage of the high starting torque and wide range of speeds [4,5]. Also, the construction simplicity of the BLDC motor drive system offers several advantages not introduced with brushed DC motors in terms of low rotor inertia and size [6,7].
Currently, the BLDC motor can be utilized in several engineering applications such as unmanned aeronautical vehicles (UAVs), industrial robots, CNC machines, electric vehicles, and servomechanism systems [8,9].
The conventional PID controller uses on a wide scale in industrial applications due to its simplicity, reliability, and the easy tuning of its parameters [10]. The challenge of a conventional PID controller is the selection of the proper parameters for a certain application [11,12]. There are several techniques to find the PID controller parameters such as trial and error and Ziegler and Nichols methods [13,14]. However, these previous techniques give an approximate solution. Currently, optimization techniques can be used to find the optimal values of the PID controller parameters [15,16]. There are different types of optimization techniques such as Genetic Algorithm (GA) which have been employed successfully to solve complex optimization problems, Particle Swarm Optimization (PSO), Ant Colony optimization, and Harmony Search (HS) optimization [17,18].
The coronavirus (COVID- 19) is considered an unknown respiratory virus, revealed in humans in December 2019, that has spread worldwide with more than 10 million infected people so far. This virus can infect people and these people can either die, infect other people, or recover after the infection. Vaccines and the immune defense system usually fight the disease and help to alleviate their effects while an individual is still infected [19]. This behavior can be modeled by a SIR model, consisting of three categories of individuals: S presents the number of susceptible, I stands for the number of infectious, and R is the number of recovered. Metaheuristics need to deal with huge search spaces, even infinite for the continuous cases, and must find suboptimal solutions in reasonable execution times [20].
The fast propagation of the coronavirus along with its ability to infect most of the countries in the world rapidly has inspired the novel metaheuristic proposed in this work, named Coronavirus Optimization Algorithm (CVOA). The proposed CVOA is used to find the optimal parameters for the PID controller. The vaccines stand for the used objective function which can treat the infected patients. A study case is included in this work to discuss the CVOA performance. CVOA has been used to find the optimal values for the PID controller parameters based on a multi-objective function that contains the desired rise time, desired settling time, desired maximum overshoot, and desired steady-state error. The purpose of the control system is to accurately track a preselected reference speed for BLDC motor under different types of loads.
A Comparative study using Grey Wolf Optimizer (GWO), Particle Swarm Optimization (PSO), and Genetic Algorithms was presented in [21]. The results showed that the proposed GWO algorithm has a lower root mean square compared to PSO and GA, and therefore, it could be an effective method for optimal PID controllers for power converters applications.
The position control of BLDC motor using HS Algorithm optimization technique was demonstrated in [22]. It demonstrates that the HS method can improve the dynamic performance of the system in a better way.
The design of a PSO optimized PID controller for the process liquid level control was illustrated in [23]. The computer simulation results show far better settling time and peak values with PSO optimized PID control, thus ensuring overall higher efficiency.
The performance comparison of Moth-Flame Algorithm (MFO) and PSO for optimal tuning the fractional order fuzzy PID controller for A DC-DC boost converter was designed in [24]. The MFO method is helpful to select the best values of fractional order fuzzy PID Controller for a DC-DC boost converter.
The paper is prepared as follows. Firstly, the BLDC motor dynamic model is presented. Secondly, CVOA is explained. Thirdly, the proposed CVOA based PID controller is demonstrated. Fourthly, the simulation results are illustrated. Finally, the conclusion is discussed.

BLDC Motor Dynamic Model
The transfer function considers one of the most important techniques of control theory. Some control design and analysis methods, such as the root-locus method and the frequency-response method, are also developed based on the system transfer function. Usually, a 3-phase BLDC motor is connected by six electronic switches (power transistors) to produce a 3-phase voltage simultaneously to a full-bridge configuration power converter. The switching sequence can be adjusted by the position sensor [25].
The cases of rotor position are monitoring using three hall sensor devices. The hall sensors provide the information to the decoder block to create the sign of reference current signal vector to the back electromotive force (BEMF) [26].
To operate the motor in the opposite direction, the current is altered in the reverse direction or the switching order of the controller is changed. The controlled DC supply value depends on the PID controller output to can track a preselected speed profile [27].
The inverter used to transform the DC voltage to AC voltage likewise has a DC voltage converter to switch DC to this framework. Figure 1 demonstrates the main components of the BLDC motor drive system [28]. The state-space equation method is one of the most important analysis methods in modern control theory. The state-space method is becoming more and more popular in designing control systems with the fast development of computer techniques. The state-space model of the BLDC motor can be considered as Equations (1) and (2) [1].
The v AB and v BC consider line input voltage. The i a and i b are the phase current through BLDC stator winding. The e AB and e BC stand for the equivalent line back emf. The R is the phase resistance of the winding. The L is the phase inductance of winding. The rotor moment of inertia is J while the rotor speed is ω. The T L is the load torque and T e is the electrical torque. The K e and K T are the coefficient of lineback-EMF and the coefficient of line torque constant, respectively. Recently, the B v stands for the viscous friction coefficient.
The parameters of the BLDC motor are listed in Table 1.  Figure 2 demonstrates the open-loop dynamic response of the BLDC motor drive system model. The no-load rotor speed stabilizes at 4000 RPM through 0.04 s. A fixed 50% of rated torque was applied on the motor shaft at time 0.1. Due to the sudden load, the corresponding rotor speed will be reduced to 3200 RPM. This behavior of the BLDC model indicates that the model was developed correctly.  Figure 3 shows the corresponding phase current of the BLDC motor. Usually, the starting current of the BLDC motor is very high and decreases to zero in the case of no-load. it provides this fact where the starting current reaches 18 Ampere and decays to zero at stabilizes the rotor speed. Besides, it can noted that the phase current will be increased at time 0.1 s to ±2.5 A due to the sudden load.

Control Techniques
The conventional PID controller is executed in various fields of engineering applications owing to its simplicity, reliability, and flexibility in tuning its parameters. The transfer function of the PID controller is k(s) = K p + K i /s + K d s, where K p , K i , and K d are proportional, integral, and differential gains, respectively. The function of each part of a PID controller can be described as follows: the proportional part decreases the error responses of the system to disturbances, the integral part rejects the steady-state error, and finally, the derivative part diminishes the dynamic response and improves the system stability.
The problem in the PID controller is to choose the three parameters to be suitable for the controlled plant. There are many methods to define the parameters of PID controller such as try and error and Ziegler-Nichols methods but most of these methods are rough roads. Therefore, this paper presents a novel CVOA methodology to find the optimal values of the PID controller.

GA Based PID Controller
A Genetic Algorithm (GA) is considered as a useful optimization tool to search and optimize several parameters of control systems and scientific problems. As such, this paper uses the GA to optimize the PID controller parameters based on a certain objective function. The important step is to encode the problem into suitable GA chromosomes and then build the population. The previous works recommend 20 to 100 chromosomes in one population. The higher chromosome number gives us a better chance to get the optimal results. However, the execution time is a barrier to increasing the number of chromosomes. So, this work uses 80 chromosomes in each generation [3,29].
Each chromosome covers three parameters K p , K i , and K d with value, bounds varied depend on the objective function used. The initial values of K p , K i , and K d are determined from the Ziegler-Nichols rule, to get a better result.
The population in each generation is represented by an 80 × 4 matrix as obvious in Equation (3), depends on the number of the chromosome in population.
where n: number of chromosomes.
Each row is one chromosome that comprises K p , K i , and K d values then the last column is added to accommodate fitness values (J t ) of corresponding chromosomes [4,30]. The final values of K p , K i , and K d are determined by minimizing a certain objective function. Many objective functions may be used for this purpose. In this work, the objective function in Equation (11) is considered [31].

HS Based PID Controller
Harmony Search (HS) was developed by Geem et al. in 2001. HS depends on the aesthetic quality which can be improved by adjusting the pitch of each musical instrument. Also, the objective function value determines the quality of the decision variables [32].
In the music improvisation process, all players' sound pitches within range join together to achieve one harmony. If all pitches achieve good harmony each player stores in his memory that experience and the possibility to achieve a good harmony is increased in the next iterations [33].
The same thing occurs in the optimization; the initial solution is generated randomly from decision variables within the possible range. If the objective function values of these decision variables are acceptable to achieve a promising solution, then the possibility to reach a good solution is increased in the next iterations [34].
The initial population of Harmony Memory (HM) is generated randomly. HM consists of Harmony Memory Solution (HMS) vectors where The HM is filled with HMS vectors as follows [35]: The Harmony Memory Consideration (HMC) rule, for this rule a new number r1 is generated within the range [0 1]. If r1 < HMCR, where HMCR is the harmony memory consideration rate, then the first decision variable in the new vector X new j is chosen randomly from the values in the current HM as follows [36]: The obtained decision variables from the harmony memory consideration rule are further examined to determine if it needs to pitch adjustment or not. A new random number r2 is generated within the range [0 1]. If r2 < PAR, where PAR is a pitch adjustment rate, then the pitch adjustment decision variable is calculated as follows: x new j = x j ± rand(0, 1).BW (6) where BW is a bandwidth factor, which is used to control the local search around the selected decision variable in the new vector. Random initialization rule, If the condition r1 < HMCR fails, the new first decision variable in the new vector X new j is generated randomly as follows: x new j = L x + (U X − L X ). rand(0, 1) where L X and U X are the lower and upper bound for the given problem. After the harmony vector X new is generated, it will substitute the worst harmony vector X worst in the harmony memory if its objective function value is better than the objective function value of the worst harmony vector.

CVOA Based PID Controller
There are several bioinspired metaheuristics to deal with optimization problems. Although CVOA has been considered to optimize any type of optimization problem, this section focused on optimization algorithms used to find the optimal value of the PID controller parameters. The first step, generation of the initial population. The initial population (zero patient) contains one individual vector. As in the coronavirus epidemic scenario, it recognizes the first human being infected [37].
In the second step, the disease spread depends on the behavior of one individual vector (zero patient), several cases can be considered. The first case is that some of the infected individuals die. The possibility of death is according to the coronavirus death rate. Such individuals can no longer infect new individuals. The second case that is the individuals surviving the coronavirus will infect new individuals (intensification). Therefore, two types of disease propagation are considered, according to a given probability for ordinary spreaders. Infected individuals will infect new ones according to the rate spreading rate, while if the rate of coronavirus spread is high, the infected individuals will infect new ones according to the coronavirus super spreading rate. Both ordinary and super-spreader individuals can follow and find solutions quite dissimilarly. Therefore, individuals have a probability of traveling thus allowing them to spread the disease to solutions that may be quite different.
The third step consists of modernizing populations. Three populations are preserved and updated for each generation.If any individual dies, it is added to this population and can never be used again. After each iteration, infected individuals (after spreading the coronavirus according to the previous step) are sent to the recovered population. It is known that there is a reinfection probability. Hence, an individual fitting to this population could be re-infected at any iteration provided that it matches the reinfection criterion.
Another condition must be measured since individuals can be isolated simulating they are executing the social distancing procedures. For ease, it is considered that an isolated individual is sent to the recovered population as well when meeting an isolation probability.
Recently, a newly infected population has emerged. This population collects all individuals infected at each iteration, according to the procedure described in the previous steps. It is possible that repeated new infected individuals are created at each iteration and, consequently, it is recommended to eliminate such repeated individuals from this population before the next iteration starts running. The vaccines are considered as the used objective function, which can treat the infected population [19].
The fourth step is the stop criterion. One of the most important features of the proposed algorithm lies in its capability to end without the need of controlling any parameter. This situation occurs because the recovered and dead populations are constantly increasing as time goes by, and the newly infected population cannot infect new individuals. It is estimated that the number of infected individuals increases for a certain number of iterations. However, from a particular iteration on, the size of the newly infected population will be smaller than that of the current one because recovered and dead populations are too big, and the size of the infected population decays over time.
The initial population contains the upper and lower values of the PID controller parameters as shown in Equations from (3) to (5) The performance of each row will be investigated according to the objective function in Equation (6). The poor performance specifies the infected population, which has the possibility to die. While the good performance indicates the recovered population from corona antivirus.
where (t rd ) is the It can be noted that objective function attempts to satisfy the designer using four sub-objective functions. The first sub-objective function focuses on improving the rise time of the overall drive systems. The second sub-objective function attempts to reduce the settling time. The third sub-objective function measures the steady-state error. The fourth sub-objective function investigates the required overshoot. The value of each sub-objective function ranges from zero to one. So, the overall objective function considers the average of the sum of four sub-objective functions. Figure 4 shows the CVOA offline tuning system with the BLDC motor drive system. The first step investigates the Probability of travel If P t = 0 then the type of spreading is S R = (0 to 0.5). In case of P t = 1 then the type of spreading S RR = (0.5 to 1). In the second step, the zero infected patient If P t = 0 will become as follows: If zero infected patient If P t = 1.
The third step investigates if J t > P DIE then this patient is dead and generates a newly infected patient. In the case of J t < P DIE then the newly infected patient will be as follows: The optimization will be stopped if (X new = X old ) where the newly infected populations cannot infect new individuals. If the number of iteration ended before this previous condition. the CVOA cannot give the optimal solution. Therefore, to obtain the optimal parameters of PID controller must be (X new = X old ) to guarantee the global solution. Table 2 demonstrates the used CVOA parameters through offline optimization. The objective function has been minimized subjected to: The upper and lower limits of PID controller parameters as the following.
Best Fitness values are plotted against generations or number of iterations to get the convergence characteristic shown in Figure 5. The sequence flow chart of optimization as shown in Figure 6.

Optimization Results
This section presents the results of the optimization of each PID controller. It can be noted that Table 3 gives different values of the PID controller for each optimization technique. The obtained three different PID controllers were applied to the BLDC motor to investigate the performance and robustness of each control technique.
This results in faster convergence for the solutions in the CVOA technique. GA has no such guidance mechanism. Better solutions only pass the information when they participate in the crossover with some other chromosomes. Also, the updated generation does not directly depend on the value of the objective function in both GA and HS. In contrast of the updated law of the CVOA technique in Equation (18) has a direct relation with the objective function where the value of the objective function can determine and estimated the new generation value as follows: From Equations (22) to (24), we can note that when J 1 , J 2 , J 3 , and J 4 close to zero the X new = X old to achieve the stop criterion (the newly infected populations cannot infect new individuals). Also, the D R parameter is randomly determined by the immunity of individuals which is an important factor to estimate the newly infected individuals.  GA does not use memory to keep track of the solutions throughout different generations. Modern machines are good with mathematical computations. CVOA and HS technique has an inherent tendency to exploit this advantage because all the computations and procedures in CVOA are purely mathematical. However, GA has procedures like crossover, mutation which are not purely mathematical which makes GA more timeconsuming than CVOA.

Simulation Results
This section of the paper shows the performance of the BLDC motor at different types of PID controllers. The first type is based on the GA. the second type is based on the HS. The third type is based on the proposed CVOA. Besides, several tests will be performed. The first test is the speed regulation at sudden load. The second test is the speed regulation at sinusoidal load. The third test is the speed tracking at different operating points at the reference speed.   Table 4 summarizes the performance of each control technique. It can be noted that the CVOA-based PID controller has the least rise time and settling time. Also, the steady-state of the proposed CVOA is very small compared to other techniques algorithm.  Figure 8 demonstrates the corresponding controller output of each control technique. It is clear that the CVOA-based PID controller can detect rapidly any change in BLDC motor dynamic. In addition, the CVOA-based PID controller has a step change value at a sudden load test.

Speed Regulation at Sinusoidal Load Case
Most of the industrial applications such as robotics and CNC machines are exposed to sinusoidal load because of the rotor movements under continuous change of inertia so need to regulate the speed of the BLDC motor. Applying sinusoidal load on the BLDC motor drive system as shown in Figure 9. Figure 10 displays that the CVOA-based PID controller can track the reference speed better than other techniques (GA-based PID controller and HS-based PID controller) although the sinusoidal load. Where the CVOA-based PID controller has maximum speed tolerance about the reference speed ±4 RPM while the maximum deviation of GA-based PID controller ±25 RPM and the HS-based PID controller is ±10 RPM.   Figure 11 illustrates the corresponding controller output of each control technique at sinusoidal load torque. It can be noted that the controller output is fluctuating to can absorb the sinusoidal load disturbance. The phase shift between the output of the CVOA-based PID controller and the phase of the sinusoidal load is very small so, it can give a high performance through the continuous change of load.  Figure 12 displays the dynamic performance of each control technique. It can be noted that the CVOA-based PID controller can follow accurately the reference speed of the BLDC motor. At low reference speeds, the tracking accuracy is high while the error between the reference and actual speed will increase for high reference speeds. Figure 12. The rotor speed of the BLDC motor at several operating points of the reference speed test. Figure 13 exhibits the controller outputs of each control technique. It can be noted that the response of CVOA-based PID controller output can change rapidly according to the variation of the reference speed. The polarity of controller outputs for the proposed control techniques will be reversed due to the reference speed transit from high value to low value. There is not shuttering at the highest value of reference speed because all controller outputs generate the maximum voltage of the motor. The on-off switching of transistors of the inverter causes a shuttering in signal output for the controller outputs.

Conclusions
A new coronavirus optimization algorithm (CVOA) is developed to design an optimal PID controller that can accurately track a preselected reference speed of brushless DC (BLDC) motor under several types of disturbances. The zero patient is presented by the initial values of PID controller parameters, which can infect new patients (the upper and lower values for PID controller parameters). The CVOA model is designed to simulate as accurately as possible the coronavirus behavior. The advantage of CVOA is its parameters can adapt according to disease statistics to prevent the trial and error of designers that occurs when initializing them with arbitrary values. In addition, the algorithm has the ability to end after several iterations when the infected population cannot infect new individuals. The proposed CVOA was compared with well-known optimization techniques such as the genetic algorithm (GA) and Harmony Search (HS) optimization. A multi-objective function can adjust the desired rise time, the desired settling time, the desired overshoot, and the desired steady-state error. Several tests have been executed to study the obtained appropriate values of PID controller parameters. The first test, the BLDC motor is the regulation speed with the sudden load. In the second test, the variable sinusoidal load is subjected to the rotor of the BLDC motor. In the third test, several commands of reference speed are selected to the rotor of the BLDC motor. The results prove that the CVOA-based PID controller can enhance the performance of the BLDC motor drive system where the motor dynamic will be improved (minimum rise time, minimum settling time, and acceptable overshoot).