Archive for February, 2011

My first attempt for Fuzzy Logics

Posted in Processing, Self balancing robot on February 2nd, 2011 by x-firm – Be the first to comment

I have now successfully created a fuzzy logic controller using Processing.

My test case was getting an object avoiding obstacles when given order to move to specific target..

You can try it here

The input variables was simple angle and distance.

Fuzzy sets for inputs:

Angel to obstacle:

Distance to obstacle:

Instead of using linguistic rules I used something called FAMM(Fuzzy associative memory matrix) and that only work in a 2 input, 1 output scenario.

smallAngle mediumAngle largeAngle
smallDist 90° 55° 35°
mediumDist 55° 35° 25°
largeDist 35° 25° 5°

Then defuzzification is done true weighting the relationships in the FAMM..

I will improve some parameters of the controller and optimize it a little before I try It on my balancing robot..