Fuzzy Logic: Gradual halt of Car at Traffic Light

Rules

1.

If Car is Close to the Traffic Light OR Traffic Light is Red, then Slow Down.

2.

If Car is neither far or close to Traffic Light OR Traffic Light is Green, then Keep Middle Speed.

3.

If Car is Far from the Traffic Light OR Traffic Light is Orange, then Speed Up.

  • Rule 1

    if car is Close

    close gaussmf plot

  • ->

    or TL is red

    red trimf plot

  • v

    slow down

    Move with 0% of your standard speed.

  • Rule 2

    if car is Middle

    middle gaussmf plot

  • ->

    or TL is green

    green trimf plot

  • +

    keep middle speed

    Move with 50% of your standard speed.

  • Rule 3

    if car is Far

    far gaussmf plot

  • ->

    or TL is orange

    orange trimf plot

  • +

    speed up

    Move with 100% of your standard speed.

  • ^

    Distance

  • ^

    color

  • =

    percentage of speed