# Fractional Sliding Mode Harmonic Control of an Active Power Filter
## 2 Dynamic Model of an Active Power Filter  
As shown in Figure 1, an APF consists of three parts, a harmonic current detection module, a current tracking control module, and a generating circuit of compensation current. A harmonic current detection module usually utilizes the rapid detection of harmonic currents, which is based on instantaneous reactive power theory. The compensation current of a three-phase three-wire APF is produced by a pulse width modulation (PWM) signal generator under normal circumstances. In order to achieve the purpose of eliminating the harmonic components of the current, the compensating current should be generated with the absolutely opposite phase and amplitude to that of the harmonic current. By collecting the current and voltage signals of the circuit from the sensor, the controller of the APF can output corresponding control signals, which will be modulated into a PWM wave. The PWM wave will then be sent to the insulated gate bipolar transistor (IGBT) driver to determine the states of the IGBT and generate the compensation current injected into the circuit, whose amplitude is equal to but sign is opposite to the harmonic current. The basic operating principle of an APF is to detect the voltage and current produced by the operating system. The harmonic current detection is based on the Synchronous Reference Frame (SRF). After being calculated by the current operation circuit, the command signal \(i_{c}^{*}\) of the compensating current is obtained. With the aim of achieving the compensating current \(i_{c}\), the signal which is produced by the PWM needs to be enlarged by amplifiers due to its small amplitude. Only when the compensating current offsets the harmonic current can we obtain the expected source current. Then, a dynamic model of the APF is developed. According to the circuit structure of an APF, applying Kirchhoff rules to the circuitry, we obtain:  
\[ \begin{cases}v_{1}=L_{c}\frac{di_{1}}{dt}+R_{c}i_{1}+v_{1M}+v_{MN}\\ v_{2}=L_{c}\frac{di_{2}}{dt}+R_{c}i_{2}+v_{2M}+v_{MN}\\ v_{3}=L_{c}\frac{di_{3}}{dt}+R_{c}i_{3}+v_{3M}+v_{MN}\\ \end{cases} . \tag{1}\]  
In the equations, \(L_{c}\) and \(R_{c}\) are the inductance and resistance, and \(v_{MN}\) is the voltage from point M to N.  
It is assumed the AC supply voltage is stable. Taking the Equations in (1) and combining with the absence of the zero-sequence in three wire system currents yields:  
\[v_{MN}=-\frac{1}{3}\sum_{m=1}^{3}v_{mM} \tag{2}\]  
By indicating the ON/OFF status of the IGBT, the switch function \(c_{k}\) becomes:  
\[c_{k}=\left\{ \begin{array}{ll}1,\text{ if }S_{k}\text{ is on and }S_{k+3}\text{ is off}\\ 0,\text{ if }S_{k}\text{ is off and }S_{k+3}\text{ is on}\\ \end{array} \right., \tag{3}\]  
where \(k=1,2,3\). At the same time, taking \(v_{km}=c_{k}v_{dc}\) into consideration, (1) can be reformulated as:  
\[ \begin{cases}\frac{di_{1}}{dt}=-\frac{R_{c}}{L_{c}}i_{1}+\frac{v_{1}}{L_{c}}- \frac{v_{dc}}{L_{c}}(c_{1}-\frac{1}{3}\sum\limits_{m=1}^{3}c_{m})\\ \frac{di_{2}}{dt}=-\frac{R_{c}}{L_{c}}i_{2}+\frac{v_{2}}{L_{c}}-\frac{v_{dc}}{ L_{c}}(c_{2}-\frac{1}{3}\sum\limits_{m=1}^{3}c_{m})\\ \frac{di_{3}}{dt}=-\frac{R_{c}}{L_{c}}i_{3}+\frac{v_{3}}{L_{c}}-\frac{v_{dc}}{ L_{c}}(c_{3}-\frac{1}{3}\sum\limits_{m=1}^{3}c_{m})\\ \end{cases}  \tag{4}\]  
Figure 1: Block diagram of the main circuit of an APF. We define the switching state function as  
\[d_{nk}=\left(c_{k}-\frac{1}{3}\sum_{m=1}^{3}c_{m}\right)_{n} \tag{5}\]  
Equation (5) denotes the relationship between \(d_{nk}\) and \(c_{k}\). Based on (5) and the eight permissible switching states of the IGBT, the following equation is obtained  
\[ \begin{bmatrix}d_{n1}\\ d_{n2}\\ d_{n3}\end{bmatrix} =\frac{1}{3} \begin{bmatrix}2&-1&-1\\ -1&2&-1\\ -1&-1&2\end{bmatrix}\begin{bmatrix}c_{1}\\ c_{2}\\ c_{3}\end{bmatrix} . \tag{6}\]  
Then, (4) is simplified as  
\[