36
RIoMP : Identification of Mechanical Properties in R Statistical Environment Leonardo Gutierrez, M.S. Rafael Batres, Ph.D. Industrial Systems Engineering Laboratory Department of Mechanical Engineering Toyohashi University of Technology, Japan Email: [email protected] Web: http://www.sc.pse.tut.ac.jp/leonardo-eng.html

R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

RIoMP : Identification of Mechanical Properties in

R Statistical Environment

Leonardo Gutierrez, M.S.

Rafael Batres, Ph.D.

Industrial Systems Engineering Laboratory

Department of Mechanical Engineering

Toyohashi University of Technology, Japan

Email:

[email protected]

Web: http://www.sc.pse.tut.ac.jp/leonardo-eng.html

Page 2: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 1 -

User Guide for R-IoMP

Welcome to R - Identification of Mechanical Properties (RIoMP) release 1.5.

Table of Contents

Preface ................................................................................................................................................ 2

Chapter 1 – Requirements ................................................................................................................ 3

Chapter 2 – Prepare files................................................................................................................... 4

Section 2.1 – Experimental Response files .............................................................................. 7

Section 2.2 –Design Space ....................................................................................................... 7

Section 2.3 – Inputs and Outputs ............................................................................................. 8

Chapter 3 – Make ANN with NEUROET ............................................................................................. 9

Chapter 4 – Execute code ............................................................................................................... 12

Section 4.1 – Input Files .......................................................................................................... 12

Section 4.2 – Metamodel commands - Results ..................................................................... 13

Chapter 5 – Saving the results ........................................................................................................ 19

Section 5.1 – Save the results to the internal memory ......................................................... 19

Section 5.2 – Export memory into a text file .......................................................................... 20

Chapter 6 – The Options panel (Verify results) .............................................................................. 22

Section 6.1 – Manual value input ........................................................................................... 22

Section 6.2 – Manual curve input ........................................................................................... 23

Chapter 7 – The variables ............................................................................................................... 24

Section 5.1 – Relevant functions ............................................................................................ 25

Section 5.2 – Relevant variables ............................................................................................ 26

Chapter 6 – RIoMP extended scope ............................................................................................... 27

Acknowledgement and Contact ....................................................................................................... 28

Appendix A – The Latin Hypercube Sampling ................................................................................. 29

Appendix B – Prepare the Input file (detailed) ............................................................................... 31

Page 3: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 2 -

Preface

…and small advices from author

RIoMP is a free tool for Design and Analysis of Computer Experiments (DACE), intended

to scientific purposes. RIoMP was originally created to ease the process of identification of

mechanical properties using the indenter machine.

The indentation experiment as a means for determining mechanical parameters has

been widely studied for the last century. With the arrival of advanced technologies and more

powerful algorithms, the typical time-consuming indenter-simulator problem is being recently

improved with surrogate model approaches. Surrogate models would allow a faster and

cheaper way to achieve the optimization step of the indentation experiment.

This methodology is studied in Gutierrez et. al1 (2014) by implementing the superEGO

algorithm of Sasena et al.2 (2002) in combination with different DACE techniques, such as the

Infill Sampling Criterion (ISC) proposed in Li et al. 3 (2014) and the Differential Evolution

algorithm (DE) published for R language by Ardia et al.4 (2011).

In general, a complete set of tools for performing the “identification of mechanical

properties using surrogate models” methodology would include:

Physical experiment device

Simulator / rigorous modeler (e.g. MSC MARC®)

Surrogate modeler (e.g. Neuroet)

DACE tool (e.g. RIoMP)

In this sense, RIoMP is designed to concentrate all DACE techniques described in

Gutierrez et. al (2014) and assist the user in the processing of these techniques in an easy,

reliable and low-cost way. RIoMP was written in an open-source platform: R statistical

environment (CRAN project).

This manual aims at those users who are familiarized whether with DACE or indentation

experiment. Hence, the goal is to achieve certain expertise in both of them.

1 Gutierrez L., Li H., Toda H., Kobayashi M., Kuwazuru O. and Batres R., “A Method for the

Identification of mechanical properties using Surrogate Models”, International Journal of Computer Theory

and Engineering , IJCTE Vol. 6, No. 3, pp. 234-239, 2014. 2

M. Sasena, P. Papalambros, and Goovaerts, “Global optimization of problems with disconnected

feasible regions via surrogate modeling,” American Institute of Aeronautics and Astronautics, 2002. 3 Li H., Gutierrez L., Toda H., Kobayashi M., Kuwazuru O. and Batres R., “A Numerical Evaluation of

an Infill Sampling Criterion in Artificial Neural Network-Based Optimization”, International Journal of

Computer Theory and Engineering , IJCTE Vol. 6, No. 3, pp. 272-277, 2014. 4 D. Ardia, K. Boudt, P. Carl, K. Mullen, and B. G. Peterson, “Differential evolution with DEoptim, an

application to non-convex portfolio optimization,” The R journal, vol. 3, no. 1, pp. 27-34, 2011.

Page 4: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 3 -

You are almost ready… Here are some last recommendations before starting:

Consider checking Neuroet user guide for the creation of ANN’s. RIoMP works hand-to-

hand with Neuroet. P. Noble and E. Tribou5 (2006) publication contains strong scientific

background for this program.

Regarding some ANN features: this code works for any number of hidden neurons, and

up to 15 parameters (or input variables).

Hardware requirement is basic. In general, it is recommended to use computers with

processor similar or superior to Intel® CORE2DUO for an optimum performance.

I hope the user can enjoy this code, which is intended to ease the researcher’s lab duties.

However, in case of any bug or error, I apologize in advance and would very much appreciate

any feedback. The author’s contact is in the last section of this user guide: “Acknowledgement

and Contact”.

Leonardo Gutierrez Vilchis, Toyohashi Japan 2014

Chapter 1 – Requirements

Be sure to prepare the next software on your computer:

1. R Statistical Computing http://www.r-project.org/

Once you install R statistical environment software, it will be necessary to install the following

packages (or libraries).

i. tcltk (usually included in the basic installation)

ii. Tkrplot (manually installed)

iii. DEoptim (manually installed)

iv. lhs (in case you require the Latin Hypercube Sampling function of Appendix A)

2. Neuroet (.jar files)

For the case of Neuroet, a proper installation process is not required; however, Java Runtime

Environment 6 is needed to run Neuroet.

5 A. P. Noble and H. E. Tribou, “Neuroet: An easy-to-use artificial neural network for ecological and

biological modeling,” Ecological Modeling, vol. 203, pp. 87–98, 2007.

Page 5: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 4 -

Chapter 2 – Prepare files

Since RIoMP has the objective to work from the results produced by other programs, a correct

preparation of those results into text files is fundamental to this methodology. In this chapter it

is shown how to manage the basic 6 files required to run the program.

In order to ease the understanding of the user, it is provided 4 example sets. Each of those 4

folders contains at least the 6 files that we are going to describe in this section. Please use

them freely.

The file list is as follows:

1. Experiment result – Experimental response (see Section 2.1)

2. Inputs – Parameters (see Section 2.2)

Requirements 1: Installing packages

To install any package in R statistical environment software, click in the menu “Packages” and

select “Install packages (s)”. If this is the first time you install a package, a list of CRAN mirrors

(servers) appears. Select the nearest geographical location and click “OK”. Finally, click on the

package which you want to install and select “OK”.

Page 6: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 5 -

3. Output – Simulation Response (see Section 2.2)

4. biases – Biases used for the ANN (see Section 2.2)

5. weights – Weights used for the ANN (see Section 2.2)

6. Design Space – Range of parameters in which the program searches for the optimum

solution (see Section 2.3)

The files are .txt format (tab separated) because they mostly contain data organized in columns

and rows. The origin of these files is varied: some of them have to be adapted from other data

results (Inputs and Outputs), others no need user intervention at all (biases and weights), and

finally some must be created manually by the user (Design Space).

The flow chart shown below describes the “File Management” process during the project.

An important concept about RIoMP is that it is designed to extract a lot of implicit information

from the files.

Prepare Files 1: File management

MARC simulation software provides the simulation results. These results are manually adapted to

Inputs and Output files and submitted to train the ANN in Neuroet. The same files are later used for

optimization in RIoMP. The biases and weights represent the equation of the ANN, RIoMP can

ensemble these files automatically. The Experiment file contains data of the real experiment results.

Finally, the Design Space has to be created manually by the user.

Page 7: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 6 -

The headers in each file are very important. For example, the code will identify that

“Displacement” is the independent variable because it is the only variable which appears in

three files: Experiment results, the ANN Inputs, and the Design Space. Therefore, if the column

titles in each of these files are not the same, the code won’t be able to recognize the variables;

eventually, it will result in an error.

Very Important: Make sure that the HEADERS of the columns which represent the same

concept (for example “Displacement”) are identical among the files. Unfortunately, spaces or

especial characters are also not allowed. This is to say:

Does not work Use the same: It works!

Displacement column title in

Experiment results file Displacement nm Displacement_nm_

Displacement column title in

Neural network Inputs file Displace%[nm] Displacement_nm_

Displacement column title in

Design Space file Displacement_nm_ Displacement_nm_

A symptom that you are using different titles is when R console shows messages related to the

data frame of some internal variables, such as:

Error in `[.data.frame`(experiment, , outvars) :

undefined columns selected

When you type in the console: “experiment”, “outvars” or “invars” (names of some internal

variables) you will be able to verify the headers that the program has captured from your files.

Biases and weights files do not require a header.

Page 8: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 7 -

Section 2.1 – Experimental Response files

This is an example of the Experiment response file:

Section 2.2 –Design Space

To perform an efficient computer experiment, according to Gutierrez et. al., DACE encourages

the usage of techniques such as the Design Space (DS) of parameters values. From inside of

that DS we will choose 4 to 8 sets of parameters values to build the ANN. (See also Latin

Hypercube Sampling (LHS) in Appendix A). In this section we will focus on the Design Space.

This is an example of the design space file:

Prepare files 2: Experiment

(a) Left: A screenshot of the file which contains the experimental numerical values.

(b) Right: A plot of the data contained in the file described in (a).

The Experiment response file usually has only two columns: the dependent variable, and the

independent variable of the experiment. Be sure to remove any uncertainty in the data or any

additional information you think is not necessary.

Prepare files 3: Design Space

This file contains as many columns as variables needed, so you can use the same columns as

the Inputs file described in section 2.3. For each column, it is necessary to specify a minimum

and a maximum values in which you are willing the optimization algorithm to search.

Page 9: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 8 -

The order of the columns of the design space depends on the order of the columns in the

Inputs file. You can choose, however, whether to put the minimum value at the top and the

maximum at the bottom, or vice versa.

*Note: For the cases of “Displacement” and “Binary” columns, the range is implicitly given in the

Input file so it is not necessary to specify a range at all. Any value is fine for these columns, e.g. 0.

Section 2.3 – Inputs and Outputs

Simulation results are obtained for each of the sets of values in the LHS. These results must be

organized in two files: The Inputs and Output.

These are examples of the Inputs and Output files:

The Appendix B of this guide explains in detail how to prepare the inputs and outputs. Roughly,

you need three steps:

1. Rearrange the simulation response data: put the inputs (Displacement variable) in one file

and the outputs (Load variable) in another one.

2. Add one column for each material parameter, and put their corresponding value in each

row.

3. Define the “loading” and “unloading” sections of the curve. To do this, introduce a Binary

column, this is, for all the rows belonging to the “loading” section put a “0”, and for all

rows belonging to the “unloading” section put a “1”. A spreadsheet application might be

useful to complete this task.

Prepare files 4: Inputs and Outputs

The Inputs file (left side of the picture) has several columns, and the Output file (right side) has

only one column.

Page 10: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 9 -

Chapter 3 – Make ANN with NEUROET

This chapter is a quick guide for creating Artificial Neural Networks (ANN’s) using Neuroet

program with the minimum requirements6.

If this is the first time to run the application, first be sure to install java runtime environment

version 6 on your computer. Then, copy the nn.jar and or124.jar files to your computer. For

example, in my computer these files are located in the path:

C:\Users\Leo\neural_net\nn.jar

C:\Users\Leo\neural_net\or124.jar ,

which means that I must execute the commands from the path C:\Users\Leo\neural_net\ .

After writing the executing java command and pressing <enter> key, a short message will be

displayed: “Starting up, Ready to rock!”. The Neuroet interface will appear:

6 If you are interested in how to elaborate more complex ANN’s don’t hesitate to take a look on the

manual for “Neuroet: a simple artificial neural network for scientists”; an application from professor

Peter A. Noble from University of Washington Seattle.

Make ANN’s 1: Run Neuroet

In windows, execute the command application cmd.exe. Then, find the Neuroet files directory

and type the next command line:

java -cp "./nn.jar;./or124.jar" neuroet.Startup

Note: If you are using a different OS: java -cp "./nn.jar:./or124.jar" neuroet.Startup

Page 11: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 10 -

Finally, to train your ANN follow the next three steps:

1. Load the Inputs file and the Outputs file from the tab “Train Network”.

2. Configure the neural network training options from the panel Edit>Preferences.

Make ANN’s 2: Configure Neuroet

The required configuration of NEUROET is as follows:

From the Edit menu select Preferences and configure the panel as shown above. This

configuration guarantees the best compatibility with RIoMP code.

Page 12: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 11 -

The fields marked as “Optional” can vary depending on the following criterions:

a) Number of Hidden Neurons – In the indentation problem, good results have been

achieved with numbers between 6 ~ 12. 8 HN’s has demonstrated to have powerful

pattern recognition. It is also possible to find several options to find the optimized HN’s

of the ANN; the tab Optimize Hidden Neurons performs a statistical analysis to help you

choose the best number of HN.

b) Training Method – Particularly for the indentation problem, results quality has been

achieved in the next order: Standard Backpropagation (high performance), Levemberg-

Marqardt (good performance), and Conjugate Gradient (average performance).

c) Threshold – This option controls when the training step must be stopped. Neuroet

calculates the statistical r-squared (correlation coefficient) of the error between the

ANN prediction and the original training output. A perfect fit would be when r-squared

equals to 1, so if the “Threshold” option is set to 1.0, the program will continue training

the ANN until the ANN error shows no improvement. In many situations the value of 1.0

is very hard to reach. However, for the case of the nanoindentation research it is

common to get values over 0.97.

d) Keep Best Generalizations – If this option is unchecked, one single ANN can be

obtained. When this option is checked, 100 ANN’s are trained at once and categorized

automatically into 10 sub-folders; each one contains the best result for every 10 ANN’s.

Once the preferences are set, continue to the third and last step.

3. Train the ANN, and obtain the Biases and Weights.

Prepare files 5: Biases and Weights

This is an example of the biases and weights files:

To obtain the Biases and Weights of the ANN, you can do the next:

i. Train the ANN by pressing the “Train Network” button in the Neuroet interface.

ii. Save the results file in your computer.

iii. Find the “bias.txt” and the “weights.txt” files.

Page 13: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 12 -

Chapter 4 – Execute code

Open the R programming environment and install the needed libraries (see Chapter 1). Do a

copy-paste of the RIoMP code in the R console. The main interface of R-IOMP appears

automatically.

The user interface has 6 sections:

1. Input Files – Section for loading the input files.

2. Metamodel commands –Commands for making the optimization and infill sampling.

3. Results – Some numerical results and feedback information.

4. Options – Visualize RMSD of Plotted curve, manually inputted parameters and curves.

5. Active Memory – Slots of memory in for saving results after every optimization or infill.

6. Display – Screen for showing the current plot and other log messages.

Section 4.1 – Input Files

This part of the interface is used for loading the input files prepared in last sections. Be sure to

prepare them correctly and load them in order. Some of the common mistakes you might have

are:

o Error 1: Headers which describe same type of column are not identical. Even spaces

are not allowed in the headers name.

Page 14: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 13 -

o Error 2: Additional “invisible” rows and columns at beginning or end of the file. You can

delete additional columns or rows using spreadsheet software, such as Excel.

o Error 3: different extension. It is necessary to save your files with the extension .txt (tab

separated).

The next image shows the aspect of the interface after loading the files.

Section 4.2 – Metamodel commands - Results

This part of the interface represents the methodology of the Identification of Mechanical

Properties using ANN’s. The code executes the methodology in steps:

I. Step 1: Experiment – Plots the original curve of the Experiment input.

II. Step 2: Find regression – Plots the original curve versus another two power law curves.

The coefficients for both power-law curves are shown in the “Results” section of the

interface based on the next formula:

A maximum displacement is calculated by assuming an intersection between the two

power-law-curves:

III. Step 3: Calibrate – Calculates the calibration and re-plots the adjusted curves.

Interface 1: Input Files

Page 15: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 14 -

Interface 2: Metamodel Commands (Find Regression & Calibration)

(Up) After pressing “Find Regression” button, the coefficients for the regression curves are shown in

the “Results” section. The program shows a plot of two green dotted-lines representing the regressed

curves. (Down) When the “Calibration” button is pressed, the green lines become solid and the whole

system is displaced to match the Input’s maximum displacement (calibration process). The

calculated calibration is shown in the “Results” section.

Page 16: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 15 -

IV. Step 4: Read ANN – Assembles the weights file and biases file. This command allows

you to produce random ANN’s and verify roughly the performance of the previously

trained ANN (Neuroet).

V. Step 5: Optimize – Finds the optimum fit between the calibrated curve and a prediction

given by the ANN’s Design Space.

When you press the “Optimize” button the code searches for the best combination of

parameters that generates a prediction which fits the original experiment curve. That

fitted curve is plotted in blue color. In the ideal case this curve overlaps the green line

(the regression), and also the red curve (the original experiment).

Note that by this time, all the fields in the “Results” panel are filled. After the

optimization step, the field “Objective F.” contains the objective function result from the

optimization algorithm. This number has no physical meaning and it is used only as a

referrence. Note that in the “Options” panel (right side of RIoMP GUI interface) the

RMSD point-by-point is shown, RMSD has a physical meaning and it might be important

for the final results.

Interface 3: Metamodel Commands (Read ANN)

When pressing the “Read ANN” button, a random prediction is plotted and compared with the

calibrated experiment curve. In the “Options” panel right side of the interface, the code automatically

calculates RMSD “point by point”.

Page 17: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 16 -

Step 5.1: Optimizer “Objective Weights”

The user can choose to modify the weights of the objective function of the optimization

algorithm. This objective function is based in three different curve features: “match the

tips”, “match the area below the curves” or “match the curves point by point”. Shimizu

et. al7 explains that “it is desirable to make the optimal solution adapt dynamically

according to the deviation of parameters and/or changes of the environment.”, which

motivates the idea of including a program function that helps the user to focus on

certain features of the curve that are considered as relevant. Shimizu continues saying

that “For various reasons, however, such a dynamic adaptability is not easy to achieve.”

Sometimes you will need several trial optimizations until you achieve the results you

need.

For example, the next image shows the default values in the section for “Objective

Weights” <Tips:0.1>, <Point:0.8> and <Areas:0.1>:

7 Shimizu Yoshiaki, Zhang Zhong & Batres Rafael, “Frontiers in computing technologies for

manufacturing applications”, 2007 Springer-Verlag London Limited, Chapter 2.5.1.

Interface 4: Metamodel Commands (Optimize)

The “Optimize” function searches inside the Design Space for the best combination of

parameters that matches the prediction and the original experiment. When the computer

completes the optimization algorithm then 1) the prediction is plotted, and 2) the plot image is

automatically copied to the clipboard.

Page 18: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 17 -

These values stand for the next formula:

| | Where:

is the weight of the error between the tips of both curves. This aims to fit the

maximum value of the dependent variable “Loads” from both the original

experiment and the prediction curves.

is the weight of the error between both curves calculated point by point.

This aims to fit the curves using a simple RMSD (Root mean-squared

deviation).The disadvantage of this method is that if the data is too noisy or has

a clustered distribution, the optimization algorithm may intend to fit certain

regions that could not be relevant for the user.

is the weight of the error between both curves calculated by integrating the

curves and comparing the areas. This is encouraged by the idea that when the

number of points is very huge (e.g. >1000) an RMSD can be replaced by the

error between the area below the curves. This helps to reduce the noise or

clustering of some regions of the dataset. However, this method might be

inaccurate in some cases in which the data clustering does matter.

In a more sophisticated context, the “Objective Weights” feature also helps the user to

keep a “balance” between the scale of the units, the size of the dataset and the

magnitude of the error.

VI. Step 6: Infill Sampling – Calculates an infill point using the Infill Sampling Criterion (ISC)

proposed by Li et. at8. This method suggests adding a point that potentially increases

the accuracy of the ANN prediction. The ISC is designed to find the “weak” parts of the

current ANN. It is high recommended to calculate an infill point and run the entire

methodology again. The ISC, in general, ensures that the ANN prediction and the

simulation response remain consistent.

During each step, the program displays control messages which guide user through the entire

process. You have the option to follow up your progress by looking at the “message” entry in

the lower frame of the interface. Also, for some simple mistakes, RIoMP code has a simple

error-detection system through pop-up windows. However, you may find some typical difficulties,

such as the next ones:

8 Li H., Gutierrez L., Toda H., Kobayashi M., Kuwazuru O. and Batres R., “A numerical evaluation of an

infill sampling criterion in artificial neural network-based optimization”, International Journal of Computer Theory and Engineering, IJCTE Vol. 6, No. 3, 2014

Page 19: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 18 -

(This is a continuation of section 4.1’s list of most common errors)

Error 4 – Execute steps in order. Try to follow the command steps starting from 1 to 6.

Error 5 – Long time waiting. Try to keep an eye on the R main console in order to detect

any missing element. Sometimes the algorithm cannot run because there is something

wrong or missing in the input files. Generally, errors and other messages are displayed

in R console in blue:

This error is also explained in Chapter 2.

Page 20: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 19 -

Chapter 5 – Saving the results

This chapter explains how to save, visualize, and export the results obtained during the

parameters optimization and infill sampling point calculation. In general, there are two different

ways for saving your results. The first method is temporal, this is to save the program results in

the internal memory (Section 5.1); and the second one is permanent, this is, to export the

memory into an editable file (Section 5.2).

Section 5.1 – Save the results to the internal memory

Execute steps 5 or 6 of the section 4.2. You might notice that the values of the material

parameters are still not visible, so in order to see them, select any of the 9 slots of memory in

the right panel of the GUI of RIoMP and press the button “Save Optimum” for the case of an

ANN prediction optimization (section 4.5, step5), or press the button “Save Infill” for the case

of an Infill Sampling optimization (section 4.5, step5). Now, press “Data” to visualize the saved

values.

Interface 5: Saving your Results

The numerical values of the optimum parameters are initially stored in a common variable. This

common variable works like in a bus network which carries information from function to function

within the program. This means that if you decide to run a new process, the values generated by the

former optimization will be automatically deleted. However, this common variable can be “copied” to

a temporary memory by pressing the “Save Optimum” or “Save Infill” buttons.

Page 21: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 20 -

Section 5.2 – Export memory into a text file

As it was explained in the section 5.1, the numerical results can be stored in a temporary

memory so that the user can access to this information any time within the current session. If

you decide to close the program or restart it then the information won’t be available anymore.

In this case, what can be done is to export the information contained in the memory slots into

an editable text file.

RIoMP has a function called “Export Memory” in the lower tab of the program interface. To

export the data saved in the slots, just press the “Export Memory” button, then open the

generated file with any spreadsheet software.

The results file will look something like this:

Tip: In order to remove the quotation marks (“”) in your results file, you can open it once

by using Microsoft Excel, save it and open again in any text editor. You will see that the

quotation marks are gone.

Page 22: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 21 -

In general, the results file will contain the next information:

(Row 1) Date in which the file was created.

(Row 3 & 4) The general information about the experimental input/output names,

number of inputs, the ANN number of hidden neurons, and the calibration value.

(Row 8 ~) The data of each of the 9 slots available.

For example, the image shown in Interface 6 is a results file created from an Active Memory

with only three used slots. From row 9 it can be appreciated that the Slot1 is type “ANN

optimum”, this means that Slot1 contains a material parameters optimization. The second

slot’s type is “Infill Point” which stands for an ISC point calculation. The last slot used in this

example is the Slot 3 and the other memory slots are empty.

Interface 6: Exporting your results

The button “Export Memory” produces a .txt file which can be opened using a spreadsheet software.

The document is organized in rows and columns containing some information gathered during that

session.

Page 23: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 22 -

Chapter 6 – The Options panel (Verify results)

The options panel has two objectives:

(a) To manually input values for comparing against the experiment.

(b) To manually input another curve for comparing against the experiment. For example,

when you want to see how well a simulation fits your results.

Section 6.1 – Manual value input

To manually load parameters first you have to execute the metamodel commands (section 4.2)

until the step 4 (Read-ANN). Once the program ensembles the ANN you are ready to predict any

combination of inputs. You can take the same file as used for the Design Space in Section 2.3

and input manually the parameters values which you want to predict:

Load your manual_input file in the “Manual Param.” entry and press the “View plot” button.

You will see an ANN created from those values, and additionally you can compare it against the

experimental curve. Also you will see that the “Manual RMSD” field now contains the root-mean

square deviation (RMSD) value of the predicted curve versus the experiment curve.

Page 24: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 23 -

Section 6.2 – Manual curve input

When we want to inspect visually / numerically a simulation vs. an experiment, or to compare

an experiment vs. another experiment, then this function could be useful. Load the simulation

results in the same format as the experimental response in section 2.1; use the same titles

and columns.

Be sure to execute the metamodel commands (section 4.2) until the step 4 (Read-ANN). Then,

load the simulation file and press either the “Sim.” button next to the “Step1 – Experiment” or

the one next to the “Step3 – Calibration” in the metamodel commands panel. If you press the

first one, you will see a raw comparison of the simulation versus the experiment. When you

press the second one, the comparison is done by first calibrating the experiment. Finally, you

will see the root-mean squared deviation (RMSD) in the field “Simul.RMSD” of the Options

panel.

Page 25: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 24 -

Chapter 7 – The variables

After you get used to RIoMP interface commands, you may notice that there are other

possibilities of handling the information directly from the R console. If you get stuck at some

point using the GUI of RIoMP, then you may find useful to call or modify manually any variable

of the program.

In the next two examples, I would like to describe how to visualize manually some of the

important concepts that we have worked out along this user guide.

I. Call variables which contain results

The variable which contains the parameter values after the optimization step is:

XVector # The optimum Vector

After making an optimization, if you type XVector in the R console you will get something like

this:

This vector doesn’t contain any information about the name of the variables but we know

they belong to the same parameters from the inputs described in section 2.2. So in order to

verify the names of each of the 6 values you can type invars.

II. Execute functions

When you produce an ANN, the thing you can see in the RIoMP GUI is the plot of the ANN

prediction. However this plot is a representation of numerical values which are not

available from the interface. If you want to know what the values plotted are, then you can

do two things: (1) type the variable which contains the ANN’s vector, or (2) run a function

which returns an ANN prediction containing these values.

Let’s create an ANN using the vector described in the previous example: XVector. As we

already know, XVector contains the optimum values. We can generate an ANN using the

next function:

neuralnet.f (x) # Building neural network based in a vector of values

Page 26: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 25 -

Now replace x with the variable needed:

It is possible to put any other vector inside. Just be sure that the vector you put is

congruent with the number of inputs. You can create manually a vector like this:

myvector <- c(1,2,3,4,5,6)

The RIoMP code is written in .doc format so any user can explore and navigate the document.

Inside the code there is a long list of functions which can be visualized on the Navigation panel

(select the option Navigation Panel from the “View” panel of Microsoft Word).

To conclude this chapter, the next two sections contain a list of some of the most relevant

functions and variables.

Section 5.1 – Relevant functions

Functions with a parameter x that can be replaced always by XVector

Oneuralnet.f (x) Build ANN using a vector x of inputs. The size of

the resulting vector is as big as the Experimental

file number of inputs.

neuralnet.f (x) Build ANN using a vector x of inputs. The size of

the resulting vector is 500 entries.

area.num.f (x) Calculates the numerical integration of an ANN

generated by using a vector x of inputs.

calculate.RMSD.f (x) Calculates the RMSD of an ANN built using a vector

x of inputs.

Functions that doesn’t need a parameter

generate.x () Generates a random vector of inputs. This vector is

saved as the variable xx.

area.int.f () Calculates the integration of the experimental

curves.

Page 27: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 26 -

Section 5.2 – Relevant variables

Files ---------

experiment # The experimental file with Title

inputNN # Vector of inputs used to train NN with Titles

outputNN # Vector of outputs used to train NN with Titles

biasesNN # Vector of biases including output bias

weightsNN # Vector of hidden neurons

weights2 # Vector of output neurons

ninputs # The number of total inputs

nneurons # The number of neurons

exper # Experimental file directory and name

expvars # Names of the experimental variables

invars # Names of the input variables

outvars # Name of the output variable

mainvar # Name of the main variable (eg. Displacement)

Onn # Length or number of the (original)data input vector

inputa # Inputs of the load section

inputb # Inputs of the unload section

outputa # Outputs of the load section

outputb # Outputs of the unload section

Regression ------

optimA1 # Regression, coefficient A for load

optimC1 # Regression, coefficient C for load

optimn1 # Regression, coefficient n for load

optimA2 # Regression, coefficient A for unload

optimC2 # Regression, coefficient C for unload

optimn2 # Regression, coefficient n for unload

topa # The top value (tip)of the curve of the ANN prediction

Calibration ------

calC1 # Calibrated parameter C1 (Replaces optimC1)

calC2 # Calibrated parameter C2 (Replaces optimC2)

calibration # Calibration value

maxcal # The value which the program intends to calibrate

vector_1 # New “clean” vector of values for inputs load

vector_2 # Proportional vector of values for inputs unload

nn # Number of total rows of both the new “clean” vectors

intersection # The experiment calculated tip by regression

Neural Network ------

MMvalmat # Matrix of number of inputs

Mini # Matrix of inputs minimums

Mino # Matrix of outputs minimums

Maxi # Matrix of inputs maximums

Maxo # Matrix of outputs maximums

Minput # The main input vector

Binary # The binary vector

binary_is # Location of binary vector in the inputs

main_is # Location of main vector in the inputs

VARS # The current/optimized evaluated vector of inputs

xx # Is a vector of random inputs within the design space

Page 28: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 27 -

Optimization ------

area.int # The area of the curve by algebraic integration

area.num # The area of the curve by numeric integration

XVector # The optimum Vector

Infill sampling ------

InfillX # The current vector for Infill

Memories ------

SM1 # Slot memory 1 – optimized values

SM2 # Slot memory 2 – optimized values

SM3 # Slot memory 3 – optimized values

SM4 # Slot memory 4 – optimized values

SM5 # Slot memory 5 – optimized values

SM6 # Slot memory 6 – optimized values

SM7 # Slot memory 7 – optimized values

SM8 # Slot memory 8 – optimized values

SM9 # Slot memory 9 – optimized values

Chapter 6 – RIoMP extended scope

This version was fully designed for the Indentation Method. Nevertheless, RIoMP methodology

can be extended to diverse problems.

If you decide to try any different problem that involve two intersecting curves (similar to the

indentation experiment), please consider the next facts about RIoMP:

The lines should intersect only once: in the upper limit.

The curves should be able to be regressed with the power law or a simpler form of it.

RIoMP is not fully tested to work for curves containing negative values.

Take into account the clustering of the data in the curves. Consider that few values

have a small weight in the moment of the optimization and viceversa.

Page 29: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 28 -

Acknowledgement and Contact

This code is for scientific purposes.

I would like to thank Dr. Li from Production Systems Engineering Laboratory at Toyohashi

University of Technology, and professor Osamu Kuwazuru from the Department of Nuclear

Power & Energy at University of Fukui, for they support and collaboration with the creation of

this software. Special thanks to prof. Peter A. Noble from the University of Washington, for

making feasible my research; for which lots of contribution and results were obtained with his

software: Neuroet.

For any further contact, email to [email protected] , or contact the laboratory of our

Industrial Systems Engineering group from Toyohashi University of Technology in its webpage,

from which this guide and RIoMP code can also be downloaded:

http://www.sc.pse.tut.ac.jp/index-e.html

The paper that contains the full methodology described in this user manual (Gutierrez et al.

2014) was published by editorial of International Journal of Computer Theory and Engineering

(IJCTE) in its Volume 6, Number 3, June 2014. Currently the paper is available for downloading

in the following link:

http://www.ijcte.org/papers/868-F032.pdf

Page 30: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 29 -

Appendix A – The Latin Hypercube Sampling

The Latin Hypercube Sampling (LHS) is a technique of the Design and Analysis of Computer

Experiments (DACE) discipline. In Sacks et. al9, the LHS is described as “an extension of

stratified sampling which ensures that each of the input variables has all portions of its range

represented”. The lhs package of R statistical environment includes several types of LHS. The

LHS used in this research is the Optimum LHS (OLHS) proposed by Stocki10, whose algorithm is

already contained in the function optimumLHS of the lhs package.

The LHS reference manual is available on the R site:

http://cran.r-project.org/web/packages/lhs/lhs.pdf

The next is the code for generating an OLHS with 8 sampling points, 4 parameters and a design

space like this:

START CODE:

# Load the library for LHS

library (lhs) # Load the library for LHS

# set.seed(1234) # remove the ‘#’ if you want to get the same results as this example

LHS8 <- optimumLHS(8, 4, 5, .05,TRUE) # Generates the LHS with 8 partitions and 4 replications

LHS8 # Show the results of the LHS

# Create an individual matrix of 1’s

I8 <- matrix(1,nrow=8,ncol=1) # Make a matrix with 8 partitions to contain the scaled values of next step.

# Scale LHS to the design space values in individual columns

ELHS8 <- ((LHS8[,1]*(150-50)+50)*I8) # Scale the first column of the LHS to fit the DS for the param. E

CLHS8 <- ((LHS8[,2]*(1000-500)+500)*I8) # Scale the first column of the LHS to fit the DS for the param. C

nLHS8 <- ((LHS8[,3]*(0.3-0.1)+0.1)*I8) # Scale the first column of the LHS to fit the DS for the param. n

aLHS8 <- ((LHS8[,4]*(0.002-0)+0)*I8) # Scale the first column of the LHS to fit the DS for the param. a

9 J. Sacks, W. J. Welch, T. J. Mitchell and H. P. Wynn,”Design and Analysis of Computer Experiments”,

Statistical Science, Volume 4, Issue 4 (Nov. 1989), 409-423. 10 R. Stocki, “A method to improve design reliability using optimal Latin hypercube sampling”, Computer

Assisted Mechanics and Engineering Sciences 12, 2005, 87-105

Page 31: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 30 -

# Put all the columns together in the same matrix

theLHS8 <- array(1,c(8,4)) # Make the matrix that will contain each column

theLHS8[,1] <- ELHS8 # Attach the column of the parameter E

theLHS8[,2] <- CLHS8 # Attach the column of the parameter C

theLHS8[,3] <- nLHS8 # Attach the column of the parameter n

theLHS8[,4] <- aLHS8 # Attach the column of the parameter a

theLHS8 # See the final Design Space

END CODE

The result of this code is an optimum LHS like this:

[,1] [,2] [,3] [,4]

[1,] 103.80840 594.2067 0.2795274 0.0014399177

[2,] 127.51560 641.1756 0.2498038 0.0002018381

[3,] 144.41667 790.4004 0.1577956 0.0016554548

[4,] 66.62213 718.8748 0.1919274 0.0018712478

[5,] 78.04911 547.8412 0.1268445 0.0005774217

[6,] 96.46590 906.5341 0.1038250 0.0011259834

[7,] 118.67451 984.4500 0.2043662 0.0004620981

[8,] 60.81042 815.1161 0.2579296 0.0007534375

The first column represents the parameter “E” of the design space and it contains values

between 50 and 150, the second columns represents “C” and it has values between 500 and

1000, the third column represents “a” which has values between 0.1 and 0.3, finally, the last

column represents the parameter “n” and it has values between 0 and 0.002.

Page 32: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 31 -

Appendix B – Prepare the Input file (detailed)

The Input file is probably the most important of the files used in RIoMP methodology. The

inputs’ file contains implicit information about:

the simulations results

the parameters configuration (LHS)

the maximum displacement and load

Let’s say that you have already obtained two different simulation curves. We can start by

putting them in two columns in a spreadsheet:

Page 33: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 32 -

Add the parameters that you used in the simulation to each curve. To do this, insert a column

for each of the parameters used in that simulation and put its value.

Separate the “loading” and “unloading” curves and find the maximum displacement. As shown

in the next figure, the “loading” curve contains all the points from the displacement from

to , while the “unloading” curve contains those points from to . Finally,

represents the maximum displacement.

Page 34: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 33 -

Add a “binary” column. Put a “0” for those rows belonging to the loading curve, and then put a

“1” in the unloading curve. The maximum displacement point is the intersection of the “load”

and “unload” curves, duplicate this row and write a binary in each.

Find the additional rows or values which has no relevant physical meaning. In the indentation

problem, the last part of the simulation contains values measured when the tip is already not in

contact with the material, so it is possible to remove them. These values may appear in your

data whether as negative values or very small values.

Page 35: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 34 -

Copy the values to separates sheets. In one sheet paste those columns which represent the

inputs (Displacement, Parameters and Binary), and in another sheet paste the outputs (Load).

Be sure to write a line of headers and not to leave blank spaces (see also chapter 2).

It is a good idea to save your document as excel file in this moment. Later, save each sheet

separately as .txt format so you can open them independently in a text editor.

You are ready now! The inputs and outputs files will be used for training the ANN, as described

in Chapter 3, and also for performing the methodology in RIoMP (Chapter 4).

Page 36: R-IoMP: Identification of Mechanical Properties in Rise.me.tut.ac.jp/RIoMP r1_5 Guide - (final).pdf · User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan - 2 - Preface

User Guide for R-IoMP r1.5 Industrial Engineering Group - TUT Japan

- 35 -

RIoMP release 1.5– For scientific purposes was completed in June 2014.

Industrial Systems Engineering Laboratory, Toyohashi University of Technology