1 Introduction

In traditional power distribution systems, the conventional Volt/Var control (VVC) scheme aims to maintain voltage profiles within an acceptable range and to attain optimal reactive power flows over the distribution feeders. In traditional paradigm, these objectives were usually achieved by proper coordination among the on-load tap changers (OLTCs), switched and fixed capacitors as well as step voltage regulators at distribution level [1, 2]. In [1], a two-stage process has been designed to coordinate control method for an OLTC with switching capacitors in distribution systems aiming at reducing the operation numbers of them. In [2], the VVC issue has been first formulated with fuzzy sets and then a simulated annealing technique has been adopted to find an optimal combination of OLTC positions and switching capacitors in a day.

In recent years, owing to the high integration of distributed energy resources (DERs) into the distribution systems, it seems economical that DERs efficiently take part in the VVC issue [3]. If this extension is well managed by distribution system operator (DSO), some economic benefits can be achieved such as bus voltage improvement, line loss alleviating, postponing distribution network upgrade, mitigating of customers’ interruption costs as well as CO2 emissions reduction. In [4], losses reduction has been translated to an economic benefit and computed during peak hours. To alleviate the congested feeders, DSOs have to upgrade a large part of the distribution network which is extremely costly. DER installation decreases power flow in the feeders and eventually postpones the necessity of upgrading some overloaded feeders. To sit and size of distributed generation (DG) installation, a sequential elimination method with multistage planning analysis has been proposed in [5]. In [6], a combined system of PV and battery has been employed to supply customers who have been interrupted and the impact of DERs on the interruption costs have been calculated. Authors of [7] have determined CO2 reduction cost reached by deployment of wind power with considering security.

Presently, most of the grid-connected DERs are routinely managed to operate at a fixed or even unity power factor to avoid incompatibility with other conventional VVC devices at distribution level [8]. In [9], an independent power sharing unit for DERs has been proposed to control the power exchange and coordinated control of load power sharing among three phases and to prepare full utilization of the produced energy of DERs. A nonlinear disturbance observer based DC-bus voltage control in [10] has been designed to improve the power quality in a micro-grid system with renewable DERs. Commonly, the distribution systems have radial configuration that consists of the feeders with low X/R lines. This issue causes the VVC scheme to be affected considerably by the active power output of DERs. There are two main structures for managing VVC problem; centralized control in an off-line manner and real-time control in an on-line manner. In the first structure, dispatching schedules of all capacitor banks, adjustment of OLTC transformer taps and the reactive power of DERs are optimally determined according to the load forecasted a day ahead. In this method, different objective functions such as the electrical energy costs, active power losses of the distribution system, sum of voltage deviations at the nodes of the network as well as the total CO2 emissions of fuel fired electric generating units were utilized in the literature as the policies to accomplish the VVC scheme [11,12,13,14,15]. In [11], the optimum allocation of reactive power among all var sources has been determined based on Benders decomposition algorithm.

A simultaneous active-reactive power dispatch schedule model has been introduced in [12] for modern distribution systems including renewable energy resources and responsive loads. In [13], a scenario-based probabilistic structure has been developed to extend a joint energy and VAr market for smart grids to cope with the uncertainties of forecasted load demands and wind power output. Environmental and economic aspects of VVC scheme in distribution systems have been discussed in [14]. Samimi et al. [15] have introduced a market-based approach to encourage DGs owners to competitively participate in the daily VVC. The proposed method optimally determines the dispatch scheduling of active-reactive power of generation units, reactive power of switching capacitor, and tap positions of OLTCs for next day.

On the other hand, in the second structure for VVC, the voltage/ reactive power control devices are managed based on the real-time and local measured data acquired by remote terminal units (RTUs). In [16, 17], using supervisory control and data acquisition (SCADA) performance and two-way communication architecture in distribution systems, real-time var control algorithms are introduced to coordinately control the switched shunt capacitors, so that system losses are minimized and admissible voltage profiles are maintained.

So far, in many research works, the reactive power markets in the deregulated electric power systems at transmission level have been investigated [18,19,20,21,22]. In [18], a quadratic reactive power cost function has been introduced by the authors to optimize reactive power procurement. In order to financially compensate a synchronous generator for its Volt/Var support, the expected payment function of generator has been defined in such a way that all Var market participants can easily offer reactive bids to the independent system operator (ISO) [19]. Accordingly, based on the Var offers and the technical operation constraints, a two-step model has been introduced for the reactive power planning. The authors of [20] have designed a reactive power market in which the reactive power capability diagram of synchronous generators has been utilized to extract the reactive power cost and then propose a four-component reactive power bidding structure. Amjady et al. [21] have introduced a day-ahead Var market in which pay-as-bid mechanism has been used to clear reactive power market. Minimization of total costs related to simultaneous energy and reactive power production besides the costs of energy not supplied (ENS) has been used as an objective function to clear a simultaneous active-reactive power market involving reserve market [22].

However, few studies have been reported about running the complete active-reactive power dispatch scheduling in distribution systems considering high penetration of DERs. Moreover, in few research papers about VVC at distribution level, the cost model of provided reactive power by DERs and the Var capability curves of DERs have been addressed. Hence, developing a price-based compensation methodology is essential for delivered reactive power by the DERs. Because of the growth of DERs penetration into the distribution systems, extension of the energy-Volt/Var markets in distribution systems with participating DERs is gaining more importance. In the deregulated electricity markets, the Disco owners buy the essential energy and reactive power from the pool market and then retail it to the consumers at a fixed price. In most of previous research works on the resource scheduling at distribution level, the cost of reactive power procured by the Disco from the upstream grid (at wholesale market level) has not been considered. Here, it has been assumed that the energy prices as well as the reactive power prices of the upstream market are available by Disco for the next day (24-hour period). In this paper, an economical resource scheduling model is introduced considering the DERs, capacitor banks and OLTCs for the complete active-reactive power scheduling. To attain this purpose through the proposed model, a generic structure of reactive power offers is also proposed for DERs.

The innovative contributions of this paper can be highlighted as follows:

  1. 1)

    To develop a new active/reactive bid-based model for optimal resource scheduling.

  2. 2)

    To propose a two-stage model to achieve the simultaneous optimal active-reactive power scheduling of the DERs.

  3. 3)

    To consider the charge of reactive power support purchased by the Disco from the upstream grid in the suggested model.

The rest of this paper is structured as follows. Section 2 introduces the reactive power bidding model for DERs. The proposed complete active-reactive power scheduling formulation is described in Sect. 3. Section 4 discusses the numerical simulation results of the suggested method. Finally, the main conclusions of the paper are summarized in Sect. 5.

2 Reactive power bidding model for DERs

To offer price in the reactive power market, a comprehensive structure of reactive power bidding is introduced for DERs by utilization of their reactive power capability diagrams. In smart distribution systems, DERs can be divided into two main types from the connectivity to the network viewpoint. The first type includes synchronous generator-based DERs (e.g. biomass generator units and gas turbines (GTs)) that are connected to the grids without power electronic interfaces [23]. However, the DERs of the second type, i.e., inverter based-DERs (e.g., fuel cells (FCs), micro turbines (MTs) and photovoltaic (PV) units) are integrated into the grid via power electronic converters [24, 25]. Figure 1 shows a schematic structure of a DER connected to the grid via an inverter. The reactance X c is the equivalent reactance of the DER transformer as well as filters for connecting the DER to the network.

Fig. 1
figure 1

Structure of inverter based-DER

The grid-side converter imposes constraints on the real and reactive power output of a DER. The maximum producible reactive power of an inverter based-DER is defined as \(Q_{DER}^{c}\) which is given by [25]:

$$Q_{DER}^{cap} = \hbox{min} \left\{ {Q_{DER}^{c} , Q_{DER}^{v} } \right\}$$
(1)
$$Q_{DER}^{c} = \sqrt {\left( {V_{g} I_{{c,{ \hbox{max} }}} } \right)^{2} - \left( {P_{DER} } \right)^{2} }$$
(2)
$$Q_{DER}^{v} = \sqrt {\left( {\frac{{V_{g} V_{{c,{ \hbox{max} }}} }}{{X_{c} }}} \right)^{2} - \left( {P_{DER} } \right)^{2} } - \frac{{V_{g}^{2} }}{{X_{c} }}$$
(3)

where \(Q_{DER}^{c}\) and \(Q_{DER}^{v}\) are the maximum amounts of reactive power (Q) capability of the inverter based-DER restricted by converter current and voltage ratings; \(I_{{c,{ \hbox{max} }}}\) and \(V_{{c,{ \hbox{max} }}}\) are the maximum current and voltage values of the converter; \(V_{g}\) is the voltage at the connection point of the DER to the network; \(P_{DER}\) is the active power production of the DER.

Moreover, the Q capability diagram of a DER based on synchronous machine, such as a GT, has been shown in Fig. 2 [24]. There are active distribution networks in which the system operator contracts with DERs that are committed to deliver a compulsory reactive power to the grid according to given grid policies. In this paper, the grid policy requirement is supposed to be such that each DER must be operated within an obligatory leading power factor \((p_{mand} )\) and lagging \(p_{mand}\) range at any real power production.

Fig. 2
figure 2

Q capability diagram of synchronous machine based-DER

Here, the Q capability diagram of a synchronous generator based-DER is implemented to introduce a comprehensive structure of reactive power bidding for DERs. This model can be implemented for both types of DERs.

According to above explanations, performance of a DER from reactive power provision viewpoint, at an initial planned real power output \(P_{A}\), can be divided into three different regions as follows:

2.1 Region 1 (\(- \varvec{Q}_{{\varvec{mand}}}^{\varvec{A}}\) to \(\varvec{Q}_{{\varvec{mand}}}^{\varvec{A}}\))

In this area, absorption and injection of reactive power are based on the compulsory reactive power requisite in accordance with the grid rules. It is proposed that the DER can be paid only an availability charge with an offered price \(\rho_{0}\) in $/hour. This price indicates a fixed component representing the share of an owner’s capital cost that is assigned to reactive power support.

2.2 Region 2 (\(\varvec{Q}_{{\varvec{mand}}}^{\varvec{A}}\) to \(\varvec{ Q}_{\varvec{A}}\)) and (\(\varvec{Q}_{{\varvec{DER}}}^{{{\mathbf{min}}}}\) to \(- \varvec{Q}_{{\varvec{mand}}}^{\varvec{A}}\))

In this section, the initial scheduled real power generation of the DER is not influenced by production or absorption of reactive power. However, production or absorption of reactive power more than mandatory values will increase active losses in the winding and converter switches of the DER and; hence, the DER can expect to get the charge of losses along with the availability cost component for its reactive power support. Two offered losses costs are considered for this region: price \(\rho_{1}\)in $/Mvarh for operating in the zone (\(Q_{DER}^{ \hbox{min} }\) to \(- Q_{mand}^{A}\)) and price \(\rho_{2}\) in $/Mvarh for operating in the zone (\(Q_{mand}^{A}\) to \(Q_{A}\)) [26].

2.3 Region 3 (\(\varvec{Q}_{\varvec{A}}\) to \(\varvec{ Q}_{{\varvec{DER}}}^{{{\mathbf{max}}}}\))

In this section, the DER is obliged by the system operator to lessen its initial planned real power output in order to fulfil the reactive power necessities of the grid. If the amount of reactive power delivered by the DER is \(Q_{B}\), the operating point is necessary to shift back along the Q capability diagram border to point \((P_{B} ,Q_{B} )\), in which \(P_{B} < P_{A}\). Hence, the DER loses the revenue from sale of its active power. Consequently, along with two other mentioned components, the DER deserves getting an extra payment in accordance with its lost opportunity cost (LOC) resulted from the reduction in active power generation. Here, LOC is calculated based an adjustment bid submitted by DER [27, 28]. The adjustment bid indicates the maximum change in the DER’s initial planned real power that the DER admits besides the corresponding price that it is willing to acquire for that change. In Region 3, if the desired adjustment in the initial real power schedule is demonstrated by \(\Delta P^{Adj}\) variable, the LOC is computed by multiplying the adjustment price (\(\rho_{Adj}\)) and \(\left| {\Delta P^{Adj} } \right|\).

It is worth noting that the degradation of the primary scheduled real power of a DER may arise from the operational limitations and security constraints. The adjustment in the initial scheduled real power of a DER, corresponding to this degradation, may be positive or negative values for which, the DER will be paid in accordance with its adjustment bid price. Accordingly, the cost model of reactive power delivered by a DER can be obtained as follows:

$$C\left( {Q_{DER} } \right) = \left\{ {\begin{array}{*{20}l} {\rho_{0} } & { - Q_{mand}^{A} \le Q_{DER} \le Q_{mand}^{A} } \\ {\rho_{0} - \rho_{1} \left( {Q_{DER} + Q_{mand}^{A} } \right)} & {Q_{DER}^{ \hbox{min} } \le Q_{DER} \le - Q_{mand}^{A} } \\ {\rho_{0} + \rho_{2} \left( {Q_{DER} - Q_{mand}^{A} } \right)} & {Q_{mand}^{A} \le Q_{DER} \le Q_{A} } \\ {\rho_{0} + \rho_{2} \left( {Q_{B} - Q_{mand}^{B} } \right) + \rho_{Adj} \left| {\Delta P^{Adj} } \right|} & {Q_{A} \le Q_{DER} = Q_{B} \le Q_{DER}^{ \hbox{max} } } \\ \end{array} } \right.$$
(4)

where \(\Delta P^{Adj}\) is obtained as:

$$\Delta P^{Adj} = P_{B} - P_{A}$$
(5)

The Q payment model (4) can be formulated mathematically using binary variables \(B_{0} , B_{1}\), \(B_{2}\) and a set of mathematical equations as given in the following:

$$C\left( {Q_{DER} } \right) = B_{0} \rho_{0} + B_{1} \left( {\rho_{0} - \rho_{1} \left( {Q_{1DER} + Q_{mand} } \right)} \right) + B_{2} \left( {\rho_{0} + \rho_{2} \left( {Q_{2DER} - Q_{mand} } \right)} \right) + \rho_{Adj} \left| {\Delta P^{Adj} } \right|$$
(6)
$$B_{0} + B_{1} + B_{2} \le 1$$
(7)
$$- B_{0} Q_{mand} \le Q_{0DE} \le B_{0} Q_{mand}$$
(8)
$$B_{1} Q_{DER}^{ \hbox{min} } \le Q_{1DER} \le - B_{1} Q_{mand}$$
(9)
$$B_{2} Q_{mand} \le Q_{2DER} \le B_{2} Q_{cap}$$
(10)
$$Q_{mand} = (P_{A} +\Delta P^{Adj} ){ \tan }\left( {{ \cos }^{ - 1} \left( {p_{mand} } \right)} \right)$$
(11)
$$Q_{DER} = Q_{0DER} + Q_{1DER} + Q_{2DER}$$
(12)

In (10), \(Q_{cap}\) is located on the upper limiting curve of the Q-capabilty diagram, and it is determined based on the amount of final scheduled real power of the DER, i.e., \(P_{A} +\Delta P^{Adj}\). In (6), the binary variables \(B_{0}\), \(B_{1}\), \(B_{2}\) are defined to display that the DER can operate in only one of the three specified regiones. Equation (7) is employed to indicate this isue. In (10) and (11), when the DER is operated in Region 3, \(\Delta P^{Adj}\) variable is applied; otherwise, it is set to zero. When the DER does not participate in the Var market, we have \(B_{0} = B_{1} = B_{2} = 0\) and the constraint (7) is satisfied in the inequality form (0 < 1). Otherwise, when the DER operates in one of the three given regions, the constraint (7) is satisfied in the equality form (1 = 1). If the DER is managed in Region 1, \(B_{0} = 1\), \(B_{1} = B_{2} = 0\) and according to (8),  \(Q_{0DER}\) lies inside region \(( - Q_{mand}^{A} \;{\text{to}}\;Q_{mand}^{A} )\). Also, we have \(Q_{1DER} = Q_{2DER} = 0\). If the DER operates in region \((Q_{DER}^{ \hbox{min} } \;{\text{to}}\; - Q_{mand}^{A} )\), then \(B_{1} = 1\) and \(B_{0} = B_{2} = 0\). According to (9), \(Q_{1DER}\) will become non-zero, and it is in the range of \((Q_{DER}^{ \hbox{min} } \;{\text{to}}\; - Q_{mand}^{A} )\). If the DER operates in region \((Q_{mand}^{A} \;{\text{to}}\; Q_{A} )\), then we have \(B_{2} = 1\), \(B_{0} = B_{1} = 0\) and \(\Delta P^{Adj} = 0\). Therefore, according to (10) and (11), \(Q_{2DER}\) will become non-zero, and it falls into the region (\(Q_{mand}^{A}\) to \(Q_{A}\)); where \(Q_{A} = Q_{cap}\). Finally, if the DER operates in Region 3, \(B_{2} = 1\), \(B_{0} = B_{1} = 0\) and also, \(\Delta P^{Adj}\) variable becomes non-zero. In such case, the reactive power of DER which will be \(Q_{B}\) can be obtained using (10) as follows:

$$Q_{2DER} = Q_{B} = Q_{cap}$$

Finally, we can rewrite (6) as:

$$C\left( {Q_{DER} } \right) = C_{DER} \left( {Q_{DER} } \right) + \rho_{Adj} \left| {\Delta P^{Adj} } \right|$$
(13)

where \(C_{DER} \left( {Q_{DER} } \right)\) denotes the reactive power cost provided by the DER without LOC as:

$$C_{DER} \left( {Q_{DER} } \right) = B_{0} \rho_{0} + B_{1} \left( {\rho_{0} - \rho_{1} \left( {Q_{1DER} + Q_{mand} } \right)} \right) + B_{2} \left( {\rho_{0} + \rho_{2} \left( {Q_{2DER} - Q_{mand} } \right)} \right)$$
(14)

3 Complete active-reactive power scheduling formulation

3.1 Preliminary day-ahead scheduling of active power

In the first stage of the proposed approach, a preliminary day-ahead active power scheduling which is a linear programming (LP) model will be performed. The DSO executes the preliminary scheduling problem for only the predicted load demand while disregarding the operation constraints related to the network. Indeed, the active power constraints of DERs and the constraint of load balance are only considered in this problem. To this end, first, the generation units including DERs and Disco offer their hourly energy bids to the DSO. Then, a uniform price auction is accomplished by the DSO for the whole distribution network to determine selected generating units along with the corresponding active power generation for the next day. Accordingly, the preliminary day-ahead active power scheduling is attained by minimizing the total electrical energy costs of DERs and Disco according to the defined load demand as:

$$\hbox{min} \quad C_{Energy}^{{}} = \mathop \sum \limits_{h = 1}^{{N_{h} }} P_{Disco}^{ini,h}\uppi_{Disco}^{h} + \mathop \sum \limits_{h = 1}^{{N_{h} }} \mathop \sum \limits_{i = 1}^{{N_{DER} }} P_{DER,i}^{ini,h}\uppi_{DER,i}^{h}$$
(15)

Subject to:

$$0 \le P_{Disco}^{ini,h} \le P_{Disco}^{ \hbox{max} }$$
(16)
$$P_{DER,i}^{ \hbox{min} } \le P_{DER,i}^{ini,h} \le P_{DER,i}^{ \hbox{max} }$$
(17)
$$P_{Disco}^{ini,h} + \mathop \sum \limits_{i = 1}^{{N_{DER} }} P_{DER,i}^{ini,h} = \mathop \sum \limits_{n = 1}^{{N_{bus} }} P_{D,n}^{h}$$
(18)

where \(P_{Disco}^{ini,h} / P_{DER,i}^{ini,h}\) is preliminary scheduled active power of Disco/ith DER at hth hour; \(\pi_{Disco}^{h} / \pi_{DER,i }^{h}\) is offered electrical energy price of Disco/ith DER at hth hour; \(P_{Disco}^{ \hbox{max} } /P_{DER,i}^{ \hbox{max} }\) is the maximum active power of Disco/ith DER; N DER is the total number of DERs; N h is the number of hours; N bus is the toal number of nodes of the network.

Equations (16) and (17) indicate the active power constraints of the generating units, and (18) denotes the load balance constraint. The LP optimization problem of preliminary scheduling will provide the cleared generation bids along with market clearing price (MCP) at each hour. MCP is expressed as the maximum price bid that is accepted. The preliminary active power scheduling of units is adopted by the DSO to accomplish the second stage of complete active-reactive power scheduling model.

3.2 Proposed reactive power scheduling model

The proposed market based framework for reactive power scheduling is accomplished based on the reactive power and adjustment bids submitted by the Disco and the DERs to the DSO as well as the results of the preliminary active power scheduling. Optimal reactive power scheduling will be achieved by utilization of an optimization problem as described in the following:

3.2.1 Objective function

The objective function for optimal reactive power scheduling model that should be minimized consists of four components: ① the total cost of purchasing active power for active power losses balancing of the network; ② the total adjustment costs corresponding to the necessary changes in the primarily scheduled active power in order to satisfy the technical and security constraints; ③ the total costs of reactive power that is provided by DERs; ④ the cost of reactive power provided by Disco (i.e., procured from the main grid). The various components of the objective function are detailed in the following:

1) Total cost of purchasing active power for active power losses balancing

As mentioned, the preliminary active power scheduling is achieved in accordance with the predicted load without considering the network. Hence, the primarily dispatched active powers should be increased to allocate the required active power for balancing active power losses. The required changes are represented by a set of the non-negative variables denoting the amount of contribution of DERs and Disco for balancing active power losses. Accordingly, the total power losses cost is given as:

$$f_{1} = \mathop \sum \limits_{h = 1}^{{N_{h} }}\Delta P_{Disco}^{L,h} MCP^{h} + \mathop \sum \limits_{h = 1}^{{N_{h} }} \mathop \sum \limits_{i = 1}^{{N_{DER} }}\Delta P_{DER,i}^{L,h} MCP^{h}$$
(19)

where \(\Delta P_{Disco}^{L,h} /\Delta P_{DER,i}^{L,h}\) is the generation adjustment related to the contribution of Disco/ith DER to balance active power losses at hth hour; and \(MCP^{h}\) is market clearing price at hour h.

2) Total adjustment costs corresponding to necessary changes in primarily active power scheduling

Due to the adoption of operation constraints as well as the activation a certain amount of reactive power generation in Region 3 by a DER, the preliminary active power scheduling of DERs and Disco may be required to be changed. Variables \(\Delta P_{DER}^{Adj}\) and \(\Delta P_{Disco}^{Adj}\) which could be positive or negative, are used to represent the generation adjustments for each DER and Disco, respectively. For these changes, generating units will be paid based on their adjustment bid prices. Therefore, the second component of the objective function can be computed as follows:

$$f_{2} = \mathop \sum \limits_{h = 1}^{{N_{h} }} \left| {\Delta P_{Disco}^{Adj,h} } \right|\rho_{Adj, Disco}^{h} + \mathop \sum \limits_{h = 1}^{{N_{h} }} \mathop \sum \limits_{i = 1}^{{N_{DER} }} \left| {\Delta P_{DER,i}^{Adj,h} } \right|\rho_{Adj,DER,i}^{h}$$
(20)

where \(\Delta P_{Disco}^{Adj,h} /\Delta P_{DER,i}^{Adj,h}\) is the amount of generation regulation of Disco/ith DER at hth hour resulting from the enforcement of operation constraints; and \(\rho_{Adj,Disco}^{h} /\rho_{Adj,DER,i}^{h}\) is the adjustment price offered by Disco/ ith DER at hth hour.

3) Total costs of reactive power support supplied by DERs regardless of LOC

The LOC of a DER is taken into account in the second component of the objective function. Consequently, the reactive power cost provided by DER without LOC is expressed as the third part of the objective function as follows:

$$f_{3} = \mathop \sum \limits_{h = 1}^{{N_{h} }} \mathop \sum \limits_{i = 1}^{{N_{DER} }} C_{DER,i} (Q_{DER,i}^{h} ) = \mathop \sum \limits_{h = 1}^{{N_{h} }} \mathop \sum \limits_{i = 1}^{{N_{DER} }} \left\{ {B_{{0,DER_{i} }}^{h} \rho_{0,i} + B_{{1,DER_{i} }}^{h} \left[ {\rho_{0,i} - \rho_{1,i} \left( {Q_{1DER,i}^{h} + Q_{mand,i}^{h} } \right)} \right] + B_{{2,DER_{i} }}^{h} \left[ {\rho_{0,i} + \rho_{2,i} \left( {Q_{2DER,i}^{h} - Q_{mand,i}^{h} } \right)} \right]} \right\}$$
(21)

where \(Q_{DER,i}^{h}\) shows the planned reactive power of ith DER at hth hour.

4) Price of reactive power procured by Disco from upstream grid

In the deregulated electricity markets, the Disco owner commonly buys the necessary reactive power from the transmission Var market and then retails it to the consumers at a fixed price, as given by (20):

$$f_{4} = \mathop \sum \limits_{h = 1}^{{N_{h} }} C(Q_{Disco}^{h} ) = \left| {Q_{Disco}^{h} } \right|\rho_{Q,Disco}^{h}$$
(22)

where \(Q_{Disco }^{h}\) is the dispatched reactive power of Disco at hth hour; and \(\rho_{Q,Disco}^{h}\) is the reactive bid price offered by Disco at hth hour.

Hence, the objective function of the optimal reactive power scheduling model is given in the following:

$$\hbox{min} \quad f = f_{1} + f_{2} + f_{3} + f_{4}$$
(23)

3.2.2 Constraints

In order to obtain the optimal complete active-reactive power scheduling, the operation constraints of the network should be satisfied. The constraints of the proposed active-reactive power scheduling model, besides the power flow equations, are expressed as follows:

1) Constraints of active power adjustment variables of Disco and DERs:

$$\left| {\Delta P_{Disco}^{Adj,h} } \right| \le x_{Disco}^{ \hbox{max} } P_{Disco}^{ini,h}$$
(24)
$$\left| {\Delta P_{DER,i}^{Adj,h} } \right| \le x_{DER,i}^{ \hbox{max} } P_{DER,i}^{ini,h}$$
(25)

where \(x_{Disco}^{ \hbox{max} } /x_{DER,i}^{ \hbox{max} }\) is the maximum admitted change with repect to the preliminary active power scheduling of Disco/ith DER.

2) Sum of contribution of generating units for active power losses balancing:

$$P_{Loss}^{h} =\Delta P_{Disco}^{L,h} + \mathop \sum \limits_{i = 1}^{{N_{DER} }}\Delta P_{DER,i}^{L,h}$$
(26)

where \(P_{Loss}^{h}\) is the active power losses of the network at hth hour.

3) Constraints of active power of DERs and Disco

$$0 \le P_{Disco}^{final,h} \le P_{Disco}^{ \hbox{max} }$$
(27)
$$P_{DER,i}^{ \hbox{min} } \le P_{DER,i}^{final,h} \le P_{DER,i}^{ \hbox{max} }$$
(28)
$$P_{Disco}^{final,h} = P_{Disco}^{ini,h} +\Delta P_{Disco}^{L,h} +\Delta P_{Disco}^{Adj,h}$$
(29)
$$P_{DER,i}^{final,h} = P_{DER,i}^{ini,h} +\Delta P_{DER,i}^{L,h} +\Delta P_{DER,i}^{Adj,h}$$
(30)

where \(P_{Disco}^{final,h} /P_{DER,i}^{final,h}\) is the final active power scheduling of Disco/ith DER at hth hour.

4) Constraint of reactive power of Disco

$$Q_{Disco}^{{h,{ \hbox{min} }}} \le Q_{Disco}^{h} \le Q_{Disco}^{{h,{ \hbox{max} }}}$$
(31)

5) Operation constraints of DERs for reactive power support that were explained in Sect. 2:

$$B_{0,DER,i}^{h} + B_{1,DER,i}^{h} + B_{2,DER,i}^{h} \le 1$$
(32)
$$- B_{0,DER,i}^{h} Q_{mand,i}^{h} \le Q_{0DER,i}^{h} \le B_{0,DER,i}^{h} Q_{mand,i}^{h}$$
(33)
$$B_{1,DER,i}^{h} Q_{DER,i}^{ \hbox{min} } \le Q_{1DER,i}^{h} \le - B_{1,DER,i}^{h} Q_{mand,i}^{h}$$
(34)
$$B_{2,DER,i}^{h} Q_{mand,i}^{h} \le Q_{2DER,i}^{h} \le B_{2,DER,i}^{h} Q_{cap,i}^{h}$$
(35)
$$Q_{mand,i}^{h} = \left( {P_{DER,i}^{ini,h} +\Delta P_{DER,i}^{L,h} +\Delta P_{DER,i}^{Adj,h} } \right){ \tan }\left( {{ \cos }^{ - 1} \left( {p_{mand} } \right)} \right)$$
(36)
$$Q_{DER,i}^{h} = Q_{0DER,i}^{h} + Q_{1DER,i}^{h} + Q_{2DER,i}^{h}$$
(37)

6) Constraints of steps of switched shunt capacitors

$$CStep_{i}^{ \hbox{min} } \le CStep_{i}^{h} \le CStep_{i}^{ \hbox{max} }$$
(38)

where \(CStep_{i}^{h}\) is the step position of ith capacitor at hth hour; \(CStep_{i}^{ \hbox{min} } \left( {CStep_{i}^{ \hbox{max} } } \right)\) is the minimum (maximum) Var step of ith capacitor.

7) Bus voltage magnitude

$$V_{ \hbox{min} } \le \left| {V_{n}^{h} } \right| \le V_{ \hbox{max} }$$
(39)

where \(V_{n}^{h}\) is the voltage of bus n at hour h.

8) Limit of transformer tap

$$Tap_{ \hbox{min} } \le Tap^{h} \le Tap_{ \hbox{max} }$$
(40)

where \(Tap^{h}\) is the tap setting of transformer with on-load tap changer (OLTC) at hour h; and \(Tap_{ \hbox{min} } \left( {Tap_{ \hbox{max} } } \right)\) is the minimum (maximum) tap position of OLTC.

Owing to the existence of the DERs, OLTCs, capacitors, etc., the proposed active-reactive power scheduling formulation of distribution systems is conventionally a mixed integer non-linear programming (MINLP) optimization problem. The proposed structure of presented complete active-reactive power scheduling model for smart distribution systems is illustrated in Fig. 3.

Fig. 3
figure 3

Illustrative structure of suggested active-reactive power scheduling method

4 Simulation results

Here, the proposed active-reactive power resource scheduling method has been examined on a typical 22-bus 20 kV distribution system including three DERs that is illustrated in Fig. 4 [17]. The lines’ length of the network is multiplied by 1.5 to make an unauthorized voltage drop for the end nodes of the network. It is assumed that the number of taps of HV/MV tap changing transformer is 10, and each tap ratio is 1%. A voltage limit of ±5% of rated voltage is adopted for the simulation. The capacity of switched capacitors 1 and 2 is 1000 kvar. Each capacitor bank has five switching Var steps of 200 kvar [3]. DERs include a FC with nominal capacity of 500 kW, a MT with nominal capacity of 1 MW and a GT with nominal capacity of 500 kW.

Fig. 4
figure 4

22-bus distribution system with three considered DERs

Table 1 shows the energy bids of DERs consisting of the couples of offered active power and the corresponding price bid. Morever, the hourly energy prices related to the wholesale market, that are supposed as energy price bids of the Disco, are given in [15].

Table 1 Price-quantity bids offered by DERs

The linear optimization problem of the preliminary day-ahead active power scheduling is solved by the CPLEX solver in the GAMS environment. The results of the preliminary active power scheduling comprising the selected offered power of each player and the hourly MCP are given in Table 2. The preliminary active power scheduling is only obtained considering the economic viewpoint. Then, still on the day before operation, the results of the preliminary active power scheduling are delivered to the DSO that checks the technical possibility of this initial scheduling considering system constraints. This means that some adjustments should be regarded aiming to allocate generation for active losses balancing and to provide the essential reactive power of the system.

Table 2 Preliminary active power scheduling and hourly MCP for day-ahead operation

To take part in the VVC issue through the proposed market-based model, the reactive power bids along with the adjustment bid of DERs are provided in Table 3. The offered price by Disco for reactive power provision, adjustment bid price and the maximum allowable changing in its preliminary active power scheduling are assumed to be 0.016 $/kvarh, 0.090 $/kWh and 50%, respectively. A mandatory power factor of 0.95, for both lagging and leading, are assumed for the simulation. The presented day-ahead reactive power scheduling model is solved by BONMIN optimization solver.

Table 3 Characteristics of DERs

The proposed method for the day-ahead active-reactive power economic schedule has been examined on two cases on the case study system as follows:

Case 1: It is assumed that the total required reactive power of the distribution network could be procured by the Disco from the main grid.

Figures 5 and 6 demonstrate, respectively, the daily optimal dispatch schedules of the OLTC as well as switched capacitors by implementing the presented day-ahead scheduling method. Moreover, the optimal active-reactive power dispatch schedule of Disco, GT, MT and FC for case 1 in the terms of \(\Delta P^{L}\), \(\Delta P^{Adj}\), \(P^{final}\) and Q variables is listed in Tables 4, 5, 6 and 7. As seen from these tables, the results of preliminary active power scheduling have been increased only for allocating the required active power for power losses balancing. The second columns of Tables 4, 5, 6 and 7 detail the adjustment of preliminary active power scheduling in accordance with the contribution of each unit for power losses balancing at each hour. In other words, changing in the preliminary active power scheduling due to operation or security enforcements is not required. Thus, all \(\Delta P^{Adj}\) variables associated with the operational constraints enforcement become zero. On the other hand, the simulation results evidence that the DERs are not necessary to operate in Region 3 and consequently, the reactive power payments cover only the availability and losses costs. Hence, the final values of active power scheduling of market players defined by (28), and (29) have been reported in the fourth column of Tables 4, 5, 6 and 7. In this simulation, the whole active losses during the next day will become 1451.75 kW, from which 753.12 kW will be provided by Disco and the rest, i.e., 698.63 kW, will be balanced by DERs. It is observed from Table 4 that the reactive power is imported from the upstream grid only at hours 10–13 and 18–22. By implementing the proposed active-reactive power scheduling, the DERs are willing to actively take part in the Var control issue at distribution level with enough economic incentive. Incorporating DERs in the VVC problem along with energy generation can help to the utilities to purchase reactive power from local Var resources in an economical and efficient way and reducing power losses. The amount of the objective function defined by (21) becomes $377.26, and it includes the cost of active power losses balancing and the reactive power cost pertaining to Disco and DERs. The components of the objective function have been shown in Fig. 7.

Fig. 5
figure 5

Optimal dispatch schedules of OLTC in case 1

Fig. 6
figure 6

Optimal dispatch schedules of switched capacitors in case 1

Table 4 Daily optimal active-reactive power dispatch schedules of Disco in case 1
Table 5 Daily optimal active-reactive power dispatch schedules of GT in case 1
Table 6 Daily optimal active-reactive power dispatch schedules of MT in case 1
Table 7 Daily optimal active-reactive power dispatch schedules of FC in case 1
Fig. 7
figure 7

Different parts of objective function for case 1

Case 2: In this case, we suppose that due to the technical constraints in the upstream network (transmission network), the available reactive power of the main grid by the Disco is decreased.

In this case, the presented active-reactive power scheduling is applied to the test system with a more stressed operation situation. For this simulation, we have supposed that owing to the operational problems, the maximum reactive power procured by Disco was restricted at peak hours, i.e., 18-21. The maximum amount of the reactive power utilization of the main grid was restricted to 1500, 2200, 2200, 1300 kvar at hours 18, 19, 20 and 21, respectively. The results of day ahead active-reactive power scheduling of the players in the terms of control variables are indicated in Table 8. As it is observed in Table 8, variable \(\Delta P^{Adj}\) related to Disco and DER units is non-zero. This is because the limitation of utilizable reactive power of the upstream grid necessitates increasing the reactive power generation of DERs to fulfil the reactive power requirements of the system. Therefore, DERs should be managed to reduce their preliminary active power scheduling for a more reactive power provision. The other results pertaining to active-reactive dispatch schedule of generation units, optimal tap positions OLTC and optimal dispatches of the shunt capacitors are not changed. The value of the objective function is $836.45 comparing to $377.26 in case 1, because this value comprises not only the costs of balancing active power losses of the network as well as the reactive power costs, but also the costs of purchasing generation unit adjustment bids. In contrast, when the limitation on reactive power of Disco is adopted, the total active power losses will increase from 1451.75 kW to 1652.22 kW. Figure 8 demonstrates the various parts of the objective function pertaining to the Disco and DERs for case 2. It is seen that total payment for the reactive power delivery by DERs has also increased compared to the case 1.

Table 8 Optimal active-reactive power scheduling of DERs and Disco at peak hours in case 2
Fig. 8
figure 8

Different parts of objective function for case 2

5 Conclusion

This paper proposed an active-reactive power bids-based model that dealt with energy/reactive power resource scheduling in smart distribution networks with integration of large number of DERs. In the suggested approach, the preliminary energy scheduling of market players were achieved in a preliminary day-ahead energy market. The results of the preliminary scheduling were used by the DSO to decide the final optimal active-reactive power dispatch schedule of DERs as well as conventional VVC devices. Also, a suitable pricing framework was extended to reimburse the cost of provided reactive power by DERs. The CPLEX and BONMIN solvers were employed to solve the presented model in the GAMS environment. The methodology was applied to a typical 22 bus 20 kV distribution system. The obtained results evidence the performance of the proposed model to minimize the energy besides reactive power costs and to maintain the voltage profile of feeders within the acceptable range. Encompassing the cost of reactive power supplied by distribution market participants in the complete active-reactive power scheduling model would persuade the DERs to enthusiastically contribute in the reactive power provision. The main conclusive remark of this study is directed to investigate the performance of using DERs in the reactive power allocation issue in a secure operation situation. The suggested methodology was capable to accomplish the energy-reactive power scheduling aiming to acquire a scheme that handles the distribution system from the technical and economical viewpoints.