A PSO-Optimized Fuzzy Logic Control-Based Charging Method for Individual Household Battery Storage Systems within a Community

Self-consumption of household photovoltaic (PV) storage systems has become profitable for residential owners under the trends of limited feed-in power and decreasing PV feed-in tariffs. For individual PV-storage systems, the challenge mainly lies in managing surplus generation of battery and grid power flow, ideally without relying on error-prone forecasts for both generation and consumption. Considering the large variation in power profiles of different houses in a neighborhood, the strategy is also supposed to be beneficial and applicable for the entire community. In this study, an adaptable battery charging control strategy is designed in order to obtain minimum costs for houses without any meteorological or load forecasts. Based on fuzzy logic control (FLC), battery state-of-charge (SOC) and the variation of SOC (∆SOC) are taken as input variables to dynamically determine output charging power with minimum costs. The proposed FLC-based algorithm benefits from the charging battery as much as possible during the daytime, and meanwhile properly preserves the capacity at midday when there is high possibility of curtailment loss. In addition, due to distinct power profiles in each individual house, input membership functions of FLC are improved by particle swarm optimization (PSO) to achieve better overall performance. A neighborhood with 74 houses in Germany is set up as a scenario for comparison to prior studies. Without forecasts of generation and consumption power, the proposed method leads to minimum costs in 98.6% of houses in the community, and attains the lowest average expenses for a single house each year.


Introduction
Renewable energy is regarded as a key form of energy production for a sustainable and environmentally friendly future.Many initiatives have been taken to promote the development of renewable energy sources.Among them, the solar energy system is a mature and effective application.As the investment costs of the photovoltaic (PV) system have fallen and the methods for producing electricity have evolved, it has become more attractive for people to participate in the installation of PV generation systems [1].However, the up-to-date incentives and regulations have changed the favorable configurations and operations for household photovoltaic (PV) storage systems [2].As the feed-in tariff decreases, it becomes harder and harder to cover the levelized cost of solar power with the profits from feed-in [3].Meanwhile, rising retail energy prices and the lower remuneration have made satisfying local consumption with local household generation more profitable [4].Since solar power is highly dependent on weather conditions, robust, highly efficient battery storage systems are commonly equipped so that residences can compensate for the fluctuating solar power.With the battery storage system (BSS), the residential customer can preserve solar power for later use when there is no sunshine.The power losses can also be eliminated through a proper power dispatch strategy in the system [5].
The applications of battery storage systems cover a wide range systematic designs to fulfill different deployment demands [6,7].To make good use of battery storage systems, many studies have been performed to develop operation strategies [8][9][10][11][12][13][14][15][16][17][18].Key indicators, such as self-consumption ratio, self-supply ratio, peak voltage reduction ratio, and share of losses ratio were introduced in [8] to identify the features between different control algorithms.The evaluation criteria served as a good reference for the following investigation in this study.In [9], the needs for both the distribution system operators and the local power producer were clearly expressed so that the optimum battery charging power could be determined by dynamic programming (DP).With various charging goals firstly formulated as the objective functions, a multi-objective optimization was able to be achieved.The proposed DP algorithm was executed with discretized state of charge (SOC) values every 15 min so that all possible charging trajectories from the initial SOC at the beginning of the day to the end of the day were evaluated.At the end, the corresponding SOC sequence with the minimum value of the objective function would be regarded as the optimum battery charging curve.However, the solar power and load demand profiles were predicted in advance for the operation of the proposed DP algorithm.Likewise, the forecasts on weather condition or PV power and consumption load were also required for the control method in [10,11].Similar assumptions on the available periodic predictions of the demand and generation profiles can also be found in [12] where a robust economic model predictive controller (MPC) for a community microgrid was proposed.Despite effective and efficient control strategies, they were based on a certain degree of load and generation forecast.On the other hand, the integration of the computational intelligence and advanced control techniques has enhanced the applications of battery in a wide spectrum of aspects.For instance, to reduce operating costs, the parameters responsible for the charging and discharging control in the closed-loop controller were optimized by an evolutionary algorithm in [13].The same goal was also attained in [14] where an algorithm was proposed to determine the day-ahead scheduling and a fuzzy expert system was built to control the power output of the storage system.In favor of genetic algorithm (GA), the design of fuzzy controller was further optimized.To preserve battery cycle life, the authors of [15] designed a fuzzy controller to operate the battery energy storage system (BESS) within the desired SOC range, and the same goal was realized in [16] by taking energy rate-of-change in the microgrid and the battery SOC as inputs.Apart from different objectives, the fuzzy logic control (FLC)-based battery storage controller shows its superiority with less dependence on the error-prone forecast-based scheduling algorithm in [17] and high adaptability in [18].The advantages of computational intelligence, such as dealing with uncertainties and exploring optimum function in a high-dimensional problem, were put to good use in the abovementioned studies.However, it can also be observed that there are very limited studies tackling the control strategy problem on a community scale, and most of the previous studies focused on deployment or sizing of the battery storage system in a community.
Given the gap in the literature, an economical control algorithm applied for a 74-house community is proposed in this study.Unlike previous studies where the power dispatch strategy was designed and validated for a single house, the proposed control algorithm is designed to have adaptability to achieve minimum costs for houses without any meteorological or load forecasts.To achieve that, a control method based on FLC is firstly introduced.FLC is applicable for nonlinear, time-varying, and incomplete model systems and is simple to implement.The FLC-based approach also allows the designer to implement human heuristic knowledge to control complicated and time-varying plants like PV battery storage systems.Thus, a conventional FLC was used to determine the adequate charging power command in a previous study [19].Taking the SOC and the variation of SOC (∆SOC) as inputs and the charging ratio as output, the charging power is dynamically adjusted.However, the diversity of power profiles in the community means the conventional FLC charging method no longer provides an advantage in every single house.Considering the battery aging issues and different surplus power profiles, particle swarm optimization (PSO) is applied for the re-design of fuzzy membership functions (MFs).Further improvement is expected for the proposed optimized FLC-based charging method.The layout of the paper is as follows.In Section 2, the configurations of the system are described with modelling for system components as well as the financial settings.Next, the conventional FLC-based charging method is designed and then the optimization of input MFs by PSO is elaborated in Section 3. In Section 4, four reference methods from the literature are applied on the same simulation platform and the one-year operating costs for 74 houses are compared.A conclusion is given in the last section.

System Configuration
In this study, the focus is on control strategy for residential PV battery storage systems.To efficiently make use of solar power and economically apply battery storage system to save on expenses, a proper power control method is required.A neighborhood in Munich, Germany was set up as a scenario for strategy comparison.The financial remuneration and electricity tariff are derived from the incentive policies in Germany.The feed-in constraint is taken into account as well.In this section, the model of the residential PV battery storage system is provided for simulation and the power profiles are elaborated.

Load Consumption
We assume that there are 74 houses in the investigated community and each house installs the same capacity of solar power confined by the rooftop area given in Figure 1.Due to different energy-usage behaviors, individual load consumption profiles are distinct to each other.Based on the statistical data, the average 4-6 person household's consumption is between 4.3 and 4.75 MWh per year [20].In order to equally compare the cost needed by different control methods, the measured household energy consumption data from [21] is scaled to 4.5 MWh annually.In spite of the identical energy demand in every house, the load power profile patterns still differ from one another.In fact, it is difficult to categorize various load profiles and design a beneficial controller for all of them at once.Take an observation on surplus power data of 74 houses in the community.With basic static analysis as given in Figure 2, it is difficult to tell the characteristics of power profiles from different houses.Particularly, the high variation of ramp surplus power can be observed from the red outliers and the distinct distribution range of surplus power has increased the difficulty for the design of charging controller.

Solar Power Generation
The power generation data is acquired from rooftop PV panels with one-second resolution [22].The identical solar power data profile is applied in 74 houses.The efficiency of the power electronics devices applied in the system is estimated by Equation (1) with m = 0.0345 and n = 0.0072, which matches the high efficiency inverters [23].Motivated by [23], the peak PV power is scaled to 4.4 kWp with 4017 kWh of power generated per year.
where s = P out P PE−RatedPower , η PE is efficiency of power electronic device, P out is output power of power electronic device (kW), and P PE-RatedPower is rated power of power electronic device (kW).(a) Box plot of average daily surplus power for 74 houses in one year (Data from [21]).
(b) Box plot of maximum delta surplus power for 74 houses in one year (Data from [21]).

Battery Storage System
Thanks to the progress in the manufacture and development of material, the cost of battery cells has been decreasing.Among a variety of battery technologies, Li-ion batteries receive a lot of attention in the industry for stationary storage applications due to the characteristics of efficiency, scalability, and long cycle life.In this study, a current state-of-the-art Li-ion battery cell, namely the lithium-iron-phosphate (LiFePO4) battery, is employed with a capacity of 4.4 kWh.The applied  (a) Box plot of average daily surplus power for 74 houses in one year (Data from [21]).
(b) Box plot of maximum delta surplus power for 74 houses in one year (Data from [21]).

Battery Storage System
Thanks to the progress in the manufacture and development of material, the cost of battery cells has been decreasing.Among a variety of battery technologies, Li-ion batteries receive a lot of attention in the industry for stationary storage applications due to the characteristics of efficiency, scalability, and long cycle life.In this study, a current state-of-the-art Li-ion battery cell, namely the lithium-iron-phosphate (LiFePO4) battery, is employed with a capacity of 4.4 kWh.The applied

Battery Storage System
Thanks to the progress in the manufacture and development of material, the cost of battery cells has been decreasing.Among a variety of battery technologies, Li-ion batteries receive a lot of Energies 2018, 11, 469 5 of 18 attention in the industry for stationary storage applications due to the characteristics of efficiency, scalability, and long cycle life.In this study, a current state-of-the-art Li-ion battery cell, namely the lithium-iron-phosphate (LiFePO 4 ) battery, is employed with a capacity of 4.4 kWh.The applied battery capacity is inspired from [24] where the integration of 1 kWh capacity per 1 kWp PV power is proposed as an advantage to achieve high degrees of self-sufficiency.
Regarding the battery cell in the stationary storage system, aging effects play a crucial role in capacity degradation and dominate the economic performance of the battery's participants due to the need for battery replacement.The aging mechanism is a complicated electrochemistry process involving many variables [25].There are calendric aging and cyclic aging contributing to capacity degradation.In this study, they are superposed to account for total aging effect due to their independence.To calculate how much capacity fades in cycling, the model introduced by Rosenkranz et al. [26] based on a Wöhler curve is used to account for the cycling aging under the assumption of 6000 equivalent full cycles (EFC) of battery [27].Given the depth of discharge (DoD), the remaining cycle lifetime can be obtained via Equation (2) [28].Figure 3 shows the cycling aging curve adapted from the Rosenkranz model.On the other hand, calendric aging is computed at every sampling time with the assumption of a 20-year lifetime [29] matching well recent model validation studies [30].The replacement criterion is effective when the remaining capacity is reduced to 80% of nominal capacity.The related parameters of the utilized battery storage system (BSS) are given in Table 1.
Energies 2018, 11, x 5 of 17 battery capacity is inspired from [24] where the integration of 1 kWh capacity per 1 kWp PV power is proposed as an advantage to achieve high degrees of self-sufficiency.
Regarding the battery cell in the stationary storage system, aging effects play a crucial role in capacity degradation and dominate the economic performance of the battery's participants due to the need for battery replacement.The aging mechanism is a complicated electrochemistry process involving many variables [25].There are calendric aging and cyclic aging contributing to capacity degradation.In this study, they are superposed to account for total aging effect due to their independence.To calculate how much capacity fades in cycling, the model introduced by Rosenkranz et al. [26] based on a Wöhler curve is used to account for the cycling aging under the assumption of 6000 equivalent full cycles (EFC) of battery [27].Given the depth of discharge (DoD), the remaining cycle lifetime can be obtained via Equation (2) [28].Figure 3 shows the cycling aging curve adapted from the Rosenkranz model.On the other hand, calendric aging is computed at every sampling time with the assumption of a 20-year lifetime [29] matching well recent model validation studies [30].The replacement criterion is effective when the remaining capacity is reduced to 80% of nominal capacity.The related parameters of the utilized battery storage system (BSS) are given in Table 1.

Financial Assumptions in the Scenario
Many studies [31][32][33] have analyzed the economic feasibility and viability of battery storage in household applications.Though the incentive policies and energy regulations vary from countries to

Financial Assumptions in the Scenario
Many studies [31][32][33] have analyzed the economic feasibility and viability of battery storage in household applications.Though the incentive policies and energy regulations vary from countries to countries, the rising residential electric prices and descending battery costs are revealed in [34,35].The scenario applied in the study assumes that the investment of battery storage system is more profitable compared to the system without battery installment.The beneficial scenario is highly dependent on system composition, specification, and related regulations.Thus, a certain scenario for the investigated case is derived.The electricity retail tariff is derived from the extrapolation of historical prices in Germany from 2004 to 2014 [34] and battery costs are acquired from extrapolation to estimate the future values [35].With a 20-year depreciation period, the battery storage system is expected to become beneficial when retail electric price is higher than €0.33/kWh and battery cost less than €430/kWh according to analysis from [36], where a 4% interest rate and 2% inflation rate per year is considered.The feed-in tariff of €0.12/kWh for rooftop systems is applicable for the next 20 years [1].The related financial parameters applied in scenario are given in Table 2. On the other hand, the maximum 50% peak PV power is served as feed-in limitation for the household PV storage system with full subsidy [37].It is worthwhile mentioning that this curtailment barrier might be further exceeded in the future.For an equal comparison, all control strategies are performed under an identical economic scenario of one year.

Methods
Considering the nonlinear and dynamic properties in the household PV storage system, traditional control approaches in needs of modeling for the physical reality are no longer an advantage [19].The investigated system is neither appropriate for practical experiment nor for mathematical modeling due to the many variables and uncertainties.Therefore, to tackle the power dispatch problem in the residential PV storage system, a fuzzy logic controller (FLC) is applied in the study.

Design of the Fuzzy Controller
The FLC is a computational intelligence techniques converting the human experience into an advanced control method.Unlike the binary system, the FLC is capable of addressing issues in uncertain and heuristic ways [38][39][40][41].In the single household PV storage system, the battery power and grid power are regarded as controllable variables i.e., power source or power sink to satisfy power balance and the load demand as in Equation (3).However, the rising electric price and the disadvantageous feed-in tariff keep owners from using power from the utility grid.Hence, increasing the self-consumption is preferred and profitable.The more local demand is satisfied by solar power, the less electricity from grid is purchased.To achieve this, making good use of battery power becomes important.The participant of battery power enables the storage of surplus power and the employment of the stored power when solar power is not sufficient.The surplus power is thus defined in Equations ( 4) and (5).However, the fact that battery capacity degrades along with time and cycling, and the curtailment power loss deriving from feed-in limitation makes the charging/discharging control of battery storage not a simple task.To get the minimum operating cost for a household PV storage system, a well-designed control strategy is required.
P load + P PV + P grid + P battery = 0 (3) P surplus = −P net (5) where P load is load consumption power (kW), P PV is the photovoltaic generation power (kW), P grid is utility exchange power (kW), P battery is the battery charging/discharging power (kW), P net is net power in PV-battery system (kW), and P surplus is surplus power, namely the difference between power generation and load demand (kW).
Based on a previous study [19], it is effective to use FLC-based charging methods where current SOC and surplus power are taken as inputs to achieve lower operation costs.With the superiority provided by FLC, no meteorological forecasts are needed to appropriately charge the power into the battery.As a result, this study aims to continue these advantages and further investigates the applications in a community.Regarding many different kinds of surplus power profiles in a community, the FLC charging method with surplus power as the input variable fails to outperform.This is because the setting values in the membership function (MF) of surplus power are fixed and they fail to cater for various cases of input surplus power.Therefore, the proposed method takes current SOC and ∆SOC as inputs instead, where ∆SOC is defined in Equation ( 6).To efficiently conduct fuzzy control and relieve the computation stress, there are two inputs (SOC and ∆SOC) in the proposed method and each of them contains five fuzzy subsets corresponding to linguistic degrees.With ∆SOC, the trend of charging or discharging activity becomes an indicator to prevent severe ramp of charging or discharging, which is also a common design in fuzzy control [42].The current SOC provides the necessary information on the battery storage system.As for output variables, the charging ratio denoted as charging ratio (CR) is firstly obtained from defuzzification with the range from 0 to 1, and then CR would be multiplied by battery rated power to serve as charging power command.Figure 4 illustrates the input MFs and output MF where the linguistic variable S represents small, MS represents medium small, M represents medium, ML represents medium large, L represents large, NL represents negatively large, NS represents negatively small, Z represents zero, PS represents positively small, and PL represents positively large.
According to empirical results from simulation, the rule table is designed as given in Figure 5.The operating principle is charging battery as much as possible during daytime, and at the meanwhile properly preserving the capacity for the midday when there is high possibility to get curtailment loss.It reveals the expectation to get benefit from the proper usage of renewable energy and the curtailment power saved in storage system.The negative ∆SOC represents discharging while the positive ∆SOC represents charging.Figure 6 shows four of the implemented charging rules.From Figure 6, if the battery SOC is low (SOC is Small; S), CR should be large (CR is Large; L) if SOC is decreasing very fast (∆SOC is Negatively Large; NL); however, if SOC is increasing very fast (∆SOC is Positively Large; PL), CR should be reduced (CR is Medium Small; MS).On the other hand, if the battery SOC is high (SOC is Large; L), CR should be small/medium small when SOC is increasing/decreasing very fast.In summary, the charging ratio decreases along with higher SOC.For negative ∆SOC, charging is always preferred compared to positive ones.In this way it stores as much solar power as it can.Whereas, charging becomes conservative when ∆SOC is positive to prevent early fully charged and curtailment power loss.
variable S represents small, MS represents medium small, M represents medium, ML represents medium large, L represents large, NL represents negatively large, NS represents negatively small, Z represents zero, PS represents positively small, and PL represents positively large.According to empirical results from simulation, the rule table is designed as given in Figure 5.The operating principle is charging battery as much as possible during daytime, and at the meanwhile properly preserving the capacity for the midday when there is high possibility to get curtailment loss.It reveals the expectation to get benefit from the proper usage of renewable energy and the curtailment power saved in storage system.The negative ∆SOC represents discharging while the positive ∆SOC represents charging.Figure 6 shows four of the implemented charging rules.From Figure 6, if the battery SOC is low (SOC is Small; S), CR should be large (CR is Large; L) if SOC is decreasing very fast (∆SOC is Negatively Large; NL); however, if SOC is increasing very fast (∆SOC is Positively Large; PL), CR should be reduced (CR is Medium Small; MS).On the other hand, if the battery SOC is high (SOC is Large; L), CR should be small/medium small when SOC is increasing/decreasing very fast.In summary, the charging ratio decreases along with higher SOC.For negative ∆SOC, charging is always preferred compared to positive ones.In this way it stores as much solar power as it can.Whereas, charging becomes conservative when ∆SOC is positive to prevent early fully charged and curtailment power loss.

Optimization of Fuzzy Membership Function
Despite the advantages of the proposed method (for example the dynamic control and the lack of a need for forecasts), improvement is still required if this method is to be applied to different houses.As it is difficult to obtain a systematic procedure to design a fuzzy controller that is of high performance for a variety of application cases [43], a metaheuristics optimization, namely PSO, contributes in the FLC design in this study.Taking a look at the input MFs shown in Figure 4, the and the curtailment power saved in storage system.The negative ∆SOC represents discharging while the positive ∆SOC represents charging.Figure 6 shows four of the implemented charging rules.From Figure 6, if the battery SOC is low (SOC is Small; S), CR should be large (CR is Large; L) if SOC is decreasing very fast (∆SOC is Negatively Large; NL); however, if SOC is increasing very fast (∆SOC is Positively Large; PL), CR should be reduced (CR is Medium Small; MS).On the other hand, if the battery SOC is high (SOC is Large; L), CR should be small/medium small when SOC is increasing/decreasing very fast.In summary, the charging ratio decreases along with higher SOC.For negative ∆SOC, charging is always preferred compared to positive ones.In this way it stores as much solar power as it can.Whereas, charging becomes conservative when ∆SOC is positive to prevent early fully charged and curtailment power loss.

Optimization of Fuzzy Membership Function
Despite the advantages of the proposed method (for example the dynamic control and the lack of a need for forecasts), improvement is still required if this method is to be applied to different houses.As it is difficult to obtain a systematic procedure to design a fuzzy controller that is of high performance for a variety of application cases [43], a metaheuristics optimization, namely PSO, contributes in the FLC design in this study.Taking a look at the input MFs shown in Figure 4, the

Optimization of Fuzzy Membership Function
Despite the advantages of the proposed method (for example the dynamic control and the lack of a need for forecasts), improvement is still required if this method is to be applied to different houses.As it is difficult to obtain a systematic procedure to design a fuzzy controller that is of high performance for a variety of application cases [43], a metaheuristics optimization, namely PSO, contributes in the FLC design in this study.Taking a look at the input MFs shown in Figure 4, the values of fuzzy subsets are evenly distributed within the corresponding ranges.However, the setting of MF dominates which relevant rule is supposed to be triggered.Thus, the input MFs with evenly distributed fuzzy subsets are unable to reach minimum operating cost in many houses in the community.In addition, with the impact of aging effect and different surplus power profiles, the design of input MFs turns out to be a critical issue.Utilizing PSO, a simple coding implementation is able to perform exploration in a high dimension searching space for optimum Specifically, PSO is able solve the problem with high complexity where many variables are involved [44][45][46][47].In this subsection, simple PSO is implemented to achieve the minimum operating cost in many houses.The procedures are given as follows: (a) Definition of particles in the searching space In search of the appropriate design for input MFs, the maximum and minimum of input MFs are fixed due to the operating limitations.For the SOC, the available input range is from 0% to 100%.Depending on the rated power of converter connected to battery system, the range of ∆SOC is determined between −10% and 10%.Therefore, there are only three fuzzy subsets left in each input MF to be determined as given in Figure 7.In other words, each particle is regarded as a possible solution in a six-dimensional searching space.The location of individual particle in the search space can be expressed as x ij and their velocities are denoted as v ij where i is particle number and j is the element number in a particle.Each particle represents a solution and corresponds to a fitness value.
Energies 2018, 11, x 9 of 17 able to perform exploration in a high dimension searching space for optimum solution.Specifically, PSO is able solve the problem with high complexity where many variables are involved [44][45][46][47].In this subsection, simple PSO is implemented to achieve the minimum operating cost in many houses.
The procedures are given as follows: (a) Definition of particles in the searching space In search of the appropriate design for input MFs, the maximum and minimum of input MFs are fixed due to the operating limitations.For the SOC, the available input range is from 0% to 100%.Depending on the rated power of converter connected to battery system, the range of ∆SOC is determined between −10% and 10%.Therefore, there are only three fuzzy subsets left in each input MF to be determined as given in Figure 7.In other words, each particle is regarded as a possible solution in a six-dimensional searching space.The location of individual particle in the search space can be expressed as xij and their velocities are denoted as vij where i is particle number and j is the element number in a particle.Each particle represents a solution and corresponds to a fitness value.

(b) Evaluation function
To quantify the performance of solutions, Equation ( 7) is employed to compute the operating cost which also serves as a fitness value.The total operating cost for a single house is composed of the battery replacement cost and electricity cost, including the purchase tariff, and its profit made by feed-in.It should be noted that the replacement criterion is effective when the state of health (SOH) is 80%, which is relatively strict for residential applications.Since the simulation scope for one year is too short to observe a replacement, the replacement cost is represented by the dissipative SOH (20% of nominal capacity) due to aging effect.

(c) Update input MFs iteratively via PSO
In every iteration, there is motivation, known as velocity, attracting particles to approach to place with better fitness value.Velocity gives particle the direction and distance to "move" to the next position as shown in Equation (8).Particles not only learn from the experience from its own but also from the best one in the group.The historical best of itself is denoted as pBest and best in the group

(b) Evaluation function
To quantify the performance of solutions, Equation ( 7) is employed to compute the operating cost which also serves as a fitness value.The total operating cost for a single house is composed of the battery replacement cost and electricity cost, including the purchase tariff, and its profit made by feed-in.It should be noted that the replacement criterion is effective when the state of health (SOH) is 80%, which is relatively strict for residential applications.Since the simulation scope for one year is too short to observe a replacement, the replacement cost is represented by the dissipative SOH (20% of nominal capacity) due to aging effect.
where Cost(t) is total operating cost for the system (€) for time t, E grid-buy is energy purchased from utility grid (kWh), E grid-sell is energy feed-in in utility grid (kWh), C buy is purchasing power tariff (€/kWh), C sell is feed-in power tariff (€/kWh), C battery is battery cost (€/kWh), and SOH remain is remaining SOH (%).In every iteration, there is motivation, known as velocity, attracting particles to approach to place with better fitness value.Velocity gives particle the direction and distance to "move" to the next position as shown in Equation (8).Particles not only learn from the experience from its own but also from the best one in the group.The historical best of itself is denoted as pBest and best in the group is represented as gBest.
where t is the iteration counter, i is particle number, j is element number in a particle, d is the total number of elements in a particle, w is the inertia weight parameter, c 1 and c 2 are acceleration constants, r 1 and r 2 are uniform random values in a range [0, 1], v ij (t) is the velocity of particle i in iteration t, and x ij (t) is the current position of particle i in iteration t.After certain numbers of iterations, the particles make adjustments and are located at the optimum solution.To accelerate the convergence, the inertia weight w is decreasing along with the iteration as given Equation ( 9).
where w max is maximum inertia weight, w min is minimum inertia weight, iter is current iteration and iter max is the allowed maximum iteration.The optimization flowchart is given in Figure 8.
Energies 2018, 11, x 10 of 17 make adjustments and are located at the optimum solution.To accelerate the convergence, the inertia weight w is decreasing along with the iteration as given Equation ( 9). ( where wmax is maximum inertia weight, wmin is minimum inertia weight, iter is current iteration and itermax is the allowed maximum iteration.The optimization flowchart is given in Figure 8. Within the dash-line box shows the proposed FLC-based method.The battery storage system always discharges when solar power is deficient and charges using all curtailment power when it exceeds feed-in limitation.In other words, the fuzzy controller is only activated when there is surplus power under the feed-in limitation.Figure 9 shows the simulated results of an example day executing the proposed method.During time segment A when there is no solar power to be used at night, the battery will discharge and satisfy the residual load.At the noon time, during time segment B, when surplus power is larger than the feed-in limitation, it turns to charge all the possible curtailed power into battery instead of being controlled by fuzzy controller.Except these two periods, fuzzy controller is responsible for determining the charging power.It can be observed that the power charged into Within the dash-line box shows the proposed FLC-based method.The battery storage system always discharges when solar power is deficient and charges using all curtailment power when it exceeds feed-in limitation.In other words, the fuzzy controller is only activated when there is surplus power under the feed-in limitation.Figure 9 shows the simulated results of an example day executing the proposed method.During time segment A when there is no solar power to be used at night, the battery will discharge and satisfy the residual load.At the noon time, during time segment B, when surplus power is larger than the feed-in limitation, it turns to charge all the possible curtailed power into battery instead of being controlled by fuzzy controller.Except these two periods, fuzzy controller is responsible for determining the charging power.It can be observed that the power charged into battery is dynamically varying and battery is fully charged before the evening.

Analysis and Discussion
In this section, four reference methods from literature are compared with the proposed fuzzy charging method.They are: (1) Perfect foresight method: In this method all power profiles are known in advance.Then the perfect management is able to be performed with lowest curtailment power loss and proper battery employment.The possible curtailment power loss is stored in battery completely where the sufficient capacity is preserved in previous time.However, this method is unrealistic and is impossible to be realized, but it can serve as a good method to assess the other strategies.
(2) Greedy method: Battery will be charged or discharged as long as there is net power [36].In this way, the battery is easily fully charged prior to high irradiance time period and causes curtailment power loss.Even though the advantages of this method include relatively high selfsupply rate and high self-consumption rate, it is not very economical.
(3) Feed-in damping (FID) method: Depending on the spare capacity before the forecasted sunset time, the battery is nearly constantly charged over the complete sunshine duration [11].The surplus power over feed-in limitation is charged into battery.Hence, the curtailment power loss is reduced but a fully charged battery cannot be always obtained.
(4) Normal fuzzy (FuzzyN) method: A FLC based charging method is proposed to dynamically determine the battery charging power [19].Taking SOC and ∆SOC as inputs and charging ratio as output, battery capacity is allowed to be reserved for high irradiance period and reduce curtailment power loss.The input MFs are designed with evenly distributed setting values and rule table is based on empirical result.More descriptions can refer to Section 2.
Before optimizing input MFs, one year simulation with 10 min sampling time is conducted for Greedy method, FID method and FuzzyN method, respectively.As shown in Figure 10a, FuzzyN method achieves lowest cost in 59% houses in the community compared to Greedy and FID method.However, further improvements are desired.To visualize the room for improvement, the extra cost of FuzzyN is calculated and plotted in Figure 10b.It indicates the houses with minimum cost attained by FID method or Greedy method and also presents the extra cost of FuzzyN method in these houses.

Analysis and Discussion
In this section, four reference methods from literature are compared with the proposed fuzzy charging method.They are: (1) Perfect foresight method: In this method all power profiles are known in advance.Then the perfect management is able to be performed with lowest curtailment power loss and proper battery employment.The possible curtailment power loss is stored in battery completely where the sufficient capacity is preserved in previous time.However, this method is unrealistic and is impossible to be realized, but it can serve as a good method to assess the other strategies.
(2) Greedy method: Battery will be charged or discharged as long as there is net power [36].In this way, the battery is easily fully charged prior to high irradiance time period and causes curtailment power loss.Even though the advantages of this method include relatively high self-supply rate and high self-consumption rate, it is not very economical.
(3) Feed-in damping (FID) method: Depending on the spare capacity before the forecasted sunset time, the battery is nearly constantly charged over the complete sunshine duration [11].The surplus power over feed-in limitation is charged into battery.Hence, the curtailment power loss is reduced but a fully charged battery cannot be always obtained.
(4) Normal fuzzy (FuzzyN) method: A FLC based charging method is proposed to dynamically determine the battery charging power [19].Taking SOC and ∆SOC as inputs and charging ratio as output, battery capacity is allowed to be reserved for high irradiance period and reduce curtailment power loss.The input MFs are designed with evenly distributed setting values and rule table is based on empirical result.More descriptions can refer to Section 2.
Before optimizing input MFs, one year simulation with 10 min sampling time is conducted for Greedy method, FID method and FuzzyN method, respectively.As shown in Figure 10a, FuzzyN method achieves lowest cost in 59% houses in the community compared to Greedy and FID method.However, further improvements are desired.To visualize the room for improvement, the extra cost of FuzzyN is calculated and plotted in Figure 10b.It indicates the houses with minimum cost attained by FID method or Greedy method and also presents the extra cost of FuzzyN method in these houses.(5) Optimized Fuzzy (FuzzyOP) method: To further improve the FuzzyN method for most houses in the community, PSO is used to optimize the input MFs.The description of the optimization is in Section 3. The worst 5 results obtained from using FuzzyN method are taken into account for optimization.In this way, the goal is to minimize the summation cost of five houses from Equation (6).The relative parameters and configurations are given in Table 3. Figure 11 shows the recorded gBest value during every iteration.According to Figure 11, the gBest settles down from 13th iteration and finally converges to €3769.66 for the total annual expense of five houses.Eventually, the optimum settings for the input MFs are obtained.Figure 12 shows the annual cost of 74 houses for four different methods.All methods are compared with perfect a foresight method firstly so the additional cost can then be calculated for practical comparison.It should be noted that the result obtained from using perfect foresight method only provides a reference of improvement space for other approaches.Table 4 gives the number of houses that each method has successfully achieve to the minimum cost.It can be observed that the FuzzyN method shows its advantages in 44 houses before optimization, which indicates the 59.4% (44/74) outperformance rate in the whole community when dealing with different scenarios of surplus power.The secondly superior method is the Greedy method which has better performance in 25.7% (19/74) houses in the community.It is then deduced that the variety of surplus power from individual house makes the symmetrical input MFs not an appropriate design.After the optimization, (5) Optimized Fuzzy (FuzzyOP) method: To further improve the FuzzyN method for most houses in the community, PSO is used to optimize the input MFs.The description of the optimization is in Section 3. The worst 5 results obtained from using FuzzyN method are taken into account for optimization.In this way, the goal is to minimize the summation cost of five houses from Equation ( 6).The relative parameters and configurations are given in Table 3. Figure 11 shows the recorded gBest value during every iteration.According to Figure 11, the gBest settles down from 13th iteration and finally converges to €3769.66 for the total annual expense of five houses.Eventually, the optimum settings for the input MFs are obtained.) progress approaching to the perfect foresight method.From Figure 12 and Table 5, it is concluded that the proposed FuzzyOP method can achieve minimum cost in 73 houses, namely 98.6% outperformance rate in the community, and attains the lowest average expense for a single house per year.Figure 12 shows the annual cost of 74 houses for four different methods.All methods are compared with perfect a foresight method firstly so the additional cost can then be calculated for practical comparison.It should be noted that the result obtained from using perfect foresight method only provides a reference of improvement space for other approaches.Table 4 gives the number of houses that each method has successfully achieve to the minimum cost.It can be observed that the FuzzyN method shows its advantages in 44 houses before optimization, which indicates the 59.4% (44/74) outperformance rate in the whole community when dealing with different scenarios of surplus power.The secondly superior method is the Greedy method which has better performance in 25.7% (19/74) houses in the community.It is then deduced that the variety of surplus power from individual house makes the symmetrical input MFs not an appropriate design.After the optimization, the resulting FuzzyOP method successfully achieves up to 98.6% of houses to the minimum cost.As a result, the proper design of input MFs certainly realized the goal of an economical and general charging strategy.Additionally, Table 5 summarized the average cost of five different methods.The average benefit from applying the proposed FuzzyOP method instead of Greedy operation is 49% ( 10 786.11−765.72 = 49%) progress approaching to the perfect foresight method.From Figure 12 and Table 5, it is concluded that the proposed FuzzyOP method can achieve minimum cost in 73 houses, namely 98.6% outperformance rate in the community, and attains the lowest average expense for a single house per year.

Conclusions
This study aims to design a FLC-based charging method without any meteorological forecast and efficiently manage the power in the household PV-storage system.To investigate various power dispatch methods, simulation models for battery and power profiles as well as financial factors acquired from reality are collected and built up for simulation.Considering the diversity of different power profiles in a 74-house community, the design of an economical power dispatch method that is applicable for most houses becomes an important task.Taking the SOC and ∆SOC as inputs and charging ratio as an output, the charging power is dynamically determined.To achieve more outperformance rate in the community, the design of input MFs are optimized by PSO since the symmetric MF is no longer advantageous.The proposed FuzzyOP method makes 49% progress approaching to the perfect foresight method compared to Greedy operation.Compared to three other methods (Greedy, FID and FuzzyN method), the proposed FuzzyOP method achieves the minimum average annual cost and outperforms other method in 98.6% of houses in community.
The combined FLC-PSO optimization method presented herein may be adapted in various manners (e.g., distinct input parameters for the FLC controller) and may be suitable for other problem formulations in a microgrid context.For the parameter set chosen, it should be noted as limitation, that results might vary significantly with load/generation profiles and with distinct starting values for the batteries' SOC.Other implementations less prone to parameter variations are currently under investigation.

Figure 2 .
Figure 2. Strong variation is visible in terms of load fluctuation from observation of (a) a long time interval of one day, and from (b) a short time interval of 10 min.

Figure 2 .
Figure 2. Strong variation is visible in terms of load fluctuation from observation of (a) a long time interval of one day, and from (b) a short time interval of 10 min.

Figure 2 .
Figure 2. Strong variation is visible in terms of load fluctuation from observation of (a) a long time interval of one day, and from (b) a short time interval of 10 min.

Figure 5 .
Figure 5. Rule table of the proposed fuzzy logic control (FLC) controller.

Figure 6 .
Figure 6.Illustration of charging behavior from rule table.

Figure 5 .
Figure 5. Rule table of the proposed fuzzy logic control (FLC) controller.

Figure 5 .
Figure 5. Rule table of the proposed fuzzy logic control (FLC) controller.

Figure 6 .
Figure 6.Illustration of charging behavior from rule table.

Figure 6 .
Figure 6.Illustration of charging behavior from rule table.
Update input MFs iteratively via PSO

Energies 2018, 11 , x 11 of 17 Figure 9 .
Figure 9.The simulated results of power profiles for an example day.

Figure 9 .
Figure 9.The simulated results of power profiles for an example day.

Figure 10 .
Figure 10.Simulated results (a) percentage of achieving lowest cost (b) improvement space for normal fuzzy (FuzzyN) compared to Greedy and feed-in damping (FID) methods.

Figure 10 .
Figure 10.Simulated results (a) percentage of achieving lowest cost (b) improvement space for normal fuzzy (FuzzyN) compared to Greedy and feed-in damping (FID) methods.

Figure 12 .
Figure 12.Additional costs compared to the perfect foresight method.FuzzyOP: optimized Fuzzy.

Figure 12 .
Figure 12.Additional costs compared to the perfect foresight method.FuzzyOP: optimized Fuzzy.

Figure 12 .
Figure 12.Additional costs compared to the perfect foresight method.FuzzyOP: optimized Fuzzy.

Table 4 .
Outperformance times of different power dispatch method in 74 houses.

Table 5 .
The average costs of different methods.

Table 4 .
Outperformance times of different power dispatch method in 74 houses.

Table 5 .
The average costs of different methods.

Table 4 .
Outperformance times of different power dispatch method in 74 houses.

Table 5 .
The average costs of different methods.