## 2 Hybrid Active Power Filter Concept
 \tag{30}\]  
where \(\omega_{0}\) and \(\omega_{c}\) correspond to the dc component and the frequent components, respectively. The detailed formulations are explained in Equations (31) to (33). \[A_{m_{\text{add}}0}=\sum\limits_{k=1}^{\infty}\left[\frac{1}{2k-1}B_{2k-1}(2(2 m-1)\pi M)(1+3\cos(k\pi)\sin((2k-1)\theta)\right] \tag{31}\]  
\[ \begin{array}{ll}A_{m_{\text{add}}n_{\text{even}}}=\sum\limits_{k=1}^{\infty }\left[B_{2k-1}(2(2m-1)\pi M)(P(n)+P(-n))\right]\\ \hskip 28.452756 ptP(n)=\frac{\cos(m\pi)\ +3\cos(k\pi)\sin((2n+2k-1)\theta)}{2 n+2k-1}\\ \hskip 28.452756 ptA_{m_{\text{even}}n_{\text{odd}}}=\sum\limits_{k=1}^{\infty} \left[\cos(k\pi)B_{2k-1}(2(2m)\pi M)\left(\frac{\sin(2(n-k-1)\theta)}{n-k-1} +\frac{\sin(2(n+k)\theta)}{n+k}\right)\right]\end{array}  \tag{32}\]  
where \(B_{k}\) represents the \(k^{th}\) order of the Bessel function and \(M\) shows the modulation index. **Theorem 1**. : _If the pur -sinusoidal load current is going to be obtained, therefore, an extra term exists in the \(q\)-axis component of the compensated current \(I_{qq,comp}\), in which the model of the unwanted harmonics must be equal to zero. Thus, we have:_  
\[ \begin{split} I_{q,comp,APF}+I_{d,comp,APF}=\left(I_{q,DC,APF}+I_{ qq,comp,APF}+\sum\limits_{m=1}^{N}I_{q,load}\cos\!\left(m\omega t+\varphi_{q0} \right)\right)\\ +\left(I_{d,DC,APF}+\sum\limits_{m=1}^{N}I_{d,load,APF}\cos\!\left( m\omega t+\varphi_{d0}\right)\right).\end{split}  \tag{34}\]  
In dynamic stability analysis, it is found that [29; 30; 31]:  
\[ \begin{split} I_{d,DC,APF}\geq\left(\frac{1}{2}\sum\limits_{m=1} ^{N}I_{q,load}^{2}+I_{d,load}^{2}\right)^{\frac{1}{2}}\\ I_{qq,comp,APF}=\left(I_{q,DC,APF}^{2}-\frac{1}{2}\sum\
olimits_{m=1 }^{N}I_{q,load}^{2}+I_{d,load}^{2}\right)^{\frac{1}{2}}-I_{q,comp,APF}.\end{split}  \tag{35}\]  
Due to the model definition described in Equation (5), the capacitor's low voltage is deduced in Equation (36). \[ \begin{split}\frac{dv_{cd}}{dt}=\frac{1}{c_{c}}\!\left(i_{AF,d}+ \omega C_{c}v_{Cd}\right)\\ \frac{dv_{cq}}{dt}=\frac{1}{c_{c}}\!\left(i_{AF,q}-\omega C_{c}v_{Cd }\right)\\ \frac{dv_{Cd}}{dt}=\frac{1}{c_{dc}}\!\left(i_{AF,d}u_{d}+i_{AF,q}u _{q}\right)\end{split}  \tag{36}\]  
By substituting Equations (1) and (36) to (35) for all current harmonics, we have:  
\[ \begin{split} v_{cd}=\frac{1}{\omega C_{c}}\!\left(I_{q,DC,APF}+I _{qq,comp,APF}+\sum\limits_{m=1}^{N}A_{m}\sin\!\left(m\omega t\right)+B_{m} \cos\!\left(m\omega t\right)\right)\\ v_{cq}=\frac{1}{\omega C_{c}}\!\left(-I_{q,DC,APF}+\sum\limits_{m= 1}^{N}C_{m}\sin\!\left(m\omega t\right)+D_{m}\cos\!\left(m\omega t\right)\right) \end{split}  \tag{37}\]  
where \(A_{m}\), \(B_{m}\), \(C_{m}\), and \(D_{m}\) can be calculated using Fourier transform. It is not simple to calculate the \(I_{qq,comp}\) component directly, but if a new positive variable is defined as \(\rho=v_{dc}^{2}\); therefore, by using an additional PI loop, the \(I_{qq,comp}\) component will be maintained as below:  
\[ \begin{split} I_{qq,comp}=\left(k_{p}+\frac{k_{i}}{s}\right)\! \left(\rho-\rho^{*}\right)=k_{p}\!\left(\rho-\rho^{*}\right)+k_{i}\int\limits _{0}^{t}\left(\rho-\rho^{*}\right)dt^{\prime}\end{split}  \tag{38}\]  
where \(v_{dc}\) represents the small signal component of the APF input voltage and \(\rho^{*}=V_{dc}^{2}\) is the reference DC voltage.