Solving systems of nonlinear equations is perhaps one of the most difficult problems in all of numerical computations, especially in a diverse range of engineering applications. The convergence and performance characteristics can be highly sensitive to the initial guess of the solution for most numerical methods such as Newton’s method. However, it is very difficult to select reasonable initial guess of the solution for most systems of nonlinear equations. Besides, the computational efficiency is not high enough. Aiming at these problems, an improved particle swarm optimization algorithm (imPSO) is proposed, which can overcome the problem of selecting reasonable initial guess of the solution and improve the computational efficiency. The convergence and performance characteristics of this method are demonstrated through some standard systems. The results show that the improved PSO for solving systems of nonlinear equations has reliable convergence probability, high convergence rate, and solution precision and is a successful approach in solving systems of nonlinear equations.
1. Introduction
Solving systems of nonlinear equations is one of the most important problems in all of numerical computations, especially in a diverse range of engineering applications. Many applied problems can be reduced to solving systems of nonlinear equations, which is one of the most basic problems in mathematics. This task has applications in many scientific fields [1–7]. So great efforts have been made by a lot of people and many constructive theories and algorithms are proposed to solve systems of nonlinear equations [8–11]. However there still exist some problems in solving systems of nonlinear equations. For most traditional numerical methods such as Newton’s method, the convergence and performance characteristics can be highly sensitive to the initial guess of solution. However, it is very difficult to select reasonable initial guess of solution for most nonlinear equations. The algorithm would fail or the results may be improper if the initial guess of the solution is unreasonable. Many different combinations of the traditional numerical methods and the intelligent algorithms are applied to solve the systems of nonlinear equations [12, 13], which can overcome the problem of selecting reasonable initial guess of the solution. But the algorithms are too complicated or expensive to calculate when there are a number of systems of nonlinear equations to solve. Many improved intelligent algorithms, such as particle swarm algorithm and genetic algorithm, are proposed to solve systems of nonlinear equations. Though they overcome the problem of selecting reasonable initial guess of the solution, they lack the sophisticated search capabilities in local area, which may lead to convergence stagnation.
Here an improved particle swarm optimization algorithm (imPSO) is put forward, which can overcome the dependence on reasonable initial guess of the solution and improve the computational efficiency.
A system of nonlinear equations can be expressed as(1)Fx=f1x,f2x,f3x,…,fnxT=0,where x=x1,x2,x3,…,xnT are the n variables.
Set the value of G:(2)G=f1x+f2x+f3x+⋯+fnx.
Then the problem of solving nonlinear equations is transformed to a problem of seeking a vector of x to minimize the value of G and the best value of G is zero, which becomes an optimization problem. Then the imPSO is employed to solve the optimization problem.
Most solutions of the nonlinear equations in engineering have a limitative span, according to which we can initialize the initial guess. The sophisticated search capabilities in local area are improved by changing the parameters in the particle swarm algorithm. And the unnecessary iterations will be cancelled if the value of G meets the standard (such as G<P), which can improve computational efficiency.
2. Particle Swarm Algorithm
Particle swarm optimization algorithm (PSO), originating from the study of birds seeking food, is a kind of intelligent optimization algorithm, which is proposed by Eberhart and Kennedy in 1995 [17], and then, in order to promote the explorations in early optimization stages, the inertia weight w is introduced into PSO [18]. Owing to its simple structure, PSO is developing rapidly and has plenty of modified forms.
A modified PSO put forward by Shi can be expressed as(3)vik+1=wvik+c1r1pbestik-xik+c2r2gbestik-xik,(4)xik+1=xik+vik+1.
Equation (3) is to update the velocity and (4) is to update the new position; v is the velocity and x is the position; w represents the inertia weight; i represents the ith particle and k is the kth generation; c1 and c2 denote weighing factors called accelerated coefficients; r1 and r2 are random variables uniformly distributed within [0,1]; pbesti denotes the ith personal best fitness and gbesti denotes the ith global best fitness; the initial velocity and position of each particle are random variables generated by the standard normal distribution.
3. Improved Particle Swarm Algorithm3.1. The Selection of Inertia Weight w
Most intelligent optimization algorithms require a large search scope in earlier optimization stages to avoid falling into local optimal value and a fast convergence speed in latter optimization stages to get the optimal value quickly. The inertia weight w is one of the most important factors that affect the search scope and convergence speed of PSO. The search scope will be large when inertia weight w is big and convergence speed will be fast when inertia weight w is small. So it is very important to select the inertia weight w.
In order to meet the demands, the inertia weight w can be expressed by the following function:(5)w=a-c1bgbesti+1+d1fbfc+1,where the inertia weight w varies with the difference between gbest(i) and bfc. a is a parameter, which is a number between 0.8 and 1. b, c, d, and f are parameters selected according to the nonlinear equations. Generally b is a number between 1 and 1.5; c is a number between 0.6 and 1.2; d is a number between 0.05 and 0.2; f is a number between 1 and 2.5. gbest(i) is the ith global best fitness, and bfc is the standard deviation of all the ith generation particles.
During the process of optimization, the inertia weight w becomes smaller and smaller along with gbest(i) becoming smaller and smaller according to the second part of (5). Since solving nonlinear equations is to make (2) equal to zero (or a value close to zero), the lower bound of gbest is zero. But if the gbest is too big, the inertia weight w is too big to converge, so the gbest in (5) has an upper bound ugbest. If the gbest is bigger than ugbest, gbest will equal ugbest in (5).
If the ith generation particles are scattered, the algorithm will have a large searching scope. However, if the ith generation particles are too centralized, the algorithm will have a small searching scope and may be lost into local optimal value. The standard deviation bfc reflects the distribution of particles. According to the third part of (5), the inertia weight w becomes bigger and bigger along with bfc becoming smaller and smaller. bfc may become zero at last, so the upper bound of inertia weight w is a, and the lower bound of inertia weight w is a-b/2, so the inertia weight w can meet the demands.
3.2. Dynamic Conditions of Stopping Iterating
For most intelligent optimization algorithms, there must be enough iterations to guarantee getting the best value. However, the best value can be got through a few iterations for PSO, and then there is many iterations that will be useless, which leads to a low computational efficiency. Besides, if PSO is lost into local optimal value, it may lead to useless iterations and the wrong results. And these problems should be found timely and solved.
Aiming at these problems, a comprehensive plan is proposed.
Assign zero (or a value close to zero) to the standardized fitness value (sfv) and then the iterations will be cancelled if the fitness value is less than or equal to sfv; that is, gbest(i) equals zero. Now the solutions of the nonlinear equations are got and the useless iterations are avoided. That is,(6)gbesti≤sfv.
For the problem of being lost into local optimal value, if the difference between gbest(i) and gbest(i-X) and the difference between positionb(i) and positionb(i-X) equal zero, PSO is considered as being lost into local optimal value. That is,(7)gbesti-gbesti-X=0,positionbi-positionbi-X=0,where gbest(i) is the ith best fitness value and the gbest(i-X) is the best fitness value before X iteration. positionbi is the ith best position, and the positionbi-X is the best position before X iteration. X is a parameter between 50 and 250 generally.
Equation (6) is the standard in which the optimal values are found. Equations (7) are the standards in which PSO is lost into local optimal value. If (7) are tenable, PSO will restart from the starting.
3.3. The Standardized Number of Restarting Times mb
The standardized number of restarting times mb is calculated according to the reliability theory.
The probability of succeeding getting the optimal value for a single PSO is p, which can be calculated through thousands of times of computing, being generally between 0.1 and 1. So the probability of succeeding getting the optimal value pm before (m+1)th restarting can be expressed as(8)pm=p+p1-p+p1-p2+⋯+p1-pm-1=1-1-pm,(9)m=log1-p1-pm,mb>m.
If 1-pm is sufficiently small, pm will be large enough that we can believe that the probability of succeeding getting the optimal value pm equals 1. mb can be calculated through (9).
3.4. The Steps of the Improved PSOStep 1.
Set m equal to 1.
Step 2.
Judge whether m is less than mb. If m is less than mb, the algorithm goes to Step 3. If m is not less than mb, the algorithm put out “no results.”
Step 3.
Initialize the v1 and x1 randomly, and calculate the pbest(1) and gbest(1).
Step 4.
Judge whether gbest(1) is less than sfv. If gbest(1) is less than sfv, the algorithm will end. If gbest(1) is not less than sfv, the algorithm goes to Step 5.
Step 5.
If the gbest is bigger than ugbest, gbest will equal ugbest in (5). If the gbest is smaller than or equal to ugbest, gbest will be gbest in (5). Update the inertia weight w according to (5), and then calculate the vi, xi, pbest(i), and gbest(i). Judge whether gbest(i) is less than sfv. If gbest(i) is less than sfv, the algorithm will end. If gbest(1) is not less than sfv, the algorithm goes to Step 6.
Step 6.
Judge whether i is less than I (the biggest number of iterations in mth time computing). If i is less than I, the algorithm goes to Step 8. If i is not less than I, the algorithm goes to Step 7.
Step 7.
Judge whether the algorithm is lost into local optimal value according to (7). If the algorithm is lost into local optimal value, the algorithm goes to Step 8. If the algorithm is not lost into local optimal value, the algorithm goes to Step 5.
Step 8.
Set m=m+1. And then the algorithm goes to Step 2.
And then the imPSO is formed, whose steps are shown in Figure 1.
Calculation flow chart of imPSO.
4. Experiments and Results
In this section, benchmark functions are employed to investigate the performance of the imPSO.
Test 1 (Freudenstein-Roth function). Consider(10)f1x=-13+x1+5x2-x22-2x22+-29+x1+x22+x2-14x22,-5.12≤xi≤5.12.
The minimum value of the Freudenstein-Roth function is zero when x is located at point x=(5,4).
The values of parameters are a=1, b=1.8, c=1.5, d=0.2, and f=2. The calculated result is (5,4), and the calculated minimum value of the Freudenstein-Roth function is zero. The number of iterations is 93. m is 1. The convergence history of test 1 is showed in Figure 2, and the variation of w is shown in Figure 3.
The imPSO convergence history of test 1.
The imPSO variation of w.
The number of iterations of PSO is 474, whose convergence history is showed in Figure 4.
The PSO convergence history of test 1.
Test 2 (Rosenbrock function). Consider(11)f2x=100x2-x122+1-x12.
The Rosenbrock function is a nonconvex pathological function, which has a long narrow and curved valley in the function. So it may require a large number of iterations to obtain the best solution. The minimum value of the Rosenbrock function is zero when x is located at point x=(1,1).
The values of parameters are a=1, b=1.8, c=1.5, d=0.2, and f=2. The calculated result is (1,1), and the calculated minimum value of the Rosenbrock function is zero. The number of iterations is 75. m is 1. The convergence history of test 2 is showed in Figure 5, and the variation of w is shown in Figure 6.
The imPSO convergence history of test 2.
The imPSO variation of w.
The number of iterations of PSO is 435, whose convergence history is showed in Figure 7.
The PSO convergence history of test 2.
Test 3 (Schaffer function). Consider(12)f3′x=0.5-sin2x12+x22-0.51+0.001x12+x222.
The Schaffer function has the global maximum value 1 when x is located at point x=(0,0). However, the Schaffer function has many local maximums 0.9903 at the points around the point x=(0,0). It is very hard to get the global maximum. Here the Schaffer function is transformed to get the minimum value through the following equation:(13)f3x=1-f3′x.
So (13) has the minimum value zero at point x=(0,0).
The values of parameters are a=1, b=1.8, c=1.5, d=0.2, and f=2. The calculated result is (0,0), and the calculated minimum value of the Schaffer function is zero. The number of iterations is 28. m is 1. The convergence history of test 3 is showed in Figure 8, and the variation of w is shown in Figure 9.
The imPSO convergence history of test 3.
The imPSO variation of w.
The number of iterations of PSO is 150, whose convergence history is showed in Figure 10.
The PSO convergence history of test 3.
Test 4 (Powell quartic function). Consider(14)minf4x=x1+10x22+5x3-x42+x2-2x34+10x1-x44.
The Powell quartic function is singular at the minimum point. However, it is very hard to get the minimum value [14]. The minimum value zero is obtained at the point x=(0,0,0,0).
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (0,0,0,0), and the calculated minimum value of the Powell quartic function is zero. The number of iterations is 1973. m is 1. The convergence history of test 3 is showed in Figure 11, and the variation of w is shown in Figure 12.
The imPSO convergence history of test 4.
The imPSO variation of w.
The number of iterations of PSO is 10000 when the minimum value is 1.948645494579354e-315, whose convergence history is showed in Figure 13.
The PSO convergence history of test 4.
The number of iterations of PSO in [14] is more than 4000.
Test 5 (Ackley function). Consider(15)f5x=-20exp-0.21n∑i=1nxi2-exp1n∑i=1ncos2πxi+20+e,-32≤xi≤32.
The dimension here is n=4. Ackley function is a multimodal function, which has a global optimal value and many local optimal values. And the variables have no relevance. It is very easy to be lost into the local optimal values and cannot jump out to find global local optimal values. The minimum value is zero at point x=(0,0,0,0).
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (-0.312039464691632e-015, 0.386551762889035e-015, 0.037866869728015e-015, 0.089018775346847e-015), and the calculated minimum value of the Powell quartic function is zero. The number of iterations is 109. m is 1. The convergence history of test 3 is showed in Figure 14, and the variation of w is shown in Figure 15.
The imPSO convergence history of test 5.
The imPSO variation of w.
The number of iterations of PSO is 9500 when the minimum value is 3.552713678800501e-015, whose convergence history is showed in Figure 16.
The PSO convergence history of test 5.
Test 6 (Griewank function). Consider(16)f6x=14000∑i=1nxi2-∏i=1ncosxii+1,-600≤xi≤600.
The dimension here is n=6. Griewank function is a multimodal function, which has a global optimal value and many local optimal values. And the variables are relevant. It is very easy to be lost into the local optimal values and cannot jump out to find global local optimal values. The minimum value is zero at point x=(0,0,0,0,0,0).
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (-0.095852536988518e-007, 0.077579964471561e-007, 0.011250486244803e-007, 0.077788935476922e-007, -0.216911551137599e-007, 0.152876829678368e-007), and the calculated minimum value of the Powell quartic function is zero. The number of iterations is 49. m is 1. The convergence history of test 3 is showed in Figure 17, and the variation of w is shown in Figure 18.
The imPSO convergence history of test 6.
The imPSO variation of w.
The number of iterations of PSO is 9500 when the minimum value is 3.552713678800501e-015, whose convergence history is showed in Figure 19.
The PSO convergence history of test 6.
Table 1 shows the results of each test with 10000 times computing. The value of mb is 100.
Test
Total iteration
Total restarting times m
p
The biggest m
(1-p)biggestm
Fail (m≥ mb)
Test 1
1148836
10967
0.9110
6
5.314×10-13
0
Test 2
756972
10000
1
1
0
0
Test 3
379051
11149
0.8964
5
1.193×10-05
0
Test 4
19810789
10000
1
1
0
0
Test 5
1169838
20067
0.4957
18
1.635×10-05
0
Test 6
724026
11627
0.8597
6
7.6269×10-06
0
Table 1 shows the total iteration times of each test with 10000 times computing, from which the mean iteration times can be calculated. Value of 1-pbiggest m indicated that if the mb is big enough, systems of nonlinear equations can be solved successfully.
5. Case Study
In order to demonstrate the efficiency of the improved particle swarm optimization algorithm for solving systems of nonlinear equations, some standard nonlinear equations systems are employed.
Case 1 (see [19]).
Consider(17)x13-3x1x22-1=0,3x12x2-x23+1=0.
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (−0.290514555507251, 1.084215081491351), and the number of iterations is 69, while the number of iterations in [14] is more than 100. m is 1. The convergence history of Case 1 is shown in Figure 20, and the variation of w is shown in Figure 21. The result is more accurate than the result in [19].
The imPSO convergence history of Case 1.
The imPSO variation of w.
Case 2 (see [20]).
Consider(18)ex12-8x1sinx2=0,x1+x2-1=0,x3-13=0.
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (0.175598924177659, 0.824401075822341, 1.000000000000000), and the number of iterations is 147. m is 1. The convergence history of Case 2 is shown in Figure 22, and the variation of w is shown in Figure 23. The result is more accurate than the result in [14]. The result in [14] is (0.17559892417766, 0.82440107582234, 1).
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (0.500000000000000, −0.000000000141655, −0.523598775601840), and the number of iterations is 111, while the number of iterations in [14] is more than 150. m is 1, and the variation of w is shown in Figure 25.
The convergence history of Case 3 is shown in Figure 24. Table 2 shows the results.
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (4.00000000000000, 3.00000000000000, 1.00000000000000), and the number of iterations is 152, while the number of iterations in [14, 16] is more than 200. m is 3. The convergence history of Case 4 is shown in Figure 26, and the variation of w is shown in Figure 27.
The values of parameters are a=1, b=1.8, c=1.6, d=0.2, and f=2. The calculated result is (12.256519599348696, 22.894938623626285, 2.789817919538154) or (−12.256519599348696, −22.894938623626285, −2.789817919538154), and the number of iterations is 148, while the number of iterations in [14] is more than 200. m is 4. The convergence history of Case 5 is showed in Figure 28, and the variation of w is shown in Figure 29.
The values of parameters are a=1, b=1.8, c=1.4, d=0.2, and f=1.05. The calculated result with imPSO is (−0.994926998030712, 0.539699980991932, −0.100599545672903, 0.841857428854381, 0, 0), and the number of iterations is 2161. m is 1. The convergence history of Case 6 is showed in Figure 30, and the variation of w is shown in Figure 31. The best results in different methods and the results of imPSO are shown in Table 3.
Different results with different methods of Case 6.
The results in [15]
The results of ICA [16]
The best results of imPSO
x
f(x)
x
f(x)
x
f(x)
−0.8078668904
0.0050092197
−0.041096050919063
0
−0.994926998030712
0
−0.9560562726
0.0366973076
0.041096050919063
0
0.539699980991932
0
0.5850998782
0.0124852708
0.999155200456294
0
−0.100599545672903
0
−0.2219439027
0.0276342907
−0.999155200456294
0
0.841857428854381
0
0.0620152964
0.0168784849
0.098733550533454
0
0
0
−0.0057942792
0.0248569233
0.098733550533454
0
0
0
The imPSO convergence history of Case 6.
The imPSO variation of w.
Table 4 shows the results of Case 1 with 10000 times computing under different parameters. The value of mb is 100 and the values of parameters are b=1.8 and f=1.05.
Parameters
Total iteration
Total restarting times m
p
Biggest m
(1-p)biggestm
Fail (m≥mb)
(1)
a=1.0, c=1.6, d=0.4
815371
14955
0.6697
11
5.104×10-06
0
(2)
a=1.0, c=1.6, d=0.2
756348
15011
0.6664
9
5.117×10-05
0
(3)
a=1.0, c=1.6, d=0.2
755928
15009
0.6673
8
1.501×10-04
0
(4)
a=1.0, c=1.4, d=0.2
1006006
14946
0.6711
10
1.481×10-05
0
(5)
a=1.0, c=1.4, d=0.2
1005359
14942
0.6726
8
1.320×10-04
0
(6)
a=0.8, c=1.4, d=0.2
550127
15074
0.6656
8
1.481×10-05
0
According to (1) and (2), total iterations become fewer when parameter d is bigger, but the probability of convergence becomes bigger. According to (3) and (4), total iterations become fewer when parameter c is smaller, but the probability of convergence becomes bigger. According to (5) and (6), total iterations become fewer when parameter a is smaller, but the probability of convergence becomes smaller. Table 4 shows that total iterations become fewer when parameter a-c/2 is less, but the probability of convergence becomes smaller.
6. Conclusions
In this paper, a method for solving a system of nonlinear equations is proposed, which is converted to an optimization problem, and an improved particle swarm algorithm is employed to solve the optimization problem. This method overcomes the dependence on reasonable initial guess of the solution. And then some standard systems of nonlinear equations are presented to demonstrate the convergence probability, convergence rate, and solution precision in finding the best solution of nonlinear equations with the improved particle swarm algorithm.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
The project is subsidized by The Research Project Supported by Shanxi Scholarship Council of China 2014-065 and Shanxi Province Natural Science Fund Project 2014011024-5.
BarbashovB. M.NesterenkoV. V.ChervyakovA. M.General solutions of nonlinear equations in the geometric theory of the relativistic string198284447148110.1007/bf01209629MR6677552-s2.0-31644437759BickhamS. R.KiselevS. A.SieversA. J.Stationary and moving intrinsic localized modes in one-dimensional monatomic lattices with cubic and quartic anharmonicity19934721142061421110.1103/physrevb.47.142062-s2.0-0001086854KhalilzadehM.KianfarF.ChaleshtariA. S.ShadrokhS.RanjbarM.A modified PSO algorithm for minimizing the total costs of resources in MRCPSP201220121836569710.1155/2012/3656972-s2.0-84859767957SahuR. K.PandaS.SekharG. T. C.A novel hybrid PSO-PS optimized fuzzy PI controller for AGC in multi area interconnected power systems20156488089310.1016/j.ijepes.2014.08.0212-s2.0-84907764549HsiehY.-Z.SuM.-C.WangP.-C.A PSO-based rule extractor for medical diagnosis201449536010.1016/j.jbi.2014.05.0012-s2.0-84902553754HolstadA.Numerical solution of nonlinear equations in chemical speciation calculations199933-422925710.1023/a:1011595429513MR1750074ArgyrosI. K.On the solution of undetermined systems of nonlinear equations in Euclidean spaces199342199209MR1270429ZBL0809.47053OrtegaJ. M.RheinboldtW. C.200030SIAMKrzyworzckaS.Extension of the Lanczos and CGS methods to systems of nonlinear equations199669118119010.1016/0377-0427(95)00032-1MR13916192-s2.0-0030124952WrightS. J.NocedalJ.19992New York, NY, USASpringer10.1007/b98874MR1713114KouJ.LiY.WangX.A composite fourth-order iterative method for solving non-linear equations2007184247147510.1016/j.amc.2006.05.181MR22948622-s2.0-33846589993LuoY.-Z.TangG.-J.ZhouL.-N.Hybrid approach for solving systems of nonlinear equations using chaos optimization and quasi-Newton method2008821068107310.1016/j.asoc.2007.05.0132-s2.0-37249091252MoY.LiuH.WangQ.Conjugate direction particle swarm optimization solving systems of nonlinear equations20095711-121877188210.1016/j.camwa.2008.10.0052-s2.0-67349129437JaberipourM.KhorramE.KarimiB.Particle swarm algorithm for solving systems of nonlinear equations201162256657610.1016/j.camwa.2011.05.0312-s2.0-79960153106GrosanC.AbrahamA.A new approach for solving nonlinear equations systems200838369871410.1109/TSMCA.2008.9185992-s2.0-43249120401AbdollahiM.IsazadehA.AbdollahiD.Imperialist competitive algorithm for solving systems of nonlinear equations201365121894190810.1016/j.camwa.2013.04.0182-s2.0-84878287010EberhartR. C.KennedyJ.A new optimizer using particle swarm theory1Proceedings of the 6th International Symposium on Micro Machine and Human ScienceOctober 19953943ShiY.EberhartR.A modified particle swarm optimizerProceedings of the IEEE International Conference on Evolutionary Computation (ICEC '98)May 1998Anchorage, Alaska, USAIEEE697310.1109/ICEC.1998.6991462-s2.0-0031700696NedzhibovG. H.A family of multi-point iterative methods for solving systems of nonlinear equations2008222224425010.1016/j.cam.2007.10.054MR2474627ZBL1154.650372-s2.0-53449093916HuesoJ. L.MartínezE.TorregrosaJ. R.Modified Newton's method for systems of nonlinear equations with singular Jacobian20092241778310.1016/j.cam.2008.04.013MR24742132-s2.0-56449090341WangC.LuoR.WuK.HanB.A new filled function method for an unconstrained nonlinear equation201123561689169910.1016/j.cam.2010.09.010MR2736869ZBL1213.650772-s2.0-78049240554