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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Electrical Engineering Challenge #3

Cornel
18-Opal

Electrical Engineering Challenge #3

Hi,
For below circuit:

1. Find the expression of the voltage across C2 (Vb) at t>0
2. Find the voltage across C2 at t=100ns when C1=100nF
3. Find the voltage across C2 at t=100ns when C1=10nF

Also let C1 and C2 voltage  as t-> infinity to be Vb.

Cornel_1-1714134101670.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Here in Prime  using correct units (one of the very few advantages of Prime over real Mathcad)

Werner_E_0-1714150162367.png

 

EDIT:

Yes, the definition of C1 at the top can be deleted as the solve block is parametrized.

Furthermore, too retain full formatting capabilities in the plots, you should rather define the range t as follows:

Werner_E_0-1714151691173.png

There is hardly a need to use more than 50000 point for a single trace anyway 😉

 

Prime10 Worksheet attached

 

EDIT; I made a mistake with the initial condition for i(0). This affects the behaviour in the first 4 ns.

Here is the correct condition:

Werner_E_1-1714159328145.png

 

 

View solution in original post

24 REPLIES 24
Perez
12-Amethyst
(To:Cornel)

For C1 = 100nF:

𝑉𝑏(t =  100𝑛𝑠) 120.34 V

 

For C1 = 10nF:

𝑉𝑏(t = 100𝑛𝑠) 16.97 V

Cornel
18-Opal
(To:Perez)

Not correct for sure... It gives me around for C1=100nF Vb(t=100ns) =4.45V, and for C1=10nF Vb(t=100ns)=3.46V, but not through math calculation. But lets see other opinions...
With your answer like that you are qualified to obtain Nobel prize 😉

Perez
12-Amethyst
(To:Cornel)

I double checked and now I get:

 

For C1 = 100nF:

𝑉𝑏(t =  100𝑛𝑠)  9.28 V

 

For C1 = 10nF:

𝑉𝑏(t = 100𝑛𝑠)  0.38 V

 

But I'm not the expert in this field so let's see other results

Cornel
18-Opal
(To:Perez)

Ok, its not correct nor this second your post, but maybe someone can give a more good answer on this. I am waiting too to see math derivation for this, if someone is able to do

Werner_E
24-Ruby V
(To:Cornel)

Here numerically in real Mathcad (without units)

Werner_E_1-1714148821045.png

 

 

Cornel_1-1714149960177.png

 

 

Werner_E
24-Ruby V
(To:Cornel)

The syntax of odesolve has changed from real Mathcad to Prime. See the Prime version I posted.

Furthermore you can't numerically evaluate u2! u2 is a function with a single (time) argument and you can use u2 to evaluate it at a specific time value.

Here in Prime  using correct units (one of the very few advantages of Prime over real Mathcad)

Werner_E_0-1714150162367.png

 

EDIT:

Yes, the definition of C1 at the top can be deleted as the solve block is parametrized.

Furthermore, too retain full formatting capabilities in the plots, you should rather define the range t as follows:

Werner_E_0-1714151691173.png

There is hardly a need to use more than 50000 point for a single trace anyway 😉

 

Prime10 Worksheet attached

 

EDIT; I made a mistake with the initial condition for i(0). This affects the behaviour in the first 4 ns.

Here is the correct condition:

Werner_E_1-1714159328145.png

 

 

Can you copy in prime 9 to attached prime 9 sheet?

Ok, thank you @Werner_E  I I succeeded. I am wondering why you put also the value for C1=10nF above the odesolve block? Is needed? I see that is no need to put C1=10nF above odesolve block

Cornel_0-1714150553104.png

 

Werner_E
24-Ruby V
(To:Cornel)

the c1=10mF is a left-over as in my first attempt I had not parametrized the solve block. You sure can delete it now.

 

Do you have idea why it is changing the result u2 when changing tend?

 

Cornel_4-1714153176716.png

 


Cornel_2-1714153135793.png

 

 

 

Werner_E
24-Ruby V
(To:Cornel)

You are using a numeric method to solve your ODEs and if you increase the interval by the factor 5000000 but don't change number of calculations steps, the algorithm also makes steps which are 5 million times larger.

For t.end=200 ns the stepwidth (with steps=10^4) is 0,02 ns but with t.end one step is 10000 ns. So you sure can't expect a meaningful result when you evaluate your functions at t=100 ns because the algorithm has calculated only values for t=0 and t=10000 ns. So for t=100 ns I guess it will just use linear interpolation.

 

I also don't understand why you want to set t.end to a full second!?
After 400 ns at the latest, everything is over from a practical point of view.
The current is sufficiently close to zero and the voltages have already stabilized to the expected values.

Werner_E_2-1714155330482.png

So why look at a longer period of time? This either makes things extremely inaccurate (if you don't increase the number of steps) or unnecessarily slows down the calculation (or may even exhaust memory if steps is set too high).

 

I put tend=1 second  only to see what's happening, but sure not needed to have such longer period value as plots showed that the current is sufficiently close to zero and the voltages have already stabilized to the expected values after 400/500 ns.

Could you explain how you came up with these 2 derivation, how do You think about they for u1 and u2:

Screenshot_2024-04-27-07-51-15-54_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

Not in regard with value, but with expresson as in the form you wrote them as 2 different expression, though they are the same after calculation

Werner_E
24-Ruby V
(To:Cornel)

For t-> infinity, the ratio of the decrease of voltage in C1 and increase in C2 is the same as C1:C2 and of course they have to add up to U10.

 

You can also see in the symbolic solutions (either the one I arrived at with P10 or the one ttokoro posted using Laplace) that the 'end' values for both u1 or u2 are U10*C1/(C1+C2).

Werner_E
24-Ruby V
(To:Cornel)

The symbolic in Prime 10 is able to solve the simple simple system symbolically, but only if we omit i(t):

Werner_E_3-1714157366592.png

!!!!

It was just now when I compared the plots for i(t) from the solve block and the symbolic solution that i realized that my initial condition for i(0) was wrong!! This failure is responsible for the unnatural behaviour in the first 4 ns.

The correct condition would be i(0s)= U1.0/R which would yield 0,5 A with the given values

!!!!

 

But Prime fails when it comes to the simple limit t-> infinity. Quite disappointing!

Werner_E_4-1714157461315.png

 

 

That's great that symbolliycal solution can be obtained as well. I was wondering for this.

 

I saw also that strange shape at the beginning in the current plot, and i wanted to ask why looks so, but i see that You figured ouț already that inițial condition for the current was set wrong.

 

Regarding that second limit where Prime 10 cannot do the calculation I see this also in Prime 9, and my thinking on this is that assume cannot recognize that factor lambda is > 0 when lambda is in the denominație or assume keyword does not work well in this situation. If You put -t/1 then prime will give 0 as the result for that limit. But indeed, i would expected that prime to be able to do also such limit calculation with parameters and with assumptions on parameters, but seems that prime cannot do such thing, indeed bad thing.

 

 

Werner_E
24-Ruby V
(To:Cornel)

Actually its just a system of two simple ODEs which also could be solved by hand. But its convenient that P10 is able to do so symbolically.

 

According the limit its not understandable that Prime would respect the assume modifier when I write -lambda*t, but not when we write -t/lambda. Tend to call it a bug.

 

Here is a very clumsy workaround - two steps are necessary, doesn't work in one go and you sure have to know which result you are striving for (so its quite a useless workaround).

Werner_E_0-1714162479151.png

 

 

 

LucMeekes
23-Emerald III
(To:Werner_E)

Not very disappointing, but understandable.

How can you let t go to (positive) infinity from above? What is above infinity?

In Mathcad 11:

LucMeekes_0-1714315372286.png

The error message is: "No symbolic result was found.", and I agree.

But then, the full set of trials is:

LucMeekes_3-1714315707637.png

I wonder what options Maple considers to not get the limit to 0...

 

Success!
Luc

 

 


How can you let t go to (positive) infinity from above? What is above infinity?

 Touchè ! 🙂

The "+" was a leftover from playing around with the direction of the limit as usually when you use the limit to +- infinity Prime does not care about it.

 

The disappointing part still is that Prime gives correct results when we use the appropriate "assume" modifier and factor lambda, but not when we use the reciprocal 1/lambda.

Werner_E_1-1714318418632.png

 

Here the results of real Mathcad (V 15 with  muPad))

Werner_E_0-1714318904909.png

 

LucMeekes
23-Emerald III
(To:LucMeekes)

"I wonder what options Maple considers to not get the limit to 0...":

Well, it must have to with lambda, since:

LucMeekes_0-1714322035934.png

And I figured that, while being positive, lambda might be so small (near 1/infinity ?) that it counteracts t , but still:

LucMeekes_1-1714322155730.png

 

Luc

This is probably one of the rare cases where in Mathcad the symbolics of muPad (MC14/15) performs better than Maple MC11).

ttokoro
20-Turquoise
(To:Cornel)

Your question needs equation of vb(t).

image.pngimage.pngimage.pngimage.png

image.png

image.png

Top Tags