## 2 Reactive Power Offers of a DG  
In this section, based on the capability curve of a DG, a generic reactive power cost framework is proposed for DGs. The generic reactive power cost model can be used for various types of DGs, including synchronous machine-based DGs (e.g., gas turbine) and renewable energy sources (RES)-based DGs (e.g., wind turbine or PV). The first type of DGs (dispatchable DGs) are directly connected to the distribution networks, while RES-based DGs are typically connected to the network by means of electronic power converters. The capability curve of a synchronous generator has been shown in Figure 1. This diagram demonstrates the relationship between generated active and reactive power by this generator. Figure 1: Capability diagram of a synchronous generator. The structure of an inverter-based RES-DG has been shown in Figure 2. The reactance \(X_{c}\) is the total reactance of the transformers and grid filters to connect the DG to the system. The converter output powers are restricted by the capability curves of the grid-side converter. The maximum available reactive power of a RES-DG is calculated as follows:  
\[Q_{DG}^{cap}=min\ \left\{Q_{DG}^{c},\ Q_{DG}^{v}\right\} \tag{1}\]  
\[Q_{DG}^{c}=\sqrt{\left(V_{g}I_{c,max}\right)^{2}-\left(P_{DG}\right)^{2}} \tag{2}\]  
\[Q_{DG}^{v}=\sqrt{\left(\frac{V_{g}V_{c,max}}{X_{c}}\right)^{2}-\left(P_{DG} \right)^{2}}-\frac{V_{g}^{2}}{X_{c}} \tag{3}\]  
\(I_{c,max}\) and \(V_{c,max}\) are the maximum current output and maximum voltage output of the inverter, respectively. The values of \(V_{c,max}\) and \(I_{c,max}\) are related to the design of the rated power factor, as well as the upper and lower values of acceptable voltages and frequencies at the grid connection point. The capability curves of a RES-based DG for the design power factor 0.9 and different voltages at the grid connection point (\(V_{g}\)) are illustrated in Figure 3.  
Figure 3: \(Cont.\)  
Figure 2: RES-DG with full power back to back converter. In most distribution systems, the DSO contracts with DGs, which are mandated to provide reactive power requirement according to the grid code. We suppose the grid code requirement to be such that the DG units must operate between a mandatory leading power factor (\(pf_{mand}\)) and lagging \(pf_{mand}\) at any operating point. Here, without loss of generality, the capability curve of a synchronous machine-based DG is employed to extract a new reactive power bidding structure. Similar formulation can be used for RES-DGs. According to Figure 1, we can define four operating regions for DG \(i\) on the reactive power coordinate at a given initial scheduled active power \(P_{A,i}\) as follows:  
_Region I_ (\(-Q_{mand,i}^{A}\)_ to \(Q_{mand,i}^{A}\))_: Reactive power provided in this area is according to the grid code requirement. When a DG operates in this region, it is only paid an availability cost with a price \(\rho_{0}\) in $/h. This price is a fixed component reflecting the portion of a supplier's investment cost that can be contributed to reactive power production. Accordingly, the Q payment function (QPF) of DG \(i\) in region I is:  
\[QPF_{1(DG,i)}=\rho_{0,i} \tag{4}\]  
_Region II_ (\(Q_{DG,i}^{min}\)_ to \(-Q_{mand,i}^{A}\)) and _Region III_ (\(Q_{mand,i}^{A}\) to \(Q_{A,i}\)): In these operation areas, injection and absorption of reactive power have no effect on the initial planned active power. However, these will increase power losses in the windings of the DG. Hence, the reactive power payment to the DG comprises both the availability cost and the losses cost. Two loss payment terms are specified as: the offered price \(\rho_{1}\) in $/MVArh for operating in the under-excitation mode and the offered price \(\rho_{2}\) in $/MVArh for operating in the over-excitation mode [18].