AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 629 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. DOI: 10.30772/qjes.v10i4.513 Abstract: Automatic control of automotive engines provides benefits in the engines performance like emission reduction and fuel economy. The drop in idle speed problem can be seen as the disturbance rejection problem in the main engine speed. In this paper, a PID-like Fuzzy Logic Control (PIDFC) with minimum structure for the four strokes, four cylinders, gasoline engine is designed and simulated to maintain the engine speed at nominal value in idle speed mode. The speed performance must satisfy minimize fuel consumption, and as a result reduces the fuel emissions. A spiking Neural Network (SNN) trained by Particle Swarm Optimization (PSO) algorithm is proposed to online-adapt the inputs and output gains of the PID fuzzy controller in order to achieve the required speed performance. A Mean Value Engine Model (MVEM) is used to simulate nonlinear model of engine. .Results of simulation for this controller showed good improvements over the PIDFC in the idle speed response. .The peak overshoot is reduced about (70 %), the undershoot is reduced about (50 %), the settling time is. .reduced about (83%) and the fuel consumed is reduced about (53%). Keywords: mean value engine model, fuzzy logic control and spiking neural network. ............................................................................. Nomenclatures Symbol Description unit Symbol Description unit A Area m2 . N Angular acceleration rad/s2 C1 and C2 Acceleration coefficients of PSO method N Population size Cd Discharge Coefficient Pa Ambient Pressure N/m2 Dth Throttle Valve Diameter m Pc Critical Pressure N/m2 SPIKING NEURAL NETWORKS BASED PID LIKE FLC DESIGN FOR AN IDLE SPEED CONTROL OF AN AUTOMOTIVE ENGINE Asst. Prof. Dr. Mohammed Y. Hassan, University of Technology, Control and Systems Department, Baghdad, Iraq. E-mail: 60003@uotechnology.edu.iq Muslim Abdulameer Alghazali, University of Technology, Control and Systems Department, Baghdad, Iraq. E-mail: Muslim_control@yahoo.com Received on 23 October 2017 Accepted on 27 December 2017 Published on 15 March 2018 mailto:60003@uotechnology.edu.iq mailto:Muslim_control@yahoo.com AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 630 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. INTRODUCTION Most of the automotive machines use in everyday life equipped with gasoline Port Fuel Injection (PFI) engines. Ordinarily these engines are of Spark Ignited (SI), four strokes and Otto cycle based conversion of chemical energy from fuel to mechanical energy [1]. These engines run in different operating conditions during their life cycle such as cold start, idling, cruising…etc. These operating conditions are different fro each other in objectives and performance. At idle operating mode that characterizes by low speed of engine ordinarily between (750-1400) revolution per minute (rpm) [1] valve of the throttle is closed. Idle speed control is represented one of difficult and public problem in engine of automotive, because of nonlinearity, complexity and time delay presented by the system. So, a controller is compensated for error in speed is needed. The controllers have to supply best dk Delay of specific synapse m.s Pex Exhaust Gas Pressure N/m2 E Error Pm Intake Manifold Pressure N/m2 I Neuron sequence in hidden layer QHV Heating Value of Fuel J/kg J Neuron sequence in output layer r1 and r2 Random numbers Vm Intake Manifold Volume m3 Rmax and Rmin Minimum and Maximum value in the pattern J Moment of Inertia kg. m2 R Constant of Gas J/Kg.K K Synapse sequence in the connection Rp Pressure Ratio m3 cma . Mass flow rate of air into the cylinders kg Vc Clearance Volume m3 Mf Mass of Fuel for One Cycle kg/s Vd Displacement Volume N.m . mf f Mass Flow Rate of air past the throttle kg/s Ta Ambient Temperature K . mf Mass flow rate of fuel that enters the cylinder kg/s Tm Intake Manifold Temperature K . mat Mass flow rate of the fuel film kg/s it T Intake to Torque Production Delay S . mf v Mass flow rate of the fuel vapor kg/s st T Spark to Torque Production Delay S . mf i Mass flow rate of the injected fuel kg/s X Fuel Film Fraction N Rotational Speed of Engine Rp m Z Number of cylinders AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 631 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. results with improved economic in fuel and emissions reduction. Many of the control methodologies for the problem of idle speed suggested during the past decades. Different papers discussed idle speed control techniques with the corresponding control oriented model used were published. This includes control techniques based on different modern control alternatives such as Linear Quadratic (LQ), Fuzzy Logic techniques and Neural Network. Panse, [1] presented a dynamic-oriented control mean value engine model of a PFI engine. The controller is developed by PID to idle mode which used throttle valve to regulate the speed. The development of successful controller maintained the stable state of the idle speed in the simulation. Santes et al., [2] presented the ISC as one of problems of calculating a greater group set for a modeling of crossbred system for SI engine. The problem is represented by computing a maximum set of safe for a crossbred system modeling of an SI engine. An algorithm in the discrete time domain was proposed for the determination of the maximal safe set without assuming synchronization between sampling time and switching time for idle control. Simulation results showed increasing efficiency of the proposed approach. Gibson et al., [3] presented lead reparations analysis, feed-forward and design techniques to monitor disorder for ISC system with minimum reserve spark level. A reduction of 30 per cent in the maximum reduction of the speed of engine was obtained compared with an ISC with no observer compensation disorder lead. The disturbance rejection response is compared with response from conventional idle speed control with high levels of spark reverse. A cylinder by cylinder non-linear engine model and idle speed control simulation were used to prove the results of linear simulation. Ghaffari et al. [4] presented a modeling of a spark ignition engine and demonstrated capabilities of Simulink to full engine model. A PID adapting method which used an adaptive FLC for modeling the relation between gains of the controller and the response of target output, with the specifications set response by required percentage settling time and overshoot, was designed. The adaptive FLC used to tune online the gains of PID for different response of specifications. The results showed that better performances achieved with the full controller. Syed et al. [5], presented the process in field of automotive to implement the rule-based fuzzy gain scheduling PI controller to control the engine power required and behavior of speed in the power-split Hybrid Electric Vehicles (HEV). The improvements include elimination of the overshoots as well as approximate by 50% faster response and settling times in comparison with the conventional linear PI control approach. Wong et al. [6] in 2009 presented a non-linear model algorithm of predictive control for AFR organization based the online Neural Networks. The implementation of the control in the real car as a check. The actual result of the test showed that the engine air ratio can be regulated to the stoichiometric value (1.0). Liu and Zhou, [7] in 2010 described a simulation based Fuzzy Neural Network (FNN). The engine model used here is a MVEM that incorporates nonlinearities and time delays exhibited by the system. This model consisted of three important subsystems that represented the behaviors of the fuel, the acceleration of the crankshaft and the intake manifold dynamics. They found that the error of Air Fuel Ratio (AFR) is large under transient conditions, when throttle degree is changed. When using a FNN controller, the AFR errors can be controlled to a tight range. The system has smaller overshoot lower adjust the time. Angel et al. [9] presented a FLC to maintain stoichiometric AFR in the engine for achieving a required ratio for emissions reduction, energetic efficiency improvement and power generation, with a reduction in the temperatures operating of an engine. The control is accomplished with precision devices led by the Electronic Control Unit (ECU). It is essentially a logical device that is responsible for maintaining a stoichiometric air-fuel ratio. Xiaocheng et al. [10] analyzed a PID control, FLC and PID like FLC are designed, by applied these three controllers to ISC of the automotive gas engines. They found that the PID like FLC is of high progress during contrastive analyses in control effect of the three controllers in the process of cooling high idle start, switching high to low idle and low to high idle. Shamekhi et al. [11] proposed a MVEM and ANNs by including them in mean value model. They presented a real-time model with high definition and dedication for the engines of spark ignition, as fully as possible. By incorporating the Neural Networks into the mathematical approximation relationships of the engine, they named the model as Neuro-MVEM, which is able to accurately predict the engine (transient and steady states) outputs such as torque producing, emission and speed engine in real time. AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 632 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. As mentioned above, no papers have been reviewed had developed a model for the entire engine or for its behavior of transient. The above-mentioned work is almost limited to predict some of the static state characteristics of the combustion subsystem. In this paper, combination of fuzzy logic control and spiking neural networks to control the Mean Value Engine Model is presented, the SNN uses to adapt the inputs and output gains of PIDFC and uses the PSO algorithm to train the weights of SNN. A complete engine model which is able to closely indicating dynamic of engine and transient performances and emissions pollutant is built. 1. MEAN VALUE ENGINE MODEL OF SI ENGINE The automotive engine is modeled using a class of models called Mean Value Engine Models (MVEMs). 1.1. Engine Modeling The model is including fuel, air and rotational dynamics also process delay attendant in the engine. In SI engine, it is useful to divide it in separate subsystems [12]. The subsystems are: 1- Intake air dynamics. 2- Fuel dynamics. 3- Crankshaft dynamics. 1- Intake air path dynamics: It is divided in to : A-Throttle body: The mass flow of air in cylinder, and thus power of output engine is controlled by the throttle valve. It is opened depending on the position of pedal. The air mass flow through the throttle valve can be modeled as a gas flow through an orifice. This is calculated as a function of two variables: the area available for the flow (A(t)) and the pressure ratio across the throttle section[12]: . B- Intake manifold dynamics: It can be represented by a first order differential equation, the changing rate of manifold pressure is proportionate to the difference between mass of air flow into the manifold and the pumped mass of air into intake port as given below [13]: )( . )( . tma Vm RTm tPm  Where . )( . )( . )( tmactmattma  C- Air induced in cylinders: The mass flow rate of the mixtures of exhaust gases and air is calculated using this concept where its mathematical expression is as follow [13]: vVdz tN RTm tPm tmac    )( 4 )( )( . ))(())(( tPm Pm tN Nv   Where: ))(( 2 )( 1 ))(( tNtNtN N    )())(( )( )( . tAtRp RTa tPa Cdtmat  (1) (2) (3) (6) (5) (4) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 633 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved.   1 ) )( ( tPm Pex Vd Vc Vd VdVc Pm    2- Fuel Path Dynamics Fuel dynamic is important for the in cylinders AFR calculation. In general, it is difficult to accurate the fuel dynamics model, because the model parameters depend on the characteristics of fuel and engine temperature during its operation [15]. The injector of fuel is injected fuel as pulses when the valve of intake is close [1]. Part of the injected fuel hits the wall of manifold and forms thin film on it. This fuel film on the intake port evaporates constantly, therefore, the net fuel flow rate entering the cylinders consists of no impinging part of the fuel injection and the fuel evaporated from the intake port walls, Dynamics of fuel may be represented by the equations [15]: )( 1 )( . )( . tmff f tfimxtffm   The AFR is to remain at (14.673) [7]. The injections of fuel . mf i are adjusted for progress of the charge air. The charged of air to the cylinders is divided by AFR to supply the feed-forward command of fuel flow. 3- Crankshaft Dynamics The variable crankshaft of important is the speed of revolution express in rpm or rad per second (rad/sec) that depended on the production torque by cylinders through stroke expansion. Three models should dissect distinctly in the dynamic model of crankshaft. These are: torque production, delays of process and dynamics rotation.al of the engine. A- Torque Production Model It is depended in a non-linear type on the air mass loaded to the cylinders; AFR is taken during the timing of spark, earlier intake stroke and mass of remaining gases [9]. The model described here is a mean value model uses the notation of mean effective pressure (mep), since it depended on the same variables that effect the torque of engine, as well as, the torque function is just an expansion of the break mean effective pressure (bmep) function. It's expression as follows [9]: )( 4 )(/ . HV Q)( )( tNVdtFA tmac t fe mep      and the bmep is expressed as follows [1]: ))(),(( 4 HV Q )()/( ))(())(),(( )( tPmtN VdtNFA tNtNtPmmac tbmep          and (7) )( . )1()( . tfimxtfvm  )( 1 )( . )( . tmff f tfvmtfm   (8) (9) (10) (11) (12) (13) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 634 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. Vd Tb bmep 4   So    4 ))(),(( )()(/ ))(())((),(( Vd tPmtN HV Q tNtFA tNtPmtNmac Tb     B- Process Delays Model It is depending on the speed of engine. To add the discrete behavior of the engine to this model, two delays are included in the model, intake and spark to delay the torque production [14]. By incorporation the delays in equation (14) give: (15)    4 ))(),(( )()(/ ))(()( Vd tPmtN HV Q tNtFA tN it Ttmac Tb     C- Rotational Dynamics Model It is acquired by applying second law of Newton for rotational motion: [1] Tnet is calculated from the difference between the production torque by the cylinders and the sum of all the load torques placed on the engine. The load torque (Td) value usually varies around (30N.m) for low and medium range of engine speeds [12]. The fuel consumption (F.C) is the consumed fuel by the engine during the period of operation. In this paper this can be calculated by summing the injected fuel (mfi) at each sample time [4]. 2.2. Parameters Identification In this paper, the simulation is done for a Mitsubishi motor of engine model No.4G64 .The 4G64 engine is a single overhead camshaft, 4 cylinders, 4 valves per cylinder gasoline powered, four strokes, PFI and SI engine prototype with idle speed equals to 955 RPM. All the physical parameters used in the model are listed in table (1) . The engine geometry Parameters needed in the model is listed in table (2), the coefficients of the curve fitting equations used in the model are listed in table (3). 2.3. Simulation Results The open loop dynamics for the nonlinear engine model has been obtained for step change in the throttle angle without and with applying variable value of the Load Torque (Td) as explained below: (14) . NJTnet  (16) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 635 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. a) Step in the Throttle Angle with no Load Torque: a step change in the throttle angle is applied to the model within a range of 9.1558 degree (0.159 rad) to 9.1959 degree (0.161 rad) at 10 seconds [1]. The engine rotational speed is shown in Figure (1). b) Applied about Load Torque: The load of engine during idling is of variable nature and this could be the source of sudden rise or drop in speed of engine [1]. The nonlinear model is loaded with variable values of load torque. The load torque is applied first as a step change form to represent the loads that affect suddenly. Then a trapezoidal signal used to represent the loads is increased gradually [16]. Finally a sine wave signal is also used to represent the load torque .The loads were applied with the same step change in the throttle angle that was used before. The open loop responses are shown in Figure (2). Figure1: (A) Open loop speed response. (B) Air Fuel Ratio. Table 1: Physical constants[1] . Parameter Value α0 0.1379 rad Dth 86.5*10-3 m Aleak *10-6 m25.3 Vm 2.351*10-3 m3 Vd 2.77*10-3 m3 Vc 0.277*10 -3 m3 J 0.3 Kg.m2 Table 3: equations coefficients Parameter Value R 287 J/Kg.K Ta 298 K Pa 105 N/m2  1.35 Tm 340 K Cd 0.7 Pex 1.08*10 5 N/m2 Parameter Value  0.45 3.42*10-3 sec 2  -7.7*10-6 sec2  0.16 J/kg 1  2.21*10-3   15.6 N.m 1  0.175*10-3 1  Table 2: Engine parameter [1] . 0 5 10 15 20 25 30 -200 0 200 400 600 800 1000 0 5 10 15 20 25 30 14 15 16 17 18 19 20 21 E n g in e s p e e d ( R P M ) Time (sec) Time (sec) a) b) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 636 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. Figure 2: Open loop dynamics of the MVEM with applying different values of load torque. (A) Speed response. (B) Load torque. 2. IDLE SPEED CONTROLLER DESIGN The design of intelligent controller for automotive engine is considered. The ISC is formalized as a control problem, where the stalling of engine must be prevented despite of load varying and acting. So, the model of engine with the controller designed had to obtain the idle rotational speed with minimum steady state error, minimum undershoot, minimum overshoot and reach as fast as possible to the target rotational speed. One successful control technique is fuzzy control which originates from the human experiences. The objective of the Fuzzy Logic Control (FLC) systems is to control complex process by experience of human being." The idle speed controller designed in paper is of PID-like FLC to recompense for the descend in the engine rotation speed, it uses the throttle angle only. 2.1. Fuzzy Logic Control (FLC) Design It is a PID like Fuzzy Controller PIDFC is developed. This controller uses the discrete from with minimum structure form of the conventional PID controller equation as follows:  )()()( ke T Ki keKdTkKpeu where e(k) is the error signal and the index (k) represents the present sampling instant and assumed that the sampling time equals to 1 sec. "It is clear from the equation that the controller has three inputs. If seven fuzzy sets are used for each input, then a (7*7*7=343) rules will be needed for the controller. Also, each rule will have three conditions in its antecedent part, which is very difficult to design such controller and needs too much work [17]. To avoid such problems, the PIDFC is constructed as a parallel structure of PD like Fuzzy Controller PDFC and PI like Fuzzy Controller PIFC. As a result, the equation of the PIDFC will be: PIDFC=( PDFC+PIFC )Ko Where )()( keKdkKpePDFC  (17) (18) (19) 0 10 20 30 40 50 60 70 80 0 100 200 300 400 500 600 700 800 900 1000 0 10 20 30 40 50 60 70 80 0 5 10 15 20 25 30 35 E n g in e s p e e d ( R P M ) Time (sec) Time (sec) L o a d T o rq u e ( N .m ) a) b) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 637 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. And  PDFCPIFC Each controller will need two inputs only. With seven fuzzy sets for each input, this result in 49 rules which will be needed. So, the PIDFC will need (49) rules only. Moreover, the PIDFC is designed using Mamdani type [13]. It has two inputs e(k) and Δe(k) and one output. The inputs are defined as follows: )()()( kykrke  )1()()(  kekeke Moreover, all the membership functions of the FLC inputs and output are defined on the common normalized domain [-1, 1],and the triangular and trapezoidal membership are used. The rule base for computing the output (u(k) (Δu(k)) )is listed in Table (4) . The selection of rules shown is based on the knowledge of the behavior of the error equation. Table 4: Rule base of the PIDFC. The scaling factors of FLC are tuned manually. The error allowed using this scaling factors, a set of PIDFC gains are (Kp=0.018, Ko=0.15 and Kd=0.008). 2.2. PIDFC Simulation Results………………………………………………………… The closed loop system with PIDFC controller is simulated by applying variable values of the load torque and disturbance discussed below: a) Applying the Load Torque: A variable value of a load torque is applied to the closed loop system in order to check the ability of controller to the reference tracking of idle speed (equals to 955 rpm) in the presence of load torque. The constant load torque of (30 N.m) is applied after 15 seconds to ensure enough time to examine the speed response and it is removed in the 25th second. Figure (3) shows the engine speed response obtained using PIDFC with applying constant load torque and without disturbance. The overshoot equals to 290 rpm, undershoot equals to 158 rpm, settling time equals to 1.5 sec and fuel consumption equals to 0.0017 kg. b) Applying Load Torque with Disturbance: Controller robustness should be achieved with respect to parameter uncertainties and unmolded dynamics, represented by engine load torque and disturbance [4]. So, a random value of disturbance ranging between ±10% of the load torque was applied to test the controller ability to overcome noisy disturbance. Figure (4) shows the engine speed response obtained using PIDFC with applying constant load torque and with disturbance. The overshoot equals to 294 rpm, NB NM NS Z PS PM PB NB PB PB PB PB PM PS Z NM PB PB PB PM PS Z NS NS PB PB PM PS Z NS NM Z PB PM PS Z NS NM NB PS PM PS Z NS NM NB NB PM PS Z NS NM NB NB NB PB Z NS NM NB NB NB NB (21) (22) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 638 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. undershoot equals to 164 rpm, settling time equals to 1.5 sec and fuel consumption equals to 0.00187kg. Figure 3. Simulation results of the closed loop system with PIDFC (a): Engine speed with constant load torque (b): Control signal (throttle angle) Figure 3: Simulation results of the closed loop system with PIDFC. (A) Engine speed with constant load torque. (B) Control signal (throttle angle). Figure 4. Simulation results of the closed loop system with PIDFC (a): Engine speed with constant load torque (b): Load torque Figure 4: Simulation results of the closed loop system with PIDFC. (A) Engine speed with constant load torque. (B) Load torque. . 4. SPIKING NEURAL NETWORK (SNN) In this work, a SNN is used to on-line adapt the inputs and output gains (scaling factors) of the FLC. The SNN weights are trained using PSO algorithm to reach the desired idle speed of the engine with better performances. As a result, fuel emissions are reduced and fuel economy is obtained. 0 5 10 15 20 25 30 0 200 400 600 800 1000 1200 1400 0 5 10 15 20 25 30 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 E n g in e s p e e d ( R P M ) Time (sec) Time (sec) b) T h ro tt le a n g le (r a d ) 0 5 10 15 20 25 30 0 200 400 600 800 1000 1200 1400 0 5 10 15 20 25 30 -5 0 5 10 15 20 25 30 35 E n g in e s p e e d ( R P M ) Time (sec) Time (sec) a) b) L o a d T o rq u e ( N .M ) a) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 639 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. The structure of the proposed SNN is shown in Figure (5) . As can be seen from this figure, the SNN consists of one node in the input layer which receives the error in engine speed In the output layer of SNN, three nodes are used to represent the gains of the controller (Kp , Kd and Ko). The simulation of closed loop is shown in Figure (6) . Figure 5: Proposed Structure of the SNN. Figure 6: Simulink of closed loop system of the engine model with SNNs based PIDFC. 4.1. SNN training using PSO Algorithm The particle swarm is used as an optimization algorithm to find the best weights of SNNs to obtain accurate speed engine response with minimum undershoot, minimum overshoot and minimum settling time. This minimization gives closer matching between the desired and the actual idle speed. The PSO is initialized randomly. However, the convergence speed is sensitivity to the initialization. The design of control is used the optimal solution supplied by the SNNs based PSO. Kp Ko Kd e AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 640 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. As the fitness function which uses to evaluate the fitness of each particle during tuning process with PSO, the Root Mean Squared Error (RMSE) and the overshoot in speed response are included in the fitness function to reach the required speed specifications. The fitness function is selected as: F=RMSE*0.09+ (overshoot*0.01) (23) Where RMSE = 1 𝑀 ∑ √𝑒2 and M : is the number of samples The general specifications of SNN are presented in the Table (5) . The number of units in Input /Output are 1and 3, respectively. The other specifications of the PSO are the number of birds is 50, the steps of birds is 30, the learning factors (C1,C2) are both equals to 4 and the number of weights to SNN equals to 60. By training the SNN using idle speed response without and with varying load torque, disturbance and changing the ambient temperature to reach the minimum RMSE, it is found that the best number of hidden nodes equals to (5) and the best weights for hidden and output layer equals to 60 weights as listed in Appendix A. 4.2. Simulation Results of SNN based PIDFC (SNN-PIDFC) A SNN-PIDFC has the ability to deal with this nonlinearity and to achieve speed tracking performance with minimum speed error. The input of the spiking is the error which is converted to times of spike. The output signals of SNN are also spike characterized with time of spike. This time of spike is converted to real numbers that enter to the model input as scaling factors of the Fuzzy Controller. In order to test the behavior of the proposed controller, the training algorithms give weights that are used in this SNN as a feed-forward network to generate the required gains during the synthesis of the input signals of the SNN control system. The closed loop system with SNN-PIDFC controller is simulated with applying variable values of the load torque without and with disturbance as discussed below: a) Applying the Load Torque: Figure (7) shows the engine speed response obtained using fuzzy controller by applying constant load torque and without disturbance. It can be show from the results that the overshoot equals to 87 RPM, undershoot equals to 7 RPM, settling time equals to 0.245 sec and fuel consumption equals to 0.000785 Kg. b) Applying Load Torque with Disturbance: Figure (8) shows the engine speed response obtained using the controller with applying constant load torque and with disturbance. It can be show from the results that the overshoot equals to 87 rpm, undershoot equals to 83 rpm, settling time equals to 0.245 sec and fuel consumption equals to 0.000809 Kg. AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 641 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. Figure 7: (A) Simulation results of the closed loop system with SNNs based PIDFC with applying constant load torque. , (B) Control signal (throttle angle). Figure 8: (A) Simulation results with SNNs based PIDFC to engine speed with applying constant load torque with disturbance. , (B) Control signal (throttle angle). CONCLUSIONS To achieve an improvement on the speed response, a SNN based PIDFC (SNN-PIDFC) was designed and good improvement has been obtained. The SNN was used to adapt the inputs and output gains of PIDFC. Simulation results with using SNN-PIDFC showed that the peak overshoot is reduced to about (70%) as compared with using PIDFC only for the same value of the load torque, the undershoot is reduced to about (50%) as compared with using PIDFC. The settling time is 0 5 10 15 20 25 30 0 200 400 600 800 1000 1200 0 5 10 15 20 25 30 -0.5 0 0.5 1 1.5 2 2.5 3 E n g in e s p e e d ( R P M ) Time (sec) Time (sec) a) ) b) 0 5 10 15 20 25 30 0 200 400 600 800 1000 1200 0 5 10 15 20 25 30 -0.5 0 0.5 1 1.5 2 2.5 3 E n g in e s p e e d ( R P M ) Time (sec) Time (sec) T h ro tt le a n g le ( ra d ) T h ro tt le a n g le ( ra d ) a) ) b) AL-QADISIYAH JOURNAL FOR ENGINEERING SCIENCES Vol. 10, No. 4 ISSN: 1998-4456 Page 642 Copyright  2017 Al-Qadisiyah Journal For Engineering Sciences. All rights reserved. reduced by (83 %) as compared with using PIDFC. Fuel consumed is reduced by (53 %) as compared with using PIDFC. Finally, it can be concluded that the SNN-PIDFC can be used to control the idle speed mode in the four stroke, four cylinders PFI, SI engines by controlling the throttle valve and, thereby, the mass of air loaded to the engine. Fuel particles are reduced, thus the engine consumes less fuel. This also reduces air pollution and preserve the environment of earth, especially, the fuel will decrease in nature which increases it's price. REFERENCES 1. P. A. Panse , "Dynamic Modeling and Control of Port Fuel Injection Engines", Master Thesis, Indian Institute of Technology, 2005, India. 2. E. D. Santis, M. D. D. Benedetto, and G. Girasole , "Digital Idle Speed Control of Automotive Engines Using Hybrid Models", IFAC, 2005. 3. A. Gibson, I. Kolmanovsky, and D. Hrovat , "Application of Disturbance Observer to Automotive Engine Idle Speed Control for Fuel Economy Improvement", Proceedings of the IEEE American Control Conference, 14-16 June 2006, Minnesota, USA. 4. A Ghaffari, AH Shamekhi, A Saki and E Kamrani. , " Adaptive Fuzzy Control for Air-Fuel Ratio of Automobile Spark Ignition Engine" World Academy of Science, Engineering and Technology, Vol. 48, PP. 284-292, 2008. 5. U. Syed and L. Kuang , "Fuzzy Gain-Scheduling Proportional–Integral Control for Improving Engine Power and Speed Behavior in a Hybrid Electric Vehicle" , IEEE Transactions on Vehicular Technology, Vol. 58, No. 1, PP 69-83, January 2009 6. P.K. Wong and C. M. Vong , "Predictive Air-Ratio Controller for Automotive Engines based on Online Neural Network: design and experimental evaluation", 9th IEEE/ACIS International Conference on Computer and Information Science, PP. 275-291, 2010. 7. L. Qiang and Z. Cai , "A Fuzzy Neural Network and Application to Air-Fuel Ratio Control under Gasoline Engine Transient Condition", IEEE International Conference on Intelligent System Design and Engineering Application, PP. 24-26, 2010. 8. H. Ming and G. Yang , “A genetic-fuzzy system for modeling of selected processes in diesel engine fuelled by biofuels,” in Recent Developments and Prospects, ser. Biofuel Production. intech, Vol. 22, pp. 561 – 576, 2011. 9. M. A. M. Morelos, M. J. Anzurez , "Fuzzy Control Strategy for Stoichiometric Air-Fuel Mixture in Automotive Systems", Proceeding in World Automation Congress, 2012. 10. G. Xiaocheng, X. Zhongming, L.Jingbo2 and Z. Bowen , " Fuzzy PID Model -Based Study on Idle Control of Gas Engine", Bentham Open, Vol.8, PP.660-666, 2014. 11. A. Mohammad and A. H. Shamekhi , " Expert Systems with Applications", Published by Elsevier Ltd, Vol. 27,PP. 1-27, 2015. 12. F. Pettersson , "Simulation of a Turbo Charged Spark Ignited Engine" Linkoping University, May 2000, Sweden. 13. S. Boveie, P. Cerf, and J. M. L. Quellec , "Fuzzy Sliding Mode Control Application to Idle Speed Control", Proceeding of the 3rd IEEE Conference on Fuzzy Systems, Vol. 2, PP. 974-977, 26-29 June 1994, Orlando. 14. R. Kruse, J. Gebhardt , and F. Klawonn , "A Fuzzy Controller for Idle Speed Regulation", Proceedings of the ACM symposium on Applied computing, 1994, U.S.A 15. R. G. Ford , "Robust Automotive Idle Speed Control in a Novel Framework" Ph.D. Dissertation, University of Cambridge, September 2008. 16. D. Mieczysław and C. Jacek , " Modeling and verification failures of a Combustion Engine Injection System " , TEKA Kom. Mot. Energ. Roln., 2011 17. M. M. Polonskii , "Complex System Simulation Using Matlab/Simulink", Technology Interface Electronic Journal Supported by Ball State University, Vol. 4, No.1, winter 2000.