# Design and Research of Thermoelectric Generator Simulation System for Boiler Flue Gas Waste Heat
## 5 MPPT Algorithm and Simulation of TEG System
### Design of MPPT Algorithm  
The MPPT algorithm currently used and their characteristics are as follows [34; 35; 36]: The constant voltage algorithm is simple and easy to implement, but it is easy to fluctuate due to the influence of external environmental factors, so it is not flexible enough to use. The conductivity increment algorithm has good stability, but its implementation requires high precision of sensor. At the same time, the continuous derivative calculation of the control system also requires a high computing ability. The disturbance observation algorithm has strong applicability, requires less measurement parameters, and has low requirements on controller and sensor, so it is regarded as an ideal control algorithm. However, the fixed disturbance step size has a great influence on the overall performance of the system, resulting in energy loss. The application of artificial intelligence algorithms in controlling TEG systems with variable temperature difference operating conditions has significant theoretical advantages. However, the complexity and cost of implementation currently limit its practical application. For the selection of MPPT algorithms [37; 38], in addition to the characteristics of each algorithm itself, we should also consider the difficulty of implementing the control algorithm, economic cost, the type of sensor, tracking speed and accuracy, etc. Based on the above analysis, the interference observation algorithm is selected in this paper. Since the traditional interference observation algorithm uses a fixed disturbance quantity, it cannot meet the dynamic performance and stability accuracy requirements of MPPT tracking at the same time. Based on this, an adaptive variable step size improved MPPT algorithm  
Figure 20: Maximum power output block diagram of TEG system. based on power prediction is designed. The algorithm takes power change as step size control quantity, the control schematic diagram is shown in Figure 21.  
According to the control schematic diagram: when \(\Delta\mathrm{P}=\mathrm{P}_{\mathrm{n}}-\mathrm{P}_{\mathrm{n}-1}=0\), it indicates that the output power reaches the maximum value; When \(\Delta\mathrm{P}=\mathrm{P}_{\mathrm{n}}-\mathrm{P}_{\mathrm{n}-1}>0\), the TEG module works on the left side of the maximum power point; When \(\Delta\mathrm{P}=\mathrm{P}_{\mathrm{n}}-\mathrm{P}_{\mathrm{n}-1}<0\), the TEG module works on the right side of the maximum power point. In the same disturbance interval of \(\Delta U\), when \(\Delta\mathrm{P}_{\mathrm{n}}\geq\Delta\mathrm{P}_{\mathrm{n}-1}\), the variation trend of the output power increases at this time and is far from the maximum power point, the method of large step search approximation is adopted, taking step \(\mathrm{C}_{1}=\frac{\Delta\mathrm{P}_{\mathrm{n}}+\Delta\mathrm{P}_{\mathrm{ n}-1}}{\Delta\mathrm{P}_{\mathrm{n}-1}}\mathrm{M}\geq 2\mathrm{M}\). when \(\Delta\mathrm{P}_{\mathrm{n}}<\Delta\mathrm{P}_{\mathrm{n}-1}\), the variation trend of the output power reduces at the time and is close to the maximum power point, the method of small step search approximation is adopted, taking step \(\mathrm{C}_{2}=\frac{\Delta\mathrm{P}_{\mathrm{n}-1}}{\Delta\mathrm{P}_{\mathrm{ n}}+\Delta\mathrm{P}_{\mathrm{n}-1}}\mathrm{M}\). The improved MPPT algorithm flow chart is shown in Figure 22.  
Then the value of \(\Delta P_{n}\times\Delta U\) is judged, and when its value is greater than 0, the value of \(\mathrm{U}_{n}\) is equal to \(\mathrm{U}_{n-1}+\mathrm{C}\). Otherwise, judge whether \(\Delta P_{n}\times\Delta U\) is equal to zero, if so, \(\mathrm{U}_{n}\) is equal to the value of \(\mathrm{U}_{n-1}\). If not, the value of \(\mathrm{U}_{n}\) is equal to \(\mathrm{U}_{n-1}\)-\(\mathrm{C}\). Therefore, at the working point far from the maximum power point, a large step size is adopted to improve the tracking speed and optimize the dynamic performance. At the  
Figure 21: Control schematic diagram of improved algorithm. Figure 22: Flow chart of improved MPPT algorithm.