Research ArticleHardware Implementation of a Fuzzy Logic Controller for aHybrid Wind-Solar System in an Isolated Site
Aymen Jemaa ,1 Ons Zarrad,1 Mohamed Ali Hajjaji ,2,3 and Mohamed Nejib Mansouri1
1Unit of Industrial Systems Study and Renewable Energy (ESIER), National Engineering School, University of Monastir,Monastir, Tunisia2Laboratory of Electronic and Microelectronic, University of Monastir, Monastir, Tunisia3Higher Institute of Applied Sciences and Technology of Kairouan, University of Kairouan, Kairouan, Tunisia
Correspondence should be addressed to Aymen Jemaa; [email protected]
Received 1 November 2017; Revised 19 March 2018; Accepted 19 April 2018; Published 4 July 2018
Academic Editor: Joaquín Vaquero
Copyright © 2018 Aymen Jemaa et al. This is an open access article distributed under the Creative Commons Attribution License,which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
In this paper, two main contributions are presented to manage the power flow between a wind turbine and a solar powersystem. The first one is to use the fuzzy logic controller as an objective to find the maximum power point tracking,applied to a hybrid wind-solar system, at fixed atmospheric conditions. The second one is to respond to real-timecontrol system constraints and to improve the generating system performance. For this, a hardware implementation ofthe proposed algorithm is performed using the Xilinx System Generator. The experimental simulation results show thatthe suggested system presents high accuracy and acceptable execution time performances. The proposed model and itscontrol strategy offer a proper tool for optimizing the hybrid power system performance which we can use in smarthouse applications.
1. Introduction
Wind and solar energies present the most famous renew-able energy sources which attract attention due to thedecreasing fossil fuel reserves and environmental propertyimpact. The use of wind energy systems may not be techni-cally viable at all sites because of low wind speeds and beingmore unpredictable than solar energy [1, 2]. The hybridiza-tion of these renewable energy sources can ensure the con-tinuity of energy production and can be an economicsolution for countries to develop and decrease the con-sumption of fossil (fuel and nuclear) energy sources.Research and development efforts in solar, wind, and otherrenewable energy technologies are necessary to continueimproving their performance. Among the most importantfactors to consider, we can cite the maximum power pointtracking (MPPT), which presents an essential factor ofsystem performances.
In general, MPPT methods can be classified into twoprincipal categories. The first one uses classic algorithms
such as hill-climbing (HC), perturbation and observation(P&O), and incremental conductance (IncCond). For thesecond type, it is based on intelligent methods such as fuzzylogic, artificial neural network (ANN), and neurofuzzy,which is a combination between the two previous methods.
The idea to use the fuzzy logic controller is to control,respectively, the proportional-integral controller for windturbines and the duty cycle (d) for solar energy to regularizesuccessively the optimal rotor speed and the pulse-widthmodulation in the boost converter. This algorithm does notrequire a specific detailed mathematical model or lineariza-tion, about an operating point, and it is independent fromsystem parameter variations.
For a subsystem wind turbine, the pitch angle of theturbine is synchronized according to the measured windspeed values in a fuzzy logic controller. For the solar sub-system, the impedance of the photovoltaic cell’s output isequal to the values of the impedance measured on the loadimpedance in the fuzzy logic controller. Both controllersare applied to boost the performance. The control of the
HindawiInternational Journal of PhotoenergyVolume 2018, Article ID 5379864, 16 pageshttps://doi.org/10.1155/2018/5379864
two subsystems presents one of the main objectives of thismanuscript.
To get the optimum performance and effective power ofthe wind-solar turbine at fixed atmospheric conditions, a sec-ond objective is studied, which is the implementation ofboth controllers. This implementation is designed onXilinx, which has the Xilinx System Generator (XSG)tools to facilitate the design. The implementation on afield-programmable gate array (FPGA) circuit with XSGallows us to find the solution of complexity, parallelism,and calculation time.
The XSG handles much of the routing and placementtiming. The FPGA design flow eliminates the complex andtime-consuming floor planning, placement and routing,and timing analysis. The FPGA runs up to 500MHz witha superior performance. The unprecedented logic densityincreases, and a host of other features like embedded pro-cessors, DSP blocks, clocking, and high-speed serial raisethe performance.
This paper is planned on six sections: The first sectionis an introduction which contains a generality of a wind-solar system and the purpose of this work. Section 2 isthe related work and the model description of the hybridsystem components. Section 3 describes the XSG tools,the conception, and the hardware architecture of the differ-ent blocks of a hybrid system with an XSG design. Section 4contains the results and discussions of the simulation. Theresults of a fuzzy logic controller implementation on FPGAare given in Section 5 before the conclusion which is thefinal part of this paper.
2. Related Work and ProposedHybrid-System Model
2.1. Related Work. Tracking the various MPPT algorithmspermits fixing and extracting the maximum power, whichhas been dealt with in the literature.
In [3], a photovoltaic- (PV-) wind system was controlledand compared with two approaches. The first one was ahybrid system with HC and P&O algorithms. The secondone used a fuzzy logic controller. The based power generationof the system was 3.1 kW.
In [4], two connection models of a solar-wind systemwere studied with fuzzy logic controllers. The first modelhad just one hybrid system connected to the main grid. Thesecond one had the same system with a 75 kW load con-nected to the grid.
In [5], a standalone PV-wind energy conversion systemwas sized and optimized. P&O and fuzzy logic algorithmcontrollers were used to get the optimum mechanical speedof turbine and duty cycles of a DC-DC converter.
2.2. Proposed Solar-Wind System. In this paper, a hybridpower system is designed with two renewable energy sources,solar and wind, which are connected with a conventionalenergy source. A wind system with a solar photovoltaicone is the best hybrid combination of all renewable energysystems and is suitable for most applications [6]. Further-more, the system is dedicated to isolates sites that are not
connected to the grid, so the only energy source is thehybrid power system.
Figure 1 describes the schematic diagram of the wind-solar hybrid energy conversion system studied in this paper.Its principal blocks are a PV generator, a wind turbine, apermanent magnet synchronous generator (PMSG), a recti-fier, boost converters, a continuous DC-DC bus, and fuzzylogic controllers.
2.3. Wind Turbine Model. Depending on the aerodynamiccharacteristics, the wind turbine mechanical power isgiven by
P = 12πρCp λ, β R2V3
v, 1
where ρ is the air density, Cp is the power coefficient, λ is thetip-speed ratio, β is the pitch angle, R is the turbine radius,and Vv is the wind speed.
The form of the used power coefficient Cp is given in
Cp λ = −0 2121λ3 + 0 0856λ2 + 0 2539λ 2
It depends only on one variable, which is the tip-speedratio λ. The pitch angle β is usually the angle between theturbine blades and its longitudinal axis. In this work, β isset to zero. The tip-speed ratio λ is considered as the linearspeed form of the rotor to the wind speed. The power valueextracted from the wind turbine system will be at its utmostwhen the power coefficient Cp is at its maximum at a definedvalue of the tip-speed ratio λ.
Accordingly, for each wind speed, there is an optimumrotor speed value where the maximum power is extractedfrom the wind. Therefore, we can say that Cp is maximal ata particular λopt. The expression of the tip-speed ratio λ ispresented in
λ = ΩRVv
, 3
where Ω is the turbine’s angular speed.The variable-speed wind form studied in this work is
expressed in (4) and illustrated in Figure 2.
Vv t = 7 5 + 0 2 sin 0 1047t + 2 sin 0 2665t+ sin 1 2930t + 0 2 sin 3 6645t
4
The analyzed wind turbine and PMSG have their electricspecifications given, respectively, in Tables 1 and 2.
Figure 3 presents the plot of the Cp λ characteristicwhere a maximum point wind speed with the coordinate(Cpmax, λ) is equal to (0.15, 0.78).
2.4. Permanent Magnet Synchronous Generator (PMSG). Todefine the PMSG model, we use the following simplifyingassumptions [7]:
(i) The stator is connected on a star and is neutralin the air to eliminate the homopolar componentof currents.
2 International Journal of Photoenergy
(ii) The saturation of the magnetic circuit is neglected,which leads to expressing the magnetic fluxes aslinear functions of the phase currents.
(iii) The distribution of the electromotive force (f.e.m) inthe air gap is sinusoidal, and the harmonics of spaceare then neglected.
(iv) The variation in resistance as a function of tempera-ture is neglected.
(v) Hysteresis and current losses are neglected.
The generator is modeled by the following voltage equa-tions given by (5) in the rotor reference frame (d, q) axes.
Vd = Rsid + Lddiddt
− pΩLqiq,
Vq = Rsiq + Lqdiqdt
+ pΩLdid + pΩϕf ,5
where id , iq, vd , and vq are the currents and voltages, respec-tively; Ld and Lq are the equivalent stator inductances in the(d, q) axes, respectively; Rs is the stator resistance; ω = pΩ
12
10
8
6
4
2
Spee
d w
ind
(m/s
)
00 20 40 60
Time (ms)80 100 120
Vv
Figure 2: Allure of variable-speed wind.
Table 1: Wind turbine specifications.
Air density “ρ” 1.2 kg/m3
Turbine radius “R” 0.5m
Turbine height “H” 2m
Inertia constant “J” 16 kg/m2
Friction factor “f ” 0.01 kg·m/rad
Maximum coefficient of power “Cpmax” 0.15
Optimal tip-speed ration “λopt” 0.78
Table 2: PMSG specifications.
Number of rotor pole pairs 2
Stator phase resistance 0.137ΩStator phase inductance 0.0027H
Inertia constant 0.1 kg·m2
Friction factor 0.06 kg·m/rad
Photovoltaic generator
Boost converter
IpvVpv
DC
DC
Duty cycle
Bus DC-DCInverter
DCAC
C
Isolatedsite
DC
DC
iabc
Boost converterRectifier
Fuzzy logic controller embedded on FPGA
Fuzzy logic controller embedded on FPGA
PMSG
Ωref
MLI
DC
AC
Figure 1: Hybrid wind-solar energy conversion system for an isolated site.
3International Journal of Photoenergy
is the electric frequency related to the mechanical speed,and ϕf is the permanent magnetic flux produced by therotor magnets.
The electrical torque (Te) applied to the PMSG rotor canbe expressed by
Te = piq Ld − Lq id + ϕf , 6
where p is the pair pole number of the machine. Themagnetic flux is a constant that depends on the material usedfor the realization of the magnets.
The mechanical expression is represented by
JdΩdt
+ fΩ = Te − Tr 7
where J is the value of the total inertia of the rotor, fis the viscous friction coefficient, and Tr is the electro-magnetic torque.
2.5. Pulse-Width Modulation. Pulse-width modulation(PWM) is a static converter used to rectify an alternatingsignal and then transform it into a continuous signal. Inorder to reduce the simulation time and simplify the model-ing, the rectifier is modeled by ideal switches where there is a
zero resistance in the on state, an infinite resistance in the offstate, and an instant response to control signals.
PWM is composed of six components; each one com-prises two switching cells consisting of a transistor and adiode, as depicted in Figure 4. Accordingly, the currentpasses in both directions.
The main function of the PWM switches is to provide theconnection between the AC voltage produced by the windsubsystem and the DC bus.
The switches’ states are complementary, as defined by
S = 0 if ij = +1,S = 1 if ij = −1,
j = a, b, c8
In general, the voltage equation of the outputs can bewritten in the form expressed by
Un =Udc Sn −13
c
n=aSn , 9
where Sn is equal to 0 or 1 depending on the state of theswitches, and n is a, b, or c.
0.2
Cpmax = 0.15
0.1
0.05
0
Cp
(lam
bda)
0 0.2 0.4 0.6 0.8 1 1.2 1.4Lambda
Lambdaoptimal
X: 0.78Y: 0.1495
Cp (lambda)
Figure 3: Characteristic curve of Cp λ in MATLAB/SIMULINK environment.
Udc
Usbc
Usab
Usca
Figure 4: PWM rectifier circuit diagram.
4 International Journal of Photoenergy
The equations of voltages for the balanced three-phasesystem without a neutral are given by
ea
eb
ec
= R
ia
ib
ic
+ Lddt
ia
ib
ic
+Ua
Ub
Uc
, 10
where en and in are, respectively, the voltages and currents ofthe inputs a, b, and c.
2.6. Solar Model. The solar cells can be divided into twotypes, bulk and thin film [2, 8–11]. Solar cells are madeof different materials and have different efficiency values.Based on cost and generation efficiency, we choose mono-crystalline silicon for our work among the different materialsprovided in Table 3.
The characteristic I-V for a PV module is given by
I = npIPV
− npI0Tc
Tref
3e qEg/ak 1/T ref − 1/Tc e q VI+IRS /aktcnS −1
−V + IRS
Rp,
11
where I0 is the reverse saturation current of the diode, Eg isthe value of the energy band of the diode material, a is theideality factor of the diode, k is the Boltzmann’s constant,q is the electron charge, and Tc is the cells’ temperaturein Kelvin.
The analyzed PV generator has the electric specificationsgiven in Table 4.
2.7. Boost DC-DC. Generally, the objective of the DC-DCboost converter is to help the power renewable energy voltage[13], which is in our work the solar and wind energies, toconverge the reference value provided by the MPPT algo-rithm. Perturbing the duty ratio of a PV generator signal,which is fed into the converter, can minimize the proportionbetween the input voltage and the output desired voltage.The general topology of the boost DC-DC converter is shownin Figure 5.
The equation system of the boost DC-DC converter isdone by
iL = i − c1dvidt
,
i0 = 1 − d iL − c2dv0dt
,
vi = 1 − d v0 + LdiLdt
12
We use two DC-DC boost converters in the output of thesolar and wind subsystems to rebuild optimized voltages. Thecurrents of the DC-DC boost converters are transmitted tothe DC-DC bus.
2.8. DC-DC Bus. The coupling of the two subsystems (solarand wind) is provided via a continuous bus. As illustratedin Figure 6, the DC bus is represented by the capacitor Cconnected to both subsystems. The role of the C capacitorintegrated in the bus ensures the regulation of the ripple.
In our system, the photovoltaic energy is connected tothe load via an MPPT-controlled DC-DC converter. Thewind energy is connected to the load by the controlledPWM rectifier.
Table 3: Comparison of solar cell efficiency [10].
Solar cellMonomer
efficiency (%)Module
efficiency (%)
Monocrystalline silicon 22 10–15
Polycrystalline silicon 18 9–12
Boron-phosphorus compound 30 17
Thin-film amorphous silicon 13 10
Thin-film Cu-In 19 12
Thin-film Cd-Te compound 16 9
Table 4: Photovoltaic generator specifications [12].
Rated power 60W
Current at maximum point 3.25A
Voltage at maximum point 16.8V
Short circuit current 3.56 A
Short circuit voltage 21.6V
Number of cells in parallel 1
Number of cells in series 36
VoVi
id
C1
L
C2
iLi
isiC1
i0
iC2
+ −
Figure 5: Circuit diagram of boost converter.
Solarsubsystem
Windsubsystem
lwind
lPh l1
l2
Vdc
ldc
C
Figure 6: Electrical diagram of the continuous bus.
5International Journal of Photoenergy
On the basis of Figure 6 and the equation of meshes, wecan establish the following relations.
dVdcdt
= 1cIdc,
I1 = IPh + Iwind = Idc + I2,Idc = I1 − I2,
Vdc =1c
t1
t2Idcdt + Vdc0
13
2.9. Inverter. The inverter is the last output of our system.The role of this block is to transform the single-phase to athree-phase signal.
The inverters are static converters of electrical energyfrom DC to AC. The function of an inverter is the inverseof a rectifier; that is, for a DC voltage given at the input, theinverter performs the voltage cutting by means of semicon-ductors (transistors or thyristors) in order to obtain an ACvoltage that can be adjusted in frequency and effective values.
The AC waveform of the output voltage is determined bythe ripple system. The most used inverters are in PWM. Thetype of inverter chosen for our work is presented in Figure 7.
By applying the mesh equations, we obtain the com-pound voltages between phases given by
VAB = F1 − F2 Vdc,VBC = F2 − F3 Vdc,VCA = F3 − F1 Vdc,
14
where F1, F2, and F3 respectively represent the state of theswitches K1, K2, and K3, and Vdc presents the output of acontinuous bus.
Assuming that the input load is balanced, the outputconstitutes then a balanced system given in
VA +VB +VC = 0 15
The input current Idc is expressed as a function of currentoutputs IA, IB, and IC, as expressed in
Idc = F1IA + F2IB + F3IC 16
2.10. MPPT Fuzzy Logic Controllers. The implementation ofclassic algorithms is simple and is independent from turbine
characteristics [14], but there still exist issues like the selec-tion of the step size. The use of a big step size can definethe MPPT fast, but it can result in severe oscillations aroundthe MPPT. Reducing the perturbation step size slows downthe MPPT process mostly where the wind speed varies fastdespite the fact that the oscillations around the MPPT canbe minimized [15, 16]. To solve this conflicting situation,we use in this paper a fuzzy logic control algorithm that canrealize a variable step-size control.
The fuzzy logic control can use a large step size when theoperating point is far away from the maximum power point,whereas the step can be minimized when the algorithmconverges to the maximum power point [17, 18]. Thus, wecan say that the fuzzy logic control can dynamically changeits step depending on the energy input conditions.
Generally, The MPPT controller is a functional elementof the PV and wind systems, which enables searching theoperating point of the PV generator and the wind turbineunder variable load and atmospheric conditions.
For the solar subsystem, the MPPT is based on the circuitmaximum power transfer requirements: the objective is tocheck the point where the PV cell’s output impedance isequal to the load impedance. The duty cycle is controlledby the MPPT controller for the pulse-width modulationblock. This controls the power converter (DC-DC) to delivera maximum power to the DC load bus.
The structure of the fuzzy controller used in the solarsubsystem is depicted in Figure 8. In a MATLAB/SIMULINK(V.R2012b) environment, there is a fuzzy toolbox that allowsthe user to manage this structure and formulate fuzzy rules.Using this tool, we can configure the used command.
A controller based on a fuzzy logic algorithm iscomposed of three stages: fuzzification, rule base, and defuz-zification. During fuzzification, the numerical input variablesPpv and Vpv are converted into linguistic variables based on amembership function. There is a block for calculating theerror (E) and the change of the error (dE), expressed, respec-tively, in (17) and (18), at sampling instant k, as follows:
E k = dPdV
= P k − P k − 1V k −V k − 1 , 17
dE k = E k − E k − 1 , 18
VdcVC
VA VB
Figure 7: Structure of a three-phase voltage PWM inverter.
6 International Journal of Photoenergy
where P k and V k are the power and the terminal voltagedelivered, respectively, by a PV module.
The value of the error E k determines the exact MPPTcontroller output according to the sign. The MPPT controllercan decide in this way what the variation in the duty cycle(decrease or increase the speed of convergence) will be, whichmust be imposed on the DC-DC boost converter to approachthe maximum power point. The value result of E k anddE k are converted to the linguistic variables, then theoutput of the fuzzy logic controller, which is d, can belooked up in a rule-base table.
The member function of the input variables (E and dE) ofthe solar fuzzy logic controller with MATLAB fuzzy tools isfive member functions for each one. They are parametrizedfor E and dE, as shown in Figures 9 and 10, respectively.
The linguistic variables assigned to the duty factor d forthe different combinations of E k and dE k are establishedaccording to our knowledge given in Table 5.
1NG NP EZ PP PG
0.5
0
−35 −30 −25 −20 −15 −10 −5 0Input variable “E”
5
Figure 9: Member functions of solar input E.
NG NP EZ PP PG1
0.5
0
−8 −6 −4 −2 0 2 4 6 8Input variable “dE”
Figure 10: Member function of solar input dE.
Table 5: Fuzzy logic controller inference rules.
EdE
NB NS ZE PB PS
NB PB PB PB PB PB
NS PB PS PS PS ZE
ZE PS PS ZE NS NS
PB NS NS NS NS NS
PS NB NS NS NS ZE
1
2
P
V
P E
V dE
Block error
MUX 1
d
Fuzzy logic controller
Figure 8: SIMULINK model of fuzzy logic controller of solar subsystem.
7International Journal of Photoenergy
In this table, the linguistic variables used for the fuzzylogic controller are PB (positive big), PS (positive small),ZE (zero), NS (negative small), and NB (negative big).
The Mamdani type and inference rules with logicalMin–Max operators are chosen for the fuzzy logic controller.
By applying the rules, the fuzzy tools generate the resultoutput of each pair (E, dE), as described in Figure 11.
In the second case of the wind subsystem, to control theMPPT, we use the same block error inputs where P(k) isthe power output delivered by the wind turbine moduleand Ω(k) is the wind speed of the module. According to thesign of E(k), the MPPT controller can decide what the varia-tion in the wind speed (Ωref) will be, which must be imposed.
We choose the same five linguistic variables for theMPPT controller [19]. For the inference rules of the MPPT
controller, we choose the Mamdani type inference rules withlogical Min–Max operators.
On defuzzification, the fuzzy logic controller output isconverted from a linguistic variable to a numerical one whilestill using the membership function [20].
In Figure 12, the structure of the MPPT fuzzy logic con-troller designed to command the wind subsystem is shown.
Each member function of the input variables (E and dE)of the wind fuzzy logic controller with MATLAB fuzzy toolsis parametrized for E and dE, as illustrated in Figures 13 and14, respectively.
By applying the rules, the fuzzy tools generate the resultoutput of each pair (E, dE), as described in Figure 15.
All the other blocks (the PV generator, the wind turbine,the PMSG, the rectifier, the boost converters, the DC-DC
0.90.80.70.6d
0.50.40.3
−30 −20 −10 −50
05
dE
E
−30 20 50
5
dE
Figure 11: 3D surface of output duty cycle (d) values.
Omegamec
2
1P E
MUX
Fuzzy logic controller
Omegaref
1
Omegamec dE
P
Block error
Figure 12: SIMULINK model of a fuzzy logic controller of a wind subsystem.
NG NP EZ PP PG1
0.5
0
−6 −4 −2 0 2 4 6Input variable “E”
Figure 13: Member function of wind input E.
8 International Journal of Photoenergy
bus, etc.) are designed according to the mathematical equa-tions of each component, as described above.
3. XSG Conception
3.1. Introduction. The classic FPGA implementation meth-odology consists of two main steps [21]. In the first one, thecommand is modeled and simulated using the MATLAB/SIMULINK software tools in our work. The second step isdedicated to the hardware architecture design and the HDLdescription which is performed manually. The designers thatare not familiar with the HDL-coding process can consume alot of time in this step. In this paper, we use the XSG toolfor the development of a digital signal processor (DSP). Itallows a high-level implementation of DSP algorithms onan FPGA circuit. It consists of a graphical interface libraryon MATLAB/SIMULINK used for modeling and simulatinga dynamic system process [22]. We can find the library oflogic cores, specific for FPGA implementation, provided tobe configured and used according to the designer’s require-ments. Next, the implementation of system generator blocks,the Xilinx Integrated Software Environment (ISE) is used tocreate “netlist” files. The latter serves to convert the logicdesign into a physical file and generate the bitstream that will
be transferred to the target device through a standard JTAG(Joint Test Action Group) connection. The simulation inMATLAB XSG allows the test of the FPGA application withthe same conditions as with the physical device and with thesame data width of variables and operators. The simulationresult can be bit-to-bit and cycle accurate, which means thateach single bit is accurately processed and each operation willtake the exact number of cycles to process.
Figure 16 presents the processing flow of the systemgenerator tool from the hardware architecture design to thegeneration and cosimulation process. In this paper, the
NG NP EZ PP PG1
0.5
0
−1 −0.8 −0.6 −0.2−0.4 0 0.2 0.4 0.6 10.8Input variable “dE”
Figure 14: Member function of wind input dE.
17
16
15
Om
ega re
t
14
13
1 0.5 0dE
E
05
−0.5 −1 −50.5 0 E
05
Figure 15: 3D surface of output wind speed reference values.
Design system modelisation using XSGblocks
Hardware optimization resourcesand timing analysis
Design verified ?
Design verification under SIMULINK
Designverified?
RTL code generation
Hardwarecosimulation
Optimized and validated design
Yes
No
No
Figure 16: Flow of system generator tool.
9International Journal of Photoenergy
architecture is designed using XSG components and theblocks will be simulated under SIMULINK to compare theresults obtained in both cases, the architecture designedwith a MATLAB code algorithm and the one designedwith a hardware module.
To simulate our wind-solar system, we must choose sup-port processing. We can use, for example, FPGA or DSP.Both approaches are markedly different, so we have studiedit to contribute the right choice for our system in this work.
Firstly, translating the block diagram to the FPGA maywell be simpler than converting it to a C code for the DSP.Furthermore, the FPGA does not have a fixed hardwarestructure as in the DSP; it is defined by the user concept.Finally, the FPGA, contrary to the DSP, allows the processesto be done simultaneously, which means that parallel pro-cessing is done according to the HDL code. Seeing that oursystem requires parallel processing and a flexible structure,we choose the FPGA support.
By using the XSG tool block, maximum precision isnecessary on configuring all blocks, between the gateways,to run with a full output type. Word-length optimization isa key parameter that permits reducing the utilization ofFPGA hardware resources while maintaining a satisfactorylevel of accuracy. For that reason, successive simulationiteratively reduces the output word length, which is madeuntil achieving the minimum word length while ensuringthe same maximum precision. The fundamental scalar signaltype in MATLAB/SIMULINK is a double-precision floating-point number, and only the processing block is made basedon system generator blocks that operate on Boolean andfixed-point values. A step of adaptation and interfacing
between the input and output blocks is necessary. Fortu-nately, XSG offers a simple interfacing using the predefined“gateway-in” and “gateway-out” blocks provided by theXilinx blockset library.
3.2. General Structure of Wind-Solar System with XSG.To translate our system for the simulation with XSG,we need to change the specific blocks with an equivalentexisting Xilinx library. The blockset in Figure 17 describesthe global wind-solar system model designed with fuzzylogic controllers in a MATLAB/SIMULINK environmentwith XSG blocks.
Adding the system generator and translating the twoblocks, the fuzzy logic controllers of the solar and windsubsystems are necessary to pass the XSG simulation. Weuse the Xilinx library to change the MATLAB/SIMULINKcomponent with adequate XSGs and to add gateway inputsand gateway outputs. The fuzzy toolbox does not exist inthe XSG library, so we build it. It is composed of Min–Maxinference rules, linguistic variables (PB, PS, ZE, NS, andNB) and defuzzification. We use a MUX from the Xilinxlibrary to convert the output to numeric values with thegravity center method. The fuzzy built controller is integratedon wind and solar subsystems in the same way because itdepends on E and dE. A description of the function of eachsubsystem (wind and solar fuzzy logic controllers) will begiven in the following sections.
3.3. Hardware Architecture of Fuzzy Logic Controller. Tobuild the solar fuzzy logic controller, we use the Xilinxlibrary. As shown in Figure 18, we have two gateway inputs
SunlightSunlight
Current
Temperature
Cells number
PowerVoltage
Solar generator
Boost solar
CurrentVoltage
Vb
dib
X
Divide4Ppv
Temperature
Cell number
Wind speed
Atmospheric conditions
5
lb Vb
BatteryDC-DC bus
2
3Pdc
PHybride
lpv
leol
Pdc
Phyb
d
P
V
Fuzzy logic solar controller
Battery2
Vb lbSystem
generator
X
Divide8Peol
6
CurrentVoltage
Vb
dC
ns4
Rectifier
Ib
Boost windsc
sb
sa
ic
ib
ia
ic
ib
ia
Iva
vb
vc
va
vb
vc
sa
sb
sc
Omegamec
Cemref
Omegamec
Cemref
PMSG Commade MLI
PeolPeol
Ceol Ceol
Turbine
Omegaref
W
OmegarefOmegamec
P
Fuzzy logic wind controller
4
1
Figure 17: Wind-solar system designed model using XSG block.
10 International Journal of Photoenergy
(E, dE), a gateway output (d), and three subsystems which arefuzzification, decision-making logic, and defuzzification,where they function with the same steps used by theMATLAB/SIMULINK tool. The same procedure is appliedto control the bitch angle for the wind fuzzy logic controller.
In the subsystem fuzzification, we model the five linguis-tic variables; then in the decision-making logic subsystem, weapply the Min–Max inference to the linguistic variables. Foreach gateway input, we have 25 rules, hence 50 rules for both
gateway inputs. We reuse the Min–Max inference until wehave only one gateway output.
Figures 19 and 20 respectively present the Min and Maxblocks built with the Xilinx library.
For linguistic variables, we cite PS as an example, which isdescribed in Figure 21.
During the defuzzification, a MUX is used to convert thegateway output to a numeric value. Figure 22 shows thedefuzzification block built with XSG components.
1E
InGateway in
2dE
InGateway in1
Fuzzification Decision-making logic Defuzzification
E
dE
Out1Out3Out3Out4Out5
Out1In1In2In3In4In5
In1
In2
In3 d OutGateway out
1d
In4
In5
In6In7In8In9In10
Out3
Out3
Out4
Out5
Out6Out7Out8Out9
Out10
Figure 18: Architecture of solar fuzzy logic controller with XSG.
1ln12
ln1
a
a - b
AddSub
Constant1 Relational1
Constant2 Relational
Convert
Cast
Convert
Cast
a
b
b
0
z−1
a < b
a
b
z−3
a × b
a
b
z−3
a × b
a
ba + b
Mult
Mult
0
a
b
z−1 AddSub1
Out11
a ≥ b
Figure 19: Min block built with Xilinx library.
10
Constant2
AddSub
Constant1
ln1
2ln2
a
a - bb
0Relational1
Relational
a
a > bb
Cast
Convert1
Cast
Convert1
Mult1
Mult
AddSub1
Out11
z−1
a
a < bb
z−1a
a × bb
z−3
a
a × bb
z−3
a
a + bb
Figure 20: Max block built with Xilinx library.
11International Journal of Photoenergy
4. Simulation Results
4.1. Simulation of Controller Output. Figures 23 and 24respectively present the simulation results of the duty cycle
output of the solar fuzzy logic controller and the wind speed(omegaref) output of the wind fuzzy logic controller. As canbe seen, the outputs are numerical values applied to adjustthe performance of subsystems.
1e
21,875
a
b a-b
AddSub
Constant7
0
0
a
b
z-1
a ≥ b
a
b
z-1
a ≥ b
a
b
z-3
a × b
a
b
z-3
a × b
a
ba - b
Constant5
Cast
Cast
0
Mult1Convert1
Convert8 Relational1
Convert
Convert2
Constant9
Constant10Relational2
AddSub2
Convert12 Relational4Mult
53,125
a
b
z-1
a ≤ bCast
0
a
b
z-3
a × ba
b
z-3
a × b
a
ba + b
a
ba + b
a
ba + b a
ba + b
Mult4Mult5 AddSub5
AddSub4AddSub8
AddSub7
Constant8
Constant4
Convert
50
2
1
s
a
b
z-3
a × ba
b
z-3
a × b
a
b
z-3
a × ba
b
z-3
a ≤ b
0
Mult3
Constant2
Constant1
Mult7Mult8
Mult2
-50
Cast
0
Relational3
Relational5
Relational8
Constant3
Constant14
Constant1
Constant3Convert4
Convert3
AddSub3
a
ba - b
a
b
z-1
a ≥ b
a
b
z-1
a ≥ b
a
b
z-1
a × b
Cast0
0Cast
46,484,375
Figure 21: Linguistic variable PS built with Xilinx library.
1
2
PP
PG
a
ba + b a
ba + b
a
ba + b
a
ba + b
aZ
-3
ba × b
3
4
NP
EZ 5
NG
AddSub1AddSub3 Mult
AddSub2AddSub
Constant
0625
Gateway out d
1Out
In1
In2
In3
In4
In5
d
l
Defuzzification
Figure 22: Defuzzification block built with Xilinx library.
12 International Journal of Photoenergy
The duty cycle (d) and the wind speed (omegaref) stabili-zation values are, respectively, 0.41 and 15m/s.
4.2. Simulation of Power Output. To analyze the results, wecompare the system with XSG and the system designedwith MATLAB/SIMULINK block simulations on fixedatmospheric conditions.
The values of the different atmospheric conditions usedfor the simulation of the designed wind-solar system aregiven on Table 6.
Figure 25 compares between power versus time evolu-tion obtained with MPPT controllers in the two cases:with simple block MATLAB/SIMULINK (PHyb) and withXSG. As is noted, the maximum power value is obtainedat the same time, but the stabilization is quicker for thesystem with XSG. Thus, we can say that the system modelwith XSG uses its advantage of parallel processing to reachthe stabilization form.
The curve of the hybrid power output with XSG usingfuzzy logic controllers shows a good accuracy of the proposedalgorithm since the stabilization at time is 12ms.
In the system with the XSG library, the forms are thesame as in the system with simple blocks. Consequently, wecan conclude that the synchronization between the XSGblocks is perfect.
4.3. Simulation of Inverter Output. The intersection of thesignals (carrier and modulator) gives the switching times.Figure 26 illustrates the switch output signal of theinverter switches.
The output signal is 1 if the modulator is larger than thecarrier and 0 in the opposite case. The output signal thereforechanges the state (0 or 1) at each intersection of both signals.Figure 27 describes the two signals to be compared.
The three voltages of the resulting phases of the inverterare phase shifted by 2Π/3. The frequencies of the carrierand modulating signals are successively 50Hz and 5Hz.The purpose of this choice is to extract a maximum intersec-tion. Figure 28 schematically depicts the appearance of aphase voltage at the output of the inverter.
These results of the inverter output coincide with thesystem modeling by using the MATLAB/SIMULINK library.In this step, we can say that the cosimulation with XSGis satisfied.
The picture of the experimental setup is shownin Figure 29.
To ensure greater efficiency of our model, with fuzzylogic controllers, we compare it with other work results.
In Table 7, a comparison with some references in terms ofpower delivered by the hybrid system and the inverter signaloutput is provided.
As represented in Table 7, a comparison with some refer-ences uses different topologies in terms of tracking efficiencyand response time. After ensuring that the system progress isvalidated and evaluated, we can move now to implement thecommands on FPGA circuits.
5. Implementation on FPGA
In the first time, we start with a standard 36-bit fixed-pointformat in various blocks of the XSG wind-solar system soas to ensure the same performance as the floating-pointformat of MATLAB simulation [24]. In a second step, byusing the test-error approach, we try to reduce the width ofthe data while keeping the performance and the synchroniza-tion between blocks. The utilized general fixed-point formatis 24 bits [25, 26] which guarantees the same performanceas MATLAB.
Once completed and verified, the XSG architecture canbe automatically mapped to hardware implementation onFPGA. We choose Virtex-6-XC6VLX315T and we usethe “generate” button from the settings window of the sys-tem generator tool. After that, the VHDL is automaticallygenerated [27]. The characteristics of the FPGA Virtex-6-XC6VLX315T that we use in the prototype are shownon Table 8.
We use an HDL code generated into the XILINX ISEdesign software to prepare the transfer of the commandcontroller to the FPGA support.
Synthesis is the step where the code HDL transformsto electronic components and the register transfer levelwill be generated.
The different resources of device utilization provided bythe Xilinx ISE are shown in Table 9.
6. Conclusion
In this paper, we have put forward a hardware implemen-tation of fuzzy logic controllers for a solar-wind systemtargeted for isolated sites.
First, we have designed the hybrid system withMATLAB/SIMULINK and XSG blocks. In general, themaximum power point has achieved forms of the wind-solar system with simple blocks: MATLAB/SIMULINK andXSG blocks are practically the same. The system with XSGhas stabilized more quickly because of the parallel advan-tage of the XSG architecture. The maximum power pointhas achieved time in two analyzed cases, which has beenabout 0.4ms.
In the second step, the performance of the proposedhardware implementation in terms of processing latencyhas been evaluated relatively to the first achieved maximumtime and stabilization form. The XSG tool has been used
0.40.420.440.460.48
0.50.520.540.560.58
d
20 40 60 80 100 1200Time (ms)
Figure 23: Fuzzy logic controller output of solar subsystem.
13International Journal of Photoenergy
for the system development. The use of this tool demon-strates that it has benefits in terms of conception time, sincethe developed design has been utilized firstly for the softwarevalidation and for the hardware system generation.
20 40 60 80 100 1200Time (ms)
14.995
15
15.005
15.01
15.015
Om
ega re
f
Figure 24: Fuzzy logic controller output of wind subsystem.
Table 6: Atmospheric wind and solar values.
Atmospheric condition Values
Wind speed 10m/s
Sunlight 1000W/m2
Temperature 300K
0
2000
4000
6000
8000
10,000
12,000
1814 200 6 8 1042 1612Time (ms)
Pow
er (W
)
PHyp with XSGPHyp
Figure 25: Power of wind-solar system with XSG and MATLAB/SIMULINK on fixed atmospheric conditions.
0
0.2
0.4
0.6
0.8
1
Am
plitu
de
10 25150 205 30Time (ms)
Figure 26: Switching signal of inverter switches.
−250−200−150−100
−500
50100150200250
Sign
aux
com
paré
s (V
)
20 3010 500 40 60Time (ms)
PorteuseModulante
Figure 27: Aspect of modulated and carrier signals.
−60−40−20
0204060
60 1000 40 8020 120Time (ms)
Tens
ion
(v)
Figure 28: Voltage of one phase at inverter output.
Figure 29: Picture of the experimental setup.
14 International Journal of Photoenergy
Moreover, the timing response and tracking efficiency ofthe complete design on the XSG architecture indicate that ahigh performance in terms of execution time can be reached.Indeed, the suggested architecture largely respects the timingand tracking constraints of the used hybrid system. Theperformance of the proposed solar-wind system supportsincreases with respect to material specifications. The experi-mental simulation results in terms of achieved tracking time,efficiency, and algorithm utilization are compared to those ofother existing systems.
At the end of the paper, we have implemented andoptimized the designed system on an FPGA circuit, Virtex-6-XC6VLX315T, by using the Xilinx ISE.
Conflicts of Interest
The authors declare no conflict of interest.
Authors’ Contributions
All authors helped in conceiving the experiments. AymenJemaa designed and performed the experiments. At the sametime, Aymen Jemaa andMohamed Ali Hajjaji wrote the mainpart of the paper. Ons Zarrad and Mohamed Nejib Mansouricontributed in interpreting the results and revising andwriting of the paper.
Acknowledgments
This work was partially supported by ESIER.
References
[1] P. Nema, R. K. Nema, and S. Rangnekar, “A current and futurestate of art development of hybrid energy system using windand PV-solar: a review,” Renewable and Sustainable EnergyReviews, vol. 13, no. 8, pp. 2096–2103, 2009.
[2] J.-H. Chen, H.-T. Yau, and J.-H. Lu, “Implementation ofFPGA-based charge control for a self-sufficient solar trackingpower supply system,” Applied Sciences, vol. 6, no. 2, 2016.
[3] P. Suresh and K. Dhandapani, “Modeling of an efficient hybridwind and PV system for DC bus voltage regulation,” IJCTA,vol. 9, pp. 2517–2525, 2016.
[4] A. Rezvani, M. Izadbakhsh, and M. Gandomkar, “Enhance-ment of hybrid dynamic performance using ANFIS for fastvarying solar radiation and fuzzy logic controller in highspeeds wind,” Journal of Electrical Systems, vol. 11, pp. 11–26, 2015.
[5] H. Belmili, S. Boulouma, B. Boualem, and A. M. faycal,“Optimized control and sizing of standalone PV-wind energyconversion system,” Energy Procedia, vol. 107, pp. 76–84, 2017.
[6] S. K. A. Shezan, N. H. Khan, M. T. Anowar et al., “Fuzzy logicimplementation with MATLAB for solar-wind-battery-dieselhybrid energy system,” Imperial Journal of InterdisciplinaryResearch, vol. 2, pp. 574–583, 2016.
[7] M. Rosyadi, S. M. Muyeen, R. takahashi, and J. Tamura, “Adesign fuzzy logic controller for a permanent magnet windgenerator to enhance the dynamic stability of wind farms,”Applied Sciences, vol. 2, no. 4, pp. 780–800, 2012.
Table 7: Performance comparison between proposed work and other works.
References Algorithms Tracking efficiency ηMPPT (%) Response time (s)
Proposed algorithm Fuzzy logic 99.61 0.40
Izadbakhsh et al. [23] ANFIS for solar fuzzy logic for wind subsystems 99.34 0.80
Suresh and Dhandapani [3]Fuzzy logic 99.40 0.58
HC and P&O 98.32 1.7
Rezvani et al. [4]Fuzzy logic without load
99.250.80
Fuzzy logic with load 1.1
Belmili et al. [5]Fuzzy logic 99.22 0.80
P&O 96.98 2.95
Table 8: Characteristics of the FPGA Virtex-6-XC6VLX315T.
Logic cells 314.880
Configurable logic blocks (CLBs)Slices 49.200
Max distributedRAM (Kb)
5.090
DSP48E1 slices 1.344
Interface blocks for PCI express 2
Total I/O banks 18
Max user I/O 720
Total number of configuration bits 104,465,888
Price $667.29
Table 9: FPGA circuit device utilization.
Slice logic utilization Used Available Utilization (%)
Number of slice registers 21,286 393,600 5
Number of slice LUTs 37,009 196,800 18
Number used as logic 27,480 196,800 13
Number used as memory 5851 81,440 7
Number of occupied slices 11,300 49,200 22
Number with unused flip flop 22,350 39,794 56
Number with unused LUT 2785 39,794 6
Number of bonded IOBs 257 600 42
Number of DSP48E1s 1056 1344 78
15International Journal of Photoenergy
[8] Z. Ons, J. Aymen, A. Craciunescu, and M. Popescu, “Compar-ison of hill-climbing and artificial neural network maximumpower point tracking techniques for photovoltaic modules,”in 2015 Second International Conference on Mathematics andComputers in Sciences and in Industry (MCSI), pp. 19–23,Sliema, Malta, 2015.
[9] K. K. Tse, B. M. T. Ho, H. S. H. Chung, and S. Y. R. Hui, “AComparative study of maximum-power-point trackers forphotovoltaic panels using switching-frequency modulationscheme,” IEEE Transactions on Industrial Electronics, vol. 51,no. 2, pp. 410–418, 2004.
[10] C.-H. Huang, H.-Y. Pan, and K.-C. Lin, “Development of intel-ligent fuzzy controller for a two-axis solar tracking system,”Applied Sciences, vol. 6, no. 5, 2016.
[11] C. Marisarla and K. R. Kumar, “A hybrid wind and solarenergy system with battery energy storage for an isolatedsystem,” International Journal of Engineering and InnovativeTechnology, vol. 3, pp. 99–104, 2013.
[12] J. Aymen, Z. Ons, A. Crăciunescu, and M. Popescu, “Compar-ison of fuzzy and neuro-fuzzy controllers for maximum powerpoint tracking of photovoltaic modules,” Renewable Energyand Power Quality Journal, vol. 1, pp. 796–800, 2016.
[13] S. Hassan, H. Li, T. Kamal, U. Arifoğlu, S. Mumtaz, andL. Khan, “Neuro-fuzzy wavelet based adaptive MPPT algo-rithm for photovoltaic systems,” Energies, vol. 10, no. 3, 2017.
[14] X.-P. Li, W.-L. Fu, Q.-J. Shi, J.-B. Xu, and Q.-Y. Jiang, “A fuzzlogical MPPT control strategy for PMSG wind generationsystems,” Journal of Electronic Science and Technology,vol. 11, pp. 72–77, 2013.
[15] E. Cam, G. Gorel, and H. Mamur, “Use of the geneticalgorithm-based fuzzy logic controller for load-frequencycontrol in a two area interconnected power system,” AppliedSciences, vol. 7, no. 3, 2017.
[16] M. Lotfy, T. Senjyu, M. Farahat, A. Abdel-Gawad, andH. Matayoshi, “A polar fuzzy control scheme for hybrid powersystem using vehicle-to-grid technique,” Energies, vol. 10,no. 8, 2017.
[17] A. Aksjonov, K. Augsburg, and V. Vodovozov, “Design andsimulation of the robust ABS and ESP fuzzy logic controlleron the complex braking maneuvers,” Applied Sciences, vol. 6,no. 12, 2016.
[18] S. Cheng, W.-b. Sun, and W.-L. Liu, “Multi-objective configu-ration optimization of a hybrid energy storage system,”Applied Sciences, vol. 7, no. 2, 2017.
[19] W. Na, P. Chen, and J. Kim, “An improvement of a fuzzy logic-controlled maximum power point tracking algorithm forphotovoltic applications,” Applied Sciences, vol. 7, no. 4, 2017.
[20] P. Suresh and B. C. Sujatha, “Maximum power point trackingof a hybrid solar-wind power generation system for a smartgrid using fuzzy logic control,” International Journal of Scien-tific & Engineering Research, vol. 7, no. 5, pp. 165–170, 2016.
[21] R. Hmida, A. Ben Abdelali, and A. Mtibaa, “Hardwareimplementation and validation of a traffic road sign detectionand identification system,” Journal of Real-Time Image Pro-cessing, vol. 15, no. 1, pp. 13–30, 2018.
[22] R. Hmida, A. Ben Abdelali, F. Comby, L. Lapierre, A. Mtibaa,and R. Zapata, “Hardware implementation and validationof 3D underwater shape reconstruction algorithm usinga stereo-catadioptric system,” Applied Sciences, vol. 6,no. 9, 2016.
[23] M. Izadbakhsh, A. Rezvani, and M. Gandomkar, “Improve-ment of microgrid dynamic performance under fault circum-stances using ANFIS for fast varying solar radiation andfuzzy logic controller for wind system,” Electrical Engineering,vol. 63, no. 4, pp. 551–578, 2014.
[24] M. Bahoura, “FPGA implementation of blue whale callsclassifier using high-level programming tool,” Electronics,vol. 5, no. 1, 2016.
[25] R. Nagaraj and B. K. Panigrahi, “Simulation and hardwareimplementation of FPGA based controller for hybrid powersystem,” International Journal of Electrical Energy, vol. 3,no. 2, pp. 86–93, 2015.
[26] P. Balamurugan, A. D. Praveenraj, I. Kaleeswarn, R. M.Karthik, and A. Tamilarasi, “FPGA implementation of MPPThybrid algorithm for photovoltaic system,” in InternationalConference on Engineering Innovations and Solutions (ICEIS-2016), pp. 107–113, Tamilnadu, India, 2016.
[27] A. P. Ruiz, M. Cirstea, W. Koczara, and R. Teodorescu,“A novel integrated renewable energy system modellingapproach, allowing fast FPGA controller prototyping,” in2008 11th International Conference on Optimization ofElectrical and Electronic Equipment, pp. 395–400, Brasov,Romania, 2008.
16 International Journal of Photoenergy
TribologyAdvances in
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
International Journal ofInternational Journal ofPhotoenergy
Hindawiwww.hindawi.com Volume 2018
Journal of
Chemistry
Hindawiwww.hindawi.com Volume 2018
Advances inPhysical Chemistry
Hindawiwww.hindawi.com
Analytical Methods in Chemistry
Journal of
Volume 2018
Bioinorganic Chemistry and ApplicationsHindawiwww.hindawi.com Volume 2018
SpectroscopyInternational Journal of
Hindawiwww.hindawi.com Volume 2018
Hindawi Publishing Corporation http://www.hindawi.com Volume 2013Hindawiwww.hindawi.com
The Scientific World Journal
Volume 2018
Medicinal ChemistryInternational Journal of
Hindawiwww.hindawi.com Volume 2018
NanotechnologyHindawiwww.hindawi.com Volume 2018
Journal of
Applied ChemistryJournal of
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
Biochemistry Research International
Hindawiwww.hindawi.com Volume 2018
Enzyme Research
Hindawiwww.hindawi.com Volume 2018
Journal of
SpectroscopyAnalytical ChemistryInternational Journal of
Hindawiwww.hindawi.com Volume 2018
MaterialsJournal of
Hindawiwww.hindawi.com Volume 2018
Hindawiwww.hindawi.com Volume 2018
BioMed Research International Electrochemistry
International Journal of
Hindawiwww.hindawi.com Volume 2018
Na
nom
ate
ria
ls
Hindawiwww.hindawi.com Volume 2018
Journal ofNanomaterials
Submit your manuscripts atwww.hindawi.com