Reverse modeling of a diesel engine performance by ...

7 downloads 47150 Views 116KB Size Report
automotive control systems and it has become a common design technology in ... to be done between the same data set points and the nearest new centroid. ... where m is any real number greater than 1, uij is the degree of membership of xi ..... [5] C. V. Altrock, Fuzzy Logic in Automotive Engineering, Circuit Cellar INK, The.
International Conference on Computer Systems and Technologies - CompSysTech’07

Reverse modeling of a diesel engine performance by FCM and ANFIS Kemal Tutuncu

Novruz Allahverdi

Abstract: The paper includes reverse modeling of a diesel engine performance and emission characteristics. Modeling is done by fuzzy clustering method (FCM) and Adaptive Neural Fuzzy Inference System (ANFIS). Firstly, outputs and inputs parameters of a diesel engine were replaced as part of system. Later, these parameters were grouped into optimal numbers independently by using FCM and K-means clustering algorithm. Later on, these optimal numbers of clustered parameters were used as inputs and outputs of ANFIS to model engine performance and emissions characteristic. Input of the systems were power, torque, specific fuel consumption (sfc), nox, co2 and hc whereas outputs were air flow ratio, fuel rate, pboost, load and cycle. It has been seen that the best results obtained from ANFIS system by using FCM. What the proposed system makes different from pioneers are to be first study of reverse modeling and finding results as intervals instead of points. One more thing is that the load factor has never been implemented in previous studies but included in this study. Last but not least, the proposed system finds outputs in correct optimal interval as 100% ratio by FCM clustering and ANFIS. Key words: FCM, K-means, ANFIS, engine performance, clustering.

1. INTRODUCTION Artificial intelligence (AI) systems are accepted as a technology that offers an alternative way to tackle non-linear and highly complex problems that can’t be modeled in mathematics. They can learn from examples and they are able to handle noisy and incomplete data. Once they are trained they can perform prediction and generalization at high speed. They have been used in diverse applications in control, robotics, pattern recognition, forecasting, medicine, power systems, manufacturing, optimization and signal processing. AI systems comprise areas like, expert systems, artificial neural networks, genetic algorithms, fuzzy logic and various hybrid systems, which combine two or more techniques. AI techniques also play an important role in modeling and prediction of the performance and emission characteristic of internal combustion (IC) diesel engines. By using different AI systems, controlling and modeling of different parameters of IC diesel engines such as air-fuel ratio, ignition timing of a spark ignition, emission and etc. have been done till today in effective ways. When these systems compared with traditional control and modeling systems, it has been seen that novel AI systems are better than traditional model in terms of efficiency, robustness, reliability and optimality. Engine test are being done by automotive manufacturers and researchers for the aims of determining engine performance values, putting forward effects of modifications on engine to engine performance and determining variations that are brought about when alternative fuels are used. As the results of the experiments and researches that go on hundreds of years on the engine, big advances have been recorded. Not only these experiments are expensive, time consuming and costly but also cause negative conditions for human health, environment pollution and labor force. At the same time, some negative situations such as being defective and abrasion for some parts of engine, supplying required experimental engine conditions during measurement, limited measurement range and variable measurement sensitivity are mostly seen as negative situations [1, 2, 3]. First industrial application of fuzzy logic was in 1970 by E. Mamdani. He used fuzzy logic to control a steam generator that he could not get under control with conventional techniques [4]. Over the past years, fuzzy logic has significantly influenced the design of automotive control systems and it has become a common design technology in Japan, Korea, Germany, Sweden, and France [5]. First applications of the fuzzy expert systems (FES) in automotive sector were in wide varieties of fields such as effective and stable control of car engine (Nissan), “Cruise-control” for automobile (Nissan, Subaru), ABS system to prevent tires being locked for trailer equipped with electrics, FL based automotive fuel injection control system, - spinning IIIA.10-1 -prevention system for vehicles with

International Conference on Computer Systems and Technologies - CompSysTech’07

electrics, controlling of car cooling system, controlling automobile air bag, expert system for detection of automobile failure, four-wheel steering control design method for automotive vehicles, energy management and power control strategy for parallel hybrid vehicles and automotive emission control. As it can be seen from examples, FES have been found a lot of application fields ranging from engine speed control to automatic pilot in aircraft [6, 7, 8, 9, 10, 4, 11, 12, 13, 14]. One of the most effective application fields of FL and FC is control systems. Traditional control system can be converted to FC systems with the help of fuzzy theory application of this kind of system causes to gain so many advantages. Generally, Fuzzy systems (FSs) are based on information or rules. It means that the foundation of a FS is based on “If-then” rules [15]. 2. MATERIAL AND METHOD 2.1. MATERIAL P4 3.2 GHz Computer, Fuzzy Logic Toolbox of Matlab 6.5 Release 13® version and experimental data on 300PS E1 J1 heavy torque diesel engine were used as material of this study. 2.2. METHOD ANFIS, FCM and k-means were used to build the proposed system. So, brief information about them will be given first. 2.2.1. ANFIS The acronym ANFIS derives its name from adaptive neuro-fuzzy inference system. Using a given input/output data set, ANFIS constructs a fuzzy inference system (FIS) whose membership function parameters are tuned (adjusted) using either a backpropagation algorithm alone, or in combination with a least squares type of method. This allows your FSs to learn from the data they are modeling. FIS Structure and Parameter Adjustment A network-type structure similar to that of a neural network, which maps inputs through input membership functions and associated parameters, and then through output membership functions and associated parameters to outputs, can be used to interpret the input/output map. The parameters associated with the membership functions will change through the learning process. The computation of these parameters (or their adjustment) is facilitated by a gradient vector, which provides a measure of how well the fuzzy inference system is modeling the input/output data for a given set of parameters. Once the gradient vector is obtained, any of several optimization routines could be applied in order to adjust the parameters so as to reduce some error measure (usually defined by the sum of the squared difference between actual and desired outputs). ANFIS uses either back propagation or a combination of least squares estimation and backpropagation for membership function parameter estimation. 2.2.2 K-MEANS K-means by MacQueen [16] is one of the simplest unsupervised learning algorithms that solve the well known clustering problem. The procedure follows a simple and easy way to classify a given data set through a certain number of clusters (assume k clusters) fixed a priori. The main idea is to define k-centroids, one for each cluster. These centroids shoud be placed in a cunning way because of different location causes different result. So, the better choice is to place them as much as possible far away from each other. The next step is to take each point belonging to a -given data- set and associate it to the nearest IIIA.10-2

International Conference on Computer Systems and Technologies - CompSysTech’07

centroid. When no point is pending, the first step is completed and an early groupage is done. At this point we need to re-calculate k new centroids as bary centers of the clusters resulting from the previous step. After we have these k new centroids, a new binding has to be done between the same data set points and the nearest new centroid. A loop has been generated. As a result of this loop we may notice that the k-centroids change their location step by step until no more changes are done. In other words centroids do not move any more. Finally, this algorithm aims at minimizing an objective function, in this case a squared error function. The objective function

where

is a chosen distance measure between a data point

and the cluster

centre , is an indicator of the distance of the n data points from their respective cluster centers. For validity index of k-means clustering silhouette function of MATLAB Toolbox is used. Silhouette(X, clust) plots cluster silhouettes for the n-by-p data matrix X, with clusters defined by clust. Rows of X correspond to points, columns correspond to coordinates. Clust can be a numeric vector containing a cluster index for each point, or a character matrix or cell array of strings containing a cluster name for each point. Silhouette treats NaNs or empty strings in clust as missing values, and ignores the corresponding rows of X. By default, silhouette uses the squared Euclidean distance between points in X. Clustering with maximum silhouette value means optimal grouping. 2.2.3. FUZZY C MEANS Fuzzy c-means (FCM) is a method of clustering which allows one piece of data to belong to two or more clusters. This method by Bezdek [17] is frequently used in pattern recognition. It is based on minimization of the following objective function:

, where m is any real number greater than 1, uij is the degree of membership of xi in the cluster j, xi is the ith of d-dimensional measured data, cj is the d-dimension center of the cluster, and ||*|| is any norm expressing the similarity between any measured data and the center. Fuzzy partitioning is carried out through an iterative optimization of the objective function shown above, with the update of membership uij and the cluster centers cj by:

, This iteration will stop when , where is a termination criterion between 0 and 1, whereas k are the iteration steps. This procedure converges to a local minimum or a saddle point of Jm. - IIIA.10-3 -

International Conference on Computer Systems and Technologies - CompSysTech’07

In this work, the PBM index is used to evaluate the number of clusters in the data set. The PBM index is defined as a product of three factors, of which the maximization ensures that the partition has a small number of compact clusters with large separation between at least two of them. Mathematically the PBM index is defined as follows:

where K is the number of clusters. The factor E1 is the sum of the distances of each sample to the geometric center of all samples w0 . This factor does not depend on the number of clusters and is computed as: The factor EK is the sum of within cluster distances of K clusters, weighted by the corresponding membership value:

and DK that represents the maximum separation of each pair of clusters: The PBM index has achieved a good performance in several data when compared with the Xie-Beni index [16]. This index is thus used as a validity index of the methodology presented in this work. 2.2.4. PROPOSED SYSTEM In order to implement reverse modeling of diesel engine performance and emission characteristic the inputs and outputs of the system in Fig. 1 is replaced as in Fig. 2. Each input and output variable consists of one dimensional 54 points. The data is obtained after engine test in Ford Izmit Manufacturing Company. Air flow rate Pboost Fuel Rate Cycle Load

Diesel Engine

Power Torque Sfc Hc Nox Co2

Figure 1. Inputs and outputs of a diesel engine Power Torque Sfc Hc Nox Co2

Diesel Engine

Air flow rate Pboost Fuel Rate Cycle Load

Figure 2. Reversed input and outputs of a diesel engine Later on for each input and output FCM and k-means clustering algorithm were applied independently. Since we would like to find out optimal interval for output of our system, both inputs and output of the system were clustered to the intervals. The optimal - IIIA.10-4 -

International Conference on Computer Systems and Technologies - CompSysTech’07

number of clusters found by FCM and k-means are shown in Table 1 and Table 2 respectively. To find optimal number of clusters PBM validity index is used For FCM whereas silhouette index is used for k-means. As can be seen from tables there are huge difference between FCM and k-means regarding to optimal clustering number for inputs and outputs. It should also be noted that, both clustering algorithm uses random initial points at each run. This causes change in number of clusters and run the clustering algorithms many times to take the biggest value. This process of this study can be named as preprocessing. Table 1. Optimal number of clusters for inputs and outputs by FCM clustering PBM index Inp

ind

val

ind

val

ind

val

ind

val

ind

val

ind

val

ind

val

ind

val

Pow Tor Sfc Nox

17 23 25 14

10 17 10 4,9

22 26 26 15

12 18 20 4,7

17 25 25 10

9,6 26 10 4,5

22 26 26 13

11 23 7,1 4,8

26 20 21 14

19 15 7,5 4,9

16 26 26 19

9,9 23 8,4 4,7

17 25 23 10

9,2 17 6,5 4,5

21 20 20 14

10 19 6,5 5

HC Co2 Out FuR AiF Loa

26 23

1,5 9,2

25 9

1,7 7,2

14 25

1,3 9,7

26 8

1,7 7,1

25 26

1,5 10

24 8

1,9 7,1

24 26

1,2 7,4

23 8

1,6 7,1

11 25 18

6 4,9 19

11 15 16

6,5 4,1 26

10 14 19

6,4 4,4 39

24 22 19

7,4 4,2 21

19 14 18

6,5 4,4 36

18 22 17

6,7 4,1 20

14 13 14

7,4 4,5 20

18 26 18

6,7 4 36

Cyc

7

5,8

7

5,8

6

5,7

6

5,7

6

5,6

7

5,8

7

5,8

7

5,9

Pbo

23

2,6

14

2,5

13

2,6

26

2,9

13

2,6

11

2,6

16

2,6

17

2,5

Table 2. Optimal number of clusters for inputs and outputs by k-means clustering silhouette index Inp

ind

val

ind

val

ind

val

ind

val

ind

val

ind

val

Pow

4

0,80

21

0,82

4

0,80

4

0,80

22

0,81

24

0,84

Tor

20

0,89

22

0,87

4

0,86

4

0,86

18

0,90

15

0,87

Sfc

21

0,81

3

0,81

23

0,81

3

0,81

25

0,83

26

0,87

Nox

26

0,78

2

0,77

26

0,77

2

0,77

24

0,79

2

0,77

HC

3

0,87

4

0,88

3

0,87

17

0,85

3

0,87

3

0,87

Co2 Out

23

0,82

24

0,84

25

0,82

22

0,81

23

0,84

25

0,84

FuR

4

0,79

4

0,79

4

0,79

4

0,79

4

0,79

4

0,79

AiF

25

0,80

24

0,83

25

0,86

26

0,83

26

0,81

24

0,85

Loa

4

0,87

4

0,87

4

0,87

2

0,86

4

0,87

4

0,87

Cyc

2

0,76

2

0,76

2

0,76

2

0,76

2

0,76

2

0,76

Pbo

4

0,80

2

0,79

4

0,80

4

0,80

4

0,80

4

0,80

After completing to run each clustering algorithm for 13 times, preprocessing stage was completed. Table 1 and Table 2 include some of the execution of these algorithm results. The bold index and value pairs give the optimal clustering number for related inputs and outputs. The next step of this study is to cluster each input and output of the system with the optimal numbers according to the Table 1 and Table 2. These clustered inputs and outputs are used for ANFIS. Table 3 and Table 4 show correct output ratio of ANFIS for FCM and k-means algorithm. As can be seen from Table 3 and Table 4 FCM algorithm has 100% correct output ratio for 13 test interval. Every point in each input and output is assigned to the center or interval of optimal clustering for both FCM and kmeans. Clustered 41 of 54 points were used for training of ANFIS and 13 points were used to test ANFIS. Training and test errors of FCM clustering for ANFIS are much smaller than k-means and ANFIS with FCM founds correct optimal interval for output regarding to the input values. - IIIA.10-5 -

International Conference on Computer Systems and Technologies - CompSysTech’07

Table 3. Training and test error and number of correct interval output of ANFIS with FCM Output Variable

No of Epoch

No of Membership

Training Error (41p)

Avr. Test Error(13)

Air Flow (25) Fuel Rate (24) Cycle (7) Load (19) Pboost (26)

30 30 30 30 30

14 14 15 15 16

0,076 0, 0029 0,1309 0,0066 0,0356

0,9 0,60 1 0,104 1

Minimum Value of Center interval 18 1,39 240 1,40 15

Number of correct interval 13 13 13 13 13

Table 4. Training and test error and number of correct interval output of ANFIS with k-means Output Variable

No of Epoch

No of Membership

Training Error (41p)

Avr. Test Error(13)

Air Flow (25) Fuel Rate (4) Cycle (2) Load (19) Pboost (4)

30 30 30 30 30

16 13 13 13 13

0,0351 0,001 1,09 0,006 0,146

4,7 4,15 1549 13,21 452,338

Minimum Value of Center interval 10,65 9,719 1108 16,662 412,02

Number of correct interval 13 11 6 12 7

3. CONCLUSION AND FUTURE WORKS Obtained results from proposed systems showed that FCM and ANFIS can be used to reverse modeling of an engine performance and emission characteristic. Given any input values for six different parameters, proposed system easily include them in right clusters regarding to the membership values by FCM and these cluster values are fed into ANFIS. As it can be seen from Table 3, the optimal output interval or cluster are easily found by ANFIS with FCM (%100 correct ratio). In this study, the number of inputs and outputs of the system were kept as 6 and 5 respectively. Load has never been included in previous studies. It is one of the most important parameters for diesel engine performance and be included in this study. Instead of finding output as single point, an optimal interval is supplied to the user by ANFIS with FCM. This is also an innovation for the researcher in this area. The following step of this study can make use of Neural Network with probability to find out output as interval. Since this network is a kind of classifier it can be used by itself for FCM and by using another feedforward neural network instead of ANFIS the proposed system may have an alternative. In addition to this one, to have better training and test ratio or time other clustering techniques can be used in preprocessing stage of this study. Last but not least some other methods (grid partitioning and etc) rather than subtractive clustering for ANFIS can be used in the following studies. By this way, number of membership functions for input and output values may change and better correctness or time ratio can be obtained. ACKNOWLEDGEMENTS This study has been supported by Selcuk University’s Scientific Research Unit.

REFERENCES [1] Ş. Taşdemir, I. Sarıtaş, M. Ciniviz, C Çınar, N. Allahverdi, Application Of Artificial Neural Network For Definition Of A Gasoline Engine Performance, 4th İnternational Advanced Technologies Symposium, Konya, Turkey, 28-30 Sept., 2005, 1030-1034. - IIIA.10-6 -

International Conference on Computer Systems and Technologies - CompSysTech’07

[2]Ş. Taşdemir, Design of a Fuzzy Expert System for Definition of Gasoline Engine Performance and Emission Characteristics, Master dissertation, Selçuk University, Konya, Turkey, 2004. [3] B. Bortolet, E. Merlet, S. Boverie, Fuzzy Modeling and Control of an Engine Air İnlet with Exhaust Gas Recirculation. Laboratoire LAAS/CNRS - 7, av. du Colonel Roche France, INSA - Complexe Scientique de Rangueil France, SIEMENS Automotive SA B.P.1149 av. du Mirail - France, 17 May, 1999. [4] T. M. Mian, Fuzzy Logic-Based Automotive Airbag Control System, S Thesis, Unıversıty of Wındsor (Canada), 2000. [5] C. V. Altrock, Fuzzy Logic in Automotive Engineering, Circuit Cellar INK, The Computer Applications Journal, 1997. [6] A. Demirel, R.N. Tunçay, A Direct Drive System with Fuzzy Anti Skid-Controller for Electric Vehicles, http://www.elk.itu.edu.tr/~azzmi/icem98.html, ICEM, 1998. [7] A. Soliman, G. Rizzoni, Y.W Kim, Diagnosis of an automotive emission control system using fuzzy inference ,Control Engineering Practice, 8 (1999) 209-216. [8] D.E. Nelson, Fuzzy logic antilock braking system for trailers equipped with electric brakes. Texas A&M University, Kingsville, 1997. [9] S. H. Lee, R.J Howlett, S.D. Walters, Emission reduction for a small gasoline engine using fuzzy control. IFAC Symposium on Advances in Automotive Control, Salerno, Italy, 2004. [10] R. Luu, A Fuzzy Logic-Based Automobile Fuel Injection Control System. California State University, Long Beach, 1995. [11] H.T. Nguyen, N.R. Prasad, C.L. Walker, E.A. Walker, A First Course in Fuzzy and Neural Control, Chapman & Hall, Floride, 2003. [12] A.Hajjaji, A. Ciocan, D. Hamad, Four wheel steering control by fuzzy approach ,Journal of Intelligent and Robotic Systems, 16 (2005) 141-156. [13] N.J. Schouten, M.A. Salman, N.A. Kheir , Energy management strategies for parallel hybrid vehicles using fuzzy logic , Control Engineering Practice, 7 (2003) 171177. [14] S. Yeralan, B. Tan, Fuzzy Logic Control as an Industrial Control Language for Embedded Controllers. Design and Implementation of Intelligent Manufacturing Systems, Prentice- Hall Inc.,1995. [15] N. Allahverdi, Expert Systems. An Artificial Intelligence Application, Atlas, Istanbul, 2002. [16] B. MacQueen: Some Methods for classification and Analysis of Multivariate Observations, Proceedings of 5-th Berkeley Symposium on Mathematical Statistics and Probability", Berkeley, University of California Press, 1:281-297, 1967 [17] Bezdek J. C. Pattern recognition with fuzzy objective function algorithms, Plenum Press, NewYork 1981 ABOUT THE AUTHORS Kemal Tutuncu, Selcuk University, Technical Education Faculty, Elect. Comp. Edu. Department KONYA/TURKEY, Phone:+90 332 2233335, E-mail: [email protected] Prof. Phd. Novruz Allahverdi, Selcuk University, Technical Education Faculty, Elect. Comp. Edu. Department KONYA/TURKEY, Phone:+90 332 2233356, E-mail: [email protected]

- IIIA.10-7 -

Suggest Documents