## 2 Power Allocation and Control for HESS  
In this research, the complementarity of the two types of ESS (battery & supercapacitor) is to utilize the distinct advantages of multiple heterogeneous energy storage technologies and to hide their drawbacks instead of relying on a single type of energy storage technology. The applications of the battery with high energy capacity are in long-term and large-volume energy storage that requires high energy density, and sustained charge/discharge. The applications of the supercapacitor which has high power capacity are in periodic high-power output and frequently charge/discharge that require high power density, short response time, and long lifespan. Two methods, to allocate the power between battery and supercapacitor, are discussed in this section. The first method, called Method#1, was introduced by [PERSON] et al. (2012) and the second method, also known as Method#2, is proposed by the author. In Method#1, two low-pass filters are used to separate the power for battery and supercapacitor as shown in Figure 1. Figure 2 is the smoothed power waveform based on Methode#1. The power reference for supercapacitor (\(P_{sc\_ref}\)) and battery (\(P_{bat\_ref}\)) are obtained through Equation (1). \[ \begin{split} P_{sc\_ref}=P_{pv}-P_{pv}*\frac{1}{\tau_{1}s+1}\\ P_{bat\_ref}=P_{pv}*\frac{1}{\tau_{1}s+1}-P_{pv}*\frac{1}{\tau_{2}s +1}\end{split}  \tag{1}\]  
where, \(\tau_{1}\) and \(\tau_{2}\) are the time constant of low-pass filter #1 and low-pass filter #2, respectively. \(P_{pv}\) is the measured power output of the PV. However, in [22], the method to design cut-off frequency for the low-pass filter is not provided. In [23], the same method to allocate the power for HESS is applied, the cut-off frequency is selected based on the response time of each energy storage system. Therefore, according to [23], the cut-off frequency \(f_{c1}\) = 0.5 Hz and \(f_{c2}\) = 1 mHz are chosen for \(LP\)#1 and \(LP\)#2, respectively. The Method#2 is inspired by [24]. Instead of using ramp rate and step moving average, an ideal PV power profile is used. The ideal PV power is obtained by comparing the daily PV output power during one year, and selected the one which has smaller variation. The idea behind this method is to inject the smooth power to the system with supporting from ESS. Hence, the impact of intermittent PV output power is diminished. As shown in Figure 3, the ESS is used to compensate the power deviation of PV. When the PV output power is greater than the ideal power, the ESS will absorb; otherwise, the ESS will release the power to compensate. As a result, the power supply from the PV plus energy storage system are similarly to the ideal power as demonstrated in Figure 3 (\(red-graph\)). The block diagram of this method is shown in Figure 4. This method, a low-pass filter (\(f_{c}\) = 0.5 Hz) and an ideal power are used to allocate the power for HESS. The power reference for supercapacitor and battery are expressed by Equation (2). Figure 4: Power allocation Method#2. Figure 3: ESS respond based on Method#2. \[ \begin{split} m_{d}&=V_{d}-I_{q}\omega L+k_{p}(I_{d}^{*}-I_{d}) +k_{i}\int(I_{d}^{*}-I_{d})\\ m_{q}&=V_{q}+I_{d}\omega L+k_{p}(i_{q}^{*}-I_{q}) +k_{i}\int(I_{d}^{*}-I_{q})\end{split}  \tag{5}\]  
In Formular (5), \(V_{d}\), \(V_{q}\), \(I_{d}\) and \(I_{q}\) are voltage and current in \(dq\) component. \(k_{p}\), \(k_{i}\) are proportional and integrator gain of \(PI\) controller. \(L\) is line inductance and \(\omega\) is rated angular frequency. To assess the effectiveness of each power allocation methods; a strong PV power fluctuation profile is utilized as shown in Figure 6. Figure 7 is the frequency response based on each power allocation methods. There are three waveforms in this figure. The \(black-graph\) represents frequency of the system without energy storage system. The \(blue-graph\) is frequency response based on Method#1, and the \(red-graph\) is based on the proposed method (Method#2).