Exercise 2.3(Inverted Pendulum: Gaussian Membership Functions): Suppose that for the inverted pendulum example, we use Gaussian membership functions as defined in Table 2. 4 on page 53 rather than the triangular membership functions. To do this, use the same center values as we had for the triangular membership functions, use the"left"and"right"membership functions shown in Table 2. 4 for the outer edges of the input universes of discourse, and choose the widths of all the membership functions to get a uniform distribution of the membership functions and to get adjacent membership functions to cross over with the ir neighboring membership functions at a certainty of 0.5 (a) Draw the membership functions for the input and output universes of discourse. Be sure to label all the xes and include both the linguistic values and the linguistic-numeric values. Explain why this choice of membership functions also properly represents the linguistic values (b)Assuming that we use the same rules as earlier, use a computer program to plot the membership function for the premise of a rule when you use the minimum operation to represent the "and"between the two elements in the premise. For this plot you will have e and d on the x and y axes and the value of the premise membership function on the z axis. Use the rule If error is zero and change-in-error is possmall Then force is negsmall as was done when we used triangular membership functions(see its premise membership function in Figure 2.11 on page 37) (c)Repeat(b)for the case where the product operation is used. Compare the results of (b) and(c) (d)Suppose that e(t)=0 and -e(0=x/8-T/32(=0.294). Which rules are on? Assume that minimum is used to represent the premise and implication. Provide a plot of the implied fuzzy sets for the two rules that result in the highest peak on their implied fuzzy sets (ie, the two rules that are"on the most) (e)Repeat(d)for the case where e(0)=r/4 and - e(0=7/8. Assume that the product is used to epresent the implication and minimum is used for the premise. However, plot only the one implied fuzzy set that (f For(d)us fuzzificat ion and find the output of the fuzzy controller. First, compute the output assuming that only the two rules found in(d)are on. Next, use the implied fuzzy sets from all the rules that are on (note that more than two rules are on). Note that for computat ion of the area under a gaussian curve, you will need to write a simple numerical integration routine (e.g, based on a trapezoidal approximation) since there is no closed-form solution for the area under a gaussian curve (g)Repeat(f) for the case in(e). (h) Assume that the minimum operation is used to represent the premise and imp lication. Plot the control surface for the fuzzy controller ( Repeat(h) for the case where the product operation is used for the premise and implication. Compare(h) d( 2.3
Exercise 2.3 (Inverted Pendulum: Gaussian Membership Functions): Suppose that for the inverted pendulum example, we use Gaussian membership functions as defined in Table 2.4 on page 53 rather than the triangular membership functions. To do this, use the same center values as we had for the triangular membership functions, use the “left” and “right” membership functions shown in Table 2.4 for the outer edges of the input universes of discourse, and choose the widths of all the membership functions to get a uniform distribution of the membership functions and to get adjacent membership functions to cross over with their neighboring membership functions at a certainty of 0.5. (a) Draw the membership functions for the input and output universes of discourse. Be sure to label all the axes and include both the linguistic values and the linguistic-numeric values. Explain why this choice of membership functions also properly represents the linguistic values. (b) Assuming that we use the same rules as earlier, use a computer program to plot the membership function for the premise of a rule when you use the minimum operation to represent the “and” between the two elements in the premise. For this plot you will have e and d e dt on the x and y axes and the value of the premise membership function on the z axis. Use the rule If error is zero and change-in-error is possmall Then force is negsmall as was done when we used triangular membership functions (see its premise membership function in Figure 2.11 on page 37). (c) Repeat (b) for the case where the product operation is used. Compare the results of (b) and (c). (d) Suppose that e(t) = 0 and ( ) / 8 / 32( 0.294) d e t dt = − = . Which rules are on? Assume that minimum is used to represent the premise and implication. Provide a plot of the implied fuzzy sets for the two rules that result in the highest peak on their implied fuzzy sets (i.e., the two rules that are “on” the most). (e) Repeat (d) for the case where e t( ) / 4 = and ( ) / 8 d e t dt = . Assume that the product is used to represent the implication and minimum is used for the premise. However, plot only the one implied fuzzy set that reaches the highest value. (f) For (d) use COG defuzzification and find the output of the fuzzy controller. First, compute the output assuming that only the two rules found in (d) are on. Next, use the implied fuzzy sets from all the rules that are on (note that more than two rules are on). Note that for computation of the area under a Gaussian curve, you will need to write a simple numerical integration routine (e.g., based on a trapezoidal approximation) since there is no closed-form solution for the area under a Gaussian curve. (g) Repeat (f) for the case in (e). (h) Assume that the minimum operation is used to represent the premise and implication. Plot the control surface for the fuzzy controller. (i) Repeat (h) for the case where the product operation is used for the premise and implication. Compare (h) and (i). Exercise 2.3 (a)
0.5 0 error large-1">zer.0.5 -0.5 0 15 0.5 0 ch-in-e 0.50.40.2 0.2 0.4 -1negsmalloyzeropossmal22-po 05 0.8 0.5 9 4 2 (c)
(b)、 (c)
1 08 90.6 0.4 0.2 0.E 0.4 -05 change in error error (d)、规则1. If error is zero and change-in.- error is zero then force is zero # 2. If error is zero and change-in-error is possmall Then force is negsmall put2=0 output =-8.03 07854 07854 15708 15708 其中 inputI为 change-in-error input2为 error outputI为 force
(d)、规则 1. If error is zero and change-in-error is zero Then force is zero 规则 2. If error is zero and change-in-error is possmall Then force is negsmall 其中 input1 为 change-in-error input2 为 error output1 为 force
AE: If error is possmall and change-in-error is possmall Then force is neglarge input1 = 0.785 nput2=0393 output=-20 15708 15708 其中 inputI为 error input2为 change-in-error outputI为 force (f)、所做结果如d图所示。 force=80 (g)、所作结果如e图所示。 forces=-2 (h) 0 5 input2 (i) 199599 199599 199599 -199599 0 input2 putt
(e)、 规则:If error is possmall and change-in-error is possmall Then force is neglarge. 其中 input1 为 error input2 为 change-in-error output1 为 force (f)、所做结果如 d 图所示。force=-8.03 (g)、所作结果如 e 图所示。force=-20 (h)、 (i)