P 4.3-9 Determine the values of the node voltages of the circuit shown in Figure P 4.3-9.

 

Figure P 4.3-9

Write out set of node equations

 

We  have two special spots.

And v1 and v2 are a supernode so have the equations

 

 

Finally

 

We can put these equations into the form:

 

 

 

 

 

Now put them into MATLAB and solve for the four voltages

 

 

MATLAB Code Follows:

 

%Program to solve PH 320 Homework Problem P.4.3-9

%version 2019-01-30 DW Donovan

clear all;

 

GG = [0 0 0 1;

    -1 1 0 0;

    (1/8) (1/20) (-1/8) (-1/20);

    (-1/8) 0 (1/8 + 1/12 + 1/40) (-1/12)];

 

II = [15 5 1.25 0]';

 

VV = GG\II;

 

v1 = VV(1);

v2 = VV(2);

v3 = VV(3);

v4 = VV(4);

 

Ans = {['v1 = ' num2str(v1) ' V'];

   ['v2 = ' num2str(v2) ' V'];

   ['v3 = ' num2str(v3) ' V'];

   ['v4 = ' num2str(v4) ' V']};

 

Ans

 

%{

Ans =

    'v1 = 22.3967 V'

    'v2 = 27.3967 V'

    'v3 = 17.3554 V'

    'v4 = 15 V'

%}

 

 

Please send any comments or questions about this page to ddonovan@nmu.edu

This page last updated on January 30, 2019