"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 120;# in volts\n",
"thetav = 0;# in degrees\n",
"Z = 15 + 1j*20;# in ohm\n",
"\n",
" #calculation: \n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)\n",
" #maximum power transfer occurs when R = mod(Z)\n",
"R = abs(Z)\n",
" #the total circuit impedance\n",
"ZT = Z + R\n",
" #Current I flowing in the load is given by\n",
"I = V/ZT\n",
"Imag = abs(I)\n",
" #maximum power delivered\n",
"P = R*I**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)maximum power transfer occurs when R is \",R,\" ohm\"\n",
"print \"\\n (b) maximum power delivered is \",abs(P),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)maximum power transfer occurs when R is 25.0 ohm\n",
"\n",
" (b) maximum power delivered is 180.0 W\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 2, page no. 620
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 120;# in volts\n",
"thetav = 0;# in degrees\n",
"Z = 15 + 1j*20;# in ohm\n",
"\n",
" #calculation: \n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)\n",
" #maximum power transfer occurs when X = -1*imag(Z) and R = real(Z)\n",
"z = Z.real - 1j*Z.imag\n",
" #Total circuit impedance at maximum power transfer condition,\n",
"ZT = Z + z\n",
" #Current I flowing in the load is given by\n",
"I = V/ZT\n",
"Imag = abs(I)\n",
" #maximum power delivered\n",
"P = Z.real*I**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)maximum power transfer occurs when Z is \",z.real,\" + (\", z.imag,\")i ohm\"\n",
"print \"\\n (b) maximum power delivered is \",abs(P),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)maximum power transfer occurs when Z is 15.0 + ( -20.0 )i ohm\n",
"\n",
" (b) maximum power delivered is 240.0 W"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 3, page no. 620
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 200;# in volts\n",
"thetav = 0;# in degrees\n",
"R1 = 100;# in ohm\n",
"C = 1E-6;# in farad\n",
"f = 1000;# in Hz\n",
"\n",
" #calculation: \n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)\n",
" #Capacitive reactance, Xc\n",
"Xc = 1/(2*math.pi*f*C)\n",
" #Hence source impedance,\n",
"z = R1*(1j*Xc)/(R1 + 1j*Xc)\n",
" #maximum power transfer is achieved when R = mod(z)\n",
"R = abs(z)\n",
" #Total circuit impedance at maximum power transfer condition,\n",
"ZT = z + R\n",
" #Current I flowing in the load is given by\n",
"I = V/ZT\n",
"Imag = abs(I)\n",
" #maximum power transferred,\n",
"P = R*Imag**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)maximum power transfer occurs when R is \",round(R,2),\" ohm\"\n",
"print \"\\n (b) maximum power delivered is \",round(P,2),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)maximum power transfer occurs when R is 84.67 ohm\n",
"\n",
" (b) maximum power delivered is 127.9 W"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 4, page no. 621
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 60;# in volts\n",
"thetav = 0;# in degrees\n",
"R1 = 4;# in ohm\n",
"XL = 10;# in ohm\n",
"Xc = 7;# in ohm\n",
"R2 = XL*1j;# in ohm\n",
"R3 = -1j*Xc;# in ohm\n",
"\n",
" #calculation: \n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)\n",
" #maximum power transfer is achieved when\n",
"R = (R1**2 + (XL - Xc)**2)**0.5\n",
" #Hence source impedance,\n",
"ZT = R1 + R2 + R3 + R\n",
" #Current I flowing in the load is given by\n",
"I = V/ZT\n",
"Imag = abs(I)\n",
" #maximum power transferred,\n",
"P = R*Imag**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)maximum power transfer occurs when R is \",R,\" ohm\"\n",
"print \"\\n (b) maximum power delivered is \",P,\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)maximum power transfer occurs when R is 5.0 ohm\n",
"\n",
" (b) maximum power delivered is 200.0 W"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 5, page no. 622
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"V = 20;# in volts\n",
"R1 = 5;# in ohm\n",
"R2 = 15;# in ohm\n",
"\n",
"#calculation: \n",
" #R is removed from the network as shown in Figure 35.6\n",
" #P.d. across AB, E\n",
"E = (R2/(R1 + R2))*V\n",
" #Impedance \u2018looking-in\u2019 at terminals AB with the source removed is given by\n",
"r = R1*R2/(R1 + R2)\n",
" #The equivalent Th\u00b4evenin circuit supplying terminals AB is shown in Figure 35.7. \n",
" #From condition (2), for maximum power transfer\n",
"R = r\n",
" #Current I flowing in the load is given by\n",
"I = E/(R + r)\n",
" #maximum power transferred,\n",
"P = R*I**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)maximum power transfer occurs when R is \",R,\" ohm\"\n",
"print \"\\n (b) maximum power delivered is \",P,\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)maximum power transfer occurs when R is 3.75 ohm\n",
"\n",
" (b) maximum power delivered is 15.0 W"
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 6, page no. 622
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 100;# in volts\n",
"thetav = 30;# in degrees\n",
"R1 = 5;# in ohm\n",
"R2 = 5;# in ohm\n",
"R3 = 10j;# in ohm\n",
"\n",
"#calculation: \n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180)\n",
" #Resistance R and reactance X are removed from the network as shown in Figure 35.9\n",
" #P.d. across AB,\n",
"E = ((R2 + R3)/(R1 + R2 + R3))*V\n",
" #With the source removed the impedance, z, \u2018looking in\u2019 at terminals AB is given by:\n",
"z = (R2 + R3)*R1/(R1 + R2 + R3)\n",
" #The equivalent Th\u00b4evenin circuit is shown in Figure 35.10. From condition 3, \n",
" #maximum power transfer is achieved when X = -1*imag(z) and R = real(z)\n",
"X = -1*z.imag\n",
"R = z.real\n",
"Z = R + 1j*X\n",
" #Current I flowing in the load is given by\n",
"I = E/(z + Z)\n",
"Imag = abs(I)\n",
" #maximum power transferred,\n",
"P = R*Imag**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)maximum power transfer occurs when R is \",R,\" ohm and X is \", X,\" ohm\"\n",
"print \"\\n (b) maximum power delivered is \",round(P,2),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)maximum power transfer occurs when R is 3.75 ohm and X is -1.25 ohm\n",
"\n",
" (b) maximum power delivered is 416.67 W"
]
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 7, page no. 624
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"Ro = 448;# in ohm\n",
"tr = 8;# turn ratio N1/N2\n",
"\n",
" #calculation: \n",
" #The equivalent input resistance r of the transformer must be Ro for maximum power transfer.\n",
"r = Ro\n",
"RL = r*(1/tr)**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n the optimum value of load resistance is \",RL,\" ohm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" the optimum value of load resistance is 7.0 ohm"
]
}
],
"prompt_number": 7
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 8, page no. 624
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"Zo = 450 + 1j*60;# in ohm\n",
"ZL = 40 + 1j*19;# in ohm\n",
"\n",
" #calculation: \n",
" #transformer turns ratio tr = (N1/N2)\n",
"Zomag = abs(Zo)\n",
"ZLmag = abs(ZL)\n",
"tr = (Zomag/ZLmag)**0.5\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n the transformer turns ratio is \",round(tr,2),\"\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" the transformer turns ratio is 3.2 "
]
}
],
"prompt_number": 8
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 9, page no. 625
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"V1 = 240;# in volts\n",
"V2 = 1920;# in volts\n",
"R1 = 5;# in ohms\n",
"R2 = 1600;# in ohms\n",
"\n",
"#calculation: \n",
" #The network is shown in Figure 35.12.\n",
" #turn ratio N1/N2 = V1/V2\n",
"tr = V1/V2\n",
" #Equivalent input resistance of the transformer,\n",
"RL = R2\n",
"r = RL*tr**2\n",
" #Total input resistance,\n",
"Rin = R1 + r\n",
" #primary current, I1\n",
"I1 = V1/Rin\n",
" #For an ideal transformer V1/V2 = I2/I1\n",
"I2 = I1*(V1/V2)\n",
" #Power dissipated in the load resistance\n",
"P = RL*I2**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a) primary current flowing is \",I1,\" A\"\n",
"print \"\\n (b) Power dissipated in the load resistance is \",P,\"W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a) primary current flowing is 8.0 A\n",
"\n",
" (b) Power dissipated in the load resistance is 1600.0 W"
]
}
],
"prompt_number": 9
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 10, page no. 625
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv = 30;# in volts\n",
"thetav = 0;# in degrees\n",
"r = 20000;# in ohms\n",
"tr = 20;# turn ratio\n",
"\n",
"#calculation:\n",
" #voltage\n",
"V = rv*math.cos(thetav*math.pi/180) + 1j*rv*math.sin(thetav*math.pi/180) \n",
" #The network diagram is shown in Figure 35.13.\n",
" #For maximum power transfer, r1 must be equal to\n",
"r1 = r\n",
" #load resistance RL\n",
"RL = r1/tr**2\n",
" #The total input resistance when the source is connected to the matching transformer is\n",
"RT = r + r1\n",
" #Primary current\n",
"I1 = V/RT\n",
" #N1/N2 = I2/I1\n",
"I2 = I1*tr\n",
" #Power dissipated in load resistance RL is given by\n",
"P = RL*I2**2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the value of the load resistance is \",RL,\" ohm\"\n",
"print \"\\n (b) Power dissipated in the load resistance is \",abs(P*1000),\"mW\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the value of the load resistance is 50.0 ohm\n",
"\n",
" (b) Power dissipated in the load resistance is 11.25 mW"
]
}
],
"prompt_number": 10
}
],
"metadata": {}
}
]
}