pact algorithm, namely compact Differential Evolution light (cDElight). cDElight belongs .... A solution xe, called elite, is then sampled from PV . More specifically ...
Robot Base Disturbance Optimization with Compact Differential Evolution Light Giovanni Iacca, Fabio Caraffini, Ferrante Neri, and Ernesto Mininno Department of Mathematical Information Technology, P.O. Box 35 (Agora), 40014 University of Jyv¨ askyl¨ a, Finland {giovanni.iacca,fabio.caraffini,ferrante.neri,ernesto.mininno}@jyu.fi
Abstract. Despite the constant growth of the computational power in consumer electronics, very simple hardware is still used in space applications. In order to obtain the highest possible reliability, in space systems limited-power but fully tested and certified hardware is used, thus reducing fault risks. Some space applications require the solution of an optimization problem, often plagued by real-time and memory constraints. In this paper, the disturbance to the base of a robotic arm mounted on a spacecraft is modeled, and it is used as a cost function for an online trajectory optimization process. In order to tackle this problem in a computationally efficient manner, addressing not only the memory saving necessities but also real-time requirements, we propose a novel compact algorithm, namely compact Differential Evolution light (cDElight). cDElight belongs to the class of Estimation of Distribution Algorithms (EDAs), which mimic the behavior of population-based algorithms by means of a probabilistic model of the population of candidate solutions. This model has a more limited memory footprint than the actual population. Compared to a selected set of memory-saving algorithms, cDElight is able to obtain the best results, despite a lower computational overhead.
1
Introduction
Some real-world problems, due to real-time, space, and cost requirements, impose the solution of an optimization problem, sometimes even complex, on a device with limited memory and computational resources. This situation is typical, for instance, in mobile robots and real-time control systems, where all the computation is performed on board of an embedded system. Some examples of this class of problems can be found in home automation, mobile TLC devices, smart sensors and biomedical devices. Among these applications, space control systems represent an interesting exception. Despite the constant growth of the computational power in consumer electronics, very simple and dated hardware is indeed still used on spacecrafts. It must be remarked that the computational devices on board of a spaceship should reliably work without any kind of rebooting for
This research is supported by the Academy of Finland, Akatemiatutkija 130600, Algorithmic Design Issues in Memetic Computing and Tutkijatohtori 140487, Algorithmic Design and Software Implementation: a Novel Optimization Platform.
C. Di Chio et al. (Eds.): EvoApplications 2012, LNCS 7248, pp. 285–294, 2012. c Springer-Verlag Berlin Heidelberg 2012
286
G. Iacca et al.
months or, in some cases, even for years. In this sense, the use of tremendously simple but fully tested and certified hardware allows a high reliability of the computational cores, thus reducing fault risks. For example, since over twenty years, National Aeronautics and Space Administration (NASA) employs, within the space shuttles, IBM AP-101S computers [12]. These computers constitute an embedded system for performing the control operations. The memory of computational devices is only 1 Mb, i.e. much less capacious than any modern device. Thus, the necessity of having an efficient control notwithstanding the hardware limitations arises. In these cases, an optimization algorithm should perform the task without limited requirements of memory and computational resources. Unfortunately, high performance algorithms are usually fairly complex structures which make use of a population of candidate solutions (requiring a high memory footprint) and other components such as learning systems or classifiers, see e.g. [13,18]. In order to address problems characterized by a limited hardware, compact Evolutionary Algorithms (cEAs) have been designed. A cEA is an EA belonging to the class of Estimation of Distribution Algorithms (EDAs) [7]. Compact algorithms mimic the behavior of population-based algorithms but, instead of storing and processing an entire population, make use of a probabilistic representation of the population. In this way, the algorithm saves at least a part of the advantages of population-based algorithms but requires a much smaller memory with respect to their corresponding population-based versions. Thus, a run of these algorithms requires a small amount of memory compared to their correspondent standard EAs. Recently, a compact algorithm based on Differential Evolution, called cDE, has been proposed in [9]. This algorithm encodes the population within a probabilistic distribution and employs the standard DE logic for generating new trial solutions and selecting the most promising search directions. The cDE algorithm showed a performance superior to other compact algorithms for a large set of test problems. Some work has been performed to enhance the performance of the cDE algorithm, for example embedding it in a memetic framework [10,11], or combining multiple cDE core [5,6]. In this work we propose a modified cDE scheme for minimizing the disturbance to the base of a robotic arm working in a non-gravitational environment on board of a spacecraft. The proposed algorithm, namely compact Differential Evolution light (cDElight), includes a light mutation, which allows a unique solution sampling instead of the multiple sampling typical of cDE frameworks, and a light crossover, which allows to save on the random number generation. Simulation results show that the proposed algorithm has the same performance as the original cDE but with a lower computational overhead, thus leading to important advantages for real-time online optimization. The remainder of this paper is organized as follows. Section 2 describes the mechanical model of the robotic arm and the fitness function. Section 3 describes the proposed cDElight. Section 4 shows the simulation results. Section 5 gives the conclusion of this work.
Robot Trajectory Optimization with cDElight
2
287
Base Disturbance Optimization in Space Robotic Arms
Space robots are crucially important in current space operations as they can prevent humans from having to perform extremely risky operations, e.g. extravehicular activities such as reparations outside the spacecraft. Due to the enormous distances, the robot cannot be fully remotely controlled manually from the Earth because the communication delay between the command and the execution of the robot operation can likely be unacceptable in several cases. For this reason an efficient real-time control system is essential. The absence of gravity plays an important role in the dynamics of the robot and must be taken into account when the control system is designed. In this case of study, a robotic arm connected to a base, e.g. a spacecraft or a satellite, is considered. In a nutshell, the control system aims to perform the robot movements in order to minimize the disturbances, i.e. inertial movements, on the base. More specifically, each new trajectory step is optimized online using the look-ahead optimized algorithm for trajectory planning proposed in [14]. Space robots are highly nonlinear, coupled multi-body systems with nonlinear constraints. Moreover, the dynamic coupling between the manipulator (robotic arm) and the base usually affects the performance of the manipulator. The dynamic coupling is important to understand the relationship between the robot joint motion and the resultant base motion, and it is useful in minimizing fuel consumption for base attitude control. The measure of dynamic coupling has been formulated in [17]. Let us consider a manipulator composed of nb links (bodies) interconnected by joints and connected by means of an external joint to the base. With reference to Fig. 1, let Vi and Ωi be linear and angular velocities of the ith body of the manipulator arm with respect to the inertial reference system ΣI , and let vi and ωi be linear and angular velocities of the ith body of the manipulator arm with respect to the base ΣB . Thus, we can obtain that the velocities of the ith body are: Vi = vi + V0 + Ω0 × ri Ωi = ωi + Ω0
Fig. 1. Space robotic arm scheme
(1)
288
G. Iacca et al.
where the operator × represents the outer product of R3 vectors. V0 and Ω0 are, respectively, linear and angular velocities of the centroid of the base with respect to ΣI . The variable ri represents the position vector related to the ith body pointing towards the center of the base with reference to ΣB , see [17] for details. The velocities in the base of the coordinates of the reference system ΣB can be calculated as: vi (2) = Ji (q)q˙ ωi where q is the vector of the angular positions of each joint of the manipulator arm (see q1 , q2 , and q3 in Fig. 1) and Ji (q) is thus the Jacobian of the ith body of manipulator arm. The Jacobian can be then decomposed into two sub-matrices related to its translational and rotational movements [17]: J (q) (3) Ji (q) = T i JRi (q) The total linear (P ) and angular (L) momenta of the entire robotic arm can be expressed as: nb P = m0 V0 + (mi vi ) (4) i=1
L = I0 Ω0 + m0 RB × V0 +
nb
(Ii ωi + mi ri × vi )
(5)
i=1
where Ii and mi are the inertia momentum and mass of each body composing the robot manipulator, and RB is a positioning vector pointing towards the centroid of the base with reference to ΣI . Equations (4) and (5) can then be combined: V0 P ˙ (6) + Hm q. = HB Ω0 L The details about the structures of the matrices HB and Hm are given in [4]. In a free-floating situation (due to the fact that both robot and base are in outer space), there are no external forces or momenta. If we consider the gravitational force to be negligible, linear and angular momenta are conserved. We assume that the initial state of the system is stationary, so that the total linear and angular momenta are zero. Hence, from Eq. (6), the mapping relationship between the manipulator joint motion and the base motion is thus given by: V0 ˙ (7) = −HB −1 Hm q. Ω0 For a given trajectory that must be followed by the robot, the optimization problem under investigation consists of detecting the angular positions qi , angular velocities q˙i , and angular accelerations q¨i of each joint i in each knot k identifying the trajectory such that the disturbance on the base is minimized. The fitness to be minimized is, in our study, the integral over time of the norm
Robot Trajectory Optimization with cDElight
289
of the acceleration vector on the base. The acceleration values can be derived by Eq. (7). Since the trajectory must be continuous, the function describing the position of the joints over time must also be continuous. In order to satisfy this condition, we modeled each function qi (t) (where t is the time) as a set of 5th polynomial splines and imposed the continuity of qi (t), q˙i (t), and q¨i (t). Each spline is a polynomial of the 5th order because six conditions are imposed by the physics of the phenomenon (continuity of the function, its first and second derivative in the knots). With reference to Fig. 1, considering that the robot manipulator contains three joints, the trajectory is marked by two knots, and for each joint it is necessary to control angular position, velocity and acceleration, our fitness function depends on 3 · 2 · 3 = 18 variables.
3
Compact Differential Evolution Light
In order to solve the online trajectory optimization problem described in the previous section, we considered a compact algorithm which proved to be successful in a wide range of landscapes, namely the compact Differential Evolution (cDE) [9]. More specifically, we introduced two minor modifications into the original cDE framework, in order to make the algorithm computationally less expensive without compromising its efficiency. Most importantly, these modifications allow to use cDE in real-time environments. The resulting algorithm, named compact Differential Evolution light (cDElight), see Algorithm 1, consists of the following steps. Without loss of generality, let us assume that the decision variables are normalized so that each search interval is [−1, 1]. At the beginning of the optimization, a 2 × n matrix, where n is the problem dimension, is generated. This matrix P V = [μ, σ] is called probability vector. The initial values of μ and σ are set equal to 0 and 10, respectively. The value of σ is empirically set large enough to simulate a uniform distribution. A solution xe , called elite, is then sampled from P V . More specifically, the sampling mechanism of a design variable xr [i] associated to a generic candidate solution x from P V consists of the following steps. For each i-th design variable indexed, i = 1, · · · , n, a truncated Gaussian Probability Distribution Function (PDF) characterized by a mean value μ [i] and a standard deviation σ [i] is associated. The formula of the PDF is: 2 − (x−μ[i]) 2 e 2σ[i]2 π (8) P DF (truncN orm (x)) = μ[i]+1 μ[i]−1 √ − erf σ [i] erf √ 2σ[i] 2σ[i] where erf is the error function [3]. From the PDF, the corresponding Cumulative Distribution Function (CDF) is constructed by means of Chebyshev polynomials according to the procedure described in [2]. It must be observed that the codomain of CDF is [0, 1]. In order to sample the normalized design variable x[i] from P V , a random number r = rand(0, 1) is sampled from a uniform distribution. Finally, the inverse function of CDF, representing x[i] in correspondence of r, is then calculated and scaled in the original decision space.
290
G. Iacca et al.
counter t = 0 {** P V initialization **} initialize μ = ¯ 0 and σ = ¯ 1 · 10 sample elite from P V while budget condition do {** Mutation Light**} generate xoff from a modified P V : P V = [μ, (1 + 2F 2 )σ2 ] {** Crossover Light**} xoff = elite generate istart = round (n · rand (0, 1)) xoff [istart ] = xoff [istart ] {** Deterministic Copy**} xoverL = round log(rand(0,1)) log(Cr) i = istart + 1 j=1 while i = istart AND j ≤ xoverL + 1 do xoff [i] = xoff [i] i=i+1 j =j+1 if i == n then i=1 end if end while {** Elite Selection **} [winner, loser] = compete (xoff , elite) if xoff == winner then elite = xoff end if {** P V Update **} update μ and σ according to Eq. 12 t=t+1 end while
Algorithm 1. cDElight pseudo-code
At each step t, cDElight generates an offspring by means of two operators called mutation light and crossover light, which represent two modifications of the original cDE framework. Mutation light consists of the following steps. According to a DE/rand/1 mutation scheme, three individuals xr , xs , and xt are needed to generate a provisional offspring xoff computing xoff = xt +F (xr − xs ). Instead of sampling three separate individuals, like the original cDE algorithm does, the light mutation generates xoff by performing only one sampling. In order to do that, we intentionally confuse Gaussian and truncated Gaussian PDF, and we apply the properties of the algebraic sum of normally distributed variables. In this way, given that {xr , xs , xt } ∼ N μ, σ 2 , and considering the DE/rand/1 scheme, it is possible to sample directly the xoff from the following modified Gaussian distribution: xoff ∼ N μ, σ 2 + F N μ, σ 2 −N μ, σ 2 = (9) = N μ + F (μ − μ) , σ 2 + F 2 σ 2 + σ 2 = N μ, (1 + 2F 2 )σ 2 It must be remarked that this operation is not fully equivalent to sampling three solutions from a truncated Gaussian distribution but it is an approximation which neglects the tails of the distribution outside the interval [−1, 1]. Similarly to mutation light, crossover light is a computationally light version of the exponential crossover used in the cDE schemes, described in [10]. Instead
Robot Trajectory Optimization with cDElight
291
of generating a set of random numbers until the condition rand (0, 1) ≤ Cr is no longer satisfied, only the length of the section of solutions to be inherited, i.e. how many genes should be swapped, is randomly generated. Obviously, since only one random number is generated, this light exponential crossover has a lighter computational overhead with respect to a traditional exponential crossover. When crossover is applied, the offspring xoff is initialized to the current elite, and one randomly selected decision variable is deterministically copied from xoff to the corresponding position in xoff . In order to simplify the notation let us consider the deterministic copy of the first gene and the probabilistic copy of the other genes as independent events. The probability that m genes, on the top of the first one, are copied from xoff to xoff is Crm . More formally the discrete probability P r that the crossover length xoverL is equal to m is known as geometric distribution and is given by: P r (xoverL = m) = Crm
(10)
where m = 1, 2, . . . , n − 1. In order to extract the number of genes m to be copied, it is enough to apply the inverse formulas and obtain:
log (rand (0, 1)) xoverL ∼ round (logCr (rand (0, 1))) = round (11) log (Cr) where the last equality is due to the change of base of a logarithm. In other words, crossover light consists of performing the deterministic copy and subsequently the copy of xoverL genes, where xoverL is determined by formula (11). To further control the crossover effect, cDElight makes use of parameter, namely the proportion of genes undergoing exponential crossover αm , so that, for a chosen αm , the crossover rate can be set as Cr = nα1m√2 , as proposed in [10]. In this way, it is possible to estimate the proportion of genes to be inherited from the provisional offspring independently on problem dimension. Finally, when xoff is generated, its fitness is computed and compared with the fitness of the elite (see the function compete() in Alg. 1). On the basis of this comparison, a winner solution (solution displaying the best fitness) and a loser solution (solution displaying the worst fitness) are detected. The winner solution biases the virtual population by affecting the P V values, according to the following update rules: σ t+1
μt+1 = μt + N1p (winner − loser) 2 2 2 = (σ t ) + (μt ) − (μt+1 ) + N1p (winner2 − loser2 )
(12)
where Np is a parameter, namely virtual population size. Details for constructing Eg. 12 are given in [8]. In addition to the P V values, also the elite is updated, according to a persistent elitism scheme [1].
4
Simulation Results
In order to minimize the fitness function described in Section 2, the following memory saving algorithms have been implemented and compared:
292
G. Iacca et al.
− Simplified Intelligence Single Particle Optimization: ISPO [19], with acceleration A = 1, acceleration power factor P = 10, learning coefficient B = 2, learning factor reduction ratio S = 4, minimum threshold on learning factor E = 1e − 5, and particle learning steps P artLoop = 30; − Non uniform Simulated Annealing (nuSA) [16] with mutation exponent B = 5, temperature reduction ratio α = 0.9, temperature reduction period Lk = 3, and initialSolutions = 10; − compact Differential Evolution (cDE) [9] with rand/1 mutation, exponential crossover and persistent elitism. The cDE algorithm has been run with virtual population size Np = 300, scale factor F = 0.5, and αm = 0.25; − compact Differential Evolution light (cDElight), as described above, with Np = 300, scale factor F = 0.5, and αm = 0.25. We decided to compare the proposed cDElight to ISPO and nuSA because these two methods employ a completely different logic. On the other hand, cDE has been included in the experiments because it represents the original version of cDElight. For each competing algorithm, the parameter setting suggested in the original paper was used. It must be remarked that, in order to perform a fair comparison, cDE and cDElight employ the same parameter setting. All the algorithms can be considered memory saving heuristics, as they require a fixed amount of memory slots which does not depend on the problem dimension. In other words, if one of these algorithms is used to tackle a large scale problem, although the slot length is proportional to the dimension of the problem, these slots do not increase in number. More specifically, ISPO and nuSA are typical single solution algorithms, requiring only two memory slots, one for the current best solution and the other for a trial candidate solution. On the other hand, the cDE schemes are memory-wise slightly more expensive as they require, on the top of the two slots for single solution algorithms, two extra slots for the virtual population P V . This compromise is made in order to have the advantages of a population-based search and a still low memory usage.
3000 cDE ISPO cDElight nuSA
2500
Fitness value
2000
210 200 190
1500
180 170
1000
160 150
500
0 0
140 6000
2000
7000
8000
4000 6000 Fitness function call
9000
10000
8000
10000
Fig. 2. Average performance trend of the algorithms for the space robot application. The inset figure shows a close-up of the fitness trend after 6000 fitness evaluations.
Robot Trajectory Optimization with cDElight
293
For each algorithm, 30 independent runs have been performed. The budget of each single run has been fixed equal to 10000 fitness evaluations. In Fig. 2, the average performance trend of the algorithms considered in this study is represented. Table 1 shows the obtained numerical results. Average final fitness values are computed for each algorithm over the 30 runs available. The best result is highlighted in bold face. In order to strengthen the statistical significance of the results, the Wilcoxon Rank-Sum test has also been applied according to the description given in [15], where the confidence level has been fixed to 0.95. With respect to Table 1, the results of the Wilcoxon test for cDElight against the other algorithms are displayed. The symbol ”+” indicates that cDElight statistically outperforms both ISPO and nuSA, while the symbol ”=” indicates that, on the basis of the Wilcoxon Rank-Sum test, the null hypothesis is accepted, i.e. cDE and cDElight have similar performance. However, as we have seen in the previous section, the computational overhead of cDElight is definitely lower. Table 1. Compared results on the space robot application cDE W ISPO W nuSA W cDElight 1.480e+02 ± 5.55e+00 = 1.959e+02 ± 1.08e+02 + 1.709e+02 ± 7.19e+00 + 1.440e+02 ± 1.08e+00
5
Conclusion
In this paper we modeled the disturbance to the base of a robotic arm mounted on a spacecraft, and we used a measure of the acceleration at the base as cost function to be minimized. In order to avoid waste of fuel and disturbances to the spacecraft orbit, an online optimization of the robot trajectory is proposed. A specifically designed compact algorithm, namely compact Differential Evolution light (cDElight), was used to tackle this problem in a computationally efficient manner. Using cDElight, it was possible to address not only the memory saving necessities of the hardware typically used in space applications, but also the realtime requirements of the specific application. Compared to the other memory saving meta-heuristics considered in this study, cDElight proved to obtain the best results, still having a limited computational overhead and a reduced memory footprint. In our view, the proposed cDElight algorithm represents an interesting optimization solution when a limited hardware (memory and CPU) is available and a fast response of the system is required.
References 1. Ahn, C.W., Ramakrishna, R.S.: Elitism based compact genetic algorithms. IEEE Transactions on Evolutionary Computation 7(4), 367–385 (2003) 2. Cody, W.J.: Rational chebyshev approximations for the error function 23(107), 631–637 (1969) 3. Gautschi, W.: Error function and fresnel integrals. In: Abramowitz, M., Stegun, I.A. (eds.) Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, ch.7, pp. 297–309 (1972)
294
G. Iacca et al.
4. Huang, P., Chen, K., Xu, S.: Optimal path planning for minimizing disturbance of space robot. In: Proceedings of the IEEE International Conference on on Control, Automation, Robotics, and Vision (2006) 5. Iacca, G., Mallipeddi, R., Mininno, E., Neri, F., Suganthan, P.: Global supervision for compact differential evolution. In: Proceedings IEEE Symposium on Differential Evolution, pp. 25–32 (2011) 6. Iacca, G., Mininno, E., Neri, F.: Composed compact differential evolution. Evolutionary Intelligence 4(1), 17–29 (2011) 7. Larra˜ naga, P., Lozano, J.A.: Estimation of Distribution Algorithms: A New Tool for Evolutionary Computation. Kluwer (2001) 8. Mininno, E., Cupertino, F., Naso, D.: Real-valued compact genetic algorithms for embedded microcontroller optimization. IEEE Transactions on Evolutionary Computation 12(2), 203–219 (2008) 9. Mininno, E., Neri, F., Cupertino, F., Naso, D.: Compact differential evolution. IEEE Transactions on Evolutionary Computation 15(1), 32–54 (2011) 10. Neri, F., Iacca, G., Mininno, E.: Disturbed exploitation compact differential evolution for limited memory optimization problems. Information Sciences 181(12), 2469–2487 (2011) 11. Neri, F., Mininno, E.: Memetic compact differential evolution for cartesian robot control. IEEE Computational Intelligence Magazine 5(2), 54–65 (2010) 12. Norman, P.G.: The new AP101S general-purpose computer (gpc) for the space shuttle. IEEE Proceedings 75, 308–319 (1987) 13. Qin, A.K., Huang, V.L., Suganthan, P.: Differential evolution algorithm with strategy adaptation for global numerical optimization. IEEE Transactions on Evolutionary Computation 13, 398–417 (2009) 14. Ren, K., Fu, J.Z., Chen, Z.C.: A new linear interpolation method with lookahead for high speed machining. In: Technology and Innovation Conference, pp. 1056–1059 (2006) 15. Wilcoxon, F.: Individual comparisons by ranking methods. Biometrics Bulletin 1(6), 80–83 (1945) 16. Xinchao, Z.: Simulated annealing algorithm with adaptive neighborhood. Applied Soft Computing 11(2), 1827–1836 (2011) 17. Xu, Y.: The measure of dynamic coupling of space robot system. In: Proceedings of the IEEE Conference on Robotics and Automation, pp. 615–620 (1993) 18. Zhang, J., Sanderson, A.C.: Jade: Adaptive differential evolution with optional external archive. IEEE Transactions on Evolutionary Computation 13(5), 945–958 (2009) 19. Zhou, J., Ji, Z., Shen, L.: Simplified intelligence single particle optimization based neural network for digit recognition. In: Proceedings of the Chinese Conference on Pattern Recognition (2008)