 Welcome to dealing with materials data, we are looking at the collection analysis and interpretation of data from material science and engineering. We are in the module on case studies and this is a case study on calibration. Calibration is important for experimental measurements using equipments and what the equipment reads and what the actual value should be, there could be sometimes discrepancies. The very well known example that is also described in Berenson's textbook for example is compass reading in a ship to read directions. Because there are lots of magnetic materials in ship that affects the reading, in addition the magnetic north and the true north are slightly different. So you will read something in your compass but is that the north that you actually see or should you correct for the values that is given by the calibration. So if you have a calibration curve when your magnet, your compass reads something then you can add the correction and actually know the true value. So the idea is to use a material or condition where the result is known and use the equipment to make the measurement because we already know what the result should be, we will know what the error that the equipment is giving and keep an information of this error so that we can correct it when we make a measurement on an unknown material or in a new situation. So that is the basic idea behind calibration. So we will look at calibration in the context of nano indentation. There are two papers which I am going to use, I strongly recommend that you look up these papers. One is a old paper and a very well known paper from Oliver and Farr. This is for from Journal of Materials Research an improved technique for determining hardness and elastic modulus using load and displacement sensing indentation experiments. And based on this but slightly simplified one is given in thin solid films, contact area function for Berkovich nano indentation and this is the fitting that I am going to do. If you read Oliver Farr you will see that actual function that you have to fit is very complicated and of course one can do take data and do that fitting also. But to simplify things and to give you an idea of how the methodology works I am going to do a very simple fitting, we are still going to do just AX plus B kind of fitting a linear fit. But it will tell you some of the ideas behind calibration and if you want a more complicated one of course you will be able to do because that is fairly easy for you now knowing all the regression and linear models and fitting and things like that so it is easier to follow. So what we are going to do is we are going to take some formulae from here but the fitting for the contact area versus the contact depth will be done using a very simplified model that is described in this paper. So the contact area of the intentor at peak load that we want to get using measured depth and the intentor shape function. So the depth measurement is made and we know what the intentor is but sometimes the experiment is load versus depth. So we will know the load, we will know the depth and that is from where we are getting the depth. And from this we have to somehow get some parameter which will help us get this measurement because this is not directly measured. So we want to make this a function of the contact depth. But that contact depth area relationship depends on the intentor shape, we know the intentor shape but the problem is the intentor gets blunted with use and or there are small changes in its shape and they can actually affect the contact area that you measure. So we need to calibrate the area that contact area that you get for a given measured depth and particular load versus the depth curve that you obtain. How do you do that is what is described and that is the calibration part. Like I said for calibration we always should have a material on which we know what the value should be and use that to back calculate what the equipment is actually reading and so we can. So here is the relationship that connects the reduced modulus of a material to the slope of the depth load versus depth curve which is the S and the contact area is A. So if you know the contact area and the slope of the curve you can actually get the reduced modulus. So we take a material for which we know the reduced modulus which is few squares and that is 69.6 GPA. So we are going to use this value and so we are going to estimate A or root A. So we have a measure of A but we want to develop a calibration curve in such a way that by looking at the contact depth we will say what the area is. Which means you need to relate A to contact depth and the contact depth will be measured from the same experiment. So it should involve the same values that you measure. And so you can generate a large number of experiments in which you will measure this HC and A using a known material and so you can develop a relationship between A and HC and then use that to do the analysis on a new material. And the idea is to carry out a large number of experiment and generate this A versus HC data and you fit A to some function of HC and so from then an experimental measurement on a new material of this HC one can get the A and then you use it to get the mechanical properties of the material. Shikot et al give this root A is equal to A HC plus B so you have to determine the slope and the intercept so that is what we are going to do. But if you see all your first paper you will see that it is a very complicated function. It goes as some with the known constant HC squared plus some 8 unknown constants which go as h, h to the power half, h to the power 1 4th, h to the power 1 8th etc up to h to the power 128th. So we are not going to do this very complicated fitting we are going to use a very simple fitting to do the analysis. So this is how the load versus depth curve looks. So this is the loading part and then it is held for a while and it is unloaded. This is the peak load and the depth at peak load is this quantity and we are going to fit the unloading part to a straight line and we are going to fit slightly after this max we come a little bit down and take the data and do the fitting and the intercept actually gives the depth that you get from this slope line. There is a relationship so we already know this so root a is root pi by 2 s by e r so pi by 4 s squared by e r squared is actually giving you the a because we know the e r and we can measure the slope from the this curve. So this is basically the slope of this red line you see here. So you can get this quantity so a is known and the contact depth h is given by h max minus epsilon p max by s epsilon is 0.75 p max is the maximum load and the corresponding depth is h max. So we know h max we know p max we know s all these come from the data itself so by multiplying with this epsilon you can get h c. So we have h c and a measured from the curves so we do it for all 36 plots and save the data as a csv file and then do the analysis on the csv file to get the calibration curve. So let us do that as usual let us open r and start doing this analysis. So the first one that we want to do is that we will take one of the data and do this fitting exercise just to give you an idea of what is happening. So we know the e r we know the epsilon and we read the data and in this quartz area calibration directory there are 36 data sets first three lines are skipped because if you open the data set you will see that the first three so it gives some data of when this measurement was made and number of points etc. So we are going to skip these three steps and then the lines then we are going to read the header and then we are going to read the data. So that is what it does skip three lines and then read the next one as header and then the rest is data and p m is nothing but maximum of the load and it is micro Newton so we are going to multiply by 10 power minus 6 and n at which point the maximum load is measured the corresponding depth we want so which max actually gives the line number so if you take that line number and measure the depth that is the h max and that is in nanometer so we are multiplying by 1 e power minus 9 and then you can go to the data and see somewhere about 440 to 500 is where we are doing the fitting and that is because that is the point so let us go back to this curve. So the 440th to 500 data point is somewhere here and this is what we are using to do the fitting so with the max we come slightly below and so I am just doing it to show how it works actually you have to take 5% or 10% off from the p max and from then there you have to choose of course when you do this analysis yourself you can also try those things but in this case I am going to take for 40 to 500 to be slightly below the h max and that is where we are taking the data and we are going to do a linear fit and the slope is actually our S and we know that h c is h max minus h s which is epsilon into p m by s this is the p max and this is the slope that you read from the curve. So we now and ac is pi s squared by 4 e r squared so that also we know and so you can do that and in this case we are also going to plot this points and then we are going to also fit the line that we are doing in red which will basically give you the curve that you see in this presentation. So this is the curve that we got so this is the data and this max and then it comes down and then we are choosing some points here and then we are fitting a straight line we are taking the s and we can calculate all the values. So you have to now do this for all the 36 data points and that is what is shown in this so I am not going to redo this here but this shows you that you can take data set 1 and do this and we also generate a data frame which has 36 rows and 2 columns and the 2 columns are ac and h c and we are going to do this for every data set we store the data then we do it for data set 2 and that is the second line of the data we do it for data set 3 that is the third line of the data and so on and so forth. So you do it for all 36 of them it is the same code just that there is no plotting and you can do it for all 36. Once you do all 36 we are going to write the data as a CSV file. This is something that we have not done so far you can also like read CSV you can use write CSV and write the data files. So now that we have the data we are going to do the other analysis so that is the analysis that we will do let us do this. So what is the analysis so we read the data and once you read the data then you say that the second column is A and the third column is H that is because if you look at the data the data also has the line numbers. So let us open the data okay so the data when it is written it also has the line number so I want to skip the line number part and it is ac and hc so that is what we are reading. So we plot this H versus A and we take square root of A and we fit it to a straight line square root of A is some m h plus c and so we plot this data and then we plot also the line. So let us just do this part first right so this is the data that we are getting and now let us do the square root A and plot and then plot the square root A versus H and then the fitting that we have achieved. So this gives you the fitting and if you look at m dollar coefficients so this is basically telling you that if you can measure a contact depth 5.393204 times contact depth plus this intercept some 8.8 and 10 power minus 8 is basically the contact area that you measure. So now that you have this relationship for any material you just need to measure this quantity and you can get the contact area and you can see that the fit is good of course there are other ways of checking that the fit is good. So let us plot the residuals and you can see that residual is equally distributed and randomly distributed so the error is normally distributed there is another way to check that it indeed is normally distributed which is an KQ norm and you can see that this curve is also sort of straight line indicating that we have a good fitting and all the error is normally distributed so it is basically noise and so we have done the calibration. So to summarize calibration is very important whenever you use any equipment it has to be frequently calibrated this we have discussed when we discussed error and ways of avoiding systematic errors. And so many cases calibration leads to either calibration table or fitting so that you will get a calibration curve. Here is an example where we actually fitted it to get a calibration curve and this curve actually connected the contact area to contact depth and contact depth is what is measured and we have to get the contact area. In order to do this calibration we used a material of known modulus and using that we actually calculated the calibration curves themselves and I have given the complete process of doing it as well as the data set will be available for you to experiment with. So we are going to stop at this point I will share this data set I recommend that you go through this and the example of the compass reading and how to correct for it that is given in Barrenson that data is also available online so you can look it up or you can take it from Barrenson's book and try to do the calibration curve yourself so to understand it better. So with this we will conclude this case study and we will look at two more case studies design of experiments and hypothesis testing in the sessions to come. Thank you.