Control and Estimation of Asynchronous Machines Using Fuzzy Logic

These techniques are traditionally solved using a mathematical model of the machine with fixed parameters. However, in a real machine, the stator and rotor resistances are altered by temperature and the inductances are altered by the magnetizing current values that change for example when the machine is running in the flux weakening region or by an improper detuning between the flux and torque producing currents. For these reasons, the induction machine shows properties of nonlinear and time-varying systems. Parameter variations degrade the system performance over the full range of motor operation and in extreme conditions this can lead to instability (Vas, 1999). To solve this problem the controller parameters have to be continuously adapted. This adaptation can be achieved using different techniques such as MRAC or model reference adaptive control (Zhen & Xu, 1998), sliding mode (Won & Bose, 1992), or self tuning PIDs (Astrom & Hagglung, 1996). For some of these techniques the motor parameters and load inertia must be calculated in real time, so there is a high processing requirement for the used processors.


Introduction
In the conventional design of controllers, the first step is to obtain the model of the plant. With the plant model, the controller is designed considering aspects such as stability, dynamic response behaviour, performance against disturbances, etc. This type of controller design is called model-based design.
An asynchronous machine is normally controlled using traditional PI or PID controllers. In practice these conventional controllers are often developed via crude system models that satisfy basic and necessary assumptions before being tuned by using established methods.
These techniques are traditionally solved using a mathematical model of the machine with fixed parameters. However, in a real machine, the stator and rotor resistances are altered by temperature and the inductances are altered by the magnetizing current values that change for example when the machine is running in the flux weakening region or by an improper detuning between the flux and torque producing currents. For these reasons, the induction machine shows properties of nonlinear and time-varying systems. Parameter variations degrade the system performance over the full range of motor operation and in extreme conditions this can lead to instability (Vas, 1999). To solve this problem the controller parameters have to be continuously adapted. This adaptation can be achieved using different techniques such as MRAC or model reference adaptive control (Zhen & Xu, 1998), sliding mode (Won & Bose, 1992), or self tuning PIDs (Astrom & Hagglung, 1996). For some of these techniques the motor parameters and load inertia must be calculated in real time, so there is a high processing requirement for the used processors.
In the model-based controller design process, heuristics also enters into the implementation and tuning of the final design. Consequently, successful controller design can in part be attributable to the clever heuristic tuning of a control engineer. An advantage of fuzzy control is that it provides a method of manipulating and implementing a human's heuristic knowledge to control such a system (Zadeh, 1965).
Because the fuzzy logic approach is based on linguistic rules, the controller design does not need to use any machine parameters to make a controller adjustment, so the controller robustness is high (Li, 1998).
This chapter is composed of 5 sections. Section 2 begins with a mathematical description of the asynchronous machine. These equations are used to get the appropriate expressions and then use the adequate reference system to realize a good regulation of both asynchronous machines. Section 3 explains the used hybrid fuzzy controller. This hybrid controller will be used in all the applications and can be converted in a fuzzy controller cancelling the proportional term.
Section 4, explains the fuzzy control of the squirrel-cage motor using the indirect vector control strategy. Also, speed estimation for a sensorless control is implemented.
Section 5, explains the control strategy to control a double fed induction generator used mainly in wind turbines. Fuzzy control is implemented and tested in a real system. Section 6, explains the fuzzy control robustness when the squirrel-cage motor is replaced for a new one with different parameters and when there is noise in the stator current measurement.

Induction machine model
The following equations describe the behaviour of the asynchronous machine in an arbitrary rotating reference frame.

Fuzzy controller
The proposed controller is a hybrid controller with a fuzzy proportional-integral controller and a proportional term (FPI+P). The full controller structure is shown in figure 1.
KP d dt The proportional gain KP makes the fast corrections when a sudden change occurs in the input e. To eliminate the stationary error an integral action is necessary, so a fuzzy PI is included in the controller. If the error is large and the controller tries to obtain a larger output value than the limits, the integral action will remain in pause until the correction level drops below the saturation level. So, as the error becomes smaller the integral action gains in importance as does the proportional action of the fuzzy PI controller. This second proportional action is used for fine tuning and to correct the response to sudden reference changes, helping to the proportional controller.
Where, GE , GCE and GCU are the scaling factors of the error, change of error and output, used to tuning the response of the controller (Patel, 2005). 2 E (error) and 2 CE (change of error) are the inputs of the fuzzy controller, an 2 cu (control action) is its output. Because the inputs of the fuzzy controller are the error and change of error it is useful to configure it as an incremental controller. This incremental controller adds a change to the current control signal of 2 n U  .
Where, Kp is the proportional gain and Ts and Ti the sample or control period and the integral time.
It is an advantage that the controller output 2 n CU is driven directly from an integrator, as it is then is easier to deal with windup and noise (Jantzen, 1998 The function f is the fuzzy input-output map of the fuzzy controller. If it were possible to take the function f as a linear approximation, considering equations (8-11), the gains related to the conventional PI would be, These relations had shown the importance of the scaling factors. High values of GE produce a short rise time when a step reference is introduced but also a high overshot and a long settling time could arise. The system may become oscillatory and even unstable. If GE is low the overshot will decrease or disappear and the settling time increases. High values of GCE have the same effect as small values of GE and vice versa.
High values of GCU originate a short rise time and overshot when a step reference is introduced. If GCU is small the system gain is small and the rise time increases.
The output of the controller is limited according to the maximum value of the hybrid fuzzy controller, for example for a speed controller the limit will be the maximum admissible torque and for the current controllers the limit will be the maximum admissible voltage of the machine.
For a practical implementation of the fuzzy controllers on a DSP the fuzzy membership functions of the antecedents and consequents are triangular and trapezoidal types because the calculus complexity is lower than the calculus complexity when are used Gaussian or Bell membership functions.
With the information of the plant model, the fuzzy sets and their linguistic variables are defined for the antecedents and consequents. The control strategy has to be implemented based on the engineer experience and if it is possible using simulation tools. The control strategy is stored in the rule-base in the form If-Then and an inference strategy will be chosen.
Then the system is ready to be tested to see if the closed-loop specifications are met. First simulations will be carried analyzing the dynamic behaviour and the stability of the plant and finally the adjustment will be tested and adjusted again in the real machine control platform.
To get the rule-base of the controller the reference and feedback values are compared and the control action is determined to correct the deviation between reference and feedback.
As an example, in the speed loop a positive increase of the speed error because the real speed is lower than the reference, must force to the controller to increase their output or torque reference, Te, to increase the machine speed as detailed in equation 6. Something similar happens with the change of error; if the change of error is positive big, that means that the machine is decelerating, then the controller has to increase the torque to reduce the effect, so the controller has to produce a positive big output to increase the electromagnetic torque.
For another error and change of error combinations, the base-rule of table 1 applied to the fuzzy controller shows a phase trajectory reducing the error as shown in figure 2. This is valid for the speed, flux and current loops. The base-rule of table 1 characterizes the control objectives and it is shown as a matrix with the phase trajectory superimposed. The dynamic behaviour of the controller to make zero the error will depend on the antecedents and consequents position, on the selected inference strategy, on the used defuzzification method and on the scaling factors.  To adjust the scaling factors and the membership functions a first approximation is to make the controller as close as possible to a conventional PI controller (Jantzen, 1998). Then, the scaling factors and the position of the antecedents and consequents are adjusted making multiples simulations with Matlab/Simulink © .
The linguistic variable error and their linguistic terms position, figure 3, is the same for all fuzzy controllers. The error value is normalized for every controller, as an example when the speed error is 1000 rpm, their normalized value is 1.  The linguistic variable change of error and their linguistic terms position, figure 4, is also the same for all fuzzy controllers. The change of error value is normalized for every controller.

Fig. 4. Linguistic variable change of error and its linguistic terms
The linguistic variable of the control action or consequent and the position of its linguistic terms are shown in figure 5. The values are normalized, where a value of 20 in the real control action is normalized to 1.

Fig. 5. Control action linguistic terms
In figure 6, the fuzzy controller surface can be seen. The used implication method is the AND method or min (minimum), which truncates the output fuzzy set and as aggregation the S-norm max (maximum) has been used. The used defuzzification method is the centroid or center of gravity, equation 15.

Squirrel-cage machine control
A schematic diagram of the induction motor indirect vector control with the fuzzy PI + P controllers is shown in figure 7. The scheme is obtained after operating with the machine equations and using the rotor flux reference system as shown in figure 8.  Fig. 9. Torque, flux and speed control structure in the rotor flux reference system The speed error is the input of a hybrid fuzzy controller and the output of FPI+P controller will generate the torque producing stator current component command Isq. The flux controller generates the flux producing stator current component Isd according to the fluxspeed profile. Both currents are the input of two controllers to produce the stator voltages in the synchronous reference and then transformed to the stationary reference system to generate in the inverter the voltage vector for the motor.
The real platform to test the asynchronous motor and its main characteristics used also for the simulation purpose are shown in figure 10. FPGA  The real system is based on a DS1103 board and is programmed using the software Matlab/Simulink © . The board controls the IM inverter generating the SVPWM pulses (dSPACE © , 2005). The speed is measured with a 4096 impulse encoder via a FPGA connected to the DS1103 using the multiple period method (Cortajarena et al., 2006).

Torque or current control
As mentioned and shown in figure 9, the torque of the machine is controlled with the stator current q component and the flux with the d component. The relation between the torque Te and the stator current q component is, So first, torque and current magnetizing controllers will be adjusted. In a classical PI controller the proportional term for a bandwidth of 2500 rad/s and a phase margin of 80º with the machine parameters given in figure 10 is 0.05. For the adjustment of the hybrid fuzzy controller KP will be 0.025, half of the proportional term in the PI. The scaling factors adjusted after simulations for the current controllers are 150, 0.03 GE GCE  and 8 GCU  . The regulators maximum and minimum limits are ±310V, the maximum motor phase voltage.  When the step reference is -20 amperes the feedback or real stator q current reaches the real value quickly, it takes 2 ms. The trajectory on the fuzzy surface for this step is the green line in the surface showing how the change of error and the error are decreasing to zero in about 2 ms. When the step reference goes from -20 to 20 amperes the feedback or real stator q current reaches the real value in 3 ms. The trajectory on the fuzzy surface for this step is the red line in the surface showing how the change of error and the error are decreasing to zero due to the value of the control action.

Speed and rotor flux control
Once the current loops have been adjusted, the speed and flux loops will be adjusted. As mentioned and shown in figure 9, the machine speed is regulated adjusting the torque command and the flux adjusting the stator current d component.
In a classical speed PI controller the proportional term for a bandwidth of 750 rad/s and a phase margin of 80º with the machine parameters given in figure 10 is 0.5. For the adjustment of the hybrid fuzzy controller KP will be 0.4, a little bit smaller than the proportional term in the PI. The scaling factors adjusted after simulations for the speed controllers are 2, 0.01 GE GCE  and 300 GCU  . The regulators maximum and minimum limits are ±50 Nm, the maximum motor torque or a stator current q component of 20 amperes. Figure 13 shows the hybrid fuzzy speed controller surface and the trajectory when a step reference from -1000 rpm to 1000 rpm and again to -1000 rpm as shown in figure 14 is applied to the speed controller.
When the step goes from -1000 to 1000 rpm the trajectory on the fuzzy surface for this step is the green line, showing how the change of error and the error are decreasing to zero in about 180 ms. When the step reference goes from 1000 to -1000 rpm the feedback or real speed reaches the real value in 180 ms. The trajectory on the fuzzy surface for this step is the red line, showing how the change of error and the error are decreasing to zero due to the value of the control action. When the change of error is high, the controller output is at its maximum limit, and when the change of error decreases the control action also decreases close to zero as it can be seen in the trajectory of figure 13. The error and change of error trajectory of the surface in figure  13 correspond to the values represented in figure 14. The control action contribution can be obtained from the fuzzy controller surface. Figure 15 shows the response of the real asynchronous motor of figure 10 when a speed step is applied to the machine and later a load torque of 40 Nm after 0.3 s. To check the control of the machine with the hybrid fuzzy controller the machine will be forced to run at a speed higher than the nominal value. In such conditions the machine rotor flux has to decrease because the inverter DC voltage can't be higher, so the torque and stator current q component relation is changing as shown in equation 16 and figure 9. This change should be taken in consideration in a classical PI regulator. In the hybrid fuzzy controller the adjustment done with the linguistic variables and the scaling factors shows that the control works properly. In figure 16, the left signals correspond to the real signals obtained whit the machine of the test rig and the right side signals are the simulated in the same conditions than the real case. Because the speed is higher than nominal value, the flux decreases below the nominal value, to do this the stator current d component decreases and increases when the flux is increasing to the nominal value. The q component of the stator current related with the torque increases when the machine is accelerating and decreases when the machine decelerates.
The speed regulation in the flux weakening region is good, and real platform signals and simulations corroborate the hybrid fuzzy good performance.

Speed estimation
There are in literature many techniques of sensorless control. The first group is based on the fundamental mathematical model of the machine, that is, the flux density distribution in the air gap is sinusoidal. All these models depend on the machine parameters so the accuracy of the estimators will depend on different manner of the precision of these parameters. It is not possible with these techniques to achieve a stable and precise operation at very low speed.
The second group of techniques is based on the anisotropic properties of the machine. Techniques like rotor slot ripple or main inductance saturation are used in this group.
From equations 2 and 4, considering rotor voltage zero, and after Laplace transformation of the respective space vectors the rotor flux will be, The equation 19 is independent of r  when stator frequency is close to zero, so the variations of rotor speed have no influence on the stator equation 18 and this makes impossible to detect a speed variation on the stator current. So the mechanical speed of the rotor becomes not observable. Instead of this, when the magnitude of the induced voltage from the rotor into the stator is substantial, its value can be determined and the rotor state variables are then observable. So, there will be a limitation for very low speed operation due to the dc offset components in the measured stator currents and voltages.
The minimum stator frequency must be superior to zero to have an appropriate relation between induced voltage from the rotor into the stator and also to reduce the noise and parameters mismatch influence (Holtz, 1996).
The rotor speed estimator used, figure 17, is based on the fundamental mathematical model of the machine. The rotor speed is obtained with the derivative of the rotor flux angle minus the slip speed, see figure 8. The precision of the estimator has a great dependence on motor parameters and at low speeds a small error (offset for example) in the stator voltage can suppose an estimation error.
The rotor flux estimator contains two models, the open loop current model, which is supposed to produce an accurate estimation at low speed range, and an adaptive voltage model for a medium high speed range of operation. The transition between both models is adjusted by two hybrid fuzzy controllers, reducing the problems due to stator resistance and pure integrators at low speed. With the adjusted hybrid fuzzy controllers some estimated speed profiles in the real machine are presented.
www.intechopen.com Figure 18 shows three speed references when the machine is unloaded. The speed reference of the left figure is a square signal from -1000 to 1000 rpm. The estimated speed is used as feedback signal and for check purposes the measured or real speed is also shown. As can be seen the real and estimated speeds are very similar. The speed reference of the middle figure is sinusoidal and the reference, estimated and real signals are very similar, showing a good regulation and speed estimation. The right figure shows a random speed reference crossing during 2 seconds at a speed close to zero rpm, where the speed is poorly observable. The reference, estimated and real signals are very similar even at zero speed for a short time.   Fig. 19. Sensorless control for 200 rpm and torque step loads of ±30Nm Figure 19 shows the speed estimation when a load perturbation of ±30 Nm is applied to the machine. There is an error between the real speed and the estimated speed when the machine is loaded due to parameters mismatch.

Doubly fed induction generator control
A doubly fed induction generator (DFIG) vector control with the fuzzy PI + P controllers is shown in figure 20. The scheme is obtained after operating with the machine equations and using the stator flux reference system shown in figure 21. The converter Back to Back configuration provides to the DFIG the ability of reactive power control. Using the appropriate reference system it is possible to decouple the active and reactive power control by the independent control of the rotor excitation current. Due to the bi-directional power converter in the rotor side, the DFIG is able to work as a generator in www.intechopen.com the sub-synchronous (slip speed is positive, s>0) and super-synchronous (slip speed is negative, s<0) operating area (Hansen et al., 2007). When the reference system is linked to the stator flux, as it can be seen in figure 21, the stator flux q component is zero, and when operating with equation 3 the next two equations are obtained, This means that the stator current can be controlled with the rotor current. Taking into account that the stator resistance is small, the stator flux can be considered constant and its value is, The stator voltage d component is almost zero because the reference system is oriented along the stator flux, so considering that the stator active and reactive power is, Equations 30 and 31 showed that the stator active power is controlled with the q component of the rotor current and the stator reactive power with the rotor current d component. In figure 20 can be seen both hybrid fuzzy controllers to regulate the d and q rotor current components.
The real platform to test the double feed induction generator and its main characteristics used also for the simulation purpose are shown in figure 22.
The real system is based on a DS1103 board and is programmed using the software Matlab/Simulink © . The board controls the inverters in a Back to Back configuration generating the SVPWM pulses (dSPACE © , 2005). The grid connected inverter, is regulated keeping the DC bus voltage constant. The speed of the DFIG is measured with a 4096 impulse encoder connected to the DS1103 using the frequency method (Cortajarena et al., 2006).
First, the inner current loops are adjusted. The used hybrid fuzzy controller is the same as have been used in the squirrel cage machine.

Fig. 22. DFIG rig test and its main characteristics
To test the performance of the hybrid fuzzy controller it will be compared to a conventional PI controller. In a classical PI controller the proportional term for a bandwidth of 3000 rad/s and a phase margin of 80º with the machine parameters given in figure 22 is 0.015. For both current controllers, the proportional term KP will be 0.015 and the scaling factors are 300, 0.025 GE GCE  and 0.2 GCU  . The regulators maximum and minimum limits are ±1, equivalent to ±310 V per phase in the rotor. Figure 23 shows the hybrid fuzzy rotor q current controller surface and the trajectory when a step reference from 10 to 20 amperes is produced. The feedback or real rotor q current reaches the real value quickly, it takes around 3 ms.
The trajectory on the fuzzy surface for this step shows how the error is moving around the high slope where the error is close to zero. In table 3, the performances of two controllers are summarized. The hybrid fuzzy and the conventional PI have similar dynamic response, showing the fuzzy controller a better performance when IAE, ITAE, ISE and ITSE indexes are used to evaluate the performance.
In a DFIG control there are two operating regions depending on the wind speed. Below the machine rated power, the blade pitch angle is set to zero degrees to get the maximum power. When the wind speed is sufficiently fast to get power from the wind higher than the rated power, enters into the second region. In this region the blade pitch angle controller www.intechopen.com regulates the output power modifying the pitch angle to get the rated power from the generator without damage it.
Where ρ air , is the mass density of the air, R is the radius of the propeller, Cp is the power performance coe4fficient, v w is the wind speed, β is the pitch angle and is the blade tip speed ratio and is defined as, and ω pr is the angular velocity of the propeller.
The power performance coefficient Cp, used according to the tip speed ratio and the pitch angle for the DFIG is shown in figure 25.
Tip speed ratio,  Pitch angle,  p C Tip speed ratio,  Pitch angle,  p C Fig. 25. Power performance coefficient depending on tip speed ratio and pitch angle Figure 26 shows for a pitch angle of 0º the obtained power from the wind according to the propeller speed. The black line indicates the maximum power and the propeller speed to get this power from every wind speed. When the obtained power reaches the machine rated power, the wind energy is wasted changing the pitch angle and getting the rated power.
For a known wind speed and using figure 26, the propeller optimum speed and the power are obtained. Then, with equation 30 the rotor q component is determined as reference.
The inertia of the blades turned by the drive is large and a real pitch actuator has thus limited capabilities. Its dynamics are non-linear with saturation limits on pitch angle (usually from 0 to 30º) and pitching speed rate around 10º/s.  The actuator is modelled in closed loop with saturation of the pitch angle and a pitch rate limitation. This closed loop configuration with integrator, gives similar result as a first order transfer function but with limitation of the pitch rate (Bindner, 1999). If the pitch reference angle is outside the lower and higher limits, the integrator output is prevented from growing indefinitely.
The pitch control diagram is shown in figure 27, where P is the DFIG real power, Pmax DFIG is the maximum admissible power for the DFIG and P* is the active power reference. The pitching speed rate is fixed to 10º/s, the pitch angle is limited from 0 to 30º, the KP value and the scaling factors adjusted after simulations ensuring stability for the pitch controller are 0.003 KP  , 400, 0.24 GE GCE   and 0.1 GCU  . The hybrid fuzzy regulator maximum and minimum limits are 0 to 30º as pitch angle reference limit. Figure 28 left, shows the response of the pitch control when a wind speed step from 9m/s to 13m/s is produced. The obtained total power from the wind at 9m/s is 3800w and when the wind speed power is higher than the fixed 7000w, the pitch angle starts the regulation to limit the total power. The figure to the right shows the same signals for a random speed profile. When the wind speed is lower than 10m/s the pitch angle is zero, and all wind power is converted in electric power, but when the speed is higher, the pitch angle is regulated limiting the maximum power returned to the grid.

Parameter variations
As it was commented into the introduction, the fuzzy logic approach is based on linguistic rules, and the controller robustness is high. To verify the above, the squirrel-cage motor is replaced by a different one. The motor parameters change and without realizing any adjustment in the controllers the speed regulation is tested in a motor control with conventional PI controllers and with the proposed hybrid fuzzy controllers. The new motor parameters are: Rr=1.2 Ω, Rs=1.5 Ω, Lm=0.108 H, Lr=0.12 H, Ls=0.12 H, J=0.038 Kg*m 2 . Figure 29 shows the speed of the machine when there is a big noise in the stator alfa and beta components; in fact the noise is very high. The speed reference is 1000 rpm and a load step of 40 Nm is applied to the new machine, without readjusting the controllers, at 0.5s. The left figure shows the response of the machine controlled with PI controllers. The performance of the system becomes wrong when the load changes after 0.5s, the system becomes instable. Instead, in the right figure the motor is controlled with the hybrid fuzzy controllers adjusted in section 4. When the load torque is applied to the machine the speed regulation after that moment is correct. This is an example of the robustness of the fuzzy controller compared with the conventional PI controllers when there is noise in the measurements, in this case stator current measurement.

Conclusions
Control of asynchronous machines can be made relatively simple if the machine is understood as a DC machine. This is obtained making the appropriate transformations of reference systems. The squirrel cage machine has been used as a motor and hybrid fuzzy controllers have been used to control the speed of the machine. The performance has been compared with classical PI and fuzzy controllers, showing a better performance. Also a speed estimator has been implemented using two hybrid fuzzy controllers. The speed sensor has been replaced for the speed estimator to get a sensorless system.
The control of the double feed induction generator used in wind turbines has been studied. First the main control equations are presented and then, the rotor current controllers are implemented with the hybrid fuzzy controllers. The performance is compared to conventional PI controllers, showing a slightly better performance. Also pitch control is realized to limit the maximum power obtained from the wind. The real system shows how the controller limits the maximum power properly.
All the proposed controllers have been simulated and compared to the real system to validate the systems model. With the checked models, the adjustments to guarantee the stability and to get good performance are done. Then, all of simulated hybrid fuzzy controllers have been implemented in the real platforms giving good results.