 Both the piezoelectric and triboelectric nanogenerators can convert mechanical energy into electricity.However, pyroelectric nanogenerators can be used to harvest thermal energy from a time-dependent temperature fluctuation.