1. Introduction
Electrical machines are electromechanical devices that can convert electrical energy into mechanical energy and vice versa [
1]. According to the type of input, EMs can be classified into single-phase and three-phase machines [
2], where the most common types of three-phase electric machines are synchronous (SM) and asynchronous machines (AM). Electrical machines (EM) are built from a stator, which is the static part of the EM consisting of phase-shifted coiled poles, and a rotor, which is the rotary part constructed depending on the tasks for which the machine is intended. AMs are most often used as motor-driven machines [
3,
4,
5] in the automotive industry [
6,
7], construction [
8], elevators [
9], etc., while SMs are most often used to produce electricity in fossil fuel power plants [
10,
11,
12] or in renewable energy plants, such as hydroelectric power [
13,
14] and wind power plants [
15,
16]. For energy to be transmitted from the producer to the final consumer, it must be of an alternating current (AC) [
17]. The reasons for choosing AC over direct current (DC) are as follows [
17,
18]:
Easy maintenance and change of AC voltage for transmission and distribution;
AC transmission plant costs (switches, transformers, etc.) are much lower than equivalent DC transmission;
The power plant produces AC power, so it is better to use AC than DC instead of converting;
In the case of major faults in the network, it is easier to disconnect an AC system because the sinusoidal current tends to zero at a certain moment.
An SM has two characteristic parts, the armature on the stator and the excitation on the rotor where the armature winding (most often three-phase) is symmetrically distributed in slots around the circumference of the machine and indicates the part of the machine in which the changes of the magnetic flux induce a voltage [
19]. DC flows through the exciting winding element, which is located on the rotor of the machine and creates the exciting flow, i.e., magnetic flux. Without the excitation current on the rotor, it would not be possible to produce the induced voltage on the armature windings of the synchronous generator, which means that there would be no electricity [
19]. This type of excitation is used with synchronous generators that either have electromagnets on the rotor of the machine connected to a slip ring [
20] or a rotor made with permanent magnets [
21]. Estimation of the excitation current on the rotor is one of the key factors for the control of the SM. The excitation current maintains the efficient production of the induced voltage and is one of the most important factors while regulating the plant’s power factor (maintaining the capacitive or inductive character of the power grid network) [
22].
AC electrical machine loads draw reactive power from the electrical power grid. Reactive power is a disadvantage, i.e., a problem, because it causes overloading in the power grid, switches, transformers, and relays and, unfortunately, reactive power cannot be converted into useful, i.e., mechanical energy. To normalize the amount of reactive power in the power grid, SMs are used as reactive power compensators [
23]. To achieve high-quality regulation and compensate for reactive power, it is necessary to regulate an SM’s power factor parameter; this can be accomplished with proper regulation of the excitation current. The value of the excitation current dictates the operation mode of the synchronous motor (capacitive or inductive character) and affects the stability of the system [
24].
The main problem is that most EM manufacturers do not provide enough information about their machines, which reduces the possibility of achieving highly efficient control. In general, manufacturers provide information on rated output power, rated maximum speed, rated input voltage, rated current, protection level, dimensions, and weight. However, a minority of manufacturers provide more valuable information, such as the speed-torque curve (most often at the request of the customer). Often, the nominal parameters of a synchronous motor are available and sufficient for designing the regulation, but the problem is the nonlinearity of the parameters, which is noticeable in an unadjusted operating environment (for example, high or low ambient temperature) or is not adapted for unique operating conditions (for example, speed or load torque) [
25,
26].
Apart from the nonlinearity, external and internal conditions affect an EM. The main problem is that there is no clear relationship between the parameters of the synchronous motor [
27,
28,
29,
30]. The parameters of an SM are mostly complex and nonlinear; thus, modeling SM parameters, such as excitation current, power factor, and load current, when the synchronous motor is running in a lagging, leading, or unity condition for reactive power compensation is a difficult task [
24,
27]. With the aim of improving the quality of SM modeling and a more precise estimation of parameters, many researchers use artificial intelligence (AI) estimation methods. The estimation of model parameters using techniques for linear systems has been perfected. However, an increasing number of systems require nonlinearities when increasing the dynamic range of high-performance equipment. Nonlinearities are usually ignored, but only under the assumption that linear system theories are sufficient for the retrieval of less accurate approximate solutions. For industrial applications, these solutions are most often within acceptable limits, but for applications in high-efficiency machines, linear systems are inadequate. There is therefore a need for further development of nonlinear systems, such as the synchronous motor. After defining the obstacles that are typical for highly coupled nonlinear system, such as synchronous motors, the authors of [
27] used particle swarm optimization (PSO) to obtain a high-quality model with a low error rate that is robust and generally applicable to similar nonlinear systems. Various optimization algorithms, such as the evolutionary algorithm, ANN, artificial bee colony (ABC), immune method (IM), whale optimization method (WOM), particle swarm optimization (PSO) method, flower pollination (FP) method, cuttlefish optimization algorithm, and genetic algorithm (GA), were used to optimize a permanent magnet SM (PMSM), and they are analyzed in detail in the state-of-the-art study in [
25,
31]. The parameters of the PMSM tend to change; in other words, there is an influence due to the nonlinearity of the parameters. This can occur due to the change in temperature or aging of SM, and for this reason, online techniques are used to identify more up-to-date and precise parameters [
32].
In addition to potential optimization, AI is used to obtain improved waveforms at the output and reduce oscillations (such as output speed, torque, and current variations for three phases). For example, in [
33], the authors used a fuzzy logic controller in combination with AI with certain conditions (in this case with 25 conditions and 49 conditions), which resulted in a much smoother rotation of the engine and thus less oscillation, which greatly contributed to the improvement of the system.
Using AI more precisely, fuzzy logic in combination with ANN represents an advanced method that is applied for AM control logic. AM is a nonlinear machine, where the influence of temperature, age, and additional vibration elements related to electromagnetism affect the operation of the machine. So, with this idea, the authors in [
34], after mathematically modeling AM, defined a control strategy based on rotor flux, which ensures the robustness of the algorithm.
Regarding synchronous motors with electromagnets, the authors of [
35] indicate the complexity and nonlinearity of the SM parameters. By applying the symbiotic organisms search (SOS) algorithm, gravitational search algorithm (GSA), ABC, and GA, the authors investigate the possibility of obtaining a high-quality algorithm with a small error of approximation, whereby the best results are achieved by SOS with a maximum error of 0.1703 A.
In the last decade, the implementation of AI algorithms has become an increasingly common strategy to solve parameter prediction, optimization, or control methods for electrical machines. Various studies are being carried out related to the optimization of excitation current losses. In the research of Kahraman et al. [
24], the authors looked for an efficient solution to overcome the challenges in excitation current estimation. Implementing the k-nearest neighbor (kNN) algorithm led to optimal results of the excitation current, with an estimation error rate of 4.5% and standard deviation (
) of 1.5%. Inter-turn faults in field winding can also affect the operation of the synchronous generator, which in this case is a turbogenerator. According to Guillen et al. [
36], the authors used AI to obtain a model based on machine learning (ML) regression algorithms, where the excitation current was estimated using AI, and the algorithm estimated the field current, which was compared with the actual measured current in several lifetime fluctuations. From three different models (Potier, ASA, and SVR), SVR performed the best with mean average error (MAE) and root mean square error (RMSE) metrics of 0.448 and 0.009, respectively. With the use of artificial neural networks (ANN), it is possible to achieve a model for estimating the parameters of an SM; in [
37], the authors use an adaptive artificial neural network (AANN). The purpose of this research was to estimate the excitation current and help designers with the modulation of the excitation current while developing sophisticated software with a low degree of programming and improving the efficiency of the classic ANN-based approach. The results were evaluated with an average error percentage,
, and the arithmetic average of all error rates of 3.507958, 2.305857851, and 2.305858, respectively. Temperature monitoring of permanent magnets in SM, which is applied to the automotive industry, is a complex challenge. The heating of the machine can cause deterioration and impact the performance of SM itself. Monitoring and reacting to high-temperature variation values inside of an SM is a challenging task. Kirchgässner et al. [
38] trained several ML models that are empirically evaluated based on their accuracy for the given task of predicting. The ML algorithms used for predicting high-dynamic latent magnet temperature profiles were as follows: linear ordinary least square regression, support vector regression, kNN, and neural networks. The best result on the test set for predicting the permanent magnet temperature was achieved with the convolutional neural network (CNN) with an R
of 0.99, MAE of 0.85 and MSE of 1.52; kNN and multi-layer perceptron (MLP) achieved R
= 0.98, MAE = 1.32 and MSE = 3.20. Further proof that AI and ML can be applied in the modeling and simulation of complex phenomena is provided by surrogate models [
39]. The authors presented a workflow for developing data-driven surrogate models including data generation with a physics-based simulation, designed experiments with the training data, and trained and tested the surrogates to compare ANN and the gradient boosting decision tree (GBDT) algorithm for estimation the torque behavior in SM with permanent magnets. The accuracy of the proposed model with the ANN algorithm was better, compared to the competitor GBDT, and was quite close to the finite element simulation in which the best result for negative root mean square (NMRSE) obtained with the non-hybrid model was 3.8%, while for the hybrid model it was 1.76%. Mukherjee et al. [
40] estimated the speed and torque of a PMSM using tree-based algorithms. Several tree-based algorithms were used where the fine tree algorithm achieved a much lower error rate compared to the other tested algorithms, namely medium tree and coarse tree. The RMSE for the fine tree algorithm was 0.029224 and 0.052538 for the prediction of speed and torque, respectively. Traue et al. [
41] developed a reinforcement learning environment toolbox for intelligent electric motor control using the open-source Python package. The obtained model showed better results in control tasks compared to conventional methods. Li et al. [
42] conducted a detailed analysis for the optimization of electromagnetic devices. By using various algorithms such as support vector machines, MLP, k-NN, and CNNs, the authors proved that ML algorithms have greater robustness, high speed, and accuracy by applying a fitting algorithm in different scenarios. Bayindir et al. [
43] showed the importance of the excitation current in synchronous motors in the case of reactive power compensation. By using the k-NN classifier and load current, power factor, power factor error, and change of excitation current as input values, the following results are obtained for MAE, mean absolute percentage error (MAPE), and NRMSE: 0.059, 13.146, and 8.167, respectively. The given metrics are referred to as three tuple input values, which were as follows: load current, power factor, and change of excitation current, which showed the importance of certain parameters when modeling the AI algorithm and the viability of using AI for optimizing and predicting the parameters in EM.
Considering the high accuracy rate of AI algorithms in prediction and regression, the following hypothesis questions are raised regarding SM:
Is it possible to estimate the excitation current of SM using AI algorithms with a high precision rate and a small evaluation error?
Is it possible to optimize the model and confirm the obtained results with 5 k-fold cross-validation using the randomized hyperparameter search?
Which algorithm provides the best results with the possibility of implementation in a real-life situation?
This research was conducted to obtain an optimal AI algorithm that, with its properties and characteristics, can estimate the excitation current of the SM (in this case, synchronous motor drive), which contains nonlinear characteristics and phenomena. The best AI algorithm is determined to predict the future values of the excitation current with a high accuracy, small standard deviation error (), and almost non-existent regression metrics error. By comparing the best algorithm with the related work, i.e., comparing the extreme gradient boosting regressor with small hyperparameter variations and robustness, a solution for the given problem can be obtained. In this way, precautions can be taken for plants with these machines and additional challenges can be prevented in time. The structure of this paper, along with the introduction, is divided into the following four sections: Materials and Methods, Results and Discussion, and Conclusions. The Materials and Methods section describes the entire dataset, including the input values along with targeted value, an analysis of the dataset distribution using histogram bar plots is provided, and the SM used in the creation of the dataset is described. The analysis of the dataset used for training ML algorithms is shown, and the algorithms used for the prediction of the excitation current are stated alongside the hyperparameters used in randomized hyperparameter search. All models were validated with 5 k-fold cross-validation. The Results and Discussion section shows the results obtained from the selected/used AI algorithm, the parameters used for research, and the training of the best obtained AI model. The achieved results were described and we elaborate on which algorithm provided the best results, and which one was the worst according to the obtained metrics. In the Conclusion, the final results of this research are outlined, including which algorithm had the best regression performance for the given challenge, and the initial hypotheses questions are answered.
3. Results and Discussion
In the results section, the results of this research are presented. The following evaluation metrics are presented for each algorithm: The coefficient of determination (), MSE, and MAPE. When defining the results, the best-performing algorithms were selected, which were additionally evaluated using the for all three individual metrics.
Table 13 shows the results of the AI algorithm used in this research with default hyperparameters for each algorithm. The goal of the initial research was to determine algorithms suitable for estimating the excitation current of SM. This part of the research indicates the oscillations of the results for each algorithm, which can be seen from
Table 13. Several acceptable algorithms satisfy the given tasks including the tree-based algorithms, which had the best results in the initial research. Regarding
, the best result is achieved with XGBoost, of 0.9943, followed by 0.99 with RFR. Furthermore, results above 0.9 are given by RFR, ETR, and RR, as shown in
Figure 10.
Regarding other evaluation metrics, XGBoost again has the best result; in this case, the smallest MSE and MAPE are 0.0001 and 0.0074, respectively. The second-best algorithm with the best performance is RF with 0.003 and 0.0121 MSE and MAPE. The third best algorithm is ETR with 0.006 and 0.016. Other algorithms also have a low error rate in both metrics, although with at least one potential higher than the mentioned algorithms, as shown in
Figure 11.
The most frequent problem faced while training ML algorithms is overfitting of the training data. Overfitting can be avoided by using the cross-validation method, as is shown in the second part of this investigation. Parameters presented in individual tables in the subsections from
Section 2.5.1,
Section 2.5.2,
Section 2.5.3,
Section 2.5.4,
Section 2.5.5,
Section 2.5.6,
Section 2.5.7,
Section 2.5.8,
Section 2.5.9 and
Section 2.5.10 were used, and the optimization was achieved using a randomized hyperparameter search method with 5 k-fold cross-validation for each algorithm. The results of optimized and cross-validated algorithms can be seen in
Table 14.
Table 14 shows optimized and cross-validated results for each algorithm. Several similarities and differences are visible and will be explained in the following part of this research. In this part of the research, Tree-based algorithms still dominate in all evaluation values. XGboost still has the most ideal
metrics of 0.9963,
of 0.0001, and
of 0.0057. Furthermore, ETR, RFR, and MLP have
values above 0.9 and the smallest evaluation errors of
and
. Other algorithms have minimal improvement or have a deterioration of metrics, and the SGD demonstrated the largest increase in
, with an increase 0.96 compared to the default hyperparameters, while LR had the smallest shift in results. The largest decreases in
and
errors for the MLP algorithm were stark, while k-NN’s performance was worst. Furthermore, as mentioned in the previous section based on the given results from
Table 13 and
Table 14, three AI algorithms were selected for the final estimation of the excitation current in SM, namely: ETR, RFR, and XGBoost. The obtained ratios of
for
,
and
are shown in the figures below.
Figure 12 shows the
and
for ETR, RFR, and XGBoost algorithms. As shown in
Table 14, XGboost has the highest
, followed by ETR and finally RFR; however, in this case, the main focus is on the
of all three algorithms, so the best result is achieved by XGBoost, which has the smallest
value out of all three algorithms of 0.0011, which is up to eight times lower than for ETR and RFR.
Figure 13 represents
and
for the ETR, RFR, and XGboost algorithms. It can be seen from the figure that the XGBoost again has the smallest
of 0.0001, while the largest in this part of the research is ETR, valued at 0.000035. The
for XGBoost again achieves the best results, with a
result of 0.0000033, while the ETR again had the worst performance.
In the last part of the performance evaluation of the selected algorithms, the value of MAPE and
of individual algorithms is shown in
Figure 14. The value of the
result favors (as in the previous two cases) of the XGBoost algorithm with a value of 0.0057, while the worst performance was achieved by RFR with a value of 0.0223.
for
, in this case, was 0.0003, while for RFR it was 0.0012 and for ETR it was 0.001869.