|
A basic application was created using Unity in order to be a graphical output for the fuzzy logic behind the coursework. The race line of the car can be moved using the arrow keys, and the car will then travel towards the racing line. 5 membership functions were used for each of the two input graphs, resulting in 25 rules being created to control the steering of the car.
The rate of change of distance from the line and the distance from the line were taken, and after the rules were applied, the minimum of these values was taken as fuzzy output. This output then went through the defuzzification method centre of maximums in order to get a crisp numerical output to apply to the car. This defuzzification method was chosen as it gave a more accurate output than mean of maxima, yet took less processing power than the centroid. |