# Adaptive Neural Sliding Mode Control of Active Power Filter

Authors: Juntao Fei; Zhe Wang
Journal: Journal of Applied Mathematics
 (2013)

---

## Abstract

A radial basis function (RBF) neural network adaptive sliding mode control system is developed for the current compensation control of three-phase active power filter (APF). The advantages of the adaptive control, neural network control, and sliding mode control are combined together to achieve the control task; that is, the harmonic current of nonlinear load can be eliminated and the quality of power system can be well improved. Sliding surface coordinate function and sliding mode controller are used as input and output of the RBF neural network, respectively. The neural network control parameters are online adjusted through gradient method and Lyapunov theory. Simulation results demonstrate that the adaptive RBF sliding mode control can compensate harmonic current effectively and has strong robustness to disturbance signals.


---

## Body

## 1. Introduction

Active power filters are commonly used to deal with the increasing harmonic current in electrical system nowadays, which can degrade the quality of power system. Since APF is a complicated nonlinear system, advanced controller can be utilized to control the APF. In order to improve the performance of APF, adaptive control, neural network control, fuzzy control, and sliding mode control have been proposed to control the APF. Kömürcügil and Kükrer [1] derived a new control strategy for single-phase shunt APF using a Lyapunov function. Rahmani et al. [2] presented an experimental design of a nonlinear control technique for three-phase shunt APF. Shyu et al. [3] proposed a model reference adaptive control analysis for a shunt APF system. Chang and Shee [4] investigated novel reference compensation current strategy for shunt APF control. Matas et al. [5] developed a feedback linearization way of a single-phase APF via sliding mode control. Valdez et al. [6] designed an adaptive controller for shunt active filter in the presence of a dynamic load and the line impedance. Marconi et al. [7] developed robust nonlinear controller to compensate harmonic current for shunt APF.Since neural network has the capability to approximate any nonlinear function, the tracking control using neural network for nonlinear dynamic system has become a promising research topic. Man et al. [8] derived an adaptive back propagation (BP) neural network controller. Phooi and Ang [9] proposed adaptive RBF neural network training algorithm for nonlinear signal. Lewis et al. [10] designed neural network approaches for robot manipulator. Horng [11] proposed a neural adaptive tracking control of a direct current motor with unknown system nonlinearities where neural network approximation errors are compensated by using the sliding mode scheme. Huang et al. [12] developed a novel RBF sliding mode controller for a dynamic absorber by combining the advantages of the adaptive control, neural network and sliding mode control strategies; this method is well implemented on dynamic absorber, but it has not been implemented on three-phase active power filter before. Neural sliding mode control approaches have been developed for robot manipulators [13, 14]. In [13], self-recurrent wavelet neural networks are used instead of RBF neural networks. And in  [14], sliding mode control method is not combined with RBF neural network. Bhattacharya and Chakraborty [15] proposed an ANN-based predictive and adaptive controller for shunt active power filter. Abdeslam et al.  [16] designed a unified artificial neural network architecture for active power filters. Kandil et al. [17] developed a novel three-phase active filter based on neural networks and sliding mode control, but RBF neural network and Lyapunov stability analysis are not used in the paper. In our paper, we will design an adaptive controller for shunt active power filter by combining the advantages of adaptive control, RBF neural network, and sliding mode control strategies.Neural network does not depend on mathematical models; sliding mode control  has strong robustness. The motivation of this paper is to investigate the combination of adaptive control, neural network control and sliding mode control applied to APF based on Lyapunov analytical method. So it is necessary to combine the advantages of adaptive control, neural network control, and sliding mode control to improve the control performance of APF. In this paper, a Lyapunov adaptive sliding mode control method based on RBF neural network is presented to overcome the shortcomings of traditional methods. The key property of this method is that the weights of neural network can be online adjusted, and the asymptotical stability of the system can be guaranteed by Lyapunov stability theory. The contribution of this paper can be emphasized as follows.(1)
The sliding mode technique has been combined with the adaptive control and neural network control to achieve the desired elimination of harmonic current in APF system. The performance of current tracking and total harmonic distortion (THD) can be improved effectively.(2)
The adaptive RBF sliding mode controller does not rely on accurate mathematical model since it has the ability to approximate the nonlinear function of APF. The adaptive neural controller is used to model the relationship between the sliding surface and the control law.(3)
The adaptive neural network sliding mode control is proposed to deal with nonlinear load in APF system and to improve the performance of current tracking. This is a successful example of using adaptive control, RBF neural network control, and sliding mode control with application to three-phase APF.


## 2. Dynamics of Active Power Filter

The schematic diagram of the three-phase three-wire shunt active power filter is shown in Figure1. In Figure 1, is is line current, iL is nonlinear load current, ih is harmonic current, and ic is compensate current, ic* is command current as the basis of compensate current.Figure 1
Schematic structure of shunt APF.The principle of shunt APF is as follows. First, the harmonic currentih is detected and sent to command current operation circuit, where command current ic* is defined. Then, PWM signal is generated by tracking control circuit to control drive circuit. Last, compensation current ic is generated by main circuit and injected into the line to compensate the harmonic current; so the line current is forced to become sine waveform.Based on Kirchhoff’s current law, we can get the circuit expressions as follows:(1)i˙ca=-rica+vsaL+vdcLsW,i˙cb=-ricb+vsbL+vdcLsW,i˙cc=-ricc+vscL+vdcLsW,
where vsa, vsb, and vsc are voltages of three-phase power system, r is the resistance from power source to inductance on the AC side of APF, L is the inductance on the AC side of APF, vdc is the capacitors voltage on the DC side, sW is the sliding surface coordinate function to indicate the working state of IGBT. We define  sW={10QN=1QN=0,   it is equal to 1 when the switch is turn on, and it is equal to 0 when the switch is turn off. This is the mathematical model of shunt active power filter.


## 3. Adaptive RBF Neural Sliding Control and Stability Analysis

In this section, an adaptive RBF neural network sliding mode controller is proposed. The sliding surface is the input of the RBF neural network, the sliding mode controller is the output of RBF neural network. A single input and a single output neural sliding mode control can be achieved by using the neural network learning function to approximate the sliding surface coordinate functionsW of APF. The weights of the RBF neural network controller will be updated according to gradient method. The block diagram of the adaptive RBF sliding mode control is shown in Figure 2.Figure 2
Block diagram of adaptive RBF sliding mode control system.


### 3.1. Controller Design

Functions of (1) can be written in vector form as:
(2)i˙c=-rLic+vsL+vdcLsW,
where i=[ica,icb,icc]T, vs=[vsa,vsb,vsc]T.Define compensation current and its derivative as follows:(3)x1=ic,x2=x˙1=i˙c.
The derivative of x1 and x2 with respect to time becomes as follows:
(4)x˙1=i˙c=-rLic+VsL+VdcLsW,x˙2=x¨1=i¨c=d(-(r/L)ic+(Vs/L)+(Vdc/L)sW)dtx˙2=-rLi˙c+1LdVsdt+1LdVdcdtsWx˙2=-rL(-rLic+VsL+VdcLsW)+1LdVsdt+1LdVdcdtsWx˙2=r2L2ic+(-rVdcL2+1LdVdcdt)sW+(-rVsL2+1LdVsdt).
Define time-varying function as f(t)=(r2/L2)ic, constant function b=-(rVdc/L2)+(1/L)(dVdc/dt), sliding surface coordinate function u=sW, disturbance function d(t)=-(rVs/L2)+(1/L)(dVs/dt). So, the dynamic model of this APF control system can be expressed as follows:
(5)x˙1=x2,x˙2=f(t)+bu+d(t).
Define tracking error of command current and compensation current as follows:
(6)e(t)=ic*-ic=ic*-x1.
The derivative of e(t) with respect to time becomes as follows:
(7)e˙(t)=i˙*c-i˙c=i˙*c-x2.
Define sliding surface as follows:
(8)s(t)=λe(t)+e˙(t),
where λ is positive constant.The structure of RBF neural network is shown in Figure3. As shown, s1,s2, and s3 are sliding surface of the three-phase used as inputs of RBF sliding controller; h1,h2,…,hm are Gaussian functions; w1,w2,wm are weights; u is the output of RBF neural network used to approximate the sliding surface coordinate function of APF; m is the number of hidden layer neuron.Figure 3
Structure of RBF neural network.Here an RBF neural network is used to model the relationship between the sliding surface and the control law. The output of RBF neural network can be expressed as follows:(9)u=∑j=1mwj·exp(-∥s-cj∥2bj),
where cj is the centric vectors, bj is the base width of RBF neural network.Based on Lyapunov stability theory, the reaching condition of the sliding surface iss(t)s˙(t)<0. Because the RBF neural network is used to approximate nonlinear mapping between the sliding surface and the output control, the weights of the RBF neural network should be adjusted based on the reaching condition. The weights are adjusted online according to gradient method to find the optimal weight, which can satisfy the reaching condition.The adjustment indexes of the RBF is as follows:(10)E=s(t)s˙(t).
The adaptive law of the weight is as follows:
(11)w˙j=-η∂E∂wj(t)=-η∂s(t)s˙(t)∂wj(t)=-η∂s(t)s˙(t)∂u(t)·∂u(t)∂wj(t),
where η is the parameter of the adaptive law.From the chain rule, the following property can be obtained:(12)∂s(t)s˙(t)∂u=s(t)∂s˙(t)∂u=s(t)∂[ce˙(t)+e¨(t)]∂u∂s(t)s˙(t)∂u=s(t)∂[ce˙(t)+i¨*c-x˙2]∂u∂s(t)s˙(t)∂u=s(t)∂[ce˙(t)+i¨*c-f(t)-bu-ud]∂u=-bs(t),∂u(t)∂wj(t)=∂[∑j=1mwj·exp(-∥s-cj∥2/bj)]∂wj(t)∂u(t)∂wj(t)=exp(-∥s-cj∥2bj).
Substituting (12) into (11) yields the following:
(13)w˙j=γs(t)exp(-∥s-cj∥2bj)=γs(t)hj(s),
where γ=bη.The update equation of the weights can be expressed as follows:(14)w(k)=w(k-1)+dw(k)+α(w(k-1)-w(k-2))w(k)=w(k-1)+γs(t)hj(s)+α(w(k-1)-w(k-2)),
where α is the parameter in the adjustment of the weights.If the perfect control law exists, which makes the RBF sliding mode controller reach the best performance, at this moment APF system reaches the sliding surface; then the system gets to sliding mode motion.If the time-varying functionf(t) in (5) is known, we can get the perfect control law as follows:
(15)ueq=1b[x˙2(t)-f(t)-d(t)+s˙(t)+λs(t)].
It can be proven that s˙(t)+λs(t)=0. Since λ>0 and s˙(t)s(t)<0, the sliding surface will gradually converge to zero.


### 3.2. Stability Analysis

In this paper, the RBF neural network is used to approximate the relationship between the sliding variable and the control law. The control law may have certain difference with the perfect control lawueq.From (5) and (15) we can get the following:
(16)s˙(t)=-λs(t)+b[ueq-u(t)].
Since RBF neural network can be used to approximate any nonlinear function, we make the following assumption:Assumption. The optimal weight W- of the RBF neural network exists, which makes the control law u approximate the perfect control law ueq with an error smaller than ε as follows.
(17)max|u-(x,W-)-ueq(x)|<ε,
where u-(x,W-)=∑k=1nw-khk=W-Th, W-=[w-1,w-2,…,w-n].Then(18)ueq(x)=W-Th+ε.
Define the weighting error as W~=W--W^, where W- is the optimal weight and W^ is the current estimated weight. Equation (18) can be written as follows:
(19)s˙(t)=-λs(t)+b(W~Th+ε).
The Lyapunov function can be chosen as follows:
(20)V=12sTs+bγW~TW~.
The derivative of V with respect to time becomes as follows:
(21)V˙=sTs˙+bγW~TW~˙.
Substituting  (19) into (21) yields the following:
(22)V˙=sT[-λs+b(W~T+ε)]+bγW~TW~˙V˙=-λsTs+sTbW~Th+sTbε+bγW~TW~˙V˙=-λsTs+sTbε+bW~T(sTh+1γW~˙).
Choosing adaptive law as follows:
(23)W~˙=-γsT(t)h(s).
Since W~˙=-W^˙, that is,
(24)W^˙=γsT(t)h(s),
it can be seen that adaptive law of RBF neural network’s weight corresponds to the weights equation (13) derived from gradient method.Substituting (24) into (22) yields the following:
(25)V˙=-λsTs+sTbε≤∥s∥(-λ∥s∥+bε).
If ∥s∥>bε/λ, then V˙<0, so the Lyapunov stability can be satisfied, and the sliding surface will converge to zero. Therefore, we can get the conclusion that the proposed RBF sliding mode controller is stable and the tracking error converges into a small error bound.


## 3.1. Controller Design

Functions of (1) can be written in vector form as:
(2)i˙c=-rLic+vsL+vdcLsW,
where i=[ica,icb,icc]T, vs=[vsa,vsb,vsc]T.Define compensation current and its derivative as follows:(3)x1=ic,x2=x˙1=i˙c.
The derivative of x1 and x2 with respect to time becomes as follows:
(4)x˙1=i˙c=-rLic+VsL+VdcLsW,x˙2=x¨1=i¨c=d(-(r/L)ic+(Vs/L)+(Vdc/L)sW)dtx˙2=-rLi˙c+1LdVsdt+1LdVdcdtsWx˙2=-rL(-rLic+VsL+VdcLsW)+1LdVsdt+1LdVdcdtsWx˙2=r2L2ic+(-rVdcL2+1LdVdcdt)sW+(-rVsL2+1LdVsdt).
Define time-varying function as f(t)=(r2/L2)ic, constant function b=-(rVdc/L2)+(1/L)(dVdc/dt), sliding surface coordinate function u=sW, disturbance function d(t)=-(rVs/L2)+(1/L)(dVs/dt). So, the dynamic model of this APF control system can be expressed as follows:
(5)x˙1=x2,x˙2=f(t)+bu+d(t).
Define tracking error of command current and compensation current as follows:
(6)e(t)=ic*-ic=ic*-x1.
The derivative of e(t) with respect to time becomes as follows:
(7)e˙(t)=i˙*c-i˙c=i˙*c-x2.
Define sliding surface as follows:
(8)s(t)=λe(t)+e˙(t),
where λ is positive constant.The structure of RBF neural network is shown in Figure3. As shown, s1,s2, and s3 are sliding surface of the three-phase used as inputs of RBF sliding controller; h1,h2,…,hm are Gaussian functions; w1,w2,wm are weights; u is the output of RBF neural network used to approximate the sliding surface coordinate function of APF; m is the number of hidden layer neuron.Figure 3
Structure of RBF neural network.Here an RBF neural network is used to model the relationship between the sliding surface and the control law. The output of RBF neural network can be expressed as follows:(9)u=∑j=1mwj·exp(-∥s-cj∥2bj),
where cj is the centric vectors, bj is the base width of RBF neural network.Based on Lyapunov stability theory, the reaching condition of the sliding surface iss(t)s˙(t)<0. Because the RBF neural network is used to approximate nonlinear mapping between the sliding surface and the output control, the weights of the RBF neural network should be adjusted based on the reaching condition. The weights are adjusted online according to gradient method to find the optimal weight, which can satisfy the reaching condition.The adjustment indexes of the RBF is as follows:(10)E=s(t)s˙(t).
The adaptive law of the weight is as follows:
(11)w˙j=-η∂E∂wj(t)=-η∂s(t)s˙(t)∂wj(t)=-η∂s(t)s˙(t)∂u(t)·∂u(t)∂wj(t),
where η is the parameter of the adaptive law.From the chain rule, the following property can be obtained:(12)∂s(t)s˙(t)∂u=s(t)∂s˙(t)∂u=s(t)∂[ce˙(t)+e¨(t)]∂u∂s(t)s˙(t)∂u=s(t)∂[ce˙(t)+i¨*c-x˙2]∂u∂s(t)s˙(t)∂u=s(t)∂[ce˙(t)+i¨*c-f(t)-bu-ud]∂u=-bs(t),∂u(t)∂wj(t)=∂[∑j=1mwj·exp(-∥s-cj∥2/bj)]∂wj(t)∂u(t)∂wj(t)=exp(-∥s-cj∥2bj).
Substituting (12) into (11) yields the following:
(13)w˙j=γs(t)exp(-∥s-cj∥2bj)=γs(t)hj(s),
where γ=bη.The update equation of the weights can be expressed as follows:(14)w(k)=w(k-1)+dw(k)+α(w(k-1)-w(k-2))w(k)=w(k-1)+γs(t)hj(s)+α(w(k-1)-w(k-2)),
where α is the parameter in the adjustment of the weights.If the perfect control law exists, which makes the RBF sliding mode controller reach the best performance, at this moment APF system reaches the sliding surface; then the system gets to sliding mode motion.If the time-varying functionf(t) in (5) is known, we can get the perfect control law as follows:
(15)ueq=1b[x˙2(t)-f(t)-d(t)+s˙(t)+λs(t)].
It can be proven that s˙(t)+λs(t)=0. Since λ>0 and s˙(t)s(t)<0, the sliding surface will gradually converge to zero.


## 3.2. Stability Analysis

In this paper, the RBF neural network is used to approximate the relationship between the sliding variable and the control law. The control law may have certain difference with the perfect control lawueq.From (5) and (15) we can get the following:
(16)s˙(t)=-λs(t)+b[ueq-u(t)].
Since RBF neural network can be used to approximate any nonlinear function, we make the following assumption:Assumption. The optimal weight W- of the RBF neural network exists, which makes the control law u approximate the perfect control law ueq with an error smaller than ε as follows.
(17)max|u-(x,W-)-ueq(x)|<ε,
where u-(x,W-)=∑k=1nw-khk=W-Th, W-=[w-1,w-2,…,w-n].Then(18)ueq(x)=W-Th+ε.
Define the weighting error as W~=W--W^, where W- is the optimal weight and W^ is the current estimated weight. Equation (18) can be written as follows:
(19)s˙(t)=-λs(t)+b(W~Th+ε).
The Lyapunov function can be chosen as follows:
(20)V=12sTs+bγW~TW~.
The derivative of V with respect to time becomes as follows:
(21)V˙=sTs˙+bγW~TW~˙.
Substituting  (19) into (21) yields the following:
(22)V˙=sT[-λs+b(W~T+ε)]+bγW~TW~˙V˙=-λsTs+sTbW~Th+sTbε+bγW~TW~˙V˙=-λsTs+sTbε+bW~T(sTh+1γW~˙).
Choosing adaptive law as follows:
(23)W~˙=-γsT(t)h(s).
Since W~˙=-W^˙, that is,
(24)W^˙=γsT(t)h(s),
it can be seen that adaptive law of RBF neural network’s weight corresponds to the weights equation (13) derived from gradient method.Substituting (24) into (22) yields the following:
(25)V˙=-λsTs+sTbε≤∥s∥(-λ∥s∥+bε).
If ∥s∥>bε/λ, then V˙<0, so the Lyapunov stability can be satisfied, and the sliding surface will converge to zero. Therefore, we can get the conclusion that the proposed RBF sliding mode controller is stable and the tracking error converges into a small error bound.


## 4. Simulation Study

In this section, simulation is implemented to investigate the proposed adaptive RBF sliding mode control towards shunt APF using Matlab/Simulink package with SimPower Toolbox. In the simulation, the controller starts to work from 0.05 second, and disturbance signal is introduced into the APF system at 0.12 second. The simulation parameters of the APF system are selected as follows.Parameters in RBF neural network: The number of hidden layer neuronm=11; the centric vectors c=-10:2:10; the base width b=1; parameters in gradient method: α=1; γ=10; parameters in sliding mode control: λ=0.08. parameters in PI control of DC side voltage:  kp=0.03; ki=0.02; other parameters of APF: inductance on the AC side L=5 mH; capacitor voltage on the DC side  vdc=100 uF;Figure4 describes the wave graph of A phase current before and after controlling the APF. It can be seen from Figures 5 and 6 that A phase current contains numerous harmonic before 0.05 second, the total harmonic distortion (THD) is 24.71%. After 0.05 second, the proposed controller begins to work, the current wave can approximate to sine waveform in no more than 0.01 second. Moreover, disturbance signal is added to the APF system at 0.12 second, the negative effect of disturbance signal can be eliminated in no more than 0.01 second. Figure 7 draws the THD from 0.13 to 0.17 second, the THD is 2.85%. Figure 8 describes the graph of compensation current tracking command current. We can see that the compensation current can keep track of the command current before 0.06 second. Besides, the tracking performance is very good after the disturbance signal is added from 0.12 second. So harmonic current can be eliminated and line current is forced to sine wave form, and THD can be obviously reduced. Figure 9 describes the graph of voltage on the DC side tracking the reference voltage; PI controller can make the tracking performance very well. After the disturbance signal is added, the voltage on the DC side can track the reference voltage again in no more than 0.02 second and maintain in a relative stable state. Therefore, it can be concluded that APF can compensate the harmonic current effectively with the proposed adaptive RBF sliding mode controller, and the controller has strong robustness towards disturbance signals.Figure 4
A phase current.Figure 5
Current harmonic analysis from 0 to 0.04 second.Figure 6
Current harmonic analysis from 0.06 to 0.1 second.Figure 7
Current harmonic analysis from 0.13 to 0.17 second.Figure 8
Command current and compensation current.Figure 9
Voltage wave of the DC side.Figure10 is the wave graph of the three-phase sliding surface s1,  s2, and s3, before and after controlling the APF. As we can see, the sliding surface s=0 is reached after 0.05 second with the control of APF, whereas the sliding surface is not stable before 0.05 second. Thus, the sliding surfaces gradually converge to zero, and the APF system gets to sliding mode motion.Figure 10
Three phase sliding surface.


## 5. Conclusions

An adaptive RBF neural sliding mode control method is proposed for three-phase active power filter. An RBF neural network control is used to adaptively approximate the nonlinear function of APF. The weights of the RBF neural network are adjusted according to gradient method. The sliding mode control is used to improve the robustness of the APF system. Simulation results demonstrate the good compensating performance of the harmonic current with the proposed adaptive RBF sliding mode controller.



---

*Source: 341831-2013-05-09.xml*