Skip to main content
1-Visitor
July 9, 2012
Question

Parameter calculation with odesolve and minerr function

  • July 9, 2012
  • 3 replies
  • 9857 views

Hello all

I am trying to use the Odesolve and Minerr function in Mathcad to get the parameters of a thermal model, but having problem now.

When using the minerr function, there is an error "this variable is undefined"

I can not figure out where is the problem.

Could anyone please help?

The worksheet is attached.

I am using the mathcad14, and I saved it as mathcad 11.

Hope it can be opened.

Thanks in advance!

3 replies

23-Emerald V
July 9, 2012

Unfortunately, I am just about to go through the door to work, so can't look in detail. However, if you trace the error back, it says there are too few initial conditions in Function (your function "Function", that is)

Stuart

1-Visitor
July 9, 2012

Hello Stuart,

Thanks very much!

You did give me a hint, the equations should be PDEs.

I will try again with Pdesolve again.

However, I wonder if there are other ways to solve this problem.

At first I tried to fit the the Power to be a function of time, so that the equations has only one variable t, which could make the calculation simple. Unfortunately, my experimental data is is not enough. With polynomial regression, the output function P(t) varies significantly from theory and the final output value(C1,C2,R) of the minerr function is not correct. I am not sure if it is caused by the uncorrect P(t). Will this solution work if enough data are abtained with another experiment? Will the P(t) have an impact on the integral of T1(t)?

Thanks for your help!

19-Tanzanite
July 9, 2012

Like this?

Alan

Improved worksheet attached.

1-Visitor
July 9, 2012

Hello Alan,

Thanks for your reply.

I have tried with your method and the output is not correct.

Please see my attachment above.

I am not sure if it is cause by the insufficient experimental data.

Will not the P(t) have an impact on the integral of T1(t)?

Thanks!

19-Tanzanite
July 9, 2012

It's not surprising that the results of your worksheet are way out, as your polynomial fit to power is totally unrepresentative of the measured powers.

Have you looked at the modified worksheet I supplied (I edited my original reply to provide a more sensible sheet)?

rosabel wang wrote:

Will not the P(t) have an impact on the integral of T1(t)?

Thanks!

Yes, it will, and the model incorporates this.

Alan

19-Tanzanite
July 9, 2012

Looks like either the final value of power or that of temperature is wrong (or at least, not consistent with your model).

Alan

19-Tanzanite
July 9, 2012

Perhaps you should have recorded more values of power between the last two values you currently have recorded. See attached.

Alan