Fuzzy Basketball Throwing Strength Control System for Vision-Based Humanoid Robot Chi-Tai Cheng, Ching-Chang Wong, Yueh-Yang Hu, I-Hsiang Tseng, Yi-Fan Chung, and Min-Wei Chou Department of Electrical Engineering, Tamkang University New Taipei City, Taiwan, ROC [email protected]

Abstract. A fuzzy basketball throwing strength control system for vision-based humanoid robot is proposed in this paper. The implemented method is able to adjust the speed of throwing ball for joining the basketball event in HuroCup (Humanoid Robot World Cup Soccer Tournament). The proposed method speeds up the aiming time and increases the shooting accuracy. A two inputs and one output fuzzy system are designed in this paper. Two inputs, the distance and the voltage, are used for the implemented method. The robot detects the distance between the robot and basket based on the robot’s vision system. An analog to digital system is applied to measure the robot’s voltage, which changes the torque of the motor. The output value of the fuzzy system is the motor speed of the shoulder. The proposed fuzzy system is able to decide the motor speed of the shoulder to throw the table tennis ball, which is substituted for the basketball. The effectiveness of the system is demonstrated in an empirical evaluation. Keywords: Humanoid Robot, Fuzzy Controller, Basketball.

1

Introduction

RoboCup [1] and FIRA (Federation of International Robot-soccer Association) [2] are two major leagues for holding the robotic competitions. Both of them are providing different category for the participations. HuroCup (Humanoid Robot World Cup Soccer Tournament) is proposed in FIRA to emphasize the technical development of the humanoid robot. The idea of HuroCup is to develop a humanoid robot which is able to do many different sports including Basketball, Obstacle Run, and Climbing Wall and so on. The basketball event is a specific topic for the eye and hand coordination. The sketch of the basketball event is shown as Fig. 1. This paper aims to implement a fuzzy basketball throwing strength control system on a humanoid robot. The output of this system detects the appropriate speed of the shoulder motor to control the distance of throwing basketball. The robot needs to be put on the Start Point, which is 90 cm away from the basket, when the game starts. The table tennis ball is put inside the Ball Zone by the referee randomly. The Ball Zone is outside of the Three Point Circle and inside of a curve 25 cm away from the center of the Three K. Omar et al. (Eds.): FIRA 2013, CCIS 376, pp. 275–285, 2013. © Springer-Verlag Berlin Heidelberg 2013

276

C.-T. Cheng et al.

Point Circle. The radius of the Three Point Circle is 60cm. The basket with the red color is the center of the Three Point Circle. The height of the top of the basket is 25 cm. The diameter of the basket is 10 cm. The robot is allowed to throw or put the ball in to the basket anywhere. If the robot throws the ball into the basket at the outside of the Three Point Circle, this throw is able to get 3 points. If the robot put the ball into the basket at anywhere inside of the Three Point Circle, this action will get 2 points. In order to accomplish the whole procedure, the humanoid robot needs to able to recognize the table tennis ball and the basket, pick up the ball and throw the ball.

Fig. 1. Basketball game field

A two inputs and one output fuzzy system is applied in this paper. Fuzzy system has been applied rapidly and extensively since Zadeh proposed in 1965 [3-7]. The proposed robot needs to be able to throw the ball into the basket from anywhere outside the Three Point Circle to get 3 points. There are hundreds and thousands possibility value for the distance between the basket and the robot. It is not efficiency if just set up different throwing strength for different distance. The robot rotates its arm by a servo motor. However, the voltage of the batteries on the robot influences the throwing strength directly. This paper used the distance and the voltage as input of the fuzzy system. The output of the fuzzy is the throwing strength, which is able to let the robot throw the 3 points ball efficiently. The remainder of this paper is organized as follows: Section 2 introduces the distance measurement method, Section 3 describes voltage detection and basketball throwing method, Section 4 explains the fuzzy-based basketball throwing method, the performance of the proposed method is tested on a real humanoid robot in Section 5, and Section 6 concludes the paper.

Fuzzy Basketball Throwing Strength Control System

2

277

Distance Measurement Method

The distance between the robot and the basket is the first input for the proposed fuzzy system. In order to measure the distance, the relationship of the distance can be explained as the Fig 2. θv is the angle of depression of the robot, H robot is the height of the camera, and H basket is the height of the basket. The distance Dh between the robot and the basket can be detected by (1). However the Dh is not robust enough for measuring the distance. The size of the basket, the other information of the image, is used for measuring the distance together. The different distance gets the different size of the basket from the image. Both distance date measured from angle and size are combined by a Kalman filter [8-11] to correct the distance data.

θv

H robot

H basket

Dh Fig. 2. The angle of view on humanoid robot

Dh =

H robot − H basket tan θ v

(1)

Table 1 shows the test result for the proposed distance measurement method. The height of the basket is 25 cm and the height of the camera is 59 cm. The table tennis ball is put in the Ball Zone when the game starts. The robot faces the basket and pick up the ball behind the ball. Hence, robot locates inside the blue curve when the robot is going to measure the distance. Table 1 shows the measured distance at different location by the proposed method. The event is usually held in the indoor environment. Although the environment is inside of the house, the light will change during a day from window. The different light conditions are also considered in the test. Table 1 shows that the average error of the distance is less than 2 cm. This means that the distance value is useful. Hence, the range of the input variable D for the fuzzy system is [55, 95].

278

C.-T. Cheng et al.

Fig. 3. Basketball throwing area Table 1. Comparison of real and measurement distance in different time Time AM9:00 AM11:00 PM1:00

PM3:00

PM5:00

Distance

3

90

90.8

89.4

88.7

90.2

90.1

85

84.2

85.4

83.4

85.5

83.7

80

79.6

80

79.1

80.1

79

75

75.9

76.9

75.4

76.2

75.5

70

71.2

70.2

70.4

71.8

71.8

65

66.9

66.3

66.7

67

66.3

60

59.8

59.6

60.6

60.7

60.7

Voltage Detection and Basketball Throwing Method

The servo motor usually produces the different rotation torque under different voltages. As the testing time extended, the bigger difference of the rotation torque presented. The small change of the torque influences the ball flying path a lot. In order to solve this problem, the voltage is taken as the second input for the fuzzy

Fuzzy Basketball Throwing Strength Control System

279

system. Four cell Lithium batteries are used in the proposed robot system. The working range for the batteries is [14.8, 16.6]. Once the voltage is under 14.5, the damage of the batteries may happen. An analog to digital system is implemented in this paper. ADC0834 is used in this paper. Table 2 shows the test result for the analog to digital convert. Every 0.2 drop of the voltage reduce the digital value around 15~25. Here, the range of the input variable V for the fuzzy system is [55, 225]. Table 2. The table of voltage and signal value

Voltage

Value

16.6

D7(215)

16.4

C2(194)

16.2

B0(176)

16

9f(159)

15.8

8a(138)

15.6

78(120)

15.4

67(103)

15.2

54(84)

15

42(66)

θ

The proposed ball throwing action is described as Fig. 4. Yellow line is the original is arm position; red line is the arm swing curve; black line is the ball flying path; the angle between the ball flying path and the horizontal line; and (Xstart, Ystart) is the position where the robot stops swing the arm and the ball leaves from the hand.

Fig. 4. Throwing Basketball Method

The range output of the fuzzy system is determined by the experiments. This paper used Robotis Servo motor as the shoulder motor. There is a corresponding value for every rotation speed. In order to throw the farthest distance under the lowest voltage, the rotate speed of the shoulder motor needs to be up to 75.7 rpm/s.

280

C.-T. Cheng et al.

The corresponding command value is 682 for the motor. Rotation speed, 51.6 rpm/s, is for throwing the shortest distance under the highest battery voltage. The corresponding command value is 465 for the motor. According to the experiments result, the range of the output variable Sarm for the fuzzy system is [460, 700].

4

Fuzzy Basketball Throwing Strength Control System

A two inputs and one output fuzzy system is proposed in this paper. The first input is the distance D and the second input is the voltage V. The output of the fuzzy system is the rotate speed of the shoulder, Sarm. The size and the height of the basket are combined to measure the distance D by Kalman filter. The range definition is D ∈ [55,90] . The variable V is obtained from the ADC system. The range definition is V ∈ [55,220 ] . The range definition of the shoulder motor is S arm ∈ [ 460 ,700 ] , which is determined by the experiments. The rule of the fuzzy system is described as the follows. The dimension of the fuzzy rule is 5×7=35. The rule table is shown in Table 3. Each rule is defined as: If V is A j1 and D is B j 2 the S arm is C s ( j1, j 2 )

(2)

j1∈ {1,2,3,4,5}

(3)

j 2 ∈ {1,2,3,4,5,6,7}

(4)

s( j1, j 2) ∈ {1,2,3,4,5, ,13}

(5)

the definition of the fuzzy conclusion is shown as the follows,

Cs (1,1) = Cs ( 2,1) = Cs (3,1) = Cs ( 4,1) = Cs (5,1) = P1,

(6)

C s (1, 2) = C s ( 2, 2 ) = C s ( 3, 2 ) = C s ( 4, 2) = C s ( 5, 2 ) = P 2,

(7)

C s ( 2,3) = C s (3,3) = C s ( 4 ,3) = C s (5,3) = P3,

(8)

C s (1,3) = P 4,

(9)

C s ( 2, 4) = C s (3, 4) = C s ( 4, 4) = C s (5, 4) = P5,

(10)

C s (1,4) = C s (3,5) = C s ( 4,5) = C s(5,5) = P6,

(11)

C s (1,5) = C s ( 2,5) = P7,

(12)

C s (3, 6) = C s ( 4,6) = C s (5, 6) = P8,

(13)

C s (1,6 ) = C s ( 2, 6 ) = P9,

(14)

C s (5,7 ) = C s ( 4,7 ) = P10,

(15)

Fuzzy Basketball Throwing Strength Control System

281

C s ( 3, 7 ) = P11,

(16)

Cs ( 2,7 ) = P12,

(17)

Cs (1,7) = P13

(18)

where , the definition of the linguistic value is T (V ) = {A1, A2 , A3 , A4 , A5} = {LB, LS , C , HS, HB}

(19)

T ( D ) = {B1 , B 2 , B 3 , B 4 , B 5 , B 6 , B 7 } = {CB , C , CS , N , FS , F , FB}

(20)

T ( Sarm ) = {C1 , C2 , C3 ,, C13} = {P1 , P2 , P3 ,, P13}

(21)

Fuzzy sets A1 , A2 , A3 , A4 and A5 are the linguistic value for the input V. This system uses Low Big (LB), Low Small (LS), Central (C), High Small (HS), and High Big (HB) to present the value of the voltage. Fuzzy sets B1 , B2 , B3 , B4 and B5 are the linguistic value for the input V. This system uses Close Big (CB), Close (C), Close Small (CS), Normal (N), Far Small (FS), Far (F), and Far Big (FB) as the linguistic value for the input D. The sets C1 , C2 , C3 , C 4 , C5 , C6 , C7 , C8 , C9 , C10 , C11 , C12 and C13 are the linguistic value for the output S arm . The proposed system uses Power

Leve 1~13 (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, and P13) to present the rotation strength. The higher value means bigger strength. P13 is the strength with the biggest power. Table 3. Fuzzy Rule Base Sarm

D

CB C CS N FS F FB

LB P1 P2 P4 P6 P7 P9 P13

V C P1 P2 P3 P5 P6 P8 P11

LS P1 P2 P3 P5 P7 P9 P12

HS P1 P2 P3 P5 P6 P8 P10

HB P1 P2 P3 P5 P6 P8 P10

The triangular-shaped membership function of the fuzzy system is shown as Fig. 5. The singleton membership function is used for the output variable. The defuzzification is defined by (22). 5

S arm =

7

w( j1, j 2)C

s ( j1, j 2 )

j1=1 j 2 =1 5

7

w( j1, j 2) j1=1 j 2 =1

(22)

282

C.-T. Cheng et al.

w( j1, j 2) = min( μ A (V ), μ B ( D )) j1

(23)

j2

μ A (V ) j1

A1

A2

A3

A5

A4

V

(a) μ B ( D) j2

B1

B2

B3

B4

B5

B6

B7

D

(b) μC

s ( j1, j 2 )

( S arm )

C1 C2

C3 C4 C5

C6

C7

C8

C9

C10

C11

C12

C13

Speed

(c) Fig. 5. The membership function of speed on humanoid robot’s shoulder: (a) inupt variable of V, (b) inupt variable of V and (c) output variable of Speed

Fuzzy Basketball Throwing Strength Control System

5

283

Experiment Results

The experiment tests the robot at the positions where are 60cm, 65cm, 70cm, 75cm, 80cm, 85cm, and 90cm away from the basket. The testing voltages of the robot are 15.5volts, 16volts, and 16.5volts. The robot threw 10 times for each condition. The experiment results are shown in Table 4 and Table 5. Fig. 6 - Fig. 10 shows the real picture for the experiment at different location. Table 4. Throwing Basketball with no Fuzzy controller

Throwing per 10 times

Distance (cm)

60 65 70 75 80 85 90

15.5 2 4 3 3 4 4 5

Voltage (V) 16 5 7 5 7 5 6 7

16.5 6 8 6 9 7 8 9

Table 5. Throwing Basketball with Fuzzy controller

Throwing per 10 times

Distance (cm)

(a)

60 65 70 75 80 85 90

15.5 7 8 9 9 7 8 8

Voltage (V) 16 9 9 8 8 9 10 9

16.5 8 9 8 10 9 9 10

(b)

Fig. 6. Throwing basketball in 60 cm: (a) measurement and (b) throwing

284

C.-T. Cheng et al.

(a)

(b)

Fig. 7. Throwing basketball in 70 cm: (a) measurement and (b) throwing

(a)

(b)

Fig. 8. Throwing basketball in 80 cm: (a) measurement and (b) throwing

(a)

(b)

Fig. 9. Throwing basketball in 85 cm: (a) measurement and (b) throwing

(a)

(b)

Fig. 10. Throwing basketball in 90 cm: (a) measurement and (b) throwing

Fuzzy Basketball Throwing Strength Control System

6

285

Conclusions

This paper presents a fuzzy basketball throwing strength control system for visionbased humanoid robot. It is complicated for the robot to throw a table tennis ball at different location with different battery situation. The implemented method is able to adjust the speed of throwing ball. A two inputs and one output fuzzy system are designed in this paper. The proposed fuzzy system is able to decide the motor speed of the shoulder to throw the table tennis ball. The experiment illustrates the effectiveness of the proposed system. Acknowledgment. This research was supported in part by the National Science Council (NSC) of the Republic of China under contract NSC 98-2218-E-032-005 and NSC 101-2218-E-032-006.

References 1. http://www.robocup.org/ 2. http://www.fira.net/ 3. Wong, C.C., Cheng, C.T., Huang, K.H., Yang, Y.T.: Fuzzy control of humanoid for obstacle avoidance. International Journal of Fuzzy Systems 10(1), 261–270 (2008) 4. Cheng, C.T., Chen, H.C., Hu, Y.Y., Wong, C.C.: Fuzzy balancing control of a small-size humanoid robot based on accelerometer. International Journal of Fuzzy Systems 11(3), 146–153 (2009) 5. Zadeh, L.A.: Fuzzy set. Information of the Control 8, 338–353 (1956) 6. Zadeh, L.A.: A rationale for fuzzy control. Transactions of the ASME Journal Dynamic Systems Measurement, and Control 94, 3–4 (1972) 7. Zadeh, L.A.: Outline of a new approach to the analysis complex systems and decision processes. IEEE Transactions Systems, Man, and Cybernet 3, 28–44 (1973) 8. Chen, S.Y.: Kalman Filter for Robot Vision: A Survey. IEEE Transactions on Industrial Electronics 59, 4409–4420 (2012) 9. Welch, G., Bishop, G.: An Introduction to the Kalman Filter. University of North Carolina at Chapel Hill Department of Computer Science Chapel Hill, NC 27599-3175 10. http://www.cs.unc.edu/~welch/kalman/kalmanIntro.html 11. Hwang, W.J., Park, H.I., Kwon, M.L., Anjum, J.H., Kim, C.H., Lee, K.S., Kim, Cho, D.D.: Vision tracking system for mobile robots using twoKalman filters and a slip detector. In: 2010 International Conference on Control Automation and Systems, pp. 3778–3783 (2010)

Abstract. A fuzzy basketball throwing strength control system for vision-based humanoid robot is proposed in this paper. The implemented method is able to adjust the speed of throwing ball for joining the basketball event in HuroCup (Humanoid Robot World Cup Soccer Tournament). The proposed method speeds up the aiming time and increases the shooting accuracy. A two inputs and one output fuzzy system are designed in this paper. Two inputs, the distance and the voltage, are used for the implemented method. The robot detects the distance between the robot and basket based on the robot’s vision system. An analog to digital system is applied to measure the robot’s voltage, which changes the torque of the motor. The output value of the fuzzy system is the motor speed of the shoulder. The proposed fuzzy system is able to decide the motor speed of the shoulder to throw the table tennis ball, which is substituted for the basketball. The effectiveness of the system is demonstrated in an empirical evaluation. Keywords: Humanoid Robot, Fuzzy Controller, Basketball.

1

Introduction

RoboCup [1] and FIRA (Federation of International Robot-soccer Association) [2] are two major leagues for holding the robotic competitions. Both of them are providing different category for the participations. HuroCup (Humanoid Robot World Cup Soccer Tournament) is proposed in FIRA to emphasize the technical development of the humanoid robot. The idea of HuroCup is to develop a humanoid robot which is able to do many different sports including Basketball, Obstacle Run, and Climbing Wall and so on. The basketball event is a specific topic for the eye and hand coordination. The sketch of the basketball event is shown as Fig. 1. This paper aims to implement a fuzzy basketball throwing strength control system on a humanoid robot. The output of this system detects the appropriate speed of the shoulder motor to control the distance of throwing basketball. The robot needs to be put on the Start Point, which is 90 cm away from the basket, when the game starts. The table tennis ball is put inside the Ball Zone by the referee randomly. The Ball Zone is outside of the Three Point Circle and inside of a curve 25 cm away from the center of the Three K. Omar et al. (Eds.): FIRA 2013, CCIS 376, pp. 275–285, 2013. © Springer-Verlag Berlin Heidelberg 2013

276

C.-T. Cheng et al.

Point Circle. The radius of the Three Point Circle is 60cm. The basket with the red color is the center of the Three Point Circle. The height of the top of the basket is 25 cm. The diameter of the basket is 10 cm. The robot is allowed to throw or put the ball in to the basket anywhere. If the robot throws the ball into the basket at the outside of the Three Point Circle, this throw is able to get 3 points. If the robot put the ball into the basket at anywhere inside of the Three Point Circle, this action will get 2 points. In order to accomplish the whole procedure, the humanoid robot needs to able to recognize the table tennis ball and the basket, pick up the ball and throw the ball.

Fig. 1. Basketball game field

A two inputs and one output fuzzy system is applied in this paper. Fuzzy system has been applied rapidly and extensively since Zadeh proposed in 1965 [3-7]. The proposed robot needs to be able to throw the ball into the basket from anywhere outside the Three Point Circle to get 3 points. There are hundreds and thousands possibility value for the distance between the basket and the robot. It is not efficiency if just set up different throwing strength for different distance. The robot rotates its arm by a servo motor. However, the voltage of the batteries on the robot influences the throwing strength directly. This paper used the distance and the voltage as input of the fuzzy system. The output of the fuzzy is the throwing strength, which is able to let the robot throw the 3 points ball efficiently. The remainder of this paper is organized as follows: Section 2 introduces the distance measurement method, Section 3 describes voltage detection and basketball throwing method, Section 4 explains the fuzzy-based basketball throwing method, the performance of the proposed method is tested on a real humanoid robot in Section 5, and Section 6 concludes the paper.

Fuzzy Basketball Throwing Strength Control System

2

277

Distance Measurement Method

The distance between the robot and the basket is the first input for the proposed fuzzy system. In order to measure the distance, the relationship of the distance can be explained as the Fig 2. θv is the angle of depression of the robot, H robot is the height of the camera, and H basket is the height of the basket. The distance Dh between the robot and the basket can be detected by (1). However the Dh is not robust enough for measuring the distance. The size of the basket, the other information of the image, is used for measuring the distance together. The different distance gets the different size of the basket from the image. Both distance date measured from angle and size are combined by a Kalman filter [8-11] to correct the distance data.

θv

H robot

H basket

Dh Fig. 2. The angle of view on humanoid robot

Dh =

H robot − H basket tan θ v

(1)

Table 1 shows the test result for the proposed distance measurement method. The height of the basket is 25 cm and the height of the camera is 59 cm. The table tennis ball is put in the Ball Zone when the game starts. The robot faces the basket and pick up the ball behind the ball. Hence, robot locates inside the blue curve when the robot is going to measure the distance. Table 1 shows the measured distance at different location by the proposed method. The event is usually held in the indoor environment. Although the environment is inside of the house, the light will change during a day from window. The different light conditions are also considered in the test. Table 1 shows that the average error of the distance is less than 2 cm. This means that the distance value is useful. Hence, the range of the input variable D for the fuzzy system is [55, 95].

278

C.-T. Cheng et al.

Fig. 3. Basketball throwing area Table 1. Comparison of real and measurement distance in different time Time AM9:00 AM11:00 PM1:00

PM3:00

PM5:00

Distance

3

90

90.8

89.4

88.7

90.2

90.1

85

84.2

85.4

83.4

85.5

83.7

80

79.6

80

79.1

80.1

79

75

75.9

76.9

75.4

76.2

75.5

70

71.2

70.2

70.4

71.8

71.8

65

66.9

66.3

66.7

67

66.3

60

59.8

59.6

60.6

60.7

60.7

Voltage Detection and Basketball Throwing Method

The servo motor usually produces the different rotation torque under different voltages. As the testing time extended, the bigger difference of the rotation torque presented. The small change of the torque influences the ball flying path a lot. In order to solve this problem, the voltage is taken as the second input for the fuzzy

Fuzzy Basketball Throwing Strength Control System

279

system. Four cell Lithium batteries are used in the proposed robot system. The working range for the batteries is [14.8, 16.6]. Once the voltage is under 14.5, the damage of the batteries may happen. An analog to digital system is implemented in this paper. ADC0834 is used in this paper. Table 2 shows the test result for the analog to digital convert. Every 0.2 drop of the voltage reduce the digital value around 15~25. Here, the range of the input variable V for the fuzzy system is [55, 225]. Table 2. The table of voltage and signal value

Voltage

Value

16.6

D7(215)

16.4

C2(194)

16.2

B0(176)

16

9f(159)

15.8

8a(138)

15.6

78(120)

15.4

67(103)

15.2

54(84)

15

42(66)

θ

The proposed ball throwing action is described as Fig. 4. Yellow line is the original is arm position; red line is the arm swing curve; black line is the ball flying path; the angle between the ball flying path and the horizontal line; and (Xstart, Ystart) is the position where the robot stops swing the arm and the ball leaves from the hand.

Fig. 4. Throwing Basketball Method

The range output of the fuzzy system is determined by the experiments. This paper used Robotis Servo motor as the shoulder motor. There is a corresponding value for every rotation speed. In order to throw the farthest distance under the lowest voltage, the rotate speed of the shoulder motor needs to be up to 75.7 rpm/s.

280

C.-T. Cheng et al.

The corresponding command value is 682 for the motor. Rotation speed, 51.6 rpm/s, is for throwing the shortest distance under the highest battery voltage. The corresponding command value is 465 for the motor. According to the experiments result, the range of the output variable Sarm for the fuzzy system is [460, 700].

4

Fuzzy Basketball Throwing Strength Control System

A two inputs and one output fuzzy system is proposed in this paper. The first input is the distance D and the second input is the voltage V. The output of the fuzzy system is the rotate speed of the shoulder, Sarm. The size and the height of the basket are combined to measure the distance D by Kalman filter. The range definition is D ∈ [55,90] . The variable V is obtained from the ADC system. The range definition is V ∈ [55,220 ] . The range definition of the shoulder motor is S arm ∈ [ 460 ,700 ] , which is determined by the experiments. The rule of the fuzzy system is described as the follows. The dimension of the fuzzy rule is 5×7=35. The rule table is shown in Table 3. Each rule is defined as: If V is A j1 and D is B j 2 the S arm is C s ( j1, j 2 )

(2)

j1∈ {1,2,3,4,5}

(3)

j 2 ∈ {1,2,3,4,5,6,7}

(4)

s( j1, j 2) ∈ {1,2,3,4,5, ,13}

(5)

the definition of the fuzzy conclusion is shown as the follows,

Cs (1,1) = Cs ( 2,1) = Cs (3,1) = Cs ( 4,1) = Cs (5,1) = P1,

(6)

C s (1, 2) = C s ( 2, 2 ) = C s ( 3, 2 ) = C s ( 4, 2) = C s ( 5, 2 ) = P 2,

(7)

C s ( 2,3) = C s (3,3) = C s ( 4 ,3) = C s (5,3) = P3,

(8)

C s (1,3) = P 4,

(9)

C s ( 2, 4) = C s (3, 4) = C s ( 4, 4) = C s (5, 4) = P5,

(10)

C s (1,4) = C s (3,5) = C s ( 4,5) = C s(5,5) = P6,

(11)

C s (1,5) = C s ( 2,5) = P7,

(12)

C s (3, 6) = C s ( 4,6) = C s (5, 6) = P8,

(13)

C s (1,6 ) = C s ( 2, 6 ) = P9,

(14)

C s (5,7 ) = C s ( 4,7 ) = P10,

(15)

Fuzzy Basketball Throwing Strength Control System

281

C s ( 3, 7 ) = P11,

(16)

Cs ( 2,7 ) = P12,

(17)

Cs (1,7) = P13

(18)

where , the definition of the linguistic value is T (V ) = {A1, A2 , A3 , A4 , A5} = {LB, LS , C , HS, HB}

(19)

T ( D ) = {B1 , B 2 , B 3 , B 4 , B 5 , B 6 , B 7 } = {CB , C , CS , N , FS , F , FB}

(20)

T ( Sarm ) = {C1 , C2 , C3 ,, C13} = {P1 , P2 , P3 ,, P13}

(21)

Fuzzy sets A1 , A2 , A3 , A4 and A5 are the linguistic value for the input V. This system uses Low Big (LB), Low Small (LS), Central (C), High Small (HS), and High Big (HB) to present the value of the voltage. Fuzzy sets B1 , B2 , B3 , B4 and B5 are the linguistic value for the input V. This system uses Close Big (CB), Close (C), Close Small (CS), Normal (N), Far Small (FS), Far (F), and Far Big (FB) as the linguistic value for the input D. The sets C1 , C2 , C3 , C 4 , C5 , C6 , C7 , C8 , C9 , C10 , C11 , C12 and C13 are the linguistic value for the output S arm . The proposed system uses Power

Leve 1~13 (P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, and P13) to present the rotation strength. The higher value means bigger strength. P13 is the strength with the biggest power. Table 3. Fuzzy Rule Base Sarm

D

CB C CS N FS F FB

LB P1 P2 P4 P6 P7 P9 P13

V C P1 P2 P3 P5 P6 P8 P11

LS P1 P2 P3 P5 P7 P9 P12

HS P1 P2 P3 P5 P6 P8 P10

HB P1 P2 P3 P5 P6 P8 P10

The triangular-shaped membership function of the fuzzy system is shown as Fig. 5. The singleton membership function is used for the output variable. The defuzzification is defined by (22). 5

S arm =

7

w( j1, j 2)C

s ( j1, j 2 )

j1=1 j 2 =1 5

7

w( j1, j 2) j1=1 j 2 =1

(22)

282

C.-T. Cheng et al.

w( j1, j 2) = min( μ A (V ), μ B ( D )) j1

(23)

j2

μ A (V ) j1

A1

A2

A3

A5

A4

V

(a) μ B ( D) j2

B1

B2

B3

B4

B5

B6

B7

D

(b) μC

s ( j1, j 2 )

( S arm )

C1 C2

C3 C4 C5

C6

C7

C8

C9

C10

C11

C12

C13

Speed

(c) Fig. 5. The membership function of speed on humanoid robot’s shoulder: (a) inupt variable of V, (b) inupt variable of V and (c) output variable of Speed

Fuzzy Basketball Throwing Strength Control System

5

283

Experiment Results

The experiment tests the robot at the positions where are 60cm, 65cm, 70cm, 75cm, 80cm, 85cm, and 90cm away from the basket. The testing voltages of the robot are 15.5volts, 16volts, and 16.5volts. The robot threw 10 times for each condition. The experiment results are shown in Table 4 and Table 5. Fig. 6 - Fig. 10 shows the real picture for the experiment at different location. Table 4. Throwing Basketball with no Fuzzy controller

Throwing per 10 times

Distance (cm)

60 65 70 75 80 85 90

15.5 2 4 3 3 4 4 5

Voltage (V) 16 5 7 5 7 5 6 7

16.5 6 8 6 9 7 8 9

Table 5. Throwing Basketball with Fuzzy controller

Throwing per 10 times

Distance (cm)

(a)

60 65 70 75 80 85 90

15.5 7 8 9 9 7 8 8

Voltage (V) 16 9 9 8 8 9 10 9

16.5 8 9 8 10 9 9 10

(b)

Fig. 6. Throwing basketball in 60 cm: (a) measurement and (b) throwing

284

C.-T. Cheng et al.

(a)

(b)

Fig. 7. Throwing basketball in 70 cm: (a) measurement and (b) throwing

(a)

(b)

Fig. 8. Throwing basketball in 80 cm: (a) measurement and (b) throwing

(a)

(b)

Fig. 9. Throwing basketball in 85 cm: (a) measurement and (b) throwing

(a)

(b)

Fig. 10. Throwing basketball in 90 cm: (a) measurement and (b) throwing

Fuzzy Basketball Throwing Strength Control System

6

285

Conclusions

This paper presents a fuzzy basketball throwing strength control system for visionbased humanoid robot. It is complicated for the robot to throw a table tennis ball at different location with different battery situation. The implemented method is able to adjust the speed of throwing ball. A two inputs and one output fuzzy system are designed in this paper. The proposed fuzzy system is able to decide the motor speed of the shoulder to throw the table tennis ball. The experiment illustrates the effectiveness of the proposed system. Acknowledgment. This research was supported in part by the National Science Council (NSC) of the Republic of China under contract NSC 98-2218-E-032-005 and NSC 101-2218-E-032-006.

References 1. http://www.robocup.org/ 2. http://www.fira.net/ 3. Wong, C.C., Cheng, C.T., Huang, K.H., Yang, Y.T.: Fuzzy control of humanoid for obstacle avoidance. International Journal of Fuzzy Systems 10(1), 261–270 (2008) 4. Cheng, C.T., Chen, H.C., Hu, Y.Y., Wong, C.C.: Fuzzy balancing control of a small-size humanoid robot based on accelerometer. International Journal of Fuzzy Systems 11(3), 146–153 (2009) 5. Zadeh, L.A.: Fuzzy set. Information of the Control 8, 338–353 (1956) 6. Zadeh, L.A.: A rationale for fuzzy control. Transactions of the ASME Journal Dynamic Systems Measurement, and Control 94, 3–4 (1972) 7. Zadeh, L.A.: Outline of a new approach to the analysis complex systems and decision processes. IEEE Transactions Systems, Man, and Cybernet 3, 28–44 (1973) 8. Chen, S.Y.: Kalman Filter for Robot Vision: A Survey. IEEE Transactions on Industrial Electronics 59, 4409–4420 (2012) 9. Welch, G., Bishop, G.: An Introduction to the Kalman Filter. University of North Carolina at Chapel Hill Department of Computer Science Chapel Hill, NC 27599-3175 10. http://www.cs.unc.edu/~welch/kalman/kalmanIntro.html 11. Hwang, W.J., Park, H.I., Kwon, M.L., Anjum, J.H., Kim, C.H., Lee, K.S., Kim, Cho, D.D.: Vision tracking system for mobile robots using twoKalman filters and a slip detector. In: 2010 International Conference on Control Automation and Systems, pp. 3778–3783 (2010)