Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Parameterized odesolve solve block?

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-10-2020
04:41 PM

09-10-2020
04:41 PM

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

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-10-2020
05:52 PM

09-10-2020
05:52 PM

Thanks, Werner!

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-10-2020
05:09 PM

09-10-2020
05:09 PM

Re: Parameterized odesolve solve block?

Something like the attached?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-10-2020
05:52 PM

09-10-2020
05:52 PM

Thanks, Werner!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-11-2020
08:30 AM

09-11-2020
08:30 AM

Re: Parameterized odesolve solve block?

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-11-2020
09:44 AM

09-11-2020
09:44 AM

Re: Parameterized odesolve solve block?

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-11-2020
10:37 AM

09-11-2020
10:37 AM

Re: Parameterized odesolve solve block?

Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-11-2020
03:01 PM

09-11-2020
03:01 PM

Re: Parameterized odesolve solve block?

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-11-2020
05:27 PM

09-11-2020
05:27 PM

Re: Parameterized odesolve solve block?

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 😞