For this project you need to modify the Fuzzy Logic rules of a moonlander so that it can safely land under a variety of conditions.
Rules: The lander must be going less than a minimum safe velocity to land successfully. (Note that all units in the program are arbitrary.) The velocity is controlled by firing rockets. At each time step the velocity and postion of the lander is updated based on the gravitational ACCELERATION, current velocity, and rocket burn (if any is selected). There is a random factor built into these updates to reflect variable rocket burn, turbulance, etc.
The lander has a limited amount of fuel, which is used up during rocket burns.
When the program is intialized a random initial velocity is chosen along with a random gravitational acceleration (e.g. a random moon or planet).
Fuzzy Controller: Here is the current program, lander header file, and fuzzy header file to get you started. You may modify the program, or rewrite it in another language, but please pay attention to how the velocity, accleration, and initial values are calculated - these should remain the same. E.g. you should only modify the fuzzy controller and the output (if desired).
The lander currently has a fuzzy controler to determine rocket burns. It
currently uses the following inputs:
height - which is divided into the fuzzy sets high, medium, and low.
speed - which is divided into the fuzzy sets slow and fast.
And the output is:
burn - which is divided into noburn, slowburn, and fastburn.
The outputs are combined in weighted average to determine the rocket burn at each timestep.
Note that the remaining amount of fuel and the gravitational acceleration are not included in the
controller. As a result it often fails to land successfully.
Tasks: You have two tasks. One, systematically compare several different fuzzy controllers. Two, improve the fuzzy controller so that the lander lands safely as often as possible. Specifically you need to do the following:
Hand-In:
You need to hand in a typed write-up containing the following: