2.4.1. Generation System

This paper presents a hybrid system that installs a common DC network for PV and ESS. If used in real-time conditions, then a fast computation method managemen<sup>t</sup> should be composed to handle electronic based resources. Prior to defining the relationship between order and voltage level, a general power flow analysis have to compose focused on power production. The flow injected by PV modules can be given by the sum of the power produced from each module with incurred losses as follows:

$$P\_{\rm PV} = \sum\_{l=1}^{L} \sum\_{n=1}^{N} P\_n - \sum\_{l=1}^{L} \sum\_{n=1}^{N} P\_{\rm loss}(n) \tag{1}$$

where, *PPV* is total output power from PVs, *Pn* is output power from nth module, *Ploss* is generated loss in the cable, *L* is total number of arrays, and *N* is total number of modules.

The ohmic loss can be defined as follows:

$$P\_{\text{loss}} = r\_{m+1} \frac{P\_{m+1}^2}{V\_n^2} \tag{2}$$

where, *Pnn*+<sup>1</sup> is real power flow from module *n* to *n*<sup>+</sup>1, *Rnn*+<sup>1</sup> is resistance value between module *n* and *n*<sup>+</sup>1, and *Vn* is voltage magnitude of module *n*.

A PV system generates real power according to the irradiation profile by utilizing applied converter based on the designed curve which is related to the power coefficient. The PCS selects the power point within the operational range to extract the maximum available power. This paper considers the ESS application in the DC link as a power compensation device. If the extracted power of the hybrid system exceeds the designated order by the operator, the ESS is activated to support the entire output power based on the operator's order. It can be composed when the total DC flow of the entire circuit is analyzed using appropriate formulas. The total DC flow with capacity constraint can be defined as in Equation (3), and DC current flow to utilize flow analysis as shown is as follows:

$$P\_{\rm dc} = P\_{PV} + P\_{ESS}, \qquad |P\_{ESS}| \quad \le S\_{dc-dc} \tag{3}$$

where, *Pdc* is real power injection from DC system, *PESS* charging/discharging quantity from ESS, and *Sdc-dc* is the Power capacity of DC/DC converter for the ESS.

$$i\_{\rm dc} = \sqrt{\mathcal{g}\_{\rm eq} \cdot P\_{\rm ref}} \tag{4}$$

where, *idc* is current flow at the converter, *geq* is equivalent admittance of PCS, and *P*ref is reference signal of real power for the PCS.

The constraint in the limit process can be defined as follows:

$$\max P\_{dc} \le \sqrt{S\_{PCS}^2 - Q\_{PCS}^2} \tag{5}$$

where, *Spcs* is power capacity of main PCS, and *QPCS* is reactive power production from main PCS.

Since it is expected that several modules are integrated into a single array in a PV farm, a voltage variation of the DC side is dependent on the PVs' output power. When an operator wants to handle demand response through applied ESS (charging or discharge), the voltage variations induced in the DC network have to be reflected.
