###### Abstract  
Even renewable energy sources provide several advantages, especially from an environmental point of view, where the world has faced great challenges in the last few decades; several negative issues also exist regarding the integration of renewable resources-based power production units in electric power systems. One of the main problems related to pivotal renewable energy resources such as solar, wind, etc., is their stochastic and uncontrollable nature in terms of power production. Therefore, this stochasticity in the supply side of the power system may pose many challenges for system operators. This issue is also problematic for smaller applications where the stochastic production by a main resource, such as a roof-top photovoltaic system, and load demand may not match perfectly at each time instant and therefore should be compensated by additional resources such as battery-based energy storage systems. Herein, the economic considerations to ensure minimum costs for such a hybrid system design are vital so as to increase the penetration of such systems. Therefore, the optimal sizing and planning of hybrid systems have recently gained increasing importance to enhance power system operation in the context of the smart grid paradigm. From a different perspective, harmonics are one of the most important power quality problems in system operations caused by widespread integration of power electronic loads with non-linear characteristics that should be considered. Thus, a new approach for grid-connected hybrid renewable energy system sizing is provided. In order to determine optimal capacities for photovoltaic (PV) and energy storage system (ESS) units for covering residential consumer demand, a mixed integer linear programming (MILP)-based formulation is presented. The main objective is minimizing total costs of the system consisting of investment, capital and maintenance cost functions. A daily power curve is created accurately with real measurements of non-linear loads considering harmonic contents of smart home appliances in Yildiz Technical University, Istanbul, Turkey. In addition, real radiation and temperature values are used in PV production as well as dynamic pricing schemes for realistic evaluations. Moreover, optimal sizing results are compared for both the harmonic-based power curve and rated power curve in terms of satisfying objective function. harmonics; hybrid system; optimal sizing; power quality; smart grid +
Footnote †: journal: Applied Softconsequence, power-electronic-based electrical equipments have started to be utilized more widely on the demand side [2]. The great achievements of semiconductor technology have captured the electronic industry and dominated the market of household appliances. However, all these paved the way for rising concerns about power quality issues in the distribution system due to the non-linear voltage-current characteristics of these appliances [3]. Therefore, it would not be wrong to mark that utility engineers will encounter harmonic problems more than in the past considering this widespread integration. Several domestic loads such as TV, laptop, printer, computer, light-emitting diodes (LEDs), washing machine, dishwasher, etc., have substantial impacts on the harmonic distortion level in the residential scale [4]. In order to quantify the potential effect on power system operation, the index of total harmonic distortion (THD) is defined as \"The ratio of the rms of the high order harmonic components to the rms value of the fundamental quantity, represented as a percentage of the fundamental\" [5; 6]. According to the Institute of Electrical and Electronics Engineers (IEEE) 519-2014 [7], the voltage THD should be less than or equal to a 5% limit in the point of common coupling measurements from 120 V to 69 kV. Therefore, the harmonic contents of residential loads have to be monitored with digital technology thanks to the smart grid paradigm, and power quality requirements should be controlled in terms of satisfying the standards or not.