# Optimization and Coordination of HAFDV PINN Control by Improved PSO

Authors: Bin Huang; Nengling Tai; Wentao Huang
Journal: Journal of Control Science and Engineering
 (2013)

---

## Abstract

The new hybrid active filter (HAF) is composed of the larger-capacity passive filter banks and the smaller-capacity active filter. It is difficult to tune the parameters of a PI controller using the DC capacitor voltage control. In this paper, the improved particle swarm optimization (improved PSO) algorithm is proposed to solve the coordinated design problem, and the neural network weights as the particle swarm optimization are adopted to optimize the system parameters. Comparing with the conventional PI controller, the results of PINN controller prove the effectiveness of designed method on both the transient and steady-state performance of the hybrid active filter DC bus voltage (HAFDV) controllers.


---

## Body

## 1. Introduction

Microgrid, an entity of various distributed energy resources (DERs) with different characteristics and mutual complementation, can operate in phase with macrogrid and improve energy utilization efficiency and electricity supply reliability. Due to the applications of nonlinear elements, the harmonic interference on the micronetwork is growing. In order to ensure the safety of the macrogrid, we use the hybrid active filter to remove the harmonics of the micronetwork.Hybrid active filter, which has dynamic, better compensation characteristics and a greater compensation capacity, is used to suppress harmonics and reactive power compensation of the macrogrid. Reference [1] studied the capacitance and voltage of the active filter; it is not suitable for a larger-capacity macrogrid. References [2–4] designed the PI controller of the DC bus voltage without optimizing the controllers. Therefore, improved PSO optimizes the parameters of HPF controller using PI neural network instead of the conventional PI. The time-domain results demonstrate the effectiveness of the proposed design method of the HAF DC bus voltage controllers.


## 2. Problem Formulations

In this section, the mathematical model of HPF is presented in detail, and then the HAFDV controllers will be considered as an example to verify the effects of this method.


### 2.1. Modeling of HAF

The structure of the proposed hybrid active power filter (HAPF) is shown in Figure1. It is composed of a smaller-scale three-phase voltage source inverter (VSI) employing pulse-width modulation (PWM), with a large capacitor at the DC side and an output filter to eliminate the high-frequency ripples at the output side. A coupling transformer connects VSI in series with a group of passive power filters. And all of them are connected in shunt with Microgrid.Figure 1
Configuration of the hybrid active power filter.


### 2.2. Formulations of the HAF DC Bus Voltage Controllers

The main objective of the control scheme is to force all the harmonics of load current to flow into passive filter [5–8]. A hysteresis current controller is used to switch the bridge arm of the active filter [9–11].The control scheme is indicated in Figure2. It builds the reference currents for the HAF based on the instantaneous active and reactive power theory. The synchronous reference frame (SRF) theory is used to extract the fundamental component of the source current by transformation of the supply currents (iu,iv,iw) into the reference frame. The system under study is a three-wire system where the zero sequence may be neglected. The following are basic equations for these transformations:
(1)[ipiq]=23[sinωt-cosωt-cosωt-sinωt]×[1-12-12032-32][iuiviw],
where the two-phase sinusoidal signals sinωt and cosωt are resulted from the phase-locked loop (PLL) circuit.Figure 2
The control scheme of HAF.The lowpass filter is used to extract the DC components, realized by moving average to 80 Hz. The extracted DC components are transformed back into a-b-c coordinates to obtain the fundamental components (iuf,ivf,iwf) of source currents as shown in
(2)[ipjiqj]=[sinωt-cosωt-cosωt-sinωt][ipiq],[iufivfiwf]=23[10-1232-12-32][ipjiqj].So each current harmonic component (iuh,ivh,iwh) is given by
(3)[iuhivhiwh]=[iuiviw]-[iufivfiwf].The source current is controlled to follow this reference current by switching the voltage source inverter with a hysteresis current controller.


### 2.3. The Objective Function

Conventional PI controller is used to maintain the DC bus voltage of the HAF by compensating the voltage losses [12–14]. Conventional PI controller parameters are often obtained by several experiments. It is difficult to adjust all the parameters. This paper designs PI neural network controller combined with improved PSO. The interlayer and output layer linking weights of PI neural network (PINN) are used as the optical parameters of PSO.According to the formulae (1)–(3), A-phase fundamental current increment values are obtained bys
(4)Δia=23sinωt·Δipf,
where Δipf is the increment of the grid active current component.So the exchange active power with HAF and supply system is calculated as(5)Pf=3Ea·Δia,∫0ΔtPfdt=Cdc[(Udc+ΔUCdc)2-Udc2]2+∫0ΔtKicadt,
where Ea is A-phase line voltage RMS, Cdc is a capacitor value, Udc is the ideal steady-state value of the HAF DC voltage, ΔUCdc is the increment of capacitor voltage during Δt, K is a constant with switching characteristics of capacitor, and the ica is RMS in A-phase of ic.According to the formulae (4)-(5), with neglecting the item (ΔUCdc)2 and linearization near the operating point, after Laplace transform, the PI regulator Gpi(s), controlled object Gv(s), and voltage detection Gf(s) are given by
(6)Gpi(s)=Kp(Ti+1)Tis,Gv(s)=KiEaCdcUdcs,Gf(s)=KfTfs+1,
where KP is a proportional coefficient, Ti is an integral constant.Figure3 shows the system transfer function; it is expressed as
(7)G(s)=Gpi(s)Gv(s)1+Gpi(s)Gv(s)Gf(s).Figure 3
System transfer function.The disadvantage of conventional PI controller lies in the difficulty to resolve the trade-off among smoothness, fastness, and accuracy. The major parameters of the HAF DC bus voltage controller require experiments and high skills in system debugging process and will be fixed eventually.A PINN controller, shown in the dotted line in Figure3, is adopted as the DC bus voltage controller, instead of the conventional PI controller, so the system transfer function is modified into
(8)G(s)=PINN(S)KiEaTfs+PINN(S)KiEaCdcUdcTfs2+CdcUdc+PINN(S)KiEaKf.The improved PSO algorithm is applied to the optimization of PINN parameters. An objective optimization problem can be defined as follows.X
PINN
=
NN
(
K
PINN
,
T
PINN
)
X
PINN are neural network vectors representing the decision variables. fn(XPINN) is the objective function. gj(KPINN) and hk(TPINN) represent the constraints.


## 2.1. Modeling of HAF

The structure of the proposed hybrid active power filter (HAPF) is shown in Figure1. It is composed of a smaller-scale three-phase voltage source inverter (VSI) employing pulse-width modulation (PWM), with a large capacitor at the DC side and an output filter to eliminate the high-frequency ripples at the output side. A coupling transformer connects VSI in series with a group of passive power filters. And all of them are connected in shunt with Microgrid.Figure 1
Configuration of the hybrid active power filter.


## 2.2. Formulations of the HAF DC Bus Voltage Controllers

The main objective of the control scheme is to force all the harmonics of load current to flow into passive filter [5–8]. A hysteresis current controller is used to switch the bridge arm of the active filter [9–11].The control scheme is indicated in Figure2. It builds the reference currents for the HAF based on the instantaneous active and reactive power theory. The synchronous reference frame (SRF) theory is used to extract the fundamental component of the source current by transformation of the supply currents (iu,iv,iw) into the reference frame. The system under study is a three-wire system where the zero sequence may be neglected. The following are basic equations for these transformations:
(1)[ipiq]=23[sinωt-cosωt-cosωt-sinωt]×[1-12-12032-32][iuiviw],
where the two-phase sinusoidal signals sinωt and cosωt are resulted from the phase-locked loop (PLL) circuit.Figure 2
The control scheme of HAF.The lowpass filter is used to extract the DC components, realized by moving average to 80 Hz. The extracted DC components are transformed back into a-b-c coordinates to obtain the fundamental components (iuf,ivf,iwf) of source currents as shown in
(2)[ipjiqj]=[sinωt-cosωt-cosωt-sinωt][ipiq],[iufivfiwf]=23[10-1232-12-32][ipjiqj].So each current harmonic component (iuh,ivh,iwh) is given by
(3)[iuhivhiwh]=[iuiviw]-[iufivfiwf].The source current is controlled to follow this reference current by switching the voltage source inverter with a hysteresis current controller.


## 2.3. The Objective Function

Conventional PI controller is used to maintain the DC bus voltage of the HAF by compensating the voltage losses [12–14]. Conventional PI controller parameters are often obtained by several experiments. It is difficult to adjust all the parameters. This paper designs PI neural network controller combined with improved PSO. The interlayer and output layer linking weights of PI neural network (PINN) are used as the optical parameters of PSO.According to the formulae (1)–(3), A-phase fundamental current increment values are obtained bys
(4)Δia=23sinωt·Δipf,
where Δipf is the increment of the grid active current component.So the exchange active power with HAF and supply system is calculated as(5)Pf=3Ea·Δia,∫0ΔtPfdt=Cdc[(Udc+ΔUCdc)2-Udc2]2+∫0ΔtKicadt,
where Ea is A-phase line voltage RMS, Cdc is a capacitor value, Udc is the ideal steady-state value of the HAF DC voltage, ΔUCdc is the increment of capacitor voltage during Δt, K is a constant with switching characteristics of capacitor, and the ica is RMS in A-phase of ic.According to the formulae (4)-(5), with neglecting the item (ΔUCdc)2 and linearization near the operating point, after Laplace transform, the PI regulator Gpi(s), controlled object Gv(s), and voltage detection Gf(s) are given by
(6)Gpi(s)=Kp(Ti+1)Tis,Gv(s)=KiEaCdcUdcs,Gf(s)=KfTfs+1,
where KP is a proportional coefficient, Ti is an integral constant.Figure3 shows the system transfer function; it is expressed as
(7)G(s)=Gpi(s)Gv(s)1+Gpi(s)Gv(s)Gf(s).Figure 3
System transfer function.The disadvantage of conventional PI controller lies in the difficulty to resolve the trade-off among smoothness, fastness, and accuracy. The major parameters of the HAF DC bus voltage controller require experiments and high skills in system debugging process and will be fixed eventually.A PINN controller, shown in the dotted line in Figure3, is adopted as the DC bus voltage controller, instead of the conventional PI controller, so the system transfer function is modified into
(8)G(s)=PINN(S)KiEaTfs+PINN(S)KiEaCdcUdcTfs2+CdcUdc+PINN(S)KiEaKf.The improved PSO algorithm is applied to the optimization of PINN parameters. An objective optimization problem can be defined as follows.X
PINN
=
NN
(
K
PINN
,
T
PINN
)
X
PINN are neural network vectors representing the decision variables. fn(XPINN) is the objective function. gj(KPINN) and hk(TPINN) represent the constraints.


## 3. Improved PSO

Particle swarm optimization, inspired by the social behavior of a bird flock, was originally designed by Kennedy and Eberhart in 1995. The original idea is to simulate the birds' food-hunting for the global optimal point. One particle presents a bird and it can calculate the adaptive value of its current position, and every particle records the optimal value searched by itself [15, 16].The particles have their memory, and each particle keeps tracking of its local best position (pid) and its corresponding fitness. The particle with the greatest fitness is called the global best position (gid) of the swarm. The basic PSO algorithm has many defects, such as falling into local optimum and being impacted by the fact that it is insensitive to environment variables, precocious, and so on. The paper adopted improved PSO which has multigroup particles to search different parts of the solution space. When pid and gid are obtained, a particle updates its velocity and position based on (9). In the end, the algorithm will check the results until the best solution is found or termination conditions are satisfied:
(9)vidk+1=λ×vidk+β1×random()×(pidk-xidk)+β2×random()×(gidk-xidk),xidk+1=xidk+vidk+1,
where β1,β2≥0. λ is the inertia weight factor. β1 and β2 are acceleration constants. random() is a random number between 0 and 1. vid and xid are the velocity and the current position of particle at iteration id.The improved PSO algorithm optimizes PINN controllers which is defined as proportional, integral function of neurons. PINN is a dynamic multilayer feed forward neural network. The parameters of PINN (KPINN,TPINN) are optimized by improved PSO.Neural network of PINN applies2×2×1 structure shown in Figure 4. The input layer of the PINN has two neurons of proportion. The two neurons (KPINN,TPINN) in the middle layer are proportional and integral elements of the input signal, and the weights from input layer to the middle layer are remained of constant value (−1, +1). In order to minimize the objective function value, the mean square error (MSE) function has been employed in (10). The improved PSO adjusts the network weights by the back-propagation (BP) algorithm [17]. The flow chart of the improved PSO is shown in Figure 5. Consider the following:
(10)J=1m∑h=1n[r(k)-y(k)]2.Figure 4
The structure of PINN.Figure 5
The flow chart of improved PSO.The improved PSO shows many advantages. Firstly, it initializes the improved PSO and PINN parameters, which contain the initial particles, their positions, and velocities. For each particle, it evaluates the fitness function [18]. Secondly, it generates position and velocity and calculates adaptive value, considering the steady error and setting time. It calculates the value of every particle in all subgroups. Besides, it can train PINN structure with current positions of the particles by BP learning and predicting. In addition, improved PSO can find the local optimum position pid and globe optimum position gid through selecting the particles with minimal J. Furthermore, it evaluates and calculates the fitness and the new adaptive value by using (9). What is more is that it can update the velocity and the position of each particle. The new position is kept if the current position is dominated by positioning the pid; otherwise, the current position replaces it in space; neither of them is randomly selected. Finally, it can judge the termination criterion; the procedure goes to the third step until it is satisfied.


## 4. Results

The proposed island Microgrid system is shown in Figure6, and the primary parameters of system are as follows. The system comprises four 11 kV medium-voltage buses with two 4000 kW generator engines and two 3000 kW motors driven by 12-pulse inverters linking each other through the circuit breakers and four 400V low-voltage buses with some motors and loads connected by the circuit breaker. In addition, a 1500 kW of emergency engine is installed on the low-voltage side of power supply in case of emergency.Figure 6
Microgrid system single line figure.The harmonic parameters of the proposed island Microgrid system are summarized in Table1; while the total THDi is 8.49%, it exceeds the national standard of China. Figure 7 shows the current and spectrum of one phase at the 11 kV level. For the security of the grid, HAF is used between the bus and inverter.Table 1
Harmonic of microgrid system.
Harmonic order
A percentage of content (%)
5
1.22471
7
0.84343
11
5.83203
13
4.54842
23
2.11186
25
2.10007
35
1.32699
37
1.30599
47
1.17763
49
1.14342
All
8.49The current and spectrum of one phase at the 11 kV level.
(a)
The current of one phase at the 11 kV level
(b)
The spectrum of one phase at the 11 kV levelThe performance of the HAF depends on the DC bus voltage control optimization, shown in Figure1. The simulation parameters are total power Pall=3.2 MW, a single motor power factor cosφ=90.9%, CUcd=3000 μF, out filter Lout=0.5 mH, Cout=500 μF and Udc=6000 V. The parameters of improved PSO are set to be maxVid=20, minVid=-20, the population size is 100, the iteration times are 50, the inertia weight factor is 0.8, the acceleration constants β1 and β2 both are 3, random() is a random number between 0 and 1, and the sample and saturation of BP are 200 and 2, respectively. So the optimum weights of PINN, which are trained by improved PSO, are 8.30376 and 0.00283987. The parameters of PF are summarized in Table 2.Table 2
Parameters of PF.
The PF of HAF
L
/
ohm
C
/
μ
F
Q
11th
1.9185
13.71
40
13th
1.1301
16.67
40The step response ofUdc*(PU) jumps from 0.7 to 1.0, and the Udc tracks the given value with PINN by improved PSO optimization as shown in Figure 8. Training PINN to  26 steps, the error e(t) of algorithm is 1.4169e-005, shown in Figure 9. The optimization result for the DC bus voltage control of PINN is effective.Figure 8
Improved PSO optimizes PINN.Figure 9
Convergence curve of adaptive value.The HAF with DC bus voltage control by PINN is installed in the island microgrid system. It can be seen from Figure10 that PINN has advantages over the conventional PI and that the filtering functions are well performed by the DC bus voltage controller under the different operating conditions. The maximum overshoot of the traditional PI is close to 1.9; compared with 1.9, the maximum overshoot of Udc with PINN is lowered to about 0.95 when Udc* is 0.7. The DC bus voltage with PINN is stable at 0.13 s which is the lower than conventional PI, and the response is quicker and smoother than the conventional PI.Compare PINN with conventional PI.
(a)
DC bus voltage control with PINN
(b)
DC bus voltage control with conventional PIBy using the HAF with DC bus voltage PINN control, the totalTHDi of the island Microgrid system is reduced from 8.49% to 0.96%. Figure 11 presents the results of the smooth current and reduced harmonic. All the harmonics are that lower than the national standards are summarized in Table 3.Table 3
Harmonic of microgrid system with HAF.
Harmonic order
A percentage of content (%)
5
0.300779
7
0.111241
11
0.0498152
13
0.0196565
23
0.00768633
25
0.00464055
35
0.270777
37
0.279686
All
0.96The current and spectrum of one phase at the 11 kV level with HAF.
(a)
The current of one phase at the 11 kV level with HAF
(b)
The spectrum of one phase at the 11 kV level with HAF


## 5. Conclusions

Due to the harmonic interference of nonlinear loads, the HAF is used to protect the security of the island Microgrid system. An optimization method based on improved PSO for design of HAFDV control is developed by using PINN instead of conventional PI. The coordinated design problem of DC bus voltage control is formulated as a nonlinear constrained objective optimization problem, where improved PSO is employed to search for the optimal solutions. Comparing controllers of PINN and conventional PI, simulation results show that HAFDV control with PINN has more effective control results, better stability and lower overshoot of DC voltage, and more rapid response than conventional PI.



---

*Source: 872624-2013-03-06.xml*