Adigeni region, Village Varkhani, Street 7, N7, Georgia +905397399164 enderkaderli@datapaper.ai

AUTONOMOUS CRUISE CONTROL IN AUTOMOBILES USING FUZZY LOGIC - DataPaper

    You Are Currently Here!
  • Home
  • GenelAUTONOMOUS CRUISE CONTROL IN AUTOMOBILES USING FUZZY LOGIC

AUTONOMOUS CRUISE CONTROL IN AUTOMOBILES USING FUZZY LOGIC

22 Haziran 2025 Ender 0 Comments

Artificial intelligence has taken over our lives, especially in the last 15 years, and as a result, we encounter different artificial intelligence techniques in many unimaginable places. It is like there is not a day in our daily lives that artificial intelligence does not touch us. From the cell phones we use to the electronics at home, from the vehicles we use to go from one place to another to social media, we are exposed to it in many places that we cannot think of.

We have already been seeing data being used in different ways in the automotive industry for years. We have even been seeing autonomous technologies where vehicles can drive themselves without the need for a driver. Unfortunately, the time when driving a car will probably remain just a hobby is not far away…

At this point, I tried to make a simple application on fuzzy logic, which I have been working on recently, including the automotive sector.

Within autonomous driving technologies, there are many different applications of artificial intelligence, such as the vehicle stopping, moving or adjusting its cruising speed on its own as a result of the processing of the data collected while the vehicle is in traffic, which we are used to seeing today.

In this study, a simple application has been developed to automatically adjust the cruising speed of a traveling automobile according to the ambient conditions by processing the fuzzy information it receives through sensors. Python was chosen as the coding language for the application. On the other hand, the codes of the study are shared at the end of the article.

Enjoyable reading…

Let’s start by installing the necessary Python libraries.

After the loading process is completed, we need to define the membership functions for our braking distance and target distance variables, which are necessary to find the cruising speed, and then graphically display the defined membership functions.

In the membership functions created here, we created a scoring scheme between 1-10 by determining degrees for braking distance and target distance, assuming that the data we receive from the sensors is fuzzy.

For braking distance;

fmy = High braking distance (We have time to brake)

fmo = Center braking distance

fmd = Low braking distance (less time for braking)

Likewise, a 3-grade structure was created for the target distance with a score between 1-10.

hmu = target distance away (Distance between us and the target in front of us)

hmnynu = target distance neither near nor far

hmy = target distance close (less distance between us and the target ahead)

On the other hand, I preferred a triangular membership function as a membership function. Depending on the distribution of the data, trapezoid, sigmoid or gaussian membership functions can also be preferred.

As a result of the functions we defined, the graphical representations of these triangular membership functions in the brake and target distance variables are as follows.

Of course, we will apply the same membership function and graphical representation for speed as we do for our categorical variables here. We also fuzzified the velocity with 3 different categories.

hy = Speed slow

hs = Speed stable

hh = Speed fast

Since our system operates in the speed range of 50-130 km/h, we did not initialize the membership functions from scratch.

Graph for the membership functions of the speed;

After completing the membership functions and graphical operations for speed, we will perform the input process for the data coming from the sensors to our system.

In the next stage, fuzzy subsets will be defined for braking distance and target distance.

After this process, the fuzzy rules that the algorithm will work with need to be created.

After the defined rules, the necessary clarification process should be done. The important point here is the choice to be made among the 5 different methods. Different types of processing can be chosen according to the distribution of the processed data and the type of membership function. In this example, I have chosen the least of the largest method, and for this the “som” parameter needs to be added to the code.

After the rinsing process, the travel speed that the car should travel at the end of the process is calculated.

Now let’s do some scoring and see the speed values the system gives us.

When we give 4 points for braking distance and 5 points for target distance, our system suggests us to continue at 66 km/h. You can reach different speeds with different numbers.

The codes of the study can be accessed from the link below.

https://github.com/laerrof/FuzzyLogic.git

Contact: enderkaderli@datapaper.ai

Linkedin : Ender Kaderli

leave a comment