Thermal resonance under frequency excitations