#### 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