Você está na página 1de 5

Fuzzy Logic Application in Motor Drives

Posted in Fuzzy Logic, Motor Drives on February 8th, 2010 by Rakesh Dhawan

Fuzzy logic imitates human thinking more closely when we think about desired device (such as a washing machine etc.) behavior. It has significant advantages in developing control algorithms for industrial as well as commercial devices or appliances. An example of a Fuzzy rule for motor speed control is given below: IF motor temperature is high THEN reduce phase current to a lower value or IF speed control is active and speed oscillations are high THEN slightly reduce the proportional gain Fuzzy Logic implementations are relatively simple in DSPs (Digital Signal Processors) or Microcontrollers. It has several advantages in simplifying the overall understanding of the desired behavior of the device. For those who like to think in terms of programming languages such as C, C++, assembly etc. Fuzzy logic is more like C++ in terms of understanding and implementing control algorithms whereas Binary logic is more like assembly programming language. However, most engineers are trained in thinking using Binary logic. Fuzzy logic is often defined as being able to deal with vagueness or fuzziness. It should be thought more as providing precise definition of human thoughts. Let us look at two sentences below: It is dark outside (binary statement). It is very dark outside (fuzzy statement). It is slightly dark outside (fuzzy statement). Now, one can characterize darkness by a continuous linear function (called membership function in Fuzzy language) from o to 1 symbolizing low darkness to high darkness. Now we have infinite values to deal with in darkness. That is not really the case with a binary statement. Therefore, Fuzzy logic can be precise in depicting human thought. It is easy to develop an N-dimensional(with N factors interacting with each other) fuzzy inferencing engine. This inferencing technique is illustrated in Fig. 1 of Fuzzy Logic based Inductor Program. For each variable, there are the following four main steps: 1. 2. Fuzzification (processing each variable through a membership function) Formation of Fuzzy rules (which are mostly in terms of IF-THEN statements)

3.

Fuzzy Inferencing (This is where the variables are processed through the Fuzzy rules. Here

boolean operators are used to convert IF-THEN statements into boolean statements) 4. Defuzzification (This is where a single value on a scale of 0 to 1 is obtained for the desired

output. A final form of the membership function is determined and by using an averaging method such as COG (center of gravity), a single value for the output is obtained.) The above four steps can be repeated several times based on the system complexity. Now let us look at a brushless motor controller with Fuzzy logic. Below is a block diagram of a brushless motor controller with six-step control:

Brushless Motor Controller

The above conventional controller is modified as shown below:

Brushless Motor Controller with Fuzzy Logic

In the above block diagram we have replaced the conventional PI regulator with a fuzzy controller. We have also added a differentiator to sense the rate of change and direction of the error signal (E). The rate of change and direction indicator is denoted by CE. The fuzzy controller decides its output based on the pattern of the speed loop error signal.

Now a fuzzy rule can be established as follows: RULE 1: IF Error (E) is almost zero (AZ) AND rate of change of E (CE) is slightly positive (SP) THEN the output of the Fuzzy controller (OP) should be set to slightly negative (SN) Obviously, with the above statement, you are trying to correct the overshoot in speed. Here E and CE are our fuzzy input variables and the OP is the output fuzzy variable. And characterizations such as almost zero (AZ), slightly positive (SP) and slightly negative (SN) would need to be processed through corresponding membership functions defined for E and CE. And now let us define another rule: RULE 2: IF Error (E) is slightly positive (AZ) AND rate of change of E (CE) is slightly negative (SN) THEN the output of the Fuzzy controller (OP) should be set to almost zero (AZ) With the above rule, we know that the system has almost reached steady state, hence there is no need to increase the output of the fuzzy controller. Now, let us define our membership function for E and CE. We would assume that the membership functions of triangular type as shown below:

This membership function is to fuzzify the input variables.

Now the membership function collating slightly negative (SN), almost zero (AZ) and slightly positive (SP) are shown below:

Membership Functions defining slightly negative, almost zero and slightly positive attributes

Compare these membership functions with those in Fig. 5 of Fuzzy Logic based Inductor Program. Now let us observe the following: SN has a range of -4 to 0. When SN is -2, it is assigned a value of 1.0. AZ has a range of -2 to +2. When AZ is 0, it is assigned a value of 1.0. SP has a range of 0 to +4. When SP is +2, it is assigned a value of 1.0. Now there is no reason to use the triangular membership functions. We can use other membership functions as well. In control applications, triangular membership functions provide most stable and predictable results. Other membership functions can work well, however, analysis and simulation are required to verify their usefulness and stability. Now, considering the value of E to be -1 and CE to be +1.8, let us see what happens: For E = -1.0, looking at the membership functions above: SN=0.5, AZ=0.5, SP=0 FOR CE=+1.0, SN=0, AZ=0.5, SP=0.5 with Rule 1: OP = AZ (E) AND SP(CE) = 0.5 AND 0.5 =0.5 with Rule 2: OP AZ(E) AND SN(CE) = 0.5 AND 0 = 0 with above rules, OP is assigned a value of 0.5. Thereafter, we use COG method to obtain a crisp value of the OP as shown below:

using COG method to defuzzify output variable

Now using COG method, OP = 3.5/8 = 0.4375. By using Fuzzy logic, we have obviated the need for PI, PID, and type 1, 2 and 3 compensators. Is that not cool? This is where a clever digital technique can pretty much obliterate an age old analog technique.

Você também pode gostar