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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

18-Opal

## Electrical Engineering Challenge #4

Hi,

Assume if needed this type of eq for current through diode D1:

Assume Initial voltage of C1 = 0V

20 REPLIES 20
18-Opal
(To:Cornel)

18-Opal
(To:Cornel)

So, any idea why this system of differential equation cannot be solved with odesolve? @Werner_E

18-Opal
(To:Cornel)

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:

18-Opal
(To:Cornel)

Even more simpler:

18-Opal
(To:Cornel)

Only from this point the odesolve block can solve:

20-Turquoise
(To:Cornel)

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.

18-Opal
(To:ttokoro)

@ttokoro @Werner_E
Then...look at this..

With odesolve block does not work:

Whit this method work...:

24-Ruby V
(To:Cornel)

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:

18-Opal
(To:Werner_E)

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..

18-Opal
(To:Cornel)

Let's say that I want to iterrete V1n, V2n, V3n, and V4n form 0 to last(V1)-1 as you can see below. How to do this? Is it possible to do this kind of thing?

And as result I want to have vector results for V2, V3, and V4 like V1:

24-Ruby V
(To:Cornel)

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!

18-Opal
(To:Werner_E)

@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

18-Opal
(To:Cornel)

@Werner_E @ttokoro the idea is to have a numerical method that can solve this kind of system of eq.

24-Ruby V
(To:Cornel)

@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.

18-Opal
(To:Werner_E)

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?

18-Opal
(To:Werner_E)

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:

18-Opal
(To:Cornel)

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:

24-Ruby V
(To:Cornel)

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.

18-Opal
(To:Werner_E)

The same problem I saw also here:

24-Ruby V
(To:Cornel)

Try to report it as being a bug to PTC support.

Announcements
Top Tags