A functional approach for studying technological progress: Extension to energy technology