# A BP-IPSO Algorithm Suitable for Centralized Thermoelectric Generation System Power Tracking under Nonuniform Temperature Distribution

Authors: Qian Du; Yan Chen; Xiao Yang; Xinying He
Journal: International Journal of Energy Research
 (2023)

---

## Abstract

The power-voltage (P-V) characteristic curve of the centralized thermoelectric generation (TEG) system under nonuniform temperature distribution (NTD) exhibits multiple extreme point characteristics, and the traditional maximum power point tracking (MPPT) algorithm is prone to fall into the local maximum power point (LMPP) and takes a long time to track. This paper designs a BP-IPSO algorithm based on back propagation neural network (BPNN) and improved particle swarm optimization (IPSO) for MPPT. The algorithm firstly utilizes the good nonlinear function fitting ability of BPNN to obtain the fitting curve of the relationship between system control input and power output to establish the TEG array power prediction model. Then, the dynamic learning factor and weight coefficient are introduced into the traditional particle swarm optimization (PSO) algorithm to search the output power prediction model and realize MPPT control. MATLAB/Simulink experiment results show that BP-IPSO algorithm can effectively avoid falling into LMPP, quickly and accurately track the global maximum power point (GMPP), and effectively suppress the oscillation of voltage and power during the tracking process. Especially in the start-up test experiment, compared with perturb and observe (P&O), PSO, and grey wolf optimizer (GWO), the energy generated by BP-IPSO increased by 12.84%, 3.18%, and 4.75%, respectively, which improved the system power generation efficiency.


---

## Body

## 1. Introduction

Energy is one of the most critical factors affecting national development and is the driving force for social development. As people’s demand for energy increases, the energy situation becomes more critical, and it is imminent to develop and utilize renewable energy extensively [1]. Renewable energy development can help reduce greenhouse gas emissions and dependence on fossil fuels, and the global contribution of renewable energy to the electricity supply is expected to increase to 31% by 2035 [2]. Compared with traditional power generation, thermoelectric generation is a power generation technology that uses the thermoelectric potential of thermoelectric materials to generate electricity. It can use various forms of thermal energy to generate electricity and has the advantages of long working life, compact structure, and high reliability, which has broad application prospects [3]. At present, it is widely used in the power supply of wearable personal electronic products [4], waste heat recovery in automobiles [5], photovoltaic-thermoelectric hybrid power generation [6, 7], and large-scale industrial waste heat recovery [8, 9]. Using thermoelectric technology to recover industrial waste heat is one of the methods to improve energy utilization.In the process of large-scale industrial waste heat recovery and utilization, due to the low output voltage and power of a single thermoelectric generator module, there is a mismatch between energy supply and demand. Therefore, multiple modules are usually connected in series and parallel to form a thermoelectric generation (TEG) system to increase the output power, and an effective maximum power point tracking (MPPT) algorithm is designed to improve the energy conversion efficiency. Figure1 illustrates the three main architectures of TEG systems, which are centralized, string-type, and modularized [10]. The centralized TEG system connects TEG modules in series and parallel to form an array and transmits the power to the load after centralized transformation through an MPPT controller, as shown in Figure 1(a). The string-type TEG system places each string along the isotherm of the heat source, and the system is equipped with an MPPT controller for each string, as shown in Figure 1(b). In the modularized TEG system, each TEG module independently tracks its own maximum power point, but the cost of system operation and maintenance is the highest and the control is complicated, as shown in Figure 1(c).Figure 1
Three different types of TEG system structures. (a) Centralized; (b) string-type; (c) modularized.
(a)(b)(c)When the TEG system works in MPPT mode, the string-type and modularized architectures need to coordinate and control multiple MPPT controllers, which increases the control complexity and implementation cost. In contrast, the centralized architecture only needs to control one MPPT controller, which greatly reduces the system cost and the inherent power consumption of energy in the power conversion. However, due to the nonuniform distribution of thermal energy in space, the temperature of each TEG module varies with its location, resulting in differences in output characteristics [11]. The environmental mismatch problem will not only reduce the output power of the centralized TEG system but also cause its output static characteristic curve to exhibit several local maximum power points (LMPPs) and a unique global maximum power point (GMPP) [12].Traditional MPPT algorithms, such as perturb and observe (P&O) [13] and incremental conductance (INC) [14], have been widely used in the field of TEG systems. Reference [15] improved the traditional P&O method by introducing the support vector regression (SVR) algorithm to improve the tracking accuracy. Reference [16] proposed an MPPT technique based on linear extrapolation, which uses two random operating points to calculate MPP, which shortens the tracking time. However, the above MPPT algorithms are prone to fall into LMPP under nonuniform temperature distribution (NTD) and cannot accurately track the GMPP, which greatly reduces the output power of the system. In contrast, heuristic algorithms are flexible, model-free, and can avoid local optimization [17], which can be used as an efficient way for the centralized TEG system to realize MPPT under NTD conditions. Reference [18] utilizes the advantages of particle swarm optimization (PSO) algorithm with few parameters and fast convergence speed and applies it to MPPT control of TEG system under dynamic temperature and achieves a relatively ideal control effect. Reference [19] used the grey wolf optimizer (GWO) for MPPT control in the presence of several LMPPs under NTD conditions and traced to GMPP. Although the technique based on stochastic search can successfully track GMPP under NTD, the tracking speed is still low due to the randomness of the search, which requires a large number of populations to iteratively find the best, leading to dynamic power loss.Artificial Neural Network realizes the mathematical mapping of complex nonlinear relationships by simulating some mechanisms of the brain, which is widely used in power prediction [20], pattern recognition [21], etc. Back propagation neural network (BPNN) is a widely used method. Using BPNN to predict the output power of the TEG array under NTD does not need to consider the detailed mathematical model of the TEG array, but starts from the real and representative collected data, and only through its own training to establish the power prediction model.Based on the above discussion, a BP-IPSO algorithm based on BPNN and improved particle swarm optimization (IPSO) is designed in this paper for MPPT of centralized TEG system under NTD. The method trains the BPNN by collecting the real-time operation data of the TEG system, completes the fitting of the nonlinear relationship between the control input and power output of the TEG system, and establishes the power prediction model of the TEG array. After that, the search of the fitted I/O curve by IPSO accurately distinguishes LMPP and GMPP to realize MPPT control. Finally, the effectiveness of the method is verified by simulation tests.


## 2. Centralized TEG System Modeling

### 2.1. Mathematical Modeling of TEG

Figure2 shows the schematic diagram of TEG module and its equivalent circuit. The TEG module can be modeled as a series connection of a voltage source Voc and an internal resistance RTEG, and the parameters change with the temperature difference between the two ends of the module. The principle is that the P-type and N-type semiconductor materials are connected with conductive copper sheets, and when there is a temperature difference between the two sides, a temperature difference electric potential Voc will be generated at both ends of the material. Voc can be described as
(1)Voc=αTh−Tc=αΔT,where α is the Seebeck coefficient and Th and Tc are the temperature on the hot side and cold side, respectively, and ΔT is the temperature difference between the hot side and cold side.Figure 2
Equivalent circuit of a TEG module.When the current flows through a uniform conductor with a temperature gradient, reversible energy absorption and release occurs, known as the Thomson effect. The Thomson coefficientτ can be expressed as
(2)τ=TdαdT,where T is the average temperature.In fact, the Thomson effect is non-zero and makes the Seebeck coefficient dynamic. Therefore Eq. (3) is used for accurate modeling and incorporates the effect of dynamic average temperature as [22].
(3)αT=α0+α1lnTT0,where α0 is the initial rate of change at the reference temperature T0 and α1 is the variation rate of the Seebeck coefficient.When there is a load resistance, the output power of the TEG module can be calculated by(4)PTEG=αΔT2·RLRL+RTEG2,where RTEG and RL are the internal resistance and load resistance of the TEG module, respectively. When RTEG=RL, the TEG operates at MPP and the load obtains the maximum power.


### 2.2. Modeling of Centralized TEG System under NTD

As shown in Figure3, the centralized TEG system consists of four parts: TEG array, boost circuit, MPPT controller, and load. The system inputs different duty cycles to the boost circuit through the MPPT controller to achieve the matching of the equivalent load resistance and the internal resistance value of the TEG array, so that the system operates at GMPP and improves the energy conversion efficiency under NTD conditions.Figure 3
Structure of centralized TEG system under NTD condition.The TEG array constructed in this paper has a total of 40 TEP1-09656-0.5 model TEG modules, arranged in 8 strings, and each string is connected by 5 TEG modules in series. The TEG array structure is shown in Figure3. A bypass diode is added to each TEG module in the TEG array to prevent the TEG module from working in reverse voltage; in order to prevent the reverse current flowing into the array, the parallel branch is connected in series with blocking diodes. Table 1 provides the main parameters of the TEG module and the boost converter.Table 1
The main parameters of TEG module and boost converter.
TEG moduleBoost converterNumber of parallel strings8CapacitanceC1=70 μF, C2=330 μFNumber of modules in each string5InductanceL=1.25 mHHot surface temperature300 °CLoadR=30ΩCold surface temperature30 °CSwitching frequencyf=10 kHzOpen circuit voltage,Voc7.0 VTransfer functionVo=VL/1−DMatched load resistance1.0ΩMatched load output current4.0 AThe output powerPi of the ith string in the TEG array and the total output power PTEG∑ can be calculated by Eq. (5) and Eq. (6), respectively, as
(5)Pi=VL∑i=1mVoci−VL∑i=1mRTEGi=∑i=1mVoci∑i=1mRTEGiVL−1∑i=1mRTEGiVL2,if0≤VL≤∑i=1mVoci0,otherwise,,(6)PTEGΣ=∑i=1nPi,where m and n are the number of TEG modules connected in series and parallel, respectively, VL is the TEG array output port voltage, and Voci and RTEGi are the open-circuit voltage and internal resistance of the ith TEG module.The Eqs. (5)–(6) indicate that there is a parabolic relationship between the output power Pi of each string in the TEG array and the array output port voltage VL, and the P-V characteristic curve of the TEG array under uniform temperature distribution is shown in Figure 4(a). Under NTD conditions, each blocking diode is triggered at different voltage levels, causing the P-V characteristic curve of the TEG array to be superimposed by multiple different parabolas, showing complex multipeak characteristics, as shown in Figure 4(b).Figure 4
P-V characteristics of TEG array under (a) uniform temperature distribution; (b) nonuniform temperature distribution.
(a)(b)


## 2.1. Mathematical Modeling of TEG

Figure2 shows the schematic diagram of TEG module and its equivalent circuit. The TEG module can be modeled as a series connection of a voltage source Voc and an internal resistance RTEG, and the parameters change with the temperature difference between the two ends of the module. The principle is that the P-type and N-type semiconductor materials are connected with conductive copper sheets, and when there is a temperature difference between the two sides, a temperature difference electric potential Voc will be generated at both ends of the material. Voc can be described as
(1)Voc=αTh−Tc=αΔT,where α is the Seebeck coefficient and Th and Tc are the temperature on the hot side and cold side, respectively, and ΔT is the temperature difference between the hot side and cold side.Figure 2
Equivalent circuit of a TEG module.When the current flows through a uniform conductor with a temperature gradient, reversible energy absorption and release occurs, known as the Thomson effect. The Thomson coefficientτ can be expressed as
(2)τ=TdαdT,where T is the average temperature.In fact, the Thomson effect is non-zero and makes the Seebeck coefficient dynamic. Therefore Eq. (3) is used for accurate modeling and incorporates the effect of dynamic average temperature as [22].
(3)αT=α0+α1lnTT0,where α0 is the initial rate of change at the reference temperature T0 and α1 is the variation rate of the Seebeck coefficient.When there is a load resistance, the output power of the TEG module can be calculated by(4)PTEG=αΔT2·RLRL+RTEG2,where RTEG and RL are the internal resistance and load resistance of the TEG module, respectively. When RTEG=RL, the TEG operates at MPP and the load obtains the maximum power.


## 2.2. Modeling of Centralized TEG System under NTD

As shown in Figure3, the centralized TEG system consists of four parts: TEG array, boost circuit, MPPT controller, and load. The system inputs different duty cycles to the boost circuit through the MPPT controller to achieve the matching of the equivalent load resistance and the internal resistance value of the TEG array, so that the system operates at GMPP and improves the energy conversion efficiency under NTD conditions.Figure 3
Structure of centralized TEG system under NTD condition.The TEG array constructed in this paper has a total of 40 TEP1-09656-0.5 model TEG modules, arranged in 8 strings, and each string is connected by 5 TEG modules in series. The TEG array structure is shown in Figure3. A bypass diode is added to each TEG module in the TEG array to prevent the TEG module from working in reverse voltage; in order to prevent the reverse current flowing into the array, the parallel branch is connected in series with blocking diodes. Table 1 provides the main parameters of the TEG module and the boost converter.Table 1
The main parameters of TEG module and boost converter.
TEG moduleBoost converterNumber of parallel strings8CapacitanceC1=70 μF, C2=330 μFNumber of modules in each string5InductanceL=1.25 mHHot surface temperature300 °CLoadR=30ΩCold surface temperature30 °CSwitching frequencyf=10 kHzOpen circuit voltage,Voc7.0 VTransfer functionVo=VL/1−DMatched load resistance1.0ΩMatched load output current4.0 AThe output powerPi of the ith string in the TEG array and the total output power PTEG∑ can be calculated by Eq. (5) and Eq. (6), respectively, as
(5)Pi=VL∑i=1mVoci−VL∑i=1mRTEGi=∑i=1mVoci∑i=1mRTEGiVL−1∑i=1mRTEGiVL2,if0≤VL≤∑i=1mVoci0,otherwise,,(6)PTEGΣ=∑i=1nPi,where m and n are the number of TEG modules connected in series and parallel, respectively, VL is the TEG array output port voltage, and Voci and RTEGi are the open-circuit voltage and internal resistance of the ith TEG module.The Eqs. (5)–(6) indicate that there is a parabolic relationship between the output power Pi of each string in the TEG array and the array output port voltage VL, and the P-V characteristic curve of the TEG array under uniform temperature distribution is shown in Figure 4(a). Under NTD conditions, each blocking diode is triggered at different voltage levels, causing the P-V characteristic curve of the TEG array to be superimposed by multiple different parabolas, showing complex multipeak characteristics, as shown in Figure 4(b).Figure 4
P-V characteristics of TEG array under (a) uniform temperature distribution; (b) nonuniform temperature distribution.
(a)(b)


## 3. BP-IPSO Search Algorithm

### 3.1. BP Neural Network Construction

Neural networks have good nonlinear function fitting ability and can directly summarize the prediction model based on actual and representative sample data [23]. Applying neural network modeling only needs to know the input and output data of the system and does not need to deeply understand the complex internal structure of the system, which avoids tedious mathematical formula modeling, making system modeling convenient and effective.Back propagation neural network (BPNN) is a neural network with three or more layers: input layer, hidden layer, and output layer. The structure of BPNN realizes a full connection between the front and rear layers, and there is no connection between neurons in each layer [24], as shown in Figure 5.Figure 5
BP neural network model.According to Section1, the P-V characteristic of the TEG array under NTD is a nonlinear curve with multiple extreme points. Therefore, BPNN is used to complete the modeling of the TEG array.
(1)
Input Layer Design. The number of nodes in the input layer is usually determined by the influencing factors of the problem being solved. For the maximum power point tracking problem, the MPPT controller dynamically adjusts the output power of the TEG array by outputting different duty cycles and feeds it back to the MPPT controller so that the TEG system can operate near the maximum power point. Therefore, the input layer is designed as one node, and the duty cycle of the boost converter is used as the input variable, which is represented by x.(2)
Hidden Layer Design. Considering that the boost converter’s input duty cycle and the TEG array’s output power is a single input-single output curve, it is decided to adopt the single hidden layer. The determination of the number of neurons in the hidden layer is the critical issue in the design of BPNN. Too few neurons in the hidden layer may lead to lower fitting accuracy, while too many neurons will increase the network training time and cause overfitting.For the selection of the number of neurons in the hidden layer, first refer to the relevant literatures and use the empirical formula to calculate the approximate boundaries. Then, under the temperature environment set by the start-up test experiment, the accuracy of the power prediction model is tested in turn when different numbers of hidden layer nodes are selected. MAE and MAPE are used as evaluation indicators for quantitative analysis. According to the number of sample data and the analysis of multiple experiments, the number of neurons in the hidden layer is finally determined to be 5. Since the sigmoid function can reflect the saturation characteristics of neurons and the predicted value of the output power cannot be negative, the sigmoid function is selected as the transfer function of the hidden layer. The sigmoid function and the output value of the hidden layer can be expressed as follows:(7)fhz=11+e−z,(8)Hj=fhωjx+ajj=1,2,⋯,l,where Hj is the output value of the jth hidden layer neuron, ωj is the connection weight of the input layer to the jth hidden layer neuron, aj is the threshold value of the jth hidden layer neuron, and l is the number of hidden layer nodes.
(3)
Output Layer Design. Since the purpose of the network is to predict the output power of the TEG array under different duty cycle inputs, the output layer is designed as one node and denoted by y. The output layer transfer function adopts a linear function. The output value of the output layer can be expressed as(9)y=∑j=1lvjHj+b,where vj is the connection weight between the jth hidden layer neuron and the output layer, b is the threshold value of the output layer, and l is the number of hidden layer nodes.After the above design, the specific structure of BPNN is determined. A three-layer neural network is adopted, with one neuron in the input layer, five neurons in the hidden layer, and one neuron in the output layer. The input data is the duty cycle of the boost circuit, and the output is the predicted output power of the TEG array under the current duty cycle.


### 3.2. IPSO Search

The PSO algorithm is an effective method for global optimization of multiple extreme point functions, where the population intelligence generated by cooperation and competition among the particles in the population guides the optimization search. At the (k+1)-th iteration, the update process of each particle’s flight velocity vik+1 and flight position xik+1 can be expressed by Eq. (10) and Eq. (11), respectively, as [25],
(10)vik+1=wvik+c1r1pik−xik+c2r2pgk−xik,(11)xik+1=xik+vik+1,where w is the inertia weight, C1 and C2 are the self-learning factor and social learning factor, respectively; r1 and r2 are random numbers on [0, 1], i is the particle order, k is the number of iterations, pik is the individual optimal value of the ith particle at the kth iteration, pgk is the global optimal value at the kth iteration.For the maximum optimization problem in function optimization, if the value of the fitness functionfxi is larger, the fitness value is better, so the update process for the individual optimal value Pi and the global optimal value Pg can be calculated, respectively, as
(12)pik+1=pik,fxik+1≤fpik,xik+1,fxik+1>fpik,(13)pgk+1=pik+1,fpik+1≥fpgk,pgk,fpik+1<fpgk.The selection of parametersw, C1, and C2 has a significant influence on the iterative process of the algorithm. The inertia weight w determines the inheritance of particle flight velocity. If w is set too small, it is easy to fall into the local optimum; if set too large, it is difficult to guarantee the convergence speed in the later stage. The learning factors C1 and C2 determine the speed at which the particle moves to the individual optimal position and the global optimal position, respectively. To improve the adaptability of the PSO algorithm, an improved PSO algorithm is designed. The method introduces dynamic learning factors and weight coefficients in the iterative process to improve the speed and accuracy of algorithm convergence.In the initial stage of the algorithm, a larger inertia weight, a self-learning factor, and a smaller social learning factor are set to improve the global search ability, so that the algorithm is not easy to fall into local optimization. In the later stage, it updates with the number of iterations and sets smaller inertia weight, self-learning factor, and larger social learning factor, which improves the local search ability of the algorithm and makes the system converge faster. The process of dynamic adjustment of parameters is expressed in Eq. (14)–(16).
(14)w=wmax−wmax−wminkN,(15)c1=c1max−c1max−c1minkN,(16)c2=c2max+c2max−c2minkN,where N is the maximum number of iterations and c1max, c1min, c2max, c2min, wmax, and wmin are the maximum and minimum values of c1, c2, and w in the iteration process, respectively.


## 3.1. BP Neural Network Construction

Neural networks have good nonlinear function fitting ability and can directly summarize the prediction model based on actual and representative sample data [23]. Applying neural network modeling only needs to know the input and output data of the system and does not need to deeply understand the complex internal structure of the system, which avoids tedious mathematical formula modeling, making system modeling convenient and effective.Back propagation neural network (BPNN) is a neural network with three or more layers: input layer, hidden layer, and output layer. The structure of BPNN realizes a full connection between the front and rear layers, and there is no connection between neurons in each layer [24], as shown in Figure 5.Figure 5
BP neural network model.According to Section1, the P-V characteristic of the TEG array under NTD is a nonlinear curve with multiple extreme points. Therefore, BPNN is used to complete the modeling of the TEG array.
(1)
Input Layer Design. The number of nodes in the input layer is usually determined by the influencing factors of the problem being solved. For the maximum power point tracking problem, the MPPT controller dynamically adjusts the output power of the TEG array by outputting different duty cycles and feeds it back to the MPPT controller so that the TEG system can operate near the maximum power point. Therefore, the input layer is designed as one node, and the duty cycle of the boost converter is used as the input variable, which is represented by x.(2)
Hidden Layer Design. Considering that the boost converter’s input duty cycle and the TEG array’s output power is a single input-single output curve, it is decided to adopt the single hidden layer. The determination of the number of neurons in the hidden layer is the critical issue in the design of BPNN. Too few neurons in the hidden layer may lead to lower fitting accuracy, while too many neurons will increase the network training time and cause overfitting.For the selection of the number of neurons in the hidden layer, first refer to the relevant literatures and use the empirical formula to calculate the approximate boundaries. Then, under the temperature environment set by the start-up test experiment, the accuracy of the power prediction model is tested in turn when different numbers of hidden layer nodes are selected. MAE and MAPE are used as evaluation indicators for quantitative analysis. According to the number of sample data and the analysis of multiple experiments, the number of neurons in the hidden layer is finally determined to be 5. Since the sigmoid function can reflect the saturation characteristics of neurons and the predicted value of the output power cannot be negative, the sigmoid function is selected as the transfer function of the hidden layer. The sigmoid function and the output value of the hidden layer can be expressed as follows:(7)fhz=11+e−z,(8)Hj=fhωjx+ajj=1,2,⋯,l,where Hj is the output value of the jth hidden layer neuron, ωj is the connection weight of the input layer to the jth hidden layer neuron, aj is the threshold value of the jth hidden layer neuron, and l is the number of hidden layer nodes.
(3)
Output Layer Design. Since the purpose of the network is to predict the output power of the TEG array under different duty cycle inputs, the output layer is designed as one node and denoted by y. The output layer transfer function adopts a linear function. The output value of the output layer can be expressed as(9)y=∑j=1lvjHj+b,where vj is the connection weight between the jth hidden layer neuron and the output layer, b is the threshold value of the output layer, and l is the number of hidden layer nodes.After the above design, the specific structure of BPNN is determined. A three-layer neural network is adopted, with one neuron in the input layer, five neurons in the hidden layer, and one neuron in the output layer. The input data is the duty cycle of the boost circuit, and the output is the predicted output power of the TEG array under the current duty cycle.


## 3.2. IPSO Search

The PSO algorithm is an effective method for global optimization of multiple extreme point functions, where the population intelligence generated by cooperation and competition among the particles in the population guides the optimization search. At the (k+1)-th iteration, the update process of each particle’s flight velocity vik+1 and flight position xik+1 can be expressed by Eq. (10) and Eq. (11), respectively, as [25],
(10)vik+1=wvik+c1r1pik−xik+c2r2pgk−xik,(11)xik+1=xik+vik+1,where w is the inertia weight, C1 and C2 are the self-learning factor and social learning factor, respectively; r1 and r2 are random numbers on [0, 1], i is the particle order, k is the number of iterations, pik is the individual optimal value of the ith particle at the kth iteration, pgk is the global optimal value at the kth iteration.For the maximum optimization problem in function optimization, if the value of the fitness functionfxi is larger, the fitness value is better, so the update process for the individual optimal value Pi and the global optimal value Pg can be calculated, respectively, as
(12)pik+1=pik,fxik+1≤fpik,xik+1,fxik+1>fpik,(13)pgk+1=pik+1,fpik+1≥fpgk,pgk,fpik+1<fpgk.The selection of parametersw, C1, and C2 has a significant influence on the iterative process of the algorithm. The inertia weight w determines the inheritance of particle flight velocity. If w is set too small, it is easy to fall into the local optimum; if set too large, it is difficult to guarantee the convergence speed in the later stage. The learning factors C1 and C2 determine the speed at which the particle moves to the individual optimal position and the global optimal position, respectively. To improve the adaptability of the PSO algorithm, an improved PSO algorithm is designed. The method introduces dynamic learning factors and weight coefficients in the iterative process to improve the speed and accuracy of algorithm convergence.In the initial stage of the algorithm, a larger inertia weight, a self-learning factor, and a smaller social learning factor are set to improve the global search ability, so that the algorithm is not easy to fall into local optimization. In the later stage, it updates with the number of iterations and sets smaller inertia weight, self-learning factor, and larger social learning factor, which improves the local search ability of the algorithm and makes the system converge faster. The process of dynamic adjustment of parameters is expressed in Eq. (14)–(16).
(14)w=wmax−wmax−wminkN,(15)c1=c1max−c1max−c1minkN,(16)c2=c2max+c2max−c2minkN,where N is the maximum number of iterations and c1max, c1min, c2max, c2min, wmax, and wmin are the maximum and minimum values of c1, c2, and w in the iteration process, respectively.


## 4. MPPT Design of BP-IPSO Algorithm

### 4.1. Control Framework

The MPPT control structure of the centralized TEG system based on BP-IPSO under NTD is shown in Figure6. The combination of the power prediction model fitted by BPNN and IPSO search is applied to the MPPT control of the centralized TEG system. The essence is the fitting and searching of the nonlinear relationship between the system control input and power output. The basic idea of this composite MPPT control algorithm is as follows.Figure 6
Framework of BP-IPSO based MPPT for centralized TEG system.Firstly, the duty cycle of the initial training samples is output in turn, and the output voltage and current data of the TEG array are collected for neural network pretraining. Secondly, the IPSO performs three iterative searches for the I/O curve fitted by the BPNN and sequentially collects the optimal duty cycle obtained by the three searches and supplements it to the training samples so as to improve the accuracy of the BPNN in fitting the I/O curve near the maximum power point. Finally, the new training samples are used to fit the I/O curve again, and the IPSO search is guided by fitting the I/O curve to realize MPPT. When the external environment changes, the algorithm restarts.


### 4.2. Power Prediction Model Establishment

The structure of the BPNN power prediction model designed in this paper for MPPT of centralized TEG system is shown in Figure6. The establishment process of the power prediction model is as follows:
(1)
Within the duty cycle variation range of DC/DC converter [0.95], ten groups of data are uniformly selected as the duty cycle of the initial training samples, and the TEG array output voltage and current data are collected in turn. The output power of the TEG array is normalized and used for neural network pretraining.(2)
Determine the prediction error function of the BP neural network, that is, the error between the expected output and the actual output. The target error of training is set to 0.001. The prediction error function can be expressed as(17)E=1N∑i=1NYi−Y∧i2,where N is the number of samples in the training set, Yi is the actual value of output power of the ith sample, and Y^i is the predicted value of output power of the ith sample.
(3)
Start training the neural network, and the maximum number of training times for the network is set to 100. By evaluating the error function and updating the connection weights, the output value of the network is continuously approached to the desired output until it reaches the predetermined error accuracy.


### 4.3. GMPP Search

(1)
Initial Parameters Setting. Based on the MPPT control algorithm of BP-IPSO, each particle position xi in IPSO is defined as the duty cycle of boost converter, and the fitness value is the output power value of the TEG array predicted by BPNN under the given duty cycle and achieves MPPT by multiple iterative searches.The number of particles is set to 4. Since the variation range of each particle is [0 0.95], the initial position is 0.1, 0.3, 0.6, 0.95, the maximum speedvmax is 0.3, and the maximum number of iterations is 10. The learning factor values are c1max=1.5, c1min=1, c2max=2, and c2min=1.4, and the weight coefficient values are wmax=0.7 and wmin=0.25.
(2)
Termination Strategy. Since repeated iterations will bring long-term power fluctuations, in order to stabilize the power to the maximum power point as soon as possible and reduce the power oscillation when the system approaches a steady state, the termination strategy adopted in this paper is as follows. When the maximum distance between the particle positions is less than 0.1 or the maximum number of iterations is reached, the system considers that the GMPP has been found at this time, stops the iteration, and completes the convergence.(3)
Algorithm Restart Conditions. When the temperature of the cold and hot source changes, the output power of the TEG array also changes, and thus the BP-IPSO algorithm needs to be restarted to make the system work stably at the new maximum power point. The power variation ΔP can be expressed as(18)ΔP=Pnow−PlastPlast,where Pnow is the output power value of the TEG array at the current sampling time and Plast is the output power value of the TEG array at the last sampling time. When ΔP>4%, restart the algorithm.The trained neural network is used in the MPPT control of the TEG array to predict the power output value of the TEG array under different duty cycle inputs, combined with IPSO search, and finally realize the tracking of the maximum power point. The overall execution procedure of the MPPT control algorithm based on BP-IPSO is demonstrated in Procedure1.Procedure 1: The execution procedure of BP-IPSO for MPPT of TEG system.
1. Initialize the training samples and the parameters of each particle;2. Initialize the power prediction model structure by Eq. (7)–(9);3.FORi=1 to 10.4.  Input the duty cycle of theith training sample into the boost converter;5.  Collect the real-time voltage and current signals of the TEG array, and calculate the output power;6.END FOR.7. Train the BPNN to fit the control input-power output (I/O) curve using Eq. (17) as the objective function;8.FORk=1 to 3.9.  Perform thekth IPSO search on the I/O curve, and update each particle flight position and the global optimal value by Eq. (10)–(13);10.  Input the global optimal value obtained by IPSOkth search into the boost converter;11.  Collect the real-time voltage and current signals of the TEG array, and calculate the output power;12.  Add new training samples to the neural network;13.END FOR.14. Use the new training samples to train the BPNN again and fit the I/O curve;15. Perform IPSO search on the I/O curve and output the optimal duty cycle;16. When the TEG array output power variationΔP>4%, the algorithm restarts.


## 4.1. Control Framework

The MPPT control structure of the centralized TEG system based on BP-IPSO under NTD is shown in Figure6. The combination of the power prediction model fitted by BPNN and IPSO search is applied to the MPPT control of the centralized TEG system. The essence is the fitting and searching of the nonlinear relationship between the system control input and power output. The basic idea of this composite MPPT control algorithm is as follows.Figure 6
Framework of BP-IPSO based MPPT for centralized TEG system.Firstly, the duty cycle of the initial training samples is output in turn, and the output voltage and current data of the TEG array are collected for neural network pretraining. Secondly, the IPSO performs three iterative searches for the I/O curve fitted by the BPNN and sequentially collects the optimal duty cycle obtained by the three searches and supplements it to the training samples so as to improve the accuracy of the BPNN in fitting the I/O curve near the maximum power point. Finally, the new training samples are used to fit the I/O curve again, and the IPSO search is guided by fitting the I/O curve to realize MPPT. When the external environment changes, the algorithm restarts.


## 4.2. Power Prediction Model Establishment

The structure of the BPNN power prediction model designed in this paper for MPPT of centralized TEG system is shown in Figure6. The establishment process of the power prediction model is as follows:
(1)
Within the duty cycle variation range of DC/DC converter [0.95], ten groups of data are uniformly selected as the duty cycle of the initial training samples, and the TEG array output voltage and current data are collected in turn. The output power of the TEG array is normalized and used for neural network pretraining.(2)
Determine the prediction error function of the BP neural network, that is, the error between the expected output and the actual output. The target error of training is set to 0.001. The prediction error function can be expressed as(17)E=1N∑i=1NYi−Y∧i2,where N is the number of samples in the training set, Yi is the actual value of output power of the ith sample, and Y^i is the predicted value of output power of the ith sample.
(3)
Start training the neural network, and the maximum number of training times for the network is set to 100. By evaluating the error function and updating the connection weights, the output value of the network is continuously approached to the desired output until it reaches the predetermined error accuracy.


## 4.3. GMPP Search

(1)
Initial Parameters Setting. Based on the MPPT control algorithm of BP-IPSO, each particle position xi in IPSO is defined as the duty cycle of boost converter, and the fitness value is the output power value of the TEG array predicted by BPNN under the given duty cycle and achieves MPPT by multiple iterative searches.The number of particles is set to 4. Since the variation range of each particle is [0 0.95], the initial position is 0.1, 0.3, 0.6, 0.95, the maximum speedvmax is 0.3, and the maximum number of iterations is 10. The learning factor values are c1max=1.5, c1min=1, c2max=2, and c2min=1.4, and the weight coefficient values are wmax=0.7 and wmin=0.25.
(2)
Termination Strategy. Since repeated iterations will bring long-term power fluctuations, in order to stabilize the power to the maximum power point as soon as possible and reduce the power oscillation when the system approaches a steady state, the termination strategy adopted in this paper is as follows. When the maximum distance between the particle positions is less than 0.1 or the maximum number of iterations is reached, the system considers that the GMPP has been found at this time, stops the iteration, and completes the convergence.(3)
Algorithm Restart Conditions. When the temperature of the cold and hot source changes, the output power of the TEG array also changes, and thus the BP-IPSO algorithm needs to be restarted to make the system work stably at the new maximum power point. The power variation ΔP can be expressed as(18)ΔP=Pnow−PlastPlast,where Pnow is the output power value of the TEG array at the current sampling time and Plast is the output power value of the TEG array at the last sampling time. When ΔP>4%, restart the algorithm.The trained neural network is used in the MPPT control of the TEG array to predict the power output value of the TEG array under different duty cycle inputs, combined with IPSO search, and finally realize the tracking of the maximum power point. The overall execution procedure of the MPPT control algorithm based on BP-IPSO is demonstrated in Procedure1.Procedure 1: The execution procedure of BP-IPSO for MPPT of TEG system.
1. Initialize the training samples and the parameters of each particle;2. Initialize the power prediction model structure by Eq. (7)–(9);3.FORi=1 to 10.4.  Input the duty cycle of theith training sample into the boost converter;5.  Collect the real-time voltage and current signals of the TEG array, and calculate the output power;6.END FOR.7. Train the BPNN to fit the control input-power output (I/O) curve using Eq. (17) as the objective function;8.FORk=1 to 3.9.  Perform thekth IPSO search on the I/O curve, and update each particle flight position and the global optimal value by Eq. (10)–(13);10.  Input the global optimal value obtained by IPSOkth search into the boost converter;11.  Collect the real-time voltage and current signals of the TEG array, and calculate the output power;12.  Add new training samples to the neural network;13.END FOR.14. Use the new training samples to train the BPNN again and fit the I/O curve;15. Perform IPSO search on the I/O curve and output the optimal duty cycle;16. When the TEG array output power variationΔP>4%, the algorithm restarts.


## 5. Simulation Analysis

In order to verify the MPPT performance of BP-IPSO, this section compares it with P&O, PSO, and GWO in three cases, namely, start-up test, step variation of temperature, and accuracy analysis. Since the parameter values will affect the performance of the algorithm, in order to ensure a fair comparison, the common parameters for different heuristic algorithms are set to the same.The population numbers of PSO and GWO are both set to 4, and the initial positions are 0.1, 0.3, 0.6, and 0.95, respectively; the maximum number of iterations is 10, and the control period is 0.02 s; the convergence condition is that the maximum distance between population individuals is less than 0.1 or the maximum number of iterations is reached. In addition, the P&O parameters are set: fixed step size is 0.005, and control period is 0.02 s; PSO parameters are set:w=0.7, C1=1.5, and C2=1.5.


### 5.1. Start-up Test

This experiment tests the MPPT performance of BP-IPSO when the centralized TEG system starts at zero point under NTD conditions. The strings 1-8 in the TEG array are divided into four groups, and the cold side temperatures of the four groups are set to 50°C, 50°C, 50°C, and 30°C; the hot side temperatures are set to 290°C, 145°C, 96°C, and 75°C, respectively. Figure7 shows the MPPT performance of the four methods under the start-up test. Table 2 presents a quantitative comparison of the tracking results of the four methods.Figure 7
MPPT performance of four methods in start-up test. (a) Current; (b) voltage; (c) power; (d) energy.
(a)(b)(c)(d)Table 2
Quantitative comparison of start-up test results.
MethodTracking time (s)GMPP (W)Achieved power (W)Accuracy (%)Energy (W.s)P&O0.4097.5685.4087.54123.93PSO0.5897.5697.5199.95135.53GWO0.6497.5697.5399.97133.50BP-IPSO0.2697.5697.5499.98139.84From Figure7(c)–7(d), it can be seen that the MPPT with the P&O algorithm cannot distinguish between GMPP and LMPP, resulting in the lowest output power and the least energy obtained, although the power oscillation during the tracking process is the smallest. Except for P&O, the other three algorithms have global search ability and can get more energy. According to Table 2, compared with PSO and GWO, since BP-IPSO uses the I/O curve fitted by the BPNN to replace the actual circuit model for search, the data sampling time in the search process of the algorithm is shortened and completes the tracing process in 0.26 s, which significantly improves the convergence rate. In addition, the energy output obtained by BP-IPSO is the highest among the four methods, which are 112.84%, 103.18%, and 104.75% of P&O, PSO, and GWO, respectively. Therefore, BP-IPSO can converge to the highest quality GMPP with faster speed and less power oscillation and with good start-up performance.


### 5.2. Step Variation of Temperature

In the actual operation of the TEG system, the temperature of the cold and hot sources often changes, so the adopted MPPT algorithm must be able to track accurately when the temperature changes abruptly. In order to test the effectiveness of the MPPT algorithm under step temperature change, this experiment divided string1 to 8 into four groups according to the TEG array structure in Figure3, each group consists of two strings and is under the same temperature environment. After that, four groups of continuous step temperature changes are set for the TEG array in this experiment, and the temperature change curves of the cold side and hot side are shown in Figure 8(a) and Figure 8(b), respectively.Figure 8
Step change of temperature of TEG system under NTD condition. (a) Cold side; (b) hot side.
(a)(b)The MPPT performance comparison of the four methods under the above conditions is shown in Figure9. Table 3 shows the quantitative comparison of the tracking results of the four methods under step temperature variation. It can be seen that P&O has the smallest power oscillation but easily falls into the low quality LMPP. PSO and GWO are prone to generate large power oscillations during the tracking process and need a longer convergence time to approach GMPP. In particular, when the second temperature step change occurs, GWO cannot accurately identify GMPP and LMPP and falls into LMPP together with P&O, as shown in Figure 9(c). In contrast, BP-IPSO can quickly approach high-quality GMPP in step temperature variation. This indicates that the global search ability of the BP-IPSO is higher than that of the metaheuristic algorithm, and the GMPP can also be accurately tracked when the temperature changes abruptly.Figure 9
MPPT performance of four methods in temperature step change test. (a) Current; (b) voltage; (c) power; (d) energy.
(a)(b)(c)(d)Table 3
Quantitative comparison of temperature step change test results.
MethodAvg. tracking time (s)Avg. GMPP (W)Avg. achieved power (W)Avg. accuracy (%)Energy (W.s)P&O0.40131.46121.9392.75706.92PSO0.75131.46131.3099.88711.48GWO0.50131.46128.6897.89706.32BP-IPSO0.26131.46131.3399.90743.34


### 5.3. Accuracy Analysis

To further analyze the GMPP tracking accuracy of the four methods under different temperature inputs, the system was tested with a series of different temperature ratios imposed by [0,100%]. The temperature ratio change interval is set to 5%, and the rated temperatures of the cold side were set to 50°C, 50°C, 40°C, and 50°C, respectively; the temperatures of the hot side were set to 295°C, 190°C, 98°C, and 115°C, respectively. Under the experimental conditions of different temperature ratios, the power tracking results of each method are shown in Figure10.Figure 10
Power tracking results of each method under different temperature ratios.RMSE, MAE, and MAPE are used as error evaluation indexes to quantitatively analyze the tracking accuracy, and the calculation formula is as follows. The calculation results of the error evaluation indexes of each method are shown in Table4.
(19)RMSE=1n∑i=1nPGMPP−PTrack2,MAE=1n∑i=1nPGMPP−PTrack,MAPE=1n∑i=1nPGMPP−PTrackPGMPP×100%,where n is the number of samples, PGMPP is the global maximum power, and PTrack is the output power of the TEG system after the MPPT algorithm is tracked.Table 4
Error evaluation index calculation results.
MethodRMSEMAEMAPEP&O3.71892.49380.0288PSO2.17731.23170.0208GWO1.94450.97910.0125BP-IPSO0.50710.26780.0060From Figure10, it can be obtained that as the temperature ratio increases, the power tracked by each algorithm generally increases accordingly. PSO falls into LMPP when the temperature ratios are 75%, 85%, and 95%, and GWO falls into LMPP when the temperature ratios are 90% and 95%. As depicted in Table 4, BP-IPSO achieves the minimum value in three error evaluation indexes, which proves that BP-IPSO has a certain improvement in tracking accuracy and higher convergence stability than the comparison algorithm. According to Table 4 and Figure 10, it can be seen that the performance of BP-IPSO proposed in this paper is better than the other three comparison algorithms, which can ensure greater power output and higher convergence stability under different temperature ratios.


## 5.1. Start-up Test

This experiment tests the MPPT performance of BP-IPSO when the centralized TEG system starts at zero point under NTD conditions. The strings 1-8 in the TEG array are divided into four groups, and the cold side temperatures of the four groups are set to 50°C, 50°C, 50°C, and 30°C; the hot side temperatures are set to 290°C, 145°C, 96°C, and 75°C, respectively. Figure7 shows the MPPT performance of the four methods under the start-up test. Table 2 presents a quantitative comparison of the tracking results of the four methods.Figure 7
MPPT performance of four methods in start-up test. (a) Current; (b) voltage; (c) power; (d) energy.
(a)(b)(c)(d)Table 2
Quantitative comparison of start-up test results.
MethodTracking time (s)GMPP (W)Achieved power (W)Accuracy (%)Energy (W.s)P&O0.4097.5685.4087.54123.93PSO0.5897.5697.5199.95135.53GWO0.6497.5697.5399.97133.50BP-IPSO0.2697.5697.5499.98139.84From Figure7(c)–7(d), it can be seen that the MPPT with the P&O algorithm cannot distinguish between GMPP and LMPP, resulting in the lowest output power and the least energy obtained, although the power oscillation during the tracking process is the smallest. Except for P&O, the other three algorithms have global search ability and can get more energy. According to Table 2, compared with PSO and GWO, since BP-IPSO uses the I/O curve fitted by the BPNN to replace the actual circuit model for search, the data sampling time in the search process of the algorithm is shortened and completes the tracing process in 0.26 s, which significantly improves the convergence rate. In addition, the energy output obtained by BP-IPSO is the highest among the four methods, which are 112.84%, 103.18%, and 104.75% of P&O, PSO, and GWO, respectively. Therefore, BP-IPSO can converge to the highest quality GMPP with faster speed and less power oscillation and with good start-up performance.


## 5.2. Step Variation of Temperature

In the actual operation of the TEG system, the temperature of the cold and hot sources often changes, so the adopted MPPT algorithm must be able to track accurately when the temperature changes abruptly. In order to test the effectiveness of the MPPT algorithm under step temperature change, this experiment divided string1 to 8 into four groups according to the TEG array structure in Figure3, each group consists of two strings and is under the same temperature environment. After that, four groups of continuous step temperature changes are set for the TEG array in this experiment, and the temperature change curves of the cold side and hot side are shown in Figure 8(a) and Figure 8(b), respectively.Figure 8
Step change of temperature of TEG system under NTD condition. (a) Cold side; (b) hot side.
(a)(b)The MPPT performance comparison of the four methods under the above conditions is shown in Figure9. Table 3 shows the quantitative comparison of the tracking results of the four methods under step temperature variation. It can be seen that P&O has the smallest power oscillation but easily falls into the low quality LMPP. PSO and GWO are prone to generate large power oscillations during the tracking process and need a longer convergence time to approach GMPP. In particular, when the second temperature step change occurs, GWO cannot accurately identify GMPP and LMPP and falls into LMPP together with P&O, as shown in Figure 9(c). In contrast, BP-IPSO can quickly approach high-quality GMPP in step temperature variation. This indicates that the global search ability of the BP-IPSO is higher than that of the metaheuristic algorithm, and the GMPP can also be accurately tracked when the temperature changes abruptly.Figure 9
MPPT performance of four methods in temperature step change test. (a) Current; (b) voltage; (c) power; (d) energy.
(a)(b)(c)(d)Table 3
Quantitative comparison of temperature step change test results.
MethodAvg. tracking time (s)Avg. GMPP (W)Avg. achieved power (W)Avg. accuracy (%)Energy (W.s)P&O0.40131.46121.9392.75706.92PSO0.75131.46131.3099.88711.48GWO0.50131.46128.6897.89706.32BP-IPSO0.26131.46131.3399.90743.34


## 5.3. Accuracy Analysis

To further analyze the GMPP tracking accuracy of the four methods under different temperature inputs, the system was tested with a series of different temperature ratios imposed by [0,100%]. The temperature ratio change interval is set to 5%, and the rated temperatures of the cold side were set to 50°C, 50°C, 40°C, and 50°C, respectively; the temperatures of the hot side were set to 295°C, 190°C, 98°C, and 115°C, respectively. Under the experimental conditions of different temperature ratios, the power tracking results of each method are shown in Figure10.Figure 10
Power tracking results of each method under different temperature ratios.RMSE, MAE, and MAPE are used as error evaluation indexes to quantitatively analyze the tracking accuracy, and the calculation formula is as follows. The calculation results of the error evaluation indexes of each method are shown in Table4.
(19)RMSE=1n∑i=1nPGMPP−PTrack2,MAE=1n∑i=1nPGMPP−PTrack,MAPE=1n∑i=1nPGMPP−PTrackPGMPP×100%,where n is the number of samples, PGMPP is the global maximum power, and PTrack is the output power of the TEG system after the MPPT algorithm is tracked.Table 4
Error evaluation index calculation results.
MethodRMSEMAEMAPEP&O3.71892.49380.0288PSO2.17731.23170.0208GWO1.94450.97910.0125BP-IPSO0.50710.26780.0060From Figure10, it can be obtained that as the temperature ratio increases, the power tracked by each algorithm generally increases accordingly. PSO falls into LMPP when the temperature ratios are 75%, 85%, and 95%, and GWO falls into LMPP when the temperature ratios are 90% and 95%. As depicted in Table 4, BP-IPSO achieves the minimum value in three error evaluation indexes, which proves that BP-IPSO has a certain improvement in tracking accuracy and higher convergence stability than the comparison algorithm. According to Table 4 and Figure 10, it can be seen that the performance of BP-IPSO proposed in this paper is better than the other three comparison algorithms, which can ensure greater power output and higher convergence stability under different temperature ratios.


## 6. Conclusion

The P-V characteristic curve of the centralized TEG system under NTD condition exhibits multiple extreme point characteristics. In order to utilize the energy more efficiently, this paper designs a BP-IPSO algorithm based on BPNN and IPSO search and applies it to MPPT control. The main advantages are summarized as follows:(1)
Using the good nonlinear function fitting ability of BPNN, we can establish a neural network power prediction model by collecting multiple sets of TEG system control input and power output data, which can directly predict the TEG array power output value based on the system control input, avoiding the tedious analysis of the system internal mechanism(2)
The dynamic learning factors and weight coefficients are introduced into the traditional PSO algorithm, which has a stronger performance in global search and local exploitation. The accuracy analysis results show that BP-IPSO algorithm can effectively avoid falling into LMPP(3)
BP-IPSO algorithm uses the neural network power prediction model to replace the actual circuit for search. During the tracking process, there is no need to change the voltage or current value in the actual circuit many times so as to effectively reduce the voltage, current, and power oscillations and shorten the time of data sampling in the tracking process of the algorithm. The simulation results show that the tracking can be completed in 0.26 s, which significantly improves the energy efficiency and convergence speed



---

*Source: 9040639-2023-02-04.xml*