16
V.R.S & Y.R.N COLLEGE OF ENGINEERING & TECHNOLOGY CHIRALA A paper Presentation on Speed control of DC Motor by using Fuzzy Logic By B .D. V. Nageswara Rao. P.Anantha Naga Dharmapal Roll No:05L11A0208. Roll No:05L11A0203. DocumentToPDF trial version, to remove this mark, please register this software.

Fuzzy Logic- - 22

Embed Size (px)

Citation preview

Page 1: Fuzzy Logic- - 22

V.R.S & Y.R.N COLLEGE OF ENGINEERING & TECHNOLOGYCHIRALA

A paper Presentation on

Speed control of DC Motor by using Fuzzy Logic

By

B .D. V. Nageswara Rao. P.Anantha Naga Dharmapal

Roll No:05L11A0208. Roll No:05L11A0203.

DocumentToPDF trial version, to remove this mark, please register this software.

Page 2: Fuzzy Logic- - 22

Contents1. Introduction2. Fuzzy system

a. Fuzzy variables.b. Membership functions.c. Rule matrix.d. Defuzzyfication.

3. Speed control of DC Motor4. Applications5. Conclusions6. References

DocumentToPDF trial version, to remove this mark, please register this software.

Page 3: Fuzzy Logic- - 22

The concept of Fuzzy Logic (FL) was conceived by Lotfi Zadeh, aprofessor at the University of California at Berkley, and presented not as acontrol methodology, but as a way of processing data by allowing partial setmembership rather than crisp set membership or non-membership. Thisapproach to set theory was not applied to control systems until the 70's dueto insufficient small-computer capability prior to that time. Professor Zadehreasoned that people do not require precise, numerical information input,and yet they are capable of highly adaptive control. If feedback controllerscould be programmed to accept noisy, imprecise input, they would be muchmore effective and perhaps easier to implement.

What is Fuzzy Logic?

FL is a problem-solving control system methodology that lends itselfto implementation in systems ranging from simple, small, embedded micro-controllers to large, networked, multi-channel PC or workstation-based dataacquisition and control systems. It can be implemented in hardware,software, or a combination of both. FL provides a simple way to arrive at adefinite conclusion based upon vague, ambiguous, imprecise, noisy, ormissing input information. FL's approach to control problems mimics how aperson would make decisions, only much faster.

Human thinking and decisions are based on ‘yes’/’no’ reasoning, or1’/ 0” logic. Accordingly Boolean logic was developed, and Expert Systemprinciples were formulated based on Boolean logic. It has been argued thathuman thinking does not always follow crisp “yes”/ no” logic, but is oftenvague, qualitative, uncertain, imprecise, or fuzzy in nature. For example, anES rule for speed control in a variable-speed drive may be

IF speed of the motor is greater than 1500 rpm AND the machine statortemperature is between 60F and 100FTHEN set the stator current I less than 10 amps

The same rule in FL may read as

IF speed of the motor is high and stator temperature is mediumTHEN set the stator current I low

DocumentToPDF trial version, to remove this mark, please register this software.

Page 4: Fuzzy Logic- - 22

FL can help to supplement an ES, and it is sometimes hybrided with thelatter to solve complex problems. FL has been successfully applied inprocess control, modeling, estimation, identification, diagnostics, militaryscience, stock market prediction, etc.

Why Fuzzy control?

In general, a control system based on AI is defined as intelligentcontrol. A fuzzy control system essentially embeds the experience andintuition of a human plant operator, and sometimes those of a designerand/or researcher of a plant. The design of a conventional control system isnormally based on the mathematical model of a plant. If an accurate modelis available with known parameters, it can be analyzed, for example by abode or Nyquist plot, and a controller can be designed for the specifiedperformance. Such a procedure is tedious and time testing, although CADprograms are available for such design. Unfortunately, for complex process,such a cement plants, nuclear reactors, and the like reasonably goodmathematical model is difficult to find. On the other hand, the plant operatormay have good experience for controlling the process.

Power electronics system models are often ill-defined. Even if a plantmodel is multi variable, complex, and non-linear, such as the dynamic d-qmodel of an ac machine. Vector or field-oriented control of a drive can overcome this problem, but accurate vector control is nearly impossible, andthere may be a wide parameter variation Problem in the system.

Fuzzy control, on the other hand, does not strictly need anymathematical model of the plant .It is based on plant operator experience andheuristics, as mentioned Previously, and it is very is to apply. Fuzzy controlis basically an adaptive and nonlinear control, which gives robustperformance for linear or nonlinear plant with parameter variation.

DocumentToPDF trial version, to remove this mark, please register this software.

Page 5: Fuzzy Logic- - 22

a. Linguistic Variables :

In 1973, Professor Lotfi Zadeh proposed the concept of linguistic or"fuzzy" variables. Think of them as linguistic objects or words, rather thannumbers. The sensor input is a noun, e.g. "temperature", "displacement","velocity", "flow", "pressure", etc. Since error is just the difference, it can bethought of the same way. The fuzzy variables themselves are adjectives thatmodify the variable (e.g. "large positive" error, "small positive" error ,"zero"error, "small negative" error, and "large negative" error). As a minimum, onecould simply have "positive", "zero", and "negative" variables for each ofthe parameters. Additional ranges such as "very large" and "very small"could also be added to extend the responsiveness to exceptional or verynonlinear conditions, but aren't necessary in a basic system.

b. Membership functions:

The membership function is a graphical representation of the magnitudeof participation of each input. It associates a weighting with each of theinputs that are processed, define functional overlap between inputs, andultimately determines an output response. The rules use the inputmembership values as weighting factors to determine their influence on thefuzzy output sets of the final output conclusion. Once the functions areinferred, scaled, and combined, they are defuzzified into a crisp outputwhich drives the system. There are different membership functionsassociated with each input and output response. Some features to note are:SHAPE - triangular is common, but bell, trapezoidal, haversine and,exponential have been used. More complex functions are possible butrequire greater computing overhead to implement.. HEIGHT or magnitude(usually normalized to 1) WIDTH (of the base of function),SHOULDERING (locks height at maximum if an outer function. Shoulderedfunctions evaluate as 1.0 past their center) CENTER points (center of themember function shape) OVERLAP (N&Z, Z&P, typically about 50% ofwidth but can be less).

DocumentToPDF trial version, to remove this mark, please register this software.

Page 6: Fuzzy Logic- - 22

c. Rule Matrix :

In the last article the concept of linguistic variables was presented. Thefuzzy parameters of error (command-feedback) and error-dot (rate-of-change-of-error) were modified by the adjectives "negative", "zero", and"positive". To picture this, imagine the simplest practical implementation, a3-by-3 matrix. The columns represent "negative error", "zero error", and"positive error" inputs from left to right. The rows represent "negative","zero", and "positive" "error-dot" input from top to bottom. This planarconstruct is called a rule matrix. It has two input conditions, "error" and"error-dot", and one output response conclusion (at the intersection of eachrow and column). In this case there are nine possible logical product (AND)output response conclusions.

Although not absolutely necessary, rule matrices usually have an oddnumber of rows and columns to accommodate a "zero" center row andcolumn region. This may not be needed as long as the functions on eitherside of the center overlap somewhat and continuous dithering of the outputis acceptable since the "zero" regions correspond to "no change" outputresponses the lack of this region will cause the system to continually hunt for"zero". It is also possible to have a different number of rows than columns.This occurs when numerous degrees of inputs are needed. The maximumnumber of possible rules is simply the product of the number of rows and

DocumentToPDF trial version, to remove this mark, please register this software.

Page 7: Fuzzy Logic- - 22

columns, but definition of all of these rules may not be necessary since someinput conditions may never occur in practical operation. The primaryobjective of this construct is to map out the universe of possible inputs whilekeeping the system sufficiently under control

fig : Example of rule matrix

d. Defuzzyfication :

Combining the results of the inference process and then computing the“fuzzy centroid” of the area accomplish the defuzzification of the data into acrisp output. The weighted strengths of each output their respective outputmembership function center points multiply member function and summed.

DocumentToPDF trial version, to remove this mark, please register this software.

Page 8: Fuzzy Logic- - 22

Finally, this area is divided by the sum of the weighted member functionstrengths and the result is taken as the crisp output. One feature to note isthat since the zero center is at zero, any zero strength will automaticallycompute to zero. If the center of the zero function happened to be offsetfrom zero (which is likely in a real system where heating and cooling effectsare not perfectly equal), then this factor would have an influence.

(neg_center * neg_strength + zero_center * zero_strength + pos_center *pos_strength) = OUTPUT(neg_strength + zero_strength + pos_strength)

(-100 * 0.866 + 0 * 0.500 + 100 * 0.000) = 63.4%(0.866 + 0.500 + 0.000)

Figure 8 - The horizontal coordinate of the centeriod is taken as the crisp output

The horizontal coordinate of the centroid of the area marked in Figure8 is taken as the normalized, crisp output. This value of -63.4%(63.4% Cooling) seems logical since the particular input conditions(Error=-1, Error-dot=+2.5) indicate that the feedback has exceededthe command and is still increasing therefore cooling is the expectedand required system response.

DocumentToPDF trial version, to remove this mark, please register this software.

Page 9: Fuzzy Logic- - 22

Following is a system diagram, Figure 3, for a "getting acquainted withfuzzy" project that provides speed control and regulation for a DC motor.The motor maintains "set point" speed, controlled by a stand-aloneconverter-controller, directed by a BASIC fuzzy logic control program in apersonal computer.

The above speed control system is low cost and suitable for learning at homewhere being rigorously, mathematically correct is not required. It isimportant to be aware that this speed controller is only an experimentalcontroller to get familiar with the fuzzy logic concept. It is not whatengineers call a rigorous, technically correct application of fuzzy logic. Thedifference is in the fact that this approach does not add triangles to computecenter of mass as specified by Dr. Bart Kosko .Adding triangles can be done,but is difficult and time consuming, however that is the way a trulyprofessional application would be designed. There are IC’s that do it all andcommercially available fuzzy logic controllers that do everything correctly.

This fuzzy logic controller project was done under pressure of very limitedmoney available, resulting in an inexpensive approach. What is needed isan analog to digital converter, which connects to a PC, and a digital toanalog output device from the PC to the transistors and DC motor-generatorbeing controlled. Often this is all in one plug-in card that goes inside thePC. Plug in the A to D and D to A converter in the PC and write a program

DocumentToPDF trial version, to remove this mark, please register this software.

Page 10: Fuzzy Logic- - 22

to measure the input and control the output according to fuzzy logicprinciples. This approach can be somewhat expensive and was not used inthis case.

The steps in building our system are:

1. Determine the control system input. Examples: The temperature is theinput for your home air conditioner control system. Speed of the car is theinput for your cruise control.

In our case, input is the speed in Rpm of the DC motor, for which we aregoing to regulate the speed. See Figure 3 above. Speed error between thespeed measured and the target speed of 2,420 Rpm is determined in theprogram. Speed error may be positive or negative. We measure the DCoutput voltage from the generator. This voltage is proportional to speed.This speed-proportional voltage is applied to an analog input channel of ourfuzzy logic controller, where the analog to digital converter and the pesonalcomputer, including appropriate software, measure it.

2. Determine the control system output. For a home air conditioner, theoutput is the opening and closing of the switch that turns the fan andcompressor on and off. For a car's cruise control, the output is theadjustment of the throttle that causes the car to return to the target speed.

In our case, we have just one control output. This is the voltage connectedto the input of the transistor controlling the motor. See Figure 3.

3. Determine the target set point value, for example 70 degrees F for yourhome temperature, or 60 Miles per hour for your car.

In our case, the target set point is 2,420 Rpm.

4. Choose word descriptions for the status of input and output.

For the steam engine project, Professor Mamdani used the following forinput:

Positive Big, Positive Medium, Positive Small, Almost No Error, NegativeSmall, Negative Medium, Negative Big.

DocumentToPDF trial version, to remove this mark, please register this software.

Page 11: Fuzzy Logic- - 22

Our system is much less complicated, so let us select only three conditionsfor input:

Input Status Word Descriptions

Too slow, About right, Too fast

And, for output:

Output Action Word Descriptions

Speed up, Not much change needed, Slow down

RULES

Translate the above into plain English rules (called "linguistic" rules by Dr.Zadeh). These Rules will appear in the BASIC computer program as "If-Then" statements:

Rule 1: If the motor is running too slow, then speed it up.Rule 2: If motor speed is about right, then not much change is needed.Rule 3: If motor speed is to fast, then slow it down.

The next three steps use a charting technique that will lead to a computerprogram. The purpose of the computer program is to determine the voltageto send to the speed controlled motor. One function of the charting techniqueis to determine the "degree of membership" (see Ch. 1) of the Too slow,About right and Too fast triangles, for a given speed. Further, the chartingtechnique helps make the continuous control feedback loop easier tovisualize, program and fine tune.

5. Associate the above inputs and outputs as causes and effect with a RulesChart, as in Figure 4, below. The chart is made with triangles, the use ofwhich will be explained. Triangles are used, but other shapes, such as bellcurves, could also be used. Triangles work just fine and are easy to workwith. Width of the triangles can vary. Narrow triangles provide tightcontrol when operating conditions are in their area. Wide triangles providelooser control. Narrow triangles are usually used in the center, at the setpoint (the target speed). For our example, there are three triangles, as canbe seen in Figure 4 (three rules, hence three triangles).

DocumentToPDF trial version, to remove this mark, please register this software.

Page 12: Fuzzy Logic- - 22

6. Figure 4 (above) is derived from the previously discussed Rules andresults in the following regarding voltage to the speed controller:

a. If speed is About right then Not much change needed in voltage to thespeed controller.

b. If speed is Too slow then increase voltage to the speed controller toSpeed up.

c. If speed is Too fast then decrease voltage to the speed controller to Slowdown.

DocumentToPDF trial version, to remove this mark, please register this software.

Page 13: Fuzzy Logic- - 22

7. Determine the output that is the voltage that will be sent from thecontroller/signal conditioner/transistor to the speed controlled motor. Thiscalculation is time consuming when done by hand, as we will do below, butthis calculation takes only thousandths of a second when done by acomputer.

Assume something changes in the system causing the speed to increase fromthe target speed of 2,420 Rpm to 2,437.4 Rpm, 17.4 Rpm above the 'setpoint." Action is needed to "pull" the speed back to 2,420 Rpm. Intuitivelywe know we need to reduce the voltage to the motor a little. The "cause"chart and vertical speed line appear as follows, see Figure 5 below:

The vertical line intersects the About right triangle at .4 and the Too fasttriangle at .3. This is determined by the ratio of sides of congruent trianglesfrom Plane Geometry:

Intersect point / 1 = 11.6/29 = .4Intersect point / 1 = 17.4/58 = .3

8. The next step is to draw "effect" (output determining) triangles with theirheight "h" determined by the values obtained in Step 7, above. Thetriangles to be drawn are determined by the rules in Step 6. Since thevertical 2,437.4 Rpm speed line does not intersect the Too slow triangle, wedo not draw the Speed up triangle. We draw the Not much change and theSlow down triangles because the vertical speed line intersects the Aboutright and Too fast triangles. These "effect" triangles will be used todetermine controller output, that is the voltage to send to the speed control

DocumentToPDF trial version, to remove this mark, please register this software.

Page 14: Fuzzy Logic- - 22

transistor. The result is affected by the widths we have given the trianglesand will be calculated. See Figure 6, below. The Not much changetriangle has a height of .4 and the Slow down triangle has a height of .3,because these were the intersect points for their matching "cause" triangles;see Figure 4, above.

The output, as seen in Figure 6 (above), is determined by calculating thepoint at which a fulcrum would balance the two triangles, as follows:

The Area of the Not much change triangle is: 1/2 X Base X Height = .5 X.04 X .4 = .008. Area of the Slow down triangle is .5 X .08 X .3 = .012.

Compute the controller output voltage by finding the point on the outputvoltage, Vdc, axis where the "weight" (area) of the triangles will balance.Assume all the weight of the Not much change triangle is at 2.40 Vdc and allthe weight of the Slow down triangle is at 2.36 Vdc. We are looking for thebalance point.

Find the position of the controller output voltage (the balance point) with thefollowing calculation:

The above system was tested with changing loads on the rotating shaft, andreturned the speed of the motor to within 2 % of the 2,420 Rpm set point inless than 1.5 seconds. The accuracy with which the set point speed can bemaintained is determined by the resolution of the analog to digital anddigital to analog conversion circuits in the fuzzy logic controller. Typical

DocumentToPDF trial version, to remove this mark, please register this software.

Page 15: Fuzzy Logic- - 22

"low cost" resolution is "8 bit", 256 increments. Higher cost "12 bit" unitsprovide 4,096 increments.

the control range, the better the control. Fortunately, most system controlproblems can be solved with relatively few patches. A patch, or rule, maybe anything that solves the problem. If the system required it, you couldeven mix continuous feedback loop control and off-on control over achannel's control range, if that solved the problem.

4 . A p p l i c a t i o n s

a. Automobile and other vehicle subsystems, such as automatictransmissions, ABS and cruise control Air conditioners.

b. Cameras.c. Digital image processing, such as edge detection.d. Rice cookers.e. Elevators.f. Washing machines and other home appliances.g. Video game artificial influences.h. Automatic control of dam gates for hydroelectric-power plants.i. Simplified control of robots.j. Preventing un wanted temperature fluctuations in air conditioning

systemsk. Improved fuel-consumption for automobilesl. Improved safety for nuclear reactors

DocumentToPDF trial version, to remove this mark, please register this software.

Page 16: Fuzzy Logic- - 22

In this paper we have given the introduction of the fuzzy logic andalso the Advantages compared with the conventional control methods.Mainly we have explained how the fuzzy control is different from theBoolean logic. we have also given the applications of the fuzzy logic. In theapplications we have explained the speed control of DC motor by usingfuzzy logic.

7 . R e f e r e n c e s

1. Modern power electronics and AC Drives. By Bimal K. Bose.

2. http://en.wikipedia.org/wiki/Fuzzy_set#Definition

3. http://www.seattlerobotics.org/encoder/mar98/fuz/flindex.html

DocumentToPDF trial version, to remove this mark, please register this software.