Optimization and Coordination of HAFDV PINN Control by Improved PSO

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.


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][3][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.

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.

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.

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][6][7][8].A hysteresis current controller is used to switch the bridge arm of the active filter [9][10][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 sin  and cos  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.

The Objective Function.
Conventional PI controller is used to maintain the DC bus voltage of the HAF by compensating the voltage losses [12][13][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 Δ pf 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,  dc is a capacitor value,  dc is the ideal steady-state value of the HAF DC voltage, Δ  dc is the increment of capacitor voltage during Δ,  is a constant with switching characteristics of capacitor, and the  ca is RMS in A-phase of   .According to the formulae (4)-( 5), with neglecting the item (Δ  dc ) 2 and linearization near the operating point, after Laplace transform, the PI regulator  pi (), 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.

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 ( id ) and its corresponding fitness.The particle with the greatest fitness is called the global best position ( id ) 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  id and  id 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  1 ,  2 ≥ 0.  is the inertia weight factor. 1 and  2 are acceleration constants.random() is a random number Step () between 0 and 1.  id and  id 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 ( PINN , PINN ) are optimized by improved PSO.
Neural network of PINN applies 2 × 2 × 1 structure shown in Figure 4.The input layer of the PINN has two neurons of proportion.The two neurons ( PINN , PINN ) in 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  id and globe optimum position  id 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  id ; 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.

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 THD  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.The performance of the HAF depends on the DC bus voltage control optimization, shown in Figure 1.The simulation parameters are total power  all = 3.2 MW, a single motor power factor cos  = 90.9%,  cd = 3000 F, out filter  out = 0.5 mH,  out = 500 F and  dc = 6000 V.The parameters of improved PSO are set to be max  id = 20, min  id = −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.
The step response of  * dc (PU) jumps 0.7 to 1.0, and the  dc 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 1.4169 −005 , 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  dc with PINN is lowered to about 0.95 when  * dc 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.By using the HAF with DC bus voltage PINN control, the total THD  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.

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.

Figure 1 :
Figure 1: Configuration of the hybrid active power filter.

Figure 5 :
Figure 5: The flow chart of improved PSO.
The current of one phase at the 11 kV level The spectrum of one phase at the 11 kV level

Figure 7 :
Figure 7: The current and spectrum of one phase at the 11 kV level.

Table 3 :
Harmonic of microgrid system with HAF.