## curve fitting of non linear data for strain-time of creep experiment

on 3 Jun 2019
Latest activity Commented on by aditya palawat

on 11 Jun 2019

### David Wilson (view profile)

Hi, i have data from my experiments and i want to plot the strain-time curve with it and then identify the most linear part (it will be the steady state part in the middle) of it so that i can calculate the slope of this part to get the steady state creep rate. I am attaching the data(1), fitting equation(ε=θ1(1−exp(−θ2t))+θ3(exp(θ4t)−1)):(t=time,e=strain) and an example of how the curve looks like. I tried polynomial fit and then drawing a slope at the inflection point but it doe not give me a consistent result.
Also, the data2 is from such an experiment which was interrupted due to unknown reason and the data shows jump in strain during the last duration of experiment, so is there a way to extrapolate the data upto 0.01 strain?(i have to later iuse these two data and find an average plot which i can interpolate later).
Please help me, i have been stuck at this for quite some time and i have to use these plots for my thesis submission scheduled next month.

### David Wilson (view profile)

on 4 Jun 2019

Here's my attempt:
t = time;
e = strain;
plot(t,e)
%% Now try curve fit
creep = @(p, t) p(1)*(1-exp(-p(2)*t)) + p(3)*(exp(p(4)*t)-1);
p0 = [1e-3,0.2,1e-3,0.06]'; % initial guess
pfit = lsqcurvefit(creep, p0, t,e);
ti = linspace(0,45)';
plot(t,e,ti, creep(pfit, ti),'r--')
ylim([0 0.02])
xlabel('time'); ylabel('strain, \epsilon')
Now you want the slope in the middle, say at tcenter = 25.
grad = @(p,t) p(1)*p(2)*exp(-p(2)*t) + p(3)*p(4)*exp(p(4)*t)
hold on
tc = 25; dt = 10;
y1 = creep(pfit,tc);
y2 = y1+dt*s;
plot([tc-dt, tc+dt], [y1-dt*s, y2],'-')
hold off
title(sprintf('slope = %2.2g',s))
This gives you something like:
For your other data, there are a few problems, so your milage will vary. Running the above code on your 2nd data set gives (with tcenter = 15):