## 4 Selection of the Objective Function and Optimization Parameters  
Like traction motors, an undercar generator is an electrical machine, operating over a wide range of speeds at a constant required output power. However, in the case of a generator, a constant electrical output is required. The rotational speed of an undercar generator increases along with the velocity of the train. The operating speed range of the considered undercar generator is from 750 to 3450 rpm. The generator must produce about 35 kW in this speed range [34]. In order to simplify the optimization procedure, it was assumed that the mechanical power of the generator does not change and is equal to \(P_{max}=40\) kW \(>35\) kW in the entire considered speed range, roughly taking into account the generator loss. Two boundary points are considered in the optimization: the speed \(n_{1}=3450\) rpm at the torque of \(T_{max}\cdot n_{2}/n_{1}=111\) N\(\cdot\)m and the speed \(n_{2}=750\) rpm at the torque of \(T_{max}=510\) N\(\cdot\)m (Figure 5). Manufacturers of passenger car generators [34] have been requested to increase their energy efficiency, and it is necessary to limit the reactive current and torque ripple. In addition, in order to avoid the failure of the generator, it is necessary to prevent irreversible demagnetization of the permanent magnets on the rotor. Thus, the goals of optimization in descending order of importance are to minimize the following quantities:  
1. Average losses <\(P_{loss}\)> which are estimates as the average losses in the modes with the speeds of 750 rpm and 3450 rpm;  
Figure 5: The required torque and mechanical power of the generator as a function of speed. Upper limit of the phase armature current \(I_{arm}\);
* 3. Symmetrized torque ripple max(\(TRsym\)) in the entire operating speed range;
* 4. Non-symmetrized torque ripple max(\(TR\)) in the entire operating speed range;
* 5. Volume of irreversibly demagnetized magnets at maximum current at a speed of 750 rpm. Structural steel 1010 (non-laminated steel used for the manufacture of machine parts) is the material of non-laminated parts of the magnetic circuit. Since the exact magnetization curve and saturation knee point of this steel are not exactly known and are not specified by the manufacturer to ensure that the drop in the magnetomotive force on the stator housing and rotor sleeve is small compared to the drops on the SRSCs, the flux density in these parts is limited to 1.6 T.  
In this study, the single-criterion unconditional Nelder-Mead method is used to optimize the SHG design, which is well known [35] and is included in the basic MATLAB software package (\"fminsearch\" function). Since the Nelder-Mead method is a single-criteria method, in order to achieve the set of optimization goals, the objective function is set as the product of individual goals raised to a certain power, reflecting their significance. Since the Nelder-Mead method is an unrestricted method, the constraints are also given as separate multipliers of the objective function. To avoid reducing the size of the simplex too quickly and slowing down or stalling the optimization process as a result, the corresponding multipliers increase rapidly rather than discretely, unless constraint conditions (\"soft constraints\") are met. The objective function used is:  
\[F = <P_{loss}>\max(I_{arm})^{0.7}\max(TRsym)^{0.025}\max(TR)^{0.01}f \bigg{(}\Big{(}\tfrac{B_{h}}{1.6}\Big{)}^{5}\bigg{)}f\bigg{(}\Big{(}\tfrac{S_{ demag}}{S_{mag}}\Big{)}^{300}\bigg{)};\] \[f(x) = \bigg{\{} \begin{array}{l}x,x>1\\ 1,otherwise\end{array}