Читать книгу Power Magnetic Devices - Scott D. Sudhoff - Страница 39

1.9 Formulation of Fitness Functions for Design Problems

Оглавление

The previous sections of this chapter have focused on the design process, and some general‐purpose single‐ and multi‐objective optimization techniques. In this section, we consider methodologies to construct fitness functions.

In constructing the fitness function, we will have a variety of metrics, such as mass and loss, and also a number of constraints related to the appropriate operation and construction of the device of interest. It will often be the case that we will have to perform multiple analyses in order to evaluate metrics, and that some of these analyses may be computationally expensive. The fact that a variety of analyses of varying computational intensity will be required will be a significant consideration in the construction of the fitness function.

Let us begin our discussion of the construction of the fitness function with consideration of the constraints. Let us assume that we have C constraints, and use ci to denote the status of the ith constraint. If the constraint is satisfied, we will set ci = 1. If the constraint is not satisfied, we will have 0 ≤ ci < 1. It is convenient to define ci so that it approaches 1 as the constraint becomes closer to becoming satisfied.

In order to test constraints, it is convenient to define the less‐than‐or‐equal‐to and greater‐than‐or‐equal‐to functions as

(1.9-1)

(1.9-2)


Figure 1.21 Constraint functions.

These functions are illustrated in Figure 1.21.

As an example, we may require the height of a transformer to be less than a maximum value hmx. If this is the first constraint and if we use h(x) to represent the height in terms of our design parameters, our first constraint could be calculated as

(1.9-3)

Next, let us consider our design metrics. The design metrics will also be a function of the parameter vector x. In this text, common metrics will be mass and loss. Let the number of metrics be denoted M, and the value of the ith metric be denoted mi. It will henceforth be assumed that all metric values are greater than zero.

As we will see, metrics and objectives are closely related but not synonymous. Metrics will be based on attributes of interest. Objectives will be based on the metrics, but also be influenced by constraints.

Let us now discuss the definition of the objective or fitness function. In keeping with the usual practice of GAs, we will assume that our fitness function (which is synonymous with the objective function) is of a form to be maximized. One approach to creating a fitness function begins with first forming a combined constraint. This can be done by averaging the constraints as

(1.9-4)

Next, the elements of the fitness function are defined as either

(1.9-5)

or

(1.9-6)

where ε is a small positive number. The value has no impact on results but is convenient for plotting the fitness versus generation. It is commonly chosen to be on the order of 10−10.

With this definition, designs that do not meet all constraints have negative fitness, while designs that do meet all constraints have positive fitness. If the constraints are not met, the fitness increases (becomes less negative) as the constraints become closer to being met. Note that the metric in the denominator in (1.9-6) does not pose a risk of a singularity because for most cases the metrics cannot be zero if all constraints are met. For example, a workable inductor design will have nonzero mass. Also, observe that all elements of the fitness function are negative (and equal) in the case where one or more constraints are not met; all elements of the fitness function are positive (and generally speaking not equal) if all of the constraints are met.

While the use of (1.9-5) and (1.9-6) is convenient for many design problems, there are cases when certain calculations are nonsensical unless constraints are met. There are also cases where certain calculations are computationally expensive, and there is a desire to avoid them if possible. For example, if predicting loss were computationally expensive, and that it is already known that not all constraints are passed, then there is little motivation to proceed with the loss calculation. Table 1.6 contains pseudo‐code to treat this case. Therein, CI and Cs denote the number of constraints imposed and satisfied, respectively, thus far in the current evaluation of the fitness function. Both of these quantities are initialized to zero. After the constraint in question is calculated, the number of constraints imposed and number of constraints satisfied are updated. If the number of constraints satisfied falls below the number of constraints imposed, the fitness is calculated based on the number of constraints satisfied, and no further action (calculation of further constraints or metrics) is taken. This can lead to a significant computational savings for some problems.

Table 1.6 Approach for Treating Constraints

calculate constraint ci CI = CI + 1 CS = CS + ci if (CS < CI) return end

The code block shown in Table 1.6 is repeated sequentially for every constraint. After all constraints are tested, the metrics may be calculated and the fitness assigned as in (1.9-5) and (1.9-6) for the case when all constraints are met. There are also variations of this procedure. For example, it may be convenient to calculate and test several constraints at a time.

Power Magnetic Devices

Подняться наверх