[go: up one dir, main page]

0% found this document useful (0 votes)
9 views14 pages

Chapter 3 Modified

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

Chapter 3 Modified

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

CHAPTER- III

METHODOLOGY
Literature Review

Collection of Experimental Data

Learn MATLAB

Implementation
Training, Testing,of 2 ANN
Validation
Models

Implementation of Regression
Model

Selection of best Model

Documentation & Submit

Figure 3.1 Flow chart of the Project

3.1 Experimental Data Collection:

The Experimental data is collected from 4 different journals i.e. [2], [3], [4],
[5] having same input parameters i.e. Frequency, Current, Voltage. These three input
parameters are copied in Excel sheet for training in MATLAB. For the above
mentioned four papers, the output is Tool wear rate. This output is also copied in
Excel sheet. Total 54 data points are collected for training, testing and validation.

3.2 Learn MATLAB:

Abbreviation of MATLAB is MATrix LABoratory. Math Works developed


the proprietary multi-paradigm programming language and computer environment
known as MATLAB. Matrix manipulation, function and visualization of data,
algorithm implementation, user interface building, and networking with programmes
in other languages are all possible with MATLAB [27]. MATLAB is primarily
designed for numeric computation, but an optional toolbox that uses the MuPAD
symbolic engine gives users access to symbolic computation capabilities. Simulink, a
separate programme, adds model-based design for dynamic and embedded systems as
well as graphical multi-domain simulation [27].

The MATLAB used in this project is 2017a on 9 March 2017. It is a cloud-


based MATLAB desktop accessed in a web browser. The tools used in MATLAB are
neural network tool (nntool), neural functional tool (nftool) and Linear Regression
Model.

3.3 Models

3.3.1 Implementation of ANN model using nntool

Step 1: Open MATLAB and create 2 variables in workspace namely input and output.
Whatever the data imported in MATLAB should be in Excel sheet and is stored in
workspace. Import the data of frequency, current and voltage in input variable.
Transpose the variables by right clicking. Import the Tool wear rate in output variable
and transpose the data as shown in the below.

Figure 3.2 Input - Output data in Workspace


Step 2: Type nntool in command window, a dialog box opens. Import the data from
workspace to neural network tool by selecting input to input data and output to target
data.

Figure 3.3 Neural Network Tool box

Figure 3.4 Importing Input and Output data


Step 3: Create a neural network by clicking on new button, a dialog box opens. Give
name to network as network7777, select network type as feed-forward back
propagation and select all the data as follows:

Input data = input


Target data = output
Training function = TRAINLM
Adaption learning function = LEARNGDM
Performance function = MSE
Number of layers = 2
Number of Neurons = 10
Transfer function = TANSIG

Click on Create, a new Neural Network is created as follows:

Figure 3.5 Creation of Neural Network


Step 4: Open the network by double clicking on network7777 and click on view
button so that network diagram appears. Click on train, select inputs to Input and
outputs to Target. Click on training parameters, give max_fail as 100 and click on
Train Network as follows:

Figure 3.6 Network Diagram

Figure 3.7 Various parameters for Training


Step 5: Train the network by clicking on Train Network until the training
performance reaches 99%. It may take more times to achieve the best performance. In
training phase, designing of neural network and training is performed. In the testing
phase, the trained ANN model is assessed against testing data to determine its
suitability for achieving the objective of accurate performance with little error. In
Validation phase, it gives how the predicted and actual values are close to each other.
In this project, to obtain best performance it took 10 iterations i.e. input to output and
output to input is 1 iteration. The performances obtained are as follows:

Training performance = 99.952%


Validation performance = 99.991%
Testing performance = 99.995%
Overall performance = 99.959%
After training Export, the results to workspace.

Figure 3.8 Exporting values to workspace

Figure 3.9 Regression Plot


Figure 3.10 Neural Network Training performance box
Step 6: Now predict the values of any different inputs by typing network7777([input
values]’) in the command window as shown in the below figure:

Figure 3.11 Prediction of output values in Command window


3.3.2 Implementation of ANN model using nftool:

Step 1: Open MATLAB and create 2 variables in workspace namely input and target.
Import the data of frequency, current and voltage in input variable. Transpose the
variables by right clicking. Import the Tool wear rate in target variable and transpose
the data.

Figure 3.12 Importing input and target data in Workspace


Step 2: Type nftool in command window, a neural fitting dialog box opens. Click on
next and import the data from workspace to select data window by selecting input to
input and target to target data. Select Matrix column and click on next.

Figure 3.13 Importing input and target data from Workspace


Step 3: Select Training as 70% so that out of 54 samples 38 samples are taken for
training the network. Select Validation as 15% so that 8 samples as taken for
validation of network. Select Testing as 15% so that 8 samples are taken for testing as
network and click on next button.

Step 4: Select number of Hidden Neurons as 10 and a network diagram as shown


below.

Figure 3.14 Neural Network diagram


Step 5: Choose Training algorithm as Levenberg-Marquardt and click on train button.
Results of Training, Validation and Testing as shown below.

Figure 3.15 Results after Training


Step 6: Retrain the network until the Regression values reaches between 0.99 to 1.
Open Plot Error Histogram and Plot Regression for analysis and click on next button.
Evaluate the network by performing the additional tests by selecting Inputs to input
and Targets to target and click on Test network, Regression value is seen. Open
Regression plot to see accuracy of the network.

Figure 3.16 Regression Plot


Step 7: Click on next button and click on MATLAB Function. An automatic
MATLAB code is generated. Save this code for further prediction of values. Click on
next and save the results. Finally click on Finish button and click ok. The results will
be stored in the workspace. Run the MATLAB code in Editor Window for further
prediction of values as shown in the Figure 3.17.
Figure 3.18 Prediction of output values in the Command window

3.3.3 Regression Model analysis:

In general, regression analysis can be used to look into the relationship


between a dependent variable and its independent factors. Finding out how the
dependent variable's normal value changes when an independent variable is changed is
made easier, in particular, with the use of regression analysis. It can also be used to
show which independent variables, and to what extent, have a substantial impact on
the dependent variable [1].
Once you have fitted a model, you may use it to simulate or forecast responses,
evaluate the model fit using hypothesis tests, or utilise graphs to display diagnostics,
residuals, and interaction effects.

 Open MATLAB, create 4 variables namely Frequency, Current, Voltage and


Tool wear rate in the workspace as shown in the below. Import the input
variables (Frequency, Current and Voltage) in a variable X by typing
X = [Frequency, Current, Voltage]; in the command window. All the input
variables will be dumped in variable X.

Figure 3.19 Input and Output values in Workspace


 For Regression Model analysis type { model = fitlm(X, TWR) }in the
command window and press enter button. The model will generate an equation
for predicting the values as shown in the below.
 The equation is y ~ 1+β0x1+ β1x2+ β2x3
Where x1, x2, x3 are independent variables from Regression model.
y is dependent variable.
β0, β1, β2 are input variables such as Frequency, Current, Voltage respectively.
Figure 3.20 Intercept values for prediction

You might also like