Novel power management for nanogrids is presented. In this thesis, the effect of resident location in residence is taken into account for the evaluation of power consumption in nanogrids. Depending on the resident location, operating conditions of the heater, ventilation fan, and air-conditioner are adjusted. Electric appliances that allow delayed use, i.e., shiftable, are scheduled for efficient power management. Considering the massive deployment of energy storage system (ESS) as a supplementary power source, the effect of the ESS on power management is investigated. Renewable power such as photovoltaic (PV) power is important for the cost-efficient operation of grid-connected DC nanogrids. Renewable power can be primarily used prior to grid power to reduce electricity costs. Therefore, the utilization of renewable power fundamentally determines the overall cost efficiency of the nanogrid operation. On the other hand, the popularization of electric vehicles (EVs) that can act as ESS s or power consuming appliances accelerates the paradigm shift of nanogrid power management. The demand response program for reduced electricity cost is also considered for power management. As a result, an objective consisting of power consumed by non-shiftable and shiftable electric appliances, power supplied/consumed by the ESS during discharging/charging, and time-varying electricity cost is formulated. Another objective for power management is a function of delays in scheduling of shiftable electric appliances. Variation of resident location combined with temporal use of electric appliances according to the resident location is considered as the resident behavior and incorporated into these two objectives. Using these two objectives, a multi-objective optimization is performed for nanogrids at each time interval. It is demonstrated by simulations that leveraging resident behavior is beneficial for the power management of nanogrids. To achieve this goal, a long short-term memory (LSTM) network is used as the controller. In addition, the effects of the number of residents in each apartment and combined activity of each resident on the power management are presented with related simulation results.