Bi-Level Optimal Sizing and Placement of Distributed Energy Storage Systems Incorporating Multi-Mode Control of Solar Inverters

In this study, we present a comprehensive bi-level optimization framework for the sizing and placement of distributed energy storage systems (ESS) in a distribution network with high penetration of photovoltaic (PV) generation. The proposed approach integrates a novel multi-mode control strategy for solar inverters to mitigate voltage violations and reduce PV curtailment, while simultaneously maximizing the economic benefits of both PV and ESS. The upper-level model determines the optimal locations and capacities of ESS using an improved particle swarm optimization (PSO) algorithm, considering the annualized cost and revenue of storage. The lower-level model optimizes the charging/discharging schedules of ESS and the PV power injection under four typical operating scenarios derived from a K-means clustering algorithm with a maximum-minimum distance criterion. Within the lower level, the multi-mode control of solar inverters is employed to regulate reactive and active power outputs, ensuring voltage compliance and minimizing curtailment. A quadratic programming algorithm is then used to coordinate the ESS operation with the PV system. Simulation results on IEEE 34-bus and IEEE 123-bus test systems demonstrate that the proposed multi-mode control strategy outperforms conventional droop control in terms of voltage regulation and PV curtailment reduction. Furthermore, the bi-level optimization yields ESS configurations that enhance economic viability, improve voltage quality, and significantly reduce PV energy waste.

1. Introduction

The global deployment of distributed photovoltaic (PV) systems has accelerated dramatically, driven by carbon neutrality goals and falling costs. However, the high penetration of PV in distribution networks introduces challenges such as voltage violations and reverse power flows, which threaten grid stability. To address these issues, various control strategies for solar inverters have been proposed, including reactive power compensation and active power curtailment. Among them, droop control is widely used, but it often leads to suboptimal voltage regulation and excessive curtailment. In this work, we introduce a multi-mode control strategy for solar inverters that prioritizes reactive power adjustment and uses active power curtailment only as a last resort. This strategy achieves better voltage control and reduces PV energy waste compared with traditional droop control.

Beyond inverter control, the integration of distributed energy storage systems (ESS) can further alleviate voltage issues and enhance PV utilization. However, the optimal placement and sizing of ESS in high-PV networks remain challenging due to the stochastic nature of PV generation and load. Existing studies often neglect the coupling between inverter control and ESS operation, leading to oversizing or insufficient storage capacity. To fill this gap, we propose a bi-level optimization model that simultaneously considers the multi-mode control of solar inverters and the optimal configuration of ESS. The upper level optimizes the investment decision of ESS, while the lower level determines the operational strategy under different scenarios, taking into account the real-time control of solar inverters.

2. PV Scenario Clustering and Multi-Mode Control of Solar Inverter

2.1 PV Scenario Clustering

The stochastic nature of PV generation necessitates the use of scenario-based approaches to capture typical operating conditions. We employ a K-means clustering algorithm enhanced with a maximum-minimum distance criterion to select initial cluster centers, which avoids the randomness of traditional K-means and reduces the risk of local minima. The algorithm divides a set of \(e\) vectors \(\{\mathbf{x}_a, a=1,…,e\}\) into \(E\) clusters \(G_b\) (\(b=1,…,E\)) and finds the cluster centers \(\mathbf{c}_b\) that minimize the following cost function:

$$
J(\{\mathbf{c}_b\}) = \sum_{b=1}^{E} \sum_{\mathbf{x}_a \in G_b} \|\mathbf{x}_a – \mathbf{c}_b\|^2
$$

Using one year of actual PV output data from a certain region (sampled every 5 minutes), we generate 365 daily profiles via Monte Carlo simulation assuming a normal distribution of forecast errors. The target number of clusters is set to 4. The resulting typical scenarios are shown in Table 1, which summarizes the key statistics of each cluster. These four scenarios represent different levels of solar irradiance and temporal patterns, providing a compact representation for operational optimization.

Table 1: Summary of Four Typical PV Scenarios
Scenario Probability Peak Power (kW) Duration (h)
1 0.25 1800 10
2 0.30 1500 8
3 0.20 1200 6
4 0.25 900 5

2.2 Multi-Mode Control Strategy for Solar Inverter

The proposed multi-mode control strategy for solar inverters aims to maintain the point of common coupling (PCC) voltage within permissible limits (e.g., 0.93–1.07 p.u.) while maximizing active power injection. The strategy consists of four modes:

  • Mode A – Normal Operation: When the PCC voltage \(V_{pv,j}^{tm}\) is below the activation threshold \(V_2\) (e.g., 1.06 p.u.), the solar inverter operates in Maximum Power Point Tracking (MPPT) mode, i.e., \(P_{pv,j} = P_{pv,j}^{mpp}\). The reactive power is set based on the power factor angle \(\phi_{pv,j}\):

$$
Q_{pv,j}(t) = \sqrt{S_{pv,j}^2 – P_{pv,j}(t)^2} = P_{pv,j}(t) \tan(\phi_{pv,j})
$$

  • Mode B – Reactive Power Curtailment: When \(V_{pv,j}^{tm} \geq V_2\) and the PV power increment \(\Delta P_{pv,j} > 0\), the solar inverter gradually transitions to inductive reactive power output until reaching its maximum inductive capacity \(-Q_{pv,j}^{\max}\). The adjustment follows:

$$
Q_{pv,j}(t+\Delta t) = Q_{pv,j}(t) – \frac{\Delta t}{t_{DQ}} \left[ Q_{pv,j}(t) – (-Q_{pv,j}^{\max}) \right]
$$

where \(t_{DQ}\) is the reactive power reduction time constant. When \(\Delta P_{pv,j} < 0\) (sunlight weakening), the inverter switches to Mode D to inject capacitive reactive power.

  • Mode C – Active Power Coordination: If \(V_{pv,j}^{tm} \geq V_{\max}\) (e.g., 1.07 p.u.), the active power is curtailed to maintain voltage. Conversely, if the voltage drops below \(V_{\max}\), the power is restored. The adjustment is given by:

$$
P_{pv,j}(t+\Delta t) =
\begin{cases}
P_{pv,j}(t) \left(1 – \frac{\Delta t}{t_{DP}}\right), & V_{pv,j}^{tm} \geq V_{\max} \\
P_{pv,j}(t) \left(1 + \frac{\Delta t}{t_{RP}}\right), & V_{pv,j}^{tm} < V_{\max}
\end{cases}
$$

where \(t_{DP}\) and \(t_{RP}\) are the reduction and restoration time constants, respectively. If \(V_{pv,j}^{tm} < V_{\max} – \delta\) (where \(\delta\) is a small tolerance), the inverter transitions to Mode D.

  • Mode D – Reactive Power Recovery: When the voltage is sufficiently low, the solar inverter increases its capacitive reactive power output toward \(+Q_{pv,j}^{\max}\) to support voltage recovery:

$$
Q_{pv,j}(t+\Delta t) = Q_{pv,j}(t) + \frac{\Delta t}{t_{RQ}} \left[ Q_{pv,j}^{\max} – Q_{pv,j}(t) \right]
$$

This mode ensures a smooth transition back to normal operation when conditions permit. The multi-mode control logic is summarized in Figure 1 (inserted as a hyperlink).

3. Bi-Level Optimization Model

3.1 Upper-Level Model: ESS Planning

The upper-level objective is to minimize the annualized cost of ESS while maximizing its annual revenue. We use a linear weighted sum to combine the two conflicting goals:

$$
\min F_1 = \sum_{p=1}^{n_p} P_p \left( \alpha f_{1,p} – \beta f_{2,p} \right)
$$

where \(P_p\) is the probability of scenario \(p\), \(f_{1,p}\) is the daily ESS cost, \(f_{2,p}\) is the daily ESS revenue, and \(\alpha + \beta = 1\) (we set \(\alpha = 0.7\), \(\beta = 0.3\) in this study). The daily cost includes investment and operation/maintenance:

$$
f_{1,p} = \frac{C_{es}^{inv} + C_{es}^{op}}{365 \times T_s}, \quad C_{es}^{inv} = \sum_{i=1}^{n_{es}} \left( c_e E_i + c_p P_i^{\max} \right)
$$

$$
C_{es}^{op} = c_{op} \sum_{i=1}^{n_{es}} P_i^{\max} \cdot \frac{(1+r_i)^\beta}{(1+r_d)^\beta}
$$

The daily revenue \(f_{2,p}\) comprises three components: arbitrage from charging/discharging (\(C_{es}^{in}\)), service fees (\(C_{es}^{ser}\)), and reduced PV curtailment revenue (\(C_{es}^{pvs}\)):

$$
f_{2,p} = \frac{1}{365} \left( C_{es}^{in} + C_{es}^{ser} + C_{es}^{pvs} \right)
$$

$$
C_{es}^{in} = \sum_{t=1}^{n_t} \left( \lambda_{dis} P_{dis}(t) – \lambda_{ch} P_{ch}(t) \right) \Delta t
$$

$$
C_{es}^{ser} = \lambda_{se} \sum_{t=1}^{n_t} \left( P_{ch}(t) + P_{dis}(t) \right) \Delta t
$$

$$
C_{es}^{pvs} = \lambda_{pvs} \sum_{t=1}^{n_t} \left( \Delta P_{pv0}(t) – \Delta P_{pv}(t) \right) \Delta t
$$

where \(\Delta P_{pv0}\) and \(\Delta P_{pv}\) are the PV curtailment without and with ESS, respectively. The constraints include investment limits, capacity bounds, and power-capacity ratio:

$$
\begin{aligned}
C_{es}^{inv} &\leq C_{es}^{inv,\max} \\
E_{es,i}^{\min} &\leq E_{es,i} \leq E_{es,i}^{\max} \\
N_{es}^{\min} &\leq N_{es} \leq N_{es}^{\max} \\
P_i^{\max} &= \gamma E_{es,i}
\end{aligned}
$$

We set \(\gamma = 0.25\) (i.e., 4-hour discharge duration at rated power). The decision variables are the number, location, and rated energy capacity of each ESS.

3.2 Lower-Level Model: Operational Optimization

In the lower level, we aim to maximize the PV annual revenue while respecting voltage constraints and ESS operational limits. The objective function is:

$$
\max F_2 = \sum_{p=1}^{n_p} P_p \left( C_{pv,p}^{in} – C_{pv,p}^{loss} \right)
$$

The PV revenue \(C_{pv,p}^{in}\) is calculated from the actual injected power \(P_{pv,j}(t)\):

$$
C_{pv,p}^{in} = \sum_{t=1}^{n_t} \sum_{j=1}^{n_{pv}} \left( \lambda_{pv} + \lambda_{pv}^{bt} \right) P_{pv,j}(t) \Delta t
$$

The penalty for curtailment \(C_{pv,p}^{loss}\) is:

$$
C_{pv,p}^{loss} = \lambda_{lo} \sum_{t=1}^{n_t} \sum_{j=1}^{n_{pv}} \left( P_{pv,j}^{mpp}(t) – P_{pv,j}(t) \right) \Delta t
$$

where \(\lambda_{lo}\) is the penalty coefficient (set to 0.1 RMB/kWh). The constraints are:

  • Network power balance: The net injection at each node must satisfy the AC power flow equations (linearized in our implementation):

$$
P_s(t) = \sum_{n=1}^{n_{bat}} P_{L,n}(t) – \sum_{i=1}^{n_{es}} P_{es,i}(t) – \sum_{j=1}^{n_{pv}} P_{pv,j}(t)
$$

  • Voltage prediction: The voltage at node \(I\) at time \(t+1\) is predicted using a simplified sensitivity model:

$$
V_I(t+1) = V_I(t) + \mathbf{R}_{II} \Delta P + \mathbf{X}_{II} \Delta Q
$$

$$
\Delta P = \left[ P_{pv,I}(t+1) – P_{pv,I}(t) \right] – \left[ P_{L,I}(t+1) – P_{L,I}(t) \right]
$$

$$
\Delta Q = \left[ Q_{pv,I}(t+1) – Q_{pv,I}(t) \right] – \left[ Q_{L,I}(t+1) – Q_{L,I}(t) \right]
$$

The voltage must satisfy \(V_{\min} \leq V_I(t) \leq V_{\max}\).

  • ESS constraints: Charging/discharging power limits, state-of-charge (SOC) dynamics, and energy balance over a day:

$$
\begin{aligned}
0 &\leq P_{ch,i}(t) \leq P_i^{\max} B_{ch,i}(t) \\
0 &\leq P_{dis,i}(t) \leq P_i^{\max} B_{dis,i}(t) \\
B_{ch,i}(t) + B_{dis,i}(t) &\leq 1, \quad B_{ch,i}, B_{dis,i} \in \{0,1\} \\
E_{es,i}(t+\Delta t) &= E_{es,i}(t) + \eta_{ch} P_{ch,i}(t) \Delta t – \frac{P_{dis,i}(t)}{\eta_{dis}} \Delta t \\
0.1E_{es,i}^{\max} &\leq E_{es,i}(t) \leq 0.9 E_{es,i}^{\max} \\
E_{es,i}(0) &= E_{es,i}(T) = 0.4 E_{es,i}^{\max}
\end{aligned}
$$

  • Solar inverter constraints: The inverter must operate within its apparent power limit and power factor range:

$$
\begin{aligned}
0 &\leq P_{pv,j}(t) \leq P_{pv,j}^{mpp}(t) \\
Q_{pv,j}(t) &= P_{pv,j}(t) \tan(\phi_{pv,j}) \\
P_{pv,j}(t)^2 + Q_{pv,j}(t)^2 &\leq S_{pv,j}^2 \\
\cos^{-1}(\phi_{pv,j}^{\min}) &\leq \phi_{pv,j} \leq \cos^{-1}(\phi_{pv,j}^{\min})
\end{aligned}
$$

The lower-level problem is solved using quadratic programming (QP) combined with the multi-mode control of solar inverters. At each time step, the solar inverter first applies the multi-mode logic to determine the PV power output, then a QP solver optimizes the ESS power to minimize voltage deviations and curtailment, subject to the above constraints.

4. Solution Methodology

The bi-level optimization is solved iteratively. The upper level uses an improved PSO algorithm with linearly decreasing inertia weight and time-varying acceleration coefficients to avoid premature convergence. The steps are:

  1. Initialize a population of 100 particles, each representing a combination of ESS locations and capacities.
  2. For each particle, run the lower-level optimization across all four scenarios to obtain the ESS operation schedule and PV revenue. Compute the upper-level objective.
  3. Update particle velocities and positions using the modified PSO formulas:

$$
v_{d}^{k+1} = w v_{d}^{k} + c_1 r_1 (p_{d}^{b} – z_{d}^{k}) + c_2 r_2 (g^{b} – z_{d}^{k})
$$

$$
z_{d}^{k+1} = z_{d}^{k} + v_{d}^{k+1}
$$

where \(w\) is linearly decreased from 0.9 to 0.4, and \(c_1, c_2\) vary from 2.5 to 0.5 and vice versa over iterations.

  1. Evaluate the fitness and update personal and global bests. Repeat until the maximum number of iterations (300) or convergence criterion is met.
  2. Output the optimal ESS configuration and the corresponding operational strategy.

5. Case Studies

5.1 Test Systems and Parameters

We validate the proposed method on the IEEE 34-bus and IEEE 123-bus distribution test systems. Both systems are modified to have high PV penetration: every bus except the slack bus (bus 0) is equipped with a 60 kW solar inverter (power factor 0.95). The total installed PV capacity is 1980 kW for the 34-bus system and 6600 kW for the 123-bus system. Load data and PV scenarios are taken from the clustering results. Time-of-use electricity prices are given in Table 2.

Table 2: Electricity Price Structure
Period PV selling price (RMB/kWh) ESS selling price (RMB/kWh) ESS buying price (RMB/kWh)
Valley (0:00–8:00, 22:00–24:00) 0.32 0.40 0.20
Peak (8:00–12:00, 17:00–21:00) 0.65 0.75 0.55
Flat (12:00–17:00, 21:00–22:00) 1.07 1.15 0.95

Other parameters: ESS unit cost \(c_e = 1800\) RMB/kWh, \(c_p = 1000\) RMB/kW, O&M cost 25 RMB/kW/year, inflation rate 2%, discount rate 10%, lifetime 10 years. ESS efficiency: charging 0.95, discharging 1.1.

5.2 Results and Discussion

5.2.1 Without any control

In the absence of any voltage control, the 34-bus system experiences severe overvoltage during high PV generation. In Scenario 1, the peak voltage reaches 1.15 p.u. at bus 33 around 13:00. Undervoltage also occurs during peak load when PV output is low. This confirms the necessity of inverter control and ESS.

5.2.2 Comparison of droop control and multi-mode control

We compare the performance of traditional droop control and the proposed multi-mode control for the solar inverter without ESS. The multi-mode control successfully eliminates all voltage violations, whereas droop control still shows some overvoltage at a few buses. Moreover, the annual PV curtailment under droop control is 1135.11 MWh, while under multi-mode control it is 969.64 MWh, a reduction of 14.6%. When ESS is optimally configured (using the best solution from Section 5.2.3), the curtailment further drops: droop + ESS gives 182.55 MWh, while multi-mode + ESS gives 108.94 MWh, a 40.3% reduction. This demonstrates the superiority of the multi-mode control for the solar inverter in reducing energy waste.

5.2.3 Optimal ESS configuration under multi-mode control

Table 3 lists the top three ESS configurations for the 34-bus system. The best solution uses two ESS units at buses 26 and 30 with capacities 756 kWh and 1068 kWh (rated powers 189 kW and 267 kW). The annual ESS cost is 381.62 thousand RMB, revenue 49.43 thousand RMB, and the PV annual revenue is 355.78 thousand RMB (compared to 349.17 thousand RMB without ESS). The multi-mode control alone curtails 969.64 MWh per year; after adding ESS, curtailment reduces to 108.94 MWh, a decrease of 88.76%. Voltage profiles are now well within limits (0.93–1.07 p.u.) for all scenarios.

Table 3: ESS Configuration Results for IEEE 34-Bus System
Scheme Bus & Capacity (kWh) Rated Power (kW) ESS Cost (10^4 RMB) ESS Revenue (10^4 RMB) PV Revenue (10^4 RMB)
2-1 26:756, 30:1068 189, 267 381.62 49.43 355.78
2-2 26:1056, 29:798 264, 199.5 387.96 48.29 356.18
2-3 24:1470, 29:456 367.5, 114 403.02 47.66 356.63

5.2.4 Large-scale network: IEEE 123-bus system

To test scalability, we apply the same methodology to the IEEE 123-bus system. The optimal configuration uses 4 ESS units (buses 86, 94, 100, 122) with total capacity 5100 kWh. Table 4 summarizes the top three 4-unit solutions. The annual PV revenue increases from 1263.03 thousand RMB (without ESS) to 1321.91 thousand RMB (with ESS). The curtailment is reduced from 14,348.64 MWh to 1,358.92 MWh, a 90.53% reduction. Voltage profiles are fully compliant.

Table 4: ESS Configuration Results for IEEE 123-Bus System
Scheme Bus & Capacity (kWh) Rated Power (kW) ESS Cost (10^4 RMB) ESS Revenue (10^4 RMB) PV Revenue (10^4 RMB)
4-1 86:240, 94:1380, 100:1980, 122:1500 60,345,495,375 1067.04 114.69 1321.91
4-2 77:798, 88:588, 112:1578, 117:2244 199.5,147,394.5,561 1089.98 112.98 1321.71
4-3 58:1500, 76:534, 117:1800, 121:1728 375,133.5,450,432 1163.76 126.91 1321.86

6. Conclusion

In this paper, we have developed a bi-level optimization framework for the sizing and placement of distributed ESS, explicitly accounting for the multi-mode control of solar inverters. The main contributions and findings are:

  • A novel multi-mode control strategy for solar inverters that prioritizes reactive power adjustment and uses active curtailment only as a last resort. This strategy outperforms droop control in both voltage regulation and PV curtailment reduction, as demonstrated on two standard test systems.
  • A bi-level optimization model that integrates the inverter control into the planning stage. The upper level determines ESS investment decisions, while the lower level optimizes real-time operation under clustered scenarios. The improved PSO algorithm ensures convergence and solution quality.
  • Case studies show that the proposed method effectively reduces voltage violations, minimizes PV curtailment (by up to 88.76% in the 34-bus system and 90.53% in the 123-bus system), and improves the economic returns of both PV and ESS.
  • The methodology is scalable to larger distribution networks, confirming its practical applicability for distribution system operators and investors.

Future work will extend the framework to consider coordinated control of multiple solar inverters and ESS in unbalanced three-phase networks, as well as the integration of demand response and electric vehicles.

Scroll to Top