hilbun
(Leila Lindsey)
July 2, 2014, 2:29pm
1
With this very simple system, is there a way to change the parameters in a successive time interval in order to effectively perturb the system?
Manipulate[
soln = NDSolve[{Q''[t] == (-R *Q'[t] - ( Q[t]/C1) + Vo)/L, Q[0] == 1,
Q'[0] == 0.5}, {Q[t], Q'[t]}, {t, 0, 100}];
Plot[Evaluate[Q'[t] /. soln], {t, 0, 100}, PlotRange -> All], {R, .1,
1.50}, {C1, 1, 50}, {L, 1, 50}, {Vo, 1, 40}]
Thanks!
Maybe you can adapt something like this?
Manipulate[
bump[t_] := Piecewise[{{0, t < 50}, {1, t >= 50}}];
soln = NDSolve[{Q''[t] == (-R*Q'[t] - (Q[t]/C1) + Vo)/L + bump[t],
Q[0] == 1, Q'[0] == 0.5}, {Q[t], Q'[t]}, {t, 0, 100}];
Plot[Evaluate[Q'[t] /. soln], {t, 0, 100}, PlotRange -> All],
{R, .1, 1.50}, {C1, 1, 50}, {L, 1, 50}, {Vo, 1, 40}]
hilbun
(Leila Lindsey)
July 2, 2014, 3:31pm
3
Thank you! Yes; although I was hoping to specifically change C1, for example, at t >= 50 for example.
danl
(Daniel Lichtblau)
July 2, 2014, 5:56pm
4
If simple approaches fail you might want to look here.
tutorial/NDSolveWhenEvents#1688891301
It takes one to Events and Discontinuities in Differential Equations in the documentation. This tutorial covers event detection, changing state variables, and more.
Further detailed information about NDSolve may be found at the link below.
tutorial/NDSolveOverview