Application of Fuzzy Logic in Control of Electrical Machines

During the past decades, fuzzy logic control (FLC) has been one of the most active and fruitful areas for research in the application of fuzzy set theory. It has has been an active research topic in automation and control theory, since the work of Mamdani proposed in 1974 based on the fuzzy sets theory of Zadeh (1965), to deal with the system control problems which is not easy to be modeled [Mamdani E.H. 1974].


Introduction
During the past decades, fuzzy logic control (FLC) has been one of the most active and fruitful areas for research in the application of fuzzy set theory. It has has been an active research topic in automation and control theory, since the work of Mamdani proposed in 1974 based on the fuzzy sets theory of Zadeh (1965), to deal with the system control problems which is not easy to be modeled [Mamdani E.H. 1974].
The literature in fuzzy control has been growing rapidly in recent years, making it difficult to present a comprehensive survey of the wide variety of applications that have been made. Fuzzy logic, which is the logic on which fuzzy control is based, is much closer in spirit to human thinking and natural language than the traditional logical systems. Basically, it provides an effective means of capturing the approximate and the inexact nature of the real world. The fuzzy logic controller is a set of linguistic control rules related by the dual concepts of fuzzy implication and the compositional rule of inference. The FLC provides an algorithm which can convert the linguistic control strategy based on expert knowledge into an automatic control strategy.
The concept of FLC is to utilize the qualitative knowledge of a system to design a practical controller. For a process control system, a fuzzy control algorithm embeds the intuition and experience of an operator designer and researcher. The fuzzy control method is suitable for systems with non-specific models, and therefore, it suits well to a process where the model is unknown or ill-defined and particularly to systems with uncertain or complex dynamics [Yu F. M. et al 2003].
The implementation of such control consists of translating the input variables to a language like: positive big, zero, negative small, etc. and to establish control rules so that the decision process can produce the appropriate outputs. Fuzzy control (FC) using linguistic information possesses several advantages such as robustness, model-free, universal approximation theorem and rules-based algorithm [Kim Y.T.& Bien Z. 2000;Lee C.C. 1990;Timothy J. R. 1994].
As an intelligent control technology, fuzzy logic control (FLC) provides a systematic method to incorporate human experience and implement nonlinear algorithms, characterized by a series of linguistic statements, into the controller. In general, a fuzzy control algorithm consists of a set of heuristic decision rules and can be regarded as an adaptive and nonmathematical control algorithm based on a linguistic process, in contrast to a conventional feedback control algorithm [Sousa G.C. D.& Bose B. K. 1994;Yager, R. R. 1997].
The fuzzy control also works as well for complex nonlinear multi-dimensional system, system with parameter variation problem or where the sensor signals are not precise. It is basically nonlinear and adaptive in nature, giving robust performance under parameter variation and load disturbance effect.
In process control applications, recent literature has explored the potentials of fuzzy control for machine drive application [Tang Y. & Xu L. 1994, Heber B. et al 1995. It has been shown that a properly designed direct fuzzy controller can outperform conventional proportional integral derivative (PID) controllers [Heber B. et al 1995 ].
This paper presents an application of fuzzy logic to control the speed of a synchronous machine (SM). Based on the analysis of the SM transient response and fuzzy logic, a fuzzy controller is developed. The fuzzy controller generates the variations of the reference current vector of the SM speed control based on the speed error and its change. Digital simulation results shows that the designed fuzzy speed controller realises a good dynamic behaviour of the motor, a perfect speed tracking with no overshoot and a good rejection of impact loads disturbance. The results of applying the fuzzy logic controller to a SM show best performances and high robustness than those obtained by the application of a conventional controller (PI). In this paper, we propose several controllers based on fuzzy logic, to deduce the best one.
The organization of this paper is as follows: in section 2, the fuzzy logic control principle is described and used to design fuzzy logic controllers; in section 3, vector control principle for synchronous motor drive is presented, the proposed controllers are used to control the synchronous motor speed. In section 4, simulation results are given to show the effectiveness of these controllers and finally conclusions are summarized in the last section.

Fuzzy logic control
The structure of a complete fuzzy control system consists of the following main parts: Knowledge base, -Inference engine, -Defuzzification.

Figure
(1) shows the internal configuration of a fuzzy logic controller.

Fuzzy logic principle
The fuzzification module converts the crisp values of the control inputs into fuzzy values. A fuzzy variable has values which are defined by linguistic variables (fuzzy sets or subsets) such as low, Medium, high, big, slow… where each one is defined by a gradually varying In fuzzy set terminology, all the possible values that a variable can assume are named universe of discourse, and the fuzzy sets (characterized by membership functions) cover the whole universe of discourse. The shape of fuzzy sets can be triangular, trapezoïdale, etc [BOSE B. K. 1994;Bühler H. 1994].
A fuzzy control essentially embeds the intuition and experience of a human operator, and sometimes those of a designer and researcher. The data base and the rules form the knowledge base which is used to obtain the inference relation R. The data base contains a description of input and output variables using fuzzy sets. The rule base is essentially the control strategy of the system. It is usually obtained from expert knowledge or heuristics, it contains a collection of fuzzy conditional statements expressed as a set of IF-THEN rules, such as: where : (x 1, x 2, …, x n ) is the input variables vector, Y is the control variable, M is the number of rules, n is the number of fuzzy variables, (F 1 , F 2 ,… F n ) are the fuzzy sets.
For the given rule base of a control system, the fuzzy controller determines the rule base to be fired for the specific input signal condition and then computes the effective control action (the output fuzzy variable) [Bose B. K. 1994 ;Spooner J.T. et al 2002].
The composition operation is the method by which such a control output can be generated using the rule base. Several composition methods, such as max-min or sup-min and max-dot have been proposed in the literature.
The mathematical procedure of converting fuzzy values into crisp values is known as 'defuzzification'. A number of defuzzification methods have been suggested. The choice of defuzzification methods usually depends on the application and the available processing power. This operation can be performed by several methods of which center of gravity (or centroïd) and height methods are common [Spooner J.T. et al 2002 ;Rachid A. 1996].

Fig. 2. Basic structure of fuzzy control system
The actual crisp input are approximates to the closer values of the respective universes of discourse. Hence, the fuzzy inputs are described by singleton fuzzy sets.
The elaboration of this controller is based on the phase plan. The control rules are designed to assign a fuzzy set of the control input u for each combination of fuzzy sets of e and Δe . The performances of such controller depend on the quality of rules and the choice of the fuzzy sets that describe number of the inputs and the output of the controller. Table 1 shows one of possible control rules based on three membership functions [Aissaoui 2007]. The columns represent the rate of the error change de and the rows represent the error e. Each pair (e, de) determines the output level N to P corresponding to u.

Fuzzy control with three fuzzy subsets
Here N is negative, Z is zero, P is positive, are labels of fuzzy sets and their corresponding membership functions are depicted in figure (3). Figure (4) shows the corresponding output surface.  Fig. 4. The output surface of the fuzzy inference system for three fuzzy subsets using the inputs and the output. Here NB is negative big, NM is negative medium, ZR is zero, PM is positive medium and PB is positive big, are labels of fuzzy sets and their corresponding membership functions are depicted in figures (5). Figure (6) shows the corresponding output surface.  . The output surface of the fuzzy inference system for five fuzzy subsets using the inputs and the output.   (7). Figure (8) shows the corresponding output surface.  Fig. 8. The output surface of the fuzzy inference system for seven fuzzy subsets using the inputs and the output.

Fuzzy control with seven fuzzy subsets
The continuity of input membership functions, reasoning method, and defuzzification method for the continuity of the mapping   , fuzzy ue e  is necessary. In this paper, the triangular membership function, the max-min reasoning method, and the center of gravity defuzzification method are used, as those methods are most frequently used in many literatures [Bose B. K. 1994;Rachid A. 1996 ]. www.intechopen.com

Influence of the choice of Membership Function
The choice of membership functions (MF) is important in the design of fuzzy logic controller. The most MF shapes known and used frequently are: Triangular, Gaussian, Trapezoidal,… Different cases can be subject of our study, following the MF used and their distribution on the universe of discourse.    Fig. 13. Membership functions for input e, de and u arranged in symmetrical triangular shape and with limit recovery of the fuzzy sets Fig. 14. The output surface of the fuzzy inference system for five fuzzy subsets arranged in symmetrical triangular shape and with limit recovery of the fuzzy sets.

Limit recovery of fuzzy sets
www.intechopen.com Fig. 15. The output surface of the fuzzy inference system for five fuzzy subsets arranged in symmetrical triangular shape and with non-recovery of the fuzzy sets Fig. 16. The output surface of the fuzzy inference system for five fuzzy subsets arranged in symmetrical triangular shape and with non-recovery of the fuzzy sets www.intechopen.com

Interpretation and discussion
In this section, we have based our study on Triangular MF. It gives same results compared to Gaussian MF as it can see in figures (6) and (10) which represent the output surface of the fuzzy inference system of the inputs (e and de) and the output (u).
The symmetry and the recovery of the fuzzy sets (or MF) are important and they significantly affect the performance of FLC. It appears clearly in the surface of fuzzy inference system (figures 6, 12, 14, 16). It is better to choose the MF with a symmetrical shape and the recovery of two to three fuzzy sets is very interest. This comparison is made using the rules base presented in Table 2.

Description of machine drive
The schematic diagram of the speed control system under study is shown in figure (17). The power circuit consists of a continuous voltage supply which can provided by a six rectifier thyristors and a three phase GTO thyristors inverter whose output is connected to the stator of the synchronous machine.  (17) shows the schematic diagram of the speed control of synchronous motor using fuzzy logic controller.

Machine equations
The more comprehensive dynamic performance of a synchronous machine can be studied by synchronously rotating d-q frame model known as Park equations. field flux, e T -electromagnetic torque, l T -external load disturbance, p -pair number of poles, B -is the damping coefficient, J -is the moment of inertia, ω -electrical angular speed of motor. Ω -mechanical angular speed of motor,  -mechanical rotor position, e  -electrical rotor position.

Vector control
The self-control operation of the inverter-fed synchronous machine results in a rotor field oriented control of the torque and flux in the machine. The principle is to maintain the armature flux and the field flux in an orthogonal or decoupled axis. The flux in the machine is controlled independently by the field winding and the torque is affected by the fundamental component of armature current qs i . In order to have an optimal functioning, the direct current ds i is maintained equal to zero [Sturtzer G. & Smigiel E. 2000 ;Cambronne J. P. et al 1996].
Substituting (5) in (4), the electromagnetic torque can be rewritten for f i  constant and 0 ds i  as follow: In the same conditions, it appears that the ds v and qs v equations are coupled. We have to introduce a decoupling system, by introducing the compensation terms

Simulation results
In order to validate the control strategies as discussed above, digital simulation studies were made on the system described in figure (17). The speed and currents loops of the drive were also designed and simulated respectively with fuzzy control and PI control. The feedback control algorithms were iterated until best simulation results were obtained.
The speed loop was closed, and transient response was tested with both PI current control and fuzzy speed control. We used several types of fuzzy controller based on the cases presented in section (2.2). The simulation of the starting mode without load is done, followed by reversing the speed reference 100 rad/s is applied at t 1 = 1 s and eliminated at t 2 = 1.5 s.
The simulation is realized using the SIMULINK software in MATLAB environment.
www.intechopen.com Fig. 18. The response of the system with fuzzy speed controller using Rules base of Table 1. Fig. 19. The response of the system with fuzzy speed controller using Rules base of Table 2. www.intechopen.com Fig. 20. The response of the system with fuzzy speed controller using Rules base of Table 3. Fig. 21. Comparison of the system response for different controller, 1) PI, 2) 3 Fuzzy subsets 3) 5 Fuzzy subsets, 4) 7 Fuzzy subsets.
The figures (17)(18)(19)(20)(21) show the response of SM with using FLC. The FLC presents high quality to achieve the desired trajectory. It rejects the load disturbances rapidly with no overshoot and with a negligible steady state error. The decoupling of torque-flux is maintained in permanent regime.
The reason of superior performance of fuzzy control system is that it is adaptive in nature and the controller is able to realize different control laws for each inputs state (e and de).
From figure (21), the performances of the FLC can be shown clearly. Compared to PI controller, the FLC give good response to follow the desired trajectory with no overshoot, with a negligible steady state error and with the immediately reject of load disturbances.
The increase of the membership functions in fuzzification and defuzzification improve the quality of the FLC as it is shown in figure (21), however the computation time increase two. It will be better to have a FLC with high performance and with less computation time. The choice of FLC with five Fuzzy-subsets may fulfil these criteria. The choice of MF affects the performances of the FLC, it appears in figure (22) that the triangular or the Gaussian shape doesn't affect the speed control. However, in the presence of asymmetrical distribution the quality of control is bad. The non recovery of fuzzy set gives worst results. It will be better to choose MF with acceptable recovery of fuzzy sets. Fig. 22. Comparison of the system response for different MF shape: 1) Triangular, 2)Gaussian, 3) Asymmetrical, 4) limit Recovery, 5) Non recovery. www.intechopen.com

Robustness
In order to test the robustness of the used method we have studied the effect of the parameters uncertainties on the performances of the speed control .
To show the effect of the parameters uncertainties, we have simulated the system with different values of the parameter considered and compared to nominal value (real value).
To illustrate the performances of control, we have simulated the starting mode of the motor without load, and the application of the load ( 7Nm l T   ) at the instance t 1 = 2 s and its elimination at t 2 = 3 s; in presence of the variation of parameters considered (the moment of inertia, the stator resistances, the stator inductances) with speed step of +100 rad/s.      Table 2: 1) nominal case, 2) +50%.
For the robustness of control, a decrease or increase of the moment of inertia J or the resistances doesn't have any effects on the performances of the technique used (figures 23 and 24). An increase of the moment of inertia gives best performances, but it presents a slow dynamic response (figure 23). The fuzzy control gives to our controller a great place towards the control of the system with unknown parameters.

Conclusion
The study describes an application of fuzzy logic system in control of electrical machines. The fuzzy logic control presents a new approach to robust control. The control methodology is described and used to develop a simple robust controller to deal with uncertain parameters and external disturbances. The design of the FLC depends on the structure adopted in fuzzification, defuzzification and rule base. In choice of FLC structure, we have to reach a compromise between the complexity and the precision of controller. The design of the FLC depends on the shape, symmetry and the recovery of MF.
In this study, a complete fuzzy logic control, based on synchronous motor, has been described. The system was analyzed and designed. The performances were studied extensively by simulation to validate the theoretical concept. To avoid the complexity of the FLC and the decrease of its precision, we have adopted five subsets to describe each inputs and output variables. The simulation results show that the proposed controller is superior to conventional controller in robustness and in tracking precision. The simulation study www.intechopen.com indicates clearly the superior performance of FLC, because it is adaptive in nature. It appears from the response properties that it has a high performance in presence of the uncertain plant parameters and load disturbances. It is used to control system with unknown model. The control of speed by FLC gives fast dynamic response with no overshoot and negligible steady-state error. The decoupling, stability and convergence to equilibrium point are verified.
This study will be very helpful, to design a new controllers based on FLC. With use of FLC we can reach high quality in control of non linear systems.