Next, the elements of the fitness function are defined as either
or
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.
1.10 A Design Example
In this section, we will conclude this chapter with a design example. In particular, we will endeavor to design a UI‐core inductor using an optimization‐based design process. At this point, we have not studied any magnetics or magnetic devices. This will be the subject of the remainder of this book. Since we are not yet in a position to derive or understand the relationships needed, an elementary analysis will be provided and the reader is asked to simply accept these relationships at face value for the time being. It should be observed that the analysis used to derive the needed relationships is very simplistic, but this does not matter because our purpose here is only to look at the design process. We will conduct a much more detailed analysis and design in subsequent chapters.
A UI‐core inductor is depicted in Figure 1.22. Therein, the dark region is the magnetic core. The magnetic core conducts magnetic flux and is made of a U‐shaped piece (the U‐core) and an I‐shaped piece (the I‐core). Conductors (wires) pass through the middle of the U, a region called the slot, and also around the outside of the U‐core to form a winding. The slot has a width denoted ws and a height denoted ds. The width of the core (both U‐ and I‐cores) is denoted the core width wc, and the length of the core pieces is lc. The two cores are separated by an air gap g. The cross‐sectional drawing (a) is the view that one would obtain by looking to the right from the left side of the side view (b) if the side view were cut in half (in the direction into the page). The light region indicates a winding comprised of N turns of wire.
Our goal in this design will be to design an inductor that has an inductance of at least Lmn, a flux density below Bmx, and a current density below Jmx at rated dc current irt. It is desirable to minimize the mass M of the inductor and to minimize the power loss at rated current, denoted Prt. We will also constrain our designs to have a mass below Mmx and a power loss less than Pmx.
Figure 1.22 UI‐core inductor.
The free parameters in our design are the number of turns N, the slot depth ds, the slot width ws, the core thickness wc, the core depth lc, and the air gap g. Thus, our parameter vector may be expressed as
In (1.10-1), N* is the desired number of turns rather than the actual number of turns N because, as a design parameter, we will let the number of turns be represented as a real number rather than an integer. This is because for large N this variable acts in a more continuous rather than discrete fashion. The actual number of turns is calculated from the desired number as
In order to perform the optimization, we will need to analyze the device. It is assumed that windings occupy the entire slot, that the core is infinitely permeable, and that the fringing and leakage flux components are negligible. Again, for the reader unfamiliar with these terms, the analysis can be taken as a set of arbitrary mathematical equations; we will spend the rest of the book defining and developing more accurate expressions