Implementation and Validation of an Adaptive Fuzzy Logic Controller for MPPT of PMSG-based Wind Turbines

To ensure the full benefits from wind generation systems, an effective maximum power point tracking (MPPT) technique should be implemented. In this article, an adaptive fuzzy logic controller (AFLC) is presented as a control methodology for producing the peak power from a permanent magnet synchronous generator (PMSG)-based wind turbine (WT). Regardless of the importance and significance of modeling and simulation processes, experimental studies occupy the most important aspect and remain a big challenge. The first part of this article is devoted to the simulation and modeling of PMSG along with the control system by MATLAB/Simulink® package to develop the control system. To justify the simulation results, experimental validation tests are presented under the same status of wind speed profile and run period. The experimental validation is conducted using the DSPACE DS1104 control board and is compared with simulation results. Moreover, for a realistic response, actual wind speed data is utilized in this research depending on measured data from Ras Ghareb wind farm in the Gulf of Suez, Egypt. The obtained results confirm the superiority of AFLC compared with fuzzy logic controller and conventional PI control schemes. In addition, good tracking with high accuracy is obtained regarding experimental and simulations results. Moreover, an evaluation indices are employed for WT performance based on gross system efficiency and integral of the absolute error (IAE). These indices are used to demonstrate the feasibility of the AFLC methodology compared with traditional approaches under the same wind turbine status.


I. INTRODUCTION
Lately, wind energy has occupied an important role in generating electricity in both developed and developing countries. The large penetration of wind energy within electrical networks is because of many advantages, including low operating cost than other green energy sources [1]. PMSG is considered actual competitor to doubly-fed induction generator (DFIG), due to several features such as rise efficiency, rise energy production and absence of mechanical components like slip rings [1][2][3].
A MPPT control strategy is necessary to obtain the extreme output power from the wind turbine (WT). Based on the MPPT concept, the optimum rotational speed tracking must be achieved under different operating conditions [3,4]. There are many ways to obtain the MPP from a wind turbine such as indirect control methods (ICM) and direct control methods (DCM). In the literature, the ICM comprises several MPPT topologies such as the tip speed ratio (TSR), the optimal torque (OT) and the power signal feedback (PSF) [5][6][7].
In TSR, wind speed sensor is demand, which adds to the system's complexity and increases the costs. Moreover, the mechanical factors of the sensor may lead to errors in the measuring data. Consequently, an incorrect discovering of the MPP can be expected and, thus, the efficiency of the system could be reduced. Therefore, wind speed estimation (WSE) techniques are used as mentioned in [8]. Although WSE techniques are easy and provide fast responses, complex polynomial approximation equations are used, which affects the system accuracy [7][8][9]. Both the PSF and OT methods are based on previous in-formation of the dynamic model of WT such as the torque constant. Consequently, the maximum power curve varies depending on the WT [8].
On the other hand, the DCM is utilized to achieve the MPP by the surveillance of the change of WT power production depending on the wind speed. DCM techniques include the incremental conductance (INC), optimum relation based (ORB) and perturb and observe (P&O) MPPT schemes [10][11][12][13]. However, P&O and INC techniques are characterized by improving reliability and efficiency, as they don't need turbine specification or using any sensors. However, these methods have a slower response time and do not follow quick various in wind speed, which reduces system efficiency [14]. Currently, soft computing approaches depending on the artificial intelligence (AI) are widely utilized to eliminate the drawbacks of the aforementioned traditional techniques. Fuzzy logic con-troller (FLC) is considered one of the strongest techniques, which is used to handle the system nonlinearity and uncertainty. Stochastic and capricious nature of wind speed is reflected on the dynamic behaviors of WT and, accordingly, FLC is very useful for dealing with this nature. As a result, system dependability improves and an effective MPPT is achieved [15].
The authors in [16] proposed a PMSG wind turbine with an adaptive fuzzy controller. To force the PMSG to track its ideal path, a Takagi-Sugeno (T-S) fuzzy controller is designed. Based on simulation results, the proposed control system showed more efficiency than PI controller. To improve the utilization of a wind turbine, an AFLC for PI controller is proposed. In the pitch control method, an AFLC controller is utilized to control the wind turbine's speed. The PI controller is simple to use, but the PI controller cannot successfully regulate the system performance when the grid characteristics are changed, especially when the grid is subjected to fault. The results have demonstrated the benefits of the AFLC controller over the traditional PI controller [17]. In [18], an adaptive fuzzy PI method is suggested for a TSR control. The presented fuzzy logic inputs are the change in error and the error of the generator's speed from its TSR estimated ideal value. The PI controller's Kp and Ki constants are tuned by the fuzzy logic output. These constants serve as the converter's inductance current reference, which is compared to the actual current of the inductor. The output is routed into the PI controller to generate a duty cycle for the pulse-width modulation (PWM) that drives the converter.
In [19], the suggested method is applied to a 5-MW wind turbine, which is a fuzzy PI controller to get MPPT. This fuzzy approach determines the best PI improvements for each wind speed. Furthermore, it compensates variances in torque signal produced by changes in wind speed. The results showed the effectiveness of this method compared to other methods in terms of obtaining maximum power.
Different structures exist for PMSG-based wind turbine through power electronics devices depending on the cost, control complexity and size of wind turbine. In [20,21], the operation of the PMSG-based WT framework depends on the diode bridge rectifier converter techniques. In addition, the authors in [22] proposed a WT that is based on PMSG and equipped with a diode bridge rectifier and a boost converter. These proposals have some drawbacks, such as not being able to achieved rotational speed to its full capability. In back-toback (BTB) converter set, fully-controlled and flexible operation is recognized for a wide range of rotational speeds [23].
Most of papers that utilized AFLC for MPPT for PMSG relied on theoretical implementation, while real-time implementation of AFLC is another challenge that has to be achieved. This paper suggests an applicable and efficient control system that depends on the AFLC approach to obtain the MPPT from of PMSG system under different wind speed conditions. The major contribution of this article is the practical and mathematical investigation of the proposed technique. Besides, a detailed comparison is given between the suggested control method and the traditional approaches under the same wind turbine status to demonstrate the effectiveness of the suggested scheme. The main contributions introduced through this article are concentrated on the following points: • Simulation and experimental validation results of AFLC-based MPPT technique for PMSG WT system are presented under the same conditions of wind speed profiles and run time. • Realistic responses based on actual wind speed data are utilized in this paper depending on measured data from Ras Ghareb wind farm in the Gulf of Suez, Egypt. • Under the same wind turbine conditions, an evaluation index for WT performance based on overall system efficiency and integral of the absolute error (IAE) are presented to demonstrate the feasibility of the AFLC methodology via traditional approaches.
This article has been structured as follows: section II deals with wind turbine configuration, which contains the machineside converter control (MSC), the controller of the grid-side converter (GSC) and traditional MPPT methods. Section III illustrates the AFLC. In section IV the simulation results are presented. The evaluation indices for WT performance under MPPT schemes are discussed in section V. Section VI illustrates the experimental setup, which consists of DSPACE 1104 controller board. Finally, conclusions are presented in section VII.

II. WIND TURBINE CONFIGURATION
The kinetic energy generated from the wind energy through turbine blades is con-verted to mechanical energy allowing the conversion of this mechanical energy into electrical energy by PMSG as presented in Fig. 1. Using the BTB converter, the generator stator is linked to the network. The BTB converter includes two main sections. The first section is assigned to achieve the maximum power point tracking (MPPT), which is called MSC. The second section t of the BTB converter is called GSC to control the reactive power and maintain constant DC-link voltage. VOLUME XX, 2017 1

A. The Wind Turbine Mechanical Model
The following equation describes the mechanical torque [9]: where, Tm is mechanical torque (N.m), R is the blade length (m), ρ is the density of air for turbine (kg/m 3 ), VW is the wind speed (m/s), β is pitch angle of blades (deg), CP is the power coefficient, λ is tip speed ratio (TSR) and ωr is the wind turbine rotational speed (rad/s). The CP depends on the pitch angle of blades β and TSR λ. The TSR of wind turbine can be specified as: By using equations (1) & (2), it is easy to build the wind turbine model in the form of a schematic diagram as shown in Fig. 1.
The power coefficient can be calculated as follows [9]: where: the wind turbine coefficients c1 to c6 are: c1= 0.5176; c2= 116; c3= 0.4; c4= 5; c5= 21; c6= 0.0068; As can be illustrated in Fig. 2, the Cp and λ relationship is displayed at different pitch degrees. The turbine must work at maximum Cp to ensure maximum power value, which should match the optimum tip speed ratio (λopt). According to WT parameters, the peak power takes place at the point, β =0˚, λopt=8.1 and Cp-max =0.48. So, the maximum value of electrical power is obtained at these values as acquired from Fig. 2.
The stator voltages and expressed in the dq reference frame can be clarified as shown below: where, represent the currents in the d-q axis, Rs is the stator resistance, angular frequency, and are the d-q axis inductance and is the permanent flux linkage.
The electromagnetic torque, , is expressed as follows [26,27]: where, is the permanent magnetic flux. In a surfacemounted PMSG, = = and P is the number of pole pairs. As a result, the electromagnetic torque given by (4) can be rewritten as:

C. Machine-Side Converter (MSC) Control
The MSC is utilized to adjust the generator rotor speed in order to acquire peak power from the accident wind speed. This power happens at maximum power coefficient (Cpmax), that is related to tip speed ratio (λ) and pitch angle (β). To get (Cpmax) as demonstrated in Fig. 2, the Pitch angle "β" must be equal to zero. Also, λ must be held at optimal value of λopt = 8.1.
By this method, if the wind speed varies, the turbine's speed must be adjusted to accommodate variation in wind speed.
Following is motion equation for a typical generator [28]. This is intended to clarify the control concept.
where, J stands for the overall system inertia for the turbine and PMSG (kg.m 2 ), whereas B stands for the friction factor (N.m.s). The electromagnetic torque, , controls the mechanical speed as shown in (5). This torque is controlled by the current and, therefore, this current is controlling the rotor speed as demonstrated in (4). To reduce the current stream for a given torque and hence decrease losses due to resistivity, the current component of the d-axis, , is reduced to zero [29]. The MSC, therefore, has two major loops: an internal loop and an external loop. The internal loop is accountable for current control, whereas the external loop is accountable of implementing the strategy of MPPT as seen in Fig. 3. According to the aforementioned discussion, the mechanical speed, , is compelled to run at reference speed ωref, that is identified accordingly the accident wind speed, to accomplish the optimality of rotation speed (i.e., MPPT is achieved) as seen in Fig. 3

D. Fuzzy-Logic MPPT Control
Performance enhancement of the complex and nonlinear wind system for variable wind speed profile constitute the main contribution of this research. This goal is achieved by using the proposed FLC, which tracks the MPP from the WT system with good dynamic behavior in terms of steady and dynamic response of the system under fluctuating wind conditions and ensures efficient and reliable grid integration of the wind turbine. The proposed FLC is illustrated in Fig. 4. The input quantities of FLC are the mechanical speed error (e) and the change of this error (∆e), the unit time delay is represented by the symbol ( −1 ), and the change in electromagnetic torque (∆Te) is the output. The input and output signal scaling factors are, Ke, K∆e and K∆Te, respectively. There are many methods to implement the scaling fuzzy controller. In this study, the trial-and-error method is applied. It mainly depends on presenting candidate solutions and monitoring their results. If a solution is found to be valid, the task can be considered to be complete. The goal of this strategy is to provide a single solution to the problem as soon as possible. Trial-and-error method is a basic methodology in problem-solving and knowledge acquisition, and it has also been used extensively in product design and experiments. General speaking, the approach proceeds by adaptively posing a sequence of candidate solutions and observing their validity. If a proposed candidate solution is found to be valid, the mission is considered to be accomplished. Otherwise, an error is signaled from one of the characteristics of the studied object. An important feature of the approach is its solution orientation, i.e., the goal is to find one solution, with little care paid to other considerations such as why the solution works. Input and output signal scaling factors of Ke, K∆e and K∆Te, respectively, are used to alteration the sensitivity of the FCL according to the random change of the wind without causing any modification to the control unit structure. There is always an input limitation for FLC so that inputs and output are normalized within In this article, a Mamdani-type fuzzy inference system is applied in the FLC, which consists of three parts: fuzzification, fuzzy inference and defuzzification as illustrated in Figure 5. As demonstrated in Figure 5, FLC composed, in general, of three sections: 1) fuzzification, 2) knowledge base (fuzzy rule base, data base), 3) defuzzification. In the fuzzification process, the input crisp values are converted to fuzzy values, which are realized by linguistic variables, e.g., high, big, medium, slow etc. The fuzzy rules are depended on a set of rules, which depend on IF-THEN rule [27][28]. As conducted in Table 1, the required signals are based on 25 rules of matrix inference, where the membership function determines the relevance between these rules. PS, NS, NB, PB and ZE are abbreviations for Positive-small, Negative-Small, Negative-Big, Positive-Big and Equal-Zero, respectively. The membership functions of the input and output are depicted in Fig. 6. The fuzzy inference mechanism uses Mamdani's max-min implication and aggregation to decrease the controller complication. The defuzzification process is responsible for converting the fuzzy quantity to exact quantity. This process depends on the center of gravity technique to realize the crispy output variable (∆Te) and the reference electromagnetic torque as shown in the following equations [29]:

E. Grid-Side Converter (GSC) Control
GSC is connecting the network to the generator, and it can be said that the principal goal of GSC is to manage the voltage of dc-link under various conditions as seen in Fig. 7. For efficient utilization of the converter's capability and to steady the operating voltage, constant DC-link voltage is essential. Consequently, unity power factor (zero exchange of reactive power) has to be achieved. The grid-side converter control's objective is to maintain the dc-link voltage at the nominal value of 750 V [33].

III. ADAPTIVE FUZZY-LOGIC MPPT CONTROL
Adaptive control is the name given to a fuzzy controller, its tunable parameters such as output scaling factor, fuzzy rule, and membership function varies in response to system changes as shown in Figure 8. It is capable of enhancing performances of the complex and nonlinear wind systems for variable windspeed profile. This goal is achieved by using the proposed AFLC gain scheduling, which tracks the MPP from the WT system with good dynamic behavior in terms of steady and dynamic responses of the system under fluctuating wind conditions and ensures efficient and reliable grid integration of the wind turbine.  The AFLC will also generate two parameters, KP and KI, which will be used to tune the PI controller. Where Ke and K∆e are the AFLC's scaling factors, and it can be seen that the output scaling factor is adjusted by an adaptive process at each sampling time. The AFLC's output is a product with KP and KI. As shown in Equation (14), "e" product with these gains to satisfy the PI controller [30][31][32]

IV Simulation Results
Two case studies of wind speed profiles are performed to confirm the responsiveness of the control system according to the aforementioned AFLC for MPPT compared to another FLC technique and conventional PI. The first state implies that the wind speed profile changes as a step function (up and down) with an average wind speed of 11.28 m/s, whereas the second state assumes that the wind speed profile varies randomly. The system parameters are defined in Table 2.

1) STEP PROFILE
The following figures demonstrate that the best obtained power is utilizing AFLC compared to another technique of FLC and conventional PI. As a result of the used techniques, MPPT is achieved, but the AFLC is the best and it provides the fastest response for the sudden changes of wind speed compared to the other two techniques as shown in all figures. As illustrated in Fig. 9(a), the profile of the wind speed changes depending on step functions over 5 second time span. As displayed in Fig. 9(b) the MSC can control the power coefficient (Cp) to be maintain at its peak value (i.e., 0.48). At 0.9 s and 3.5 s, the AFLC provides faster response than FLC and conventional PI. In Figure 9(c), the tip speed ratio (λ) is compelled to maintain its ideal value of 8.1. Indicating that AFLC responds faster than FLC and conventional PI, the AFLC maintains the optimal tip speed ratio (8.1). Fig. 9(d) shows the rotor speed tracking according to the AFLC utilized for MPPT. As shown, the generator's rotor speed tracks the reference speed, indicating MSC's ability to use the MPPT technique. At t= 2 s, the AFLC has faster response than FLC and conventional PI. Fig. 9(e) depicts the mechanical power generated by a wind turbine, while Fig. 9(f) demonstrates the reactive power forms with its reference, i.e., Qref = 0 var. It is clear that the reactive power value is low compared with the total generated power. The proposed AFLC for MPPT reveals an efficient tracking performance.

2) RANDOM PROFILE
The feasibility of the control system to achieve MPPT is investigated in this section. Actually, the values of wind speed in Egypt differs considerably based on location of wind farm and the height of wind turbine tower at which the wind speed is measured. For example, for Zafarana region, the mean annual wind speed is 9 m/s at a mast of 25 m above ground level [34,35]. In this paper realistic wind speed data are utilized depending on measurements from Ras Ghareb wind farm in the Gulf of Suez, Egypt. Based on Ras Ghareb location, the monthly mean wind speed ranges from 7.5 m/s (January) to 15 m/s (August) [36,37]. With respect to genuine wind speed data measured in Ras Ghareb wind farm in the Gulf of Suez, Egypt, as shown in Fig. 10. The measured data is taken for 8 hour (480 mins) and reprocessed and scaled for 100 s to fit the simulation and experimental requirements. The depicted wind speed profile is displayed as shown in Fig.  11(a). Fig. 11(b) as well as Fig. 11(c) demonstrate that the MPPT is attained since the Cp and λ values are kept at their maximum and optimal values, respectively. The proposed AFLC for MPPT sustains the optimal power coefficient more rapidly and maintains the optimal value of the λ as seen in Fig.  11(b). Fig. 11(d) shows the MSC's capacity to track the rotor speed with its reference value, where the AFLC has faster response than FLC and conventional PI. The mechanical power acquired by the wind is described in Fig. 11(e). On the other hand, Fig. 11(f) demonstrates that the reactive power fed to the grid is close to zero, demonstrating that the system is operating at a unity power factor. Hence, the proposed AFLC for MPPT provides a good solution for achieving the MPPT.

V EVALUATION INDICES FOR WT PERFORMANCE UNDER MPPT SCHEMES
The following equation is used to estimation the PMSG wind generation system efficiency [38]: where is the system efficiency, is the power of grid and ℎ is the theoretical mechanical power. For conciseness, the efficiency of the system is investigated for wind speed profile considered in case (A) (Fig. 9 (a)). As demonstrated in Fig. 12, the theoretical power is compared to the grid active power with AFLC, FLC and conventional PI schemes. Fig. 13, demonstrates the good response of the GSC controller, because voltage and current on the grid are in phase. Consequently, unity power factor operation is achieved. Fig. 14 illustrates the system efficiency with AFLC, FLC and conventional PI. As seen from Fig. 13, the efficiency of wind turbine system is improved with AFLC system compared with FLC and conventional PI. The average value of the efficiency during this period is increased to 93.1% with AFLC scheme compared with 92% for the FLC scheme and, 85.44% for the conventional PI scheme. In addition, a quantitative comparison of tracking errors using the integral of the absolute error (IAE) for the best evaluation of the AFCL control method is introduced as follows: Table 3. illustrates a comparison of tracking errors of conventional PI, FLC, and AFLC based on MPPT controllers. The AFLC has the lowest error when compared with the other two controllers. Consequently, the AFLC is the best solution of MPPT achieved.

VI. EXPERIMENTAL SETUP
In order to confirm and demonstrate the correctness of hardware results of the PM synchronous generator-based wind turbine for all wind speed profiles, the real time DSPACE 1104 control board is implemented with Real-Time Interface (RTI) block set libraries [33]. The control system is based on the DS1104 controller board developed by DSPACE as shown in Fig. 15. A special chart is enclosed in the personal computer (PC) to perform and confirm the data transfer between the software and the hardware parts. The hardware part of the control board affords both application management and generates PWM control signals. Therefore, the PWM signals were generated by the DS1104_DSP_PWM3 block. The software part is based on a modeling tool in MATLAB/Simulink  program [39,40].
The AFLC was initially modeled and simulated using MATLAB (

A. Controller Board (DSPACE DS1104)
The controller board DS1104 is a standard board that facilitates the connection with a PCI slot of a PC (shown in Fig. 16). It is actual-time control system that is based on power PC floating-point processor running at 250 MH [41]. From Fig. 16, the DS1104 comprises a slave-DSP subsystem based upon the TMS320F240 DSP microcontroller. Advanced graphical I/O of the system can be achieved by using the control desk interface. The combination of both DSPACE and MATLAB/Simulink  platform provides a good and robust environment in order to check and confirm the efficiency of the system. Besides, the control desk software can be utilized to install the model's block diagrams in the Simulink program, and build the code of model by Simulink coder. The flowchart of the experimental setup configuration is depicted in Fig. 17

B. Hardware Simulation Results
In order to validate the WECS model with a BTB converter accompanied by the control system, a practical solution is being carried out. Developed by DSPACE, the control is based on the DS1104 board. The built-in chart in the PC ensures the flow of information between the software and the hardware section in the form of a map that facilitates the interfacing process [41]. The variable speed wind turbine-based on PMSG is tested experimentally using various wind speed profiles by means of WTE. In addition, the simulation model is realized by MATLAB software and the performance response is compared. The per-unit system is utilized to normalize the obtained results and enable the comparison of theoretical and practical results with applying AFLC for MPPT strategy of the system. The hardware used in the laboratory for co-simulating the wind energy conversion system as demonstrated in Fig. 18. Table 4 illustrated the experimental parameters of the system.

1) STEP PROFILE
The graphical interface is established under Control Desk 5.1 with DS1104 RTI. Using this graphical interface, it is possible to resume the results obtained during the system's hardware simulation. The wind speed varies from 8 to 14 (m/s), where the wind speed transitions take place at times t= 0.9s, 2 s, and 3.5 s as displayed in Fig. 19 (a). Cp value is held at its peak value, i.e., Cp=0.48, even during major variations in wind speed as demonstrated in Fig. 19 (b). Tip speed ratio is displayed in Fig. 19 (c), however Fig. 19 (d) and Fig. 19 (e) illustrate the mechanical speed and active power, respectively. The mechanical speed is controlled with variation of wind profile. Generally, the actual and reference values of the turbine rotor speed are in good agreement. When the wind speed rises, the mechanical power also rises. The behaviors of the three-phase currents embedded in different tests are clarified in Fig. 19(f). Fig. 19 (g) demonstrates the reactive power Q, which is close to zero. Checking the results attained, compared to the simulation results under Simulink/MATLAB  Software, ensures that the results of the hardware co-simulation are acceptable. According to the following results, the system response is enhanced, and better tracking capability is obtained when AFLC is applied compared to FLC.

2) RANDOM PROFILE
In this case, the control system's feasibility to achieve MPPT is studied based on random variations in wind speed. The wind speed variations are real values observed in Ras Gharib region with a new value every four hours approximately over the course of a whole month, as demonstrated in Fig. 20 (a). The mechanical speed curve is shown in Fig. 20 (b), which follows the same wind speed profile except at sudden changes, where the moment of inertia appears. Fig. 20 (c) and Fig. 20 (d) demonstrate the Cp and λ, where Cp is held at its peak value, i.e., Cp=0.48 even during major variations in wind speed. When the wind speed rises, the mechanical power also rises as demonstrated in Fig. 20 (e). The three-phase currents behavior underlying different tests is seen in Fig. 20 (f). The reactive power (Q) is demonstrated in Fig. 20 (g). Checking the results attained, compared to the simulation results under Simulink/MATLAB  Software, shows that the results of the hardware co-simulation are acceptable. Based on the following results, the system response is enhanced. Better tracking capability is observed and the oscillation rate is reduced when AFLC is used compared to FLC.