The microgrid system is the combination of photovoltaic(PV) array, load, and battery energy storage system. The control strategies were defined as multi-modes of operation, including rest operation without use of battery, power charging, and power discharging, which enables grid connected mode or islanded mode. Photovoltaic power is a problem of the uniformity of power quality because the power generated from solar light is very sensitive to variation of insolation and duration of sunshine. As a solution to the above problem, energy storage system(ESS) is considered generally. There fore, in this study, we did basic research activities about optimization method of the amount of energy used, using a smart microgrid test-bed constructed in building. First, we analyzed the daily, monthly and period energy pattern amount of power energy used, and analyzed PV power generation level which is built on the roof. Utilizing building energy pattern analysis data, we was studied an efficient method of employing the ESS about building power consumption pattern and PV generation.