A Design Fuzzy Logic Controller for a Permanent Magnet Wind Generator to Enhance the Dynamic Stability of Wind Farms

In this paper, a design fuzzy logic controller for a variable speed permanent magnet wind generator connected to a grid system through a LC-filter is proposed. A new current control method of grid side conversion is developed by integrating the fuzzy controller, in which both active and reactive power, delivered to a power grid system, is controlled effectively. The fuzzy logic controller is designed to adjust the gain parameters of the PI controllers under any operating conditions, so that the dynamic stability is enhanced. A new simple method, based on frequency response of the bode diagram, is proposed in the design of the fuzzy logic controller. To evaluate the controller system capabilities, simulation analyses are performed on a small wind farm model system including an induction wind generator connected to an infinite bus. The simulations have been performed using PSCAD/EMTDC. Simulation results show that the proposed control scheme is more effective for enhancing the stability of wind farms during temporary and permanent network disturbances and randomly fluctuating wind speed, compared with that of a conventional PI controller.


Introduction
Due to the problem of global warming, utilization of distributed generation systems, which are connected with a distribution grid system, has been of interest and has received considerable attention in recent years.As the distributed generation can be located close to load consumers, it can have some merits: increasing the available power, improving the overall system reliability, lowering cost, reducing emissions and expanding energy options [1].It is well known that wind power is one of the distributed resources.However, connecting wind turbine generators to a distribution grid system leads to stability problems due to the output power fluctuation.Therefore, it is very important to analyze a suitable control system for wind generators connected to the grid.
The wind turbines can be Fixed Speed Wind Turbines with Induction Generator (FSWT-IG) or Variable Speed Wind Turbines with Permanent Magnet Synchronous Generator (VSWT-PMSG).The FSWT-IG has the advantages of mechanical simplicity, low specific mass, robust construction, and cost efficiency [2].However, its disadvantages are a limited ability for power quality control and terminal voltage fluctuation under steady state condition, due to the uncontrollable reactive power consumption [3].The VSWT-PMSG is a promising and attractive type of wind turbine concept, in which PMSG can be directly driven by a wind turbine and is connected to the power grid system through the AC/DC/AC power converter.The advantages of VSWT-PMSG are: (1) No gearbox and no brushes, and thus higher reliability; (2) No additional power supply for excitation; (3) The converter permits very flexible control of active and reactive power in cases of normal and disturbed grid conditions [4,5].Therefore, a combined installation of VSWT-PMSG and FSWT-IG in a wind farm can be efficient due to reduced system investment cost.However, the PMSG has a more complex generator construction and more complicated controller system compared with FSWT-IG.Hence, the design and analysis of the power converter controller system still needs to be improved.
The AC/DC/AC converter of PMSG consists of a stator side converter and a grid side converter linked by dc circuit.The grid side converter has an important role in ensuring the active and reactive power delivered to the network effectively.Parameter change in the grid system can lead to a significant impact on the stability of the control system performance, especially under fault conditions.The deviation of grid system impedances can cause change in the stability gain margin and phase margin of the control system.In addition, the converter is operated at high switching frequencies between 2-15 kHz resulting in high order harmonics, which can disturb sensitive load on the grid and generate power losses [6,7].To reduce harmonic currents injected to the grid, LC filter is an attractive solution because of its many potential advantages, such as higher harmonic attenuation and smaller inductances compared with an L filter [8].However, the resonance frequency of the filter can cause stability problems in the control system performance.Hence, determination of gain parameters should be performed carefully in the design process.
Traditionally, the conventional PI controller is a very common in the control of the power converter of PMSG because of its simple structure and good performance in a wide range of operating conditions.PI controllers are simple but can not always effectively control systems with changing parameters or strong nonlinearities, and they may need frequent online retuning of their parameters [9].Integration of a fuzzy logic control with a conventional PI controller could be an effective way to solve the problem of system parameter change.The fuzzy logic control can be used to adjust the gain parameters of the PI controller for any operating conditions.Hence, a good control performance can be achieved.However, the membership function of the fuzzy set should be carefully determined in the controller design.It is difficult to achieve an optimal controller performance by using a trial and error method.
Based on the view above, design fuzzy logic controller for the grid side converter of PMSG is proposed, in order to enhance the dynamic stability of a small wind farm including FSWT-IG connected to a grid system.To reduce harmonics injected into the grid, the installation of an LC filter is also considered.Section 2 describes VSWT-PMSG and LC filter models used in this study.Section 3 describes the control system of VSWT-PMSG.Section 4 describes a new design method of a fuzzy logic controller for PMSG.Section 5 describes the simulation results in transient and steady state conditions.Finally, Section 6 presents some conclusions regarding this work.

Variable Speed Wind Turbine Model
The mechanical power output of wind turbine captured from the wind power can be calculated as follows [10]: where P w is the captured wind power (W), ρ is the air density (kg/m 3 ), R is the radius of rotor blade (m), V w is wind speed (m/s), and C p is the power coefficient.The value of C p is depended on tip speed ratio (λ) and blade pitch angle (β) based on the turbine characteristics as follows [11]. , with where c 1 to c 6 denote characteristic coefficients of wind turbine (c 1 = 0.5176, c 2 = 116, c 3 = 0.4, c 4 = 5, c 5 = 21 and c 6 = 0.0068) [11].
The Cp-λ characteristic for different values of β is shown in Figure 1.It is seen that the optimum value of C p (C popt = 0.48) is achieved at λ = 8.1 with β = 0°.This value of λ is set as the optimal value (λ opt ). Figure 2 depicts the characteristic between the turbine power output and the rotor speed for different wind speeds where the blade pitch angle is set at 0°.The maximum power output (1 pu) of wind turbine is obtained at 12 m/s of wind speed and 1 pu of rotational speed.In variable speed wind turbine, the rotor speed of wind turbine (ω r ) is measured in order to determine the Maximum Power Point Tracking (MPPT).The maximum power (P mppt ) can be calculated without measuring the wind speed as expressed in Equation (4) [12].The reference power (P ref ) is limited within the rated power of generator.

Permanent Magnet Synchronous Generator Model
The dynamic model of PMSG in the d-q rotating reference frame can be expressed by the following Equation ( 5) and Equation (6) [13]: where V sd and V sq are stator voltages, R s is the stator winding resistance, I sd and I sq are stator currents, ω e is the generator rotational speed, ψ sd and ψ sq are the stator flux linkages, L sd and L sq are leakage inductances of the stator winding, L md and L mq are magnetizing inductances, and ψ m is the permanent magnet flux linkage.By substituting Equations ( 7) and (8) into Equations ( 5) and ( 6), the differential equations of PMSG can be obtained as follows: where L d = L sd + L md and L q = L sq + L mq .
Active and reactive powers of PMSG are expressed as follows: (11) (12) and the electrical torque of PMSG can be obtained by Equation (13), where p is the number of poles.
Based on the above equations, a dynamic block diagram of PMSG in the d-q rotating reference frame can be derived as shown in Figure 3, where s denotes a Laplace operator.

LC Filter Model
Switching frequency of the converter involves high order harmonics that can disturb sensitive equipment in the grid system [7].In order to reduce the current harmonics, the LC filter is considered in this paper.To avoid the resonance, a passive damping resistance should be allocated in series with a filter capacitor on the filter.Therefore, in designing the converter controller system, a passive damping resistance should be considered in the model system plant.
Equivalent circuit of single-phase LC filter including transformer impedance is shown in Figure 4.The LC filter is composed of an inverter side inductance (L i ) and its parasitic resistance (R i ), a filter capacitor (C f ), and a damping resistance (R d ).Transformer impedance consists of leakage inductance (L g ) and resistance (R g ).V i and I i are voltage and current on the converter side of the LC filter.V g and I g are voltage and current on the grid side of the transformer.It should be noted that V cf is a voltage on the filter capacitor (C f ).Differential equations of the grid connected LC filter in d-q rotating reference frame can be written as Equations ( 14) to (19).( 14) The dynamic block diagram of the grid connected LC filter in the d-q rotating reference frame can be derived as shown in Figure 5.

The VSWT-PMSG Control System
The block diagram of control system for VSWT-PMSG proposed in this paper is shown in Figure 6.The VSWT-PMSG system consists of the following components: a direct drive PMSG, blade pitch controller, AC/DC/AC converters based on two levels of IGBT which are composed of stator side converter (SSC) and grid side converter (GSC), a DC-link circuit composed of a chopper with a resistance (R c ) and a capacitor (C dc ), two voltage source converter controllers (stator side controller and grid side controller), and LC filter with passive damping resistance.In the GSC, the converter converts the DC voltage into the three-phase AC voltage of the grid frequency.The converter is connected to the grid system through an LC filter and a step up transformer.The grid current and the grid voltage sensors are detected on the converter side of the LC filter and the high voltage side of the transformer, respectively.The DC voltage (V dc ) is detected on the DC capacitor.Using the grid side controller controls the voltage reference of grid side voltage source converter for modulation.When a fault occurs in the grid, the V dc increases significantly due to power unbalance between SSC and GSC.In order to protect the DC-link circuit, the controller activates the chopper by a trigger command (Ctrl).
Output power of a wind generator always fluctuates due to the wind speed variations.To maintain the output power of generator under the rated level, a pitch controller is used to regulate rotational speed of PMSG under its rated value.
In modulation technique, Third Harmonic Injection Pulse Wave Modulation (THIPWM) is used in this work.Injection of the third harmonic in the reference voltage makes it possible to utilize the voltage reference without over modulation.In addition, the THIPWM can maximize fundamental amplitude of the output voltage [14].
In this paper, a 2.5 MVA class of VSWT-PMSG is considered.Table 1 presents the system parameters of the grid connected VSWT-PMSG.In order to determine the LC filter parameters, step by step procedures and limitations of the filter parameters presented in [7] are adopted.

Stator Side Controller
The aim of the stator side controller is to control the active and reactive power output of the PMSG.Details of the stator side controller system are presented in a block diagram shown in Figure 7.The rotor angle position (θ r ) used in the transformation between abc and dq variables is obtained from the rotor speed of generator.The active power (P s ) and reactive power (Q s ) of the generator are controlled by the d-axis current (I sd ) and the q-axis current (I sq ), respectively.The value of active power reference (P ref ) is determined by MPPT method of the wind turbine characteristic as shown in Figure 2.For unity power factor operation, the reactive power reference (Q s *) is set to zero.The cross couplings I sd ω e L d and I sd ω e L q should be compensated by the output of the current controllers in order to improve the tracking capability of the control system.Finally, V sd * and V sq * are voltage reference outputs of the current controller, which is used to generate the three phase reference voltage (V sa *, V sb *, V sc *) to control stator currents of the PMSG.In order to analyze stability performance of the controller system shown in Figure 7, a block diagram of the current loop control shown in Figure 8 is used.In this study, the d-axis and the q-axis components are assumed identical, and hence the plant system can be modeled by using one axis component only as expressed by 1/(R s + L d s).The controller is composed of a PI controller (PI 2), a processing delay, and a plant system.The time delay (T d ) is composed of one sample delay caused by switching frequency and one half sample delay caused by the dead time of PWM converter.

Grid Side Controller
Figure 9 shows a block diagram of the grid side controller system.In this control strategy, the control system based on the d-q rotating reference frame is implemented, which has the same rotational speed as the grid voltage.The three phase grid currents (I ga , I gb , I gc ) and the grid voltages (V ga , V gb , V gc ) are transformed into the d-q rotating reference frame by using Park transformation.The Phase Locked Loop (PLL) [15] is used to extract the grid side phase angle (θ g ).
The controller is divided into two cascade loop control, one for active power and the other is for the reactive power.When grid voltages on the stationary reference frame are transformed into the d-q rotating reference frame, V gd is set to constant and V gq is set to zero.Therefore, the active and reactive power delivered to the grid can be controlled separately by the d-axis current (I gd ) and the q-axis current (I gq ), respectively.To improve the tracking capability of control system, the cross coupling should be canceled by adding I gd ωL g and I gq ωL g at the output of the current controllers.For d-axis and q-axis current loop regulation, in this paper, the Fuzzy-PI controllers are applied.The control strategy for the Fuzzy-PI controller will be explained in Section 4. The output of current controller (V gd * and V gq *) is transformed into the stationery reference frame (V ga *, V gb *, V gc *), which is used as a reference signal for pulse wave modulation.
Under normal operating conditions, the voltage of DC-link capacitor (V dc ) is maintained constant in order to transfer the active power generated by PMSG to the grid.The d-axis current reference signal (I gd *) is determined from the output of the DC-voltage controller, and the q-axis current reference signal (I gq *) is obtained from reactive power controller output.The reactive power reference (Q g *) is set so that the terminal voltage at the high voltage side of the transformer remains constant.
In grid fault condition, the fault detector is activated when the grid voltage decreases under 0.9 pu.The detector sends the control signal command (Ctrl) to trigger the DC link protection.At the same time, the active power transfer to the grid is set to zero.

Fuzzy-PI Controller Design
In order to design a fuzzy logic controller (FLC) for the current control loop, the block diagram of LC filter in the d-q rotating reference frame shown in Figure 6 is considered as a plant system.The plant system can be modelled by using the d-axis component only as shown in Figure 11, where the cross coupling and the grid voltage are neglected.Figure 12 shows a block diagram of the current control loop for GSC.The control system is composed of a Fuzzy-PI controller, a processing delay, and a plant system, using the converter side voltage (V id ) as input and the converter side current (I id ) as output.The FLC is used to adjust the PI parameters according to the input signal error (er).To determine a control signal for proportional signal control (P er ) and integral signal control (I er ), an inference engine with rule base having if-then rules in form of "If er, then P er and I er " is used.The general structure of the fuzzy logic control is shown in Figure 13.The FLC is composed of fuzzification, membership function, rule base, fuzzy inference and defuzzification.The fuzzification comprises the process of transforming crisp values into grades of membership for linguistic terms of fuzzy sets.The membership function is used to associate a grade to each linguistic term.For fuzzification, the three variables of the FLC-the error (er) and the outputs of P er and I er -have five triangle membership functions.The variables fuzzy subsets for input are Negative Big (NB), Negative Small (NS), Zero (Z), Positive Small (PS), and Positive Big (PB).Figure 14 shows the membership function for input er.The interval input of the membership function is set at [−1 to 1] due to the variation of the d-axis or q-axis current between −1 to 1 pu.Figures 15 and 16 show the membership functions of output for P er and I er , respectively.The membership functions are designed based on frequency response of the bode diagram of the current control loop.In this paper the initial gain K p is obtained by using optimum modulus criterion.The integral time constant (T i ) usually set equal to the plant system time constant (L tot /R tot ) [6], where L tot and R tot are total of series inductances and its parasitic resistances of the plant system, respectively.The integral gain can be calculated by using K i = K p /T i .Figure 17 shows frequency response of the bode diagram of the current loop control of GSC for four different values of K p and K i .It is seen that maximum gain with gain margin (Gm) larger than 10 dB and phase margin (Pm) larger than 45° is obtained with K p = 0.35 and K i =7.07.Therefore, the interval of membership function for output P er and I er can be set at [−0.35 to 0.35] and [−7.04 to 7.04] as shown in Figures 15 and 16, respectively.
The rules are set based upon the knowledge and working of the system.The values of P er and I er for Fuzzy-PI controller of the current regulator are calculated for the changes in the input of the FLC according to the rule base.The number of rules can be set as desired.A rule in the rule base can be expressed in the form: If (er is NB), then (P er is NB) and (I er is NB) If (er is NS), then (P er is NS) and (I er is NS) If (er is ZE), then (P er is ZE) and (I er is ZE) If (er is PS), then (P er is PS) and (I er is PS) If (er is PB), then (P er is PB) and (I er is PB) The rule base includes five rules, which are based upon the five membership functions of the input variables to achieve the desired P er and I er .
In this work, Mamdani's max-min method is used for inference mechanism.The centre of gravity method is used for defuzzification to obtain P er and I er , which is given by the following equation: where, n is the total number of rules, μ i is the membership grade for the i-th rule, and C i is the coordinate corresponding to respective output or consequent membership function.
To analyse the dynamic performance of current control loop, the linear block model as shown in Figure 11 is used.The analysis has been performed by using Matlab/Simulink.Figure 18 shows step response of the current control loop.The reference for the d-axis current has been varied four times at every 100 ms.It is seen that good performance can be achieved by using proposed Fuzzy-PI controller.The three-phase current on the grid side, as well as I id, have been observed by using power system blockset as shown in Figure 19.It can be seen that the three phase current tracks the reference very well.

Simulation Study
In order to investigate the performance of the proposed control system, combined installation of VSWT-PMSG and FSWT-SCIG in a small wind farm connected to an infinite bus as shown in Figure 20 is analyzed in this study, where the VSWT-PMSG is connected to the infinite bus through AC/DC/AC power converter, LC filter, a 1.0/66 kV step up transformer and a double circuit transmission line.The FSWT-IG rated at 2.5 MW is also connected to the infinite bus via a 0.69/66 kV step up transformer and a single circuit and double circuit transmission lines.The FSWT-IG is controlled only by a pitch angle controller in order to regulate power output of IG under the rated power.Both wind generators are connected at point of common connection (PCC).In order to compensate for reactive power consumption by IG, a capacitor bank (Qc) is installed at the terminal of IG.The value of the capacitor is determined so that the power factor becomes unity at rated power operation.The resistance and reactance of the transmission line is represented in the form of R + jX in per unit as shown in the figure, respectively.The simulation analyses have been performed by using PSCAD/ EMTDC.

Transient Stability Analysis
In the transient stability analysis, a symmetrical three line to ground (3LG) fault at the transmission line is considered as network disturbance, as shown in Figure 20 25 and 26 show responses of the active power output of PMSG and IG, respectively.The active power can be controlled more effective by using Fuzzy-PI Controller. Figure 27 shows the DC-link voltage response of the PMSG during the fault.From these results, it is clear that the stability of performance of the wind farms can be improved more effectively in the case of PMSG with the Fuzzy-PI controller than that with just PI controller.Moreover, in Case 2, the system becomes unstable when the converter with PI Controller is used for PMSG.

Steady State Analysis with Fuzzy-PI Controller
To evaluate the steady state performance of the proposed system, responses for wind speed data shown in Figure 28 are evaluated for the cases of FSWT-IG and the Fuzzy-PI controlled VSWT-PMSG.Figure 29 shows the active power output of both wind generators.It can be seen that the active power of the wind generators can be delivered to the grid effectively.Figure 30 shows the rotor speed response of the PMSG.The blade pitch angle responses are shown in Figure 31.
Figure 32 shows the reactive power output of both wind generators.It is seen that the reactive power from the grid side converter of VSWT-PMSG provides reactive power compensation for FSWT-IG for voltage regulation.Therefore the voltage at the PCC is controlled almost constant as shown in Figure 33.

Conclusions
In this paper, a new Fuzzy-PI controller for variable speed permanent magnet wind generators connected to a power grid through a LC filter is proposed and investigated in order to enhance its dynamic (transient stability and steady state behavior) performances.The membership function of the fuzzy logic control system is designed based on frequency response of the bode diagram.The controller combines fuzzy logic with a classical PI controller in order to adjust the PI gains online.The stabilizing effect of the proposed PMSG system on the fixed speed wind generators is also investigated.The 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 significant effect of the proposed control system has been demonstrated especially in the permanent fault analysis.Moreover, the steady state performance of the proposed system is analyzed using variable wind speed data, and it is demonstrated that the terminal voltage of wind farm under randomly varying wind speed can be controlled constantly.

Figure 4 .
Figure 4. Single phase LC filter equivalent circuit.

Figure 5 .
Figure 5. Block diagram of LC filter.

Figure 8 .
Figure 8.Current control loop of SSC.

Figure 10
Figure10shows the model of the pitch controller for VSWT.The control loop of the pitch actuator is represented by a first-order transfer function with an actuator time constant (T s = 5) and the pitch rate limiter of 10°/s.A classical PI controller is used to manage tracking error.In VSWT the pitch controller is used to regulate rotational speed of PMSG under its rated value (1 pu).

Figure 11 .
Figure 11.The LC filter in d-axis component only.

Figure 12 .
Figure 12.Current control loop of the grid side converter (GSC).

Figure 13 .
Figure 13.Block diagram of fuzzy logic controller.

Figure 14 .
Figure 14.The membership function for input er.

Figure 15 .
Figure 15.The membership function for output P er .

Figure 16 .
Figure 16.The membership function for output I er .

Figure 17 .
Figure 17.Bode diagram of current control loop of GSC.
. Temporary fault (Case 1) and permanent fault (Case 2) are considered in the simulation study to show the effectiveness of the proposed control.In Case 1, the fault occurs at 0.1 s; the circuit breakers (CBs) on the faulted line are opened at 0.2 s, and at 1.0 s the CBs are re-closed.In Case 2, the fault occurs at 0.1 s; the CBs on the faulted line are opened at 0.2 s, and at 1.0 s the CBs are re-closed, and at 1.1 s the CBs are opened again because the fault is still continuing.In this transient analysis, the wind speeds for the wind generators are kept constant at the rated speed (12 m/s), assuming that the wind speed does not change in short time duration.The simulation results for the transient stability analysis in Case 1 and Case 2 are shown through Figures 21-27.Figures 21 and 22 show responses of reactive power output of PMSG and IG, respectively.It is seen that, by using the proposed controller for PMSG, the grid side converter of PMSG can provide necessary reactive power during 3LG fault.Therefore, the terminal voltage at PCC can return back to the rated value quickly as shown in Figure 23.The rotor speed of IG can also become stable as shown in Figures 24.Figures

Figure 29 .
Figure 29.Active power output of wind generators.

Figure 32 .
Figure 32.Reactive power output of wind generators.