Page 1

Soft Comput (2008) 12:715–720

DOI 10.1007/s00500-007-0245-0

FOCUS

Fuzzy neural networks for obstacle pattern recognition and collision

avoidance of fish robots

Daejung Shin · Seung You Na · Jin Young Kim ·

Seong-Joon Baek

Published online: 9 October 2007

© Springer-Verlag 2007

Abstract

tion of obstacles are the most important concerns for fish

robots’ path planning to make natural and smooth move-

ments as well as to avoid collision. We can get better control

results of fish robot trajectories if we obtain more informa-

tion in detail about obstacle shapes. The method employing

only simple distance measuring IR sensors without cameras

and image processing is proposed. The capability of a fish

robot to recognize the features of an obstacle to avoid colli-

sionisimproved usingneuro-fuzzy inferences.Approaching

angles of the fish robot to an obstacle as well as the evi-

dent features such as obstacles’ sizes and shape angles are

obtained through neural network training algorithms based

on the scanned data. Experimental results show the success-

ful path control of the fish robot without hitting on obstacles.

The problems of detection and pattern recogni-

Keywords

Collision avoidance · Fuzzy neural networks

Obstacle pattern recognition · Fish robot ·

1 Introduction

TheuseofsimplerIRtypedistancesensorsisproposedrather

than using cameras or sonar modules for fish robot’s eyes

(Antonelli et al. 2001; Petillot et al. 2001; Yu et al. 2004). A

distance measuring sensor for a general purpose is mounted

on a motor shaft to scan a certain range of the foreground

from the head of a fish robot. Simple plane obstacles with

D. Shin

BK21, Chonnam National University, Kwangju, South Korea

S. Y. Na (B ) · J. Y. Kim · S.-J. Baek

Department of Electronics and Computer Engineering,

Chonnam National University, Kwangju, South Korea

e-mail: syna@chonnam.ac.kr

various sizes and approaching angles are considered in our

experiments. Sonar sensors are not used to make the robot

structure simple and compact. All circuits, sensors, motors

andaprocessorcardarecontainedinachassiswhosedimen-

sions are 30 × 10 × 15cm.

Successive direction changes of the propulsion are neces-

sary to avoid collision with obstacles (Wai and Chen 2004).

Direction changes of the fish robot are determined on the

basis of the location, sizes, and approaching angles to an

obstacle.Thesetofinformationisobtainedbyadistancesen-

sor that scans the foreground from the head of a fish robot, in

addition to the three fixed sensors at the front, left and right

sides of the body, respectively (Table1).

In this paper, basic rules about the location, sizes, and

approaching angles to obstacles have been obtained from

distance measurements. Simplified obstacles are assumed

to be combinations of planes with several different angles

between the planes. From the raw data of the sensor output

voltage, a sufficient amount of information can be deduced

for obstacle shape recognition. Proper direction changes to

avoid collision are determined based on the rules of obstacle

shapes.Estimatedvaluesofthelocation,sizes,andapproach-

ing angles to an obstacle are calculated using a general ANN

algorithm (Mar and Lin 2001; Panella and Gallo 2005).

Experimental results employing the proposed method show

the successful path trajectories of the fish robot without

collision.

2 Distance data acquisition for obstacle scanning

Fishrobotsinthisstudyareconcernedmostlyaboutobstacles

thatexistcloseto.Therefore,thefishrobotinourexperiments

uses IR distance sensors to measure distances from the robot

to obstacles. In this paper we use a scanning IR sensor with a

123

Page 2

716D. Shin et al.

Table 1 Specifications of a fish robot

ItemsSpecification

Length

Width

Height

Weight

Length of tail fin

Maximum angle of tail fin

Minimum rotation radius

Maximum speed

Maximum torque of motors

Angular speed of motors

73cm

12.5cm

22.5cm

4.95kg

42cm

80◦

31cm

70cm/s

7.4kg/cm at 6V

300◦/s

servomotoratthecenter,inadditiontothreefixedIRsensors

atthefrontandbothsides,togetthepatterninformationofthe

obstacles. The fixed sensors are used to detect the existence

of obstacles. The shape measurement IR sensor system is

shown at the front part of the fish robot in Fig. 1.

The detection of obstacles or the outputs of distance mea-

surementsbyIRsensorsarenotsufficientforthepreparation

of collision avoidance. There are various examples that have

the same distance measurements by fixed sensors while the

direction changes which are necessary for collision avoid-

ance are quite different from each other (Na et al. 2005; Tan

et al. 2006). To get more information that is necessary to

figure out the shapes and positions of obstacles, the scanning

IR sensor begins to scan a certain range immediately when

one of the three fixed sensors detects an obstacle. If more

than one fixed sensors detects an object, the scanning sensor

scans a wider range.

Table 2 Positions of a fish robot with obstacles and its operations for

cruise

F L R Position Operation

0 0 0 S1

0 0 1 S2

Swim forward

Swim forward without colliding with a

right obstacle

Swim forward without colliding with a left obstacle

Swim forward and keep middle position

When θF≥ 90, turn left and try not to collide

with a right obstacle

When θF< 90, turn right and try not to collide

with a left obstacle

Turn left and try not to collide with a right obstacle

Turn right and try not to collide with a left obstacle

When L ≥ R, turn left and try not to collide

with a right obstacle

When L < R, turn right and try not to collide

with a left obstacle

0 1 0 S3

0 1 1 S4

1 0 0 S5

1 0 1 S6

1 1 0 S7

1 1 1 S8

Abasicsetofpositionsofafishrobotrelativetosimplified

obstaclesandthecorrespondingoperationsofafishrobotfor

naturalswimmingaredescribedinTable2.Thefront,leftand

rightfixedIRsensorsarerepresentedas F, L,and R,respec-

tively. Detection of an obstacle for each sensor is depicted

as “1” while “0” means no detection for the corresponding

sensor.

Since the obstacles have random shapes, a set of proper

modelsforobstacleshapesarenecessary.Thesimplestmodel

ofobstaclesthatisadoptedinthisstudyconsistsofpiecewise

planes. Fundament rules that are necessary to avoid obstacle

collision for natural swimming are derived for a set of plane

angles of 180, 150, 120, and 90. Also, a set of angles of

Fig. 1 Fish robot and distance

sensors

123

Page 3

Fuzzy neural networks of fish robots 717

Fig. 2 Simplified obstacle

shapes and approaching angles

30, 60, 90, 120, and 150 are assumed to be the approaching

angles of a fish robot to an obstacle. Possible combinations

of angles are summarized in Fig. 2. When the plane angle is

less than 90 it is very hard to escape without collision. Thus

the case is not included for the rules of forward swimming.

3 Obstacle recognition system

Since the obstacles are assumed to be near, the recognition

routines should not take much time. Since the scanning time

is proportional to the scanning range, we try to restrict the

scanning angle as much as possible. There are three fixed IR

sensors at the front and both sides of a fish robot. The fixed

sensors are used to detect the existence of obstacles. There

is a scanning IR sensor with a servo motor at the center to

get the pattern information of the obstacles. By scanning this

distance sensor the basic data to infer the shapes of obstacles

are obtained. Also the scanning direction is determined by

the detection of an obstacle by the three fixed IR sensors.

Since the velocity of the fish robot is known by experi-

ments using the duty ratios of thrust motors, the scanned dis-

tance data are compensated for the robot’s speed to produce

a stationary scanned data. The compensation is rather simple

because the scanned data by IR sensors and the distance due

to fish robot’s velocity have the same dimension.

Figure 3 shows the compensated scanned results of the

simplified obstacle models and several approaching angles

of a fish robot. The case 1–1 is when the approaching angle

is30withrespecttoaleftobstacle.Thescannedresultsofthe

obstacles of 180, 150, and 120 are represented in dots, trian-

gles, and deltas, respectively. From the scanned results, the

obstacle angles that correspond to the simplified piecewise

obstacle shapes are recognized. Depending on this obstacle

angle, the amount of turning that a fish robot makes is deter-

mined to avoid collision.

The cases of 1–1 and 1–2 in Fig. 3 are the results of scan-

ning angles of 105 → 170 and 75 → 10 when only one side

fixed sensor detects an obstacle. In the same way, the cases

of 2–1, 2–2, and 2–3 are when only the front fixed sensor

detects an object.

Two fuzzy inference systems are proposed: one is to

recognize the angles of two planes in the simplified models

of obstacles, and the other is to estimate the approaching

angles of a fish robot to an obstacle. The scanned distance

measurements in Fig. 3 are the basic input data for the infer-

ence. Sugeno type fuzzy systems are implemented by a sub-

tractive clustering method using genfis2 in Matlab. Training

has been made by using anfis of an adaptive neuro-fuzzy

inference system. For an approximation problem of an

unknown function y = f (x), f : Rn→ R the unknown

function is approximated by a fuzzy inference system con-

sisting of M rules of Sugeno first-order type. The kth fuzzy

rule is given by,

If x1is Bk

1, and x2is Bk

n

?

2,..., and xnis Bk

n,

then yk=

j=1

ak

jxj+ ak

0,

k = 1,2,...,

(1)

where x = {x1,x2,...,xn} is an input pattern, ykis an out-

put that is produced by the rules. For each rule, the mem-

bership functions µBk

1,2,...,n) are necessary. We apply the simplest triangu-

lar types whose parameters are uniformly distributed in the

interestedrangeoftheuniverseofdiscourse.Thecoefficients

ak

j(j = 0,1,...,n) are the crisp fuzzy outputs. The estima-

tion of y = f (x) is given by anfis such as

?M

The inputs to the fuzzy systems are 30 distance data scanned

for each scan angle that is determined by the fixed sensors.

The outputs of the inferences are angles between obstacle

planes and approaching angles of a fish robot, respectively.

Estimation results by the inference engines are shown in

Fig. 4 and in Table 3. The inference results are for the input

angle data sets of (120, 45), (150, 60), (150, −60), (180,

60), (180, 90), (180, −60) for the obstacle angles and the

approaching angles, respectively. Five sets of training angles

(shown by small circles) and anfis inference outputs (shown

by dots) for each combination of angles are shown in Fig. 4.

The means and standard deviations (SD)of estimation errors

for obstacle shape angles and approaching angles of the six

cases are summarized in Table 3.

The errors of angles for all six cases in training of ANN

are negligible as shown in Fig. 5. The magnitudes of SD are

j(xj) of fuzzy input variables Bk

j(j =

˜ y =

k=1µBk(x)yk

?M

k=1µBk(x)

(2)

123

Page 4

718 D. Shin et al.

(a) Case 1-1 (approaching angle of 30° from left obstacle)

(e) Case 2-3 (approaching from the center of an obstacle)

(d) Case 2-2 (approaching angle of 60° from right obstacle)

(c) Case 2-1 (approaching angle of 60° from left obstacle)

(b) Case 1-2 (approaching angle of 30° from right obstacle)

0.2

0.4

0.6

0.

1

90

120

150

180

0.2

0.4

0.6

0.8

1

30

60

90

0

0.2

0.4

0.6

0.8

1

60

90

120

0.2

0.4

0.6

0.8

1

60

90

120

0.2

0.4

0.6

0.8

60

90

120

Fig. 3 Scanned information of obstacles in Fig. 2

Fig. 4 Fuzzy inference system

less than 0.005. The errors of angles for all six cases in test

estimation are given in Fig. 6 and Table 3.

Table 4 and Fig. 7 are given to specify the movement per-

formance of the fish robot. They describe the turning move-

ment in the quick-turn modes of 10, 15, 20, 25, 30, and 35,

respectively, for the tail fin (Liu and Hu 2005).

The scanned obstacle distance data are transmitted to a

server in real time. Then they are processed in Simulink

where obstacle shape angles and approaching angles are

obtained through ANN algorithms that are established off-

line. Appropriate turning direction and magnitude for suc-

cessive path changes are determined according to the results

of recognition inference systems for the angles between two

planes of obstacles and for the approaching angles. The

angles between the basic sets of angles of the six cases in

Fig. 5 and Table 3 are solved using interpolation. The results

of inferences are implemented on the fish robot of Fig. 1 to

showtheeffectivenessoftheestimationalgorithms.Figure8

shows swimming trajectories of the fish robot for several

angles of an obstacle with different approaching angles. For

obstacle angles that are greater than 90, direction changes to

avoid collision by IR distance sensors are successfully made

by using only forward movement.

4 Conclusions

Detection and recognition of obstacles to avoid collision,

regardless of the approaching angles for fish robots, are con-

sidered fundamental to generate natural movement. Simple

IR distance sensors are used instead of cameras or sonar

systems.Basedonthesimplifiedmodelsofobstacles,proper

123

Page 5

Fuzzy neural networks of fish robots719

Table 3 Estimation results for

obstacle angles (‘O’) and

approaching angles (‘A’) of a

fish robot for test data

O: 120

A: 45

1.7254

2.4342

0.6470

0.9130

O: 150

A: 60

0.6332

0.9305

0.2533

0.3722

O: 150

A: −60

1.5829

1.2963

−0.6076

0.4983

O: 180

A: 60

0.6941

0.7581

0.2314

0.2527

O: 180

A: 90

−2.3741

2.3358

−1.2534

1.1965

O: 180

A: −60

−0.1028

2.4729

0.0343

0.8243

Obstacle errorMean

SD

Mean

SD

Approaching error

0510 1520 2530

110

120

130

140

150

160

170

180

190

iterations

e

e r g

e

d

Test Data

ANFIS Output

05 101520 2530

−50

0

50

100

iterations

e

e r g

e

d

Obstacle shape angles

Approaching angles

Test Data

ANFIS Output

(b)

(a)

Fig. 5 Training results of ANN

Table 4 Turning movement performance of the fish robot in the quick-

turn mode in angles

10 15 202530 35

1s

2s

3s

4s

5s

6s

13.0

7.1

4.1

3.1

2.1

1.1

17.5

8.6

5.6

4.5

3.6

2.4

21.1

10.8

6.5

5.2

4.1

3.5

24.8

12.7

7.2

5.8

4.9

4.3

28.5

14.9

8.4

6.7

5.4

4.8

32.4

16.6

9.4

7.3

6.1

5.1

sets of obstacle angles and approaching angles are chosen to

establish the basic rules for inference algorithms. Arbitrary

anglesforobstacleshapesandapproachinganglesaresolved

by these inference results using interpolation of the basic

training sets. Successful experimental results in an aquarium

show the effectiveness of the implementation on the fish

robot.

05 1015202530

120

140

160

180

200

iterations

e

e r g

e

d

Training Data

ANFIS Output

05101520 2530

−50

0

50

100

iterations

e

e r g

e

d

Obstacle shape angles

(a)

(b)

Approaching angles

Training Data

ANFIS Output

Fig. 6 Estimation results of ANN

123456

0

5

10

15

20

25

30

35

sec

e

e r g

e

d

f o

e

g

n

a

h

C

10°

15°

20°

25°

30°

35°

Fig. 7 Turning performance of the fish robot in the quick-turn mode

123