Smart grid is an innovative and novel technology successfully implemented by the use of different communication methods. Demand side management (DSM) plays a signi�cant role in the management of load and energy consumption in order to reduce cost in the smart grids. Smart buildings and smart homes are usually considered important for reducing the electricity consumption by home energy management controllers (HEMC). Within the research community, different optimization techniques have been designed for home energy management system (HEMS). In this work, the performance of few heuristic algorithms, i.e., genetic algorithm (GA), harmony search algorithm (HSA), enhanced differential evolution (EDE), tabu search (TS) and backtracking search optimization algorithm (BSOA) is evaluated for optimization in residential area. Also, an optimal power
flow (OPF) problem is formulated for economic operation of electrical system while
incorporating stochastic and intermittent nature of solar photovoltaic (PV) and wind generators. Proposed techniques are used for efficient scheduling of smart appliances in smart homes on the customer side as well as for the optimal setting of control variables on the supply side. Besides, minimization of power generation cost, concern on environment is also taken into account and reduction of carbon emission factor is included into the objective function. Simulations were performed in MATLAB by using real time pricing (RTP) tariff and IEEE standard bus test systems. Evaluated results proved that our de�ned goals of cost reduction, improvement of user comfort (UC) level and minimization of peak to average ratio (PAR) are achieved.