Rule matrix for first FLC.

## Abstract

The high risk in developing a more advanced wind power generator with scientific and technological know-how, heavy loss in maintaining the accessories of a wind plant and stochastic nature of wind energy make the maximum energy retrieval questionable, but still optimum wind energy extraction can be achieved by operating the wind turbine generator (WTG) in a variable-speed, variable-frequency mode with different types of wind electric generators (WEGs). In this chapter, maximum power from wind using permanent magnet synchronous generator (PMSG) is made possible by using intelligent controllers, namely fuzzy logic controllers. The chapter also discusses the simulated results obtained from modeling, simulation, and analysis of this PMSG-based wind energy conversion system (WECS) for both open- and closed-loop control strategies. PMSG suffers drastically from load and strong decay of magnetic field, which tends to reduce the generated voltage at the stator terminals, making it difficult for isolated operation and thus the whole analysis is done with grid-connected network. The other major limitations include loss of flexibility in field flux control, hence intelligent techniques like fuzzy logic mechanism are attempted along with space-vector modulation (SVM) to have a smooth control of field flux and load power management in PMSG.

### Keywords

- PMSG
- FLC
- SVM
- WECS
- WTG
- power quality

## 1. Introduction

Nowadays, though there is an enormous degree of power production and energy conservation, there is a void which could be filled by familiarizing renewables into the power market. The major renewable energy sources include wind, solar, fuel cells, geo-thermal, tidal waves, and biofuel systems; by analyzing the pros and cons of all these sources, wind and solar energy seem to be economically accessible and less prone to pollution and thus becomes inevitable. Gearless construction with a total elimination of DC excitation system, compactness in yielding maximum power extraction, smooth grid interfacing, and ease in handling fault ride make PMSG the most sought appliance in wind power industry.

Since wind speed and wind power associated with wind force is not constant, the torque developed is not constant as well. Therefore, whenever PMSG is coupled with wind turbine, the output voltage generated varies in both frequency and magnitude. In order to synchronize load bus with grid of fixed frequency AC, the power output of PMSG is converted to DC and then inverted to 50 Hz AC. In addition, the change in DC-link voltage fluctuates in an uncontrolled manner, which has to be regulated by suitable modulation strategy applied to the inverter on grid side.

Considering these facts, a summary of the literature survey has been included to compare the research outcomes carried out so far on PMSG-based WECS. Various control strategies along with the modeling of PMSG were analyzed in order to control DC-link voltage, output power and pitch of the turbine in these articles elaborately [1, 2, 3, 4]. Several maximum power point tracking (MPPT) algorithms were used to obtain the maximum power from the high-power turbines [5, 6, 7, 8, 9] with a simple and effective controller to ensure smooth control over voltage, frequency, and power output. The performance and analysis of an ultra-large wind turbine using validated models of mechanical and electrical systems of a wind turbine have been conducted under various conditions of step changes in wind speed generated by TurbSim [10]. A multipole PMSG model with maximum power point tracking (MPPT) mechanism was developed to extract maximum power in this paper [11]. Vector control and sliding mode control techniques were implemented to maximize the electromagnetic torque to regulate the DC bus voltage and concluded that PMSG was the best for wind power generation systems with good performance characteristics of speed, flux, and torque [12].

Various control algorithms were proposed and implemented to control the speed of PMSG with respect to wind speed in both generation and grid side to maintain the power flow [13, 14, 15, 16, 17]. PMSG performed well for step changes of load while implementing direct torque control (DTC)-based space-vector modulation, and the regulation of power factor was quiet good [18, 19]. Sensorless control strategies were compared with various modeling techniques, and simulation results were analyzed in these articles [20, 21, 22, 23].

The two modulation techniques, namely sinusoidal pulse width modulation (SPWM) and space-vector pulse width modulation technique (SVPWM), are compared, and the resultant voltage space vector is found to be rotating consistently at synchronous speed with a magnitude 1.5 times greater than the peak value of the phase voltage [24]. The maximum power is obtained using the SVPWM modulation technique with the DC-link voltage kept at stable level to obtain decoupled control of active and reactive power. The DC voltage utilization ratio is around 71% of the DC-link voltage as compared to the conventional sinusoidal pulse width modulation which is found to be 61.2%. Space-vector PWM generates less harmonic distortion in the output voltage/current waveform in comparison with a sine PWM [25].

In this paper [26], the simulated results show that the proposed Fuzzy-PI controller is very effective in improving the transient stability of overall wind farm systems during temporary and permanent fault conditions. The main advantage of the proposed MPPT method in [27] is that there is no need of measuring wind velocity and generator speed. As such, the control algorithm is independent of turbine characteristics, achieving the fast dynamic responses with nonlinear fuzzy logic systems.

With the use of PI controller, the harmonic spectrum (THD) for load voltage and load current are found to be 1.31 and 37.92%, respectively. The harmonic spectrums for load voltage and load currents with fuzzy logic are 0.47 and 35.72%, respectively. Simulation results and harmonic spectrum obtained in [28] demonstrate that the fuzzy-based controller works very well and shows very good dynamic and steady-state performance. The research contributions of this technical article [29] deals with the development of single-ended primary-inductor converter (SEPIC)-based FLC-WECS which can maintain constant voltage at the output with minimized ripple content and improvement of dynamic response using fuzzy logic controller.

This paper [30] focuses on robust control based on T-S approach that allows tracking of rotational speed, stator current, and voltage references which correspond to the optimum power and therefore operate with the maximum power.

Here, this chapter discusses open-loop as well as closed-loop method with intelligent controller, and it is confirmed that sufficient revenue could be generated from it by implementing the same in real time with very little computation. The following sections dealt in detail about modeling of PMSG based WECS with its simulation, open-loop and closed-loop control with fuzzy logic technique and concluded with the note that the generated power exceeds load power, hence apart from meeting the load demands, it supplies the battery load in addition.

## 2. Modeling and simulation of PMSG-based WECS

The configuration and control schematic of PMSG-based WECS are depicted in Figure 1 . The captured kinetic energy of wind rotates the generator rotor and cuts the magnetic field set by the stator and thus produces electric power. The generated AC output voltage is converted into DC using bridge rectifier, and again back to AC by means of DC/AC inverter. A DC-link voltage is connected in between the generator and grid-side converters/inverters.

Voltage-fed, current-controlled inverter with insulated-gate bipolar transistor (IGBT) as a switching device is used to control and synchronize both the stator output voltage and frequency with the grid components. The stator voltage is stepped up by a transformer and passed to the network through a point of common coupling (PCC) where the injection of wind power has an impact on voltage magnitude, its flicker, and its output waveform. The magnetic core losses are minimized by the inclusion of a transformer to increase the overall efficiency.

This section presents several modules like model of PMSG, a model of rectifier, a model of boost converter, and a voltage-fed inverter model with SVPWM along with voltage vectors. The major system variables continuously monitored and controlled generate optimal power at different wind speeds by PMSG and thus active and reactive power are injected into the grid and to the DC bus.

The control of rectifiers and converters is done by sinusoidal PWM control technique at the generator-side control, while the grid-side inverter control includes SVM technique. The dynamic model of PMSG with its rotor speed control system is represented by the equations of generator in a reference coordinates system rotating synchronously with the magnetic flux. Since the stator current vector is represented by rotor flux with respect to *d-q* axis reference system, *id *, *iq *and the electromagnetic torque are related with each other through this vector. The magnetic axis of the rotor is fixed as reference for spatial orientation of fictitious rotor windings.

Considering the inductances *Lds *and *Lqs *in the stator of the generator which are equal along the direct and quadrature axes, respectively and *Lds *= *Lqs *= *Ls *at steady-state condition, the stator equations in terms of *d* and *q* axes are given in Eqs. (1) and (2) as

where *Lls *is the leakage inductance of the stator referred to *d* and *q* axes.

PMSG is modeled by using derived mathematical equations and simulated using SimPower Systems library available in MATLAB/Simulink. The simulation is carried out for a grid-connected PMSG in both open- and closed-control modes. Each and every individual model is integrated to analyze the complete system behavior. Since wind power is unreliable, the PMSG output is not stable. Hence, to synchronize the generated output voltage with the inverter frequency, PLL is used. The generator is directly connected to the grid through a full-scale back-to-back power converter.

The power converter decouples the generator and the grid. In addition, this full-scale power converter allows full controllability of the entire system. Both the generator/machine and grid-side converters operate in rectifier or inverter mode and thus maintain the bidirectional power flow. The generated three-phase AC voltage is stepped up and passed through the utility grid. The generator/stator-side converter mainly controls the speed of generator to obtain the maximum power output even at low wind speeds. The grid-side inverter maintains DC-link capacitor voltage constant and controls the reactive power delivered to the grid. The DC link created by the capacitor in the middle is required to sustain stabilized generator output to connect the power grid through an inverter circuit. It decouples the operation of both the converters, thus allowing their design and operation suits for optimization. The full-scale back-to-back converter makes constant voltage possible and fixed frequency on grid side though the rotor runs at varying speeds. The two back-to-back converters are controlled independently through decoupled *d*-*q* vector control approach.

A three-phase permanent magnet synchronous machine with sinusoidal back EMF of rated capacity 12 kW, 560 V, and 1700 rpm has been taken for analysis. The average wind speed is set as 9 m/s and subject to change between 5 and 12 m/s; it is done by either setting the limits in the saturation block or setting the limits of step input. The outputs of this block are mechanical torque *Tm *, mechanical power *Pm *, power coefficient *Cp *, and the tip speed ratio *Z*. The mechanical torque is multiplied with gain to get an electrical torque. The electromagnetic torque developed is the main source of input to rotate the PMS generator and hence to measure phase currents in the rotor terminals. It includes subsystems of PMSG with its rectifier circuit, a three-phase uncontrolled diode full-bridge type. The performance of PMSG with its steady-state and transient-state parameters has been analyzed for both open-loop and closed-loop control modes in the following sections.

As PMSG is a variable speed generator and coupled with the wind turbine without gearbox, it is not that much difficult to control the rotor speed in open-loop control method. The generator model is represented in synchronously rotating *d-q* reference frame. The back-to-back voltage source converters (VSC) are controlled independently through decoupled *d-q* vector control method. The generator-side converter regulates the speed of PMSG to implement MPPT control, that is, the electromagnetic torque of PMSG is controlled with respect to generator speed such as to achieve maximum power point. The speed control is realized through field orientation where the *q*-axis current is used to control the rotational speed of the generator with respect to the varying wind speed. In order to obtain maximum torque per ampere and to minimize the resistive losses in generator, the *d*-axis current is set to zero, while the *q*-axis current reference is determined by the power controller. A random source with multiplier is used to adjust wind speed to get 12–15 m/s. The model of PMSG in open-loop control mode with rectifier and two boost converters along with the inverter has been shown in Figure 2 .

The magnitude of output voltage at stator terminals increases and the generated stator voltage is used to meet the load demand. The DC-link voltage in the intermediate stages is boosted up and measured. Whenever there is a low wind speed, back-to-back power converter draws more power from the grid to drive the generator such as to provide high startup torque. This converter decouples the wind turbine and grid, regulates the operational speed of wind turbine generator, and controls the active and reactive powers injected into the grid, thus improving the power quality.

As the voltage and frequency of generator output change along with the variations of wind speed change, the generator-side boost converter is used to track the maximum wind power. To maintain a constant switching frequency within the converter, the *d*- and *q*-axis currents are controlled indirectly through a current-regulated voltage source PWM converter. The *d-q* voltage control signals of the converter are obtained by comparing the *d*- and *q*-axis reference currents with the actual *d*- and *q*-axis currents of the stator. Final control action is done with *d*- and *q*-axis voltage control signals. Thus, generator/machine-side converter controls PMSG to achieve optimum energy extraction from the wind.

## 3. Open-loop control of PMSG-based WECS with SVM

In order to achieve variable speed operation in PMSG with the maximum power efficiency, the inverter voltage should be regulated. SVM-based grid-side inverter has been implemented to maintain the inverter voltage constant irrespective of the wind speed variations. Space-vector modulation is used to enhance the inverter voltage by selecting a revolving voltage reference vector. Eight voltage vectors in a complex αβ plane, among them six active nonzero vectors (V_{1}–V_{6}) and two zero vectors (V_{0} and V_{7}), form the look up table such as to vary the switching time of the inverter.

The main idea of this control is to transfer all the active power generated by the wind turbine to the grid and to produce no reactive power such that unity power factor is obtained. The expression for active power in *d-q* reference frame is given in Eq. (3) as

The active power is the power which is transformed to electromechanical power by the machine and expressed in Eq. (4) as

Also, the active power is found by Eq. (7) given as

The relationship between ω_{r} and ω_{m} is expressed as in Eq. (8)

where

*vds*,*vqs*: voltages in*d-q*axis reference frame w.r.t stator*ids*,*iqs*: currents in*d-q*axis reference frame w.r.t stator*ϕds*,*ϕqs*: flux linkages in*d-q*axis reference frame w.r.t statorω

_{e}: electrical angular speed of stator flux in rad/sω

_{r}: electrical speed of rotor in rad/sω

_{m}: mechanical speed of rotor in rad/sP: number of poles in the machine

Further, the generator torque is controlled by quadrature current component directly. Active and reactive power control is achieved by controlling direct and quadrature current components at the stator terminals, respectively. The operation and control of grid-side inverter is quite similar to that of controlling the rotor-side converter at the generator end. Two control loops are used to control the active and reactive power, respectively. An outer DC voltage control loop is used to set the *d*-axis current as reference for active power control. This assures that all the power coming from the rectifier is instantaneously transferred to the grid by an inverter.

The simulated results of PMSG-based WECS for the open-loop control mode have been depicted in Figure 3 from (**a–f**).

From the simulated outputs, it is observed that the electromagnetic torque dips to a negative value of 100 N-m with the rotor speed at 200 rad/s. The negative sign implies that the machine was operated as a generator. The stator current gradually builds up, and, after 0.9 s, it settles down, while the stator *d-q* axis current peaks and gradually attains its steady state value of −100 A when time elapses.

The electromagnetic torque rises and maintains at a constant value. The idea of inserting boost converter stages in between the DC link is to effectively increase the generated AC output voltage. The generated voltage gets rectified, doubled up in first converter and raises triple-fold in the second converter and reaches to 600 V. In Figure 3g , it is clear that the magnitude of real and reactive power at the stator terminals and load bus almost reaches their nominal value within the stipulated time interval of 1 s.

## 4. Closed-loop control of PMSG-based WECS with fuzzy logic controller

Since there is no rotor coil to provide mechanical damping during transient conditions, the operational behavior of PMSG is poor in open-loop scalar V/Hz control. In order to improve the operational characteristics, to obtain a faster response, to optimize power to a greater extent, and to mobilize load power management, closed-loop control of PMSG has been attempted. Though often conventional PI controllers are preferred, due to their simple operation, easy design, and effectiveness towards linear systems, it generally does not suit for nonlinear systems of higher order, time-delayed, particularly complex, and vague systems that have no precise mathematical models.

To overcome these difficulties, fuzzy logic controllers are introduced along the intermediate stages which lie between the generator and grid.

The proposed system includes wind turbine with PMSG constituting a diode rectifier, two boost converters, two fuzzy logic controllers, an inverter, a battery, and a dump resistor. The generated AC voltage passes through the rectifier and gets converted into corresponding DC voltage. Two boost converters are used to boost the rectified output voltage obtained from PMSG and passed through the inverter through DC link. The block diagram of closed-loop control of PMSG with fuzzy logic controller is shown in Figure 4 . The DC voltage is converted into three-phase AC voltage using a voltage source inverter comprising more number of metal-oxide-semiconductor field-effect transistors (MOSFETs) and is connected to RL load. Fuzzy logic controllers are used particularly to track the maximum power point and to promote power management. If fine and favorable wind condition prevails, and the wind speed is within the cutoff region, this autonomous wind system can meet the required load demand. On the other hand, if there is excess wind power meeting the load demand, the surplus power generated would be stored either in a battery or dissipated through dump resistor according to the battery condition.

Two fuzzy logic controllers (FLCs) are used to control the duty cycle ratio of the boost converters located near the stator side of PMSG. The first fuzzy controller is used to get MPPT by varying the duty cycle of the first boost converter, thereby increasing stator voltage of the generator.

By varying the duty cycle of boost converters, the rotor speed of PMSG is controlled to achieve optimum power. To manage energy production, another fuzzy logic controller is included such as to vary the duty cycle ratio of second boost converter and thus to regulate the DC output voltage and decide the moment to either charge/discharge the battery or dissipate excess energy to the dumb resistor. With this proposed controller, wind energy is primarily provided directly to load without going through a passive element (battery). As a result, the number of charge/discharge cycles is greatly reduced, thereby extending the battery life. The Simulink model of this closed-loop control of PMSG with fuzzy logic is shown in Figure 5 .

The first fuzzy logic controller tracks rotor speed with respect to reference speed to extract the maximum power, that is, in search of suitable generator speed which results in maximum power output. Error in speed (e) and the derivative of speed error are given as inputs and the duty cycle of the first boost converter as output is fed to the FIS editor of the first fuzzy logic controller. Figure 6 shows the sketch of FIS editor used in the first FLC which is of Mamdani type. The duty cycle of the boost converters is changed such that the Ton and Toff periods may either increase or decrease.

Figure 6a shows the sketch of FIS editor used in the first fuzzy logic controller. The fuzzy rules are framed using “If…Then” statements with “and” operator. The membership functions of input and output variables used in the FIS of the first FLC are represented in Figure 6b–d .

The reference speed of the generator rotor has been taken as 1700 rpm. Fuzzy rules are formulated in a way that when the actual speed and reference speed of the rotor are almost the same, there is no need of changing the pulse width of the boost converter. The rule matrix for the first FIS editor is given in Table 1 .

This type of FLC is mostly used in closed-loop control system, as it reduces steady-state error to zero to a greater extent. A set of 21 rules has been formulated considering the linguistic terms for the input speed error as NB, N, NS, Z, PS, P, and PB and the derivative of speed error as Negative, Zero, and Positive. Likewise, the linguistic terms used for the output of duty cycle of the first boost converter are PBB, PP, PSS, ZZ, NSS, NN, and NSS. The defuzzified outputs are viewed through rule viewers from the respective FIS editors.

It is explained in a manner that if the actual rotor speed is 700 rpm, the speed error becomes “Negative Big” (NB) and say, the error derivative is “Negative,” then the duty cycle of the first boost converter must be “Positive Big Big” (PBB). If the actual rotor speed becomes 1000 rpm, the speed error becomes Negative (N), and the error derivative is “Negative,” then the duty cycle of the first boost converter must be “PBB.”

If the actual speed reaches 1500 rpm, the speed error is Negative Small (NS), the error derivative is “Negative,” the duty cycle of the first boost converter must be “Positive” (P). If the actual speed exceeds the reference speed, and hence the speed error becomes “Positive Small” and the error derivative is “Negative,” then the duty cycle must be “Positive Small Small” (PSS).

The second fuzzy logic controller is exclusively used for regulating the DC-link voltage by properly changing the duty cycle ratio of inverters and changing ON and OFF periods of power switches, and thus raising the power salvage. As in Figure 7a , the two inputs used in the second FIS editor are change in power and State of charge (SoC) of the battery. Three outputs considered are duty cycle of the second boost converter, position of switch S_{1}, and the position of switch S_{2}. The position of switch S_{1} decides whether to connect or disconnect the battery to the system according to the status of the battery and the amount of excess power generated.

Position of switch S_{2} determines the addition of dump resistor in the main circuit. The PWM output from each of the fuzzy logic controller serve as gating pulses for these boost converters and then to the switches too. The rules were formulated for the FIS editor of second fuzzy logic controller in such a way that if there is a change between generated power and the load power, along with the change in the SoC of the battery, duty cycle of the boost converter, position of switch S_{1} and the position of switch S_{2} are to be changed.

For example, If the change in power is “Negative” and SoC of the battery is “empty,” then the duty cycle of the second boost converter is “VB” (Ton period is large and Toff is small), the position of the switch S_{1} should be “opened,” and the position of switch S_{2} should also be “opened.” If the change in power is “Negative” and the SoC of the battery is “average,” then also, the duty cycle of the second boost converter is “VB,” the position of the switch S_{1} should be “opened,” and switch S_{2} should be “opened.” If the change in power is “Negative” and the SoC of the battery is “full,” then the duty cycle of the converter is “VB,” the position of switch S_{1} should be “opened” and position of switch S_{2} is “opened.”

If not, for other conditions, the change in power is either “Positive,” or “Positive small,” or “Positive big,” the duty cycle of the second converter, position of switch S_{1}, and position of switch S_{2} as “opened” or “closed” and varied correspondingly. The linguistic terms used as inputs and outputs are stated as follows:

For the inputs of change in power as N, PS, P, and PS, and battery’s state-of-charge (SoC) as empty, average, and full, the corresponding outputs, namely duty cycle of second boost converter as VS, S, M,B, and VB, position of switch S_{1} and switch S_{2} as opened and closed with their membership functions are shown in Figure 7 .

By framing 36 fuzzy “if-then” rules, the duty cycle of the second boost converter is changed and position of switches being altered to prevent wastage and dissipation of power in loads. For analysis, it has been taken such that the load power to be met is around 6 kW and the wind power fluctuates between 5.1 and 6.5 kW. Initially, it is assumed that the wind power is 5.1 kW. If the change in power is “negative” and the SoC of the battery is “empty,” then the duty cycle of the second converter should be “Very Big” (VB). If the change in power is “negative” and SoC of the battery is “average,” then the duty cycle of the second converter should be “VB.” If the change in power is “negative” and the SoC of the battery is “full,” then the duty cycle of the second converter should be “VB”. Conversely, if the generated wind power is very less compared to load power, it is taken that the change in power is “Negative” (5.1–6 kW).

If the obtained wind power exceeds load power, that is, 6.1 kW, then it is understood that the change in power is “Positive Small” (PS) (6.1–6 kW). Similarly, if the wind power and the load power are equal, then it is taken that the change in power is “Positive” (6.0–6 kW) and, accordingly, the other such rules are formulated. Again if the wind power is 6.5 kW, then it is implicit that the change in power is “Positive Big” (6.5–6 kW), and hence the duty cycle is “small,” switch S_{1} is closed to connect the system with battery and switch S_{2} is opened ( Table 2 ).

The steady- and transient-state characteristics of the closed-loop control mode of PMSG with fuzzy logic controller through which the most important parameters derived are depicted in Figure 8 from (**a–f**).

## 5. Conclusion

From the simulated results, it is observed that the load requirements are directly met by the generated power itself but not by the battery power when the wind power is plenty. The mechanical power reaches its nominal value of 11.3 kW. The simulated results for both open-loop and closed-control modes have been compared and tabulated in Table 3 . The generated power P at the load bus terminals for closed-loop control mode is greater than the power attained in the open-loop control mode.

Also, it seems that there is a steady increase in the output power, while it is fluctuating in the open-loop control mode with respect to the wind speed. According to the variations in the wind velocity, there is a remarkable change observed in the output power generated in bus 1. When the wind speed is of 8 m/s, the power generated attains 5 kW while it fluctuates between 9 and 11 m/s, there is a gradual increase in power. It reaches nearly the peak value of 14 kW, which is undesirable as wind speed goes beyond 12 m/s.

When the wind speed fluctuates between 8 and 12 m/s, the reactive power is zero initially and reaches a constant value of 2200 VA in its steady state. The speed curve of the rotor attains its steady-state value when the time t is 0.5 s. Also, it is observed that the terminal voltage in the stator in all three phases is regulated and boosted up to 330 V in the first stage and then to 635 V in the second stage, and the three-phase stator current is found to be around 25 A.

During the closed-loop control mode, though drastic change in the power has not been observed in the boost converter stages, the generated power exceeds the load power, and hence apart from meeting the load demands, it supplies the battery load which is clearly visible from its charging current. Also, the battery voltage is getting its full rated value of 670 V. Further, the generated stator voltage is boosted up, and hence optimum power is observed in both grid and loads, that is, the generated voltage at the stator terminals gradually builds up and attains its steady-state value after 0.9 s. The magnitude of generated power at the load bus seems increasing around 10.4 kW while reactive power reaches 1725 VA but with some ripples. The mechanical power also gets its steady value of 11.2 kW within a time frame of 1 s.

In addition, the load power management is excellent in closed-loop control method using fuzzy logic controller. Also, if the generated power is found in excess, it would be stored in the battery for future power salvage. There is a notable increase in the magnitude of stator voltage and hence the generated power; ripples are considerably reduced compared to open-loop control mode, thus improving the power quality as well.