Skip to main content
1-Visitor
October 8, 2013
Question

Circuit analysis

  • October 8, 2013
  • 7 replies
  • 7843 views

I'm not exactly sure what is causing the error of if I'm doing something completely wrong

Circuit is shown circuit.jpeg

7 replies

25-Diamond I
October 8, 2013

I am a bit confused about the initial conditions. As I see it both currents I1 and I2 would be zero for t=0 (which obviously should denote the close of the switch.

24-Ruby IV
October 8, 2013

Your second equation contents not derivatives but divisions and multiplications

12-Amethyst
October 8, 2013

Assuming that the capacitor is fully discharged (Vc= 0) I think that it is possible to achieve 3mA load on the voltage source. this csn be split to initial currents of 2.5mA into the capacitor & 0.5mA into the inductor or just 3mA int the capacitor & 0 into the inductor.

This doesn't match with the schematic drawn, the cap here will be fully charged to 20V long before you can close the switch.

As to problems with the Mathcad sheet.

It is difficult to understand the relevance of the equations given, I would be tempted to re-write them as much simpler equations describing the node voltages & currents:

Capture.PNG

Vsw(itch & Vc(ap will suffice for the additional voltage nodes

& the currents

Iv (current out of the voltage source)

Ic (into the capacitor)

I.L (into the Inductor)

Defining variables such as R1: 5000 will also help to simplify the equations.

Regards

Andy

24-Ruby IV
October 8, 2013

Your second equation contents not derivatives but divisions and multiplications

24-Ruby IV
October 8, 2013
25-Diamond I
October 8, 2013

There were a bunch of errors in your file which could have been easily avoided by using, reading and paying attention to Mathcads help files!

  • As Valery pointed out you did not use the derivation operator in the second equation but simply typed a similar looking fraction
  • for initial values you must use the prime character, not the derivation operator
  • q1 would be first, q2 second order. So you need just three initial conditions, not six, as you try to provide.
  • you used the Odesolve command the wrong way. As you had set up a system of ODEs with two functions, the first parameter of Odesolve() has to be a vector with the names of those functions.
  • The result of Odesolve will be two (pseudo) functions, so on the LHS of the assignment you should provide an apropriate vector.

Furthermore, as was already stated, your initial conditions are definitely wrong, if we assume that t=0 would be the moment the switch is closed. All currents would be zero at that moment and the capacitor voltage could be assumed to be 20 V.

I also think that t=1 as endpoint is too big. After one second you will not see any more noticeable changes in your curcuit.

Nonetheless, Odesolve can be a stubborn beast and may be very sensible about the way you write your equations, So I have provided a solution to your problem but I followed a slightly different way in setting up the equations and throw overboard the charge functions. It seemed to me that you don't need them and their sole purpose was to get rid of the integral you get for the cap voltage.

circuit1.png

24-Ruby IV
October 9, 2013

Fine work, Werner! I done someone for hydro circuits

I repeate it is a task for Prime.

But we can use pseudounits in M15 - see please the attach

24-Ruby IV
October 9, 2013
ZW11-VisitorAuthor
1-Visitor
October 15, 2013

thanks for all the responses guys, I understand now from what Werner explained