A novel hardware-software strategy for thermal chamber temperature control and PV energy optimization