Material Property Characterization and Parameter Estimation of Thermoelectric Generator by Using a Master–Slave Strategy Based on Metaheuristics Techniques

: Thermoelectric generators (TEGs) have gained signiﬁcant interest as a sustainable energy source, due to their ability to convert thermal energy into electrical energy through the Seebeck effect. However, the power output of TEGs is highly dependent on the thermoelectric material properties and operational conditions. Accurate modeling and parameter estimation are essential for optimizing and designing TEGs, as well as for integrating them into smart grids to meet ﬂuctuating energy demands. This work examines the challenges of accurate modeling and parameter estimation of TEGs and explores various optimization metaheuristics techniques to ﬁnd TEGs parameters in real applications from experimental conditions. The paper stresses the importance of determining the properties of TEGs with precision and using parameter estimation as a technique for determining the optimal values for parameters in a TEG mathematical model that represent the actual behavior of a thermoelectric module. This methodological approach can improve TEG performance and aid in efﬁcient energy supply and demand management, thus reducing the reliance on traditional fossil fuel-based power generation.


Introduction
Thermoelectric generators (TEGs) have emerged as a promising technology for sustainable energy generation in recent years [1]. These devices employ the Seebeck effect to convert thermal energy into electrical energy, which occurs through the generation of a voltage difference in response to a temperature gradient applied across a material [2]. The power output of TEGs is heavily dependent on the thermoelectric material properties and the operational conditions [3]. As such, the accurate modeling and parameter estimation of TEGs is essential for optimizing and designing these devices [4]. These processes allow for the integration of these systems into smart grids, as well as the broader adoption of renewable energy sources [5]. Smart grids rely on integrating multiple energy sources, including renewable sources, such as TEGs, on meeting the fluctuating energy demands of consumers. The accurate modeling of TEGs is crucial for predicting their behavior and power output under different operating conditions, which is needed for optimal integration into smart grids [6]. This allows for efficient energy supply and demand management, and integrating TEGs can help reduce the reliance on traditional fossil fuel-based power generation.Thermoelectric generators (TEGs) depend on the thermoelectric material properties and temperature boundary [7]; thus, the accurate modeling of complete TEG modules poses a significant challenge. Various mathematical formulations have been developed to represent TEGs, which include important parameters such as the thermoelectric electric resistivity, Seebeck and Thomson coefficients, and thermal conductivity of the thermoelectric material [8]. However, it is important to note that the surrounding conditions and natural wear and tear of the device during operation time may alter these parameters, thereby affecting the power capacity and performance of the TEG [9]. Generally, two types of models are used to describe TEGs: simplified and complex [1]. The first ones, also known as macroscopic models, analyze the TEG phenomenon on a global level and make global thermoelectric balances that often disregard the Thomson effect. In those models, the properties of the materials are determined from the average temperatures of the cold and hot surfaces. On the other hand, complex models, also known as microscopic models, describe TEGs more precisely by using local balance equations, including the mass, energy, and entropy equations. These models consider the Thomson effect and other phenomena, such as the temperature-dependence properties of the materials, and can be studied on dynamic or steady thermal states. The prediction of the electrical power output of a single thermoelectric generator leg can be accomplished by applying complex mathematical models, which are founded on the principles of irreversibility and incorporate the temperature-dependent material properties of the thermoelectric legs. These models can provide accurate predictions of the electrical power output as a function of the temperature gradient between the hot and cold sides and the thermoelectric material properties of the TEG.
Numerous studies have been conducted to understand the factors that impact the performance of thermoelectric modules. These studies have explored various elements, such as temperature fluctuations [10], additional heat resistance inside [11,12] and outside the module, [13], variations in heat exchanger material properties [14], and changes to the module configuration and internal structure [15]. Additionally, it has been found that temporary exceedances of the maximum steady-state output power can be achieved by utilizing transient phenomena [16]. In real-world applications, temperature conditions at the boundaries of thermoelectric generator modules are not constantly changing, but rather vary slowly over time. Therefore, studying temperature conditions with known parameters becomes important for industrial applications and advancements in TEG technology. By understanding the temperature conditions, the performance of TEG modules can be modeled to estimate the power output delivered at constant temperatures, which is crucial for practical applications, such as power generation in automobiles, waste heat recovery, and renewable energy sources. Thus, the examination of modules under these conditions is noteworthy and contributes to the advancement of these technologies.
One study [17] determined that, while assuming temperature-dependent properties of the cell material may have a slight impact on the module performance, the parameters provided by manufacturers of thermoelectric modules may not be entirely accurate or reliable. This is further supported by the fact that significant parameter variations can be observed even among modules of the same series [18]. Radiative heat transfer effects in all system components are typically minimal [19]. These findings underscore the importance of determining the properties of thermoelectric modules with precision and the need for further research in this field.
Recent studies have employed optimization algorithms to find optimal thermoelectric devices, as multiple geometric parameters should be optimized simultaneously. Chen et al. [20] applied a multi-objective GA to optimize the output power and efficiency of a TE generator; Meng et al. [21] and Liu et al. [22] applied the simplified conjugate-gradient method (SCGM) to optimize single and two-stage TE generators with rectangular TE legs. Wen et al. [23] proposed a design guideline for the TEG system based on the figure of merits of high-, medium-, and low-temperature TE segments. Several recent studies have focused on applying a GA to solve multi-objective optimization problems for TE generators. Ge et al. [24] optimized the material volume and output power of a TEG segment using the non-dominated sorting genetic algorithm. Zhu et al. [25] utilized a 1-D numerical model and genetic algorithm (GA) to optimize the cross-section, length, and load resistance of a segmented thermoelectric generator and found that the conversion efficiency was improved. Additionally, Ge et al. [24] applied a GA method to optimize power and efficiency for a segment of a TE generator module. Wang et al. [26] utilized the mutation-PSO algorithm to optimize the exergy efficiency and levelized cost of electricity (LCOE) for a TEG, resulting in an optimal exergy efficiency of 29 and LCOE of 1.93 US/kWhm 2 under a maximum temperature difference of 40 K. Furthermore, Yin et al. [27] developed a multi-objective optimization process for a concentrated spectrum splitting photovoltaic-thermoelectric hybrid system, incorporating sensitivity analysis, parameter evaluation, and a genetic algorithm. However, to date, no methodology based on optimization algorithms has been developed to characterize a TEG module from experimental results under different temperature conditions, taking into account all thermoelectric effects analyzed in complex and differential models, with this being an important need currently in academic and industrial applications.
Parameter estimation is a technique for determining the set of values for the parameters in a mathematical model that accurately describes the system under investigation. The significance of this method lies in its ability to optimize the device's performance and facilitate further analysis related to power delivery and integration with smart grids [28]. In the case of TEGs, the material properties of the thermoelectric legs, the number of thermocouples, and the cross-sectional area are the parameters that represent a complete TEM. By determining the optimal values for the parameters, the TEG can be controlled to operate at its maximum capacity and produce the highest possible power output. Additionally, parameter estimation identifies the TEG's sensitivity to changes in operational conditions and material properties, which is crucial for design and engineering applications. The problem addressed in this study is characterized by non-linearity and non-convexity, primarily attributed to using variables in derivatives, exponentials, and multiplications within the mathematical formulation that describes the problem. As a result, deterministic methods, such as quadratic programming, Newton-Raphson, interior point, semidefinite programming, and convex optimization are often unsuitable, due to their reliance on complex processes and lengthy processing times. Metaheuristic methods are commonly used as solution methods for nonlinear problems involving continuous variables in energy systems [29][30][31][32]. For example, Roman et al. [33] employed a metaheuristic optimization algorithm, grey wolf optimization, to replace the least-squares algorithm typically used in virtual reference feedback tuning, with interesting results in time saved finding the optimal parameters of the controllers. These optimization methods operate with random values, objective functions, and sequential processes, which enable the resolution of complex problems in a simplified manner, while reducing mathematical complexity and processing time.
Metaheuristic techniques are popular methods for parameter estimation in models with experimental data, due to their ability to explore large parameter space and avoid local optima. However, these techniques also have limitations that should be considered. One of the main limitations is the inability to guarantee to find the global optimum solution. This is because metaheuristic algorithms are based on heuristic rules and probability, which may not always converge to the true optimal solution. Another limitation is that they can be computationally expensive, requiring many function evaluations to find a satisfactory solution. This can be particularly problematic when dealing with complex models or large datasets, which may require significant computational resources. Also, they do not directly assess the model adequacy or parameter identifiability. This means that the optimal set of parameters found may not be unique, and some parameters may be highly correlated with others, which can lead to overfitting or unreliable predictions. To address these limitations, additional statistical and sensitivity analyses may be needed to assess the quality and robustness of the estimated parameters.
Stewart et al. [34] explored the structure of data arrays, which can be rectangular with no missing values, block rectangular, or irregular with missing values that follow no simple pattern, and they have also proposed methods for modeling such specific data structures. Nonetheless, it is essential to recognize that these algorithms do not assure the discovery of a global optimum. In the domain of optimization, stochastic optimizers, such as metaheuristic methods, are commonly employed to explore optimal solutions in large and complex search spaces [35]. The inherent probabilistic nature of metaheuristic optimizers implies no guarantee of finding the absolute best solution. Moreover, for numerous intricate problems, the search space may be so vast that it is practically infeasible to explore every possible solution [36]. As a result, metaheuristics optimization algorithms are often used to find a good solution, rather than the absolute best one. It is also worth mentioning that, even if this kind of optimizer finds a good solution, there is no way to prove that it is the global optimum. Therefore, it is important to consider the limitations of these optimization algorithms and use them appropriately, considering the trade-off between solution quality and computational cost. To guarantee solutions of good quality, each time a metaheuristic method is used, it is necessary to evaluate the effectivniness of this, in terms of repeatability and quality solution, which is important in tuning the optimizer parameters to obtain the best performance for solving the problem in analysis.
By analyzing the state of-the-art, it is possible to notice the need to propose new methodologies to consider mathematical complex models for TEGs and optimization techniques for the parameter estimation of this model to contribute to the advancement of the field of TEGs and the development of more efficient, accurate, reliable, and sustainable energy systems in smart and micro grids integrations. Based on these needs, this paper proposes a new master-slave methodology based on metaheuristics optimization techniques for solving the parameter estimation problem for TEG modules from experimental data. In this methodology, the master-slave is entrusted with finding the configuration of parameters that reduces error in the best way, compared with the real data. Meanwhile, the slave stage is responsible for evaluating the error obtained by the configuration of parameters proposed by the master-slave by using a mathematical model, including the Thomson effect and temperature-dependent material properties. The root mean square error (RMSE) is a commonly used metric for evaluating the performance of regression models. This metric calculates the average difference between the predicted and actual values in the dataset and provides a measure of the overall error of a model [37]. As optimization metaheuristic techniques were used, the vortex search algorithm (VSA), continuous genetic algorithm (CGA), and crow search algorithm (CSA) were selected from the literature for the excellent results reported for solving parametrization of other distributed energy resources. For evaluating the effectiveness and robustness of the proposed solution, s each optimization algorithm was executed 1000 time to evaluate the minimum and average RMSE, the standard deviation and the processing time required by the solution methodologies used. In this study, the variable of interest to test is the power generated by the thermoelectric generator module. Specifically, we aim to investigate the behavior of the TEG under different temperature boundary conditions and its resulting effect on the power output. It is important to note that there is only one variable observed in each experiment, which is the power output of the TEG. This is known as the single response problem, where the objective is to find the optimal combination of input parameters that will maximize the fitting of the power output response in the model and the experimental data. By studying the single response problem, we can comprehensively understand the TEG's behavior under varying temperature conditions and identify the parameters that characterize the TEG. The main contributions of this paper are presented below: Academic contributions: • Proposal of a new master-slave methodology, based on metaheuristics optimization techniques for solving the parameter estimation problem for TEG modules from experimental data.
• Use of a mathematical model that includes the Thomson effect and temperaturedependent material properties to evaluate the error obtained by the configuration of parameters proposed in the master-slave techniques. • Use of optimization metaheuristic techniques VSA, CGA, and CSA for solving the parametrization of other distributed energy resources.

Industrial contributions:
• Development of more efficient, accurate, reliable, and sustainable energy model systems in smart and micro grid integrations. • Use of the proposed methodology in the field of TEGs to improve their performance from experimental and actual tests. • The execution of several optimization algorithms to evaluate the effectiveness and robustness of the proposed solution, which can be applied to real-world scenarios. • The methodology proposed in this study circumvents the need for destructive characterization of the thermoelectric generator (TEG) to obtain geometric parameters, resulting in a reduction in costs associated with the characterization process.

Solution Methodology
For solving the problem of material property characterization and parameter estimation of a thermoelectric generator, in this paper, a master-slave strategy composed by three continuous metaheristic optimization methods (VSA, CGA, and CSA) in the master stage was proposed, which was responsible for identifying the configuration of parameters that achieve the minor RMSE, characterizing, in this way, all components of the mathematical model that represent the thermoelectric generator in the analysis, as well as for estimating the power generate to different temperatures. In the slave stage, a non-linear and non-convex formulation is entrusted with evaluating the RMSE and satisfying the limitations associated with the problem's parameters. Figure 1 illustrates the master-slave methdology used.

Metaheuristic algorithm TEGs Model
Master stage

Evaluation of objective function and constraints
Slave stage The master-slave methodology proposed in this work is selected due to the excellent performance reported in the literature for this kind of solution method for solving continuous non-linear problems related to energy devices [29,30,38]. Furthermore, the implementation of the RMSE is based on the excellent performance of this kind of error [37].
To below are described each one of the stage used for solving the problem studied.

Master Stage
In this stage, VSA, CGA, and CSA were used for obtaining the configuration of parameters that presents the minor RMSE. The optimization methods CGA and CSA were selected from the literature, due to the excellent results reported, in terms of solution, repeatability, and processing times, by the authors for solving problems similar to the case here studied [24,39], while the implementation of the VSA in this paper is based on the excellent results achieved by this optimization method for solving continuous problems [40][41][42].
For generating each one of the possible solutions proposed by the optimization methods previously mentioned, in this work, the codification presented in Figure 2 was proposed. In this figure, a possible solution to the problem is presented; this solution used the codification proposed, which is composed of a vector of size 1 × 11, where the number of columns corresponding to the eleven variables was proposed to parametrize the power behavior of the thermal generator when it operates at different temperatures. The parameters in the mathematical model of a TEG module are composed of polynomial coefficients of material properties and geometrical parameters. The first nine parameters correspond to the polynomial coefficients, with k1, k2, and k3 representing the coefficients of thermal conductivity, α 0 , A1, and A2 representing the coefficients of the Seebeck coefficient, and ρ 0 , B1, and B2 related to electric resistivity. The 10th parameter is the equivalent number of legs of the TEG module, and the last parameter is the effective cross-sectional area of a single TE leg. The example proposed presents in an aleatory way values between the maximum and minimum limits established through the datasheet reported for the thermal generator described in Section 3, which are presented inside the figure aforementioned. The optimization methods used in the master stage employ this codification for generating the different individuals that compose the populations used in the iterative process.
The following section outlines the various optimization methods utilized in the master stage of the analysis. The iterative process of each method is described, and the corresponding algorithm used to solve the problem under examination is presented. To keep the paper concise, the methods are presented straightforwardly, with further explanation provided in the referenced literature. The VSA takes advantage of the behavior of the vortices generated in stirred fluids [43]. The VSA uses hyperspheres for exploring the solution space, reducing its size, and changing its location in the solution space to find the solution with the best quality possible. Algorithm 1 describes the iterative proposed of the master-slave methodology based in the VSA proposed in this work for solving the material property characterization and parameter estimation of a thermoelectric generator.
In the first iteration of the VSA, it calculates the center and radius of the hypersphere by averaging the maximum and minimum values of the variables that represent the problem. Then, with these values generated, the individuals of the population are calculated by using a Gaussian distribution around the center of the hypersphere. This method allows for exploring the best mode solution space. Subsequently, the objective function of all individuals is calculated by employing the slave stage. Then, this identifies the individual with the best solution (minor RMSE) as the incumbent of the problem.
From iteration 2 to the finish of the iterative process, it updates the center of the hypersphere with the values that compose the incumbent, i.e., the parameters that compose the best solution. After that, it calculates the new radius and generates the new population by using a Gaussian distribution based on the center and radius of the hypersphere. Then, it evaluates the objective function of each individual that compose the population. With the values of the objective function, it updates the incumbent. Finally, it is analyzed the stopping criterion, and in the particular case of this work, the maximum number of iterations. In the case that the maximum number of iteration has been met, the algorithm finishes and prints the incumbent as a solution to the problem. In another case, the VSA continues with the exploration of the solution space.
The whole description of the mathematical formulation that describes the VSA is made in [44]. For tuning the VSA, following the suggestion made in [38], in this work, it used a particle swarm optimization algorithm (PSO) to find the optimization parameters that allow us obtain the best performance for the VSA. In this way, the VSA obtained a number of 50 individuals and a maximum of 100 iterations. The aforementioned PSO was used in this work for tuning the optimization parameters of all optimization methods used: VSA, CGA and CSA. Update the center of the hipersphere by using the incumbent; 10 Calculate the new radius of the hipersphere;

11
Generate the population by using a Gaussian distribution around the center of the hypersphere;

12
Evaluate the objective function by using the slave stage for each individual of the population; 13 Update the incumbent; 14 if stopping criterion have been met? then 15 Stop the iterative process and print the incumbent; This optimization algorithm is a continuous version of the genetic algorithm that works with populations [35]. Equal to the traditional genetic algorithm of Chu and Beasley, this uses selection, recombination, and mutation for obtaining a solution of good quality that improves the incumbent (the best solution) in each iteration. The main difference between the CGA and the traditional GA is that, in the recombination step, the CGA uses the average of the values contained in the individuals chosen in the selection step. Algorithm 2 describes the iterative process of the master-slave strategy, based on the CGA proposed.
The algorithm proposed for the master-slave methodology, based on the GA, starts reading the parameters associated with the optimization algorithm. For obtaining data equal to the VSA, a PSO for tuning the algorithm by obtaining a population size of 50 individuals, a maximum number of iterations equal to 1000, 4 individuals in the selection step, and the mutation of 1 component of each individual in the population was used. After, in the first iteration, the initial population was generated randomly. Then, it evaluated the objective function of each individual that composed the initial population by using the slave stage, with the aim to obtain the RMSE generated by each possible solution (individual) contained in the initial population.
From the second iteration to the last, the CGA generates the new population by using the information of this in the last iteration and selection, recombination, and mutation processes. These operations are applied from the second iteration to the last to create a new population based on the information obtained from the previous iteration. The selection process involves choosing individuals from the current population based on their fitness values. Individuals with higher fitness values have a higher probability of being selected for the next generation. This process helps to ensure that the population evolves towards better fitness values over time. Recombination is the process of creating new individuals by combining genetic material from two or more individuals from the previous generation. This can be achieved using different techniques, such as crossover or blending. The aim of recombination is to create new individuals with a combination of favorable traits from their parents. The mutation is the process of introducing small, random changes to the genetic material of individuals in the population. This helps to introduce new genetic material into the population, which can increase the diversity of the population and prevent it from becoming stagnant. Overall, the selection, recombination, and mutation processes in the genetic algorithm work together to create a new population that is hopefully better suited to the problem being solved than the previous generation.
Subsequently, the objective function was evaluated by using the slave stage, thus updating the incumbent of the problem. Then, the stopping criterion was evaluated, if the maximum number of iterations is achieved the iterative process finish in other cases, the algorithm continues. The complete description of the mathematical formulation and iterative process of the continuous genetic algorithm previously described is given in [39].

Crow Search Algorithm
This optimization method is based on the behavior of the crows for obtaining food [45], and its hunting strategy is based on the intake of food from other animals and hiding it, with the aim of not losing it to other animals. At all times, the crows are in search of food with the best quality, working in populations and following the strategy described in Algorithm 2. The complete description of the iterative process and equations that describe the CSA is given in [46].
The iterative process of the CSA starts reading the initials parameters by using the same method employed for the tuning of VSA and CGA, which obtained a number of individuals of 95 and a maximum number of iterations of 971. Then, it is generated the population of crows randomly. Subsequently, it is calculating the objective function for each individual by using the slave stage; selecting the crow with the best objective function as the leader of the swarm, and storing the location of all crows that compose the population.
From the second iteration to the finish, regarding the iterative process of the CSA, the population of crows moves in solution space by using the information of the swarm, the best solution, and the random values. The first movement of each crow is made considering the current position and the information of the crow with the best solution. In this movement, the algorithm uses a random value between zero and one that allows the crow to maintain its position or change position in the direction to the leader. The second movement of each crow is related to the decision of the leader to lose the followers, with the aim to retain the best food; in this situation, is uses a random value, which is for deciding if the position of the crow is generated randomly or by considering the location of the leader, with the aim to emulate the behavior of the crow swarm. After making the movement of the swarm, in each iteration, the memory that contains the current positions of the swarms is updated, as well as the position of the crow with the best solution (incumbent). After updating the information of the crow swarm in each iteration, it verifies the stopping criteria. If this has been met, the iterative process stops and prints the solution, and if not, this continues (Algorithm 3).

Slave Stage
In this mathematical formulation, an objective function that searches for the reduction of the root mean square error (RMSE) between the power calculated with the parameters brings the master stage and the power supplied by the experimental data for the six different hot side temperatures of the thermoelectric generator. Furthermore, this section describes all the constraints associated with the mathematical model. The RMSE is often employed as a target function to evaluate the performance in the mathematical model used for error reductions [47,48]; it is a measure of the deviation between the observed and predicted values of a system. In the context of TEGs, the RMSE can measure the deviation between the measured voltage and current output of the thermoelectric module, in terms of the power and the predicted values from the mathematical model. The RMSE is calculated as the square root of the mean squared error, defined as the average of the squared differences between the observed and predicted values. The RMSE is a commonly used performance metric in regression analysis, as it measures the overall deviation of the predicted values from the actual values. It is particularly useful when the predicted values are continuous and have a normal distribution. The RMSE determines the goodness of fit of the mathematical model and allows for a better comparison of model performance across different datasets, as it normalizes the errors by the number of observations. Additionally, using RMSE prevents the model from overfitting the data, which is particularly important in cases where there are a large number of observations or the model is complex. A lower RMSE value indicates a better fit of the model to the experimental data and, therefore, a more accurate model. The optimization algorithm uses the RMSE as a target function to minimize the deviation between the observed and predicted values and to find the optimal parameters that minimize the deviation. Formally, the RMSE is defined, as follows, in Equation (1): To determine the predictedP i for a given I current, it is essential to establish a mathematical model incorporating the Thomson effect, the variation of thermoelectric material properties as temperature functions, and the physical parameters of the thermoelectric generator (TEG) module, such as an equivalent number of legs (n legs ) and an effective cross sectional area (A cs ) of a single TE leg.
A general model to describe the thermoelectric behavior of one TE leg is presented in [49]. A 1-D model of those equations is given in Equation (2), where j is the current density, computed as j = I/A cs , and k(T) is the thermal conductivity, S(T) the Seebeck coefficient, ρ(T) the electric resistivity, and T is the temperature value for each x in the leg length.
To solve Equation (2), boundary conditions must be defined. Considering that surface temperature at the cold (x = 0) and hot sides (x = L) of a TEG module are easy to measure, for this case, a set of Dirichlet boundary conditions are present in Equation (6) T| x=0 = T c , T| x=L = T h (6) where T c and T h are temperatures at the cold and hot sides, respectively. A robust numerical method must be employed to solve the differential Equation (2) related to TEGs. As outlined by Wee [50], it is feasible to assume a linear temperature profile for the second and third terms of Equation (2) because the thermal conductivity of most thermoelectric materials is orders of magnitude greater than the Thomson coefficient and electric resistivity. The approximate analytical model proposed by Ju et al. [51] utilizes this assumption and successfully derives an explicit solution for the temperature profile defined in Equation (2) for a single TEG leg (Equation (7)), which is in agreement with the previous solutions of this problem; on this explicit solution, β, γ, m 0 , m 1 , m 2 , C 1 and C 2 are intermediate variables computed, as follows, in Equations (8)- (14) T(x) = 1 The heat flux at each end of a single TEG leg is calculated utilizing Equation (15), and the total power output predicted by the proposed mathematical model is determined by the product of the area-specific power output of a single leg and the number of equivalent legs present on the TEG module, as depicted in Equation (16).
The model to fit in this study is described by Equations (7)- (16). These equations were derived based on the physical principles of the system and the assumptions made in the model. The parameters listed in Section 2.1 in these equations were determined by fitting the model to the experimental data.

Test Scenario
The behavior of the power output of a thermoelectric module can be plotted as a function of current, resulting in a parabolic curve that passes through the origin of the reference system (P vs I), with a downward opening and a vertex located in the first quadrant, which defines the point of maximum power. This curve is obtained under fixed and known temperature difference conditions. Each temperature condition at the cell boundaries will then generate a new characteristic curve.
As a test scenario, a current sweep is performed on a thermoelectric module (TEG1-12611-6.0), manufactured by TECTEG MFR [52]. The module is tested under different temperature differences between the cold and hot sides of the TEG module. The experimental equipment is presented in Figure 3. The TEG performance is measured through the utilization of various instrumentation devices. These devices, which form the instrumentation component, comprise an oscilloscope, a multimeter, and thermocouples. Additionally, auxiliary control electronics are integrated into the experimental setup to regulate the temperature of the heat source and heat sink, in order to automate the measurement process. The heat sink regulates the hot side temperature of the thermoelectric generator. In contrast, a heat exchanger that utilizes water from a large reservoir maintains a constant temperature on the cold side. The temperature boundaries are kept fixed and are known throughout the measurement process. A controlled load drives a current sweep, and the current and output voltage are measured using an oscilloscope.
The low-temperature surface of the cell is cooled by a heat exchanger, through which ambient temperature water (T cold = 24.3 • C) circulates; the high-temperature side is heated using an electric resistance powered by a source and controlled by an automatic self-tuning controller. Current sweeps are performed, and the output voltage and current are measured using an oscilloscope, allowing for the calculation of the cell's output power. This test is conducted for six different high-temperature conditions (T H = 60 • C, 70 • C, 80 • C, 90 • C, 100 • C, and 110 • C). This test scenario is repeated experimentally 10 times, and the averaged curves for each hot-side temperature are shown in Figure 4.
The curve illustrated in Figure 4 demonstrates the empirical relationship between the power output and the current generated by the thermoelectric cell under varying boundary temperature conditions. The curve exhibits a parabolic nature that begins at the origin (0,0) and attains a maximum at a distinct current level. Beyond that current level, any additional current generated by the cell, whether from internal or external sources, results in a decline in the electrical power output. This experimental data is crucially important for the study, as it is utilized for model fitting, allowing for accurately predicting and analyzing the behavior of the system under different temperature boundary conditions. Therefore, the data presented in Figure 4 serves as the foundation for our model fitting procedure.

Simulation Results
In this section, the results are presented after evaluating the master stage methodologies in the test scenario described in Section 2.2. In order to evaluate the effectiveness and robustness of these, in terms of the minimum and average solutions, standard deviation, and average processing times, each methodology was executed 1000 times by using the software Matlab 2023 and a workstation with the following features: Intel(R) Xeon(R) E5-1660 v3 3.0 GHz processor CPU, 16 GB DDR4 RAM, solid state hard drive of 2.5" and 480 GB storage, and Windows 11 Pro operating system. The results obtained are described in Table 1. This table presents, from left to right: the optimization method used, the minimum and average RMSE error, the standard deviation in percentage, and the average processing time required in seconds.  Table 2 presents the optimized parameters obtained by the proposed optimization methodologies that offer the best representation of the thermoelectric generator employed. The reported parameters serve as a reference for future studies and allow for a comparison between different optimization approaches. The observed differences in the optimized solutions highlight the vastness of the solution space and the complexity of the problem, due to the high number of variables and non-linearities involved. In Figure 5, the results detailed in Figure 5 are visualized. As regards the minimum RMSE reduction achieved after 1000 executions, Figure 5a indicates that the minimum value was achieved by the VSA, with an error of 0.0018, while the CGA obtained the maximum error with a value of 0.0021. The same figure also reveals that, regarding the average RMSE, the VSA demonstrated the lowest error (0.0021), whereas the worst solution was produced by the CGA (0.0066). The last set of results reveals that the VSA achieved the best results in terms of RMSE reduction. Nevertheless, it is important to highlight that, in practical terms, all solutions are of sufficient quality for real-world applications, as the worst solution is equivalent to 0.0019 W. Given that the maximum power point for the highest temperature differences is 0.2047 W, all errors are considered insignificant. The key factor in selecting the master-slave strategy is the standard deviation and average processing times obtained from the proposed solutions.
To evaluate the repeatability of the solution methods used, the standard deviation percentage was calculated, see Figure 5b. In this figure, it is noticed that the VSA obtains the minor standard deviation with a value of 8.43%, while the worse solution, in relation to this index, was obtained by the CSA, with a value of 99.9015%. These results indicate that the CSA is not a solution methodology suitable for solving the problem studied here. By analyzing the average processing times present in Figure 5b, it can be observed that the VSA and CGA obtained similar processing times, with an average value of 214.8602 s, with the VSA being the faster method of all used, while the CSA obtained the longer average processing time of 893.2618 s.
By analyzing the results illustrated in Figure 5, it is possible to notice that the VSA achieved the best results, in terms of quality solution and processing times for solving the problem of material property characterization and parameter estimation of thermoelectric generators. The reductions obtained for this, compared with the other solution methods proposed, are presented in Figure 6. The VSA outperforms the CGA and SCA regarding the RMSE obtained after 1000 executions, with a minimum RMSE of 0.00183898 W between experimental data and the founded parameters fitted model. The results show that the average RMSE for the VSA (0.0021 W) is also lower than that of the CGA (0.0028 W) and SCA (0.0066 W). Additionally, the standard deviation of the RMSE is the lowest for the VSA (8.4311%) compared to the CGA (13.6212%) and SCA (99.9015%). It is important to note that while all three methods provide good-quality solutions, the master-slave optimization methodology selection should be based on the standard deviation of the RMSE and the processing time. The VSA has the lowest standard deviation and processing time (212.1074 s) compared to the CGA (217.6131 s) and SCA (893.2618 s). These results demonstrate the superiority of the VSA over the other methods in terms of efficiency and effectiveness.
The graph in Figure 7 compares the experimentally measured data points and the results obtained from the model described in Section 2.2 using the parameters determined by the VSA. The graph demonstrates that the model and the determined parameters fit well with the experimental data over a wide range of temperatures, thus validating that the proposed methodology enables the modeling of the behavior of a TEG module under different operating conditions. The demonstration of the validity of the proposed model and its parameters highlights the significance of having a comprehensive model to evaluate and integrate TEGs as power sources in smart grids. By accurately capturing the behavior of the TEG module under various operating conditions, this model provides a valuable tool for predicting power output, optimizing system performance, and ensuring the reliable integration of TEGs into energy networks. Moreover, this validated model can also aid in the design of TEG systems by providing key insights into the underlying physical mechanisms and determining the actual parameters, regarding when the manufacturer's data is not available. The development of a reliable and accurate model is crucial in the advancement of TEG technology and the integration of renewable energy sources.
The measurement of material properties of thermoelectric generators (TEG) can be challenging in industrial applications. As a result, parameter estimation using metaheuristic methods may not always yield a unique and optimal solution. Still, it can appropriately represent the TEG module for practical applications. Although Figure 7 and Table 1 demonstrate good agreement between the model predictions and experimental results, this approach does not ensure the identification of an optimal parameter set. In future studies, it is advisable to explore other metaheuristic algorithms and mathematical formulations of TEG that entail analyzing numerical solutions of differential equations. With additional computational resources, it will be possible to investigate interesting topics, such as the confidence intervals and statistical correlations between the estimated parameters.

Conclusions and Future Work
The present study aims to optimize a thermoelectric generator system by implementing master-slave optimization algorithms. Three methods, namely the VSA, CGA, and SCA, were proposed and evaluated using a validation scenario based on experimental data. The performance of each method was analyzed using several performance indicators, including the minimum and average root mean square error, the standard deviation of the RMSE, and the processing time required to achieve the optimization results. The results indicated that the VSA method was the most effective among the three methods, exhibiting the lowest values for minimum and average RMSE and the smallest standard deviation and processing time.
The VSA optimization method is recommended based on its superior performance in minimizing the minimum and average RMSE values, which were the lowest among the three methods considered. The VSA method also exhibits the lowest standard deviation among the methods. Nevertheless, further research is necessary to explore new optimization methods that can improve thermoelectric generator characterization and parameter estimation by reducing the RMSE, standard deviation, and processing time. Therefore, alternative and robust exact methods that can handle the nonlinearity of the model can be explored for further research.
Considering these results, it can be concluded that the VSA optimization method is more efficient in minimizing the RMSE, achieving better average values, and presenting lower standard deviation, compared to the CGA and SCA methods. Additionally, the processing time of the VSA is relatively low, compared to the other methods. Therefore, it is recommended to use the VSA optimization method for the purposes of this study. The results indicate that the VSA outperforms the other two methods, in terms of efficiency and effectiveness, with an average RMSE of 0.0021 W, a standard deviation of 8.4311%, and a processing time of 212.1074 s. While all three methods provide good quality solutions, the VSA's superiority is based on its low standard deviation and processing time. Therefore, it is recommended that the selection of the master-slave optimization methodology should take into account these two factors. Additionally, a methodology was developed to find the parameters of the TEG module under different temperature conditions.
In future works, it is planned to explore the possibility of comparing and evaluating different error models to determine the most appropriate one for our specific application. Future applications of the proposed study could include integrating the VSA method into smart grid systems for more efficient energy management and optimization. The method can be further developed and improved by exploring other optimization algorithms or combining multiple algorithms to achieve even better results. Another area of future work could be testing the method in real-world applications and comparing its performance against other state-of-the-art or self-developed optimization algorithms. The proposed method could also be expanded to include other parameters or variables for optimization, such as wind or solar energy production. The proposed study presents a promising step towards more efficient and effective energy management in energy systems. Furthermore, deterministic methods could be used for solving the problem here studied, in order to reduce the standard deviation, which can use parallel processing to reduce the processing times related to the highly complex mathematical process.