Towards a framework of enabling efficient and secured energy based cyber-physical system (CPS)