## 1 Introduction  
Drilling is a technology that utilizes specialized drilling tools to bore holes from the surface to the subsurface. It is a crucial technique for the exploration and development of petroleum, natural gas, and solid mineral resources [1, 2]. During drilling, the complex and variable nature of borehole trajectories leads to significant energy loss due to friction between the drill string and borehole wall, resulting in insufficient power transfer from the surface rig to the bottomhole assembly. To address this issue, bottomhole power drilling tools are commonly employed in field operations. A bottomhole power drilling tool is an axial-flow hydraulic motor installed at the bottom of the borehole that utilizes the flow of drilling fluid to drive its rotation, thereby providing continuous rock-breaking power to the bottomhole [3, 4]. The rotational speed of the bottomhole power drilling tools during drilling provides feedback on bottomhole assembly malfunctions and borehole trajectory anomalies [5]. Drilling engineers rely on real-time monitoring of a bottomhole power drilling tool's rotational speed to adjust drilling parameters; therefore, real-time measurement is essential.  
Numerous surface-based rotational speed measurement methods exist, categorized by principle into eddy current [6], magneto-resistive [7], laser [8], and capacitive types [9]. However, these sensors require an external power source, typically a battery or an external cable. For downhole applications, cable-powered systems necessitate passing the cable through the hollow drill string, significantly reducing operational efficiency. Battery-powered systems, on the other hand, require retrieving the entire drill string to the surface for battery replacement when the downhole sensor battery is depleted. This is particularly problematic in deep wells (several kilometers), where retrieval and battery replacement can take one to two days, considerably increasing drilling costs. Therefore, a self-powered downhole sensor would effectively mitigate the shortcomings of conventional power supply methods and significantly enhance drilling efficiency.  
Triboelectric nanogenerators (TENGs) offer a novel approach to addressing these challenges. First proposed in 2012 [10], it can be divided into four types, contact-separation mode, lateral-sliding mode, single-electrode mode, and freestanding mode [11]. TENGs based on the triboelectric effect and electrostatic induction have found widespread applications in energy harvesting [12; 13] and self-powered sensing [14; 15]. Energy harvesting research using TENGs encompasses diverse energy sources, including kinetic energy [16; 17], wave energy [18], wind energy [19; 20; 21], two-phase flow energy [22], rain energy [23], vibrational energy [24; 25; 26], and rotational energy [27]. Equally prolific is the development of self-powered sensors, with researchers demonstrating strain sensors [28], gas sensors [28; 29; 30], seismic sensors [31], fluid sensors [32], environmental sensors [33], humidity sensors [34; 35], rain sensors [36], biomechanical sensors [37], and vibration sensors [38; 39; 40]. The application of TENGs solves the problem of inefficient utilization of small-scale energy in the environment while enabling traditional sensors to break free from dependence on external power sources, thereby enhancing the flexibility of sensor application scenarios.  
These findings demonstrate the significant advantages of TENGs in both energy generation and sensing applications, particularly in the development of self-powered sensors, where their scope is continuously expanding. Therefore, this study presents a multifunctional self-powered downhole rotary speed sensor for drilling tools, based on a TENG, capable of simultaneously measuring both the rotational speed and angle of the drill string. This provides crucial data for assessing downhole conditions and dynamically adjusting drilling parameters.