"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate the value of the shunt to be connected in parallel with the meter\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"Ia = 0.040;# in Amperes\n",
"I = 50;# in Amperes\n",
"ra = 25;# in ohms\n",
"\n",
"#calculation:\n",
"Is = I - Ia\n",
"V = Ia*ra\n",
"Rs = V/Is\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n value of the shunt to be connected in parallel = \", round((Rs/1E-3),2),\" mohms\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" value of the shunt to be connected in parallel = 20.02 mohms"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 2, page no. 116
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate the value of the multiplier to be connected in series with the instrument\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"V = 100;# in volts\n",
"I = 0.008;# in Amperes\n",
"ra = 10;# in ohms\n",
"\n",
"#calculation:\n",
"Rm = (V/I) - ra\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n value of the multiplier to be connected in series = \", (Rm/1E3),\" kohms\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" value of the multiplier to be connected in series = 12.49 kohms"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 3, page no. 119
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate the power dissipated by the voltmeter and by resistor R\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"fsd = 200;# in volts\n",
"R1 = 250;# in ohms\n",
"R2 = 2E6;# in ohms\n",
"sensitivity = 10000;# in ohms/V\n",
"V = 100; # in volts\n",
"\n",
"#calculation:\n",
"Rv = sensitivity*fsd\n",
"Iv = V/Rv\n",
"Pv = V*Iv\n",
"I1 = V/R1\n",
"P1 = V*I1\n",
"I2 = V/R2\n",
"P2 = V*I2\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the power dissipated by the voltmeter = \", (Pv/1E-3),\" mW\\n\"\n",
"print \"\\n (b)the power dissipated by resistor 250 ohm = \", P1,\" W\\n\"\n",
"print \"\\n (c)the power dissipated by resistor 2 Mohm = \", (P2/1E-3),\" mW\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the power dissipated by the voltmeter = 5.0 mW\n",
"\n",
"\n",
" (b)the power dissipated by resistor 250 ohm = 40.0 W\n",
"\n",
"\n",
" (c)the power dissipated by resistor 2 Mohm = 5.0 mW"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 4, page no. 119
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculate (a) the ammeter reading expected (neglecting its resistance),\n",
"#(b) the actual current in the circuit, \n",
"#(c) the power dissipated in the ammeter, and\n",
"#(d) the power dissipated in the load\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"V = 10;# in volts\n",
"fsd = 0.1;# in Amperes\n",
"ra = 50;# in ohms\n",
"R = 500;# in ohms\n",
"\n",
"#calculation:\n",
"Ie = V/R\n",
"Ia = V/(R + ra)\n",
"Pa = Ia*Ia*ra\n",
"PR = Ia*Ia*R\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)expected ammeter reading = \", (Ie/1E-3),\" mA\\n\"\n",
"print \"\\n (b)Actual ammeter reading = \",round((Ia/1E-3),2),\" mA\\n\"\n",
"print \"\\n (c)Power dissipated in the ammeter = \",round((Pa/1E-3),2),\" mW\\n\"\n",
"print \"\\n (d)Power dissipated in the load resistor = \", round((PR/1E-3),2),\" mW\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)expected ammeter reading = 20.0 mA\n",
"\n",
"\n",
" (b)Actual ammeter reading = 18.18 mA\n",
"\n",
"\n",
" (c)Power dissipated in the ammeter = 16.53 mW\n",
"\n",
"\n",
" (d)Power dissipated in the load resistor = 165.29 mW"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 5, page no. 120
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine (a) the value of voltage V1 with the voltmeter not connected, and \n",
"#(b) the voltage indicated by the voltmeter when connected between A and B.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"fsd = 100;# in volts\n",
"R1 = 40E3;# in ohms\n",
"R2 = 60E3;# in ohms\n",
"sensitivity = 1600;# in ohms/V\n",
"\n",
"#calculation:\n",
"V1 = (R1/(R1 + R2))*fsd\n",
"Rv = fsd*sensitivity\n",
"Rep = R1*Rv/(R1 + Rv)\n",
"V1n = (Rep/(Rep + R2))*fsd\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the value of voltage V1 with the voltmeter6 not connected = \", V1,\" V\\n\"\n",
"print \"\\n (b)the voltage indicated by the voltmeter when connected between A and B = \",round(V1n,2),\" V\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the value of voltage V1 with the voltmeter6 not connected = 40.0 V\n",
"\n",
"\n",
" (b)the voltage indicated by the voltmeter when connected between A and B = 34.78 V"
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 6, page no. 120
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the power dissipated in the load.\n",
"#(b) A wattmeter, whose current coil has a resistance of 0.01 ohm\n",
"# Determine the wattmeter reading.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"I = 20;# in amperes\n",
"R = 2;# in ohms\n",
"Rw = 0.01;# in ohms\n",
"\n",
"#calculation:\n",
"PR = I*I*R\n",
"Rt = R + Rw\n",
"Pw = I*I*Rt\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the power dissipated in the load = \", PR,\" W\\n\"\n",
"print \"\\n (b)the wattmeter reading. = \",Pw,\" W\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the power dissipated in the load = 800 W\n",
"\n",
"\n",
" (b)the wattmeter reading. = 804.0 W"
]
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 8, page no. 122
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine (a) the periodic time, (b) the frequency and (c) the peak-to-peak voltage.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"tc = 100E-6;# in s/cm\n",
"Vc = 20;# in V/cm\n",
"w = 5.2;# in cm ( width of one complete cycle )\n",
"h = 3.6; # in cm ( peak-to-peak height of the display )\n",
"\n",
"#calculation:\n",
"T = w*tc\n",
"f = 1/T\n",
"ptpv = h*Vc\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the periodic time, T = \", (T/1E-3),\" msec\\n\"\n",
"print \"\\n (b)Frequency, f = \",round(f,2),\" Hz\\n\"\n",
"print \"\\n (c)the peak-to-peak voltage = \",ptpv,\" V\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the periodic time, T = 0.52 msec\n",
"\n",
"\n",
" (b)Frequency, f = 1923.08 Hz\n",
"\n",
"\n",
" (c)the peak-to-peak voltage = 72.0 V"
]
}
],
"prompt_number": 7
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 9, page no. 123
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine (a) the periodic time, (b) the frequency, (c) the magnitude of the pulse voltage.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"tc = 50E-3;# in s/cm\n",
"Vc = 0.2;# in V/cm\n",
"w = 3.5;# in cm ( width of one complete cycle )\n",
"h = 3.4; # in cm ( peak-to-peak height of the display )\n",
"\n",
"#calculation:\n",
"T = w*tc\n",
"f = 1/T\n",
"ptpv = h*Vc\n",
"\n",
"#Results \n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)the periodic time, T = \", (T/1E-3),\" msec\\n\"\n",
"print \"\\n (b)Frequency, f = \",round(f,2),\" Hz\\n\"\n",
"print \"\\n (c)the peak-to-peak voltage = \",ptpv,\" V\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)the periodic time, T = 175.0 msec\n",
"\n",
"\n",
" (b)Frequency, f = 5.71 Hz\n",
"\n",
"\n",
" (c)the peak-to-peak voltage = 0.68 V"
]
}
],
"prompt_number": 8
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 10, page no. 123
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#find, for the waveform, (a) the frequency, \n",
"#(b) the peak-to-peak voltage, (c) the amplitude, (d) the r.m.s. value.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"tc = 500E-6;# in s/cm\n",
"Vc = 5;# in V/cm\n",
"w = 4;# in cm ( width of one complete cycle )\n",
"h = 5; # in cm ( peak-to-peak height of the display )\n",
"\n",
"#calculation:\n",
"T = w*tc\n",
"f = 1/T\n",
"ptpv = h*Vc\n",
"Amp = ptpv/2\n",
"Vrms = Amp/(2**0.5)\n",
"\n",
"#Results \n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)Frequency, f = \",f,\" Hz\\n\"\n",
"print \"\\n (b)the peak-to-peak voltage = \",ptpv,\" V\\n\"\n",
"print \"\\n (c)Amplitude = \",Amp,\" V\\n\"\n",
"print \"\\n (d)r.m.s voltage = \",round(Vrms,2),\" V\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)Frequency, f = 500.0 Hz\n",
"\n",
"\n",
" (b)the peak-to-peak voltage = 25 V\n",
"\n",
"\n",
" (c)Amplitude = 12.5 V\n",
"\n",
"\n",
" (d)r.m.s voltage = 8.84 V"
]
}
],
"prompt_number": 9
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 11, page no. 123
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine (a) their frequency, (b) their r.m.s. values, (c) their phase difference.\n",
"from __future__ import division\n",
"import math\n",
"\n",
"#initializing the variables:\n",
"tc = 100E-6;# in s/cm\n",
"Vc = 2;# in V/cm\n",
"w = 5;# in cm ( width of one complete cycle for both waveform )\n",
"h1 = 2; # in cm ( peak-to-peak height of the display )\n",
"h2 = 2.5; # in cm ( peak-to-peak height of the display\n",
"\n",
"#calculation:\n",
"T = w*tc\n",
"f = 1/T\n",
"ptpv1 = h1*Vc\n",
"Vrms1 = ptpv1/(2**0.5)\n",
"ptpv2 = h2*Vc\n",
"Vrms2 = ptpv2/(2**0.5)\n",
"phi = 0.5*360/w\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)Frequency, f = \",f,\" Hz\\n\"\n",
"print \"\\n (b1)r.m.s voltage of 1st waveform = \",round(Vrms1,2),\" V\\n\"\n",
"print \"\\n (b2)r.m.s voltage of 2nd waveform = \",round(Vrms2,2),\" V\\n\"\n",
"print \"\\n (c)Phase difference = \",phi,\"deg\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)Frequency, f = 2000.0 Hz\n",
"\n",
"\n",
" (b1)r.m.s voltage of 1st waveform = 2.83 V\n",
"\n",
"\n",
" (b2)r.m.s voltage of 2nd waveform = 3.54 V\n",
"\n",
"\n",
" (c)Phase difference = 36.0 deg"
]
}
],
"prompt_number": 11
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 12, page no. 127
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the decibel power ratio in each case.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"rP1 = 3;# ratio of two powers\n",
"rP2 = 20;# ratio of two powers\n",
"rP3 = 400;# ratio of two powers\n",
"rP4 = 1/20;# ratio of two powers\n",
"\n",
"#calculation:\n",
"X1 = 10*(1/2.303)*math.log(3)\n",
"X2 = 10*(1/2.303)*math.log(20)\n",
"X3 = 10*(1/2.303)*math.log(400)\n",
"X4 = 10*(1/2.303)*math.log(1/20)\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)decibel power ratio for power ratio 3 = \",round(X1,2),\" dB\\n\"\n",
"print \"\\n (b)decibel power ratio for power ratio 20 = \",round(X2,2),\" dB\\n\"\n",
"print \"\\n (c)decibel power ratio for power ratio 400 = \",round(X3,2),\" dB\\n\"\n",
"print \"\\n (d)decibel power ratio for power ratio 1/20 = \",round(X4,2),\" dB\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)decibel power ratio for power ratio 3 = 4.77 dB\n",
"\n",
"\n",
" (b)decibel power ratio for power ratio 20 = 13.01 dB\n",
"\n",
"\n",
" (c)decibel power ratio for power ratio 400 = 26.02 dB\n",
"\n",
"\n",
" (d)decibel power ratio for power ratio 1/20 = -13.01 dB"
]
}
],
"prompt_number": 12
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 13, page no. 127
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Find the decibel current ratio assuming the input and load resistances of the system are equal.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"I2 = 0.020;# in ampere\n",
"I1 = 0.005;# in ampere\n",
"\n",
"#calculation:\n",
"X = 20*math.log10(math.e)*math.log(I2/I1)\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n decibel current ratio = \",round(X,2),\" dB\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" decibel current ratio = 12.04 dB\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 14, page no. 128
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the power loss in decibels.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"rP = 0.06;# power ratios rP = P2/P1\n",
"\n",
"#calculation:\n",
"X = 10*math.log10(math.e)*math.log(rP)\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n decibel Power ratios = \",round(X,2),\" dB\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" decibel Power ratios = -12.22 dB\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"