Sei sulla pagina 1di 22

APPENDIX – A

ANOVA USING MINITAB

The functionality of MINITAB is accessible through interactive windows and


menus, or through a command language called session commands. There are three
windows viz. Data window, Session window and Project Manager. Data window is a
worksheet in a spreadsheet format, with rows and columns that intersect to form
individual cells.

From theWindows Taskbar, choose Start →Programs→MINITAB 16


(MINITAB SOLUTIONS) →MINITAB 16. Minitab opens with two main windows
viz. Session Window and Data Window. The first screen of MINITAB are shown as

A-i
MINITAB calculates response tables and generates main effects and
interaction plots for: signal-to-noise ratios (S/N ratios, which provide a measure of
robustness) vs. the control factors.

Minitab can also be used for generating the layout of designs for two-level full
and fractional factorial designs using Stat > DOE > Factorial. Taguchi orthogonal
arrays can be generated using Stat > DOE> Taguchi.

TAGUCHI DESIGN EXPERIMENTS IN MINITAB

Performing a Taguchi design experiment may consist of the following steps:

1. Before you begin using MINITAB, you need to complete all pre-experimental
planning. For example, you need to choose control factors for the inner array
and noise factors for the outer array. Control factors are factors you can
control to optimize the process. Noise factors are factors that can influence the
performance of a system but are not under control during the intended use of
the product. Note that while you cannot control noise factors during the
process or product use, you need to be able to control noise factors for
experimentation purposes.
2. Use Create Taguchi Design to generate a Taguchi design (orthogonal array).
Or, use Define Custom Taguchi Design to create a design from data that you
already have in the worksheet. Define Custom Taguchi Design allows you to
specify which columns are your factors and signal factors. You can then easily
analyze the design and generate plots.

A-ii
3. After you create the design, you may use Modify Design to rename the
factors, change the factor levels, add a signal factor to a static design, ignore
an existing signal factor (treat the design as static), and add new levels to an
existing signal factor.
4. After you create the design, you may use Display Design to change the units
(coded or uncoded) in which MINITAB expresses the factors in the
worksheet.
5. Perform the experiment and collect the response data. Then, enter the data in
your MINITAB worksheet.
6. Use ANOVA to analyse the experimental data.
7. Use Predict Results to predict S/N ratios and response characteristics for
selected new factor settings.

To create a Taguchi design

a. Choose Stat > DOE > Taguchi > Create Taguchi Design.

b. If you want to see a summary of the Taguchi designs available, click Display
Available Designs. Click OK

A-iii
c. Under Type of Design, choose a design.
d. From Number of factors, choose a number. The choices available will vary
depending on what design you have chosen.
e. Click Designs.

The designs that display depend on the number of factors and levels in your design.

Adding a signal factor for a dynamic response experiment

The signal factor values are repeated for every run of the Taguchi design
(orthogonal array).
f. In the Designs box, highlight the design you want to create.
g. Click OK even if you do not change any options. This selects the design and
brings you back to the main dialog box.

To assign factors to columns of the array

h. Under Assign Factors, choose To columns of the array as specified below in


the factor table, click under Column in the cell that corresponds to the factor
thatyou want to assign. From the drop-down list, choose the array column to
which you want to assign the factor. Then, use the key to move down the
table and assignthe factors to the remaining array columns. Click OK.

Naming factors

i. By default, MINITAB names the factors alphabetically. To name factors, In


the Create Taguchi Design dialog box, click Factors. Under Name in the factor
table, click in the first row and type the name of the first factor. Then, use the
key to move down the column and enter the remaining factor names. Click
OK.
A-iv
Setting factor levels

j. By default, Minitab sets the levels of a factor to the integers 1, 2, 3, … you


may change these to other numbers, such as the actual values of the factor
level, or to text levels. Under Level Values in the factor table, click in the first
row and type the levels of the first factor. Then, use the key to move down
the column and enter the remaining levels. Click OK.

Storing the design

k. If you want to analyse a design or see whether or not selected interactions can
be estimated from the design, you must store it in the worksheet. By default,
MINITAB stores the design.

Estimating selected interactions

l. Taguchi designs are primarily intended to study main effects of factors.


Occasionally, you may want to study some of the two-way interactions.

A-v
To select interactions

m. Under Assign Factors, choose To allow estimation of selected Interactions and


then click Interactions.

n. Move the interactions that you want to include in the design from Available
Terms to Selected Terms using the arrow buttons to move the interactions one
at a time, highlight an interaction, then click or to move all of the
interactions, click on or . You can also move an interaction by double-
clicking it.

o. Click OK.

A-vi
For performing Analysis of variance, Choose: Stat > ANOVA. This option allows
performing analysis of variance, testing for equality of variances and generating
various plots. The analysis can be carried out, using the suitable sub-option.

To perform an analysis using general linear model

p. Choose from the menu: STAT→ANOVA →General Linear Model

q. In Responses, enter up to 50 numeric columns containing the response


variables.
r. In Model, type the model terms you want to fit.
s. If you like, use one or more of the options described below, then click OK.

A-vii
Factor Plots subdialog box

t. Enter factors to construct a main effects plot.


u. Enter factors to construct an interactions plot.

A-viii
General Linear Model: TS versus N, S, F

Factor Type Levels Values


N random 3 1200, 1600, 2000
S random 3 48, 60, 72
F random 3 1.5, 2.0, 2.5

Analysis of Variance for TS, using Adjusted SS for Tests

Source DF Seq SS Adj SS Adj MS F P


N 2 943.48 943.48 471.74 17.28 0.000
S 2 869.47 869.47 434.74 15.93 0.000
F 2 2341.48 2341.48 1170.74 42.89 0.000
Error 20 545.95 545.95 27.30
Total 26 4700.38

S = 5.22469 R-Sq = 88.39% R-Sq(adj) = 84.90%

Main Effects Plot for SN ratios

A-ix
APPENDIX – B

ARTIFICIAL NEURAL NETWORK

NN Toolbox

NN toolbox can be open by entering a command.

>>nntool

It can also be open as shown below. It will open NN Network/ Data Manager Screen.

 Getting Started

 NN Network/ Data Manager

B-i
 Design

Let P denote the input and T denote the target/output. In Matlab as per the
guidelines of implementation these are to be expressed in the form of matrices:

P = [0 0 1 1; 0 1 0 1]

T = [0 1 1 0]

To use a network first design it, then train it before start simulation.

Follow the steps in order to do the above:

 Provide input and target data


Step-1: First we have to enter P and T to the NN Network Manager. This is
done by clicking New Data once.
Step-2: Type P as the Name, and corresponding matrix as the Value, select
Inputs under DataType, then confirm by clicking on Create.
Step-3: Similarly, type in T as the Name, and corresponding matrix as the
Value, select Targets, under DataType, then confirm. See a screen like
following figures

 Providing input data

B-ii
 Providing target data

 Create Network
Step-4: Now we try to create a XORNet. For this click on New Network. See
a screen like in the following figure. Now change all the parameters on the
screen to the values as indicated on the following screen:

 Defining XORNet network

B-iii
 Setting network parameters
Make sure the parameters are as follows:
Network Type = Feedforword Backprop
Train Function = TRAINLM
Adaption Learning Function = LEARNGDM
Performance Function = MSE
Numbers of Layers = 2

 Define network size


Step-5: Select Layer 1, type in 2 for the number of neurons, & select TANSIG
as Transfer Function. Select Layer 2, type in 1 for the number of neurons, &
select TANSIG as Transfer Function.
Step-6: Then, confirm by hitting the Create button, which concludes the XOR
network implementation phase.

Step-7: Now, highlight XORNet with DOUBLE click, then click on Train
button. You will get the following screen indicated in figure.

B-iv
 Training network

 Defining training parameters

B-v
 Step-8: On Training Info, select P as Inputs, T as Targets.

On Training Parameters, specify: epochs = 1000

Goal = 0.000000000000001

Max fail = 50

After, confirming all the parameters have been specified as indented, hit Train
Network.

 Training process

 Various Plots
Now we can get following plots Performance plot it should get a decaying plot
(since you are trying to minimize the error)
 Performance plot
 Training State Plot
 Regression Plot

B-vi
 Performance plot

Plots the training, validation, and test performances given the training record
TR returned by the function train.
 Training state plot

Plots the training state from a training record TR returned by train.

B-vii
 Regression plot

Plots the linear regression of targets relative to outputs.

 View weights and bias


Step-8: Now to confirm the XORNet structure and values of various Weights
and Bias of the trained network click on View on the Network/Data Manager
window.
NOTE: If for any reason, you don’t get the figure as expected, click on Delete
and recreate the XORNet as described above.

Now, the XORNet has been trained successfully and is ready for simulation.

B-viii
 XORNet Structure

 Network simulation
With trained network, simulation is a way of testing on the network to see if it
meets our expectation.

Step-9: Now, create a new test data S (with a matrix [1; 0] representing a set
of two inputs) on the NN Network Manager, follow the same procedure
indicated before (like for input P).

Step-10: HighLight XORNet again with one click, then click on the Simulate
button on the Network Manager. Select S as the Inputs, type in
ORNet_outputsSim as Outputs, then hit the Simulate Network button and
check the result of XORNet_outputSim on the NN Network Manager, by
clicking View.

This concludes the whole process of XOR network design, training & simulation.

B-ix
 Simulated result

MATLAB Code for Artificial Neural Network Model Program

% Input welding parameters (Tool Rotatinal Speed; Welding speed; Axial force)

p=[1200,1200,1200,1200,1200,1200,1200,1200,1200,1600,1600,1600,1600,1600,
1600,1600,1600,1600,2000,2000,2000,2000,2000,2000,2000,2000,2000;48,48,48,60,
60,60,72,72,72,48,48,48,60,60,60,72,72,72,48,48,48,60,60,60,72,72,72;1.5,2.0,2.5,
1.5, 2.0,2.5,1.5,2.0,2.5,1.5,2.0,2.5,1.5,2.0,2.5,1.5,2.0,2.5,1.5,2.0,2.5,1.5,2.0,2.5];

%Target values of Tensile Strength for corresponding combination of Tool Speed,


Welding speed and Axial force

t=[109.13,125.32,133.05,112.24,122.16,131.48,121.68,137.42,145.61,124.61,136.24,
145.48,122.68,132.61,143.37,124.89,139.61,152.00,115.52,127.89,136.13,131.48,
144.32,155.81,139.32,152.81,163.23];

[pn,minp,maxp,tn,mint,maxt] = premnmx(p,t);
% premnmx preprocesses the network training set by normalizing the input and
targets so that they fall in the interval of [-1,1]
% premnmx (p,t) takes these inputs,
% p-RxQ matrix of input (column) vectors
% t-Sxq matrix of target vectors

B-x
% and return,
% pn=RxQ matrix of normalized input vectors
%minp-Rx3 vector containing miminums for each p
%maxp- Rx3 vector containing miminums for each p
%tn-SxQ matrix of normalized input vectors
%minp-Sx3 vector containing miminums for each t
%maxp- Sx3 vector containing miminums for each t
% Size of input layers
numInputs = size(p,1);

% Adjust as desired hidden neurons


numHiddenNeurons = 20;
% Size of output layers
numOutputs = size(t,1);
%Transfer functions used for hidden and output layer
net.layers{1}.transferFcn = 'tansig';
net.layers{2}.transferFcn = 'purelin';
% Training function
net.trainFcn = 'trainlm';
% Creation of network model
net=newff (minmax (p), [20, 1], {'tansig','purelin'},'trainlm','learngdm','mse');
net.trainparam.show=50;
net.trainparam.lr=0.1;
net.trainParam.lr_inc = 1.05;
% Intialization of random weights
net = init(net);
net.initFcn = 'initlay';
net.inputweights{1,1}.initFcn = 'rands';
net.biases{1}.initFcn = 'rands';
net.layerWeights{1,1}.initFcn = 'rands';
%No. of iterations given
net.trainparam.epochs=10000;
net.trainparam.goal=0.01;

B-xi
% Training the network model
[net,tr]=train(net,p,t);
% Simulation of normalized values
an = sim(net,pn);
% Simulation of output values
a = sim(net,p);
anew = postmnmx(a,mint,maxt);

% testing for new set of values


pnew=[1200,1200,1600,1600,2000,2000,2000,48,60,48,60,48,60,72,1.5,1.5,1.5,2.0,
2.0,2.5,2.5];
% simulation of new outputs
a = sim(net,pnew)

Output of the Program


a = 109.59 113.09 125.22 132.37 127.13 156.07 163.56

B-xii

Potrebbero piacerti anche