# Performance Forecasting of Piston Element in Motorcycle Engine Based on BP Neural Network

Rong Dai

► To cite this version:

Rong Dai. Performance Forecasting of Piston Element in Motorcycle Engine Based on BP Neural Network. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.148-157, 10.1007/978-3-642-18336-2_18. hal-01562779

HAL Id: hal-01562779

https://inria.hal.science/hal-01562779

Submitted on 17 Jul 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Performance Forecasting of Piston Element in
Motorcycle Engine Based on BP Neural Network

Rong Dai

College of Engineering and Technology, Southwest University, Chongqing, China
dai_yun2002@sina.com

**Abstract.** The piston performance affects the performance of the Motorcycle. In order to forecast the piston performance effectively, the performance forecast model based on BP neural network is presented. According to the characteristics of piston performance, the training samples are made up of the orthogonal experimental data, which are utilized to ensure higher generalization of BP neural network. And then the trained BP neural network is used to forecast test example. At the same time, the value of test samples is compared with the output of BP network model results. The results show that the output precision of BP neural network is high, and using the BP neural network to forecast the piston performance is practicable and effective.

**Keywords:** Motorcycle; Engine piston; BP neural network; Forecast;

# 1 Introduction

Piston of motorcycle engine is an important part. Its design that is good or bad is related to the engine fuel consumption, power, oil consumption, noise and many other indicators. In the practice of design piston, piston is often developed through repeated tests and experiments relying on experience, this method requires a long development cycle and more cost. Design errors of other theoretical approaches are worse, and they are not competent for the practice of piston design. Parameters that are affecting the performance of pistons are more, their values are difficult to determine. In order to seek a better performance of the piston, and often orthogonal test approach can be adopted for experimental design and analysis. Orthogonal test method not only can reduce the times of tests, but also can fully reflect the impact of each factor to achieve more reasonable optimization program with less cost. Although the prediction method based on neural networks can not determine the certain mathematical function, but it can give the algorithm and the structural parameters, the connections rights that inherent laws between input and output are reflected are determined by training, the network output can be predicted through them. The neural network can not only predict the experimental results, but also establish the foundation for performance simulation analysis. Because of possessing these advantages, many scholars have
conducted the application research in neural network forecasting, such as literature [1-3].

Based on the above analysis, this paper uses BP neural network method to predict the performance of motorcycle engine piston. In order to overcome the shortcomings that BP network is difficult to be trained, network can be trained by using orthogonal experimental data to reduce the training samples and to improve the quality of training, and the output of network is analyzed comparatively to verify the accuracy of the network.

# 2 BP neural network

## 2.1 BP neural network structure

The basic element of neural networks is processing nodes, after adding the input obtained from other nodes with a weight value, which produces the output value through the activation function. Processing nodes are organized into a layer, which generally associated with next layer fully, and there is no interconnection in one layer, as is shown in Fig.1. The input layer as inputting data to the network has not any operations in this layer. After the input layer, followed by one or more actual processing layers, the final processing layer is called the output layer that provide output data, between the input layer and output layer is a layer called the hidden layer. With multi-layer structure (usually three), this structure can allow the network to identify the nonlinear data.

Using neural network to process nonlinear data includes two phases: training and recall. The typical process is training network by back-propagation algorithm, until the error value between desired output and actual output of the network reach the objective minimum. Once training is completed, the network can process data through the recall as a non-linear processor [4-6].

<figure><img src="image_2.png" /><figcaption>Fig. 1. BP neural network</figcaption></figure>
## 2.2 BP learning rule

BP algorithm consists of two parts: signal forward transmission and error backpropagation. In the forward course, the input signal pass to the output layer from the input layer, hidden layer. the state of neurons in each layer only influences the state of next layer neurons. If the output layer has not the expectable output, then calculated the error of output layer, and then turned back propagation through the network connection, the error signals along the original path are anti-passed back to modify the weight of every layer neurons to achieve the desired goal.

BP network, the whole learning steps:

① Initialization, to the various connection weights $W_{ij}$, $V_{jt}$ and the threshold $\theta_j$, $\gamma_t$, $i = 1,2, ... n$; $j = 1,2, ... P$; $t = 1,2, ... q$; $k = 1, 2, ... m$, gives the random value between [-1, +1].

② Randomly selects a model couple: $A_k = [a_1^k, a_2^k, ..., a_n^k]$, $Y_k = [y_1^k, y_2^k, ..., y_n^k]$ for the network.

③ Using the input mode $A_k = [a_1^k, a_2^k, ..., a_n^k]$, the connection weights $W_{ij}$ and the threshold $\theta_j$ calculate the input value $S_j$ (activation value) of middle layer neurons, then using $S_j$ through the activation function

$$f(x) = \frac{1}{1 + e^{-x}} \qquad (1)$$

Calculate the output value $b_j$ of each element in the middle layer.

$$b_j = f(s_j) \qquad (2)$$

$$s_j = \sum_{i=1}^{n} W_{ij} \cdot a_i - \theta_j$$

Where:

④ Using the output value $b_j$ of middle layer, the connection weights $V_{jt}$ and the thresholds $\gamma_t$, calculate input value $l_t$ (activation value) of each element in the output layer, then using $l_t$ calculate each element's response $c_t$ of the output layer by activating function,

$$c_t = f(l_t) \qquad (3)$$

$$l_t = \sum_{j=1}^{p} V_{jt} \cdot b_j - \gamma_t \qquad (t = 1,2, ... q)$$

⑤ Using the expectable output mode $Y_k = [y_1^k, y_2^k, ..., y_n^k]$, the network actual output $c_t$, calculates correction error $d_t^k$ of each element in the output layer:
$$d_t^k = (y_t^k - c_t) \cdot c_t (1 - c_t) \quad (t = 1, 2, \dots, q) \quad (4)$$

⑥ With $d_t^k$, $V_{jt}$, $b_j$, calculates the correction error of the middle layer:

$$e_j^k = \left[ \sum_{t=1}^{q} dt \cdot V_{jt} \right] b_j (1 - b_j) \quad (j = 1, 2, \dots, p) \quad (5)$$

⑦ With $d_t^k$, $b_j$, $V_{jt}$, $\gamma_t$, calculates the new connection weights and thresholds between middle layer and output layer next time:

$$V_{ji}(N+1) = V_{ji}(N) + a \cdot d_t^k \cdot b_j \quad (6)$$

$$\gamma_t(N+1) = \gamma_t(N) + a \cdot d_t^k$$

Where, N is times for learning, a is learning coefficient.

⑧ With $e_j^k$, $a_i^k$, $W_{ij}$, $\theta_j$, calculates the new connection rights between input layer and middle layer next time:

$$W_{ij}(N+1) = W_{ij}(N) + \beta \cdot e_j^k \cdot a_i^k \quad (8)$$

$$\theta_j(N+1) = \theta_j(N) + \beta \cdot e_j^k$$

⑨ Randomly selects the next learning model couple for the network, return to the ③ step, until all m-model couple have been trained completely.

⑩ Again from the m-learning couple randomly select a model couple, return to the ③ step, until the network global error function E is less than a pre-set limit value (network convergence), or learning times are more than the pre-set value (network failed to converge).

For the whole input mode, the network's global error E:

$$E = \sum_{k=1}^{m} E_k = \frac{1}{2} \sum_{k=1}^{m} (Y_k - c)^2 = \frac{1}{2} \sum_{k=1}^{m} \sum_{t=1}^{q} (y_t^k - c_t)^2 \quad (10)$$

⑪ End of the study

In the above learning steps, ③-⑥ as "forward propagation process" of input learning mode, ⑦-⑧ as "back-propagation process" of the network error, ⑨ and ⑩ as the completion of the training and the convergence process. Fig. 2 shows BP network learning process diagram.
<figure><img src="image_3.png" /><figcaption>Fig. 2. BP network learning process diagram</figcaption></figure>

## 2.3 Improvement of the training function

BP network training adopts gradient descent method in order to obtain minimum in error flat, which has its limitations and inadequacies, mainly reflected in: 1) the learning rate is too small lead to the training time was too long; 2) local minimum. In order to overcome the slow convergence of the algorithm, there are many scholars who have done research and made a number of improved BP algorithm, such as the weight adjustment algorithm with momentum term, namely, momentum term is added in the weight adjustment algorithm formula (11), (12):

$$V_{ji}(N+1) = V_{ji}(N) + \eta(V_{ji}(N) - V_{ji}(N-1)) + a \cdot d_t^k \cdot b_j \quad (11)$$
<table><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th><th>/kw</th><th>ption<br>(g/kw.h)</th><th></th><th>/kw</th><th></th><th>n(g/kw.h)</th><th></th></tr></thead><tbody><tr><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>2.93</td><td>64.04</td><td>259.3</td><td>108.1</td><td>2.9308</td><td>64.04</td><td>259.30</td><td>108.1032</td></tr><tr><td>2</td><td>1</td><td>2</td><td>2</td><td>2</td><td>2</td><td>2.68</td><td>64.17</td><td>259.2</td><td>108.2</td><td>2.6781</td><td>64.17</td><td>259.197</td><td>108.1968</td></tr><tr><td>3</td><td>1</td><td>3</td><td>3</td><td>3</td><td>3</td><td>2.4</td><td>64.1</td><td>259.5</td><td>106.8</td><td>2.3994</td><td>64.098</td><td>259.502</td><td>106.872</td></tr><tr><td>4</td><td>1</td><td>4</td><td>4</td><td>4</td><td>4</td><td>2.33</td><td>63.02</td><td>259.5</td><td>108.2</td><td>2.3293</td><td>63.07</td><td>259.4975</td><td>108.1992</td></tr><tr><td>5</td><td>2</td><td>1</td><td>2</td><td>3</td><td>4</td><td>3.04</td><td>64.06</td><td>259.6</td><td>108.1</td><td>3.04</td><td>64.238</td><td>259.6004</td><td>108.1032</td></tr><tr><td>6</td><td>2</td><td>2</td><td>1</td><td>4</td><td>3</td><td>2.93</td><td>64.07</td><td>259.7</td><td>108.5</td><td>2.9308</td><td>63.874</td><td>259.697</td><td>108.4968</td></tr><tr><td>7</td><td>2</td><td>3</td><td>4</td><td>1</td><td>2</td><td>2.43</td><td>65.02</td><td>258.5</td><td>108</td><td>2.4304</td><td>65.018</td><td>258.521</td><td>108.000</td></tr><tr><td>8</td><td>2</td><td>4</td><td>3</td><td>2</td><td>1</td><td>2.17</td><td>63.85</td><td>259.1</td><td>108.2</td><td>2.1696</td><td>63.88</td><td>259.1006</td><td>108.1992</td></tr><tr><td>9</td><td>3</td><td>1</td><td>3</td><td>4</td><td>2</td><td>2.52</td><td>64.02</td><td>259.6</td><td>108.3</td><td>2.5200</td><td>64.018</td><td>259.6004</td><td>108.300</td></tr><tr><td>10</td><td>3</td><td>2</td><td>4</td><td>3</td><td>1</td><td>2.36</td><td>63.99</td><td>259.6</td><td>108.2</td><td>2.3603</td><td>63.99</td><td>259.6004</td><td>108.1992</td></tr><tr><td>11</td><td>3</td><td>3</td><td>1</td><td>2</td><td>4</td><td>2.23</td><td>64.37</td><td>259</td><td>108.1</td><td>2.2299</td><td>64.372</td><td>258.0019</td><td>108.1008</td></tr><tr><td>12</td><td>3</td><td>4</td><td>2</td><td>1</td><td>3</td><td>1.92</td><td>64.18</td><td>259.2</td><td>108.4</td><td>1.9202</td><td>64.18</td><td>259.1972</td><td>108.4008</td></tr><tr><td>13</td><td>4</td><td>1</td><td>4</td><td>2</td><td>3</td><td>1.77</td><td>63.78</td><td>260.6</td><td>107.6</td><td>1.7686</td><td>63.78</td><td>260.6</td><td>107.5992</td></tr><tr><td>14</td><td>4</td><td>2</td><td>3</td><td>1</td><td>4</td><td>1.7</td><td>63.78</td><td>259.2</td><td>108.2</td><td>1.7001</td><td>63.78</td><td>259.1993</td><td>108.1992</td></tr><tr><td>15</td><td>4</td><td>3</td><td>2</td><td>4</td><td>1</td><td>1.61</td><td>64.19</td><td>259.5</td><td>108.6</td><td>1.6121</td><td>64.06</td><td>259.4282</td><td>109.404</td></tr><tr><td>16</td><td>4</td><td>4</td><td>1</td><td>3</td><td>2</td><td>1.41</td><td>64.09</td><td>259.5</td><td>109.2</td><td>1.4390</td><td>64.09</td><td>259.4996</td><td>109.2</td></tr></tbody></table>

To find out the influence of various factors for the indexes, the test results in Table 2 (measured value) are analyzed, the difference is greater, the impact of factors on the indicators is the greater. Such as friction power, the difference analysis result is shown in Table 3. According to the difference value sorting in decreasing, the order of various factors affecting friction power is obtained: A > B > C > D > E. The smaller is the friction power, the better is performance. The optimal project of friction power indicator is that: A₄B₄C₃D₂E₃. Not only the times of orthogonal tests can be reduced, but also the synthetic impacts of different factors on performance can be fully realized through it. However, the implicit knowledge that is implied in these data need to be mined further in order to improve the system intelligent level.

<table><caption>**Table 3.** The results of difference analysis</caption><thead><tr><th rowspan="2"></th><th colspan="5">Friction Power</th></tr><tr><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr><td>K₁</td><td>2.585</td><td>2.565</td><td>2.375</td><td>2.245</td><td>2.267</td></tr><tr><td>K₂</td><td>2.643</td><td>2.417</td><td>2.313</td><td>2.212</td><td>2.260</td></tr><tr><td>K₃</td><td>2.257</td><td>2.167</td><td>2.197</td><td>2.302</td><td>2.255</td></tr><tr><td>K₄</td><td>1.623</td><td>1.958</td><td>2.222</td><td>2.347</td><td>2.325</td></tr><tr><td>R</td><td>1.020</td><td>0.607</td><td>0.178</td><td>0.135</td><td>0.070</td></tr></tbody></table>

In the working of the piston, its performance (friction power, noise, power and fuel consumption) mainly is affected by the factors those are the clearance between piston skirt and cylinder liner, clearance between piston head and cylinder liner, eccentricity of piston pin, length of piston skirt, cylinder liner surface roughness RMS. Therefore, the friction power, noise, power and fuel consumption are investigated as the indexes.
The performance of piston is comparatively analyzed through testing, then the structure of BP neural network prediction model is finally identified as: 5×11×4 (respectively, the input layer nodes, hidden layer nodes and output layer nodes). The input variable of every node in the input layer are respectively the clearance between piston skirt and cylinder, or clearance between piston head and cylinder liner, or eccentricity of piston pin, or length of piston skirt, or cylinder liner surface roughness RMS. The output variables of every node in the output layer respectively are friction power, or noise, or power, or fuel consumption.

Training samples will affect the generalization ability of the network, which is generally selected to reflect the circumstances and relation, and can serve as an effective adjustment of connection weights. Orthogonal test method adopts "orthogonal table" to arrange a multi-factor experiment and analysis scientifically. Its advantage is mainly that in a lot of testing projects(also known as test conditions), a few testing projects owing to the strong representation are selected. Each testing project has a strong representation to reflect fully the general situation in the region preferred. Present research [9] also shows that, because orthogonal test method is a balanced dispersion and neat comparability, network structure constructed by using orthogonal test method can effectively reduce training samples and improve the training accuracy. Therefore, in order to select the small training samples for containing enough information, prediction model structure of piston performance based on BP network adopts No. 1 to NO.14, NO.16 samples in Table 2 to construct learning samples. At one time, NO.15 sample is tested as a predictor, not used for training the network. Learning samples, prediction sample and learning outcomes are shown in Table 2.

## 3.2 Implementation of BP neural network prediction model

Learning samples (input, output) in the Table 2 are normalized, $x_{ji}^b = (x_{ji}-x_{ji.min}) / (x_{ji.max}-x_{ji.min})$, in the equation, $x_{ji}^b$ is NO. i input variable of NO. j sample in the normalized samples, $x_{ji}$ is NO. i input variable of NO. j sample in the raw data.; $x_{ji.max}$ and $x_{ji.min}$ are respectively the maximum and minimum of NO. i input variable of NO. j sample in the raw data. To enable the data uniformly distributed in [0,1] ,then neural networks can be trained, activation functions of the hidden layer and output layer are also Sigmoid function (see formula (1)). Learning coefficient between input layer and hidden layer is taken 0.6, learning coefficient between hidden layer and output layer is taken 0.5, momentum coefficient is taken 0.6, the global error E is taken 0.001, error function tend to stabilize after 4416 times iteration, BP program is shown in Fig.3, the final learning outcomes are shown in Table 2. At the time, according to the connection weights and the threshold determined by the network model to reflect the inherent law of input samples, the corresponding prediction model will be obtained, and thus parameters and network structure determined by the model is regarded as the actual prediction model parameters.
<figure><img src="image_4.png" /><figcaption>Fig. 3. BP neural network training and prediction</figcaption></figure>

<table><caption>Table 4. Prediction results of BP network</caption><thead><tr><th rowspan="2">Sample No.</th><th colspan="4">Based on BP Network</th></tr><tr><th>Friction power relative error (%)</th><th>power relative error (%)</th><th>fuel consumption relative error (%)</th><th>noise relative error (%)</th></tr></thead><tbody><tr><td>15</td><td>0.13</td><td>0.20</td><td>0.027</td><td>0.74</td></tr></tbody></table>

After the above algorithms constantly adjust the parameters of the network, complicated function that affects indicators and performance can be obtained to meet the accuracy requirements. Such a function can not be expressed in simple function expression, which can only be stored in the computer in the form of a network with weight value and threshold as parameters.

Predictive testing sample is utilized to predict in the trained BP network, the relative errors between prediction results and measured values are shown in Table 4.

It is discovered that in Table 2 and Table 4, fitting accuracy and prediction accuracy based on BP network are high, the relative errors are less than 1% to meet the required precision. Because the neural network can approximate a nonlinear function to any precision, it can establish the function among the friction power, power, fuel consumption, noise and various factors. Network prediction results also show that the forecasting performance of the established network is better,
performance of the engine piston can be well predicted, to a certain extent, which can improve prediction accuracy.

## 4 Conclusion

To a large extent, performance of piston directly impacts on the motorcycle engine, there are many factors affecting the performance of the piston, and their values are more difficult to determine, so effective ways are urgently needed to find for identifying the reasonable combination values of the various factors, so as to shorten the product development cycle. Based on this, the relationship between factors and performance indicators is established through the use of BP neural network, which has been a high precision network output. The foundation for the simulation analysis of various factors is established through the BP neural network prediction model that has been trained, i.e. the impact of different combination on performance has been studied. The results show that adopting BP neural network approach to predict the performance of the piston is feasible and effective.

**ACKNOWLEDGEMENT** This work is supported by “the Fundamental Research Funds for the Central Universities.” (N0.XDJK2009C005) and supported by “the Doctoral Fund of Southwest University” (N0.SWU109043).

## References

1. Jiang, Y.H., Zheng, X.D., Feng L.: Application of Artificial Neural Network to the Saccharification Technology of Monascus Waxberry Wine Optimization. Systems Engineering-theory & Practice. 5 (5), 136--140(2003)

2. He, S., Xiong, G.L., Zeng Q.L.: A Method for Estimating Product Assembly Cost Based on Neural Networks. Mechanical Science and Technology. 21 (4), 662--665 (2002)

3. Genel, K.: Application of Artificial Neural Network for Predicting Strain-life Fatigue Properties of Steels on the Basis of Tensile Tests. International Journal of Fatigue. 26,1027--1035(2004)

4. Wang, X., Wang, H., Wang, W.H.: Artificial neural network theory and applications. Northeastern University Press, Shenyang (2000)

5. Guo, D.Y., Liao, X.Y., Lei W.Y.: Neural Network and Its Application in Mechanical Engineering. Chongqing University Press, Chongqing (1998)

6. Gao, J.: Artificial Neural Network Theory and Simulation Instance. Mechanical Industry Press, Beijing (2007)

7. Wang, F.Z., Liu, Y.B., Yue, D.P.: Orthogonal Test and Design of a Diesel Piston. Small Internal Combustion Engine and Motorcycle. 36 (6), 56--59 (2007)

8. Chen, K.: Experiment design and analysis. Tsinghua University Press, Beijing (1996)

9. Huang, K., Chen, S.F., Qi, X.: Neural Network Optimal Design Based on Orthogonal Experiment Method. Systems Engineering-Theory Methodology Application. 13 (3), 272--275(2004)