Share this

Fuzzy Algorithm Design for Robot Obstacle Avoidance

2026-04-06 04:32:19 · · #1

1. Introduction

Fuzzy control is an intelligent control method based on fuzzy set theory, fuzzy linguistic variables, and fuzzy logic reasoning. It is an intelligent control method that imitates human fuzzy reasoning and decision-making processes in terms of behavior. This method first compiles the experience of operators or experts into fuzzy rules, then fuzzifies the real-time signals from sensors, uses the fuzzified signals as input to the fuzzy rules to complete fuzzy reasoning, and adds the output obtained after reasoning to the actuator.

When obstacles are present in the environment, path planning control systems exhibit high uncertainty, making them multiple-input multiple-output (MIMO) systems. Traditional control methods fail to achieve satisfactory results for such highly uncertain MIMO systems. Fuzzy inference control methods incorporate human driving experience into system control, thus better meeting the requirements of system adaptability, robustness, and real-time performance. Fuzzy control utilizes fuzzy mathematics to achieve control through reasoning. Fuzzy logic simulates the fuzziness of human thought, employing linguistic variables similar to human language for reasoning. Therefore, this tool allows human control experience to be integrated into system control, enabling the system to control complex, uncertain systems like an experienced operator.

The input to a fuzzy controller must be fuzzified before it can be used to solve for the control output; therefore, it is essentially the input interface of the fuzzy controller. Its main function is to convert the true deterministic input into a fuzzy vector. The basic structure of a fuzzy controller consists of three modules: a fuzzy input interface, fuzzy inference, and a fuzzy output interface. The main function of the fuzzy input interface is to fuzzify precise quantities, that is, to convert the precise values ​​of physical quantities into linguistic variable values. The number of linguistic variables depends on the actual situation, generally ranging from 3 to 7 levels. The more levels, the higher the control precision, but also the greater the computational load. The main function of the fuzzy inference decision-making mechanism is to mimic human thinking characteristics, perform fuzzy inference based on the linguistic control rules obtained from summarizing human control strategies, and decide on the fuzzy output control quantity. The main function of the fuzzy output interface is to convert the output fuzzy quantity into a precise quantity and apply it to the controlled object.

2. Fuzzy Controller Design

Fuzzy control is a rule-based control method that directly employs linguistic control rules. It leverages the control experience of operators or the knowledge of relevant experts, eliminating the need for a precise mathematical model of the controlled object during the design process. The motion system of a robot is similar to that of a car's driving system. Car driving is a complex problem, difficult to model precisely and describe analytically; experienced drivers steer well primarily based on their experience. Following this line of thought, using fuzzy control algorithms offers a promising solution for robot motion.

The main objective of the intelligent robot fuzzy controller design is to determine the robot's position, distance, and orientation based on the detected information when the infrared sensor detects an obstacle or target. Then, the fuzzy controller controls the robot to avoid obstacles and move along a predetermined path and orientation. According to the hardware circuit design, the distance signal from the HC-SR04 sensor can be used to determine the distance and orientation of the object to be grasped, while the turning angle and relative displacement of the robot are used to control the relative position between the robot and the object. This design uses two independent fuzzy controllers to control the turning angle and relative displacement, with the inputs being distance and orientation information, respectively. For simplicity and speed, a two-dimensional fuzzy controller structure is used in this system, consisting of an input quantity E and a rate of change Ec. The fuzzy controller controlling the turning angle sets the fuzzy subsets of the input variables direction (E1) and direction change rate (E1c) linguistic values ​​as {negative large, negative small, zero, positive small, positive large} (negative represents left, positive represents right), and abbreviated as {NB, NS, Z, PS, PB}. The fuzzy subset of the output quantity turning angle (K1) is {NB, NM, NS, Z, PS, PM, PB}. Similarly, the fuzzy controller controlling the relative displacement sets the fuzzy subsets of the input variables relative displacement (E2) and relative displacement change rate (E2c) linguistic values ​​as {negative large, negative small, zero, positive small, positive large} (negative represents far, positive represents near), and abbreviated as {NB, NS, Z, PS, PB}. The fuzzy subset of the output quantity relative displacement (K2) is {NB, NM, NS, Z, PS, PM, PB}. The universe of discourse for the membership functions of the input variables is defined as [-2, 2], and the universe of discourse for the membership functions of the output variables is defined as [-3, 3]. All membership functions are selected as triangular functions with high sensitivity and uniform distribution within their respective universes of discourse, and are equidistant.

Table 1. K1 Fuzzy Control Rule Table

Table 2 K2 Fuzzy Control Rule Table

Figure 1 Reference coordinate system

Based on driving experience, E1, E1c, and K1 should meet the following rules:

(1) When |E1| is large, and |E1c| is also large, the larger K1 should be chosen;

(2) When |E1| is moderate, an appropriate K1 should be chosen;

(3) When |E1| is small, and |E1c| is also small, the smaller K1 should be chosen. E2, E2c, and K2 should satisfy the following rules:

(1) When |E2| is large, and |E2c| is also large, the larger K1 should be chosen;

(2) When |E2| is moderate, an appropriate K1 should be chosen;

(3) When |E2| is small, and |E1c| is also small, the smaller K1 should be chosen. Based on the above considerations, E and the rate of change Ec are used as inputs to the fuzzy controller.

The fuzzy control rules for K1 and K2 are shown in Table 1 and Table 2, respectively.

3 Obstacle Avoidance Algorithm Design

3.1 Reference Coordinate System

A two-dimensional reference coordinate system is established for the controlled object and the driving environment (as shown in Figure 1). For ease of calculation, it is assumed that the wheels do not slip on the ground and can turn around their center of mass. xoy is a fixed global coordinate system, and the target point coordinates are set as (XG, YG). At any given time, the position of the vehicle is (x(t), y(t)), the heading is , the step size is step, the angle between the current heading and the line connecting the vehicle's center of mass to the target is tg, and the turning angle is sa.

3.2 Sensor Selection and Application

For mobile robots to achieve autonomous behavior, they need the ability to perceive information about their surrounding environment, which is mainly achieved through sensors. Commonly used sensors for obstacle avoidance robots include ultrasonic sensors, infrared sensors, laser sensors, and CCD vision sensors. Among these, ultrasonic sensors have advantages such as mature technology, low cost, and easy interface implementation, making them the preferred choice for obstacle avoidance robots, as shown in Figure 2.

While ultrasonic sensors offer numerous advantages, they also suffer from certain instabilities, including the ghosting phenomenon. This phenomenon occurs because the ultrasonic signals emitted by the sensor are directional beams. When the sensor forms a large angle with an obstacle, specular reflection occurs, creating a ghosting effect, as shown in Figure 3. To address the errors caused by this phenomenon, this design uses multiple sensors to compensate and counteract the errors resulting from the ghosting effect.

As shown in Figure 4, three sets of ultrasonic sensors are arranged in a fan shape in front of the robot to detect obstacles on the left, front, and right sides, with an effective range of 0.3 to 10 meters. Each set of sensors consists of two sets of three ultrasonic sensors, and the minimum measured value is taken as the distance to the obstacle in that direction. Simultaneously, to ensure the robot's movement is directional, an orientation sensor is located at the robot's center, with a measurement range of (-180°, 180°). This sensor is used to obtain the angle between the robot's heading and the line connecting the robot and the target, guiding the robot towards the target point.

Figure 2. Schematic diagram of ultrasonic sensor


Figure 3. Schematic diagram of the phantom phenomenon

Figure 4 Basic structure of the robot

4. Fuzzification of input and output quantities

External environmental information collected by ultrasonic and orientation sensors is used as the input to the fuzzy controller, and the output of the fuzzy controller is the robot's directional control. The nine ultrasonic sensors are divided into three groups (three each for the front, left, and right sides), and the minimum distance signal of each group is used as the input for that direction.

The determination of fuzzy language includes generating appropriate fuzzy language values ​​from grammatical rules, determining the membership functions of the language values ​​based on semantic rules, and determining the universe of discourse for the language variables. Here, a continuous universe of discourse is used, and a simple linearization method is employed to describe each input variable using fuzzy language, as follows:

Distance input variable: d = {near, far} = {near, far};

Target orientation input variables: tg = {Left large, Left center, Left small, Front, Right small, Right center, Right large}

={lb, lm, ls, zo, rs, rm, rb};

Output steering angle variable: sa = {left turn, left center turn, left slight turn, straight ahead, right slight turn, right center turn, right turn};

={tlb, tlm, tls, tz, trs, trm, trb};

Fuzzy linguistic values ​​are merely a fuzzy subset, and they are described using membership functions. When the universe of discourse is continuous, membership degrees are often described using functional forms, such as triangular, trapezoidal, and Gaussian membership functions.

Generally, the steeper the membership function, the higher the resolution and the higher the control sensitivity; conversely, if the membership function changes slowly, the control characteristics are also smooth, and the corresponding system stability is good. Therefore, when selecting the membership function for linguistic values, a higher-resolution membership function is generally used in the region near zero error, while a lower-resolution membership function can be used in the region of larger error to obtain better robustness.

5. Conclusion

Fuzzy control, as a type of nonlinear control, has become an important and effective form of intelligent control. Obstacle avoidance design based on fuzzy logic reasoning is particularly suitable for controlling the obstacle avoidance behavior of a vehicle when encountering sudden obstacles. Moreover, the control method is flexible, and the corresponding parameters and fuzzy inference rules can be modified according to the simulation results.


Read next

CATDOLL 148CM Hanako Silicone Doll

Height: 148 Silicone Weight: 33kg Shoulder Width: 34cm Bust/Waist/Hip: 70/58/82cm Oral Depth: N/A Vaginal Depth: 3-15cm...

Articles 2026-02-22