Professional Documents
Culture Documents
No part of any book may be reproduced or transmitted by any means without the publisher’s prior permission. Use (other than qualified fair
use) in violation of the law or Terms of Service is prohibited. Violators will be prosecuted to the full extent of the law.
vA 1 mA
vB
4 kΩ i x 4 kΩ
2 kΩ 5 V 4 kΩ
Solution:
The equations are formulated and solved in the following MATLAB code.
clear all
syms vA vB vC
Eqn1 = 'vA/2e3 + (vA-vB)/4e3 - 1e-3';
Eqn2 = 'vB - 5';
Eqn3 = '1e-3 + (vC-vB)/4e3 + vC/4e3';
Soln = solve(Eqn1,Eqn2,Eqn3,'vA','vB','vC');
vA = double(Soln.vA)
vB = double(Soln.vB)
vC = double(Soln.vC)
vx = vA-vC
ix = (vA-vB)/4e3 + (vC-vB)/4e3
vA =
3.0000e+000
vB =
5.0000e+000
vC =
500.0000e-003
vx =
2.5000e+000
ix =
-1.6250e-003
Answer:
(a) The node‐voltage equations are presented above in the MATLAB code.
(b) vA = 3 V and vC = 500 mV
(c) vx = 2.5 V and ix = 1.625 mA
Problem 3‐12
(a) Formulate mesh‐current equations for the circuit in Figure P3‐12.
(b) Solve for vx and ix when R1 = 200 Ω, R2 = 300 Ω, R3 = 50 Ω, R4 = 250 Ω, R5 = 200 Ω, iS = 100 mA, and vS =
25 V.
(c) Find the total power dissipated in the circuit.
R2 R3
ix
R1 is R4 vx
vs
R5
Solution:
The solution is presented in the following MATLAB code.
clear all
% Create the mesh-current equations
% Note that the variable vis is the voltage across the current source
syms vs is vis R1 R2 R3 R4 R5 iA iB vx ix
Eqn1 = '-vs + R1*iA +R2*iA -vis';
Eqn2 = 'vis + R3*iB + R4*iB + R5*iB';
Eqn3 = 'is - (iB-iA)';
iC
vA vB vC
2 kΩ 8 kΩ
iA 4 kΩ vx iB
40 V
ix 25V
Solution:
The following MATLAB code contains solutions to Parts (a), (b), and (d).
clear all
syms vA vB vC iA iB iC real
MeshA = '-40+2000*(iA-iC)+4000*(iA-iB)';
MeshB = '4000*(iB-iA)+8000*iB-25';
MeshC = 'iC-0.005';
NodeA = 'vA-40';
NodeB = '-0.005+(vB-vA)/2000+vB/4000+(vB-vC)/8000';
NodeC = 'vC+25';
iABC = solve(MeshA,MeshB,MeshC,'iA','iB','iC');
iA = simplify(iABC.iA);
iB = simplify(iABC.iB);
iC = simplify(iABC.iC);
vXMesh = simplify(4000*(iA-iB))
iXMesh = double(-iB)
vABC = solve(NodeA,NodeB,NodeC,'vA','vB','vC');
vA = simplify(vABC.vA);
vB = simplify(vABC.vB);
vC = simplify(vABC.vC);
vXNode = vB
iXNode = double((vC-vB)/8000)
Mesh C: iC 0.005 ;
(b) Node A: v A 40 ;
v B v A v B 0 v B vC
Node B: 0.005 0 ;
2000 4000 8000
Node C: vC 25
(c) Node voltage; there is only one equation to solve.
(d) vx = 25 V and ix = −6.25 mA
Problem 3‐29 10 k i O1
Use the superposition principle to find iO in Figure P3‐29. Verify
5 k 5 k
your answer using OrCAD.
15 k 10 k
10 V
Solution: i S1
The following MATLAB code presents the solution.
clear all
% Turn on the current source
Req1 = 1/(1/5e3 + 1/15e3 + 1/10e3); 10 k i O2
Req2 = 5e3+ Req1;
% Current division twice 5 k 5 k i S2
i1 = 1e-3/Req2/(1/Req2 + 1/10e3); 15 k 10 k
io1 = -i1/10e3/(1/5e3 + 1/15e3 + 1/10e3); 20 V
% Turn on the 10-V source
vo2 = Req1*10/(Req1+5e3+10e3);
io2 = vo2/10e3;
% Turn on the 20-V source
Req3 = 1/(1/15e3 + 1/15e3 + 1/10e3);
vo3 = Req3*20/(Req3 + 5e3);
io3 = vo3/10e3; 1 mA
10 k i O3
% Sum the components
io = io1+io2+io3 5 k 5 k
io = 15 k 10 k
923.0769e-006 ip
The OrCAD results verify the answer above.
Answer:
iO = 923.08 µA
Problem 3‐34
A certain linear circuit has four input voltages and one output voltage vO. The following table lists the
output for different values of the four inputs. Find the input‐output relationship for the circuit.
Specifically, find an expression for vO in terms of the four input voltages.
vS1(V) vS2(V) vS3(V) vS4(V) vO(V)
2 4 –4 1 20
1 2 2 1.5 –4
1 4 2 2 –1
0 5 3 –1 3
Solution:
Write four linear expressions based on the information above and solve for the gains associated with
each source. We will solve for the Ki terms in the following equation:
vO K1vS1 K 2 vS 2 K 3 vS3 K 4 vS4
The following MATLAB code presents the solution.
clear all
% Use matrix notation for formulate and solve the problem
A = [2 4 -4 1;
1 2 2 1.5;
1 4 2 2;
0 5 3 -1];
B = [20; -4; -1; 3];
K = A\B
K =
1.0000
2.0000
-3.0000
-2.0000
Answer:
vO vS1 2vS2 3vS3 2vS4