The tremendous development of portable electronics makes it an urgent demand for sustainable energy sources. Recently, triboelectric nanogenerators (TENGs) have shown unique merits including large output power, high efficiency, and cost effective materials. Sliding-mode TENG structure based on in-plane charge separation are the most promising design, especially because grating structure can be integrated into it. Maximizing the energy output is always designersï¿½ only target. However, the inherent complexity in the physics of sliding-mode TENGs and their mismatch with other downstream energy storage and load components greatly limit their power output, which require thorough fundamental understanding and careful optimization of the TENG system. However, this system couples the complex effect of both electrostatics and circuit theory. There is neither previous theoretical understanding nor numerical models to deal with that. To address this issue, we proposed the first governing equation and equivalent circuit model for TENGs, leading to the demonstration of the first TENG simulation tool, in which the coupling simulation of both electrostatic and circuit part is realized for the first time. Utilizing this tool, we clearly uncover the output characteristics of sliding-mode TENGs to maximize their power output. Sliding-mode TENGs without grating structures are first studied to unveil their fundamental physics and verification of our method. We derive their first analytical model and resistive load characteristics. The ï¿½three-working-regionï¿½ behavior is interpreted with the impedance match mechanism. A corresponding experiment is then performed as validation of theory, which shows good agreement with theoretical anticipation. Next, we move to grating TENGs with multiple sliding units. To optimize the energy output, we perform an in-depth discussion on the influence of electrode structure, thickness of the dielectric layers, and number of grating units. As for the electrode structure, grating electrodes always lead to a better performance than plate electrodes. As for the dielectric thickness, the thickness of the dielectric of the longer plate should be much smaller than that of the shorter plate. As for the most important parameters of grating TENGsï¿½the number of grating units, our calculation clearly indicates that increasing the number of grating units will generally improve the output performance. However, when the pitch is very fine, the edge effect begins to dominate, resulting in degradation of performance when the number of units continues to increase. Thus, there exists an optimum number of grating units and an optimum unit aspect ratio that mainly depends on the materials dielectric constant and the motion type. The optimization strategy provided here can serve as guidance of experiments towards practical application. Reference 1. S. Niu, Z. L. Wang et al Adv. Mater. 25, 6184. 2. S. Niu, Z. L. Wang et al Energy Environ. Sci. 7, 2339.