**3. Methodology**

In recent years, WE has made a substantial contribution to the production of clean and green energy. It is vital to be able to examine and estimate WE potential by fitting an appropriate statistical distribution to the WS data. Hourly WS data for Gda ´nsk over the last seven years were gathered from a third-party provider for this purpose as part of the study's scope. Then, using MLE, TPWD was fitted to the WS data. EGO, GA, SA, and DE were utilized to find the optimum TPWD parameters that maximize the likelihood function. Performance metrics were calculated to compare the performance of EGO with

other methods. Following this, potential WE for Gda ´nsk, the capital of the Pomerania Voivodeship in Poland, was evaluated using TPWD parameters.

### *3.1. Parameter Estimation for Distribution of WS*

Because of the intermittent nature of WS, it is necessary to understand and analyze the statistical properties of WS that have a substantial impact on WE and the design of power generators [56]. Probability distribution functions (PDF) are a way to describe how the random variables are likely to behave. The PDF can help to describe the change in WS over time. For the purpose of depicting WS patterns, several probability distributions such as Weibull, lognormal, gamma, Rayleigh, and mixed distributions are utilized, among others [52,59,60]. TPWD is widely used in the literature. The Weibull is flexible and is proven to fit WS data very well [52,61]. The parameters of the TPWD are shape and scale. An accurate assessment of the Weibull parameters is required to anticipate WE potential and understand WS characteristics. In order to determine the optimal parameters of the Weibull distribution (WD), researchers have developed a number of different ways over the years. The graphical method (GM), the moments method (MOM), the least-squares estimation (LSE), and (MLE) are the most frequently used methodologies [62,63].

Justus et al., proposed an approach [64] that employs mean and standard deviation of WS for estimating parameters of WS PDF. Stevens and Smulders used MLE to find parameters of WS PDF [63]. Jowder compared the empirical techniques to the graphical approaches and found that empirical techniques produce more accurate results [65]. For the parameter estimation, Akdag and Dinler proposed the power density factor and energy pattern factor [62]. The novel method was used for several locations in Turkey and the findings were compared with those produced using the GM and MLE methods. George compared five alternative approaches for calculating shape and scale parameters of the TPWD [66]. The maximum likelihood method outperformed among others. Chang examined six approaches for estimating the parameters of the WD: GM, MOM, empirical method (EM), MLE, modified MLE, and energy pattern factor/power density method (EPFPDM) [67].

Researchers also used the equivalent energy method to estimate parameters of the WD [68,69]. The performance of parameter estimation of the WD is also influenced by the sample size [70]. To predict Weibull parameters, probability-weighted moments based on the power density method (PWMBP) was used and PWMBP outperformed among other methods [71].

Aside from numerical approaches, a metaheuristic optimization algorithm can be used to estimate parameters. The parameters can be determined using various optimization algorithms. Chang used particle swarm optimization (PSO) to estimate parameters of the WD. PSO was used to estimate parameters using WS data collected from several climatic zones in Taiwan [68].

Wu et al. [72] proposed logistic distributions for assessing the WE potential in Inner Mongolia using maximum likelihood estimation. Using multi-objective moments, Usta et al., developed a novel approach for estimating the parameters of the WD [73]. Tosunoglu [74] focused on fitting several distributions to WS data for Turkey. MOM, MLE, and probability-weighted moments (PWMs) methods were applied. Chaurasiya et al. [75] applied nine numerical approaches for estimating the shape and scale parameters of the WD for calculating wind power in southern India. The results showed that shape and scale parameters have a significant impact on wind power calculations [76]. The least-squares method was applied to find the parameter of the WD [77,78]. For estimating the single and combined parameters of probability distributions, Alrashidi et al. [77] introduced a new metaheuristic optimization algorithm. Gungor et al. [79] explored the suitability of four different numerical approaches for estimating the WD parameters for WS data. Kumar et al. [80] concentrated on MLE using the differential evolution technique.

According to the reviewed literature, the TPWD is the most general distribution for representing WS distribution and assessing WE potential. To estimate the parameter, the researchers used a number of strategies to optimize the distribution's log-likelihood function. It is also noticed in the literature that researchers mostly use RMSE and R<sup>2</sup> for comparing performance of different optimization algorithms while estimating statistical distribution of WS. This study is primarily concerned with MLE and EGO.

### *3.2. Estimating Parameters of WD Using MLE*

Modern estimation theory has application in a wide variety of fields, spanning from statistics to economics, engineering design, and many more. For a vast majority of applications, the estimation of an unknown parameter is required based on a collection of observations. Different parameter estimation methods can be found in the literature, the most common ones are GM, MLE, and MOM. Because of its theoretical capabilities, the MLE is often preferred over other methods.

The likelihood function is maximized by a set of parameters, which are MLE estimations. When fitting a distribution to the WS data, the TPWD is commonly used. The distribution function can be written as shown in Equation (11) [80].

$$f(\mathbf{x}) = \left(\frac{k}{\mathcal{c}}\right) \left(\frac{\mathbf{x}}{\mathcal{c}}\right)^{k-1} e^{-\left(\frac{\mathbf{x}}{\mathcal{c}}\right)^k}, \mathbf{x} \ge 0, \; \mathbf{c} > 0, \; k > 0 \tag{1}$$

The WD likelihood function is as shown in Equation (1).

$$L = \prod\_{i=1}^{N} \left(\frac{k}{\mathcal{L}}\right) \left(\frac{\mathbf{x}}{\mathcal{L}}\right)^{k-1} e^{-\left(\frac{\mathbf{x}}{\mathcal{L}}\right)^{k}} \tag{2}$$

and its log-likelihood function will be:

$$\log(L) = Nlnk - Ncln\\ \text{c.} - \sum\_{i=1}^{N} \left(\frac{\mathbf{x}\_{i}}{\mathcal{L}}\right)^{k} + (k-1)\sum\_{i=1}^{N}ln\mathbf{x}\_{i} \tag{3}$$

The EGO is used and compared with other techniques such as GA, SA, and DE for optimizing the log-likelihood function of the WD in this study. Detailed results are presented in the following section.
