Message Boards Message Boards

Solve large linear systems with ParametricNDSolve?

Dear Community Members,

I have trying to obtained parameterised solutions of linear systems of considerable large dimensions. For example the one I have attached to this post. I have tried (naively) with Solve but the processes does not seem to end. Then I tried ParametricNDSolve having only on parameter (script d); it seems that the process terminates well but when trying to plot solutions for specific values of "script d" say 0.5, none numerical value will be obtained.

I wonder what am I doing wrong. Is it because parameter script d appears nonlinearly? Is it because of the dimensions of the system? Does any of you have tried to solve symbolically systems of similar dimensions with DSolve?

Parametric solutions of this kind of systems could be efficiently used in Model Predictive Control

Any suggestion/comment will be appreciated!

Jesus Rico-Melgoza

Attachments:
6 Replies

Thank you David

Silly mistake I had!

I am quite impressed to see that in this parametric solutions the specified parameters seems to be almost open. I mean, is there any way to see if parametric solutions are restricted to intervals of the parameters?

Regards Jesus

Posted 8 years ago

Also, you might find ParametricNDSolveValue useful:

solPar2 = 
  ParametricNDSolveValue[Flatten@{Eqns1, init1}, 
   vars, {t, 0, 0.0001}, {\[ScriptD]}];

Plot[solPar2[.5] // Evaluate, {t, 0, .0001}, PlotRange -> All, 
 PlotLegends -> vars]

enter image description here

POSTED BY: David Keith

David

I have found ParametricNDSolve and ParametricNDSolveValue very useful that I want to ask which is the theory behind functions like these. Do you happen to know this? The Mathematica Details and Options are rather plain. I like to know more about it to give some theoretical support to my applications.

Jesus

Posted 8 years ago

Hello, Jesus.

I don't know how the parametric feature works. And I also find it puzzling. I find it strange that we are not required to provide a range for the parameters. When we don't, I wonder what the implied range is, since it seems unreasonable to expect a parameter in such cases to be valid over the extent of R or C. I do see that we can provide a range in the form a {p, pmin, pmax}. That may be a safer alternative than just p.

It would be good for someone from Wolfram to comment! Maybe we can wake up the Moderators.

Kind regards, David

POSTED BY: David Keith

David

Thanks for your reply. I can only speculate about it. However I would appreciate the help of the Wolfram experts to better understand ParametricNDSolve and ParametricNDSolveValue; They really are pretty useful.

Thanks in advance.

Jesus

Posted 8 years ago

Hi Jesus,

In your note book you try to plot with

Plot[iL[0.5][t] /. solPar, {t, 0, 0.0001}, PlotRange -> All]

But really iL[t] is the returned parametric function, so you should plot

Plot[iL[t][0.5] /. solPar, {t, 0, 0.0001}, PlotRange -> All]

Best regards,

David

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract