## 2 Cost of Reactive Power Production from DERs
### Wind Turbines
#### 2.2.2 Cost Components of Reactive Power of a WT  
This component implies the additional cost imposed by the modifications of the converter to meet the reactive power support of the WT in accordance with network code requirements. Therefore, operating within the leading power factor \(pf_{mand}\) to lagging power factor \(pf_{mand}\) at any active power generation can be compensated for by a fixed cost (\(a_{0}\)).  
Cost of Losses Component  
Due to the increased reactive power demanded by DSO between the mandatory and available values, the WT will suffer an extra active power loss that should be determined for the purpose of financial compensation. The increased active power loss resulting from the increased reactive power supply from \(Q_{mand}\) (mandatory reactive power production specified by grid codes) to \(Q_{1}\) at active power production of \(P_{0}\) is expressed as:  
\[\Delta P_{loss} =a_{l}(I_{1}-I_{0})+b_{l}({I_{1}}^{2}-{I_{0}}^{2}) \tag{19}\] \[I_{0} =\frac{\sqrt{P_{0}^{2}+Q_{mand}^{2}}}{V_{g}}\] (20) \[I_{1} =\frac{\sqrt{P_{0}^{2}+Q_{1}^{2}}}{V_{g}} \tag{21}\]  
where \(a_{l}\) and \(b_{l}\) represent the active power loss constants. Using the MCP, the cost of losses component to cover the increased active power losses in the converter is calculated as [21]:  
\[CLC=MCP\cdot\Delta P_{loss} \tag{22}\]  
Opportunity Cost Component  
If the WT is requested to reduce its active power generation to provide the required reactive power, the WT forgoes the revenue cost due to the lost opportunity to sell its active power in the energy market. The available reactive power capability from a wind generator is \(Q_{WT}^{h,av}\) as illustrated in Figure 2.  
If the WT is requested by the DSO to produce \(Q_{WT}^{h,req}\), which is more than \(Q_{WT}^{h,av}\), then its active power generation is restricted to \(P_{WT}^{h,lim}\). Thus, the WT has to forgo \(\left|\Delta P_{WT}^{Adj,h}\right|\) active power production in the energy market, where  
\[\Delta P_{WT}^{Adj,h} = P_{WT}^{h,lim}-P_{WT}^{h,max} \tag{23}\]  
Therefore, the LOC can be calculated using the adjustment price of WT as follows:  
\[LOC=\rho_{Adj}\cdot\left|\Delta P_{WT}^{Adj,h}\right| \tag{24}\]  
Cost of reactive power production from a WT can be expressed as the following equation:\[\mathit{COST}(Q_{WT}^{h})=\left\{\begin{matrix}a_{0}&-Q_{mand}^{h}\leq 0_{WT} \leq Q_{mand}^{h}\\ a_{0}+\mathit{MCP^{h}}\cdot\left(\Delta P_{loss}^{h}(Q_{WT}^{h})\right)&Q_{mand}^ {h}\leq Q_{WT}^{h,av}\
eq\mathit{qr}\mathit{qr}_{WT}^{min}\leq Q_{WT}^{h} \leq-Q_{mand}^{h}\\ a_{0}+\mathit{MCP^{h}}\cdot\left(\Delta P_{loss}^{h}(Q_{WT}^{h,av})\right)+ \rho_{Adj}\cdot\left|\Delta P_{WT}^{Adj,h}\right|&Q_{WT}^{h,av}\leq Q_{WT}^{h} =Q_{WT}^{h,req}\leq Q_{WT}^{max}\end{matrix}\right. \tag{25}\]  
where \(\Delta P_{loss}^{h}(Q_{WT}^{h})\) and \(\Delta P_{loss}^{h}(Q_{WT}^{h,av})\) represent the increased active power losses caused by increased reactive power production from \(Q_{mand}^{h}\) to \(Q_{1 WT}^{h}\) and \(Q_{WT}^{h,av}\), respectively. Similar to Equation (10), we can rewrite Equation (25) as follows:  
\[\mathit{COST}\left(Q_{WT}^{h}\right)=\mathit{C}_{WT}\left(Q_{WT}^{h}\right)+ \rho_{Adj}\cdot\left|\Delta P_{WT}^{Adj,h}\right| \tag{26}\]