The most general problem of SC of smart structures considers as design variables the applied voltages of actuators, their layout and their number. The aim is to find the optimal design values so that the difference between achieved and desired shape is minimized. In essence, SC is an inverse problem where the output, which is the desired shape, is known and the input actuation parameters are to be determined. Therefore, iterative heuristic methods are quite suitable to this task. In this work, this problem is solved by a hybrid genetic algorithm.

#### 3.1. The Fitness Function

Considering beam element, the shape of a structure is primarily described by the shape of its middle axis, which itself is described by the transverse displacement of the finite element mesh nodes. Therefore, a reasonable cost function is

f_{1}, as given by Equation (14), which is the sum of all the squared difference of the transverse displacements between the desired (pre−defined) and the achieved (calculated) shape at all nodes.

In the above equation,

is the desired nodal transverse displacement value and

r is the number of concerned displacements.

However, the static shape control criteria in [

9] is based on the generalized displacements; that is, on both transverse displacements

w and

θ_{y} rotations . Therefore, a fitness function based on the following cost function is used in the aforementioned paper:

It should be noted that the simultaneous usage of displacements and rotations in the cost function f_{2} is very restricted for bending problems such as the ones studied here. Nevertheless, in this work, the two above fitness functions will be used for comparison reasons. Results obtained by using f_{1} as the fitness function will show improvements over f_{2}. In following, a general symbol f is used to denote any fitness function.

#### 3.2. Design Optimization Problems

In general the displacement field is a function of the electric potential, the layout, the geometry of actuators and the number of actuators. In this framework, two kinds of shape control (SC) problems of a beam with various boundary conditions are studied. The Voltage Problem and the Location and Voltage Problem.

The first SC problem (the Voltage Problem) consists in finding a set of actuation voltages

ϕ_{i} for a given number and position of actuators, which minimizes the cost function

f under the constraint:

where

ϕ_{i} is the actuation voltage of the i

^{th} actuator and

ϕ_{min} and

ϕ_{max} the lower and upper saturation voltages. In this work, this problem is solved by genetic algorithms. The MatLab software package was used for the development of an algorithm to optimize actuator placement and voltage for a given cost function and for given number of actuators and beam dimensions and properties. The computer code developed makes no assumption of linearity between the displacements and the electric voltages, thus, it can be used for non−linear models as well.

The second SC problem (the Location and Voltage Problem) is more general. It consists in finding the optimal position and electric potential simultaneously for a given number of actuators, which minimize the cost function f. In this problem, it is assumed that every actuator covers exactly the length of one element. The actuator position is modeled using a Boolean type discrete variable for each element and the electric potential of the actuator using a bounded continuous variable. The Mixed Integer Problem that arises is highly nonlinear and is solved using a modified genetic algorithm procedure in order to accommodate two different types of information: the location of each piezoelectric element and the voltage needed to apply to each of them.

#### 3.3. Genetic Algorithm and Great Deluge

Genetic Algorithms (GAs) are a category of heuristic optimization algorithms that mimics the way traits pass from parents to offspring resulting in the development of characteristics that give an evolutionary advantage to certain members of the population. GAs are an established method of non exact optimization, meaning that a GA is usually able to find very good solutions to hard combinatorial optimization problems when it is difficult or even impossible for an exact optimization method like Linear or Integer Programming to address the same problem within reasonable solving time. A detailed treatment of GAs can be consulted in [

13] while successful applications of GAs can be found in almost every field [

16]. As GAs is a kind of simulation a great number of function evaluations are required. For this reason, several ways have been proposed so as to speed up the process yet maintain quality of the acquired solutions. With this approach the GA is combined with the Great Deluge method, which creates a part of the initial population consisting of good, yet diverse solutions that are then fed to the GA. The rest of the initial population gets generated using random values. The choice of introducing individuals of relative high fitness early in the optimization process seems to help the GA on finding even higher quality solutions faster.

Great Deluge Algorithm (GDA) is a local search optimization method, which was initially proposed by Dueck [

17]. It belongs to the general class of trajectory (single point) search methods for the reason that a single solution is continuously modified so as to progressively achieve better results. Other meta−heuristics that belong to the same class are Simulated Annealing, Taboo Search, Late Acceptance Hill Climbing, and Greedy Randomized Adaptive Search, to name a few. In GDA better solutions are always accepted while worse solutions are also accepted, provided that the computed cost is no worse than the cost of the current solution plus an artificial limit that gradually diminishes. The name Great Deluge was chosen in order to draw an analogy between the method and a situation where a person situated in a landscape filled with plateaus, peaks, and dips tries to keep his feet dry while a heavy rain occurs causing the water level to rise. GDA is similar to Simulated Annealing with the added benefit that it requires tuning of a single parameter only. This parameter known as Decay Rate (DR) is the amount that the tolerance of accepting non−improving solutions is reduced in each iteration of the method. GDA has been applied to a number of optimization problems with promising results. Although GDA was originally applied to the Traveler Salesman Problem, most of the research papers that use this method are in the area of scheduling problems and especially course and examination timetabling [

18,

19]. GDA has also been applied to other optimization problems like channel assignment in cellular communications [

20], preventive maintenance optimization for multi−state systems [

21], constrained mechanical optimization [

22] and others. GDA is less common than other trajectory search meta−heuristics but its simplicity and single parameter tuning makes it a good candidate for several optimization problems that occur in practice.

The pseudo−code for generating part of the initial population of the GA using GDA is shown in

Algorithm 1. Each solution

S is initially generated randomly, optimized to a certain degree using GDA, and then appended to the population. The Decay Rate parameter

DR is computed for each individual of the population by dividing the initial fitness value of the individual

F(S) by the number of iterations

ITER that GDA is allowed to perform. A new solution

S’ is generated from

S using neighborhood functions similar to those described in [

22]. Thus, for a variable referring to the voltage applied to a certain position

i the new value

V_{i}* is computed based on the existing value

V_{i} and the following equation:

Function

rand() returns a uniform random value between 0 and 1 and

step is a parameter with initially value drawn randomly between 500 and 1,000, which gradually diminishes.

Step is calculated with Equation (18), where function

frac() returns the fractional part of a real number,

φ is a parameter that assumes value 0.001 and

k is the iteration counter.

As voltage assumes values between a lower and an upper limit, e.g., between 0 Volts and 400 Volts, when V_{i}* gets a value out of that range, an adjustment occurs so as the value to become valid again. In particular, when the value violates either the lower or the upper limit it is modified so as to be spaced at the same distance from the limit that is violated but in the feasible range of values.

**Algorithm 1.**
Great Deluge Algorithm for initial population generation.

**Algorithm 1.**
Great Deluge Algorithm for initial population generation.

#### 3.3.1. Chromosome Encoding

A decision directly related to the success of a GA in a specific application is the chromosome encoding, which is the encoded form of each individual belonging to the population. Chromosomes are combined in order to breed new individuals or mutated so as to incorporate direct changes. In any kind of problem examined in this work, the beam is divided in 30 equally spaced positions where the actuators can be positioned.

In the first kind of the problem (the Voltage Problem) every six consecutive positions become a group and the same voltage applies to all actuators of the same group. So, the chromosome encoding is just a sequence of decimal numbers equal to the number of groups. Each value of the chromosome is associated with the voltage that will be applied to all actuators of the group in the same place. Given that four different settings are tested with two, three, four, or five groups of actuators active respectively the chromosome length becomes two, three, four, or five.

**Figure 1.**
Chromosome encoding for the location and voltage problem.

**Figure 1.**
Chromosome encoding for the location and voltage problem.

In the second case of the problem (the Location and Voltage Problem) the chromosome consists of two parts (

Figure 1). The left one is a sequence of 30 binary values carrying the information of presence (1) or absence (0) of an actuator at the predefined positions. The right part is the voltages that will be applied to each actuator that is present. The sum of ones in the left part should equal to the number of decimal values in the right part. As, for each run of the program, the number of actuators that will be active is known in advance, the chromosomes have a constant−length per run. In this version of the problem more degrees of freedom are given since different voltages can be applied to actuators that in the Voltage Problem belong to the same group. So, better results are expected and indeed the GA manages to find them as is shown in

Section 4.

#### 3.3.2. GA Implementation Issues

There are numerous GA implementations available in the form of callable libraries, frameworks or integrated environments. In this paper, MatLab’s Global Optimization Toolbox R2012a, which includes the Genetic Algorithm Toolbox was used. MatLab’s Global Optimization Toolbox starting from version R2011b has the capability of defining integer constraints out of the box. This was very convenient in our case given that the Location and Voltage Problem is a Mixed Integer optimization problem.