Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameter estimation of heat energy balance by using lsqcurvefit

Status
Not open for further replies.

Regensteiner

Mechanical
Joined
Sep 2, 2013
Messages
9
Location
DE
Hi,

I have the following problem and maybe someone can give me a clue how to solve it.
I have collected data (Temperature, Q_gen, Ambient temperature) of a heating process and now I want to estimate some parameters in order to solve the energy balance.
This is the energy balance:
internal Energy = Heat generated - Heat flux due to convection
m*cp*dT/dt = Q_dot_generated-Q_dot_convection
Q_dot_convection=1/R * (T-T_amb)
C=m*cp;
--> dT/dt=1/(C)*(Q_dot_generated - 1/R * (T-T_amb))

I wrote a function which looks basically like this:
function [T] = myfunc(Parameter, Data)
Q_dot_gen=Data(:,1);
T(1,1)=Data(1,2);
T_amb=Data(:,2);
C=Para(1);
R_T=Para(2);

for i=1:length(Data(:,1))
dT=1/(C)*(Q_dot_generated(i) - 1/R * (T(i)-T_amb(i)));
T(i+1)=T(i)+dT;
end

Then I pass everything to lsqcurvefit in order to solve it:
Parameter=lsqcurvefit(@myfunc, [10000, 0.5], Data, T_Process)

I got something but I am wondering if I do it right. I haven't much experience or knowledge about solving such proplems but I am happy to learn more about it.

If someone can share some knowledge, it would be great.

Regards,



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top