• Keine Ergebnisse gefunden

Formulation of a Novel Optimization Procedure

4 Magnetic Actuator Optimization

4.3 Formulation of a Novel Optimization Procedure

Especially the inability to use discrete values for input parameters to the cost function is criticized. For a real world magnetic actuator the enameled wire will only be available in discrete diameters. And for embedded air coils the number of turns per layer and the number of layers are also discrete integer values. Finding optimized solutions for such a setup requires the use of so-called mixed-discrete sequential quadratic programming methods. They are more difficult to apply and have even bigger problems in finding the global optimum.

A solution to the problem of finding the global optimum is not addressed by Miller in [79], and no proof is shown, that the selected coil actually represents the global minimum. One step towards that direction is the discussion led on the complex shape of the design parameter space, where the proposed cost function was found not to be strictly convex.

– A flexible interface for defining optimization objectives shall be imple-mented by the procedure. Equality and inequality constraints on the input as well as on the output parameters and the possibility to search for minimum and maximum values of the objectives need to be set using this interface.

– Owing to the high dimensionality and the resulting complex shape of the parameter space, the procedure shall be able to find the global optimum for a given optimization scenario.

How the above requirements are met by the proposed optimization procedure is shown in the following subsections. Research related to those sections was published by Grau and Suchantke [75], which relies on the work presented by Suchantke in [76]. For the present work, the previously published work was reviewed and the implementation further improved.

4.3.1 Mathematical Modeling of Magnetic Coil Properties

To meet the first requirement, a complete as possible set of input design parameters was identified for all three coil types. Input design parameters are e.g. wire diameter 𝑑w, core length𝑙c and diameter𝑑c, and parameters that describe the geometry of the coil, but also material coefficients like the temperature coefficient of specific resistance 𝛼 or density 𝜌. Those were then used to define equations that put the output design parameters into relation with the input parameters. The main output design parameters are magnetic dipole𝜇, electric power consumption𝑃, and mass𝑀. Wherever possible, basic input parameters are first linked together to form intermediate parameters, like e.g. wire length𝑙wor enclosed area𝐴of the coil. The reason behind defining intermediate parameters is, that some common relations like Ohm’s law to calculate the current 𝐼 from supply voltage𝑈 and resistance𝑅 are the same for no matter what type of coil.

4.3.2 High-Dimensional Parameter Space Implementation

The second requirement demands a large number of input parameters in order to generate a high-dimensional parameter space. Owing to the many discrete or integer-valued input parameters and the additional implementation of a global minimum search method, a mixed-integer SQP method was rejected to be used for the optimization procedure. Instead, a brute force approach was selected, which exploits the matrix calculation capabilities of the engineering programming language GNU Octave [95].

The equations previously discussed are all implemented as functions that allow parameters to be passed as multi-dimensional vectors into the function. As the input parameter vectors are originally defined to be one-dimensional, they are all reshaped to matrices of a fixed number of dimensions, with each matrix having only multiple entries in one single dimension. The functions then use element-by-element operators and broadcasting mechanisms of GNU Octave to calculate the output as multi-dimensional matrices.

The advantages of using this approach over coding in a high-level, object-oriented programming language like e.g. C++ are the ability to quickly implement new features during development due to the unnecessary compile and link steps. While GNU Octave has the great advantage of being able to write program code that is very similar to the mathematical formulation of the problems, it also supports test-driven development. And finally, it gives access to a great reservoir of high-level plotting functionality. Most of the diagrams displayed in this work were in fact created in GNU Octave and run through a self-developed tool that translates the diagrams into high-quality vector graphics.

One of the disadvantages of using GNU Octave is, that it is a scripting language and an interpreter is used to execute the code. In comparison to a compiled and linked program written in a high-level programming language like C++, the code is therefore executed much slower. However, as GNU Octave itself is written in C++ and the functions developed in the scope of the optimization procedure make heavy use of the element-by-element operators, which are directly implemented in C++, those speed disadvantages are attenuated.

In order to be able to calculate intermediate and output coil parameters for three coil types and to display the data in diagrams and tables, over one hundred functions were implemented. They are structured into functions used for individual coil types, as well as common functions like e.g. reading wire data or display intermediate and output parameters in tables and diagrams.

4.3.3 Discrete and Integer Input Parameters

In order to fulfill the third requirement, input parameters are defined in GNU Octave script files. The parameter file is passed to a high-level function which calculates the intermediate and output parameters and takes care of plotting and generation of tables.

Listing 4.1 gives an example for such an input parameter definition file, taken from the optimization of an embedded air coil. All input parameters are given in SI basic units, like e.g. m, V, or C. Ranges of input parameters are either defined as GNU Octave ranges, which require the base, increment, and limit to be set, or row vectors that define a set of integer or decimal values. Some parameters, like e.g. embedded air coil board length 𝑎are fixed to a single value, but in order to reduce the amount of typing necessary to quickly adapt the setup, the structures to define ranges are kept.

This allows to gain very granular control over the true dimensionality and level of detail of the parameter space. It also enables to represent certain technological aspects. Take e.g. the definition of supply voltage𝑈: The entries 1.80 V, 3.30 V and 5 V represent common microcontroller supply voltages for which voltage converters might already be implemented in hardware. Battery voltage levels then relate to the entries 3.70 V and 7.40 V. Thus, the parameter definition in listing 4.1 allows to identify which supply voltage out of a set of available ones would be optimal.

4.3.4 Flexible Optimization Objectives Definition

In order to quickly address the introduction of new optimization objectives and to define if a parameter should be minimized or maximized, optimization

Listing 4.1:Example of discrete and integer input parameter definition in GNU Octave

% c o i l d i m e n s i o n s

a = ( 94: 2: 94) * 1 e -3;

b = ( 80: 2: 80) * 1 e -3;

d = 200 e -6;

% PCB m a n u f a c t u r e p a r a m e t e r s s = ( 1 5 0 : 25: 1 5 0 ) * 1 e -6;

w = ( 1 5 0 : 10: 2 6 0 ) * 1 e -6;

h = [18 35 70 105 1 4 0 ] * 1 e -6;

% c o i l d e s i g n

k = ( 40: 1: 4 0 ) ;

m = ( 4: 1: 4);

% s u p p l y v o l t a g e

U = [ 1 . 8 3.3 3.7 5 7 . 4 ] ;

% t e m p e r a t u r e r a n g e t = ( 20: 5: 2 0 ) ;

objectives are defined as cell matrices. An example of such a definition taken from the optimization of an embedded air coil is shown in listing 4.2.

The first three entries in the objective definition relate to finding optimal solutions for magnetic dipole𝜇, power consumption𝑃, and mass𝑀. Magnetic dipole is to be maximized, starting from a minimum value of 27.5 mA m2. Power and mass are to be minimized, starting from maximum values 83.3 mW and 5.83 g, respectively. Above objective definition finds a total of five optimized solutions. In case of the magnetic dipole optimized coil, the other four objectives act as inequality constraints. So in this case, the coil will have the most magnetic dipole of all calculated coils while obeying the upper limits for power, mass, and so on.

Listing 4.2:Example of flexible optimization objective definition in GNU Octave opt = {

’ mu ’ , ’ max ’ , 2 7 . 5 e -3

’ P ’ , ’ min ’ , 500 e -3 / 6

’ M ’ , ’ min ’ , 35 e -3 / 6

’ m ’ , ’ min ’ , 7

’ Ai ’ , ’ max ’ , 1 e -12 };

The fourth entry states the inequality constraint𝑚≤7, which means that all coils occupy no more than seven internal layers in the PCB. It is possible to define the same inequality constraint using only the input parameter range definitions as given in section 4.3.3. Adding a fourth definition to the list of optimization objectives, however, will result in an optimal solution that obeys all other inequality constraints, and has the smallest possible number of layers.

As the number of internal layers directly influences the cost of the coil, this might be a way to also find a cost-optimal solution. A similar consideration was discussed by Bellini in [90], but no solution to the problem provided.

The last entry in listing 4.2 is important for highly integrated CubeSats solar panels, which feature a large number of electric components. To enable setting this objective, an additional equation for the area 𝐴𝑖 enclosed by the innermost copper traces of the coil was derived and implemented in GNU Octave. In order to now maximize the available inner area, this objective is added which will result in a fifth optimal solution to the problem. To not bias the results for the first four objectives defined, the minimum value for the inner area is chosen at a very small value.

4.3.5 Global Optimum Search

Following the calculation of output parameters of a large set of coil candidates, which are stored in multi-dimensional matrices, optimal solutions need to be identified. The implemented search uses GNU Octave’s find function together with a combination of boolean and comparison operators to identify

the optimal solutions. The search string is automatically created from the defined optimization objectives. An example of such an automatically created search string that uses the optimization objectives defined in listing 4.2 is given in listing 4.3.

The comparison expressions ≥and ≤are applied to the output parameter matrices individually. In a previous step, all parameter matrices have been broadcasted to the same size. Therefore, return values of all comparison expressions have the same size as well. Boolean expressions are applied next, which yields a single matrix of predefined size that holds ones in all entries that obey the constraints. Thefindfunction then returns a single row vector of indexes into the parameter matrices.

Next, for each objective the relevant maximum or minimum is located in the output parameter matrices. This is spelled out in listing 4.3 on the last five lines, but automated in the source code, to maintain flexibility in terms of optimization objectives definition. The variableioptfinally holds all indexes that represent optimal candidates which obey the inequality constraints.

As the implemented procedure does not use a continuous parameter space, it is not able to locate the mathematically exact global optimum. But it will identify the discretized optimum solution closest to the exact global optimum.

Listing 4.3:Example of global optimum search in GNU Octave ind = f i n d ( ( mu >= 0 . 0 2 7 5 ) ...

& ( P <= 0 . 0 8 3 3 3 ) ...

& ( M <= 0 . 0 0 5 8 3 3 ) ...

& ( m <= 7) ...

& ( Ai >= 1 e - 1 2 ) ) ; [~ , i o p t ( 1 ) ] = max ( mu ( ind ));

[~ , i o p t ( 2 ) ] = min ( P ( ind ));

[~ , i o p t ( 3 ) ] = min ( M ( ind ));

[~ , i o p t ( 4 ) ] = min ( m ( ind ));

[~ , i o p t ( 5 ) ] = max ( Ai ( ind ));

As one of the basic requirements in the design of the procedure was to be as close as possible to a real-world design problem for magnetic coils, this is not considered to be a drawback. Like with the previously discussed optimization procedures, the user still has to set up the input parameters carefully in order to not constrain the parameter space too much.