## 3 The Hysteresis Current Controller
### Validation of the Novel Expression  
The obtained expression will work for all load types, constant and varying, provided the principles of hybrid filter designs are followed. Irrespectively, the expression was simulated with three reference signals: sinusoidal, square wave and the trapezoidal reference signals considering a supraharmonic frequencies source from an MC interfaced constant load application, although only the results of the trapezoidal reference signal are presented in this article. Hybrid active filter topology was selected for the compensation due the fact that passive L-C filter solutions will be too bulky and heavy to be implemented in applications where size and weight are important, which is the major target application considered in this article. Active filters, on the other hand, will be too expensive considering the frequency range. The HAPF consists of a passive filter section and an active power filter section with its controls. The passive side of the HAPF was to meet the following requirements. * Filter input impedance at grid frequency must be less than or equal to the grid impedance and higher at harmonic frequencies. * Filter current transfer ratio must be low at grid frequency. The above rules governed the sizing of the passive filter components and resulted in an RLC passive filter selection. The capacitor value was designed based on the reactive power requirements at grid frequency, and the inductor selection was based on the consideration that the voltage drop in the RLC filter must be 5% of the grid voltage. There is a maximum passive filter attenuation of 60% to maintain a smaller size passive filter element. The following equations were used to obtain the passive filter parameters. \[|H(j\omega)|=\left|\frac{1}{1-\left(\frac{\omega_{CW}}{\omega_{C}}\right)^{2}}\right| \tag{22}\]  
\[C_{F}=\frac{K_{C}S_{MC}}{3V_{s}^{2}\omega_{g}} \tag{23}\]  
The filter inductance was calculated after obtaining \(C_{F}\) and the cutoff frequency, \(\omega_{C}\), using the following equation. \[\omega_{C}=\frac{1}{\sqrt{L_{F}\times C_{F}}} \tag{24}\]  
For the active side of the HAPF, the main components are the DC capacitance voltage and capacitance value and the coupling inductance value. The reactive power produced by the inverter can compensate the reactive power in the supply when the VSC output voltage is higher than the supply voltage; thus, \(V_{inv}>V_{s}\) under linear modulation mode. The DC capacitance voltage, \(V_{dc}\) was obtained as Equation (26) by:  
\[m_{a}=\frac{2\sqrt{2}V_{inv}}{V_{dc}} \tag{25}\]  
If \(m_{a}=1\), then  
\[V_{dc}=2\sqrt{2}V_{inv}=2\Big{(}\sqrt{2}/\sqrt{3}\Big{)}Vs \tag{26}\]  
The selection of the DC capacitance value was based on the instantaneous power exchange between the inverter and the grid during transients. The peak-to-peak ripple voltage of the inverter was assumed to be 15% of the DC bus voltage. Hence, the lost energy in the inverter is compensated for as shown in Equation (27):  
\[E=\frac{1}{2}C_{dc}\Big{(}V_{1}^{2}-V_{2}^{2}\Big{)}=P\times T=K3V_{S}I_{f}aT \tag{27}\]  
where \(V_{2}=V_{1}-\Delta V_{ripp}\) and \(\Delta V_{ripp}\) is the peak-to-peak ripple voltage. V\({}_{1}\) is the DC voltage. If the power rating of the inverter is P, then the energy stored in the capacitor for a period T can be estimated. The selection of the coupling inductor was based on the peak-to-peak ripple current, i\({}_{\text{ripp}}\), which was calculated considering the harmonic currents to be 10% of the input current to the MC. \[L\geq\frac{\frac{2}{V_{dc}}-V_{s}\sin(\omega t)}{max\Big{|}\frac{di_{1}}{dt} \Big{|}} \tag{28}\]  
Equation (21) expresses the VSC switching frequency in terms of the hysteresis band current, the rate of change in the both the reference current and that of the inverter current. From Equation (21), the maximum allowable HCC can be measured, and a near constant switching frequency can be obtained under supraharmonic applications. The obtained expression was verified in an open-loop control simulation using the trapezoidal reference signal.