SC_lab_1.md 1.4 KB

9 November 2015

Soft Computing - Matlab lesson

Lake level problem

The level of the water nees to be periodically rised and lowered to kill mosquito eggs.

Measuring the height of the water

Done by measuring the level against a wall,

The level can vary in a range of -2, +2 meters, [m]

Membership functions

We have to decide:

  • The minimum value
  • The maximum value
  • The shape of the function.

Our three labels will be

  • below
  • ze(ro)
  • above

For the below membership function we choose a trapezoid function

For the zero MF we choose a triangular function

For the above MF we choose a trapezoid function

The two trapezoid functions have zero value in the center of the zero function.

Output functions

singletons aren't provided by matlab, instead we need to create a very narrow triangle.

The output function is determined by 5 sigletons at each laber:

  • zero
  • few
  • half
  • lot
  • full

Rules

We have to add rules as following:

Height Request Output
below zero zero
below half few
below max few
below few few
below lot few
zero zero zero
zero half half
zero max max
zero few few
zero lot lot
zero zero few
zero half lot
zero max max
zero few half
zero lot max

Adding information

If we have weather forecast available as another input
We can add another membership function.

Additional Rules

Rain Output
Zero Few
Few Few
Half Half
A-Lot A-Lot
Max Max