"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\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": [
"\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": [
"\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": [
"\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": [
"\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": [
"\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": [
"\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": [
"