EarthWeb   
HomeAccount InfoLoginSearchMy ITKnowledgeFAQSitemapContact Us
     

   
  All ITKnowledge
  Source Code

  Search Tips
  Advanced Search
   
  

  

[an error occurred while processing this directive]
Previous Table of Contents Next


A common technique for accomplishing this task is the Center of Area (COA) or centroid method (Larkin, 1985). In the COA method, the action prescribed by each rule can play a part in the final crisp value of F. The contribution of each rule to the final value of F is proportional to the minimum confidence (the minimum value of the membership function values on the left side of the rule) one has in that rule for the specific state of the physical system at the particular time. The net result is that all of the rules are considered in proportion to the confidence associated with the truth of the particular rule at the particular time. With the determination of a strategy for resolving “conflicts” in the actions prescribed by the individual rules, the FLC is complete.

In Chapter 2, the defuzzification involved “chopping off” triangles to obtain trapezoids. In the cart-pole balancer, an alternative approach is introduced in which the membership functions prescribed by a particular rule are not chopped off, rather they are scaled down. Thus, actions described by triangular membership functions remain triangular in the solution plots. To demonstrate this alternative approach to defuzzification, and to reinforce the way an FLC works, consider the following possible state of the cart-pole system: x = -0.5, = -2.0, θ = -0.5, and = 2.0. For this state, the condition variables have the following values:

Ex = -0.5, ΔEx = -2.0, Eθ = -0.5, and ΔEθ = 2.0. These variable values are fuzzified via the fuzzy membership functions to elicit the following values:

Ex μNB = 0.25, μNS = 0.35, μPS = 0.0, and μPB = 0.0;
ΔEx μN = 0.75, μNZ = 0.0, and μP = 0.0;
Eθ μN = 0. 15, μNZ = 0.42, and μP = 0.0;
ΔEθ μN = 0.0, μNZ = 0.0, and μP = 0.73.

The above membership function values are used to determine the extent to which the rules are applicable. It turns out that the following four rules are applicable:

IF {Ex IS NB AND ΔEx IS N AND Eθ IS N AND ΔEθ IS P} THEN {F IS PB}
IF {Ex IS NB AND ΔEx IS N AND Eθ IS Z AND ΔEθ IS P} THEN {F IS PB}
IF {Ex IS NS AND ΔEx IS N AND Eθ IS Z AND ΔEθ IS P} THEN {F IS PM}
IF {Ex IS NS AND ΔEx IS N AND Eθ IS N AND ΔEθ IS P} THEN {F IS PM}

The solution plot produced for this situation appears in Figure 3.4. Notice that the triangles have simply been scaled so that their height is equal to the minimum confidence associated with the rule that prescribes them; they maintain their triangular shape. According to this figure, the fuzzy cart-pole controller responds to a state in which x = -0.5, = -2.0, θ = -0.5, and = 2.0 with a force of magnitude 7.2.


Figure 3.4  Solution plot in which actions are obtained by scaling.

Figure 3.5 shows results for the cart-pole system described above. The rules and membership functions set forth by the authors form an FLC that effectively accomplishes the control task: it drives the cart to the center of the track in approximately 20 seconds while balancing the pole. This controller was developed over time through a trial-and-error process in which potential rules and membership functions were tested over and over again, until the ones shown were deemed adequate. However, as we will see later, a more effective controller can be developed with far less trial-and-error effort.


Figure 3.5  The FLC is able to achieve the control objective of driving both the cart position and the pole angle to zero. Furthermore, the controller is able to keep these variables at their desired setpoints.

3.4 Review/Preview

In this chapter we have applied the step-by-step procedure set forth in Chapter 2 to a more difficult problem, a cart-pole balancing problem. The cart-pole system is more difficult for at least three reasons: (1) it includes four condition variables, (2) it is a coupled system, and (3) the appropriate rules are not readily apparent. Nonetheless, an effective FLC has been developed that is capable of controlling the system from a variety of initial condition positions.

This chapter also introduced an alternative defuzzification procedure. In Chapter 2 we presented a center of area approach that used triangular action membership functions that had been chopped off. In the current chapter we introduced an alternative means for scaling membership functions in which membership functions maintain their shape but are reduced in size. Initially, the authors experimented with this alternative approach because we were always looking for a better, more effective or more efficient way of doing things. Our experience (and it took us quite a while to convince ourselves of this) led us to the conclusion that it really did not matter which approach we used. We could get either approach to produce an effective controller. This effort is summarized in a report by Karr, Fleming, and Vann (1994).


Previous Table of Contents Next

Copyright © CRC Press LLC

HomeAccount InfoSubscribeLoginSearchMy ITKnowledgeFAQSitemapContact Us
Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.