WaterMixApplet with FuzzyControl
Mixing water with Java...
1. Problem description
Goal of this applet is to bring water in a container to a destination temperature by mixing.
You have a big WaterContainer with a starting volume and a starting temperature. The applet has two smaller containers with cold and hot water (temperatures selectable). The fuzzylogic has to decide how much hot or cold water has to be used for the next cycle by tracking the remaining amount of water in the main container and the water temperature difference from the destination temperature.
2. Fuzzy Details
The following linguistic variables were used for controlling the mixing logic:
 The difference between the current water temperature and the destination temperature.
These values can vary between 50°C and + 50°C.
The range of values is divided into 4 FuzzySets:
Abb.: Temperature difference in °C

 The remaining water volume. These valuesvary between 0 and 10 liters.
The range of values is divided into 3 FuzzySets:
Abb.: Remaining water volume in liters

 The amount of added water. The destinction between adding cold or warm water is made by using the sign of the calculation.
Negative values cause adding of cold water, positive values cause adding of warm water.
The values vary between 1 liter to +1 liter.
The range of values is divided into 6 FuttySets for the evaluation.
Abb.: Amount of added water in liters (negative:=cold water)

dV/dT 
NB 
NS 
PS 
PB 
ZE 
PM 
PM 
NM 
NM 
PS 
PM 
PS 
NS 
NM 
PB 
PB 
PM 
NM 
NB 

3. Applet
4. Implementation
The source code of the java classes is available here:
5. Authors
This applet was created as project work in the lesson "Neuronal Networks"
by Prof. Jürgen Sauer at the Fachhochschule Regensburg.
