4th International Conference on Computer Integrated Manufacturing CIP’2007 03-04 November 2007 Modeling and Simulation of Photovoltaic Panel based on Artificial Neural Networks and VHDL-Language H. MEKKI, A. MELLIT, H.SALHI, and K.BELHOUT Department of Electronics, Control laboratory, Faculty of Science Engineering BLIDA University, USDB BLIDA, Algeria Mekkihamza@yahoo.fr, a.mellit@yahoo.co.uk, h_hassan@yahoo.com, bk_elec@yahoo.fr Abstract- The Number of electronic applications using artificial neural network-based solutions has increased considerably in the last few years. However, their applications in photovoltaic systems are very limited. This paper introduces the preliminary result of the modeling and simulation of photovoltaic panel based on neural network and VHDLlanguage. In fact, an experimental database of meteorological data (irradiation, temperature) and output electrical generation signals of the PV-panel (current and voltage) has been used in this study. The inputs of the ANN-PV-panel are the daily total irradiation and mean average temperature while the outputs are the current and voltage generated from the panel. Firstly, a dataset of 4x364 have been used for training the network. Subsequently, the neural network (MLP) corresponding to PV-panel is simulated using VHDL language based on the saved weights and bias of the network. Simulation results of the trained MLP-PV panel based on Matlab and VHDL are presented. The proposed PV-panel model based ANN and VHDL permit to evaluate the performance PV-panel using only the environmental factors and involves less computational efforts, and it can be used for predicting the output electrical energy from the PV-panel. I. INTRODUCTION Solar energy conversions has various advantages such as short time duration of installation and long life of exploitation, circuit simplicity, no need of moving part and realize a salient, safe, not pollutant an renewable source of electricity. The wide acceptance and utilization of the photovoltaic (PV) generation of electric power depends on reducing the cost of the power generated and improving the energy efficiency of PV systems. In recent years, it has been shown that artificial neural networks (ANN) have been successfully employed in solving complex problems in various fields of applications including pattern recognition, identification, classification, speech, vision, prediction and control systems [1]. Today ANNs can be trained to solve problems that are difficult for conventional computers or human beings. ANNs, overcome the limitations of the conventional approaches by extracting the desired information directly from the experimental (measured) data. However, the application of the ANN in PV-systems are very limited, in literature there are several models that are proposed for modeling and simulation of PV-panel for evaluating the performance and the power quality in the PVpanel [2],[3]. The performances of a PV module are strictly dependent on the environmental factors such as irradiance and cell temperature. These two parameters make the PV module maximum power change and especially for PVintegrated power system dispatchers it is necessary to be able to predict accurately the PV output [3]. It is very difficult to develop an accurate PV-panel model based on analytical models or numerical simulations; due to the influencing of the environmental factors. In fact, some very recent works were developed for modeling a PV-system based on ANN [4],[10]. The main objective of this work is to use of the ANN and VHDL-language for modeling and simulation PV-panel. The proposed model allows us to evaluate the performance of the PV-panel based only on the meteorological data such as mean average temperature and daily total solar radiation. This paper is organized as follows: the next section introduces the PV-panel and presents the database used in this study, section III provides the ANN architecture used for modeling of the PV-panel, also, the same section describe the simulation of the PV-panel based on ANN and VHDL. Results and discussion are presented in section IV. II. PHOTOVOLTAIC PANEL AND DATABASE The efficiency of solar energy conversion is related both to the optimal design and to the maximum power extraction from PV system. The PV-array used in this simulation consists of 16 ITALSOLAR modules. Each module comprises 30 square single crystal silicon cells. The total peak power of each PV array is 720 We, the PV-array voltage is 40 V (max) and the PV-array current is 20 A (max). The area of PV generator is 6 m². The traditional I-V characteristics of a solar array, when neglecting the internal shunt resistance, are given by the following equation [2]: q I 0 I g I sat exp (V0 I 0 Rs ) 1 AKT (1) 4th International Conference on Computer Integrated Manufacturing CIP’2007 Where Io, Vo are the output current and output voltage of the solar array. Ig is the generated current under a given insolation. Isat is the reverse saturation current. q is the charge of an electron. k is the Boltzmann constant. A is the ideality factor for a P-N junction. T is the array temperature. Rs and Rsh are the intrinsic series and shunt resistances of the solar array. 40 400 T(C°) 30 H(KW h/day) Output layer x1 y1 x2 y2 x3 y3 xn yn Fig. 2.a. Schematic diagram of a multi-layer feed-forward neural network. 200 10 0 100 200 Days 300 400 26 100 0 100 200 Days 300 400 Ipv(A) 16 25 xij 14 24 x1j x1j 18 Vpv(V) 23 Hidden ayers 300 20 0 Input layer 03-04 November 2007 w1j w1j wij yj Activation function Weights summation 12 0 100 200 Days 300 400 10 0 100 200 Days 300 400 Fig. 1. the database of T, H, Vpv and Ipv “Fig. 1,” shows the different signal recorded form the above PV-panel, there signals are the mean temperature, daily irradiation. The output PV-current and PV-voltage generated. III. METHODOLOGY Fig. 2.b. Information processing in a neural network unit. y j f wij .xij bj . i f ( x) 1 1 e x (2) (3) where yj, is the output of the processing unit wjj, the synaptic weight coefficient of the i-th input of the processing unit bj, is the bias. A) Multi-layer Perceptron (MLP) network Back-propagation (BP) has been widely adopted as a successful learning rule to find the appropriate values of the weights for NNs. The MLP consists of various layers: an input and output ones between which lie one or several hidden ones whose outputs are not observable. These layers are based upon some processing unit (neurons) interconnected by means of feed-forward pondered links (figure 2-a) [11]. All these processing units carry out the same operation (figure 2-b): i.e. the sum of their weighed inputs (See “(2)”). Then they apply the result to a non-linear function named activation function and generally based upon the sigmoid function (see “( 3)”). B) MLP-Based modeling and simulation of PV-panel “Fig. 3,” shows the MLP configuration proposed for modeling and simulation of the PV-panel, the input of this model are the daily total solar radiation (H) and the mean average temperature (T) while the output are the generated current (Ipv) and voltage (Vpv). The input and the output are fixed initially however the number of hidden layers and the neurons within these layers are optimized during the learning process based on the good performance of MSE. A database of 365*5 patterns for each signals are divided in two parts, a dataset of 365*4 (4-years) patterns used for training the proposed MLP-PV panel model and a dataset of 365*4 (1year) patterns used for testing and validation of the model. A soft computing program has been implemented for MLP-PV panel based on the LM-algorithm, the Matlab Ver 7.1b are used in this simulation. 4th International Conference on Computer Integrated Manufacturing CIP’2007 1 03-04 November 2007 ¡ 17 Ipv H 2 16 2 Vpv T 15 14 3 3 13 12 2-neurons Input layer 9 7 7-neurons 1st hidden layer 2-neurons Output layer 11 10 0 50 100 150 9-neurons 2nd hidden layer 200 250 300 350 400 (a) 2 6 2 5 .5 Fig. 3. MLP-PV panel model 2 5 2 4 .5 2 4 2 3 .5 2 3 0 5 0 1 0 0 1 5 0 2 0 0 2 5 0 3 0 0 3 5 0 4 0 0 (b) Fig. 5. Comparison between Measured and estimated output signal of a. The current, b. the voltage Fig. 4. Neural processor architecture C) VHDL-implementation of the PV-panel Once the MLP-PV panel model is optimized, the weights and bias are saved in order to be used for implementation of the MLP based on VHDL language. The structural description of a neuron with VHDL allows during the compiling step to specify generically some characteristics like the input numbers and the data size, and even to modify the type of some arithmetic operators like the adder or the multiplier and eventually the activation function unit if one wants to modify the activation function. The neuron computes the product of its inputs, with the corresponding synaptic weights, which are memorized in an ROM, and then the results are added. The result is presented to a comparison unit designed to represent an appropriate sigmoid function. Then the output of this comparison unit is used as a controller for a multiplexing unit, which delivers they output of the neuron “Fig. 4,” [11]. IV. RESULTS AND DISCUSSION Firstly, we present the results of MLP-PV panel model based on Matlab simulation. “Fig. 5,” shows a comparison between measured and estimated output generating current and voltage of the PV-panel. It should be noted there is a very good agreement between measured and estimated signal (Ipv, Vpv) in addition the coefficient of determination R2 is 97% which is very satisfactory. In order to simulate the PV-panel model on VHDL language, the data was coded on 18 bits in fixedpoint [12]. Function activation is very difficult in its known expression Tansig) “(3)”. In order to simplify function expression, it was linearized on several intervals [Ci, Ci+1] and its value is evaluated using two constants (ai and bi) corresponding to this intervals [13] “( 4 )”and “(5)”. f ( xi ) a i .xi bi For xi [ci , ci 1 ] . f (x) = 1 for x > 3. (4) (5) “Fig. 6-a,” presents the result of the activation function simulation. The obtained results by MODELSIM has been tested and compared with Matlab, which gives a good accurate result See “Fig. 6.b,”. 4th International Conference on Computer Integrated Manufacturing CIP’2007 03-04 November 2007 26 25.5 25 24.5 24 23.5 Fig. 6-a. VHDL Simulation of the activation function 23 0 50 100 150 200 250 300 350 400 Fig. 8.a. comparison between MATLAB and VHDL estimation of a voltage 17 16 15 14 13 12 11 Fig. 6-b. Comparaison between activation function calculated by Matlab and simulated by MODELSIM (VHDL) The network is composed of several elements of basis that are the neurons; this network is presented in “Fig. 7.a,”. The simulation result based on VHDL is presented in “Fig. 7.a,”, where X1 is the mean average temperature, X2 is the daily total solar radiation, Y1 is the output voltage and Y2 is the output current from the PV-panel. 10 0 50 100 150 200 250 300 350 400 (b) Fig. 8.b. Comparison between MATLAB and VHDL estimation of a current The MODELSIM has been used for simulating the proposed architecture based on the VHDL, once the architecture is simulated. “Fig. 8,” shows a comparison between Matlab and VHDL (ModelSim) estimation. the next step consists the implementation of this architecture on FPGA hardware. ACKNOWLEDGMENT Fig. 7.a. Global architecture of the neural network In this paper, a PV-panel has been modeled and simulated based on ANN and VHDL-language. The accuracy and the generalization of the neural model in the system prediction are demonstrated by comparing test results with actual data. The advantage of the proposed model that it can be used for estimating the performance of PV-panel and it is able to predict the output electrical energy generation from the PV-panel based only on the environmental data. In addition, the using of the VHDL language for PV-panel simulation has been demonstrated. The modelsim has been used for simulate this network. Actually, it remains the implementation of this architecture on a FPGA hardware, that will be our objective in the future paper. REFERENCES [1] S.A. Kalogirou “Artificial neural networks in renewable energy systems applications: a review”. Renewable and Sustainable Energy Reviews, vol.5, pp.373-401, 2000. Fig. 7.b. Simulation results based on VHDL 4th International Conference on Computer Integrated Manufacturing CIP’2007 [2] A. Gow, C.D. Manning, “Development of a photovoltaic array model for use in power electronics simulation studies”, IEE Proceedings on Electric Power Applications, Vol. 146, No 2, March pp. 193 -200. 1999. [3] W. T. Jewell and T. D. Unruh: “Limits on clouds induced fluctuation in photovoltaic generation”. IEEE Transactions on energy conversion, Vol. 5, N. 1 ,March, pp 8-14, 1990. [4] TF. Elshatter M.T, Elhagree M.E Aboueldahab and. A.A, Elkousry “Fuzzy modeling and simulation of photovoltaic system”. In 14th European photovoltaic Solar Energy Conference, 1997. [5] M. Abdulhadi A. M, Al-Ibrahim and G.S Wirk. “Neuro-fuzzy based solar cell models”. IEEE Transactions on Energy Conversion, vol.19 n3,pp. 619-629,.2004. [6] L. Zhang and Y. Fei Bai “Genetic algorithm-trained radial basis functions neural networks for modelling photovoltaic panels”. Engineering application of artificial intelligence;Vol.18: pp.833-844. 2005. [7] A. Mellit, M Benghanem. A. Hadj Arab and A Guessoum. “Prediction and modeling signals from the monitoring of stand-alone PV systems using an adaptive neural network model”. In Proceedings of The 5th ISES European Solar Conference. 2004, vol.3 :pp.224-230. [8] A. Mellit and M., Benghanem “Modelling and simulation of standalone photovoltaic power system using artificial neural network”. in [9] [10] [11] [12] [13] 03-04 November 2007 Proceedings of the Solar Word Congress ISES 2005 August 6-12 2005 Florida, USA 2005. A. Mellit and S.A. Kalogirou “Neuro-fuzzy based modelling for photovoltaic power supply (PVPS) system”. In First International Power and Energy Coference PECon IEEE, Nov. 28-29, 2006, Malaysia Vol.1, pp-88-93 A Mellit, M, Benghanem and. S.A. Kalogirou “Modelling and simulation of a stand-alone photovoltaic system using an adaptive artificial neural network”. Renewable Energy, vol.32, pp.285-313. 2007 Y. Taright, M.l Hubin “FPGA implementation of a multilayer Perceptron Neural Network using VHDL” In Proceedings of ICSP pp-1311-1314, 1998 E.M. Ortigosa a , A. Canas a, E. Ros a, P.M. Ortigosa b, S.Motaa, J. Dı´az “a Hardware description of multi- layer perceptrons with different abstraction levels “ Elsevier .Microprocessors and Microsystems 30 (2006). F. Smach, M. Atri, J. Mitéran and M. Abid “Design of a Neuralnetworks Classifier for Face Detection” transactions on engineering, computing and technology v5, 2005