DESIGN AND OPTIMIZATION OF PERMANENT MAGNET SYNCHRONOUS GENERATOR FOR USE IN HYDRODYNAMIC RENEWABLE ENERGY BY APPLYING ACO AND FEA

One of the most important ways to reduce fossil fuel consumption and consequently reduce greenhouse gases and environmental pollution is the use of renewable energies such as water, sun, wind, etc. One of the most efficient ways to take advantage of shallow flowing waters, such as rivers and fountains, in electrical power generation is the use of the hydrodynamic screw in the direction of water flow. The design of the generator for this application results in decreasing environmental dangers. Additionally, it provides some part of the electrical energy to fulfil human needs. Generators in hydrodynamic renewable energy system ought to have features such as high efficiency, power density and reliability as well as low volume. Among various generators, the permanent magnet synchronous generator (PMSG) meets these requirements very well. In this paper, first, analytical calculations and the design process of the PMSG are explained. Then, ant colony optimization (ACO) was used for the optimization of design quantities. The PMSG design optimization increased in efficiency and decreased in volume. By improving these two parameters in the designed PMSG, it became very suitable for use in hydrodynamic renewable energy system. Finally, the results of the optimized design of the PMSG were validated through simulation of it in Maxwell software and applying finite element analysis (FEA). The final results have also been compared to similar experimental research results. ABSTRAK: Salah satu kaedah penting bagi mengurangkan penggunaan bahan api fosil dan secara langsung mengurangkan kesan gas rumah hijau dan pencemaran alam adalah dengan menggunakan tenaga yang diperbaharui seperti air, matahari, angin, dan lainlain. Salah satu cara berkesan bagi mengambil faedah daripada air cetek yang mengalir seperti sungai dan mata air dalam penjanaan tenaga elektrik adalah melalui penggunaan skru hidrodinamik pada arah aliran air. Aplikasi daripada penciptaan penjana ini dapat mengurangkan kesan buruk terhadap alam. Pada sisi lain, ia menyediakan tenaga elektrik untuk keperluan manusia. Sistem penjana tenaga hidrodinamik harus mempunyai ciri seperti berikut; kecekapan yang tinggi, ketumpatan tenaga dan dipercayai, serta kurang bunyi. Antara pelbagai penjana, penjana magnet kekal segerak (PMSG) memenuhi keperluan ini dengan baik. Dalam kertas ini, pertama, pengiraan analisis dan proses rekaan PMSG dijelaskan. Kemudian, kaedah semut koloni pengoptimuman (ACO) telah digunakan bagi mengoptimumkan kuantiti reka bentuk. Reka bentuk optimum PMSG meningkatkan kecekapan dan mengurangkan bunyi. Dengan menambah baik dua parameter ini dalam reka bentuk PMSG, ia menjadikan sistem penjana tenaga hidrodinamik sangat sesuai digunakan. Akhirnya, keputusan daripada rekaan optimum PMSG disahkan melalui simulasi mengunakan perisian Maxwell dan dengan IIUM Engineering Journal, Vol. 18, No. 2, 2017 Nikbakhsh et al. 159 menggunakan analisa unsur terhingga (FEA). Akhir sekali, keputusan dibandingkan dengan eksperimen yang berkaitan dengan kajian.


INTRODUCTION
Due to the increasing speed of industry and growth in world population, energy consumption has been increasing rapidly in recent years. To compound matters, due to changes in human lifestyle, the number of energy consumption instances has increased. Therefore, in today's world, energy supply is one of the most important concerns of human life that needs to be taken into account. The use of fossil fuels is one of the more common methods of energy production. Dependence on fossil fuels is problematic for two reasons.
To begin with, their limited supply means that these fuels will come to an end in the future years. Equally troubling, the excessive consumption of these fuels leads to increased greenhouse gas emissions worldwide and environmental pollution. As an alternative to problematic fossil fuels, researchers have turned to renewable energies such as water, sun, wind, etc. Water energy in various forms, including the seas, oceans, rivers, and even fountains, is as an important source of renewable energy. This type of green energy can be harnessed using multiple technologies such as hydrodynamic screw systems in the direction of water flow or water wheel systems [1][2][3][4][5][6][7][8]. Fig. 1: Two ways of generating electrical energy from water: (a) hydrodynamic screw system, (b) water wheel system [1].
In Fig. 1, the use of hydrodynamic renewable energy systems and water wheel systems to generate electrical energy is shown. The speed of the water wheel system is in the range of 10 rpm with a high torque. There is enough space for the installation of a multi-pole machine because the water wheel system is often used with a large mechanical transmission system. A hydrodynamic screw renewable energy system has a rated speed of 30 rpm and high torque. The efficiency of the screw is approximately 85%. In this system, an asynchronous or synchronous machine with frequency inverter can be used in order to generate electrical energy. Figure 2 shows the efficiency of different types of turbines including the hydrodynamic screw system turbine, the water wheel system turbine, the Kaplan turbine, and the Francis turbines. The water wheel system adapts itself very well to water fluctuations. The hydrodynamic screw also has a linear behaviour in a certain range. The Francis turbines are the most dependent turbines to water level fluctuations [1]. Figure  3 shows the generation of electrical energy through a hydrodynamic screw system, schematically. In this system, shallow flowing water energy typical of rivers and fountains changes into mechanical energy (by screw motion). The generated rotational motion rotates the generator shaft and produces electrical energy. By applying a hydrodynamic screw, even a small stream of water could serve as a source of renewable energy for electrical energy generation. In this way, for each kilowatt hour electrical energy production, about one less kilogram of carbon dioxide contaminates the environment [1]. Being a renewable energy source and causing no pollution for the environment, low maintenance costs, low operating costs and taking advantage of the wasted water resources are among the other advantages of this type of system [1][2][3][4][5][6][7][8]. Depending on the volume of incoming water, the hydrodynamic screw speed is about 30 turns per minute; although by applying the gearbox, generator shaft rotation speed increases to 300 rpm which is still w h h hi i lower, its volume increases. This leads to an increase in used and lost material and a decrease in efficiency. Therefore, for solving this problem, the volume of the generator should be reduced as low as possible in order to compensate for the speed reduction. On the other hand, water energy might not be pluripotent enough, so one of the optimal design purposes of the generator for this application will be efficiency improvement. According to the above description, the generator that is going to be used in this application should have features such as high efficiency, power density, reliability, and small size and volume. A permanent magnet synchronous generator (PMSG) is one of the best choices with the ability to achieve the above purposes [1,[4][5][6][7][8]. In [1] it was explained that the use of low speed PMSG for small hydropower plants has made the electrical energy generation economical by new production methods. The main characteristics of the Archimedes wave swing (AWS) system for producing electrical energy were described in [8] and some of the design choices were motivated. Also in [6], a complete small hydropower plant (SHP) is explained based on an innovative generation unit (hydro-set). The hydro-set is a propeller turbine integrated with a PMSG. The optimal size of AWS was discussed in [4]. Then, a numerical model was established to determine the mechanical efficiency according to its geometrical parameters, rotational speed, and degree of filling. In [7], the design process of a 10 kW multi-pole permanent magnet generator was presented. It is a gearless module type and can be used in small hydro power generation. The research in [5] deals with the new conception of the highly efficient generating sets dedicated to the application in small hydropower stations. A simple analytical optimization algorithm was used with the aim of maximizing the apparent transferred power through the air gap under the tangent pressure limitation in PMSG in [9]. In [10], a five-phase permanent-magnet synchronous machine (PMSM) was investigated. It had features such as high-power density and high-fault-tolerant capability for electric vehicles (EVs). A new method for achieving maximum efficiency and power density of PMSM was provided in [11] using the bees algorithm for industrial applications. The number of optimization parameters of synchronous reluctance machine (SynRM) and permanent magnets (PMS) assisting SynRM has been minimized and their relative merits with the interior PM machine have been compared for electric vehicle application in [12]. In [13], the optimal design of PMSG with rotor configuration containing Halbach PMs was studied based on operating conditions and requirement analysis. In order to overcome the problems of PMSG design, an analytical method for obtaining two quantities was proposed and optimization was done in order to achieve maximum efficiency [14]. These quantities included magnetic flux density in the air gap (B g ) and current density in the conductors (J). Also in [15], a comprehensive combinational design process of a small permanent magnet wind generator was proposed based on an analytical model of a surface-mounted permanent magnet generator. In order to improve the waveform of the output voltage of the generator a genetic algorithm was used.
In this paper, first, the existing generator in a hydrodynamic screw system was designed and optimized. Then, after simulation of the optimized design, it was validated in several ways such as finite element analysis (FEA) and comparing the final results to similar experimental research results. In the first step, primary parameters of PMSG design were determined. In the second step, the type of PM materials and laminates were selected. Third, geometry dimensions of the generator as well as the PM dimensions were calculated. Finally, efficiency and volume of the generator were achieved. In the next section, after determining the input variables of the design, their change boundaries were determined. Then, objective functions were introduced. In the next part, ant optimization algorithm was explained. At the end of this step, results and change curves of objective functions resulting from PMSG optimization were presented. Finally, the results of optimal design were validated through simulation of designed PMSG in Maxwell software and FEA as well as comparing them to similar experimental research results.

STEP-BY-STEP DESIGN PROCESS OF PMSG
The process of designing a PMSG for the intended application consists of the following 5 steps:

Determining Basic Parameters of the Design and Selection of Materials
In the desired generator design, basic parameters such as rated power, voltage, frequency, speed, power factor, and number of phases should be first determined. Moreover, the other initial parameters such as special magnetic loading (B g ) (air gap magnetic flux density) value for synchronous machines varies between 0.8 T to 1.05. It is limited by saturation and core losses [16]. The linear current density (A) (specific electrical loading) is also effective. It is dependent on different factors such as rated power, frequency, voltage and speed [11]. Its suitable value for a small PMSG is in the range of 10 kA/m to 55 [17,18]. Also the current density in the PMSG stator winding varies between 4 A/mm 2 to 6.5 [16]. The generator characteristics studied in this paper to be applied in intended application consist of: 4 kW rated power, 20 Hz rated frequency, 380v rated voltage (RMS value), 300 rpm rated speed, 4 pole pairs and 96 slots [1]. For loss reduction, sheets with less thickness should be used. For this purpose, non-oriented electrical steel with the code of M210-27A and with sheet thickness of 0.27 mm for stator and rotor core were selected. Its core loss amount in flux density of 1.3T and frequency of 20 Hz is equal to 0.6 watt/kg. Since neodymium iron boron (NdFeB) has better magnetic properties than Samarium Cobalt (SmCo), it was selected as PM material in this paper. In this design, the NdFeB magnet with residual flux density of 1.3 T and relative permeability coefficient of 1.05 have been was used.

Generator Geometry Dimensions
The most important geometric dimensions of the generator consist of the length and outer diameter of its stator since these two almost determine the size of the generator. In the case of stator dimensions, internal and external diameter of the stator core, stator yoke, tooth height and width, and slot dimensions could be mentioned. In the case of rotor dimensions, the internal and external diameters of the rotor core are also the most important geometric dimensions of the design [19]. In Fig. 4, the topology of the studied generator, demonstrating geometric dimensions, is shown. The output factor of generator is as the following: (1) In this equation, A is the specific electrical loading, K w1 stands for winding factor related to the winding arrangement, B g1 is the first harmonic peak value of magnetic flux density of the air gap and ε= E s /V ph =1.05.........1.45. E s is the electrical motive force (EMF) that is induced by excitation flux in no-load conditions, and V ph is the stator phase voltage. Also considering χ = L/D, the internal diameter of stator (D) could be achieved by the Eq. (2): In above equation, n syn is the rotor speed according to unit Turn/sec and C is the output factor of generator that could be achieved by the Eq. (1). Considering p as pairs of poles, the value of χ for synchronous generator is equal to [16,19]: Finally, the effective length of the generator would be L= χ×D. Also, the air gap length of a synchronous generator (g) could be estimated by Eq. (4): In Eq. (4), τ P is the pole pitch and γ is a coefficient depending on the different types of generators whose value can be found in a reference table [16]. Also in this design, semiclosed slots have been considered in accordance with Fig. 5, because they provide lower slot coefficient and more suitable strength than open slots. The maximum amount of tooth magnetic flux density (B t ) is 1.6 T and the stator yoke magnetic flux density (B ys ) and rotor yoke magnetic flux density (B yr ) is 1.3 T. The relation of cross-sectional of tooth (S t ) and tooth width (b t ) are [19,20]: In this equation, t u is the slot pitch. Considering Z Q as the conductors numbers in a slot and N ph as the number of coil turns in per phase, slot area (S u ) would be as Eq. (7) [16,19]: The slot space filling factor (k fill ) depends on the type of material, winding type and voltage level. The typical value of k fill is between 0.5 to 0.6. In Eq. (7), the cross-sectional area of each conductor (S c ) will be as the following: (10) J s and I s demonstrate the current density in a conductor and the phase current of the stator, respectively. Now the slot area (S u ) is obtained through geometric relations: By solving Eqs. (11), (12), and (13), we can obtain two unknown parameters b s2 and h tr . The slot opening (b 1 ) has also been considered as much as four times of the radius of a conductor and the height h 1 and h 2 both have been considered 1 mm. As a result, the slot height (h z ) is estimated as Eq. (14): (14) Tooth height is also equal to the slot height. Also, the height of stator yoke (h ys ) and the outer diameter of the stator (D stot ) will be obtained as follows:

Permanent Magnets (PMs)
After selecting the PMs material, the installation location of the PMs on the rotor should be first determined. In this design, the structure of a surface-mounted PM rotor was selected. Typically, the width of the magnet (b PM ) is about 0.8 to 0.85 times of the pole pitch and the magnet length (L PM ) would be equal to the effective length of the generator [21]. The magnet thickness should be small enough to use fewer PMs since these materials are very costly. On the other hand, the magnets should be thick enough to generate the required air gap magnetic flux density [19]. By calculating the Carter coefficient (k c ) with respect to the slot form, the equation of the PMs thickness (h PM ) would be as follows [17,22]:

Losses
Losses in generators consist of copper loss (P Cu ), stray loss (P str ), ventilation loss (P ρ ), and iron loss (P Fe ). Iron loss consists of hysteresis losses (P hy ) and eddy current losses (P ey ) in the stator yoke and tooth. These losses are proportional to frequency and magnetic flux density [23,24]. Iron loss in the stator yoke (P y ) could be quantified by Eq. (21): In the above equation, f is the frequency, B y is the magnetic flux density in the stator yoke and k hy and k ey are hysteresis and eddy current empirical loss factors related to the type and thickness of the sheet used, respectively. Also ρ h and ρ e represent the specific hysteresis losses (watt/kg) and specific eddy current losses (watt/kg), and ρ Fe is the special weight of the sheets. Vol ys refers to volume, and m ys refers to the mass of the stator yoke iron. Iron loss in the teeth will also be calculated in the same way, except that the volume of the teeth (Vol t ) will be as below: Rotor eddy current loss in the PMSG is typically negligible because the high-order harmonics in the stator current and the space harmonics in the stator winding distribution are generally small [23,25]. The copper loss (P Cu ) and ventilation loss (P ρ ) could also be found from the following relations [11,16,17,19,23]: D r is the diameter of rotor core and k rb is an empirical coefficient which is determined by considering the type of the cooling system as well as the size of the generator [16]. The stray loss is usually considered to be a small percentage of the output power [19]:

Efficiency and Total Volume of Generator
At the end of design process, the efficiency and total volume of the designed generator would be calculated:

OPTIMIZATION
Optimization of the PMSG applied in this paper is a multi-objective optimization problem with several variables and constraints. Therefore, in the first step, optimization variables of the generator should be defined. In the second step, the objective functions and restrictions are formulated. The objective functions consist of efficiency, total volume, and a combination of efficiency and total volume. In the third step, an optimization algorithm (Ant colony optimization algorithm) will be used to find the optimal value of the geometrical dimensions and other quantities of the generator in order to achieve the desired purposes.

Optimization Purposes
As it has been thoroughly described in the introduction, due to the hydrodynamic screw system conditions, optimization of total volume and efficiency of the generator were the focus of this paper. In other words, one optimization purpose was to meet the maximum value of the objective function (F 1 ) related to the efficiency (η). The efficiency is obtained via Eq. (29). The Ant colony optimization (ACO) algorithm will find the minimum of the objective functions. Hence, in order to meet the maximum value of efficiency, the function (1/F 1 ) should be optimized. Another optimization purpose in this paper was finding the minimum value of the objective function (F 2 ) related to the total volume of the generator (V total ). The total volume of the generator was obtained via Eq. (30). The final optimization purpose was to find the optimal value of the objective function (F 3 ). This objective function is related to simultaneous optimization of efficiency and total volume of the generator.
Where α 1 and α 2 are coefficients. They were set in a way that through the optimization, the maximum and minimum value of efficiency and total volume reach were found. Change ranges of six variable input parameters are mentioned in Table 1.

Ant Colony Optimization (ACO)
The main problem of typical evolutional algorithms in problem solving of dynamic optimization is early convergence and reduction of population diversity with time. An Ant colony optimization (ACO) algorithm was inspired by the natural behaviour of ants that live together in large colonies. It is one of the most efficient algorithms in solving combinational optimization problems [26,27]. This algorithm used search space dividing (applying cell automata) for diversity protection and use previous search results. (Cell automata were actually discrete dynamic systems whose behaviour was completely based on local relations). The search in each cell and its neighbours is done in parallel, separately and continuously by ACO. For evaluating the proposed algorithm, a moving peaks criterion function is used. After primary quantification which contains ant distribution in cell automata, the algorithm repeats cell automata in a ring of updated rules. In this algorithm, cell automata divide the search space into some partition; each of them is a cell in cell automata. The cell automata divide the ant colonies into a number of smaller colonies implicitly so that each colony resides in a cell. Any colony that is the resident of a cell is responsible for the optimal finding in that cell and its neighbour cells. Each cell in the cell automata contains cell memory information, active ants in a cell, and pheromones information that is set by the ants in each cell. To use previous search results, a memory is considered for each cell. In this memory, location and competency of the best existence in that cell were preserved from the time of the last changes [26,27]. This memory for the i th cell is called C iBest . In terms of location, ants are added to their corresponding cells and have u y f r hi g i h i ighb ur I iv ' k r i the search process and only remain in cell mode. At first all the ants are active. Pheromones parameter is defined for each cell. This value is updated by the ants' movements and cell ants use it in problem solving the production process. The pheromones value could be the average or variance of the normal distribution, or both. At the beginning, the pheromones of all cells are equal to a primary value [26,27]. Figure 6 shows the ACO algorithm flowchart. In the first step, the initial values of various parameters and functions are determined. In the second step, based on the initial parameters and functions, each ant is randomly located in a departure city. It should be noted that the ants cannot return to the city that they passed once before. In the third and fourth steps, in order to choose the next new city for the ants to pass through, functions values should be calculated and the next city should be selected based on those values. Then the new city will be added to the list of cities where the ants can no longer pass, and as a result the cities populations will be adjusted. In the fifth step, the above described process is repeated until all the cities will be visited by the ants. In the next step, the ants return to their initial cities. In the seventh step, using the tour cost calculation for each ant, track level is updated. In the final step, it will be evaluated whether the criteria have been fulfilled satisfactorily or not. In the case of satisfactory fulfilment of the criteria, the process stops and the best tour will be displayed. Set values of the parameters of this optimization method for achieving the desired purposes in this paper are given in Table 2. In this table, n is the number of variable input parameters of design, n P stands for number of ants population, z is standard deviation factor, q is resonance factor, n i stands for number of algorithm replications and n e is number of elite ants [26].

Optimization Results
The results of optimization of PMSG design parameters have been provided by ACO using Matlab software. These results are shown in Table 3. Variation curves of objective functions (1/F 1 ), F 2 and F 3 are provided in Figs. 7, 8 and 9.

RESULT VALIDATION THROUGH FINITE ELEMENT ANALYSIS (FEA) OF OPTIMAL DESIGNED GENERATOR
It is essential that the results of optimization of PMSG design parameters through the ACO would be validated. For validation method, finite element analysis method (FEM) was used. The Maxwell software was also used for the FEM modelling and calculation. The results calculated by FEM are compared to the results of optimization of PMSG design parameters by ACO.

The Steps of FEM
Finite element analysis method in this paper was applied in six steps: 1. Applying a new project in Maxwell software using optimized design dimensions of PMSG calculated by ACO; 2. Assigning materials and boundaries; 3. Performing a mesh operation; 4. Setting up an analysis to solve; 5. Extracting output data and plots; 6. Comparing and analyzing the results obtained from FEM with the results of optimization of PMSG design parameters by ACO. Figure 10 shows the simulated generator that is provided by Maxwell software. After determining the material type of different parts of PMSG as well as defining the boundary of the designed generator in the second stage, in the third stage mesh was applied for all different parts of simulated generator. The mesh of simulated generator is shown in Fig.  11.  After determining a solution for analysis and also running the simulated generator in the fourth step, the output results from simulated PMSG was extracted. Figure 12 shows the magnetic flux density variations in one quarter cross section of PMSG. Also in Figs. 13, 14 and 15, the curves of variations of magnetic flux density in the stator yoke, rotor yoke and tooth were presented. As these figures show, the maximum magnetic flux density in the stator yoke, rotor yoke and the tooth are equal to 1.2955 T, 1.1837 T and 1.6 T respectively. These results did not exceed from desired maximum amount for the magnetic flux density of the stator and rotor yoke (1.3 T) and the magnetic flux density of the tooth (1.6 T). Hence, the performed optimized design of PMSG has been verified exactly and correctly.    The curve of the magnetic flux density variations in the air gap is shown in Fig. 16. As this figure shows, the average value of the magnetic flux density in the air gap is 0.67 T. This value approximately corresponds to the desired value for the magnetic flux density of the air gap (0.708 T). The output voltage curve of simulated PMSG in full load: a) three phase, b) single phase, and FFT analysis of it are presented in the Figs. 17 and 18, respectively. As these figures and FFT analysis show the root mean square (RMS) value of output voltage is equal to 378.9 V. This value is in accordance (by minimal error of 0.29%) with the RMS value of rated voltage of the generator (380 V) that was considered at the beginning of the design process. Also from FFT analysis of output voltage it can be seen that the total harmonic distortion (THD) of the output voltage is 1.71%. This value is approximately proper. These results show the accuracy of the performed design of PMSG in this paper.  Considering the results of the simulation of the PMSG in Maxwell software using the optimal values of the design that were obtained from the previous step and in order to validate the correctness of the performed design, two main achievements were obtained. First, the accuracy of the values of the magnetic flux density in the yoke of the stator, the rotor yoke, teeth, and air gap were evaluated by comparing their obtained values from the simulation results with the intended limit for them at the beginning of the design process. This means that, as shown in Figs. 13, 14, 15 and 16, since the maximum values of the magnetic flux density in the stator yoke, the yoke of the rotor, and teeth in the simulated generator have not exceeded their intended limits and since the average value of the magnetic flux density in the air gap is almost equal to its considered value at the beginning of the design, the first achievement of validating the correctness and accuracy of the performed design was obtained.

The Results Obtained from FEM
Second, the RMS value of the output voltage waveform of the simulated generator has gone under verification by comparing its value with its intended value. As shown in Figs. 17 and 18, the RMS value of the output voltage with a minimal error of 0.29% was in very good accordance with its intended value at the beginning of the design process. Also, for wider review, the output voltage waveform of the simulated generator for different loads was shown in Fig. 19 and the waveforms proved to be near identical. On the other hand, according to Fig. 18, the THD value of the output voltage of the simulated generator obtained 1.71%, which is a very desirable value. Therefore, the correctness of the RMS and THD value of the output voltage waveform of the simulated PMSG was done as the second achievement for confirming the correctness of the performed design.

VALIDATION THROUGH COMPARING THE RESULTS TO SIMILAR EXPERIMENTAL RESEARCHES RESULTS
After the accuracy of the optimal design was examined through finite element analysis in the previous section, it was time to verify and clarify the performed optimal design results by comparing them with experimental results of similar papers. It should be noted that the step by step design of the PMSG in order to be used in a hydrodynamic renewable energy system and its optimization with the purposes of improving the efficiency and reducing the volume of the generator has not been seen in any paper. Although some papers have already been published with some parts of the research of this paper, this paper has some advantages in the improvement of different parameters comparing to similar papers. In Table 4, the performed optimal design results have been compared with experimental results of similar papers.

CONCLUSION
Due to the rapid increase in energy consumption concurrent with the need to reduce greenhouse gases and environmental pollution in recent years, electrical energy generation using hydrodynamic screw in water flow path such as rivers and fountains could have a significant contribution in increasing distributed productions. Because of unique characteristics such as high efficiency, power density and low volume, PMSG is one of the best choices for use in this application. In this paper, the step by step design process of the PMSG, and the higher performance of this generator destined for use in a hydrodynamic screw system, has been studied. In other words, the attempt was made to minimize the loss and volume and to maximize the efficiency using the analytical-computational design method then optimization through an ants' algorithm. In order to validate the optimized design, the optimal designed generator was simulated in Maxwell software and design validity was examined through FEM. The maximum magnetic flux density in the stator yoke, rotor yoke, and the teeth has not exceeded the desired maximum amount. Moreover, the average value of the magnetic flux density in the air gap has complied with the intended value, approximately. From the results of the simulated PMSG, the RMS value of output voltage is equal to 378.9 V. This value is in very good accordance (by minimal error of 0.29%) with its desired value (380 V). Also, from FFT analysis of output voltage, it can be seen that the THD of the output voltage is 1.71%. This value of THD is quite good. These results show the accuracy of the performed optimal design of PMSG in this paper. The final results have been compared to similar experimental research results that showed that this paper' results have some advantages in the improvement of different parameters including efficiency (by increasing of 4.57%) in comparison with similar papers. More efficiency and less volume of the PMSG compared to other types of generators is also fully approved for the intended use.