1 Introduction

1.1 Motivation and incitement

To promote the use of green energy, renewable energy resources (RES) such as photovoltaic (PV) systems, wind turbines, and fuel cells are highly integrated into the distribution network [1, 2]. With the advancement in PV technology and cost reduction, the integration of photovoltaic systems is expected to increase in the distribution network [3]. This increased integration of PV in the distribution network presents additional technical challenges, as discussed in [4,5,6]. The energy obtained from PV is highly intermittent, uncertain, and variable in nature. The higher integration of PV creates several problems, particularly an increase in terminal voltage and voltage fluctuations [7, 8]. PVs are integrated into the distribution network using power electronics devices, and their control can provide fast and reliable operation. Therefore, the application of these interfaces has been suggested as a quick-responding solution to regulate voltage [9,10,11].

Although various control strategies have been proposed [12] to overcome the challenges resulting from the high integration of PVs, the optimal control of smart inverters in smart distribution networks (SDN) can be one of the alternatives to address these challenges [13]. Optimal control of smart inverters in SDN can be solved by optimization. Formulating and solving the optimization problem using a detailed distribution network modeling might be challenging [14]. The optimization process with detailed mathematical modeling of SDN may encounter some problems, such as slow convergence or no convergence at all [15]. Furthermore, the need for faster optimization techniques is more pressing with the growing concern of implementing real-time control applications among distribution system operators (DSOs) [16]. Hence, this paper is intended to explore the applicability of co-simulation-based optimization approach for optimal reactive power control from smart inverters in SDN.

1.2 Literature review

Currently, the voltage in distribution networks is regulated through voltage regulating devices (VRDs) such as on-load tap changing (OLTC) transformers, static voltage regulators (SVR), static capacitor banks (SCB), and static inductor banks (SIB) [17]. However, with the rapid transition in the distribution network, the operating condition of VRD is altered [18], which requires frequent switching operations to regulate the rapidly fluctuating voltage. Providing prompt voltage control from such devices is difficult due to slower response and limited switching operation [19]. Also, the frequent switching operation of VRDs causes mechanical wear and tear, causing an additional financial burden. In addition, it also causes high voltage flicker and increased switching loss [20]. Therefore, the reactive power control of smart inverters, as suggested by IEEE 1547-2018 [21], is recently gaining attraction among DSOs [22, 23].

There are various approaches to control the reactive power in the scientific literature [24, 25]. In most studies, reactive power control is achieved in centralized, decentralized, or distributed methods. The decentralized method uses local measurement, and, on the basis of that, the optimal settings for reactive dispatch are estimated. However, the decentralized method lacks proper coordination between the controller and the central controller. The centralized method provides optimal reactive power setpoints by solving optimal power flow in the distribution network. The key problem with the centralized technique is the lack of communication and monitoring infrastructure in the distribution network. However, as smart inverter technology advances, most smart inverters now have powerful communication and monitoring equipment [26]. Therefore, a centralized control mechanism based on optimal power flow (OPF) can be used in distribution networks with substantial integration of photovoltaics [27]. Some researchers incorporate centralized and local control and propose them as distributed control. Regardless of the optimal control approach, the most important factor is the modeling of the distribution network for optimization.

One of the main problems in applying the optimal control algorithm in a distribution network is modeling an unbalanced distribution network [28]. Accurate and efficient modeling of the distribution network with uncertainties from variable DERs is essential for applying optimal control algorithms in the distribution network. In most cases, the distribution networks are exceptionally long and radial in nature and serve many customers connected to the network. Unlike transmission networks, distribution networks can also consist of many single-phase loads and generation connection points, which can cause the network to be unbalanced. Therefore, the optimal control approaches implemented in transmission networks may not be feasible in distribution networks [29].

Most of the research on the optimal control application in a distribution network utilizes load flow calculations based on physical modeling techniques. From the physical properties of the network, power flow solutions are solved using the Newton–Raphson method [30] or the fast decoupled method [31] or LinDistflow equations [32] or sensitivity-based modeling [26]. However, due to the unique properties of the distribution network such as radial nature, unbalanced operation, multiple numbers of connection points and interconnecting lines, and nonuniform loading conditions, the traditional load flow models may not converge. The use of these modeling methods rarely produces better results for distribution systems [33]. In addition, the high R/X ratio of the distribution network is another problem for the convergence of the optimization model in the distribution network. The authors of [34] suggested a modified fast decoupled method to solve the problem of convergence in the network with a high R/X ratio in the distribution network. Some modifications have been made to the traditional modeling method by modifying the Y-bus matrix to achieve reliable convergence [33]. Even with modifications to most of the earlier research, the analysis has been done for a balanced distribution network. These methods will also still have the problem of convergence with large integration of DERs and unbalanced operation in the network.

Some researchers proposed alternative methods to model the distribution network considering all properties of the network. In [35], the authors proposed the backward/forward sweep (BFS) method to compute the three-phase power flow of the distribution network. However, the convergence of the BFS method is more dependent on the size of the equivalent line impedance and load admittance, which limits the application of the BFS method in a large and unbalanced distribution network. To overcome this challenge of the branch flow method, power injection methods can also be used to approximate the power flow in the network [36]. The authors in [37] proposed the current injection method (CIM) to perform the power flow in the distribution network. Compared to the BFS method, CIM converges faster with fewer iterations even for an unbalanced and heavily loaded network [38].

With the increase in utilization of various measurement devices such as energy meters, phasor measurement units (PMUs), and intelligent electronics devices (IEDs) in the distribution network, data-driven modeling of the distribution networks based on the information from these measuring devices is gaining attention. With a proper mathematical formulation of the data, the distribution network can be modeled more accurately [39]. The authors in [40] proposed a data-driven model based on voltage sensitivity to approximate the radial and mesh distribution network using the enhanced formulation of the Z-bus matrix. Various machine learning algorithms are also implemented in the optimal voltage control application in a distribution network [41]. The application of machine learning algorithms removes the barrier of prior knowledge of the complete information of the network for modeling. Even in the case of data-driven modeling, in most cases, the data are processed by a mathematical model that describes the network property of the distribution network. Among several methods, the current mismatch method based on the current injection model gives a more precise model [42]. In the current injection method, the phase voltage of any terminal can be represented by the active and reactive power injections/absorption from generators/loads at that terminal.

Even with a detailed mathematical model of the distribution network, the optimization process takes time and, in some cases, convergence may not be achieved. They also require commercial solvers to solve the optimization problem. Another approach to avoid detailed mathematical modeling of the SDN in the optimization model is to model the network in the distribution system simulator and optimize them using co-simulation [43]. By co-simulation, the detailed mathematical model of the distribution network can be solved by the distribution network solver, and the optimization can be achieved in a short time. This method also reduces the convergence issues as the complicated power flow equations are solved in the co-simulation. Also, any type of network, either balanced or unbalanced, radial or mesh, and single-phase or polyphase, can be solved by this method. Several commercially available distribution network solvers such as OpenDSS, PSCAD, DigSilent PowerFactory, CYME-DIST, and GridLab-D to model the distribution network[44]. To implement the optimal voltage control algorithm in the distribution network, co-simulation-based modeling of the distribution network can also be a suitable option [45].

1.3 Scopes and contributions

In practical operation, DER outputs and loads may vary from the forecasted, affecting the operation of control strategies [46]. To incorporate the uncertainties of DER and load, as a result, DSOs are moving away from the traditional offline approach and switching to real-time mode. The availability of smart devices in smart inverters also allows real-time control and monitoring without further investment in communication and monitoring infrastructure. To implement real-time optimal control, the need to solve the optimization problem in short instants of time is demanding [27].

Hence, considering the fact that co-simulation-based optimization can give quicker and more precise solutions to optimization, this paper proposes a co-simulation-based optimal reactive power control method in SDN. The main contributions made by the authors in this article are:

  1. 1.

    The smart inverter injects or absorbs reactive power to adjust the voltage [47]. The absorption or injection of reactive power has a considerable impact on power loss since the R/X of the line in the distribution system is high. Therefore, when reactive power is deployed, the impact of network power loss should be considered. As a result, this scientific study formulates, analyses, and presents the optimal reactive power control based on co-simulation to minimize the power loss in the distribution network.

  2. 2.

    A comparison of three different optimization algorithms for models developed in two different distribution network simulators is carried out to propose a co-simulation-based optimal reactive power control using PV inverter.

  3. 3.

    To show the efficacy of the proposed co-simulation-based optimal reactive power control for computing optimal reactive power setpoints for the smart inverter, a time series analysis with variable PV power generation is presented.

Fig. 1
figure 1

A simplified layout of the distribution network with load and PV

1.4 Paper organization

The remainder of the paper is presented as described here. Section 2 describes a mathematical model to show the impact of reactive power on the voltage profile of the distribution network and highlights the importance of reactive power control of the inverter in maintaining the voltage profile. Section 3 presents the formulation of the proposed co-simulation model for optimal control. The general methodology to implement optimization using the proposed method is presented in Sect. 4. The simulated results and discussion of the results obtained are shown in Sect. 5. Finally, the last section highlights the main contributions of the article and suggests future research directions.

2 Impact of high integration of PVs in the distribution network

With the high integration of PV in the distribution network, the conventional presumption of unidirectional power flow and lower terminal voltage at the end of the distribution network is no longer applicable. As PV is installed at the point of common coupling (PCC), a load bus in such a network may become a generation bus. And this could create an increase in the terminal voltage at the time of higher RES generation and lower power consumption in loads. To understand the effect of PV at the PCC, a simple model with a mathematical model is taken as shown in Fig. 1.

Suppose V is the nominal voltage of the network, \(V_{1}\) and \(V_{2}\) are the voltages in \(\hbox {Bus}_1\) and \(\hbox {Bus}_{2}\). R and X are the resistance and reactance of the line between \(\hbox {Bus}_{1}\) and \(\hbox {Bus}_{2}\). And the load with active power \(P_\textrm{L}\) and reactive power \(Q_\textrm{L}\) is connected at \(\hbox {Bus}_{2}\). Similarly, the PV with an active and reactive power capacity of \(P_\textrm{PV}\) and \(\pm Q_\textrm{PV}\) is also installed at \(\hbox {Bus}_{2}\). The − sign of \(Q_\textrm{PV}\) indicates that the reactive power is supplied by the PV and the + sign indicates that it is consumed by the PV. The voltage regulation in this case is given by Eq. 1 [48]. To obtain the voltage at \(\hbox {Bus}_{2}\), this equation can be rewritten as Eq. 2.

$$\begin{aligned} V_1-V_2= & {} \frac{R\left( P_\textrm{L}-P_\textrm{PV}\right) +X\left( Q_\textrm{L}{\pm \ Q}_\textrm{PV}\right) }{V} \end{aligned}$$
(1)
$$\begin{aligned} V_2= & {} V_1-\frac{R\left( P_\textrm{L}-P_\textrm{PV}\right) +X\left( Q_\textrm{L}{\pm \ Q}_\textrm{PV}\right) }{V} \end{aligned}$$
(2)

From Eq. 2, it can be observed that the voltage at \(\hbox {Bus}_2\) is lower than that at \(\hbox {Bus}_1\) when the power generation from PV is lower than the power consumption from the load. However, the voltage might go higher than the voltage at \(\hbox {Bus}_1\), in case of higher power generation from the PV.

In case of a light load or no-load condition, it can be assumed that \(P_\textrm{L}=0\) and \(Q_\textrm{L}=0\) and then Eq. 2 can be expressed as Eq. 3 which shows the relationship of the injected power from PV at the PCC.

$$\begin{aligned} V_2=V_1+\frac{R\left( P_\textrm{PV}\right) +X\left( {\pm \ Q}_\textrm{PV}\right) }{V} \end{aligned}$$
(3)

From Eq. 3, it can be seen that the terminal voltage in the PCC can be regulated by controlling the active and reactive power output from the PV. Furthermore, the ability of the smart inverter to supply and consume reactive power might be useful in regulating the voltage in both ways, increasing or decreasing, depending on the requirement.

In this section, the impact of PV on the voltage profile at the PCC of the distribution network is presented as a simple case. However, in realistic distribution networks where single-phase loads and generation are connected, the effect of the DERs and load on each phase can be varied. But this can be analyzed with appropriate modeling of the distribution network.

3 Formulation of optimization model for co-simulation-based optimal reactive power control in SDN

Normally, the optimization model includes objective functions, constraints, and a suitable solver to solve the optimization problem. Depending on the purpose of optimization in the distribution network, a detailed mathematical model to solve the power flow equations in the networks is also required. These equations are defined as constraints in the optimization model. In most cases, solving these power flow equations, especially for three-phase unbalance power flow equations, is time-consuming. However, in the formulation of co-simulation-based optimization model for a distribution network, the detailed mathematical model for solving power flow equations in the distribution network need not be modeled. Power flow equations are solved in distribution network-specified software (DNSS). DNSS can solve the power flow equations more precisely and efficiently. This may result in faster convergence of such an optimization model. Moreover, co-simulation-based optimization is applied in a case where the objective function is a derived function of the computed parameters (for example, power loss in the network, voltage deviation, etc.) in DNSS. The most powerful behavior of co-simulation-based optimization is the modeling flexibility: it allows one to define objective functions and constraints using the parameters obtained from DNSS. These parameters can be easily assessed using user-defined functions. The optimization model is also capable to interact with the DNSS. Moreover, the co-simulation-based optimization model allows us to further modify the parameters of the distribution network to modify the constraints, controllable variables, and other required parameters in the optimization model. The optimization model is created separately using python-based libraries of DNSS.

In this section, the formulation of the optimization model for optimal reactive power control in the distribution network is discussed. From Eq. 3 in Sect. 2, it can be seen that the change in reactive power from PV can change the voltage level at the PCC. In a distribution network with high integration of PVs, the voltage level at all buses in the network can be regulated with the optimal amount of reactive power from PV. Once the voltage profile in the network is improved, the current flow in the lines between the two buses can be minimized. Lowering the current flow can result in lower power loss in the network. Therefore, finding the optimal amount of reactive power is of great importance in minimizing power loss in the network. For this purpose, the minimization of power loss (\(P_\textrm{loss}\)) in the network is considered the main objective function. Reactive power from PV inverters is considered a controllable variable. The objective function \(F\left( {x}\right) \) is given by Eq. 4.

$$\begin{aligned} \underset{x}{\min }{F\left( {x}\right) = P_\textrm{loss}\left( {x}\right) } \end{aligned}$$
(4)

Where controllable variable x is the vector of the reactive power from \(N_\textrm{pv}\) number of smart inverters available in the SDN.

$$\begin{aligned} x = \left[ Q_{\textrm{PV}_1},\ldots ,Q_{\textrm{PV}_j},\ldots ,Q_{\textrm{PV}_{N_\textrm{pv}}}\ \right] ^T \end{aligned}$$
(5)

Its power capability curve limits the reactive power limits of the smart inverter. Figure 2 shows the PV capability curve.

Fig. 2
figure 2

PV capability curve for inverter size and reactive power capability [49]

Each PV’s reactive power output is limited by its maximum apparent power and the active power it generates. Mathematically, Eq. 6 [50] is the reactive power available \((Q_{\textrm{PV}_j})\) from the smart inverter of size \((S_{\textrm{PV}_j})\) that produces the active power of \((P_{\textrm{PV}_j})\).

$$\begin{aligned} Q_{\textrm{PV}_j}\le \pm \sqrt{\left| {S_{\textrm{PV}_j}}\right| ^2\ -\ P_{\textrm{PV}_j}^2}\quad \forall j=1,\ldots ,N_\textrm{pv} \end{aligned}$$
(6)

In addition, according to the IEEE 1547-2018 standard, the reactive power of smart inverters can be limited to \(\pm 44\%\) of the rated capacity. The optimization model has one more constraint given by Eq. 7 [21].

$$\begin{aligned} -k\times {S_{\textrm{PV}_j}}\le Q_{\textrm{PV}_j}\le k\times {S_{\textrm{PV}_j}} \end{aligned}$$
(7)

in which \(k = 0.44\) pu and \(j=1,\ldots ,N_\textrm{pv}\). The optimization model also includes a voltage constraint. Many standards define the permissible voltage limits in the distribution network. In this scenario, however, the voltage limit is within 0.95 pu \(\left( V_i^\textrm{min}\right) \) and 1.05 pu \(\left( V_i^\textrm{max}\right) \). As a result, the voltage constraint used in this analysis is Eq. 8, where \(N_\textrm{bus} \) is the total number of buses in the SDN.

$$\begin{aligned} V_i^\textrm{min}\le \ V_i\le v_i^\textrm{max}\quad \forall \ i\ =\ 1,2,\ldots N_\textrm{bus} \end{aligned}$$
(8)

Equation 4 is the objective function of the problem, and Eqs. 6, 7, and 8 are the optimization constraints considered in this study.

4 Proposed methodology for co-simulation-based optimal reactive power control in SDN

Once the optimization model is developed (as described in Sect. 3, the next step is the implementation of the proposed methodology. For this purpose, the distribution network is first developed on a distribution network specialized software (DNSS) using all the properties (like line parameters, interconnections, etc.) of the network. The loads and the PVs are placed in the DNSS. The DNSS solves the power flow in the distribution network, so the detailed model for solving the power flow equations of the distribution network in the optimization model can be neglected. Various parameters required in the optimization model can be obtained from DSSS using user-defined functions. Data exchange is carried out by those user-defined functions. Most DNSS has Python-based libraries to run the simulation in engine mode. These user-defined functions also allow us to modify the parameters of the distribution network. This is how the proposed co-simulation-based optimization model coordinates between the DNSS and the optimization model.

Fig. 3
figure 3

Overall block diagram of optimal reactive power control based on co-simulation

A methodology for co-simulation-based optimization in an SDN is described in this section. Figure 3 depicts the overall block diagram to complete the optimization process. The objectives functions, constraints, and controllable variables are defined in the previous section. In this work, the x vector of the controllable variable, \(F\left( {x}\right) \), is the objective function. Once optimization is started, the optimization model sends the controllable variables to the DNSS. DNSS returns the objective function to the optimization model. The optimization model then checks if the returned objective function is meeting all the optimization requirements. If the requirements are not met, the process continues until the termination condition is reached. In this analysis, population-based optimization algorithms are used. Therefore, the optimization model continues to perform the same process until all the conditions are met. The optimization model then provides the one which gives the best solutions from different iterations.

Fig. 4
figure 4

Flowchart for the differential evolution optimization algorithm [51]

To provide a clear understanding of the implementation of the optimization algorithm, an example of the differential evolution algorithm is shown in Fig. 4. Since DE uses a population-based optimization technique, other factors include strategy, mutation, and recombination index, as well as population size. In the initial stage, the parameters seed, polish, tolerance, number of workers, and maximum iteration are initialized. The population’s fitness function is determined using the goal function when initialization is complete. The offspring are produced from the population and the fitness functions of the offspring are also calculated. In order to discover the best match, the parents’ population is replaced by the children if their fitness is higher than that of the parents. All populations go through this process again and again until the maximum number of iterations is reached. A similar algorithm can be implemented for other optimization algorithms. The fundamental difference while implementing the other algorithm is that the initialization parameters for specific algorithms need to be fixed.

5 Results and discussion

This section presents the simulation results obtained by the proposed method. OpenDSS and DIgSILENT PowerFactory are used as DNSS. Python-based defined functions are utilized to perform the co-simulation-based optimization and develop the optimization model. This section is divided into three subsections to describe the test system, simulation results, and the discussion on the results.

5.1 Test system

MV distribution feeders can be used in DER integration studies [52]. In this investigation, the CIGRE medium voltage distribution network established by the CIGRE Task Force C6.04 is used. The network is symmetric and balanced. However, the proposed methodology can be implemented in all types of distribution network studies. The test system consists of two conventional 20kV, 50 Hz three-phase feeders named feeder 1 and feeder 2. The feeder can be operated in a radial or meshed topology by turning on or off the switches S1, S2, and S3. In this analysis, all switches are assumed to be closed. The detail about the rating of the PV and load utilized in this analysis are shown in Tables 4, 5, and 6

To optimize the test system, three different optimization algorithms are considered, namely improved harmony search algorithm (IHS) [53], simplicial homology global optimization (SHGO) [54], and differential evolution (DE) [55]. In this analysis, the following parameters are considered for different optimization algorithms. For IHS, the following parameters were considered. The number of generations = 100, rate of choosing from memory = 0.9, minimum pitch adjustment = 0.35, maximum pitch adjustment = 0.99, minimum distance bandwidth =1e-5, and maximum distance bandwidth = 1. Similarly, for the DE algorithm, the following parameters were considered. strategy = best1bin, maxiter = 1000, popsize = 15, tol = 0.01, mutation = (0.5, 1), recombination = 0.7, seed = None, callback = None, disp = False, polish = True, atol = 0, updating = immediate, workers = 1, x0 = None. The sampling method for SHGO was considered to be simplicial.

5.2 Simulation results

First, the distribution network is simulated separately before optimization by setting the fixed power factor on the smart inverter. In this mode of operation, the power loss in the network is calculated. Later, the developed optimization model is used to obtain the optimal set points of reactive power. To perform a comparative analysis of different optimization algorithms, three different optimization algorithms are used to solve the optimization problem. The time required to obtain the optimal solution is taken as one of the metrics to compare the optimization results. For iterative optimization analysis, the frequency of obtaining the optimal solution and the frequency of finding the optimal solution is considered as the comparison matrices. The nature of individual optimization algorithms is different. IHS tackles multiobjective (unconstrained), constrained (single-objective), mixed-integer, and stochastic problems in Pygmo. On the other hand, SHGO is used for global optimization and is suitable for achieving global optimality in general-purpose NLP and black-box optimization problems. Differential evolution is stochastic in nature and does not use gradient methods to find the global minimum of a multivariate function. These algorithms are chosen for their unique diversity and applicability in this paper.

To create diversity in the analysis, three different types of simulation studies are considered. First, optimization is performed for a single optimization. Then to make a precise conclusion of the comparison of different optimization algorithms, iterative optimization (for 100 iterations) considering the same operating condition as considered in the first case is performed. To see the effect when PV power generation is varied, a time series analysis is also implemented for one of the algorithms.

5.2.1 Single optimization analysis for comparative analysis of different optimization algorithms

To check the performance of the individual algorithms in the proposed optimized model, first, the three algorithms are implemented separately. After completion of each optimization, the optimal setpoints for the reactive power are obtained for all PVs. Table 1 shows the comparison of the optimization variable, the optimized value, and the execution time.

Table 1 Comparison of the optimization algorithm in OpenDSS and DigSilent PowerFactory

5.2.2 Iterative optimization analysis for comparative analysis of different optimization algorithms

From simulation studies performed for a single iteration, among three different algorithms, SHGO provides the better optimized value; however, the optimization takes longer to converge. Since SHGO is a global optimization algorithm, it provides the same optimized value for several optimizations. However, the execution time and the output of the optimized variable may differ for different scenarios. Therefore, multiple iterations are only considered for two algorithms, DE and IHS.

To make a precise comparison, the optimization is simulated for both algorithms 100 times. The histogram and the box plot of the optimal values (that is, optimal reactive power setpoints for PV) obtained for 100 simulations are shown in Fig. 5.

Fig. 5
figure 5

Histogram and box plot for optimal values for 100 simulations of a DE in OpenDSS, b IHS in OpenDSS, c DE in PowerFactory, and d IHS in PowerFactory

Fig. 6
figure 6

Histogram and box plot for optimal values for 100 simulations of a DE in OpenDSS, b IHS in OpenDSS, c DE in PowerFactory and d IHS in PowerFactory

A similar analysis is performed to assess the total time needed to complete the optimization process. The histogram plot and the box plot for the execution time derived from 100 simulations are shown in Fig. 6.

5.2.3 Time series co-simulation-based optimization for optimal reactive power control in SDN

To support the analysis with different scenarios, in this subsection, the variation in PV power generation is considered. For this purpose, the intermittent nature of PV is considered. The nature of the PV profile is taken from[13]. The individual PV ratings are then computed by multiplying the PV profile with the PV rating connected to the distribution network. In this analysis, it is assumed that all installed PVs follow the same profile throughout the day. However, the total power production from each PV throughout the day depends on the PV rating of that individual PV. Figure 7 shows the PV power profile of the day with a resolution of 5 min.

After completion of the optimization using the proposed method, the optimal setpoints of reactive power will be achieved for all PVs. Figures 8 and 9 show the reactive power profile obtained for \(PV_1\) and \(PV_8\). Similarly, the reactive power profiles of all other PVs are obtained but are not shown here.

Fig. 7
figure 7

PV power profile throughout the day with 5-min resolution

Fig. 8
figure 8

Optimal reactive power profile of PV1 throughout the day

Fig. 9
figure 9

Optimal reactive power profile of PV8 throughout the day

5.3 Discussion on simulation results

The proposed methodology is implemented in the CIGRE MV distribution network using three different optimization algorithms. On the basis of the simulation results, the discussion is also divided into three subsections. First, the analysis for single optimization is discussed. Later, iterative optimization is discussed. Finally, in the last subsection, the discussion of the finding of the proposed method on time series co-simulation-based optimization is presented. A comparison in terms of the time required to obtain optimal solutions is also presented.

5.3.1 Discussion on single optimization analysis

When the distribution network was operated with a constant power factor (without optimization) of PV, the total active power loss in the system was found to be 117.16 kW. On the other hand, the total active power loss in the network with the implementation of the proposed method is lower. With optimal setpoints for the PV inverter, the power loss in the network is reduced. Table 2 shows the comparison of active power loss in the distribution network with fixed power factor and with optimal setpoints of reactive power for PV inverters.

5.3.2 Discussion on iterative optimization analysis

From the iterative optimization studies (for 100 iterations) performed between the models created in OpenDSS and PowerFactory, convergence was found to be faster in the case of a model designed in OpenDSS. For obtaining a better optimal solution, the DE algorithm modeled in OpenDSS is more suitable. On the other hand, the DE solves the optimization problem in a short time.

From the iterative analysis, it is observed that for the model developed in OpenDSS, the probability of obtaining the optimal value (i.e., power loss) of 107.60 kW and 107.85 kW using DE and IHS is 32 % and 27 %, respectively. However, the optimal values do not deviate much from the mean value in this case. The mean values are taken as the values obtained from a single optimization in the previous subsection. Similarly, for the model developed in PowerFactory, 36% and 29% are the probability of obtaining optimal values of 109.95 and 109.78 using IHS and DE, respectively.

Similarly, the probability of attaining an optimal solution in 0.036 s and 1.19 s using DE and IHS for the OpenDSS model was found to be 80% and 91%, respectively. Similarly, for the PowerFactory model, the probability of reaching ideal values in 0.84 s and 9.53 s using DE and IHS, respectively, is 40% and 30%. In this case, the average time is the value obtained from a single optimization in the previous subsection.

5.3.3 Discussion on time series co-simulation-based optimization

From time series co-simulation-based optimization using the proposed method, the reactive power setpoints of all PVs installed in the considered test network are obtained. The obtained reactive power setpoints are for a period of time with a 5-min time step. The proposed method is capable of computing the reactive power setpoints in order to maintain a minimum power loss in the network. The authors also mention that the co-simulation-based optimization method is suitable for optimizing the problem with specific objective functions. The criteria for selecting co-simulation-based optimization depend on the purpose of the application and the methodology that is implemented. Since the main continuation of this research is to identify the appropriate co-simulation-based optimization, convergence time is considered the major indicator for identifying the best fit.

Table 2 Comparison of power loss in the network with fixed power factor and with optimal setpoints of reactive power for PV inverter
Table 3 Comparison of time for optimization

In this paper, the authors only make a comparison based on the time of convergence. Table 3 shows that the time required to solve the optimization by the proposed method is less than that proposed in [13].

6 Conclusion

This paper introduces a co-simulation-based optimal reactive power control from smart inverters in smart distribution networks, aiming to minimize power loss by optimizing reactive power set points of PV inverters. The proposed method effectively reduces the total active power loss, as evidenced by a decrease in total active power loss from 117.16 to 107.85 kW in the test network without and with optimization, respectively. This reduction demonstrates the ability of the proposed approach to enhance system efficiency by minimizing the total power loss in the distribution network.

Table 4 MV distribution network benchmark application: parameters of PV units [56]
Table 5 MV distribution network benchmark application: parameters of residential load
Table 6 MV distribution network benchmark application: parameters of commercial load

To simplify the mathematical modeling of the distribution network in the optimization model, the paper presents a co-simulation-based approach that eliminates the need for complex power flow equation modeling. Using the distribution network solver, the approach achieves faster convergence and facilitates real-time applications in distribution networks. With an impressive mean time to convergence of 0.036 s for a single optimization scenario, the proposed method is suitable for real-time control applications. Additionally, the co-simulation approach outperforms the detailed mathematical modeling using the current injection method in terms of optimizing the distribution network. The total time to obtain optimal solutions decreased from 199.87 to 117.85 s using the proposed method.

The results from the time series co-simulation-based optimization confirm the effectiveness of the proposed method in achieving optimal control in distribution networks. Furthermore, the flexibility of the proposed approach, independent of the network choice, enables the utilization of various optimization approaches in the distribution network. Future applications may involve real-time optimization, specifically in the implementation of digital twin-based real-time optimal reactive power control in distribution networks. These findings underscore the potential for further advancements and investigation of optimal control applications in real-time in smart distribution networks.