# Prediction of Agricultural Machinery Total Power Based on PSO-GM(2,1,λ, ρ) Model

Di-Yi Chen, Yu-Xiao Liu, Xiao-Yi Ma, Yan Long

► To cite this version:

Di-Yi Chen, Yu-Xiao Liu, Xiao-Yi Ma, Yan Long. Prediction of Agricultural Machinery Total Power Based on PSO-GM(2,1,λ, ρ) Model. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.205-210, 10.1007/978-3-642-18336-2_24. hal-01562808

HAL Id: hal-01562808

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

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
Prediction of Agricultural
Machinery Total Power Based on
PSO-GM(2,1, λ, ρ) Model

Di-yi CHEN<sup>1,2,1</sup>, Yu-xiao LIU<sup>1</sup>, Xiao-yi MA<sup>1</sup>, Yan LONG<sup>2</sup>

¹ Electric Department of College of Water Resources and Architectural Engineering, NorthWest A&F University. 712100 Yangling, Shannxi, China

² College of Mechanical and Electric Engineering, NorthWest A&F University. 712100 Yangling, Shannxi, China

{ Di-yi CHEN, Yu-xiao LIU, Xiao-yi MA, Yan LONG } iee307}@163.com

**Abstract.** In order to improve the prediction accuracy of agricultural machinery total power then to provide the basis for the agricultural mechanization development goals, the paper used gray GM(2,1) model in the prediction. Through the introduction of parameter $\lambda$ to correct the background value and parameter $\rho$ for multiple transformation on the initial data, the model was expanded to $GM(2,1,\lambda,\rho)$ model and prediction accuracy was improved. Because of the nonlinear traits between parameter $\lambda, \rho$ and the prediction errors, they are difficult to be solved. The paper used Particle Swarm Optimization (PSO) to search the best parameter $\lambda, \rho$, then combination forecast model of PSO-GM(2,1, $\lambda, \rho$) was constructed. In order to avoid incorrect selection of inertia weight $w$ causing the global search and local search imbalance, the paper used Decreasing Inertia Weight Particle Swarm Optimization, in which parameter $w$ gradually decreases from 1.4 to 0.35. And agricultural machinery total power was predicted based on Zhejiang province's statistics. Predicted results show that the combination forecast model prediction accuracy is higher than the gray GM(1,1) model and the model better fits the data. The forecast of the agricultural machinery total power of this combination forecast model is feasible and effective, and should be feasible in other areas of agriculture prediction.

**Keywords:** agricultural machinery total power; gray prediction; particle swarm optimization; background values; multiple transformation

¹ Corresponding author at: Electric Department of College of Water Resources and Architectural Engineering, NorthWest A&F University. 712100 Yangling, Shannxi, China.
E-mail address: diyichen@nwsuaf.edu.cn
# 1 Introduction

Agricultural machinery total power is the total power number that is used for agriculture, forestry, animal husbandry and fishery production and transportation of all machinery (including tractors, diesel engines, gasoline engines, turbines, motors, wind turbine, etc.), which reflects the general level of agricultural mechanization in an area. It is an important part of agricultural planning and is often listed as key indicators of planning [1]. There are many specific methods in the prediction of agricultural machinery total power, the gray system has been widely used because of the advantages of less data needed and small amount of computation. However, the current model applied to the agricultural forecast is just gray GM(1,1) model, which is actually a deviation of the index model, so it subjects to certain restrictions in application. Because of GM(2,1) model has two feature values, it can reflect the system monotonous or oscillations and should be widely used in theory, but its goodness of fit and prediction accuracy in practical application is not very satisfactory [2]. This paper uses GM(2,1) model, references the method of Literature[3], through introducing parameter $\lambda$ to correct the background value and parameter $\rho$ for multiple transformation on the initial data, expands the model to $GM(2,1,\lambda,\rho)$ model, increasing the prediction accuracy.

Particle swarm optimization (PSO) [4-5] is an evolutionary computation technique developed by J. Kennedy and R. C. Eberhart in 1995. In this algorithm, the objective function is initialized to a random solution, and each solution is regarded as a particle. Each particle has an initial position and a speed which decides the search direction and distance. The merits of particles are determined by the size of the fitness according to the objective function. Particles update themselves according to their fitness and speed, inertia weight $W$ is used to maintain the balance between the global search and local search, larger inertia weight help search out of local minimum points, while the smaller are conducive to make algorithm converge and to improve search accuracy. Original PSO, inertia weight $W$ is a constant, so is it in the literature[3], literature[6] proposed an adaptive strategy, that is just at the beginning inertia weight $W$ is large, as the iteration progressing, it decreases linearly. Literature[7] thinks that inertia weight is started at 1.4 and then gradually decreases to 0.35 is appropriate, so this paper documents the approach of literature[7]. Examples show that the algorithm improves the data fitting accuracy and its relative error is smaller. So it can reveal the development law of agricultural machinery total power within the next few years, and is able to provide an important basis for agricultural machinery development plans.
## 2 GM (2,1, $\lambda$, $\rho$) Modeling

### 2.1 GM (2,1, $\lambda$, $\rho$) modeling principle

Original data sequence is located as: $X_0^{(0)} = (x_0^{(0)}(1), x_0^{(0)}(2), \dots, x_0^{(0)}(n))$ Do multiple transformation on the data columns. Multiplication parameter $\rho$ has the effect of zoom in or out of the amendment on the initial data, can adjust condition number of the model coefficients, turns original ill-conditioned matrix into a good state, and does not change development coefficient of the model[8], the transformed data sequence is:

$$X^{(0)} = \{x^{(0)}(k) | x^{(0)}(k) = \rho x_0^{(0)}(k), k \in N\}$$

When this sequence is subjected to the Accumulating Generation Operation (AGO), the following sequence $X^{(1)}$ is obtained:

$$X^{(1)} = \{x^{(1)}(k) | x^{(1)}(k) = \sum_{i=1}^{k} x^{(0)}(i), k \in N\}$$

When this sequence is subjected to inverse AGO (IAGO), the following sequence $\alpha^{(1)}X^{(1)}$ is obtained: $\alpha^{(1)}X^{(1)} = \{\alpha^{(1)}x^{(1)}(k) | \alpha^{(1)}x^{(1)}(k) = x^{(0)}(k) - x^{(0)}(k-1), k \in N\}$

The whitening equation of GM (2,1) model is therefore, as follows:

$$\frac{d^2 x^{(1)}}{dt^2} + a_1 \frac{dx^{(1)}}{dt} + a_2 x^{(1)} = u \quad (1)$$

$\hat{a} = [a_1 \ a_2 \ u]^T$ is a sequence of parameters that can be found as follows:

$$\hat{a} = [a_1 \ a_2 \ u]^T = B^{-1}Y$$

$$B = \begin{bmatrix} -x^{(0)}(2) & -z^{(1)}(2) & 1 \\ -x^{(0)}(3) & -z^{(1)}(3) & 1 \\ \vdots & \vdots & \vdots \\ -x^{(0)}(n) & -z^{(1)}(n) & 1 \end{bmatrix}$$

The original background value is defined as: $z^{(1)}(k) = 0.5x^{(1)}(k) + 0.5x^{(1)}(k-1)$.

The revised background value by introducing the parameter [1] is as below:

$$z^{(1)}(k) = (1 - \lambda)x^{(1)}(k) + \lambda x^{(1)}(k-1)$$

$$Y = [\alpha^{(1)}x^{(1)}(2) \ \alpha^{(1)}x^{(1)}(3) \ \dots \ \alpha^{(1)}x^{(1)}(n)]^T$$

For equation (1), when the discriminant of its characteristic equation $\Delta = a_1^2 - 4a_2 > 0$, it can get two real roots $v_1 = \frac{-a_1 + \sqrt{\Delta}}{2}$, $v_2 = \frac{-a_1 - \sqrt{\Delta}}{2}$, then we can get the general solution:

$$\hat{x}^{(1)}(k) = C_1 e^{\nu_1 k} + C_2 e^{\nu_2 k} + \frac{u}{a_2}$$

The parameters $C_1, C_2$ in formula are determined by the initial value condition.
By applying IAGO, the predictions for the $X^{(0)}$ can be obtained:
$$ \hat{x}^{(0)}(k) = \hat{x}^{(1)}(k) - \hat{x}^{(1)}(k-1) $$

The prediction model of the original data sequence is: $\hat{x}_0^{(0)}(k) = \hat{x}^{(0)}(k) / \rho$

## 2.2 Improved PSO algorithm to search the best $\lambda, \rho$

Generate randomly $M$ groups $\lambda, \rho$ according to population to form a two-dimensional initial swarm population $(\lambda\rho)_0$ and the fitness value is evaluated by a predefined fitness function of the absolute relative error summation. Then search the optimal value $\lambda, \rho$ for its minimum, the particles update themselves according to fitness and speed. Velocity and position update formula are as follows:

$$ v_{k+1} = w v_k + c_1 * rand_1(pbest_k - x_k) + c_2 * rand_2(gbest_k - x_k) $$

$$ x_{k+1} = x_k + v_{k+1} $$

$v_k$ and $x_k$ are the particle's current velocity and position, $v_{k+1}$ and $x_{k+1}$ are updated particle velocity and position, $pbest_k$ is the optimal solution which the particle itself searches, ie the individual extreme, $gbest_k$ is the optimal solution that the entire particle population searches, ie the global extreme. $c_1$ and $c_2$ are accelerating factors within [0,2], in this paper $c_1 = c_2 = 2$. $rand_1$ and $rand_2$ are two random numbers within [0,1]. And $w$ decreases linearly from 1.4 to 0.35.

Fitness function is:

$$ f = \min \sum_{i=1}^{n} abs(\frac{100(\hat{x}_{0}^{(0)}(i) - x_{0}^{(0)}(i))}{x_{0}^{(0)}(i)}) $$

## 3 Applications of GM(2,1, $\lambda, \rho$) model

Based on Zhejiang Province's statistics in literature[1] agricultural machinery total power was predicted. Fitness situation is shown in Figure 1, and fitness results are shown in Table 1. From Table 1 we can see that the maximum fitting relative error - 12.1271% is smaller than the largest fitting relative error of -24.12% in literature [1], the average fitting relative error -1.5432% is less than -2.6105% in literature[1]. Fitting the initial data more accurate, the model is more in line with the trend of the initial data then can predict with a higher precision. Predicted results from 2004 to 2008 as shown in Table 2:
<figure><img src="image_2.png" /><figcaption>Fig. 1. Total power fitting image of Zhejiang Province</figcaption></figure>

<table><caption>Table 1. Font sizes of headings. Table captions should always be positioned above the tables.</caption><thead><tr><th>Years</th><th>Agricultural machinery total power /×10<sup>4</sup>kw</th><th>The fitted values inliteratu e 3 / × 10<sup>4</sup>kw</th><th>Fitting relative errors in literature 3 /%</th><th>The fitted values in this paper /×10<sup>4</sup>kw</th><th>Fitting relative errors in this paper/%<br/>λ = -3.8990<br/>ρ = 0.8658</th></tr></thead><tbody><tr><td>1. 1982</td><td>1. 628.10</td><td>1. 779.58</td><td>1. -24.12</td><td>1. 628.1</td><td>1. -0.0000</td></tr><tr><td>2. 1983</td><td>2. 681.86</td><td>2. 820.42</td><td>2. -20.32</td><td>2. 764.5502</td><td>2. -12.1271</td></tr><tr><td>3. 1984</td><td>3. 754.49</td><td>3. 863.41</td><td>3. -14.44</td><td>3. 819.5266</td><td>3. -8.6199</td></tr><tr><td>4. 1985</td><td>4. 810.02</td><td>4. 908.64</td><td>4. -12.18</td><td>4. 876.9505</td><td>4. -8.2628</td></tr><tr><td>5. 1986</td><td>5. 889.31</td><td>5. 956.25</td><td>5. -7.53</td><td>5. 936.8025</td><td>5. -5.3404</td></tr><tr><td>6. 1987</td><td>6. 974.62</td><td>6. 1006.35</td><td>6. -3.26</td><td>6. 999.0459</td><td>6. -2.5062</td></tr><tr><td>7. 1988</td><td>7. 1075.91</td><td>7. 1059.07</td><td>7. 1.57</td><td>7. 1063.6241</td><td>7. 1.1419</td></tr><tr><td>8. 1989</td><td>8. 1133.48</td><td>8. 1114.55</td><td>8. 1.67</td><td>8. 1130.4588</td><td>8. 0.2665</td></tr><tr><td>9. 1990</td><td>9. 1215.73</td><td>9. 1172.95</td><td>9. 3.52</td><td>9. 1199.4471</td><td>9. 1.3394</td></tr><tr><td>10.1991</td><td>10.1265.46</td><td>10.1234.40</td><td>10.2.46</td><td>10.1270.459</td><td>10.-0.3950</td></tr><tr><td>11.1992</td><td>11.1352.03</td><td>11.1299.07</td><td>11.3.92</td><td>11.1343.3344</td><td>11.0.6432</td></tr><tr><td>12.1993</td><td>12.1417.88</td><td>12.1367.13</td><td>12.3.58</td><td>12.1417.88</td><td>12.-0.0000</td></tr><tr><td>13.1994</td><td>13.1497.34</td><td>13.1438.75</td><td>13.2.74</td><td>13.1493.8662</td><td>13.0.2320</td></tr><tr><td>14.1995</td><td>14.1639.80</td><td>14.1514.13</td><td>14.7.66</td><td>14.1571.0232</td><td>14.4.1942</td></tr><tr><td>15.1996</td><td>15.1707.59</td><td>15.1593.46</td><td>15.6.58</td><td>15.1649.0374</td><td>15.3.4290</td></tr><tr><td>16.1997</td><td>16.1733.33</td><td>16.1676.94</td><td>16.3.25</td><td>16.1727.5475</td><td>16.0.3336</td></tr><tr><td>17.1998</td><td>17.1798.84</td><td>17.1764.80</td><td>17.1.89</td><td>17.1806.14</td><td>17.-0.4058</td></tr><tr><td>18.1999</td><td>18.1912.53</td><td>18.1857.25</td><td>18.2.89</td><td>18.1884.3447</td><td>18.1.4737</td></tr></tbody></table>
<table><caption>Table 2. Predicted results from 2004 to 2008</caption><tr><td>19.2000</td><td>19.1990.01</td><td>19.1954.56</td><td>19.1.78</td><td>19.1961.63</td><td>19.1.4261</td></tr><tr><td>20.2001</td><td>20.2017.24</td><td>20.2056.96</td><td>20.-1.97</td><td>20.2037.3977</td><td>20.-0.9993</td></tr><tr><td>21.2002</td><td>21.2053.21</td><td>21.2164.72</td><td>21.-5.43</td><td>21.2110.9775</td><td>21.-2.8135</td></tr><tr><td>22.2003</td><td>22.2039.68</td><td>22.2278.14</td><td>22.-11.69</td><td>22.2181.6218</td><td>22.-6.9590</td></tr><tr><td>Average</td><td></td><td></td><td>-2.6105</td><td></td><td>-1.5432</td></tr></table>

<table><tr><td>1. Years</td><td>2004</td><td>2005</td><td>2006</td><td>2007</td><td>2008</td></tr><tr><td>2. Total power/×10<sup>4</sup>kw</td><td>2248.4991</td><td>2310.6882</td><td>2367.1715</td><td>2416.8281</td><td>2458.4267</td></tr></table>

## 4 Conclusion

This paper constructed a combination forecast model of PSO-GM(2,1, λ,ρ), and we can draw the following conclusion:

(1) The introduction of parameters λ,ρ to adjust the original solution can better improve the precision, that increases applications of gray GM (2,1) model.

(2) Using the advantages of PSO algorithm for global optimization and local optimization to search the best parameters λ,ρ, making the parameter values flexible, so the model prediction accuracy is high.

(3) This prediction method on data is of high precision and prediction accuracy meets the practical requirements in the forecast of the agricultural machinery total power, so this study introduces a practical method to agricultural mechanization forecast.

## References

1. Smith, T.F., Waterman, M.S.: Identification of Common Molecular Subsequences. J. Mol. Biol. 147, 195--197 (1981)

1. Hong Y Q, Song Z M, Jin D.: Predict and Analysis of Agricultural Machinery Total Power in Zhejiang Province Based on GM (1, 1). J. Journal of Agricultural Mechanization Research, 1, 42-- 44(2008)

2. Xiao X P, Song Z M, Li F.: Gray Technology Fundation and Application. Beijing : Beijing: Science Press(2005)

3. LIU H ,ZHANG Q S.: GM(2 ,1 , λ,ρ) based on particle swarm optimization. J. Systems Engineering -Theory & Practice, 10, 96-- 101(2008)

4. Kennedy J, Eberhart R C.: Particle swarmoptimization. In: Proceeding of 1995 IEEE International Conference on Neural Networks, pp. 1942--1948. New York (1995)

5. Eberhart R C, Kennedy J.: A new optimizer using particle swarm theory. In: Proceedings of the Sixth International Symposium on Micro Machine and Human Scienc, pp. 39--43. Nagoya(1995)
6. Shi Y, Eberhart R C.: A modified particle swarm optimizer. In: Proceedings of 1998 IEEE International Conference on Evolutionary Computation, pp. 69--73. New York, USA (1998)

7. Eberhart R C, Shi Y.: Particle swarm optimization: developments,applications and resources. In: Proceedings of the 2001 Congress on Evolutionary Computation, pp. 81--86. NJ, USA(2001)

8. Zeng X Y, Xiao X P.: Research on morbidity problem “Research on morbidity problem of accumulating method GM(2,1) model. J. Systems Engineering and Electronics, 28, 542—572(2006)

9. Te-Hsiu Sun.: Applying particle swarm optimization algorithm to roundness measurement. J. Expert Systems with Applications, 36, 3428—3438(2009)

10. Erdal Kayacan, Baris Ulutas, Okyay Kaynak.: Grey system theory-based models in time series prediction. J. Expert Systems with Applications, 37, 1784--1789 (2010)