Simulation of Neuro-Fuzzy Controlled Grid Interactive Inverter N. Altin, Member, IEEE
I. Sefa, Member, IEEE
Department of Electric, Faculty of Technical Education, Gazi University Ankara, TURKEY
[email protected]
Electrical & Electronics Engineering Department, Faculty of Technology, Gazi University Ankara, TURKEY
[email protected]
Abstract— In this study, a grid interactive inverter which is capable of importing electrical energy, generated from renewable energy sources such as wind, solar and fuel cells, to the grid line is designed and simulated with MATLAB/Simulink. A line frequency transformer and LCL filter is used at the output of the grid interactive inverter that is designed as voltage source inverter. Inverter is designed as current controlled to decrease the susceptibility to phase errors, and neuro-fuzzy controller is used as current controller. The membership functions and the rule base of the fuzzy logic controller, which control the inverter output current, are determined by using artificial neural networks. Neuro-fuzzy controlled and PI controlled inverter simulation results are given together and compared. Simulation results show that grid interactive inverter operates synchronously with the grid line; inverter output current which imported to the grid is in sinusoidal waveform and harmonic level of this current meets the international standards. Also, it is seen that inverter has faster response to the reference variations than PI controller. Keywords-component;grid interactive inverter; neuro-fuzzy controller; ANFIS; renewable energy sources.
I.
INTRODUCTION
Research studies for alternative energy sources have become crucial depending on the causes such as getting more difficult of supplying fossil fuels economically and safely in terms of the world’s increasing energy demand and recent public conscious of environmental protection. As a result of these researches, some renewable energy sources (RES) has been recognized such as the sun, wind, hydrogen, biomass and geothermal. Initially, these sources (RES) were used in remote areas for communication and lightening of roads where there was no electrical lines. Today their use has been common both in the residential and commercial applications (especially distributed generation applications) [1-3]. Grid interactive inverters’ being usable has helped RESs’ spreading fast and also there is a possibility to transfer whole produced energy or the amount more than needed to the grid by grid interactive inverters. Therefore users’ expenses for energy can be decreased and even it is possible to get an income [4]. Past studies are mostly about inverter structures and different topologies have been presented. Generally, linear
978-1-4577-0746-9/11/$26.00 ©2011 IEEE
controllers or hysteresis current control methods were used in these works. There are not many new approaches about the control strategies of inverter. A method aiming to balance the capacitor voltage for cascaded connected multileveled inverters was presented by Li and his friends [5]. Uemura and Yokoyama applied deadbeat control method for single phased grid interactive inverter [6-7]. In a different work, grid voltage and feedforward control of load current for was suggested in order to get better the dynamic performance of the inverter [8]. A two modes inverter was presented by Gu and his friends. This inverter works as grid interactive inverter when the grid exists and inverter output current has been controlled by three-leveled hysteresis current controller. When the grid is cut off, inverter goes on to work in island mode in voltage control. In island mode, inverter output voltage is controlled with fuzzy logic controller [9]. There are limited numbers of new approach about control of the grid interactive inverters in past literature. Classical PI and PID controllers can be used for current control in grid interactive inverters. A reasonable performance can be obtained with a constant gain PI controller, designed for a certain operating point. However, when the working point changes due to the variations in system parameters, transient response cannot be quick enough and inverter current quality cannot reach the required level. Operating points of grid interactive inverters constantly change depending on changing natural conditions such as radiation of the sun and wind speed, and unstable grid parameters. Therefore, the controller must be in adaptive nature instead of a stable parameter one in grid interactive inverters [10]. In this study, a single phase grid interactive inverter has been designed in order to transfer electrical energy produced by RESs to grid. For the control of inverter output current, neuro-fuzzy control method has been used. Thus, high performance control, which is irresponsive to nonlinear characteristics and operating points of inverter, time varying parameters of the grid and RES is obtained. Therefore it is aimed to obtain a control in high performance, which is free from non-linear of the inverter, changing parameters of the grid, RES and the inverter in time, or in other words, the change in system’s working point. Adaptive Neuro-Fuzzy Inference System (ANFIS), which is developed for this
purpose, was used in the design of fuzzy logic controller instead of trial and error method. Therefore input and output membership functions and rule base of the fuzzy logic controller were determined in terms of the given information, designing process was shortened, and the number of membership functions and rules were reduced. Simulations are performed in MATLAB/Simulink. It is seen from the simulation results that, controller has fast dynamic response, inverter output current synchronized with the grid phase and frequency and the inverter output current harmonics are in the limits of the international standards.
Some grid interactive inverters consist of high frequency transformers in the structure of DC-DC transformers or DCAC inverters, and grid frequency transformers are used in some of them. If DC bus voltage level is proper, transformerless inverter structures can be used. However, grid frequency transformers get grounding easier, and they provide electrical isolation between grid and DC source. Even these transformers have disadvantages like increased weight, size and cost, they are the only solution preventing DC current injection to grid [14]. III.
II.
GRID INTERACTIVE INVERTER
Solar modules and fuel cells directly produce DC voltage. Because grid and most of the loads demand AC power, the produced power is required to be converted to AC and this process is performed by using inverters. It is possible to use synchronous or asynchronous generators in wind tribunes. Especially in low and medium power levels, higher energy conversion efficiency can be obtained by using variable speed systems in which it is used synchronous generators. In this case, amplitude and frequency of AC voltage, produced from the generator, changes with wind speed. This power with variable voltage and variable frequency cannot be directly transferred to the grid or the loads. Hence, generator output is rectified as a first step, and then it is transformed into constant voltage constant frequency AC voltage with the help of the inverters [11]. Even grid interactive inverters can be designed as current controlled or voltage controlled, because small synchronization errors cause overloading of inverters, voltage control is not much preferred. Current control that is more insensitive to phase errors is suggested in energy transfer to grid [12]. Such kind of inverters connected to grid must meet the conditions defined by grid directors. International standards such as IEC61727, IEEE1547 and EN61000-3-2 which explain the features of grid interactive inverters are published. According to these standards, a grid interactive inverter must operate in unity power factor. In other words, the current injected to the grid by inverter must be in the same phase and frequency with the grid voltage. Besides, this current must be in sinusoidal form and harmonic components of inverter current and/or total harmonic distortion (THD %) of current is limited. If the inverters continue to operate when the grid is removed by any reason, an electrical island, whose electrical power is going on, occurs (if the inverter power is enough). Such kind of electrical islands might be dangerous for the maintenance personnel who have no information, so they must be prevented. Grid interactive inverters must be off-line by detecting probable outages and statements about this condition are officially indicated in related standards [10]. The grid voltage should be detected to obtain unity power factor operation. Phase Locked Loop (PLL) circuits are used to detect the phase and frequency of the grid voltage. These data are used to generate the reference current. So, it can be said that, PLL is one of the most important parts of grid interactive inverters [13].
NEURO-FUZZY CONTROLLERS
Fuzzy logic controllers (FLC) are frequently used in the control of power electronic converters, especially after the developments in microprocessor technology, due to the causes such as not to need the systems’ mathematical models, and being insensitive to the parameters and the change of operating points. However, FLC’s performance depends on rule base, numbers and shapes of membership functions. These parameters are generally found with trial and error method. This process sometimes takes a long time. In some situations, best result is never found [15]. Artificial neural networks (ANN) are mathematical models which are created by designing a number of nonlinear cells in layers and connecting them with each other with the connections in different weight values. They have a parallel working ability, a non-linear and adapted structure, learning and a generalizing ability. Also, they are designed independent from system parameters. Due to these advantages, ANNs are used in the control of power electronic converters. Besides, there are some limitations of them, such as not having certain rules of determining the number of hidden layers and cell number in these layers, education problem of the network, and not to be able to solve steady state errors [15-16]. Neuro-fuzzy controllers, which use the FLC principles and are obtained by combining the superior characteristics of both FLC and ANN control methods, are obtained. By using this method it is combined the learning, parallel knowledge/data processing abilities of neural network with the inference like a human ability of fuzzy logic. Fuzzy neural systems are used in all applications that FLC and ANN are used, especially in the control of non-linear systems [1518]. A.
Architecture of ANFIS A number of approaches were developed for different featured applications combining ANN and FLC. One of the network structures used in neuro-fuzzy control is ANFIS, introduced by Jang in 1993 [19]. Many researchers have been interested in ANFIS and they have used ANFIS in several different application. Adapted network is a multilayered and feed forward network in which every node performs a special function on input signal. Functions for all nodes can be different, and they are defined according to the input-output function that the network is designed to perform. Parameters in nodes have been updated according to given education data and learning procedure in order to realize desired input- output matching [17].
Main idea of this neural adaptive learning procedure is quite simple. This procedure gives a method for fuzzy modeling process to calculate the optimum membership function parameters by using learning data for fuzzy inference system to realize given input-output matching. This can be done with the information what the above mentioned method learned from the data set. ANFIS designs a fuzzy inference system whose membership functions’ parameters were adjusted by using input and output data and only gradient method or using this algorithm together with the least squares method. Consequently, it brings learning ability to fuzzy neural system [20]. There are almost no other limitations for the node functions of adaptive network except piecewise differentiability. The only structural constraint of adaptive network is it should be of feedforward type. ANFIS was immediately started to be used with this feature and has commonly been used in various areas. The rules of fuzzy inference system, whose equivalent network architecture is seen in Fig. 1, with two inputs, single output, two rules, Takagi-Sugeno inference method is given below: Rule 1: IF x=A1 and y=B1, THENE f1=p1x+q1y+r1,
(1)
Rule 2: IF x=A2 and y=B2, THEN f2=p2x+q2y+r2,
(2)
where, x, y are input variables, f is output function, Ai-Bi are the membership functions defined for inputs, and p, q and r are the output variables.
input values and membership functions. In other words, fuzzification process performs in this layer. Usually, bellshaped membership functions with maximum equal to 1 and minimum equal to 0, which is given in Eq. 4:
μAi (x ) =
1 x − c i 1 + a i
2
(4)
bi
where ai, bi and ci are parameters which change the bellshaped membership functions therefore change the degrees of membership corresponding to inputs. These parameters are adjusted while network education process. Triangular or trapezoidal shaped membership functions can also be used in this layer. 2. Layer: All nodes in this layer are circle nodes and perform one of the t-norm operators to incoming signals and send the result to output. Output of the node is given in Eq. 5:
Oi2 = wi = μAi (x ) × μBi ( y )
(5)
3. Layer: Every node in this layer is a circle node and they are labeled N. The ith node calculates the ratio of ith node firing strength to the sum of all rules’ firing strengths as seen in Eq. 6. In other words, this layer calculates the normalized firing strengths. wi w1 + w2
i = 1,2.
(6)
4. Layer: Every node in this layer is a square node and the node function is given in Eq. 7:
w1 f1
Oi4 = wi f i = wi ( pi x + qi y + ri ) , w2 f 2
(7)
where wi is the output of the 3. layer, and pi, qi and r are the parameter set which is named as consequent parameter. This layer sets up an adaptive correlation between the normalized firing strength and consequent parameter.
w2
Fig.1. Equivalent network architecture of ANFIS
As seen from figure, ANFIS composes of 5 layers which perform different functions. Functions of these layers are explained below [19]: 1. Layer: Every node in this layer is a square node, so they are adaptive nodes. These nodes represent the fuzzy set for inputs x, y. Output values fort he nodes in this layer is obtained by using node function given in Eq. 3:
Oi1 = μAi (x ) ,
i = 1,2,3....
Usually product is used as t-norm operator as shown in Eq. 5. This layer performs inference process and output of the every node represents the firing strength of a rule.
Oi3 = wi =
w1
(3)
where x is the input signal of node i and Ai is linguistic variable (small, medium, large etc.) defined for this node. Oi is the output value and gives the degree of membership for
5. Layer: There is only one circle node in this layer, and labeled with Σ. Node function is given in Eq. 8, and as seen from equation output signal is obtained by summing all incoming signals.
Oi5
=
i
w f = w
i i
wi f i
i
(8)
i
i
PROPOSED NEURO-FUZZY CONTROLLED GRID INTERACTIVE INVERTER Performances of the grid interactive inverters are affected from variation of grid parameters. Also, inverter operation point varies because of the variable natural effects such as IV.
amount of solar radiation and wind speed. Instead of conventional linear controller, an adaptive controller should be designed to obtain superior performance in these variable conditions.
first order Sugeno type fuzzy inference systems are defined as given with Eq. 9:
In accordance with this situation, in this study it is aimed to control the inverter in adaptive structure according to varying conditions. FLC is chosen to obtain adaptive structure. Also, ANFIS is used to determine the optimum number and shape of the membership functions and obtain rule base, and to minimize the controller design duration. The block diagram of the proposed single phase grid interactive inverter is seen in Fig.2. As seen from the figure, single phase grid interactive inverter is composed of voltage source inverter (VSI) structure, line frequency transformer, PLL, LCL output filter and neuro-fuzzy current controller.
where x, y are antecedent, and p, q and r are constant numbers. Output level (zi) of the each rule weighted with the firing strength (wi). Firing strength can be found with Eq. 10 for given values: Input 1=x, Input 2=y and implication method=AND:
Modeling with ANFIS approach is similar with many of other identification methods. Initially, parameters such as model structure, numbers of inputs and outputs, numbers of membership functions were determined. In this study, maximum number of the membership functions for input and output is determined as 3. ANFIS requires training and test data to determine the rule base and membership functions. In this study, data sets with 1200 data are used in both of these processes. The parts of the training and test data sets are shown in Table I and II respectively. As a result of training and test processes, bell-shaped membership functions are chosen for input variables error (e) and change in error (ce) and they are seen in Fig. 3. As seen from figure, two membership functions which are labeled as “Small” and “Large” linguistic variable are determined for both two input variables. MATLAB Fuzzy Logic Toolbox’s ANFIS editor only supports Sugeno type fuzzy inference systems. Rules for
IF x=A and y=B, THAN z=p*x+q*y+r ,
wi = AndMethod (F1(x), F2(y)) ,
(9)
(10)
where F1( ) and F2 ( ) are the membership functions for Inputs 1 and 2 respectively. Consequently, final output of the system is weighted mean of all rule outputs and is computed with Eq. 11 [30]. N
w z
i i
Output =
i
(11)
N
wi
i
In this study, “Product” is chosen as implication method, and ANFIS determines two membership functions for the output and two rules for given training and test data. The determined rules are given below:
1. Rule: IF x=K and y=K, z= p1*x+q1*y+r1. 2. Rule: IF x=B and y=B, z= p2*x+q2*y+r2. The parameters defined in these rules are given in Eq. 12 and Eq. 13: p1=0,8217
q1=0,823
r1 =-0.004214 ,
(12)
p2=0,3783
q2=0,526
r2 = 0.4078
(13)
Fig. 2. Block diagram of proposed single phase grid interactive inverter.
TABLE I TRAINING DATA SET
e 1 1 0,928409 1 0,741226 0,875348 : : : : : : : -0,8912 -1 -1 -0,75324 -1 -1
ce 0,004551 0,005452 0,009067 0,031126 0,017787 0,085083 : : : : : : : -0,03245 -0,02705 -0,02129 -0,01763 -0,01448 -0,00275
cd 0,809949 0,809776 0,809073 0,804788 0,797025 0,793684 : : : : : : : -0,80454 -0,8056 -0,80675 -0,80746 -0,80806 -0,81029
(a)
TABLE II TEST DATA SET
e 1.000000 1.000000 0.769360 1.000000 0.761859 0.922742 : : : : : : : -0.895232 -0.896149 -0.749289 -0.792604 -1.000000 -0.894816
ce 0.005179 0.007144 0.012001 0.042729 -0.010354 -0.013116 : : : : : : : -0.032441 -0.022001 0.006330 -0.234226 0.006350 0.002133
cd 0.809829 0.809449 0.808521 0.802505 0.796863 0.793467 : : : : : : : -0.804538 -0.806613 -0.807163 -0.807815 -0.808355 -0.810410
(b) Fig. 3. a) Membership functions determined by ANFIS for error (e) b) Membership functions determined by ANFIS for chance in error (ce). ∞
ITAE = t e(t ) dt ∞
ITSE = te2 (t ) dt
MRE =
n
I refi − I invi
i =1
I invi n
(16)
0
V.
SIMULATION RESULTS
In this study, neuro-fuzzy controlled grid interactive inverter is designed and simulation studies are carried out. Controller inputs of the grid interactive inverter, which is designed as current controlled, are error and change in error, and change in duty is defined as controller output.
Different performance indices such as the mean relative error (MRE), the integral of time multiply absolute error (ITAE) and the integral of time multiply squared error (ITSE), which can be calculated by Eq. 14-16, are used to compare the performance of proposed controller and linear controllers:
(15)
0
(14)
In simulation studies, the reference current value is 60% increased at t=0.2 and 60% decreased at t=0.4 as seen from Fig. 4 to test the neuro-fuzzy current controller performance. It is seen from figure that, the inverter output current tracks the reference current successfully and no negative situation such as oscillation or overshoot appears in both two states. The result of FFT analysis of inverter output current is given in Fig. 7, and the line voltage and the inverter output current is given in Fig. 8. As seen from figures, inverter output current is in sinusoidal waveform and harmonics level of the inverter output current is in the limit of international standards (3.02% < 5%).
(a)
(b)
Fig. 4. Inverter current reference and inverter current
Also inverter output current and the line voltage is in same phase and frequency, so unity power factor operation is achieved. Simulation results for conventional PI controller with various gain values and proposed neuro-fuzzy controller are given in Table 3. MRE, ITAE and ITSE values which are calculated with Eq. 14-16 for 10000 values, power factor (PF) and total harmonic distortion (THD) are given as performance indices to compare the controller’s performances. As seen from table, power factor is obtained as 0.999 for all controllers. Except this one, all performance indices show that, neuro-fuzzy controller has greater performance and tracks the reference current more successful than the conventional PI controller. Fig. 7. Current harmonics of grid interactive inverter
Fig. 8. Line voltage and inverter output current
TABLE III SIMULATION RESULTS AND PERFORMANCE INDICES OF CONTROL METHODS
[3]
[4] Control Method Neuro-Fuzzy Controller PI (KP=1,4 KI=1400) PI (KP=1,4 KI=2000) PI (KP=1,4 KI=2600) PI (KP=1,7 KI=1400) PI (KP=1,7 KI=2000) PI (KP=1,7 KI=2600) PI (KP=2,0 KI=1400)
THD%
PF
MRE
ITSE
ITAE
3,02
0,999
0,02434
0,0192
0,0455
4,77
0,999
0,03384
0,0264
0,0618
4,46
0,999
0,0315
0,0254
0,0611
4,92
0,999
0,03479
0,0262
0,0627
4,57
0,999
0,03276
0,0260
0,0612
4,57
0,999
0,03239
0,0254
0,0611
4,78
0,999
0,03268
0,0248
0,0615
4,41
0,999
0,03376
0,0262
0,0613
[5]
[6]
[7]
VI.
CONCLUSION
In this study, neuro-fuzzy controlled grids interactive inverter is modeled and simulated with MATLAB/Simulink. Simulation results show that neuro-fuzzy controlled grid interactive inverter output current is in sinusoidal waveform and harmonic level of this current meets the international standards such as IEC61727, IEEE1547 and EN61000-3-2. The performance and the dynamic response of the proposed controller is investigated. The simulation results obtained for proposed neuro-fuzzy controller and PI controller are given together and compared. Different performance indices such as MRE, ITSE, ITAE, PF and THD are used to compare the performances of the proposed controller and PI controller. Also simulation studies for PI controllers with different gains are carried out and results obtained these simulations are given. The simulation results show that, proposed neuro-fuzzy controller has faster dynamic response and smaller steady state error than the conventional PI controller. Also, it is seen that, fuzzy neural controlled inverter output current tracks the reference current more successfully. Because inverter output current and line voltage are in same phase and frequency, unity power factor operation is achieved.
[8]
[9]
[10]
[11] [12]
[13]
[14]
[15]
[16]
[17]
[18]
REFERENCES [1]
[2]
Saha, S., Sundarsingh, V.P., “Novel grid-connected photovoltaic inverter”, Generation, Transmission and Distribution, IEE Proceedings, Vol.143, No.2, 219–224, 1996. Barbosa, P.G., Rolim, L.G.B., Watanabe, E.H., Hanitsch, R., “Control strategy for grid-connected dc-ac converters with load power factor correction”, Generation, Transmission and Distribution, IEE Proceedings, Vol.145, No.5, 487-491, 1998.
[19]
[20]
Beck, M. K., “A comprehensive solar electric system for remote areas” The International Journal on The Science and Technology Of Desalting and Water Purification (Desalination), 209 (1-3): 312–318 (2007). Altın, N., Design and Implementation of Fuzzy Neural Controlled Grid Interactive Inverter, Ph. D. Thesis Gazi University Institute of Science and Technology, 2009. Li, H., Wang, K., Zhang, D., Ren, W., “Improved performance and control of hybrid cascaded h-bridge inverter for utility interactive renewable energy applications”, IEEE Power Electronics Specialists Conference PESC 2007, Orlando, Florida, 2465-2471, 2007. Uemura, N., Yokoyoma, T., “Current control method using voltage deadbeat control for single phase utility interactive inverter”, The 25th International Telecommunications Energy Conference, INTELEC '03, Yokohama, Japan, 40-45, 2003. Komiyama, T., Aoki, K., Shimada, E., Yokoyama, T., “Current control method using voltage deadbeat control for single phase utility interactive inverter with fpga based hardware controller”, 30th Annual Conference of IEEE Industrial Electronics Society, IECON 2004, Busan, South Korea, Vol.2, 1594-1599, 2004. Zhang, J., Morris, A. J., “Fuzzy neural networks for nonlinear systems modeling”, IEE Proc. Control Theory Applications, Vol.142, No.6, 551556, 1995. Gu, H., Yang, Z., Wang, D., Wu, W., “Research on control method of double-mode inverter with grid-connection and stand-alone”, CES/IEEE 5th International Power Electronics and Motion Control Conference, IPEMC 2006, Beijing, China, Vol.1, 1-5, 2006. Altın N.,” Fuzzy PI Simulation Of Fuzzy Adaptive PI Controlled Grid Interactive Inverter”, Pamukkale University Journal of Engineering Sciences, Vol 15, No 3, 325-335, 2009. Sefa I., Altın N., “Grid Interactive Photovoltaic Inverters-A Review” J. Fac. Eng. Arch. Gazi Univ. Vol 24, No 3, 409-424, 2009. Cramer, G., and Grebe R., “Grid connection of PV plants in the power range from 2 kW to 1 MWp”, Proceedings of the 11 th. E.C. Photovoltaic Solar Energy Conference, Montreux (Switzerland), 11511154, October 1992. Chung S. K., “Phase-locked loop for grid-connected three-phase power conversion systems”, Electric Power Applications, IEE Proceedings, Vol.147, No.3, 213–219, 2000. Kjaer, S. B., Pederson, J. K., Blaabjerg, F., “A review of single-phase grid-connected inverters for photovoltaic modules”, IEEE Transactions on Industry Aplications, Vol.41, No.5, 1292-1306, 2005. Mitra, S., Hayashi, Y., “Neuro–Fuzzy Rule Generation: Survey in Soft Computing Framework”, IEEE Transactions on Neural Networks, Vol. 11, No. 3, 748-768, 2000. Uddin, M. N., Abido, M. A., Rahman, M. A., “Development and implementation of a hybrid intelligent controller for interior permanentmagnet synchronous motor drives”, IEEE Transactions on Industry Applications, Vol.40, No.1, 68-76, 2004. Dash, P. K., Panda, S. K., Lee, T. H., Xu, J. X., Routray, A., “Fuzzy and neural controllers for dynamic systems: an overview”, Proceedings of International Conference on Power Electronics and Drive Systems, Singapore, Vol.2, 810-816, 1997. Vas, P., Stronach, A. F., “Adaptive fuzzy-neural dsp control of high performance drives”, Sixth International Conference on IEE Power Electronics and Variable Speed Drives, Nottingham, UK, 424-429, 1996. Jang, J. R., “ANFIS: Adaptive-network-based fuzzy inference system”, IEEE Transactions on Systems Man and Cybernetics, Vol.23, No.3, 665–685, 1993. The Mathworks Inc., “Fuzzy Logic Toolbox 2 User Guide”, 2005.