Setting up KCL and KVL equations for AC circuit analysis in MATLAB

  • Context: Engineering 
  • Thread starter Thread starter shadow7874
  • Start date Start date
  • Tags Tags
    Circuits
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
4 replies · 2K views
shadow7874
Messages
3
Reaction score
0

Homework Statement


[PLAIN]http://img233.imageshack.us/img233/5697/img1251b.jpg


Homework Equations


KCL, KVL?


The Attempt at a Solution


For problem two I was able to use kcl and kvl to set up a matrix to solve for the 4 currents (at each corner) but i need to plug it into MATLAB as soon as i figure out how. Aside from that I am completely lost.
 
Last edited by a moderator:
Physics news on Phys.org
should probably show some attempt, and put this in the engineering forum
 
Tom McCurdy said:
should probably show some attempt, and put this in the engineering forum

Ok i took what i had so far for number to and used MATLAB to try and figure out Vo

What i did was use kvl of the top two loops together to get
0=-j4(I1)+6(I2)+j5(I2-I4)+8(I1-I3)

then kcl at the top right mesh to get
I1-I2=-4

KVL @ bottom left to get
0=-10+8(I3-I1)+(-j2)(I3-I4)

And
I4=-3

Set up a matrix and used MATLAB to get it in rref which gave

Code:
   1(I1)            0                  0                  0            -1.8690 - 4.4276i
   0                 1(I2)             0                  0             2.1310 - 4.4276i
   0                 0                  1(I3)             0             0.2828 - 3.6069i
   0                 0                  0                  1(I4)       -3.0000

then (not really sure about this part)
used Io (current going up from borrom center through Vo)=I4-I3
used MATLAB and did I4-I3 which gave me Io=3.2828 - 3.6069i

then Vo=Io(-j2) ??
That gives me -7.2138 - 6.5655i but I am not sure if that's correct of not.
 
For question 1 you need to label the nodes and calculate the voltage differences and currents, by using Kirchoff's laws.
I don't know how to do question 2, because my single EE course didn't cover mesh analysis
The last question is done by solving the circuit with only one source turned one and doing that for each source, adding the final answers if I recall correctly
 
shadow7874 said:
then Vo=Io(-j2) ??
That gives me -7.2138 - 6.5655i but I am not sure if that's correct of not.

This is correct. It can also be solved by the nodal method, and doing so, I get the same result.

Now you only have two more to do!