## 4 Selection of the Objective Function and Optimization Parameters
, \tag{6}\]  
where <\(P_{loss}\)> is the average total loss (arithmetic mean of total losses \(P_{loss}\) at the two considered operating points);  
\(\max(I_{arm})\) is the maximum armature current that occurs at the 2 nd operating point (the maximum torque; 750 rpm); \(\max(TRsym)\) is the maximum value of the symmetrized torque ripple; \(\max(TR)\) is the maximum value of the nonsymmetrized torque ripple; \(B_{h}\) is magnetic flux density in the stator housing and rotor sleeve at the 2 nd operating point; \(S_{demag}\) is the area of the demagnetized magnets; \(S_{mag}\) is the total area of the magnets. Furthermore, for greater clarity, the natural logarithm (6) is used. In Equation (6), constants/weights 1, 0.7, 0.025 and 0.01 determine the importance of certain objectives. These values just reflect the approximate relative priority of each of the optimization goals, based on the experience of the authors in designing similar machines. The most important target has a weight of one. The most important optimization objective is to reduce the average loss, so the corresponding <\(P_{loss}\)> multiplier is raised to the highest power. The constant 0.7 means that a 1% reduction in the current at 750 rpm is considered as valuable as a 0.7% reduction in the average loss. The objectives of reducing symmetrized and unsymmetrized torque ripples are substantially less important. The constants 0.025 and 0.01 mean that other things being equal, designs with lower torque ripples are preferable. The last two multipliers of function (6) set the soft constraints of flux density in non-laminated parts of the magnetic core and the area of irreversibly demagnetized ferrite magnets. The constants 5 and 300 control the steepness of the constraints. Too small values of these constants can lead to constraint violations, i.e., to an unacceptable design. Calculations show that the optimized design satisfies the constraints (flux density in these parts is no more than 1.6 T; demagnetizing force is 3.9 kOe). Too large values cause fast reduction of the volume of the simplex, which slows down optimization. In order to simplify the optimization procedure, as well as the possibility of using the results for different types of winding wires with different standard sizes (for example as specified in [36]), it is assumed that the number of turns in the layer of the armature winding, as well as the width and height of the wire are arbitrary positive real numbers. The number of turns is selected so as to fit with the amplitude value of the line voltage \(V_{3450}\) in the 40 kW; 3450 rpm (maximum voltage) operating point is equal to 113 V [5]. The number of parallel branches is assumed to be equal to six. The parameters that define the design of the generator are illustrated in Figure 6.  
The main unchangeable parameters of the generator are shown in Table 1. Table 2 shows the values of the parameters of the SHG varied during the optimization for the initial design, as well as the design obtained as a result of optimization. Because the Nelder-Mead method is an unconstrained optimization method, ranges of optimization parameters are not provided. Since the Nelder-Mead method is a local search method, the initial design is not completely random. To obtain the initial design, a manual optimization with several attempts was carried out. The parameters varied manually to achieve better performance, to mitigate the saturation or the violation of the constraints. Some principles used are as follows:  
* To mitigate the saturation, the thickness of the most saturated parts of the magnetic core must be increased. For example, to decrease saturation, the most saturated parts of the magnetic core should be thickened;
* To decrease the total loss, it is useful to inspect the losses in individual parts of the machine;
* To decrease the loss in the armature winding or in the excitation one, we can try to increase their cross-section area, etc. The rotor shaft is made of non-magnetic material.