Coder Social home page Coder Social logo

weihaizhang / neuro-fuzzy-vehicle-controller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickgkan/neuro-fuzzy-vehicle-controller

0.0 0.0 0.0 431 KB

Fuzzy and Neuro-Fuzzy Vehicle Navigation with MATLAB

License: MIT License

MATLAB 100.00%

neuro-fuzzy-vehicle-controller's Introduction

Fuzzy and Neuro-Fuzzy Vehicle Navigation MATLAB Code

Requirements

  • MATLAB (tested with R2012b, R2015a and R2018a)
  • Fuzzy Logic Toolbox

The goal

Given a map containing obstacles, guide a vehicle till a given target. The only information available anytime is the distance from nearest obstacles and the angle to goal, while we can only control the velocity of the vehicle in each possible direction.

Fuzzy systems

The problem is solved using Fuzzy Logic using rules that apply to common-sense. Two partitions are constructed for both input variables ("good" and "bad" for the angle and the distance), while the output can be either "low", "moderate" or "high" velocity.

The first fuzzy system (fuzzy_system_3_rules.fis) is modelled upon the following rules:

  1. If angle is "good" and distance is "good" then velocity is "high".
  2. If angle is "bad" then velocity is "low".
  3. If angle is "good" and distance is "bad" then velocity is "moderate".

For the second fuzzy system (fuzzy_system_5_rules.fis), the angle can also be "vertical" (angle near 90 degrees) and the distance from the nearest obstacles can also be "worst" (really close to an obstacle). This system is modelled upon the aforementioned rules as well as the following:

  1. If angle is "vertical" and distance is "bad" then velocity is "high".
  2. If distance is "worst" then velocity is "moderate".

The second system performs better for the given maps but does not generalize well to other, unseen maps.

Neuro-fuzzy systems

Using the successful paths for each fuzzy system, we train a neuro-fuzzy system to navigate the vehicle without relying on hand-crafted rules. These models perform worse on seen maps that fuzzy systems overfit, but satisfactorily generalize to unseen maps, while diminishing oscillations near the target. Here, neurofuzzy_system_5_rules.fis outperforms neurofuzzy_system_3_rules.fis, most possibly due to more valid training data. This indicates that such a neuro-fuzzy system can perform poorly in lack of enough training samples.

Results

Sublime's custom image

Next step?

Under these specifications, there many cases the problem can not be solved. An interesting approach would be to combine fuzzy modeling with memory, trial-and-error approaches or decision trees. Another appealing approach would be to learn the fuzzy rules via reinforcement learning.

neuro-fuzzy-vehicle-controller's People

Contributors

nickgkan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.