Design of spark ignition engine speed control using bat algorithm

The most common problem in spark ignition engine is how to increase the speed performance. Commonly researchers used traditional mathematical approaches for designing speed controller of spark ignition engine. However, this solution may not be sufficient. Hence, it is important to design the speed controller using smart methods. This paper proposes a method for designing speed controller of a spark ignition engine using the bat algorithm (BA). The simulation is carried out using the MATLAB/SIMULINK environment. Time domain simulation is carried out to investigate the efficacy of the proposed method. From the simulation results, it is found that by designing speed controller of spark ignition engine using PI based bat algorithm, the speed performance of spark ignition engine can be enhanced both in no load condition and load condition compared to conventional PI controler.


INTRODUCTION
Spark ignition engine is one type of ignition engine that is widely used in motor vehicles around the world. Along with development of technology, research and development of this machine continues to be carried out starting from the construction of the machine to its management electronics. The most frequently discussed problems in spark ignition engines are engine performance and fuel efficiency. In engine performance, researchers focused on controlling the engine speed and manifold pressure as reported in [1,2]. In that research, the authors are focused on designing the engine speed controller using a traditional mathematical approach. However, using a traditional mathematical approach may not be sufficient as the spark ignition engine model includes high non linearity. Hence, it is essential to design the engine speed controller based on smart methods such as using artificial intelligence methods.
Artificial intelligence methods are divided into three category: artificial neural network, fuzzy logic, and nature inspired metaheuristic algorithms. Nature inspired metaheuristic algorithms have gained significant attention as they could provide optimal and efficient ways for handling engineering problems. The application of a metaheuristic algorithm on power system problems is reported in [3]. In that research, the differential evolution algorithm was used to design the resilient wide area oscillation damping. From that research, it was reported that the differential evolution algorithm provided satisfactory results in optimizing resilient wide-area oscillation damping. Research effort in [4] attempted to use particle swarm optimization for workflow scheduling. From their research it was found that workflow scheduling can be set optimally by using particle swarm optimization. Authors in [5], proposed a solution for making optimal itinerary using ant colony optimization. The application of hybrid particle swarm optimization (PSO) and weed optimization (WO) for designing PID controller of marine diesel engine speed control is reported in [6]. From the simulation results, it is found that by combining between PSO and WO the PID controller can be designed optimally. Research effort in [7] explained the application of adaptive safe experimentation dynamics for data-driven neuroendocrine-PID control of multi input multi output. Authors on [8], proposed a method for designing PID controller tuning based on safe experimentation on liquid slosh. The application of ant colony optimization nelder mead (ACO-NM) for designing PI controller is reported in [9]. In those research off-road electric vehicle is used as the test bed system. From the results, it this found that by designing PI controller based on the ACO-NM algorithm could achive the maximum overshoot average <10%. Furthermore, ACO-NM algorithm could provide high quality solutions for lower computational cost. A genetic algorithm was used to detect the network intrusions [10]. An attempt to use firefly algorithm for placing reactive power compensation in distribution network is reported in [11]. From the results, it is found that by using firefly algorithm as a method, the balance between active and reactive power in distribution network. Among numerous types of nature inspired metaheuristic algorithms, the bat algorithm is becoming favorable due to its simple coding and fast computational process [12]. Hence, this paper proposes a method for optimally design speed controller of spark ignition engine using bat algorithm (BA) as BA can provide a low computational cost and reliable results. The rest of the paper is organized as follows: Section 2 provides the fundamental theory of spark ignition engine, PI controller and bat algorithm. The method for designing spark ignition engine using bat algorithm is presented in Section 3. Section 4 focuses on analyzing the simulation results. The last section highlight the contribution, conclusions and future direction of the research.

FUNDAMENTAL THEORY 2.1. Spark ignition engine
To simulate four-cylinder spark ignition engine, the most important part is capturing the dynamic of each component in the system. This dynamic can be captured through mathematical representation. The first component of the system is the throttle body. In this paper the angle of the throttle plate is the control input. The mathematical representation of throttle body can be described using (1)-(3) [13][14][15][16][17].
Where mai, θ, Pm, and Pamb are mass flow rate into manifold, throttle angle, manifold pressure and ambient pressure. The next dynamic is intake manifold of spark ignition engine. This dynamic is very similar to manifold pressure. The difference is in the incoming and outgoing mass flow rates representing the net rate of change of air mass with respect to time. The mathematical representation of intake manifold can be described using (4) [13][14][15][16][17]. In (4), R, T, Vm, and ma0 are specific gas constant, temperature, manifold volume, and mass flow rate of air out of manifold pressure. The mass flow rate itself is a function of the engine speed and manifold pressure as described in (5). The final dynamic model for simulating spark ignition engine is the torque developed by the engine. The torque produced by the engine depends upon the engine speed, the spark advance, mass of the air charge and the air/fuel mixture ratio. The mathematical representation of torque of engine can be described using (5) In (5), ma and A/F are mass of air in cylinder for combustion and air fuel ration. While ϑ and Torqueeng are spark advance and torque produced by the engine. Furthermore, the engine speed of spark ignition engine can be described using (6), where J and N are moment of inertia and engine speed [13][14][15][16][17].

PI controller
In the control system domain, there are many ways to control a system, one way is by using a proportional and integral controller. Each controller structure has its own advantages and disadvantages. A proportional controller has an advantage in making the system have a faster rise time. While integral control has the advantages of reducing the error of the system. By combining both type of controller, the system will have faster rise time and smaller error compared to the other systems without proportional and integral control. Usually this controller is called a PI controller [18,19].
The output of a proportional controller is the multiplication between an error value and the proportional gain. The proportional gain cannot be entered randomly as it has certain value limits. The system will not reach the steady state condition if the proportional gain value is too high. Furthermore, the system will have steady state value different with the set point if proportional gain is too low. Hence, it is crucial to set the proportional gain controller optimally. The integral controller can be used to reduce the error of the system response by using integration procedure on the error signal. The integral controller can be also used to speed up time in eliminating offsets. Figure 1 shows the block diagram of a PI controller [18,19]. 797 solving optimization problems, describing the bats activity via mathematical representation is crucial. The mathematical representation of bat position and velocity can be described as (7), (8) and (9) [21][22][23].
In (7) and (8), the optimal location of the whole solution and random vector taken from a uniform distribution are presented as x* and β. Furthermore, the velocity of the bats can be increased by multiplying λi and fi. Hence, λi and fi can be used to adjust the velocity of the bats. Moreover, the value of fmin and fmax are set depending on user requirements (generally, the values are 0 and 1) [21][22][23].
The pulse and noise level (Ai) from bats are updated in each iteration. Furthermore, the noise level of bats are decreased when bats find their prey. The user can choose the value of maximum and minimum noise. For simplicity, the minimum and maximum value of noise can be set to 0 and 1 assuming that noise level becomes 0 when bats stop emitting sound (because the bats have already found their prey). This activity can be modeled by the mathematical representation in (10) and (11) Pulse emission and a constant value in (10) and (11) are presented as ri, α and γ. For every 0< α <1 and γ>0, the mathematical representation can be described in (12). The value of α and γ can be set with the same value between 0 to 1, for simplicity. In this paper bat position is described as the PI controller parameters [21][22][23].

METHOD
In this section, the procedure of designing speed control of spark ignition engine is explained. The system is simulated using the MATLAB/SIMULINK environment. Moreover, the objective of the bat algorithm is to reduce the engine speed of the spark ignition engine. The mathematical representation of the bat algorithm objective function is described using (13) [24][25][26]. With e, t, Kp, Ki are error of the investigated signal, time, proportional controller gain and integral controller gain.
Subject to: The procedure of designing a PI controller for spark ignition engine speed controller based on the bat algorithm includes the following steps: Step 1. Input parameter of the bat algorithm and dynamic data of spark ignition engine.
Step 2. Start the bat algorithm by initializing the number of bats (population), pulse emission rate, loudness and frequency.
Step 3. Generate the random position of the bats.
Step 4. Evaluate the objective function of each bat's position using (13).
Step 5. Move the bats using (7), (8) and (9). Step 6. If random value is smaller than noise level and if new frequency is smaller than the old frequency, store the solution and update the loudness and pulse rate. Step 7. Evaluate the objective function of new population using (13).
Step 8. If random value is smaller than noise level and if new frequency is smaller than old frequency, store the solution and update the loudness and pulse rate. Step 9. Rank the bats and obtain the best solution.
Step 10. If the termination criteria is satisfied then proceed to step 11, otherwise return to step 5.
Step 11. Apply the best position of bats Kp(s) and Ki(s) in the PI controller.
Step 12. Print the results (PI controller value).

RESULTS AND ANALYSIS
In this section, two different case studies are carried out to investigate the efficacy of the proposed method (PI controller design based on the bat algorithm). The first case study, is to test the system under different speed variation. The second case study is focused on system performance under load conditions. Furthermore, two scenarios are considered in this paper. The first scenario is a traditional speed controller using a PI controller. While the second scenario is the proposed method on this paper (PI controller design based on the bat algorithm). Furthermore, Table 1 shows the optimal PI parameter based on the bat algorithm.

Speed reference variation
In the first case study, the performance of the system is tested against speed reference variation. For the start, the speed reference is set at 3000 rpm. After 5 seconds, the speed reference is changed from 3000 rpm to 6000 rpm. It should be noted that in this case study, no disturbances are considered. Figure 2 shows the spark ignition engine speed response owing to the speed reference variation. It is noted that system with a conventional PI controller experiences higher overshoot and slower settling time. It should be noted that the conventional PI controller design is using PI tuner application in MATLAB/SIMULINK. Furthermore, when the PI controller is tuned using bat algorithm, the speed response of spark ignition engine is better than a conventional PI controller. This is indicated by the smaller overshoot and faster settling time. This happens because the PI controller based on the bat algorithm provides optimal control signal for the throttle. Furthermore, Tables 2 and 3 illustrate the detailed features of Figure 2.

Drag torque variation
In this section, the drag torque variation is considered to determine the impact of drag torque in speed performance of spark ignition engine. The drag torque was first set at 25 N/m, then between 2 seconds and 8 seconds the drag torque is set at 20 N/m, after that the drag torque is once again set at 25 N/m. Figure 3 depicts the spark ignition engine speed response due to drag torque variation. It is observed that by using PI controller based on bat algorithm, the speed performance of the spark ignition engine is better than using a conventional PI controller. This is indicated by the small overshoot and fast settling time of the spark ignition engine speed response.

Control system index measurement
In this section, the spark ignition engine speed response is assessed by using ITAE, IAE and ISE. The best performance of the spark ignition speed response is indicated by the minimum value of IAE, ISE and ITAE. Table 4 shows the ITAE, IAE and ISE for the system without drag torque variation. While Table 5 illustrates the ITAE, IAE and ISE with drag torque variation. It is noticeable that for both condition the proposed method (design PI controller based on bat algorithm) provides the best results on ITAE, IAE and ISE assessment. The mathematical representation of ITAE, IAE and ISE are described in appendix.

CONCLUSION
This paper proposed an optimal design of PI controller based on the bat algorithm for speed controller of spark ignition engine. From the case study, 1) It is noted that PI controller can be used to control the throttle of spark ignition engine to produce appropriate speed response. 2) It is noticeable that by designing a PI controller using the bat algorithm, the speed response of the spark ignition engine can be enhanced. Further research is required to investigate the fuel consumption comparison between system with smart controller and using conventional controller. Furthermore, the controller can also be designed by using fuzzy and adaptive to speed reference and load variation.

APPENDIX -Measuring system performance
To measure the controller performance, some indices can be used. Thypically, integral squared error (ISE) and integral absolute error (IAE) are used as the indices for assesing the system performance [23][24][25]. Furthermore, for assesing the system more comprehensive, a indices that also considering time in the calculation is designed. This indices is called as integral time absolute error (ITAE). Hence, for this paper all of the indices (IAE, ISE and ITAE) are used to thoroughly investigate the system performance. Those indices can be modeled as mathematical representation as described in (7)

ACKNOWLEDMENT
The corresponding author would like to thanks to Universitas Airlangga for funding this research through "Riset Kolaborasi Mitra Luar Negeri" grant.