cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Parameterized odesolve solve block?

rgunwaldsen
15-Moonstone

Parameterized odesolve solve block?

I am trying to fit data to a "First Order Plus Dead Time" model. I can optimize the fit by using the solution to the FOPDT equation, but, simply as an intellectual exercise, I would like to also be able to do this using the FOPDT differential equation. I have Python code that can do this (it takes an incredibly long time to run; I would guess that Mathcad would take much more time).

 

The nub problem of the problem as I see it, is that I think I need an optimization solve block to do the least squares fit which, in turn, then needs to call an odesolve solve block with parameters.

 

I quickly realized that I don't have a clue as to how to do this, and I haven't found any "parameterized solve block" examples that return odesolve solutions.

 

Attached are my Prime 6 worksheet, text file of data, and PDF of worksheet.

 

Many thanks,

Roger Gunwaldsen

 

ACCEPTED SOLUTION

Accepted Solutions
rgunwaldsen
15-Moonstone
(To:Werner_E)

Thanks,  Werner!

View solution in original post

7 REPLIES 7
Werner_E
25-Diamond I
(To:rgunwaldsen)

Something like the attached?

rgunwaldsen
15-Moonstone
(To:Werner_E)

Thanks,  Werner!

FDS
13-Aquamarine
13-Aquamarine
(To:Werner_E)

Werner, would it be possible to attach your file as a mathcad 15 file or pdf? Thank you in advance!

Werner_E
25-Diamond I
(To:FDS)

Unfortunately there is no way to convert a Prime file to real Mathcad format.

Attached is a pdf print of the file. I only made the few changes to the original file that are highlighted in yellow just to show how the solve block could be parametrized.

FDS
13-Aquamarine
13-Aquamarine
(To:Werner_E)

Thank you!

rgunwaldsen
15-Moonstone
(To:FDS)

FWIW,   here is my final P6 worksheet which utilizes Werner's  suggestion plus a modified optimization to be able to repetitively call the odesolve block.

 

Werner_E
25-Diamond I
(To:rgunwaldsen)

Shame on me!

In my sheet y.ode never changes and uses just the guess values!

I forgot to make y.ode dependent on the current values of K, theta and tau 😞

Announcements

Top Tags