UNIVERSITY OF TECHNOLOGY, SYDNEY FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY 49275 NEURAL NETWORKS AND FUZZY SYSTEMS ASSIGNMENT 2 QUESTION ONE [ Character recognition ] [ 50 marks ] This problem is a variation of a pattern recognition problem presented by Widrow and Hoff in 1960. It is a simple symbol recognition problem with three letters T, G and F, in an original form and in a shifted form as shown in Figure 1b. The 6 input vectors x1,x2,x3,x4,x5,x6 and the corresponding target vectors d1,d2,d3,d4,d5,d6 in the training set are:              1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 x1          1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 x2             1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 x3              1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 x4          1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 x5             1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 x6      1 1 1 d1 ,      1 1 1 d2 ,      1 1 1 d3 ,      1 1 1 d4 ,      1 1 1 d5 ,      1 1 1 d6 Assume that the network has 2 hidden layer neurons and all continuous perceptrons use the bipolar activation function f e e 2 1 1 ( )         . Note that due to the necessary augmentation of inputs and of the hidden layer by one fixed input, the trained network should have 17 input nodes, 3 hidden neurons, and 3 output neurons. Assign -1 to all augmented inputs.1.1 Assume that the learning constant is   0.2 , and the initial random output layer weight matrix W( ) 1 and hidden layer weight matrix W ( ) 1 are        0.2137 0.5242 0.6428 0.5377 0.7826 0.9630 0.9003 0.0280 0.0871 W (1) W (1)              0.2309 0.8436 0.6475 0.8709 0.1795 0.8842 0.6263 0.7222 0.6026 0.4556 0.1106 0.5839 0.4764 0.1886 0.8338 0.7873 0.2943 0.9803 0.5945 0.2076         0.9695 0.1098 0.0680 0.6924 0.5947 0.6762 0.3626 0.6024 0.4936 0.8636 0.1627 0.0503 0.3443 0.9607 Using the error back propagation training, calculate the next weight updates W( ), ( ) 2 2 . [ 20 marks ] W 1.2 The above training set was trained with the same set of initial random output layer weight matrix W( ) 1 and hidden layer weight matrix W ( ) 1 as above, and a learning constant of 2   0. . The training set was recycled when necessary. Determine the final weight matrices W f  W (1201) and W f  W (1201) after 200 cycles. Plot the cycle error curve for this training exercise. [ 20 marks ] One of the test character, which is shown below, has the following feature input vector:            1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 xCalculate the output vector z which is generated from the above feature input vector. How would the neural network classify this feature input vector? Describe how the above character recognition system can be improved using a validation set. Propose a reasonable validation set. [ 10 marks ] Figure 1a Multilayer Neural Network Figure 1b Training SetQUESTION TWO [Truck-Backer Upper Control] [ 50 marks ] Backing up a truck to a loading dock is a nonlinear control problem. The truck and loading zone are shown in Figure 2.1. The truck position is exactly determined by the three state variables , , x y where  is the angle of the truck with the horizontal. Control to the truck is the angle  . Only backing up is considered. The truck moves backward by a fixed unit distance every stage. For simplicity, assume that there is enough clearance between the truck and the loading dock such that y does not have to be considered as an input. The task here is to design a control system, whose inputs are   90 270 0 20    , , , x and whose output is      40 40 , such that the final stages will be x f , f     10,90 . The dynamics of the truck backer-upper procedure can be approximated by:                             b k k k y k y k k k k k x k x k k k k k 2sin[ ( )] ( 1) ( ) sin ( 1) ( ) sin ( ) ( ) sin ( ) cos ( ) ( 1) ( ) cos ( ) ( ) sin ( ) sin ( ) 1            where b is the length of the truck. Assume that b  4. Fuzzy logic is required for this truck backer-upper control. In this simple fuzzy logic controller, a set of linguistic variables is chosen to represent 5 degrees of truck angle    error         90 70 90 110 270 , , , , , 5 degrees of truck position   x error   0 7 10 13 20 m m m m m , , , , , and 5 degrees of control angle   40 10 0 10 40       , , , ,  as shown in Figure 2.2. The generic rule set in the form of "Fuzzy Associative Memories" is shown in Figure 2.3. The initial states of this truck are assumed to be ) ((1), x(1), y(1))  (75,12.5m,10m . 2.1 If the Centre of Area (COA) defuzzification strategy is used with the fire strength i of the i-th rule calculated from  i X X   i i  min( ( ), ( )) x x 1 2 1 2 determine the defuzzified control angle )  (1 and the next state [(2), x(2), y(2)] . [ 20 marks ]2.2 If the Mean of Maximum (MOM) defuzzification strategy is used with the fire strength i of the i-th rule calculated from i  X1i (x1).X 2i (x2) determine the defuzzified control angle  (1) and the next state [(2), x(2), y(2)] . Then continue and calculate  (2) and [x(3),(3), y(3)]. Write a computer program to calculate the system state vector [x(k 1),(k 1), y(k 1)] and the defuzzified control angle )  (k for 100 consecutive sampling points. Plot the corresponding vertical truck position y(k) against the horizontal truck position ) x(k for these 100 sampling points. Plot the defuzzified control angle )  (k for these 100 sampling points. [ 20 marks ] Find the dominant rule which contributes the highest fire strength to the control action for the defuzzified control angle )  (1 . If softer control action (for slower response) is required, modify this dominant rule and recalculate the new defuzzified control angle )  *(1 and the next state vector [(2), x(2), y(2)] . Using the modified FAM table, plot the corresponding vertical truck position ) y(k against the horizontal truck position ) x(k for these 100 sampling points. Plot the new defuzzified control angle )  *(k for these 100 sampling points. [ 10 marks ] Figure 2.1 Diagram of truck and loading zoneFigure 2.2 Membership functions of a truck backer-upper system Figure 2.3 Generic Fuzzy Associative Memories H.T. NGUYEN April 2017MARKING SCHEME Assignment 2: Neural Networks and Fuzzy Logic Student Name: ____________________ Mark: ___________ Requirement Criteria Comment Standard “Declaration of Originality” cover page as provided by the Faculty At front of report, completed and signed Yes/no Question 1 1.1 Neural Network: Back Propagation  Presentation  W (2)  W (2)  Calculation/software code /20 Question 1 1.2 Neural Network: Training and Test  Presentation  W (1201)  W (1201)  Cycle error curve  Software code  Classify the test character  Discussion /30 Section 2 2.1 Fuzzy Logic: COA defuzzification  Fuzzification  Combined fuzzy inference  Moment calculation  Area calculation  Defuzzified control angle  (1)  Next state vector [(2), x(2), y(2)] /20 Section 2 2.2 Fuzzy Logic: MOM defuzzification  Fuzzification  Defuzzified control angle  (1) and next state vector [(2), x(2), y(2)]   (2) and [(3), x(3), y(3)]  Truck position plot and defuzzified control angle plot (100 points)  Software code  Dominant rule  Modified FAM Table  New defuzzified control angle  *(1)  New truck position plot and defuzzified control angle plot (100 points)  Software code /30