Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
Assume if needed this type of eq for current through diode D1:
Assume Initial voltage of C1 = 0V
So, any idea why this system of differential equation cannot be solved with odesolve? @Werner_E
So, even if I removed V4(t) to make it more simpler to the first one from above firstly, but still odesolve cannot solve system giving the same error with missing some of the initial condition:
Even more simpler:
Only from this point the odesolve block can solve:
The time constant of C1*R3 and C1*R4 are o.1 s. This plot shows DC 10 V application of your circuit.
Next two pictures are iCircuit results of initial and after few seconds.
Capacitors voltage V3-V4 is about 3.2 V.
At first, v3=v4,capacitor shorts the circuit.
After few seconds, V3-V4=2.8 V at second picture....Weit more it becoms 3.2 V.
This is not LTI system and my Mathcad sheets with solved by Laplace transform can't used to solve this system.
odesolve expects ODEs and an initial condition for any function an derivative you solve for.
You don't provide an ODE for V2. Prime can't solve equations or system of equations of functions (with the exception of ODEs).
So nobody has claimed that Prime can solve any problem but you can feel free to add a feature suggestion in the "ideas" section of this forum if you fell better doing so,
The last problem you showed could easily be solved that way:
Yeah for sure in the above example was more easy.
What to do in this like cases then? Because this the problem on which I wanted to know how to do...or what can be done on this..
You could replace the expression from the third equation into the second one.
Now you have three equation, are looking for two functions only and just one equation contains derivatives (but then two of them!
Obviously something Prime can't deal with!
Don't know, but maybe you can set up the problem in a different way. Good luck!
@Werner_E wrote:
Don't know, but maybe you can set up the problem in a different way.
I posted this different way above with itterration...have a look
@Cornel wrote:
@Werner_E @ttokoro the idea is to have a numerical method that can solve this kind of system of eq.
Good luck! Looks like you have to study numerical methods and how to implement them in Prime.
You first would have to find a way to solve each equation so you can assign V2.n+1 := ..., V3.n+1:=... V4.n+1:=...
On the right hand side you only can use vector elements with index n or lower or elements with index n+1 which already are defined.
No idea how you would achieve that with the equations you have.
I am shocked to see that for such not so complicated electric circuit (because we need to admit, this circuit from this topic is not so complicated, have few components mainly resistors, 1 capacitor and 1 diode, so no big deal here), but still one cannot have a mathematical solution, there are no mathematical way to have a solution...as we was able to see so far, and for this one must change and go to a circuit simulator...as @ttokoro showed above...not so good to see this. I am wondering for more complicated circuits what to do then...maybe its good idea to abandon math calculation as its a hard to have solutions mathematical and go and understand circuit simulators instead?
I am not sure why Prime is thinking so long...I do not remember why, but in the morning I was able to see the good result from this odesolve block...for V4(t)
V3(t) comes from above:
After restarting the Prime, it started to work ok
Anyway, I see that there is a relationship between
tend and the last value in odesolve:
Look at the V4(t) plot,
But if I increased to 10^4
V4(t) plot looks good now:
There is still missing one:
Missing another green:
Quite interesting. You may call it a bug and report it to PTC support and wait what they say.
I had success by providing guess values for V2 and V3 depending on t but I would not dare to say that this is a general solution.
Try to report it as being a bug to PTC support.