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

53 visualizzazioni (ultimi 30 giorni)
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.
Appreciate your input and thanks in advance.

Risposta accettata

David Wilson
David Wilson il 4 Giu 2019
Here's my attempt:
load data1
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.
%% Now compute gradient
grad = @(p,t) p(1)*p(2)*exp(-p(2)*t) + p(3)*p(4)*exp(p(4)*t)
s = grad(pfit,25);
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:
tmp.png
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):
tmp.png
  2 Commenti
aditya palawat
aditya palawat il 4 Giu 2019
Thanks a lot David, the first part is exactly what i needed! However, for the second part i need the most linear part of the curve and not a tangent at the centre but it gives me a starting point as the code is very helpful. thanks again, cheers!
aditya palawat
aditya palawat il 11 Giu 2019
Hi david, i have a question for if you may please allow it some of your time. i have come across another equation in the literature which fits my data better:creep = @(p, t) p(1)*(1-exp(-p(2)*t)) + p(3)*(1-exp(p(4)*t))+p(5)*(1-exp(p(6)*t)).
i just want to know how did you identify the initial guess and if there is a way to make a smart guess as you did since my data varies quiet a lot and i have to make time consuming guesses every time. it will be great help to me, thanks again.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Get Started with Curve Fitting Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by