#### 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.

#### 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 Figure 1. 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.

##### 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 Figure 2. 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 (,,) 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: where the two-phase sinusoidal signals and are resulted from the phase-locked loop (PLL) circuit.

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 (,,) of source currents as shown in

So each current harmonic component (,,) is given by

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 where is the increment of the grid active current component.

So the exchange active power with HAF and supply system is calculated as where is A-phase line voltage RMS, is a capacitor value, is the ideal steady-state value of the HAF DC voltage, is the increment of capacitor voltage during , is a constant with switching characteristics of capacitor, and the is RMS in A-phase of .

According to the formulae (4)-(5), with neglecting the item and linearization near the operating point, after Laplace transform, the PI regulator , controlled object , and voltage detection are given by where is a proportional coefficient, is an integral constant.

Figure 3 shows the system transfer function; it is expressed as

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 Figure 3, is adopted as the DC bus voltage controller, instead of the conventional PI controller, so the system transfer function is modified into

The improved PSO algorithm is applied to the optimization of PINN parameters. An objective optimization problem can be defined as follows.

are neural network vectors representing the decision variables. is the objective function. and 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 () and its corresponding fitness. The particle with the greatest fitness is called the global best position () 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 and 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: where . is the inertia weight factor. and are acceleration constants. random() is a random number between 0 and 1. and are the velocity and the current position of particle at iteration .

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 (,) are optimized by improved PSO.

Neural network of PINN applies structure shown in Figure 4. The input layer of the PINN has two neurons of proportion. The two neurons (,) 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:

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 and globe optimum position through selecting the particles with minimal . 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 ; 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 Figure 6, 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.

The harmonic parameters of the proposed island Microgrid system are summarized in Table 1; while the total 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.

**(a) The current of one phase at the 11 kV level**

**(b) The spectrum of one phase at the 11 kV level**

The performance of the HAF depends on the DC bus voltage control optimization, shown in Figure 1. The simulation parameters are total power MW, a single motor power factor , *μ*F, out filter mH, *μ*F and V. The parameters of improved PSO are set to be , , the population size is 100, the iteration times are 50, the inertia weight factor is 0.8, the acceleration constants and 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.

The step response of (PU) jumps from 0.7 to 1.0, and the tracks the given value with PINN by improved PSO optimization as shown in Figure 8. Training PINN to 26 steps, the error of algorithm is , shown in Figure 9. The optimization result for the DC bus voltage control of PINN is effective.

The HAF with DC bus voltage control by PINN is installed in the island microgrid system. It can be seen from Figure 10 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 with PINN is lowered to about 0.95 when 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.

**(a) DC bus voltage control with PINN**

**(b) DC bus voltage control with conventional PI**

By using the HAF with DC bus voltage PINN control, the total 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.

**(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.