Sie sind auf Seite 1von 4


Artificial Neural Networks and Fuzzy Logic


Use MATLAB Neural Network Tool Box and Fuzzy Logic Tool Box to implement the
systems described in the following exercises and you should submit all the necessary files to
run and check the outputs in each exercise.
You may discuss the designs of these systems as a group. BUT final submission should be
your own implementation.

Part A Artificial Neural Network

1. Design and develop an artificial neural network system to estimate the height of a normal
person by taking the lengths of the five fingers of his or her right hand.
- Design a neural network with supervised learning by giving the length of the
fingers of at least 50 different people as the input and the height of the
corresponding person as the target for the learning.
- Test the system with a input given in the training phase
- Also test the system with an input data set which was not given in the training
phase to demonstrate the generalization of the neural network approach.

2. Design and develop a printed character recognition system to recognize the numbers 0 1 2
3 4 5 6 7 8 9.
- Create the image of numbers using paint or any other imaging software.

- Using methods in image processing, find a suitable input data set with unique
features which can be used to train the neural network to recognize the numbers
- One method is to convert the image into only two colors (black letters in white
background) and calculate the summation of the black pixel values in each row to
get the column matrix as the input to the neural network system. Also it is
necessary to have the same number of features from each and every number in the
image for the training.

- Use the same method to create an artificial neural network to recognize the
handwritten numbers 0 to 9.
- After training your network, check whether it can be used to recognize the
handwritten numbers written by different people.

Part B Fuzzy Logic

3. Design and develop a fuzzy logic system to automate the backward motion of a vehicle
from a given starting point to a given destination.
- Decide the control variables (inputs and outputs)
- Define the ranges for the possible values for the control variables.
- For example



Count the number of
black pixels
Input for the neural

r Straight line distance from the current position of the vehicle to the
destination. (Range: 0 200 m)

Orientation of the vehicle with respect to the line joining the current
position and the destination (Range: -180 to +180)

Steering angle (Range: -60 to 60).

- IMPORTANT: Given above is only one way of considering the control variables.
You may use any other suitable measures as long as it can be used to control the
movement of the vehicle into the destination.

- Develop a fuzzy logic control system according to the selected control variables
and their working ranges.

- Test the output of the control system for several current positions and orientations.

- Additionally, try to implement a simulation to demonstrate the performance of
your controller. Simulations can plot on a MATLAB figure or it can be done using
OpenGL with Visual C++ (or any other preferable language).

- Here you will need to find the next position of the rear end point of the
vehicle since it is moving backward. For this, following vehicle kinematics
equations can be used (According to the above figure).

i. change in the orientation (d) due to the steering angle .
dt v
) sin( . . u
= u
ii. change in the position (x,y) in the next position (x,y)

) cos( .
sin . .
) cos( .
cos . .

u + = '

u + = '
dt v y y
dt v x x

Note that these equations must be changed according to the way
that you select the control variables.

4. Develop a fuzzy logic system to control the functionality of an automatic water boiler unit
as shown in figure 1. The manufacturer specifies the height of the water of the tank to be
4 meters for the heater to perform well. Having low level of water could cause the heater
to be burnt out while higher levels make it difficult for the heater to heat appropriately.
Therefore a fuzzy logic control system is needed to be designed to control the angle of the
tap of the water inlet as shown in figure 2.

- In this situation it is necessary to consider the error of the water level as the
difference between the necessary water level (4m) and the actual water level and
the rate of change in the error. That is whether the error is increasing or error is
- Design the fuzzy logic controller with the suitable input and output control
variables and their appropriate ranges.
- Implement a simulation in matlab to demonstrate the performance of your
designed control system.
max (5m)

figure 2
water inlet
water inlet
water outlet
figure 1