Fuzzy Controller Design Using FPGA for Photovoltaic Maximum Power Point Tracking

The cell has optimum operating point to be able to get maximum power. To obtain Maximum Power from photovoltaic array, photovoltaic power system usually requires Maximum Power Point Tracking (MPPT) controller. This paper provides a small power photovoltaic control system based on fuzzy control with FPGA technology design and implementation for MPPT. The system composed of photovoltaic module, buck converter and the fuzzy logic controller implemented on FPGA for controlling on/off time of MOSFET switch of a buck converter. The proposed maximum power point tracking controller for photovoltaic system is tested using model designed by Matlab/Simulink program with graphical user interface (GUI) for entering the parameters of any array model using information from its datasheet, Simulation and experimental results show that performance of the fuzzy controller with FPGA in a maximum power tracking of a photovoltaic array can be made use of in several photovoltaic products and obtain satisfied result. Keywords-Fuzzy Control; MPPT; Photovoltaic System; FPGA.


I. INTRODUCTION
The photovoltaic (PV) systems are rapidly expanding and have increasing roles in electric power technologies, providing more secure power sources and pollution free electric supplies.Solar panels are power sources in photovoltaic applications.Unfortunately, solar panels have high fabrication cost and low energy conversion efficiency.Since the photovoltaic electricity is expensive compared to the electricity from the utility grid, utilization of all accessible solar panels output power is desired.Therefore, the photovoltaic systems should be designed to operate at their maximum output power in any environmental conditions.
The applications for solar energy are increased, and that need to improve the materials and methods used to harness this power source [1].Main factors that affect the efficiency of the collection process are solar cell efficiency, intensity of source radiation and storage techniques.The efficiency of a solar cell is limited by materials used in solar cell manufacturing.It is particularly difficult to make considerable improvements in the performance of the cell, and hence restricts the efficiency of the overall collection process.Therefore, the increase of the intensity of radiation received from the sun is the most attainable method of improving the performance of solar power.The solar cell has an optimum operating point to be able to get the maximum power.To obtain maximum power from photovoltaic array, photovoltaic power system usually requires maximum power point tracking controller [2,3].There are three major approaches for maximizing power extraction in solar systems.They are sun tracking, maximum power point tracking or both [4].These methods need intelligent controllers such as fuzzy logic controller or conventional controller such as PID controller.In the literature, many maximum power point tracking systems have been proposed and implemented [5][6].The fuzzy theory based on fuzzy sets and fuzzy algorithms provides a general method of expressing linguistic rules so that they may be processed quickly.The advantage of the fuzzy logic control is that it does not strictly need any mathematical model of the plant.It is based on plant operator experience, and it is very easy to apply.Hence, many complex systems can be controlled without knowing the exact mathematical model of the plant [7].In addition, fuzzy logic simplifies dealing with nonlinearities in systems [8].The good of using fuzzy logic control is that the linguistic system definition becomes the control algorithm.
The most popular method of implementing fuzzy controller is using a general-purpose microprocessor or microcontroller.Microprocessor based controllers are more economical, but often face difficulties in dealing with control systems that require high processing and input/output handling speeds [9].Rapid advances in digital technologies have given designers the option of implementing a controller on a variety of Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), etc. FPGA is suitable for fast implementation controller and can be programmed to do any type of digital functions.
FPGA has the ability to operate faster than a microprocessor chip.Because of the flexibility of the FPGA, additional functionality and user interface controls can be incorporated into the FPGA minimizing the requirement for additional external components [10].FPGAs are programmed using Very High Speed Integrated Circuit hardware description language (VHDL) and a download cable connected to a host computer.Once they are programmed, they can be disconnected from the computer, and it will be running as stand-alone device.The FPGAs can be programmed while they run, because they can be reprogrammed in the order of microseconds.This short time means that the system will not even sense that the chip was reprogrammed [11].In the literature, many sun tracking systems have been proposed and implemented too [12][13][14].www.ijarai.thesai.orgThis paper presents the hardware implementation of fuzzy logic controller (FLC) on FPGA for Photovoltaic MPPT.A significant advantage of this FLC is that it has been coded in VHDL and programmed into a single FPGA [15].Because this reduces the number of electronic components used to implement the controller, it enables redundancy by having multiple copies/images of the code, and yields robustness as a controller that has multiple systems capability [16].
FLC may implement on FPGA and used to moves a motor attached to the solar panel to keep it toward the sun all the day.Then we must choose the kind of the motor as appropriate with the controlled system.Many applications related to positioning systems are being implemented with stepper motors.It has some applications in Robotics, Computer peripherals, Industrial servo quality drivers and so on.One of the main advantages of stepper motors is the strong relation between electrical pulses and rotation discrete angle steps [17].

II. PV MODELLING
In this section, in order to show the feasibility of MPPT using fuzzy control, the photovoltaic power system with step down converter is constructed.The circuit configuration of this system is shown, and then the fundamental characteristics of solar array using this system are also shown in this section.

A. Circuit Configuration
From the solid-state physics point of view, the cell is basically a large area p-n diode with the junction positioned close to the top surface [18].So an ideal solar cell may be modeled by a current source in parallel with a diode that mathematically describes the I-V characteristic by [19]: Where Ipv, cell is the current generated by the incident light, Id is the Shockley diode equation, I0, cell is the reverse saturation or leakage current of the diode, q is the electron charge [1.60217646 * 10−19C], k is the Boltzmann constant [1.3806503 * 10−23J/K], T [K] is the temperature of the p-n junction, and a is the diode ideality constant.A shunt resistance and a series resistance component are added to the model since no solar cell is ideal in practice.Figure 1 shows the equivalent circuit [20].Additional parameter is added to the basic equation to represent practical arrays are composed of several connected photovoltaic cells and equation 1 becomes as [19]: Where Ipv and I 0 are the photovoltaic and saturation currents of the array and V t = NskT/q is the thermal voltage of the array with Ns cells connected in series Rs and Rp is the equivalent series and parallel resistance.Figure 2 shows the I-V curve from equation 2 [19].The light generated current of the photovoltaic cell Ipv and saturation current I0 depend on the temperature according to the following equations [19]: Where Ipv,n is the light-generated current at the nominal condition (usually 25 •C and 1000W/m2), ∆T = T − Tn (being T and Tn the actual and nominal temperatures [K]), G [W/m2] is the irradiation on the device surface, and Gn is the nominal irradiation.

B. Output Characteristic of Photovoltaic Array
A typical characteristic curve of PV model's current and voltage curve is shown in Figures 2, and   When a direct connection is carried out between the source and the load, the output of the PV module is seldom maximum power and the operating point is not optimal.To avoid this problem, it is necessary to add an adaptation device, MPPT www.ijarai.thesai.orgcontroller with a DC-DC converter, between the source and the load (Figure 6).MPPT is used for extracting the maximum power from the solar PV module and transferring that power to the load.A dc/dc (step up/step down) converter acts as an interface between the load and the module.The MPPT is changing the duty cycle to keep the transfer power from the solar PV module to the load at maximum point [21].

1) Pulse Width Modulation (PWM)
PWM signals are pulse trains with fixed frequency and magnitude and variable pulse width.However, the width of the pulses (duty cycle) changes from pulse to pulse according to a modulating signal as illustrated in Figure 7.When a PWM signal is applied to the gate of a power transistor, it causes the turn on and turns off intervals of the transistor to change from one PWM period to another according to the same modulating signal.

2) Buck Converter
A buck converter is a step-down DC to DC converter.The operation of the buck converter is fairly simple, with an inductor and two switches (transistor and diode) that control the current of the inductor as shown in Figure 8.It alternates between connecting the inductor to source voltage to store energy in the inductor when the PWM signal is high and discharging the inductor into the load when the PWM signal is low.When the duty cycle is in ON state, the diode become as reversed biased and the inductor will deliver current and switch conducts inductor current.The current through the inductor increase, as the source voltage would be greater.The energy stored in inductor increased when the current increase, and the inductor acquires energy.Capacitor will provides smooth out of inductor current changes into a stable voltage at output voltage.When the duty cycle is in OFF state, the diode is ON and the inductor will maintains current to load.Because of inductive energy storage, inductor current will continues to flow.While inductor releases current storage, it will flow to the load and provides voltage to the circuit.The diode is forward biased.The current flow through the diode which is inductor voltage is equal with negative output voltage.

A. MPPT of PV Using Fuzzy Controller:
Maximum power point tracking system uses dc to dc converter to compensate the output voltage of the solar panel to keep the voltage at the value which maximizes the output power.MPP fuzzy logic controller measures the values of the voltage and current at the output of the solar panel, then calculates the power from the relation (P=V*I) to extract the inputs of the controller.The crisp output of the controller represents the duty cycle of the pulse width modulation to switch the dc to dc converter.Figure 6 shows the Maximum power point tracker (MPPT) system as a block diagram.www.ijarai.thesai.org

B. MPPT Fuzzy Logic Controller:
The FLC examines the output PV power at each sample (time_k), and determines the change in power relative to voltage (dp/dv).If this value is greater than zero the controller change the duty cycle of the pulse width modulation (PWM) to increase the voltage until the power is maximum or the value (dp/dv) =0, if this value less than zero the controller changes the duty cycle of the PWM to decrease the voltage until the power is maximum as shown in Figure 3.
FLC has two inputs which are: error and the change in error, and one output feeding to the pulse width modulation to control the DC-to-DC converter.The two FLC input variables error E and change of error CE at sampled times k defined by: Where P(k ) is the instant power of the photovoltaic generator.
The input error (k) shows if the load operation point at the instant k is located on the left or on the right of the maximum power point on the PV characteristic, while the input CE (k) expresses the moving direction of this point.The fuzzy inference is carried out by using Mamdani method, FLC for the Maximum power point tracker.FLC contains three basic parts: Fuzzification, Base rule, and Defuzzification.

1) Fuzzification
Figure 9 illustrates the fuzzy set of the Error input which contains 7 Triangular memberships

2) Control rule base
The knowledge base defining the rules for the desired relationship is between the input and output variables in terms of the membership functions illustrated in Table 1  Figure 12 shows the surface of the base rules using in FLC.

3) Defuzzification
The defuzzification uses the centre of gravity to compute the output of this FLC which is the duty cycle (D): IV. MPPT FUZZY LOGIC CONTROLLER SIMULATION ON MATLAB/SIMULINK Before applying the fuzzy controller on PV, the modelling of PV must be set-up.

A. PV modelling for Simulation
The equations from 1 to 4 for generating the current by PV array are represented by MATLAB/SIMULINK as shown in Figure 13.This current is passed through series and parallel resistors of the array as shown in Figure 1, and then all these blocks are converted to one sub system block with two inputs (Temperature, and Irradiation) as shown in Figure 14.

B. MPPT Matlab Simulation 1) GUI Interface for PV Model
The PV model have a large number of parameters, so a graphical user interface GUI is set-up for entering the parameters of any array model using information from its datasheet as shown in Figure 15.2) Control Signal Generation in Simulation Figure 16 shows how the equations 5 and 6 are represented, to generate the Error and Change in error signals as inputs for the fuzzy logic controller.

3) Fuzzy Logic Controller Simulation
The designed fuzzy controller now can connected between PV module and DC-to-DC converter module to tracking the MPP, as shown in Figure 17 Figure 17: Controlling the PV power using FLC.
The parameters information of PV array is entered by GUI interface from the KC200GT solar array datasheet: www.ijarai.thesai.org Figure 18 shows the Characteristic P-V curve of a practical photovoltaic device with the last specifications before adding the fuzzy logic controller.Figure 19 shows the effect of the FLC controller on the PV power, since it becomes constant at the maximum value (200.14W) after a small stilling time.

V. COMPARISON OF FLC AND CONVENTIONAL CONTROLLER
The results of applying the FLC on PV system to track the maximum power point is compared with a conventional controller applied on the same system by Villalva [15].This controller is perturbation and observation controller.The principle of this controller is done by changing the PWM duty cycle (D) and observing the effect on the output PV power, this can be detailed as follows: -When dp/dv > 0, the voltage is increased, this is done through D(k ) = D(k − 1) + C. Figure 20 shows the effect of the two controller's perturbation and observation and FLC controller on the same PV power.The response of FLC is better than the response of the perturbation and observation controller since it take more settling time.Other drawback point in perturbation and observation controller is that it depends on knowing the value of the voltage at the maximum power point (Vm).

VI. EXPERIMENT RESULTS
This section shows the usefulness of proposed maximum power point tracking controller by fuzzy controller.In the first, the fuzzy logic controller for MPPT will implement on the FPGA card.Then, the DC-to-DC implemented and connected with the FPGA.

A. Implementing Fuzzy Logic Controller on an FPGA
The fuzzy logic controller designed earlier is implemented on Xilinx XC3S700AN FPGA card as shown in Figure 21.The output of the controller is connected with a PWM module designed on the FPGA, its looks as green block in Figure 22.The PWM frequency of the modulating signal is about 3 KHz, this value calculated by experiment.A 14-bit counter runs at the clock of FPGA =50MHz completes cycles at a rate 50M/214 ≈ 3 KHz.In this case, each level in an 8-bit modulating signal corresponds to 214/256 = 26 clock pulses.

B. Implementing the DC-to-DC Converter
The DC-to-DC converter is implemented as shown in Figure 25 and connected with FPGA card.

VII. CONCLUSION
This paper proposed the maximum power point tracker using fuzzy control is fabricated on modern FPGA card (Spartan-3AN, Xilinx Company, 2009) to increase the energy generation efficiency of the solar cells.The proposed method is by implementing a maximum power point tracker controlled by fuzzy logic controller and using buck DC-to-DC converter to keep the PV output power at the maximum point all the time.This controller is tested using Matlab/Simulink program, and the results was compared with a perturbation and observation controller applied on the same system.The comparison shows that the fuzzy logic controller is better in response and don't depend on knowing any parameter of PV panel.The information required for fuzzy control is only generating power, therefore, the hardware is simple and the cost of this system is inexpensive.

Figure 1 :
Figure 1: Equivalent Circuit of Solar Cell

Figure 2 :
Figure 2: Characteristic I-V curve of a practical photovoltaic device.
the power and voltage curve is shown in Figures 3. The characteristics of a PV system vary with temperature as shown in Figures 4 and with irradiation as shown in Figures 5; there exists a single maxima power corresponding to a particular voltage and current [21].

Figure 3 :
Figure 3: Power-voltage characteristic of a PV module

Figure 4 :
Figure 4: Influence of the solar radiation for constant temperature.

Figure 5 :
Figure 5: Influence of the temperature of junction for constant irradiation Maximum power point tracker (MPPT) tracks the new modified maximum power point in its corresponding curve whenever temperature and/or insolation variation occurs.MPPT is used for extracting the maximum power from the solar PV module and transferring that power to the load.A dc/dc (step up/step down) converter acts as an interface between the load and the module.The MPPT is changing the duty cycle to keep the transfer power from the solar PV module to the load at maximum point[21].

Figure 10
Figure 10 illustrates the fuzzy set of the Change of Error input which contains 7 Triangular memberships.

Figure 10 :
Figure 10: Membership function of change of error (CE).

Figure 11
Figure 11 illustrates the fuzzy set of the output which contains 7 Triangular memberships.
. The control rules are evaluated by an inference mechanism, and represented as a set of: IF Error is ... and Change of Error is ... THEN the output will … For example: Rule1: IF Error is NL and Change of Error is ZE THEN the output is NS.The linguistic variables used are: NB: Negative Big.NM: Negative Medium.NS: Negative Small.ZE: Zero.PS: Positive Small.PM: Positive Medium.PB: Positive Big.

Figure 13 :
Figure 13: Modelling of the current generated by PV array in Matlab Simulink.

Figure 15 :
Figure 15: GUI for entering the parameters of any array model from its datasheet.

Figure 16 :
Figure 16: Generating the Error and Change in Error Signals.

Figure 18 :
Figure 18: The Characteristic P-V curve before adding the FLC.

Figure 19 :
Figure 19: Controller effect on the power.

Figure 20 :
Figure 20: The Effect of the Two Controllers Conventional and FLC Controller on the PV Power.

Figure 22
Figure 22 shows the RTL schematic diagram in Xilinx software RTL Viewer to view a schematic representation for the FLC and other components after implementing it on Xilinx_ISE 11.1 software.The inputs of the controller are the error and change in error as in equations 5 and 6. www.ijarai.thesai.org

Figure22:
Figure22: RTL schematic diagram for the FLC with other blocks.

Figure 23
Figure 23 shows how to generate the PWM signal.

Figure23:
Figure23: Generating PWM signals.The output of the PWM is examined using the oscilloscope by changing the values of the FLC and observe the change in the duty cycle of the PWM output as shown in Figure 24.

Figure25:
Figure25: DC to DC converter.In the hardware part, the circuit is designed to step down DC-to-DC voltage.The circuit included parts of Buck components such as controllable switch (IRF740A), inductor and capacitor, PIC16F877 microcontroller as an ADC, IR2110 Half Bridge Driver, optocubler isolator (6N137), and other basic components.In order to maintain output voltage, controller will be operated in feedback circuit.The output of the DC-to-DC converter is examined using the oscilloscope by changing the values of the FLC inputs as an open loop and observe the change in the duty cycle of the PWM output and the change in the converter output as shown in Figure26.

Figure 26 :
Figure 26: Examining the PWM output with open loop controller.

Figure 27 :
Figure 27: Examining the PWM output with close loop controller.

TABLE 1 :
CONTROL RULE BASE FOR MPPT FUZZY CONTROLLER.