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

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

Electrical Engineering Challenge #4

Cornel
18-Opal

Electrical Engineering Challenge #4

Hi,

Cornel_1-1716544865826.png

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

Cornel_1-1716544415511.png
Assume Initial voltage of C1 = 0V

20 REPLIES 20

Cornel_2-1716825713989.png

 

Cornel_3-1716825723736.png

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:

Cornel_2-1716878981290.png

 

Even more simpler:

Cornel_4-1716879274616.png

Only from this point the odesolve block can solve:

Cornel_0-1716880280671.png

 

Cornel_1-1716880342238.png

Cornel_2-1716880363448.png

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

 

image.pngIMG_1018.PNGIMG_1019.PNG

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

With odesolve block does not work:

Cornel_3-1716889679638.png

 

Cornel_0-1716889579148.png


Whit this method work...:

Cornel_1-1716889611261.png

Cornel_2-1716889621380.png

Werner_E
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:

Werner_E_0-1716891809977.png

 

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

Cornel_0-1716892216564.png

@Werner_E @ttokoro 


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?

Cornel_0-1716893420244.png


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

Cornel_0-1716893679547.png

Werner_E
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!


@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

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

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

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)

Cornel_0-1716988641613.png

 

 

V3(t) comes from above:

Cornel_1-1716988744223.png

 

After restarting the Prime, it started to work ok

Cornel_0-1716989612971.png

 

Anyway, I see that there is a relationship between 

tend  and the last value in odesolve:

Cornel_2-1716989756505.png

Look at the V4(t) plot,

Cornel_3-1716989783463.png

 

But if I increased to 10^4

Cornel_4-1716989815964.png

V4(t) plot looks good now:

Cornel_5-1716989830750.png

 

 

Cornel_6-1716989862912.png

Cornel_7-1716989870993.png

 



Cornel_10-1716990028164.png

There is still missing one:

Cornel_8-1716989965458.png

 

 

Cornel_11-1716990050240.png
Missing another green:

Cornel_12-1716990064926.png

 

 

 

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

Werner_E_1-1717002942556.png

Werner_E_2-1717002968632.png

 

 

 

The same problem I saw also here:

Cornel_0-1717053484423.png

 

Cornel_1-1717053511122.png

Werner_E
24-Ruby V
(To:Cornel)

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

Top Tags