diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-master.tar.gz all-scilab-tbc-books-ipynb-master.tar.bz2 all-scilab-tbc-books-ipynb-master.zip |
Initial commit
Diffstat (limited to 'Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh')
7 files changed, 5163 insertions, 0 deletions
diff --git a/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/1-Basic_Circuit_Concepts.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/1-Basic_Circuit_Concepts.ipynb new file mode 100644 index 0000000..55dba11 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/1-Basic_Circuit_Concepts.ipynb @@ -0,0 +1,885 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Basic Circuit Concepts" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example 1.10,Pg1.13\n", +"clc;\n", +"Ra0=120\n", +"Rb0=180\n", +"Aa=0.0035\n", +"Ab=0.008\n", +"A=(Ra0*Aa+Rb0*Ab)/(Ra0+Rb0)\n", +"printf('\n The series combination of the two = %.4f per degree C\n',A)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.11,Pg1.14\n", +"function [R2] = myfunction(R1)\n", +" temp1=t1\n", +" temp2=t2\n", +" a=a0\n", +" R2=R1*(1+a0*(temp2-temp1))\n", +"endfunction\n", +"function[alpha]=coefficient(a1)\n", +" temp1=t1\n", +" temp2=t2\n", +" alpha=a1/(1+a1*(temp2-temp1))\n", +" endfunction\n", +"clc;\n", +"t1=30\n", +"t2=50\n", +"a0=0.003\n", +"A1=coefficient(a0)\n", +"r1=myfunction(150)\n", +"a0=0.002\n", +"A2=coefficient(a0)\n", +"r2=myfunction(350)\n", +"printf('\n Series combination=%.0f ohms \n',r1+r2)\n", +"printf('\n Parallel combination=%.2f ohms \n',r1*r2/(r1+r2))\n", +"printf('\n For first coil a50=%.4f per degree C \n',A1)\n", +"printf('\n For second coil a50=%.5f per degree C \n',A2)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.12,Pg1.17\n", +"clc;\n", +"disp('When a wire is bent in the form of a circle,its resistance gets divided between any two points on its diameter as the resistance is directly proportional to its length. The two parts can be considered as two resistors of 6ohms in parallel')\n", +"R=6*6/(6+6)\n", +"printf('\n Hence equivalent resistance R=%.0f ohms \n',R)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example 1.14,Pg1.18\n", +"clc;\n", +"disp('Refer to the figure shown in the problem')\n", +"R=1/((1/25)+(1/50)+(1/50))+2+8\n", +"printf('\n Equivalent resistance between A and B = %.1f ohms \n',R)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.15,Pg1.19\n", +"clc;\n", +"disp('Refer to the figure shown in the problem')\n", +"R1=4*4/(4+4) //Equivalent resistance of the upper triangular network\n", +"R2=3*3/(3+3) //Equivalent resistance of the triangular network on right\n", +"R3=2*(R1+R2)/(2+R1+R2)\n", +"R=2*(R3+1)/(2+R3+1)\n", +"printf('\n Equivalent resistance =%.2f ohms \n',R)\n", +"I=30/R\n", +"printf('\n Current=%.1f A \n',I)\n", +"\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example 1.16,Pg1.20\n", +"clc;\n", +"disp('Refer to the figure given in the problem')\n", +"R1=4*4/(4+4) //Equivalent resistance of the upper triangle shown in the figure obtained by the reduction of the upper left and right triangular resistance networks\n", +"R2=3*3/(3+3)\n", +"R3=(2*(R1+R2))/(2+R1+R2)\n", +"R=1/((1/5)+(1/2)+(1/(R3+1)))\n", +"printf('\n Equivalent resistance =%.2f ohms \n',R)\n", +"I=50/R\n", +"printf('\n Current = %.2f A \n',I)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example 1.18,Pg 1.23\n", +"clc;\n", +"I=30/15\n", +"disp('Refer to the diagram given in the question')\n", +"printf('\n Current through the 15 ohm resistor is given by I= 30/15 = %.0f A \n',I)\n", +"printf('Current through the 5 ohm resistance = 5+2= %.0f A',5+2)\n", +"disp('Applying KVL to the closed path and thus obtaining the result we can say')\n", +"disp('-5(7)-R(I)+100-30=0')\n", +"R=(100-30-35)/2\n", +"printf('\n R= %.1f ohms \n',R)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example 1.19,Pg 1.24\n", +"clc;\n", +"disp('Refer to the figure shown in the diagram')\n", +"disp('Assign branch currents as shown in the figure')\n", +"disp('I2-I3=13')\n", +"disp('-20I1+8I2=0')\n", +"disp('-12I1-16I2=0')\n", +"disp('By solving the equations we can obtain the result as follows')\n", +"A=[0 1 -1;-20 8 0;-12 0 -16]\n", +"B=[13;0;0]\n", +"I=A\B\n", +"printf('\n I1= %.0f A \n',I(1,:))\n", +"printf('\n I2= %.0f A \n',I(2,:))\n", +"printf('\n I3= %.0f A \n',I(3,:))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.21: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example 1.21,Pg1.26\n", +"clc;\n", +"disp('Refer to the figure shown in the question')\n", +"disp('Let the branch current be as follows')\n", +"disp('IOA=x')\n", +"disp('IOB=1-x')\n", +"disp('IAB=y')\n", +"disp('IBC=1-x-y')\n", +"disp('IAC=x+y')\n", +"A=[3 -3;9 12]\n", +"B=[2;4]\n", +"XY= A\B \n", +"x=XY(1,1)\n", +"y=XY(2,1)\n", +"IOA=x\n", +"IOB=1-x\n", +"IAB=y\n", +"IBC=1-x-y\n", +"IAC=x+y\n", +"printf('\n IOA=%.2f A \n',IOA)\n", +"printf('\n IOB=%.2f A \n',IOB)\n", +"printf('\n IAB=%.3f A \n',IAB)\n", +"printf('\n IBC=%.3f A \n',IBC)\n", +"printf('\n IAC=%.3f A \n',IAC)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.22: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example1.26,Pg1.22\n", +"clc;\n", +"disp('Refer to the figure shown in the question')\n", +"I1=2/5\n", +"I2=4/8\n", +"printf('\n I1= %.1f A \n',I1)\n", +"printf('\n I2=%.1f A \n',I2)\n", +"Vxy=3*I2-3*I1-4\n", +"printf('\n Vxy=%.1f V',Vxy)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.23: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example 1.23,Pg1.27\n", +"clc;\n", +"disp('Refer to the figure shown in the diagram')\n", +"I1=20/15 //Voltage in the loop divided by the sum of resistances\n", +"I2=15/10 //Voltage in the loop divided by the sum of resistances\n", +"printf('\n I1=%.2f A \n',I1)\n", +"printf('\n I2=%.1f A \n',I2)\n", +"Vab=5*I1-6*I2+5+15 //By applying KVL to the loop\n", +"printf('\n Vab=%.2f V',Vab)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.24: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example1.24,Pg1.27\n", +"clc;\n", +"disp('Refer to the figure shown in the problem')\n", +"I1=5/2 //The 3ohms resistance gets shorted hence current flows only through the 2 ohms resistor\n", +"I2=2\n", +"printf('\n I1=%.1f A \n',I1)\n", +"printf('\n I2=%.0f A \n',I2)\n", +"Vab=2*I1-8+5*I2\n", +"printf('\n Vab=%.0f V \n',Vab)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.25: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example1.25,Pg1.28\n", +"clc;\n", +"disp('Refer to the figure shown in the problem')\n", +"I1=10/8 //Voltage divided by the sum of the resistances\n", +"I2=5 //Current in the second loop is indicated by a current source of 5A\n", +"printf('\n I1=%.2f A \n',I1)\n", +"printf('\n I2=%.0f A \n',I2)\n", +"//Apply KVL to the path from A to B\n", +"Vab=3*I1+8-3*I2\n", +"printf('\n Vab=%.2f V \n',Vab)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.26: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Ex1.26,Pg1.29\n", +"function [current1] = voltagetocurrent(voltage1)\n", +" resistance1=R\n", +" current1=voltage1/resistance1\n", +"endfunction\n", +"function[voltage2]=currenttovoltage(current2)\n", +" resistance2=R\n", +" voltage2=current2*resistance2\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the figure shown in the question')\n", +"R=5 //Resistance in ohms\n", +"I1=voltagetocurrent(20) //Converting voltage source with series resistance to current source with parallel resistance\n", +"I=I1+3 //Total of the current sources in the circuit\n", +"R=1/((1/30)+(1/50)+(1/5)+(1/6)) //Equivalent resistance in the circuit\n", +"V1=currenttovoltage(I) //Converting current source with parallel resistance to voltage source with series resistance\n", +"printf('\n Equivalent resistance in network = %.2f ohms \n',R)\n", +"printf('\n Equivalent voltage source in network = %.2f V \n',V1)\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.27: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.27,Pg1.30\n", +"clc;\n", +"disp('Since the 5 ohms resistor is connected in parallel with 20V source,it becomes redundant')\n", +"I=20.00/6.00 //Converting 20V in series with 6 ohms to current source in parallel with 6 ohms\n", +"I=I+10\n", +"printf('\n Total current in circuit = %.2f A \n',I)\n", +"printf('Equivalent resistance = %.0f ohms \n',6)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.28: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.28,Pg30\n", +"function [current1] = voltagetocurrent(voltage1)\n", +" resistance1=R\n", +" current1=voltage1/resistance1\n", +"endfunction\n", +"function[voltage2]=currenttovoltage(current2)\n", +" resistance2=R\n", +" voltage2=current2*resistance2\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the figure shown in the diagram')\n", +"R=3 //Resistance in ohms\n", +"I1=voltagetocurrent(6) //Converting voltage source with series resistance to current source with parallel resistance\n", +"R=2\n", +"I2=voltagetocurrent(4)\n", +"R=1\n", +"I3=voltagetocurrent(3)\n", +"R1=2*2/(2+2) //Equivalent resistance of upper portion\n", +"R2=3*1/(3+1) //Equivalent resistance of lower portion\n", +"I11=1+I2 //Total current of upper portion\n", +"I12=-I1+I3 //Total current of lower portion\n", +"R=R1\n", +"V1=currenttovoltage(I11)\n", +"R=R2\n", +"V2=currenttovoltage(I12)\n", +"V=V1+V2\n", +"R=R1+R2\n", +"printf('\n Total voltage source = %.2f V \n',V)\n", +"printf('\n Total equivalent resistance = %.2f ohms \n',R)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.29: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.29,Pg1.32\n", +"function [current1] = voltagetocurrent(voltage1)\n", +" resistance1=R\n", +" current1=voltage1/resistance1\n", +"endfunction\n", +"function[voltage2]=currenttovoltage(current2)\n", +" resistance2=R\n", +" voltage2=current2*resistance2\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"R=3 //Resistance in ohms\n", +"I=voltagetocurrent(10)\n", +"I=I+10 //Total current in the circuit\n", +"R=3*2/(3+2)\n", +"V=currenttovoltage(13.33)\n", +"I=(50-16)/(5+1.2) //Current in the circuit\n", +"P=50*I //Power delivered by the 50V source\n", +"printf('\n Power delivered by the 50V source=%.0f W \n',P)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Find_Resistance.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example 1.2,Pg 1.10\n", +"clc;\n", +"l=2000*10^3 //length of the cable in metres\n", +"d=0.7*10^-2 //diameter of the cable in metres\n", +"p=(1/58)*10^-6 //ohms per m for 1sq mm cross sectional area\n", +"A=(%pi*d^2)/4\n", +"R=(p*l)/A\n", +"printf('\n Resistance = %.2f ohms \n',R)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.30: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.30,Pg1.32\n", +"function [current1] = voltagetocurrent(voltage1)\n", +" resistance1=R\n", +" current1=voltage1/resistance1\n", +"endfunction\n", +"function[voltage2]=currenttovoltage(current2)\n", +" resistance2=R\n", +" voltage2=current2*resistance2\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the figure shown in the problem')\n", +"R=2 //Resistance in ohms\n", +"V=currenttovoltage(5) //Converting current source with parallel resistance to voltage source with series resistance\n", +"V=V-6 //Equivalent resistance in the closed path\n", +"I=voltagetocurrent(V) //Converting voltage source with series resistance to current source with parallel resistance\n", +"I=I+2 //Total current provided by combination of current sources in circuit\n", +"I4=I*2/(2+4) //Current through the 4 ohm resistance\n", +"printf('\n Current through the 4 ohm resistance = %.2f A \n',I4)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.31: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.31,Pg1.33\n", +"function [current1] = voltagetocurrent(voltage1)\n", +" resistance1=R\n", +" current1=voltage1/resistance1\n", +"endfunction\n", +"function[voltage2]=currenttovoltage(current2)\n", +" resistance2=R\n", +" voltage2=current2*resistance2\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the figure shown in the diagram')\n", +"disp('Since nodes 1 and 2 are maintained at the same voltage by the sources, the connection between nodes 1 and nodes 2 is removed. Now the two voltage sources have resistors in series and source transformation can be applied')\n", +"R=4 //Resistance in ohms\n", +"I=voltagetocurrent(18) //Converting voltage source with series resistance to current source with parallel resistance\n", +"R=4*2/(4+2) //Since the 4 ohm and 2 ohm resistances are in parallel\n", +"V=currenttovoltage(I) //Converting current source with parallel resistance to voltage source with series resistance\n", +"Va=(6+(5.985/2.33))/((1/3)+(1/2.33)+(1/6))\n", +"printf('\n Voltage at node A = %.2f V \n',Va)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.3,Pg1.10\n", +"printf('\n Diameter of wire=d\n')\n", +"printf('\n Length of wire=l\n')\n", +"printf('\n Resistance of wire = 4pl/A\n')\n", +"printf('\n For another wire diameter =2d\n')\n", +"printf('\n length =4l\n')\n", +"printf('\n Hence Resistance = 4pl/A')\n", +"printf('\n Hence Resistance = R\n')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example1.4,Pg1.10\n", +"clc;\n", +"l1=100 //length of the wire in metres\n", +"A1=0.1*10^-6 //area of the wire in metres\n", +"p=50*10^-8 //resistivity of the wire in ohm metre\n", +"R1=p*l1/A1\n", +"printf('\n Resistance before drawing out the wire = %1f ohms\n',R1)\n", +"printf('\n Volume of the wire before drawing out=Volume of the wire after drawing out \n')\n", +"A2=A1/3\n", +"l2=3*l1\n", +"R2=p*l2/A2\n", +"printf('\n Resistance after drawing out = %1f ohms \n',R2)\n", +"a=R2/R1\n", +"printf('\n The Ratio of the resistances is = %1f \n',a) " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"//Chapter 1,Example 1.5,Pg 1.11\n", +"printf('\n For silver wire R1 = (p1 X l1)/A1 \n')\n", +"printf('\n For Manganin wire R2= (p1 X l2)/A2 \n')\n", +"printf('R2/R1 = (p2 X l2 X A1)/(p1 X l1 X A2)\n')\n", +"R1=2 //resistance of silver wire in ohms\n", +"d1=1 //assuming the diameter of the silver wire to be 1 unit\n", +"d2=d1/3\n", +"l1=1 //assuming the length of the silver wire to be 1 unit\n", +"l2=l1/3\n", +"p1=1 //assuming the resistivity of silver wire is 1 unit\n", +"p2=30*p1\n", +"A1=%pi*d1^2/4\n", +"A2=%pi*d2^2/4\n", +"R2=p2*l2/A2\n", +"Rone=p1*l1/A1\n", +"R=R2/Rone\n", +"R2=R1*R\n", +"printf('\n Resistance of manganin wire = %.0f ohms\n',R2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example 1.6,Pg 1.11\n", +"clc;\n", +"R10=80 //Resistance at 10 degrees Celsius\n", +"R60=96.6 //Resistance at 60 degrees Celsius\n", +"disp('R10=R0(1 + 10a0)')\n", +"disp('R60=R0(1 + 60a0)')\n", +"disp('Divide both the equations')\n", +"disp('96.6/80 = (1 +60a0)/(1+10a0)')\n", +"a0=(96.6-80)/(4800-966)\n", +"at=a0/(1+a0*60)\n", +"printf('\n Temp coeff at 60 degrees= %1f per degree C\n',at)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter1,Example 1.7,Pg1.12\n", +"function[at]=a0toat(a0)\n", +" t=temp;\n", +" at=a0/(1+a0*t)\n", +"endfunction\n", +"function[a0]=attoa0(at)\n", +" t=temp;\n", +" a0=at/(1-at*t)\n", +"endfunction\n", +"clc;\n", +"at=1/254.5 //given\n", +"temp=20 //temperature\n", +"a00=attoa0(at) //storing the returned temperature coefficient in variable a00\n", +"printf('\n Temp coeff = %.6f per degree C \n',a00)\n", +"temp=60\n", +"at1=a0toat(a00)\n", +"printf('\n Temp coeff at 60 degress = %8f per degree C \n',at1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1,Example 1.8,Pg 1.12\n", +"clc;\n", +"disp('We know that R1 = R0(1+a0t)')\n", +"disp('At t1=20 degree C, R1=45 ohms')\n", +"R0=45/(1+0.004*20)\n", +"disp('At t2, R2=48.5 ohms')\n", +"disp('Therefore, we can calculate t2 as follows')\n", +"disp('45/48.5 = (1+0.004*20)/(1+0.004t2)')\n", +"t2=(48.5-R0)/(0.004*R0)\n", +"printf('\n Therefore t2= %.0f degree C \n',t2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 1, Example 1.9,Pg 1.13\n", +"clc;\n", +"disp('We know that Rt = R0(1+a0*t)')\n", +"disp('At t1=20 degree C, R1=18 ohms')\n", +"disp('18=R0(1+20*a0)')\n", +"disp('At t2=50 degree C R2=20 ohms')\n", +"disp('20=R0(1+50a0)')\n", +"a0=20-18/(900-400) //Divide both the equations\n", +"printf('\n a0=%.3f per degree c \n',a0)\n", +"t=(21+1.68-18)/0.072\n", +"printf('\n Therefore temp t = %.0f degrees C \n',t)\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/2-DC_CIRCUITS.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/2-DC_CIRCUITS.ipynb new file mode 100644 index 0000000..b249447 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/2-DC_CIRCUITS.ipynb @@ -0,0 +1,1738 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: DC CIRCUITS" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: Find_current_through_2ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.10,Pg 2.19\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[7 -1 0 ;-1 6 -3; 0 -3 13]\n", +"B=[10; 0; -20]\n", +"I=A\B\n", +"printf('\n Current through the 2 ohms resistor=%.2f A\n',I(2))\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11: Determine_current_through_5_ohm_resistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.11,Pg 2.20\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[3 -1 -2 ;-1 8 -3; -2 -3 10]\n", +"B=[8; 10; 12]\n", +"I=A\B\n", +"printf('\n Current through the 5 ohms resistor=%.2f A\n',I(3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12: Find_current_supplied_by_the_battery.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.12,Pg 2.21\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[8 -1 -4 ;-1 8 -5; -4 -5 15]\n", +"B=[4; 0; 0]\n", +"I=A\B\n", +"printf('\n Current supplied by battery=%.2f A\n',I(1))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13: Determine_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.13,Pg 2.22\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[1 -2 -5 ;0 -6 1; 1 1 -10]\n", +"B=[20; 0; 0]\n", +"VI=A\B\n", +"printf('\n Current supplied by battery=%.1f A\n',VI(1))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14: Find_current_through_2ohm_resistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.14,Pg 2.22\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[1 0 0 ;0 18 -6; 0 6 -11]\n", +"B=[6; 108; 9]\n", +"I=A\B\n", +"printf('\n Current through 2 ohms resistor=%.0f A\n',I(3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.15: Find_current_through_10_ohm_resistor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.15,Pg2.23\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"a=[11 -10 0;0 -1 1;2 -3 -3]\n", +"b=[2;4;0]\n", +"i=a\b\n", +"printf('\n I1 = %.2f A\n',i(1))\n", +"printf('\n I2 = %.2f A\n',i(2))\n", +"printf('\ I3=%.2f A\n',i(3))\n", +"printf('\n Current through 10 ohms resistor = %.2f A\n',i(1)-i(2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.16: Find_current_in_3_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.16,Pg2.24\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"a=[1 0 -1;-1 4 -4;1 -6 3]\n", +"b=[7;-7;0]\n", +"i=a\b\n", +"printf('\n I1 = %.1f A\n',i(1))\n", +"printf('\n I2 = %.1f A\n',i(2))\n", +"printf('\ I3=%.0f A\n',i(3))\n", +"printf('\n Current through 3 ohms resistor = %.1f A\n',i(2)-i(3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.17: Find_current_in_5_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.16,Pg2.24\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"a=[15 -10 -5;0 1 -1;-15 12 6]\n", +"b=[50;2;0]\n", +"i=a\b\n", +"printf('\n I1 = %.0f A\n',i(1))\n", +"printf('\n I2 = %.2f A\n',i(2))\n", +"printf('\ I3=%.2f A\n',i(3))\n", +"printf('\n Current through 5 ohms resistor = %.1f A\n',i(1)-i(3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.19: Find_voltage_at_nodes_1_and_2.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.20,Pg 2.26\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"a=[2 -1;-1 3]\n", +"b=[2;4]\n", +"v=a\b\n", +"printf('\n V1=%.0f V\n',v(1))\n", +"printf('\n V2=%.0f V\n',v(2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Equivalent_resistance.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex 2.1,Pg 2.4\n", +"function [resistance_1] = deltatostar(R)\n", +" resistance1=R1\n", +" resistance2=R2\n", +" resistance_1= (resistance1*resistance2)/R\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"R1=4.5 //Resistance in ohms\n", +"R2=7.5 //Resistance in ohms\n", +"R3=3 //Resistance in ohms\n", +"R=R1+R2+R3\n", +"Ra=deltatostar(R) //Converting the given delta network to star network\n", +"R2=3 //Resistance in ohms\n", +"Rb=deltatostar(R) //Converting delta network to star network\n", +"R1=7.5\n", +"Rc=deltatostar(R) //Converting delta network to star network\n", +"R_1= 1/((1/(Rb+Rb+4)) + (1/(Rc+Rc+3)))\n", +"R_eq=(2*Ra) + R_1 // Equivalent resistance of the entire network\n", +"printf('\n The equivalent resistance R = %.2f ohms \n',R_eq)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.20: Find_Va_and_Vb.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.20,Pg2.27\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"a=[8 -2;-3 9]\n", +"b=[50;85]\n", +"v=a\b\n", +"printf('\n Va=%.2f V\n',v(1))\n", +"printf('\n Vb=%.2f V\n',v(2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21: Calculate_the_current_through_the_5_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.21,Pg2.27\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"a=[5 -2 0;10 -31 6;0 -4 9]\n", +"b=[-24;300;160]\n", +"v=a\b\n", +"printf('\n V1=%.2f V\n',v(1))\n", +"printf('\n V2=%.2f V\n',v(2))\n", +"printf('\n V3=%.2f V\n',v(3))\n", +"printf('\n Current through 5 ohms resistor = %.2f A\n',(v(3)-v(2))/5)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.23: Find_Va_and_Vb.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 23,Ex 2.23,Pg2.29\n", +"clc;\n", +"disp('Refer to the diagram given in the question')\n", +"A=[4 -2;-2 3]\n", +"B=[5;4]\n", +"V=A\B\n", +"printf('\n Va=%.2f V\n',V(1))\n", +"printf('\n Vb=%.2f V\n',V(2))\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.24: Find_voltage_across_5_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Example 2.24,Pg 2.30\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[4 -2 -1;-50 71 -20;-5 -4 10]\n", +"B=[-24;0;180]\n", +"V=A\B\n", +"printf('\n Va=%.2f V\n',V(1))\n", +"printf('\n Vb=%.2f V\n',V(2))\n", +"printf('\n Vc=%.2f \n',V(3))\n", +"printf('\n Voltage across 5 ohms resistor=%.2f \n',V(3)-V(2))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.25: Find_currents_I1_I2_and_I3.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.25,Pg2.30\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[8 -1;-2 17]\n", +"B=[50;-500]\n", +"V=A\B\n", +"printf('\n V1=%.2f V \n',V(1))\n", +"printf('\n V2=%.2f V \n',V(2))\n", +"printf('\n I1=%.2f \n',-V(1)/2)\n", +"printf('\n I2=%.2f \n',(V(1)-V(2))/10)\n", +"printf('\n I3=%.2f \n',(V(2)+50)/2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.26: Find_currents_and_voltages.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.26,Pg 2.31\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[0.5 -0.2;0.1 -0.4]\n", +"B=[34.2;-32.4]\n", +"V=A\B\n", +"printf('\n Va=%.2f V \n',V(1))\n", +"printf('\n Vb=%.2f V \n',V(2))\n", +"printf('\n I1=%.0f A \n',(120-V(1))/0.2)\n", +"printf('\n I2=%.0f A \n',(V(1)-V(2))/0.3)\n", +"printf('\n I3=%.0f A \n',(110-V(2))/0.1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.27: Find_current_in_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.27,Pg 2.33\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[1 0;-2 17]\n", +"B=[50;50]\n", +"V=A\B\n", +"printf('\n V1=%.0f V \n',V(1))\n", +"printf('\n V2=%.2f V \n',V(2))\n", +"printf('\n Current in the 10 ohms resistor = %.2f A\n',V(2)/10)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.28: Find_V1_and_V2.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Example 2.28,Pg 2.33\n", +"clc;\n", +"disp('Refer to diagram shown in the diagram')\n", +"A=[6 -5 0;-10 17 -5;0 0 1]\n", +"B=[-20;0;20]\n", +"V=A\B\n", +"printf('\n Va=%.2f V \n',V(1))\n", +"printf('\n Vb=%.2f V \n',V(2))\n", +"printf('\n Vc=%.0f V \n',V(3))\n", +"printf('\n V1=%.2f V \n',V(1)-V(2))\n", +"printf('\n V2=%.2f V \n',V(2)-V(3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.29: Find_voltage_across_the_100_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.29,Pg 2.33\n", +"clc;\n", +"disp('Refer to the figure shown in the diagram')\n", +"A=[1 0 0;-1 3 -1;-2 -5 10]\n", +"B=[60;12;24]\n", +"V=A\B\n", +"printf('\n Voltage across the 100 ohms resistor=%.2f V\n',V(3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Equivalent_resistance.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex 2.2,Pg 2.5\n", +"function [resistance_1] = deltatostar(R)\n", +"resistance1=R1\n", +"resistance2=R2\n", +"resistance_1= (resistance1*resistance2)/R\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the diagram shown in the problem')\n", +"R1=10 //Resistance in ohms\n", +"R2=10 //Resistance in ohms\n", +"R3=10 //Resistance in ohms\n", +"R=R1+R2+R3\n", +"Ra=deltatostar(R) //Converting the delta network to star network of resistances. All the resistances in the star network will be the same as the resistances in the delta network have the same value\n", +"R_1= 1/(1/(Ra+10) + 1/(Ra+10))\n", +"R_eq=Ra+R_1\n", +"printf('\n The equivalent resistance R= %.0f ohms\n',R_eq)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.30: Find_current_through_the_4_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.30,Pg2.34\n", +"clc;\n", +"disp('Refer to the figure shown in the diagram')\n", +"A=[1 -1;2 1]\n", +"B=[6;28]\n", +"V=A\B\n", +"printf('\n V1=%.2f V\n',V(1))\n", +"printf('\n V2=%.2f V\n',V(2))\n", +"printf('\n Current through the 4 ohms resistor=%.2f\n',V(2)/4)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.31: Find_current_through_the_4_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Example 2.31,Pg2.35\n", +"clc;\n", +"disp('Refer to the figure shown question')\n", +"A=[1 0 -1;2 -2 1;-5 7 0]\n", +"B=[8; -12; 80]\n", +"V=A\B\n", +"printf('\n V1=%.0f V \n',V(1))\n", +"printf('\n V2=%.0f V \n',V(2))\n", +"printf('\n V3=%.0f V \n',V(3))\n", +"printf('\n Current through the 4 ohms resistor= %.0f A \n',V(3)/4)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Equivalent_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex 2.3,Pg 2.7\n", +"function [resistance_1] = startodelta(R)\n", +" resistance_1= (R1*R + R2*R + R1*R2)/R\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"R1=6 //One of the Resistances of the star network to be converted into delta\n", +"R2=4 //One of the Resistances of the star network to be converted into delta \n", +"R3=3\n", +"//To find out individual resistances of the star network\n", +"Ra=startodelta(R3)\n", +"R3=4\n", +"R2=3\n", +"Rb=startodelta(R3)\n", +"R3=6\n", +"R1=4\n", +"Rc=startodelta(R3)\n", +"R_1= 1/((1/Ra) + (1/9))\n", +"R_2= 1/((1/Rb)+(1/1.5))\n", +"R_eq= 1/((1/6) + (1/(R_2+0.9)))\n", +"printf('\n Equivalent resistance R= %.2f ohms\n',R_eq) //Equivalent resistance of the circuit\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.42: Find_the_current_between_the_2_ohm_resistor_connected_btw_A_and_B.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.42,Pg2.53\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"A=[14 -12;-12 16] //Apply KVL theorem to obtain the required result\n", +"B=[2;-4]\n", +"I=A\B\n", +"Vth=3*I(2)+4 //Thevenin voltage\n", +"printf('\n Vth=%.1f \n',Vth)\n", +"R1=((2*12)/(2+12))+1\n", +"Rth=R1*3/(R1+3)\n", +"Iload=Vth/(Rth+2)\n", +"printf('\n Il=%.2f \n',Iload)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.43: Find_the_current_through_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Example2.43,Pg 2.54\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"A=[7 -1;1 -6]\n", +"B=[10;0]\n", +"I=A\B\n", +"Vth=(3*I(2))-20\n", +"printf('\n Vth=%.2f V \n',Vth)\n", +"R1=[((6*1)/(6+1))+2]\n", +"Rth=R1*3/(R1+3)\n", +"printf('\n Rth=%.2f A \n',Rth)\n", +"Il=Vth/(Rth+10)\n", +"printf('\n The value of load current = %.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.44: Find_the_current_through_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Example 2.44<pg2.55\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"//It can found out by looking at the figure that I1=10A\n", +"I2=100/50 //Applying KVL\n", +"Vth=(5*10)-(20*I2)\n", +"Rth=5+(20*30/(20+30))\n", +"Iload=10/(Rth+10)\n", +"printf('\n Rth=%.0f ohms\n',Rth)\n", +"printf('\n Il=%.2f A\n',Iload)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.45: Find_the_current_through_the_40_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex45,Pg2.56\n", +"//Since the 20 ohms resistor is connected across the 25V source,the resistor becomes redundant\n", +"I=35/60\n", +"Vth=(10*I)-10\n", +"printf('\n Vth=%.1f V \n',Vth)\n", +"Rth=50*10/(50+10)\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"Il=Vth/(Rth+40)\n", +"printf('\n Iload=%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.46: Find_the_current_through_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.46,Pg2.57\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"I1=50/10\n", +"I2=20/20\n", +"Vth=(4*I1)+2-(15*I2)\n", +"printf('\n Vth=%.0f V \n',Vth)\n", +"Rth=(6*4/(6+4))+(5*15/(5+15))\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"Il=7/(Rth+10)\n", +"printf('\n Iload=%.2f \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.47: Find_current_through_the_24_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.47,Pg2.58\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"I1=220/(30+50)\n", +"I2=220/(20+5)\n", +"printf('\n I1=%.2f A \n',I1)\n", +"printf('\n I2=%.2f A \n',I2)\n", +"Vth=(20*I2)-(30*I1)\n", +"printf('\n Vth=%.1f V \n',Vth)\n", +"Rth=(30*50/(30+50))+(20*5/(20+5))\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"Il=Vth/(Rth+24)\n", +"printf('\n Iload=%.0f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.49: Find_the_current_through_the_20_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.49,Pg2.61\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"A=[30 -15;-15 20]\n", +"B=[-75;20]\n", +"I=A\B\n", +"printf('\n I1=%.1f A \n',I(1))\n", +"printf('\n I2=%.1f A \n',I(2))\n", +"Vth=45-(10*(I(1)-I(2))) //Thevenin Voltage\n", +"printf('\n Vth =%.0f V \n',Vth)\n", +"//Converting the delta formed by the resistances into star network\n", +"R1=10*5/(10+5+5)\n", +"R2=10*5/(10+5+5)\n", +"R3=5*5/(10+5+5)\n", +"Rth=((R3+15)*2.5/(R3+15+2.5))+2.5\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"Il=Vth/(Rth+20)\n", +"printf('\n Iload=%.2f A \n',Il)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Equivalent_resistance.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.4,Pg 2.8\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"R=6+6+6 //Total resistance of the delta network in the left part of the circuit\n", +"r1=6*6/(R) //Delta to star conversion\n", +"R=15+15+15 //Total resistance of the delta network in the right part of the circuit\n", +"r2=15*15/R\n", +"R_1=1/(1/(r1+41+r2) + 1/(r1+17+r2))\n", +"R_eq=R_1+r1+r2\n", +"printf('\n The equivalent resistance R = %.0f ohms\n',R_eq)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.50: Find_the_current_through_the_3_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2.Ex2.50,Pg 2.63\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"//Simultaneous equations have been found by applying Kirchoff's Laws to the meshes\n", +"A=[1 0;-12 18]\n", +"B=[6;42]\n", +"I=A\B\n", +"Vth=6*I(2)\n", +"printf('\n Vth=%.0f V \n ',Vth)\n", +"Rth=6*12/(6+12) //Thevenin resistance of the network\n", +"Il=Vth/(Rth+3)\n", +"printf('\n Iload= %.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.51: Find_the_current_through_the_30_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.51,Pg2.64\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[-1 1;15 100]\n", +"B=[13;150]\n", +"I=A\B\n", +"printf('\n I1=%.0f A \n',I(1))\n", +"printf('\n I2=%.0f A \n',I(2))\n", +"Vth=(40*I(2))-50\n", +"printf('\n Vth=%.0f V \n',Vth)\n", +"Rth=75*40/(75+40)\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"Il=Vth/(Rth+30)\n", +"printf('\n Iload=%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.53: Find_the_current_through_the_20_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.53,Pg2.66\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"//Applying Kirchoff's laws to mesh 1 and mesh 2 we can state the following\n", +"I1=10/(10+4) //Current in amperes\n", +"I2=2 //Current in amperes\n", +"printf('\n I1=%.2f A \n',I1)\n", +"printf('\n I2=%.0f \n',I2)\n", +"vth=(4*I1)+(8*I2)\n", +"printf('Vth=%.2f V \n',vth)\n", +"//Calculation of Rth\n", +"//From the figure it can be seen that Rth can be easily calculated to be the following \n", +"Rth=(10*4/(10+4))+8\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"//Calculation of load current\n", +"Il=vth/(Rth+20)\n", +"printf('\n Iload=%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.54: Find_the_current_through_the_5_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.54,Pg2.67\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"//Remove the 5 ohms resistor from the network and apply Kirchoff's laws\n", +"A=[14 -2;-2 5]\n", +"B=[150;50]\n", +"I=A\B\n", +"printf('\n I1=%.2f A \n',I(1))\n", +"printf('\n I2=%.2f A \n',I(2))\n", +"//Calculation of Thevenin Voltage\n", +"Vth=100-(10*I(1))\n", +"printf('\n Vth=%.2f V \n',Vth)\n", +"//Calculation of Thevenin Current\n", +"Rth=10*3.2/(10+3.2)\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"//Calculation of load current\n", +"Il=Vth/(Rth+5)\n", +"printf('\n Iload =%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.55: Find_the_current_through_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.55,Pg2.68\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"//Calculation of Vth\n", +"//The network is divided into meshes and Kirchoff's laws are applied to the meshes to obtain simultaneous equations\n", +"A=[4 -2;-1 4]\n", +"B=[-25;10]\n", +"I=A\B\n", +"printf('\n I1=%.0f A \n',I(1))\n", +"printf('\n I2=%.0f A \n',I(2))\n", +"Vth=(2*I(1))+(2*I(2))\n", +"printf('\n Vth=%.0f V \n',Vth)\n", +"//Calculation of Rth\n", +"//Convert star resistances formed by 2 ohms, 2 ohms and 1 ohm into an equivalent delta network\n", +"R1=2*2/(2+2+1)\n", +"R2=R1 //R1=R2 since the resistances are of equal value\n", +"R3=2*1/(2+1+2)\n", +"Rth=8*(2*(4*1/(4+1)))/(8+(2*(4*1/(4+1))))\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"//Calculation of load current\n", +"Il=Vth/(Rth+10)\n", +"printf('\n Il=%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.56: Find_current_through_the_1_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.56,Pg2.71\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"//Remove the 1 ohm resistor from the meshes 1 and 2, then we can say the following about the current\n", +"I1=-3 //Current in amperes\n", +"I2=1 //Current in amperes\n", +"printf('\n I1=%.0f A \n',I1)\n", +"printf('\n I2=%.0f A \n',I2)\n", +"//Calculation of Vth\n", +"Vth=4-2*(I1-I2)\n", +"printf('\n Vth=%.2f V \n',Vth)\n", +"//Calculation of Rth\n", +"//It can be easily deduced by looking at the diagram that Rth=2 ohms\n", +"Rth=2\n", +"//Calculation of load current\n", +"Il=Vth/(Rth+1)\n", +"printf('\n Il=%.0f A \n',Il)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.57: Find_current_in_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.57,Pg2.73\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"A=[1 0 0;0 -1 1;0 -5 -15]\n", +"B=[2;4;0]\n", +"I=A\B\n", +"printf('\n I1=%.0f A \n',I(1))\n", +"printf('\n I2=%.0f A \n',I(2))\n", +"printf('\n I3=%.0f A \n',I(3))\n", +"printf('\n In=%.0f A \n',(I(1)-I(2)))\n", +"//Calculation of Rn\n", +"//Replace the voltage sources by open circuit and current sources by short circuit\n", +"Rn=1*(5+15)/(1+5+15)\n", +"printf('\n Rn=%.2f ohms \n',Rn)\n", +"Il=(5*Rn)/(10+Rn) //Using current division formula\n", +"printf('\n Il = %.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.58: Find_current_in_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.58,Pg 2.74\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[7 -2;-2 10]\n", +"B=[20;-12]\n", +"I=A\B\n", +"printf('\n I2= %.2f A \n',I(2))\n", +"printf('\n In=%.2f A \n',-I(2))\n", +"//Calculation of Rn\n", +"Rn=(5*2/(5+2))+8\n", +"printf('\n Rn=%.2f ohms \n',Rn)\n", +"//Calculation of Il\n", +"Il=0.67*(Rn/(Rn+10)) //Current is short circuit current calculated\n", +"printf('\n Il=%.2f A \n',Il)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.59: Find_the_current_through_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.59,Pg2.75\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[70 -20;-20 20]\n", +"B=[40;0]\n", +"I=A\B\n", +"printf('\n I1=%.0f A \n',I(1))\n", +"printf('\n I2 =%.1f A \n',I(2))\n", +"printf('\n In = %.1f A \n',I(2))\n", +"//Calculation of Rn\n", +"Rn=(50*20/(50+20)) //Resistance of 40 ohms gets shorted because it is connected across a short circuit\n", +"printf('\n Rn=%.2f ohms \n',Rn)\n", +"//Calculation of Il\n", +"Il=(1.5*14.28/(14.28+10))\n", +"printf('\n Il=%.2f A \n',Il)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.60: Find_current_through_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.60,Pg2.76\n", +"clc;\n", +"disp('Refer to diagram shown in the question')\n", +"A=[-7 1 0;-1 6 -3;0 3 -3]\n", +"B=[-10;0;20]\n", +"I=A\B\n", +"printf('\n I3=%.2f A \n',I(3))\n", +"printf('\n In= %.2f A \n',-I(3))\n", +"Rn=[(6*1/(6+1)+2)]*3/(3+[(6*1/(6+1)+2)])\n", +"printf('\n Rn=%.2f A \n',Rn)\n", +"//Calculation of Il\n", +"Il=13.17*(1.46/(1.46+10))\n", +"printf('\n Il=%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.61: Find_current_in_the_10_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2,Ex2.61,Pg2.77\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[20 -20 0;-20 60 -20;0 -20 50]\n", +"B=[10;40;-100]\n", +"I=A\B\n", +"printf('\n I1=%.2f A \n',I(1))\n", +"printf('\n In=%.2f A \n',I(1))\n", +"//Calculation of Rn\n", +"Rn=[(20*30/(20+30))+20]*20/(20+[(20*30/(20+30))+20])\n", +"printf('\n Rn=%.1f ohms \n',Rn)\n", +"//Calculation of Il\n", +"Il=I(1)*Rn/(Rn+10)\n", +"printf('\n Il=%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.62: Nortons_equivalent.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.62,Pg2.77\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[90 -60 0;-60 100 -30;0 30 -30]\n", +"B=[120;40;-10]\n", +"I=A\B\n", +"printf('\n I3=%.2f A \n',I(3))\n", +"printf('\n In=%.2f A \n',-I(3))\n", +"//Calculation of RN\n", +"Rn=[(30*60/(30+60))+10]*30/(30+[(30*60/(30+60))+10])\n", +"printf('\n Rn=%.0f ohms \n',Rn)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.63: Find_current_through_the_8_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.63,Pg2.79\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[-1 1;12 0]\n", +"B=[2;55]\n", +"I=A\B\n", +"printf('\n I1=%.2f A \n',I(1))\n", +"printf('\n I2=%.2f A \n',I(2))\n", +"printf('\n In=%.2f A \n',I(2))\n", +"//Calculation of Rn\n", +"Rn=12*4/(12+4)\n", +"printf('\n Rn=%.0f ohms \n',Rn)\n", +"//Calcuation of Il\n", +"Il=6.58*Rn/(Rn+8)\n", +"printf('\n Il=%.2f A \n',Il)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.64: Find_current_through_the_1_ohm_resistor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.64,Pg2.80\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[0 -5 -2;0 4 -2;-2 -2 4]\n", +"B=[-2;-1;0]\n", +"I=A\B\n", +"printf('\n I1=%.2f A \n',I(1))\n", +"printf('\n I2=%.2f A \n',I(2))\n", +"printf('\n I3=%.2f A \n',I(3))\n", +"printf('\n In=%.2f A \n',I(3))\n", +"//Calculation of Rn\n", +"Rn=(2*3/(2+3))+(2*2/(2+2))\n", +"printf('\n Rn=%.1f ohms \n',Rn)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.65: Find_max_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.65,Pg2.82\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"I=-3/4\n", +"printf('\n I=%.2f A \n',I)\n", +"Vth=6+2*I-10\n", +"printf('\n Vth=%.1f V \n',Vth)\n", +"//Calculations Rth\n", +"Rth=(2*2/(2+2))+2\n", +"printf('\n Rth=%.0f ohms \n',Rth)\n", +"//Value of Rl\n", +"Pmax=(Vth*Vth/(4*Rth))\n", +"printf('\n Pmax=%.2f W \n',Pmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.66: Find_max_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.66,Pg2.83\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"//Calculation og Vth\n", +"A=[-1 1;-6 -5]\n", +"B=[4;2]\n", +"I=A\B\n", +"printf('\n I1=%.0f A \n',I(1))\n", +"printf('\n I2=%.0f A \n',I(2))\n", +"Vth=8-I(1)\n", +"printf('\n Vth=%.0f V \n',Vth)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.67: Find_max_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.67,Pg2.84\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"A=[1 0;5 -10]\n", +"B=[50;0]\n", +"I=A\B\n", +"printf('\n I1=%.0f A \n',I(1))\n", +"printf('\n I2=%.0f A \n',I(2))\n", +"Vth=3*I(2)\n", +"printf('\n Vth=%.0f V \n',Vth)\n", +"//Calculation of Rth\n", +"Rth=(7*3/(7+3))\n", +"printf('\n Rth=%.1f \n',Rth)\n", +"//For maximum power transfer the value of the load resistance should be equal to the value of the Thevenin resistance\n", +"Pmax=(Vth*Vth)/(4*Rth)\n", +"printf('\n Pmax=%.2f W \n',Pmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.68: Find_Rl_and_calculate_maximum_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Example2.68,Pg2.85\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[-1 1;5 2]\n", +"B=[6;10]\n", +"I=A\B\n", +"printf('\n I1=%.2f A \n',I(1))\n", +"printf('\n I2=%.2f A \n',I(2))\n", +"//Calculation of Vth\n", +"Vth=2*I(2)\n", +"printf('\n Vth=%.2f V \n',Vth)\n", +"//Calculation of Rth\n", +"Rth=(5*2/(5+2))+3+4\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"//For maximum power transfer the load resistance should be equal to the Thevenin resistance\n", +"Pmax=(Vth*Vth/(4*Rth))\n", +"printf('\n Pmax=%.2f W \n',Pmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.69: Find_Rl_and_calculate_max_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2, Example2.69,Pg2.85\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[15 -5;0 1]\n", +"B=[120;-6]\n", +"I=A\B\n", +"printf('\n I1=%.0f A \n',I(1))\n", +"printf('\n I2=%.0f A \n',I(2))\n", +"Vth=120-10*I(1) //Thevenin Voltage\n", +"printf('\n Vth =%.0f V \n',Vth)\n", +"//Calculation of Rth\n", +"Rth=(10*5/(10+5))\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"//For maximum power transfer load resistance should be equal to thevenin resistance\n", +"Pmax=(Vth*Vth/(4*Rth))\n", +"printf('\n Pmax=%.2f W \n',Pmax)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Equivalent_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter2, Ex2.6,Pg 2.11\n", +"function [R] = deltatostar(R1,R2,R3,n)\n", +" Rtotal=R1+R2+R3\n", +" if(n==1)then\n", +" R=R1*R2/Rtotal\n", +" elseif(n==2)\n", +" R=R2*R3/Rtotal\n", +" else\n", +" R=R1*R3/Rtotal\n", +" end\n", +"endfunction\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"\n", +"r1=deltatostar(20,5,15,1) //Converting delta network to star network\n", +"r3=deltatostar(20,5,15,2)\n", +"r2=deltatostar(20,5,15,3)\n", +"r1'=r1\n", +"R1=r3+2\n", +"R2=r2+30\n", +"r1=deltatostar(R1,R2,30,1)\n", +"r2=deltatostar(R1,R2,30,2)\n", +"r3=deltatostar(R1,R2,30,3)\n", +"Req=1/(1/(r1'+r1+10) + 1/(15+r3)) + r2\n", +"printf('\n The equivalent resistance R= %.2f ohms\n',Req)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.70: Find_Rl_and_max_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.70,Pg2.87\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"A=[1 0;-25 41]\n", +"B=[3;0]\n", +"I=A\B\n", +"printf('\n I1= %.0f A \n',I(1))\n", +"printf('\n I2= %.0f A \n',I(2))\n", +"Vth=-20+10*I(2)+6*I(2)\n", +"printf('\n Vth=%.2f V \n',Vth)\n", +"//Calculation of Rth\n", +"Rth=(25*16/(25+16))\n", +"printf('\n Rth= %.2f ohms \n',Rth)\n", +"//For maximum power transfer the load resistance should be equal to the Thevenin resistance\n", +"Pmax=(Vth*Vth/(4*Rth))\n", +"printf('\n Pmax=%.2f W \n',Pmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.71: Max_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.71,Pg2.88\n", +"clc;\n", +"disp('Refer to the diagram shown in the question')\n", +"A=[-1 1 0;1 10 -10;0 -10 15]\n", +"B=[1;5;0]\n", +"I=A\B\n", +"printf('\n I1=%.2f A \n',I(1))\n", +"printf('\n I2=%.2f A \n',I(2))\n", +"printf('\n I3=%.2f A \n',I(3))\n", +"//Calculation of Vth\n", +"Vth=3*I(3)\n", +"printf('\n Vth=%.2f V \n',Vth)\n", +"//Calculation of Rth\n", +"Rth=[(10*1/(10+1))+2]*3/(3+[(10*1/(10+1))+2]) + 5\n", +"printf('\n Rth=%.2f ohms \n',Rth)\n", +"//Calculation of Pmax\n", +"Pmax=(Vth*Vth/(4*Rth))\n", +"printf('\n Pmax=%.2f W \n',Pmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: Equivalent_resistance.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.7,Pg2.13\n", +"function [r_1] = startodelta(r1,r2,r3) //Function that converts star network to equivalent delta network\n", +" r_1=ones(1:3)\n", +" Rtotal=(r1*r3 + r2*r3 + r1*r2)\n", +" r_1(1)=Rtotal/r1\n", +" r_1(2)=Rtotal/r2\n", +" r_1(3)=Rtotal/r3\n", +"endfunction\n", +"function[r_2]=deltatostar(r1,r2,r3) //Function that converts delta network to equivalent star network\n", +" Rtotal=r1+r2+r3\n", +" r_2=ones(1:3)\n", +" r_2(1)=r1*r2/Rtotal\n", +" r_2(2)=r2*r3/Rtotal\n", +" r_2(3)=r1*r3/Rtotal\n", +" endfunction\n", +"clc;\n", +"disp('refer to the figure shown in the diagram')\n", +"R=startodelta(8,5,3)\n", +"R_1=R(2)*5/(R(2)+5) //Parallel combination of resistances\n", +"R_2=R(3)*4/(R(3)+4) //Parallel combination of resistances\n", +"R1=deltatostar(R_1,R(1),R_2)\n", +"Req=1/(1/(6+R1(1)) + 1/(4+R1(2))) +R1(3)\n", +"printf('\n The equivalent resistance R= %.2f ohms\n',Req) " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: Find_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 2,Ex2.9,Pg 2.18\n", +"clc;\n", +"disp('Refer to the diagram shown in the figure')\n", +"A=[10 -3 -6;-3 10 0;-6 0 10]\n", +"B=[10; -5; 25]\n", +"I=A\B\n", +"printf('\n Current through the 5 ohms resistor=%.2f A\n',I(2))\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/3-AC_Fundamentals.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/3-AC_Fundamentals.ipynb new file mode 100644 index 0000000..352d4ae --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/3-AC_Fundamentals.ipynb @@ -0,0 +1,378 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: AC Fundamentals" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: Time_at_which_current_attain_a_particular_value.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10,Chapter 3\n", +"//(i)\n", +"clc;\n", +"Ieff=7.071/sqrt(2)\n", +"Irms=Ieff\n", +"Im=5*sqrt(2)\n", +"//(ii)\n", +"f=(157.08)/(2*%pi)\n", +"T=(1/f)\n", +"printf('\n T=%.2f s \n',T)\n", +"//(iii)\n", +"t=(asin((7.071/7.071))+0.785)/157.08\n", +"printf('\n t=%.3f s \n',t)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15: Form_factor_Frequence_and_Crest_Factor.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 15,Chapter 3\n", +"clc;\n", +"f=(314/(2*%pi))\n", +"printf('\n f=%.0f Hz \n',f)\n", +"disp('For a sinusoidal waveform')\n", +"disp('Vavg=2Vm/pi')\n", +"disp('Vrms=Vm/sqrt(2)')\n", +"//(ii)\n", +"disp('kf=Vrms/Vavg')\n", +"kf=%pi/(2*sqrt(2))\n", +"printf('\n kf=%.2f \n',kf)\n", +"//(iii)\n", +"disp('kp=Vm/Vrms')\n", +"kp=sqrt(2)\n", +"printf('\n kp=%.3f \n',kp)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16: RMS_value_and_maximum_value.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 16,Chapter 3\n", +"kf=1.2 //Form factor\n", +"kp=1.5 //Peak factor\n", +"Vavg=10\n", +"//(i)\n", +"Vrms=kf*Vavg\n", +"printf('\n Vrms=%.0f V \n',Vrms)\n", +"//(ii)\n", +"Vm=kp*Vrms\n", +"printf('\n Vm=%.0f V \n',Vm)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17: Average_value_and_RMS_value_of_voltage.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 17,Chapter 3\n", +"kf=1.15\n", +"kp=1.5\n", +"Vm=4500\n", +"//(i)\n", +"Vrms=Vm/kp\n", +"printf('\n Vrms=%.0f V \n',Vrms)\n", +"//(ii)\n", +"Vavg=Vrms/kf\n", +"printf('\n Vavg=%.1f V \n',Vavg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Mean_value_of_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3,Ex3.1,Pg3.4\n", +"clc;\n", +"Im=15/(sin(2*%pi*3.375*0.001*40))\n", +"printf('\n Im=%.0f A \n',Im)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Time_at_which_current_attain_a_particular_value.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 3,Ex3.2,Pg3.4\n", +"clc;\n", +"//(a)\n", +"//Given that f=50c/s and Im=100A\n", +"i=100*sin(2*%pi*50*(1/600))\n", +"printf('\n Instantaneous value of current i=%.0f A \n',i)\n", +"//(b)\n", +"t=(asin(60*%pi)/180)/(100*180)\n", +"printf('\n t=%.4f sec \n',t)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Time_at_which_current_attain_a_particular_value.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"f=50 //Frequence in hertz\n", +"Irms=20 //Rms current in amperes\n", +"Im=Irms*sqrt(2)\n", +"disp('(i)')\n", +"printf('\n Im=%02f A \n',Im)\n", +"t=0.0025 //Time in seconds\n", +"i=Im*sin(2*%pi*f*t)\n", +"disp('(ii)')\n", +"printf('\n i=%.0f \n',i)\n", +"t=0.0125\n", +"i=Im*sin(2*%pi*f*t)\n", +"disp('(iii)')\n", +"printf('\n i=%.0f \n',i)\n", +"i1=14.14/Im\n", +"disp(i1)\n", +"i2=asin(i1)\n", +"i2=i2*180/%pi\n", +"disp(i2)\n", +"i=i2/(2*180*f)\n", +"printf('\n i=%.2f \n ms',i*10^3)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Time_at_which_current_attain_a_particular_value.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"f=60\n", +"Im=110\n", +"disp('(i)')\n", +"t1=90/Im\n", +"t2=asin(t1)\n", +"disp(t2)\n", +"t2=t1*180/%pi\n", +"disp(t2)\n", +"t=t1/21600\n", +"printf('\n t=%.2f ms \n',t*10^3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Time_at_which_current_attain_a_particular_value.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5,Chapter 3\n", +"clc;\n", +"f=50 //Frequency in hertz\n", +"Im=9.2 //Current in amperes\n", +"//(i)\n", +"t=0.002\n", +"i=Im*sin(2*%pi*f*t)\n", +"printf('\n Instantaneous value of current=%.2f A \n',i)\n", +"//(ii)\n", +"t=0.0045\n", +"t=(1/(4*f))+0.0045\n", +"i=Im*sin(2*%pi*f*t)\n", +"printf('\n Instantaneous Value=%.2f A \n',i)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Time_at_which_current_attain_a_particular_value.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example6, Chapter 3\n", +"clc;\n", +"f=50\n", +"Irms=20\n", +"//(i)\n", +"Im=Irms*sqrt(2)\n", +"i=10*sqrt(2)\n", +"ans=asin(i/Im)\n", +"ans=ans*180/%pi\n", +"t= ans/(2*180*f)\n", +"printf('\n t=%.0f ms \n',t*10^3)\n", +"//(ii)\n", +"t=(1/(4*f))+t\n", +"printf('\n t=%.2f ms \n',t)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: Time_at_which_current_attain_a_particular_value.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8,Chapter 3\n", +"clc;\n", +"f=50\n", +"Irms=10 //Current in amperes\n", +"//(i)\n", +"Im=Irms*sqrt(2)\n", +"disp('14.14sin(18000t)')\n", +"//(ii)\n", +"t=0.0025\n", +"t=(1/(4*f)) + t\n", +"printf('\n t=%.1f ms \n',t*10^3)\n", +"i=14.14*sin(18000*7.5*10^-3)\n", +"printf('\n i=%.0f A \n',i)\n", +"//(ii)\n", +"t=0.0075\n", +"t=(1/(2*f))+t\n", +"printf('\n t=%.1f ms \n',t*10^3)\n", +"i=14.14*sin(18000*t*10^-3)\n", +"printf('\n i=%.0f A \n',i)\n", +"\n", +"\n", +"\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/4-Three_Phase_Circuits.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/4-Three_Phase_Circuits.ipynb new file mode 100644 index 0000000..1630690 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/4-Three_Phase_Circuits.ipynb @@ -0,0 +1,757 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Three Phase Circuits" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: Calculation_of_phase_resistance_and_phase_impedance.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"clc\n", +"//Refer to the data given in the question\n", +"Vl=208 //Line voltage\n", +"P=1800 //Active power\n", +"Il=10 //Line current\n", +"Vph=Vl/sqrt(3)\n", +"printf('\n Vph=%.2f V \n',Vph)\n", +"Iph=Il \n", +"Zph=Vph/Iph\n", +"printf('\n Zph=%.2f ohms \n',Zph)\n", +"//Since the active power,line voltage and line current are given, the power factor can be calculated easily\n", +"pf=P/(sqrt(3)*Vl*Il)\n", +"printf('\n Power factor=%.2f \n',pf)\n", +"phi=acos(pf)\n", +"phi=phi*180/%pi\n", +"printf('\n phi=%.0f degrees \n',phi)\n", +"Rph=Zph*pf\n", +"printf('\n Rph=%.2f ohms \n',Rph)\n", +"Xph=Zph*sqrt(1-pf^2)\n", +"printf('\n Xph=%.2f ohms \n',Xph)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: Calculation_of_phase_resistance_and_phase_reactance.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 4,Ex4.1,Pg 4.8\n", +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"clc;\n", +"//Refer to the data given in the question\n", +"Vl=400 //Supply voltage\n", +"Il=34.65 //Current in Amperes\n", +"P=14.4*10^3 //Active power in volts\n", +"Vph=Vl\n", +"Iph=Il/sqrt(3)\n", +"printf('\n Iph=%.0f A \n',Iph)\n", +"Zph=Vph/Iph\n", +"printf('\n Zph=%.0f ohms \n',Zph)\n", +"//We can calculate the power factor easily from the given data\n", +"pf=P/(sqrt(3)*400*34.65)\n", +"printf('\n Power factor=%.1f \n',pf)\n", +"phi=acos(pf)\n", +"phi=phi*180/%pi\n", +"printf('\n phi=%.2f degrees \n',phi)\n", +"Rph=Zph*pf\n", +"printf('\n Rph=%.0f ohms \n',Rph)\n", +"Xph=Zph*sqrt(1-pf^2)\n", +"printf('\n Xph=%.0f ohms \n',Xph)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14: Calculation_of_Q.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"clc\n", +"//Refer to the data given in the question\n", +"P=10.44*10^3 //Power in kWh\n", +"Vl=200 //Line voltage\n", +"pf=0.5 //Leading power factor\n", +"Vph=Vl //For delta connected load\n", +"//Since we have the value of active power,line voltage and power factor we can easily calculate the value of line current\n", +"Il=P/(sqrt(3)*Vl*pf)\n", +"printf('\n Il=%.2f A \n',Il)\n", +"Iph=Il/sqrt(3)\n", +"printf('\n Iph=%.1f A \n',Iph)\n", +"Zph=Vph/Iph\n", +"printf('\n Zph=%.2f ohms \n',Zph)\n", +"Rph=Zph*pf\n", +"printf('\n Rph=%.3f ohms \n',Rph)\n", +"Xph=Zph*(sqrt(1-pf^2))\n", +"printf('\n Xph=%.2f ohms \n',Xph)\n", +"Q=sqrt(3)*Vl*Il*sqrt(1-pf^2)\n", +"printf('\n Q=%.2f kVAR \n',Q*10^-3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17: Calculation_of_active_and_reactive_components_of_phase_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"clc\n", +"Po=200*10^3 //Output Power \n", +"f=50 //frequency in hertz\n", +"Vl=440\n", +"n=91 //efficiency\n", +"pf=0.86\n", +"Vph=Vl //For a delta connected load\n", +"//Since the efficiency and output power have been given in the question, the input power can be easily calculated\n", +"Pi=(Po/n)*100\n", +"printf('\n Input power=%.2f kW \n',Pi*10^-3)\n", +"//Since the input power is now known we can calculate the line current\n", +"Il=Pi/(sqrt(3)*Vl*pf)\n", +"printf('\n Il=%.1f A \n',Il)\n", +"Iph=Il/sqrt(3)\n", +"printf('\n Iph=%.1f A \n',Iph)\n", +"apc=Iph*pf //Active component of phase current\n", +"printf('\n Active component of phase current=%.1f A \n',apc)\n", +"rpc=Iph*sqrt(1-pf^2)\n", +"printf('\n Reactive component of phase current=%.1f A \n',rpc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: Calculation_of_Z.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 4,Ex4.1,Pg 4.8\n", +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta) //Function to convert polar coordinates to rectangular coordinates\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"clc;\n", +"//Refer to the data given in the question\n", +"Vl=440 //Supply voltage\n", +"f=50 //Freq in hertz\n", +"Vph=Vl/sqrt(3) //Phase voltage\n", +"printf('\n Vph=%.2f V \n',Vph)\n", +"Zbarph=rect2polar(8,10) //Converting Zbarph from rectangular coordinates to polar coordinates\n", +"printf('\n r=%.2f \n',Zbarph(1))\n", +"printf('\n theta=%.2f \n',Zbarph(2))\n", +"Iph=Vph/Zbarph(1) //Phase current\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"Il=Iph //Line current\n", +"P=sqrt(3)*Il*Vl*cos(Zbarph(2)*%pi/180)\n", +"P=P*(10^-3) //Active power\n", +"Q=sqrt(3)*Vl*Il*sin(Zbarph(2)*%pi/180)\n", +"Q=Q*(10^-3) //Reactive power\n", +"printf('\n P=%.2f kW \n',P)\n", +"printf('\n Q=%.2f kVAR \n',Q)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.20: Calculation_of_P.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"Vl=400 //Three phase supply voltage\n", +"Zph=100 //Impedance in ohms\n", +"Vph=Vl/sqrt(3) //For a star connected load\n", +"printf('\n Vph=%.2f V \n',Vph)\n", +"Iph=Vph/Zph\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"Il=Iph\n", +"pf=1\n", +"P=sqrt(3)*Vl*Il*pf\n", +"printf('\n P=%.1f W \n',P)\n", +"Vph=Vl //For a delta connected load\n", +"Iph=Vph/Zph\n", +"printf('\n Iph=%.0f A \n',Iph)\n", +"Il=sqrt(3)*Iph\n", +"printf('\n Il=%.2f A \n',Il)\n", +"P=sqrt(3)*Vl*Il*pf\n", +"printf('\n P=%.2f W \n',P)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Calculation_of_Z.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y)\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta)\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"//Refer to the data given in the question\n", +"clc;\n", +"Vl=230 //Line voltage in volts\n", +"f=50 //freq in hertz\n", +"Vph=Vl\n", +"Zbarph=rect2polar(8,-6)\n", +"r=Zbarph(1)\n", +"printf('\n r=%.0f \n',r)\n", +"phi=Zbarph(2)\n", +"printf('\n phi=%.2f degrees \n',Zbarph(2))\n", +"pf=cos(phi*%pi/180)\n", +"printf('\n Power factor=%.1f (leading) \n',pf)\n", +"Iph=Vph/Zbarph(1)\n", +"printf('\n Iph=%.0f A \n',Iph)\n", +"Il=sqrt(3)*Iph\n", +"printf('\n Il=%.2f A \n',Il)\n", +"Q=sqrt(3)*Vl*Il*sin(phi*%pi/180)\n", +"Q=Q*(10^-3)\n", +"printf('\n Reactive power Q=%.2f kVAR \n',Q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Calculation_of_active_power_reactive_power_and_total_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter4,Ex4.3,Pg4.9\n", +"funcprot(0)\n", +"function [polar] = rect2polar(x,y)\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta)\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"//Refer to the data given in the question\n", +"clc;\n", +"R=8 //Resistance in ohms\n", +"L=0.02 //Inductance in Henry\n", +"Vl=230 //Line voltage in volts\n", +"f=50\n", +"Vph=Vl/sqrt(3) //Phase voltage\n", +"printf('\n Vph=%.2f V \n',Vph)\n", +"Xl=2*%pi*f*L \n", +"Zbarph=rect2polar(R,Xl) //Converting rectangular coordinates to polar coordinates\n", +"r=Zbarph(1)\n", +"phi=Zbarph(2)\n", +"printf('\n Zph=%.2f ohms \n',r)\n", +"printf('\n phi=%.2f degrees \n',phi)\n", +"phi=phi*%pi/180 //Converting degrees to radians\n", +"printf('\n Power factor =%.2f (lagging) \n',cos(phi))\n", +"Iph=Vph/r\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"Il=Iph\n", +"P=sqrt(3)*Vl*Il*cos(phi)\n", +"P=P*(10^-3)\n", +"printf('\n Active power =%.2f kW \n',P)\n", +"Q=sqrt(3)*Vl*Il*sin(phi)\n", +"Q=Q*(10^-3)\n", +"printf('\n Reactive power Q=%.2f kVAR \n',Q)\n", +"S=sqrt(3)*Vl*Il\n", +"S=S*(10^-3)\n", +"printf('\n Total power =%.3f kVA \n',S)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Calculation_of_P.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta) //Function to convert polar coordinates to rectangular coordinates\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"clc\n", +"R=8 //Resistance in ohms\n", +"L=0.02 //Inductance in henry\n", +"Vl=400 //Line voltage \n", +"f=50 //Freq in hertz\n", +"Xl=2*%pi*f*L\n", +"Zbarph=rect2polar(R,Xl)\n", +"r=Zbarph(1)\n", +"phi=Zbarph(2)\n", +"printf('\n Zph=%.2f ohms \n',r)\n", +"printf('\n phi=%.2f degrees \n',phi)\n", +"phi=phi*%pi/180 //Converting degrees to radians\n", +"Iph=Vl/r\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"Il=sqrt(3)*Iph\n", +"printf('\n Il=%.2f A \n',Il)\n", +"P=sqrt(3)*Vl*Il*cos(phi) //Active power\n", +"printf('\n P=%.2f kW \n',P*(10^-3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: Calculation_of_different_powers_for_line_and_phase_voltages.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta) //Function to convert polar coordinates to rectangular coordinates\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"clc;\n", +"//Refer to the data given in the question\n", +"R=9 //resistance in ohms\n", +"Xl=12 //Reactance in ohms\n", +"f= 50// Frequence of supply in hertz\n", +"Vl=440 //Supply voltage in V\n", +"Vph=Vl //For delta connected load \n", +"Zbarph=rect2polar(9,12)\n", +"r=Zbarph(1)\n", +"phi=Zbarph(2)\n", +"printf('\n Zph=%.2f ohms \n',r)\n", +"printf('\n phi=%.2f degrees \n',phi)\n", +"phi=phi*%pi/180 //Converting degrees to radians\n", +"Iph=Vph/r\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"Il=sqrt(3)*Iph\n", +"printf('\n Il=%.1f A \n',Il)\n", +"printf('\n Power factor =%.1f (lagging) \n',cos(phi))\n", +"S=sqrt(3)*Vl*Il //Total power\n", +"printf('\n S=%.2f kVA \n',S*(10^-3))\n", +"P=sqrt(3)*Vl*Il*cos(phi)\n", +"printf('\n P=%.2f kW \n',P*(10^-3))\n", +"Q=sqrt(3)*Vl*Il*sin(phi)\n", +"printf('\n Q=%.2f kVAR \n',Q*(10^-3))\n", +"//If the coils were in star connection\n", +"Vph=Vl/sqrt(3)\n", +"printf('\n Vph=%.2f V \n',Vph)\n", +"Iph=Vph/r\n", +"Il=Iph\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"pf=cos(phi)\n", +"printf('\n Power factor=%.1f (lagging) \n',pf)\n", +"S=sqrt(3)*Vl*Il\n", +"printf('\n total power=%.2f kVA \n',S*(10^-3))\n", +"P=sqrt(3)*Iph*pf\n", +"printf('\n P=%.2f kVA \n',P*(10^-3))\n", +"Q=sqrt(3)*Vl*Iph*(sqrt(1-pf^2))\n", +"printf('\n Q=%.2f kVAR \n',Q*(10^-3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: Calculation_of_different_powers_for_line_and_phase_voltages.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta) //Function to convert polar coordinates to rectangular coordinates\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"clc\n", +"//Refer to the data given in the question\n", +"Vl=415\n", +"R=15\n", +"L=0.1\n", +"f=50\n", +"C=177*(10^-6)\n", +"Vph=Vl/sqrt(3)\n", +"Xl=2*%pi*f*L\n", +"Xc=1/(2*%pi*f*C)\n", +"Zbarph=rect2polar(R,(Xl-Xc))\n", +"r=Zbarph(1)\n", +"printf('\n Zph=%.2f ohms \n',Zbarph(1))\n", +"phi=Zbarph(2)\n", +"printf('\n phi=%.2f degrees \n',Zbarph(2))\n", +"phi=phi*%pi/180\n", +"pf=cos(phi)\n", +"printf('\n Power factor=%.3f (lagging) \n',pf)\n", +"Iph=Vph/r\n", +"printf('\n Iph=%.1f A \n',Iph)\n", +"P=sqrt(3)*Vl*Il*cos(phi)\n", +"printf('\n P=%.2f kW \n',P*(10^-3))\n", +"Q=sqrt(3)*Vl*Il*sin(phi)\n", +"printf('\n Q=%.2f kVAR \n',Q*(10^-3))\n", +"S=sqrt(3)*Vl*Il\n", +"printf('\n Total power =%.2f kVA \n',S*(10^-3))\n", +"//If the same impedance is connected in delta\n", +"Vph=Vl\n", +"Iph=Vph/r\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"Il=sqrt(3)*Iph\n", +"printf('\n Il=%.2f A \n',Il)\n", +"P=sqrt(3)*Vl*Il*cos(phi)\n", +"printf('\n P=%.2f kW \n',P*(10^-3)) " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: Calculation_of_different_powers_for_line_and_phase_voltages.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta) //Function to convert polar coordinates to rectangular coordinates\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"clc\n", +"//Refer to the data given in the question\n", +"L=50*(10^-3) //load inductance in mH\n", +"R=50 //Resistance in ohms\n", +"C=50*(10^-6) //Capacitance in microfarads\n", +"Vl=550 //Line voltage in volts\n", +"w=800 //Angular frequency\n", +"Vph=Vl //For delta connected load,phase voltage=line voltage\n", +"Xl=w*L\n", +"Xc=1/(w*C)\n", +"printf('\n Xl=%.0f ohms \n',Xl)\n", +"printf('\n Xc=%.0f ohms \n',Xc)\n", +"Zbarph=rect2polar(10,20)\n", +"r=Zbarph(1)\n", +"printf('\n Zph=%.2f \n',r)\n", +"printf('\n phi=%.2f \n',Zbarph(2))\n", +"Iph=Vph/r\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"pf=cos(Zbarph(2)*%pi/180)\n", +"printf('\n Power factor=%.3f (lagging) \n',pf)\n", +"Il=sqrt(3)*Iph\n", +"P=sqrt(3)*Vl*Il*pf\n", +"printf('\n P=%.2f kW \n',P*(10^-3))\n", +"Q=sqrt(3)*Vl*Il*sin(Zbarph(2)*%pi/180)\n", +"printf('\n Q=%.1f kVAR \n',Q*(10^-3))\n", +"S=sqrt(3)*Vl*Il\n", +"printf('\n S=%.2f kVA \n',S*(10^-3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: Calculation_of_P.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta) //Function to convert polar coordinates to rectangular coordinates\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"clc\n", +"//Refer to the data given in the question\n", +"Vl=440 //Line voltage\n", +"P=50*(10^3) //Active power in watts\n", +"Il=90 //Load current in amperes\n", +"Vph=Vl //For delta connected load phase voltage=line voltage\n", +"Iph=Il/sqrt(3)\n", +"printf('\n Iph=%.2f A \n',Iph)\n", +"//Since P, Il and Vl have been given, the power factor can be calculated easily\n", +"pf=P/(sqrt(3)*Vl*Il)\n", +"printf('\n Power factor=%.2f (lagging) \n',pf)\n", +"S=sqrt(3)*Vl*Il\n", +"printf('\n S=%.2f kVA \n',S*(10^-3))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: Calculation_of_active_power_reactive_power_and_total_power.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"funcprot(0)\n", +"function [polar] = rect2polar(x,y) //Function to convert rectangular coordinates to polar coordinates\n", +" polar=ones(1,2)\n", +" polar(1)=sqrt((x^2)+(y^2))\n", +" polar(2)=atan(y/x)\n", +" polar(2)=(polar(2)*180)/%pi\n", +"endfunction\n", +"function [rect] = polar2rect(r,theta) //Function to convert polar coordinates to rectangular coordinates\n", +" rect=ones(1,2)\n", +" theta=(theta*%pi)/180\n", +" rect(1)=r*cos(theta)\n", +" rect(2)=r*sin(theta)\n", +"endfunction\n", +"clc\n", +"//Refer to the data given in the question\n", +"Il=15 //Current in amperes\n", +"P=11*(10^3) //Active power in kilowatts\n", +"S=15*(10^3)\n", +"Vl=S/(sqrt(3)*Il)\n", +"printf('\n Vl=%.2f V \n',Vl)\n", +"Vph=Vl/sqrt(3)\n", +"printf('\n Vph=%.2f V \n',Vph)\n", +"pf=P/S //Power factor\n", +"printf('\n Power factor=%.3f \n',pf)\n", +"phi=acos(pf)\n", +"phi=phi*180/%pi\n", +"printf('\n phi=%.2f degrees \n',phi)\n", +"Q=sqrt(3)*Vl*Il*sin(phi*%pi/180)\n", +"printf('\n Q=%.1f kVAR \n',Q*10^-3)\n", +"//For star connected load,Il=Iph\n", +"Zph=Vph/Il\n", +"printf('\n Zph=%.2f ohms \n',Zph)\n", +"R=Zph*pf\n", +"printf('\n R=%.2f ohms \n',R)\n", +"Xl=Zph*sqrt(1-(pf^2))\n", +"printf('\n Xl=%.2f ohms \n',Xl)\n", +"Vph=Vl //If the coils are connected in delta\n", +"Iph=Vph/Zph\n", +"Il=sqrt(3)*Iph\n", +"printf('\n Il=%.0f A \n',Il)\n", +"P=sqrt(3)*Vl*Il*pf\n", +"printf('\n P=%.2f kW \n',P*(10^-3))\n", +"Q=sqrt(3)*Vl*Il*sqrt(1-(pf^2))\n", +"printf('\n Q=%.2f kVAR \n',Q*(10^-3))" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/5-Single_phase_Transformer.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/5-Single_phase_Transformer.ipynb new file mode 100644 index 0000000..0f70478 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/5-Single_phase_Transformer.ipynb @@ -0,0 +1,706 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Single phase Transformer" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11: Example_number_11.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.10,Pg5.13\n", +"clc;\n", +"E1=6600 //Primary voltage\n", +"E2=400 //Secondary voltage\n", +"R1=2.5 //Primary resistance\n", +"X1=3.9 //Primary reactance\n", +"X2=0.025 //Secondary reactance\n", +"R2=0.01 //Secondary resistance\n", +"K=E2/E1 \n", +"//Equivalent resistance referred to primary\n", +"R01=R1+(R2/(K^2))\n", +"printf('\n Equivalent resistance referred to primary=%.2f ohms \n',R01)\n", +"//Equivalent reactance referred to primary\n", +"X01=X1+(X2/(K^2))\n", +"printf('\n Equivalent reactance referred to secondary =%.2f ohms \n',X01)\n", +"//Equivalent resistance referred to secondary\n", +"R02=R2+((K^2)*R1)\n", +"printf('\n Equivalent resistance referred to secondary=%.2f ohms \n',R02)\n", +"//Equivalent resistance referred to secondary\n", +"X02=X2+((K^2)*X2)\n", +"printf('\n Equivalent resistance referred to secondary=%.2f ohms \n',X02)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12: Example_number_12.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.12,Pg5.14\n", +"clc;\n", +"E1=4400 //Primary EMF\n", +"R1=3.45 //Primary resistance in ohms\n", +"X1=5.2 //Primary reactance in ohms\n", +"E2=220 //Secondary EMF\n", +"R2=0.009 //Secondary resistance in ohms\n", +"X2=0.015 //Secondary reactance in ohms\n", +"K=E2/E1\n", +"I1=50*1000/E1 //Using the formula I1=kVA rating*1000/E\n", +"printf('\n Full load Primary current I1=%.2f A \n',I1)\n", +"I2=50*1000/220\n", +"printf('\n Full load secondary current I2=%.2f A \n',I2)\n", +"R01=R1+(R2/(K*K))\n", +"printf('\n Equivalent resistance referred to primary=%.2f ohms \n',R01)\n", +"X01=X1+(X2/(K*K))\n", +"printf('\n Equivalent reactance referred to primary =%.1f ohms \n',X01)\n", +"Z01=sqrt((R01^2)+(X01*X01))\n", +"printf('\n Equivalent impedance referred to primary=%.2f ohms \n',Z01)\n", +"R02=(K^2)*R01\n", +"printf('\n Equivalent resistance referred to secondary=%.2f ohms \n',R02)\n", +"X02=(K^2)*X01\n", +"printf('\n Equivalent reactance referred to secondary=%.3f ohms \n',X02)\n", +"Z02=(K^2)*Z01\n", +"printf('\n Equivalent impedance referred to secondary=%.2f ohms \n',Z02)\n", +"CL1=(I1^2)*R1 + (I2^2)*R2\n", +"printf('\n Copper losses with individual resistances=%.2f W \n',CL1)\n", +"CL2=(I1^2)*R01\n", +"printf('\n Copper loss with equivalent resistances=%.1f W \n',CL2)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13: Example_number_13.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.13,Pg5.17\n", +"clc;\n", +"E2=440 //Secondary voltage\n", +"V2=400 //voltage at full load\n", +"//Given that power factor=0.8(lagging)\n", +"percentreg=((E2-V2)/E2)*100\n", +"printf('\n Percentage regulation=%.2f percent\n',percentreg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.15: Example_number_15.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.16,Pg5.18\n", +"clc;\n", +"//Let x=cos(phi) and y=sin(phi)\n", +"x=0.8\n", +"y=0.6\n", +"vr=1\n", +"vx=5\n", +"//For 0.8 lagging power factor\n", +"percentreg=vr*x+vx*y\n", +"printf('\n Percentage regulation=%.1f percent \n',percentreg)\n", +"//For unity power factor\n", +"x=1\n", +"y=0\n", +"percentreg=vr*x+vx*y\n", +"printf('\n Percent regulation=%.0f percent \n',percentreg)\n", +"//For 0.8 leading pf\n", +"x=0.8\n", +"y=0.6\n", +"percentreg=vr*x-vx*y\n", +"printf('\n Percent regulation=%.1f percent \n',percentreg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17: Example_number_17.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter5,Ex5.17,Pg5.19\n", +"clc;\n", +"E1=230 //EMF in primary winding\n", +"E2=460 //EMF in secondary winding\n", +"R1=0.2 //Primary resistance\n", +"R2=0.75 //Secondary resistance\n", +"X1=0.5 //Reactance in ohms\n", +"X2=1.8 //Secondary reactance in ohms\n", +"I2=10 //secondary current in amperes\n", +"pf=0.8 //cos(phi)=0.8\n", +"K=E2/E1 \n", +"printf('K=%.0f \n',K)\n", +"R02=R2+(K^2)*R1 //Effective secondary resistance\n", +"X02=X2+(K^2)*X1 //Effective secondary reactance\n", +"y=sqrt(1-(pf^2)) //sin(phi)=y\n", +"V2=E2-I2*((R02*pf)+(X02*y))\n", +"printf('\n Secondary terminal voltage=%.1f V \n',V2)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18: Example_number_18.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5.18,Pg5.20\n", +"clc;\n", +"//Given Full load kVA=100kVA\n", +"//Wi=600W(iron loss)\n", +"//WCu=1.5kW(copper loss)\n", +"//(i)\n", +"x=1 //Full load\n", +"pf=0.8\n", +"n=(x*100*pf/((x*100*pf)+0.6+((x^2)*1.5)))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)\n", +"//(ii)\n", +"x=0.5\n", +"pf=1\n", +"n=(x*100*pf/((x*100*pf)+0.6+((x^2)*1.5)))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19: Example_number_19.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex5.19,Pg5.21\n", +"clc;\n", +"flkva=25 //Full load kVA\n", +"R1=1.8 //Primary resistance in ohms\n", +"R2=0.02 //Secondary resistance in ohms\n", +"E1=2200 //Primary EMF in volts\n", +"E2=220 //Secondary EMF in volts\n", +"Wi=1000 //Iron loss in watts\n", +"I2=flkva*1000/220\n", +"printf('\n I2=%.2f A \n',I2)\n", +"K=E2/E1\n", +"printf('\n K=%.1f \n',K)\n", +"R02=R2+(K^2)*R1\n", +"printf('\n Effective secondary resistance=%.3f ohms \n',R02)\n", +"Wcu=(I2^2)*R02\n", +"printf('\n Copper loss=%.2f W \n',Wcu)\n", +"//(i)\n", +"x=1 //Full load\n", +"pf=1\n", +"n=(x*flkva*pf/((x*flkva*pf)+Wi/1000+((x^2)*Wcu/1000)))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)\n", +"//(ii)\n", +"x=0.5\n", +"pf=0.8\n", +"n=(x*flkva*pf/((x*flkva*pf)+Wi/1000+((x^2)*Wcu/1000)))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Example_number_1.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter5,Ex5.1,Pg5.4\n", +"clc;\n", +"//(i)\n", +"V2=110*110/220 // V2/V1 = E2/E1\n", +"printf('\n V2=%.0f V \n',V2)\n", +"//(ii)\n", +"printf('\n V2=%.0f V \n',0)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20: Example_number_20.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex5.20,Pg5.22\n", +"clc;\n", +"n1=98.135 //Given efficiency\n", +"n2=97.751 //Given efficiency\n", +"x=1 //Full load\n", +"pf=0.8 //Power factor\n", +"//Using the above data we have to solve 2 simultaneous equations by substituting the values in the formula for calculating the efficiency\n", +"A=[1 1;1 0.25]\n", +"B=[3.8; 2.3]\n", +"W=A\B\n", +"printf('\n Full load copper loss =%.0f kW \n',W(2))\n", +"printf('\n Iron loss =%.1f kW \n',W(1))\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21: Example_number_21.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex5.21,Pg5.23\n", +"clc;\n", +"//Given x=1 and pf=1 we obtain the first equation\n", +"//With x=0.5 and pf=1 we obtain the second equation\n", +"A=[1 1;1 0.25]\n", +"B=[52.2;26.1]\n", +"W=A\B\n", +"printf('\n Copper loss=%.1f kW \n',W(2))\n", +"printf('\n Iron loss=%.1f kW \n',W(1))\n", +"//Now if x=0.6 and pf=1\n", +"n= (0.6*600*1/((0.6*600*1)+W(1)+((0.6^2)*W(2))))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.22: Example_number_22.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex5.22,Pg5.23\n", +"clc;\n", +"flkva=150 //Given\n", +"Wi=1.4 //Iron loss in kW\n", +"Wcu=1.6 //Copper loss in kW\n", +"//(a)\n", +"lkva=flkva*sqrt(Wi/Wcu)\n", +"printf('\n Load kVA=%.2f kVA \n',lkva)\n", +"//For maximum efficiency Wi=Wcu=1.4kW and pf=0.8\n", +"n= (lkva*0.8/((lkva*0.8)+Wi+Wcu))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)\n", +"//(b)\n", +"n= (0.5*flkva*0.8/((0.5*flkva*0.8)+Wi+(0.5^2)*Wcu))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)\n", +" " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23: Example_number_23.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example5.23,Pg5.24\n", +"clc;\n", +"flkva=100 //Full load kVA given\n", +"x=1 //Full load\n", +"pf=0.8 //Power factor lagging\n", +"A=[1 1;1 -0.64]\n", +"B=[2.474;0]\n", +"W=A\B\n", +"n= (x*flkva*pf/((x*flkva*pf) + W(1) +(x^2)*W(2)))*100\n", +"printf('\n Efficiency=%.2f percent \n',n)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28: Example_number_28.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example5.28,Pg5.28\n", +"clc;\n", +"Wi=1 //Iron loss in kW\n", +"op=50*0.8*10+25*0.6*10+0*4\n", +"Wcu=1.2 //Copper loss in kW\n", +"Culoss=1*1.2*10+(25/50)*1.2*10+0 //Copper loss in the entire day considering the load cycle for a day as given in the question\n", +"Iloss=1*24\n", +"nallday= (op/(op+Iloss+Culoss))*100\n", +"printf('\n All day efficiency=%.2f percent \n',nallday)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Example_number_2.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter5,Ex5.2,Pg5.5\n", +"clc;\n", +"//Given data: Flux required=4.13mWb,V1=110V f=50,\n", +"N1=110/(4.44*50*0.001*4.13) //No. of turns= Voltage of operation/(Flux required*4.44*frequency of input signal)\n", +"printf('\n No. of turns=%.0f turns \n',N1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: Example_number_3.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.3,Pg5.5\n", +"clc;\n", +"//Given f=50Hz V1=240V N1=80 N2=280 A=200sq cm\n", +"//V1 is approximately equal to E1 for a transformer\n", +"//(i)\n", +"B=240/(4.44*50*200*0.0001*80) //E1=4.44fBmAN1\n", +"printf('\n Maximum flux density Bm=%.2f Wb/m2 \n',B)\n", +"//(ii)\n", +"E2=(280/80)*240 //Induced Emf E2=N2/N1*E1\n", +"printf('\n Induced EMF E2=%.0f V \n',E2)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: Example_number_4.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.4,Pg5.5\n", +"clc;\n", +"//Given E1=3200V E2=400V f=50Hz N2=111\n", +"//Part(i)\n", +"N1=(3200/400)*111 //E2/E1=N2/N1\n", +"printf('\n No of turns in primary=%.0f turns \n',N1)\n", +"//Part(ii)\n", +"I2=80*1000/400 //I2=KVA Rating*1000/V2 where I2=secondary current\n", +"printf('\n Secondary current I2=%.0f A \n',I2)\n", +"//Part(iii)\n", +"A=400/(4.44*50*1.2*111) //Using the formula E=4.44BmAfN2\n", +"printf('\n Cross sectional area=%.4f sq m \n',A)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: Example_number_5.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter5,Ex5.5,Pg5.6\n", +"clc;\n", +"//Given: kVA rating=5kVA E1=240V E2=2400V f=50Hz Bm=1.2Tesla\n", +"N1=240/8 //Since it is given that EMF per turn is 8\n", +"//(i)\n", +"printf('\n No. of turns in primary=%.0f \n',N1)\n", +"//(ii)\n", +"N2=(2400/240)*N1 //E2/E1=N2/N1\n", +"A=2400/(4.44*50*1.2*300) //using the formula E=4.44BmAfN2\n", +"printf('\n Cross sectional area=%.2f sq m \n',A)\n", +"//(iii)\n", +"I1=5*1000/240 //Using the formula I=kVA rating*1000/V1\n", +"printf('\n I1=%.2f A \n',I1)\n", +"I2=5*1000/2400\n", +"printf('\n I2=%.2f A \n',I2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: Example_6.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter5,Ex5.6,Pg5.6\n", +"clc;\n", +"//Given: kVA rating=250kVA f=50Hz N2/N1=0.1 E2=240V\n", +"//(i)\n", +"E1=240/0.1 //E2/E1=N2/N1\n", +"printf('\n Primary EMF E1=%.0f V \n',E1)\n", +"//(ii)\n", +"I1=250*1000/2400 //Using the formula I=kVA rating*1000/V\n", +"printf('\n I1=%.2f A \n',I1)\n", +"I2=250*1000/240 \n", +"printf('\n I2=%.2f A \n',I2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: Example_7.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.7,Pg 5.8\n", +"clc;\n", +"W0=200 //Power\n", +"R1=3.5 //Primary resistance\n", +"V1=2300 //Primary voltage\n", +"I0=0.3 //no load current\n", +"cl=(I0^2)*R1\n", +"printf('\n Copper loss=%.3f W \n',cl)\n", +"coreloss=W0-cl //Core loss=Input power-copper loss\n", +"printf('\n Core loss=%.3f W \n',coreloss)\n", +"pf=W0/(V1*I0)\n", +"printf('\n Power factor = %.2f (lagging) \n',pf)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: Example_number_8.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.8,Pg 5.8\n", +"clc;\n", +"//Primary voltage=230V no-load primary current=5A pf=0.25 N1=200 f=50Hz\n", +"//(i)\n", +"fluxm=230/(4.44*50*200) //Using E=4.44fN1*fluxm\n", +"printf('\n Max flux in the core=%.5f Wb \n',fluxm)\n", +"//(ii)\n", +"W=230*5*0.25 //Using the formula W=V1*I0*powerfactor\n", +"printf('\n Core loss =%.1f W \n',W)\n", +"//(iii)\n", +"x=sqrt(1-(0.25^2)) //x=sin(phi)\n", +"Iu=5*x\n", +"printf('\n Magnetising current=%.2f A \n',Iu)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: Example_number_9.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 5,Ex5.9,Pg 5.13\n", +"clc;\n", +"tr=4 //tr=N1/N2=4 which is given in the question\n", +"K=1/tr\n", +"Rp=50/(K^2) // Using the formula Equivalent resistance referred to primary=R'=R/(K^2)\n", +"printf('\n Rp=%.0f ohms \n',Rp)" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/6-Electrical_Machines.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/6-Electrical_Machines.ipynb new file mode 100644 index 0000000..8f46cbf --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/6-Electrical_Machines.ipynb @@ -0,0 +1,272 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Electrical Machines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Example_1.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter6,Pg6.6,Ex6.1\n", +"clc;\n", +"P=6 //Number of poles in armature\n", +"phi=0.018 //Flux per pole in Wb\n", +"N=600 //Angular velocity in rpm\n", +"Z=840 //Number of conductors\n", +"A=P //For lap wound armature, number of parallel paths=number of poles\n", +"Eg=(phi*Z*N*P)/(60*A)\n", +"printf('\n Eg=%.1f V \n',Eg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Example_number_2.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Pg6.6,Ex6.2\n", +"clc;\n", +"P=6 //Number of poles\n", +"A=2 //No of parallel paths\n", +"Z=300 //Number of conductors\n", +"N=1000 //Angular velocity\n", +"Eg=400 //Generated Emf\n", +"phi=(60*Eg*A)/(Z*N*P)\n", +"printf('\n phi=%.4f Wb\n',phi)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Example_number_3.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Pg6.7,Ex6.3\n", +"clc;\n", +"n=80 //Number of slots on armature\n", +"cps=10 //number of conductors per slot\n", +"Eg=400 //Generated EMF\n", +"N=1000 //Angular velocity\n", +"//part(i)\n", +"ctotal=n*cps\n", +"phi=(Eg*60)/(N*ctotal) //Since A=P\n", +"printf('\n phi=%.2f Wb \n',phi)\n", +"//part(ii)\n", +"Eg=220\n", +"N=(Eg*60)/(phi*ctotal)\n", +"printf('\n N=%.0f rpm \n',N)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Example_number_4.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Pg 6.7,Ex6.4\n", +"clc;\n", +"P=4 //Number of poles\n", +"V=200 //Supply voltage\n", +"Rf=80 //field resistance in ohms\n", +"Ra=0.1 //Armature resistance in ohms\n", +"Il=100 //Load current in amperes\n", +"//part(i)\n", +"If=V/Rf\n", +"printf('\n Il=%.1f A \n',Il)\n", +"Ia=Il+If\n", +"printf('\n Ia=%.1f A \n',Ia)\n", +"//part(ii)\n", +"A=P //For lap wound generator\n", +"cpp=Ia/4 \n", +"printf('\n Current per armature path=%.3f A \n',cpp)\n", +"//Current per armature path=total current divided by total number of conductors\n", +"///part(iii)\n", +"Eg=V+(Ia*Ra)+(0.1*2) //Where the last term in the addition is brush drop\n", +"printf('\n Eg=%.2f V \n',Eg)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: Example_number_5.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Pg 6.5,ex6.8\n", +"clc;\n", +"V=250 //Terminal voltage\n", +"Il=450 //Load current\n", +"Rf=50 //Field resistance in ohms\n", +"Ra=0.05 //Armature resistance in ohms\n", +"P=4 //Number of poles\n", +"phi=0.05 //Flux per pole in Wb\n", +"If=V/Rf\n", +"printf('\n If=%.0f A \n',If)\n", +"Ia=Il+If\n", +"printf('\n Ia=%.0f A \n',Ia)\n", +"Eg=V+(Ia*Ra)\n", +"printf('\n Eg=%.2f V \n',Eg)\n", +"n=120 //Number of slots in armature\n", +"cpp=4 //Conductors per slot\n", +"Z=n*cpp //Total number of conductors on armature\n", +"A=P //For lap wound generator\n", +"N=(Eg*60*A)/(phi*Z*P)\n", +"printf('\n N=%.0f rpm \n',N)\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: Example_number_6.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex6.6,Pg6.8\n", +"clc;\n", +"V=230 //Supply voltage\n", +"Il=40 //Current in amperes\n", +"Ra=0.5 //Armature winding\n", +"Rf=115 //Resistance in ohms\n", +"//Generator operation\n", +"disp('Generator operation')\n", +"Il=40 //Load current in amperes\n", +"If=V/Rf\n", +"printf('\n If=%.0f A \n',If)\n", +"Ia=Il+If\n", +"printf('\n Ia=%.0f A \n',Ia)\n", +"Eg=V+(Ia*Ra)\n", +"printf('\n Eg=%.0f V \n',Eg)\n", +"//Motor operation\n", +"disp('Motor operation')\n", +"Il=40\n", +"If=2\n", +"Ia=Il-If\n", +"printf('\n Ia=%.0f A \n',Ia)\n", +"Eb=V-(Ia*Ra)\n", +"printf('\n Eb=%.0f V \n',Eb)\n", +"n=Eb/Eg\n", +"printf('\n N2/N1=% .4f \n',n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: Example_number_7.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Ex6.7\n", +"clc;\n", +"V=100\n", +"Il=200\n", +"Rs=0.03\n", +"Rf=60\n", +"Ra=0.04\n", +"Vsfw=Il*Rs\n", +"printf('\n Voltage drop in series field winding =%.0f V \n',Vsfw)\n", +"If=(V+(Il*Rs))/Rf\n", +"printf('\n If=%.2f A \n',If)\n", +"Ia=Il+If\n", +"printf('\n Ia=%.2f A \n',Ia)\n", +"Eg=V+(Il*Rs)+(Ia*Ra)\n", +"printf('\n Generated EMF=%.2f V \n',Eg)" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/7-Semiconductor_devices_and_rectifiers.ipynb b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/7-Semiconductor_devices_and_rectifiers.ipynb new file mode 100644 index 0000000..8014766 --- /dev/null +++ b/Basic_Electrical_And_Electronics_Engineering_by_R_R_Singh/7-Semiconductor_devices_and_rectifiers.ipynb @@ -0,0 +1,427 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Semiconductor devices and rectifiers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: Calculation_of_Idc.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7,Ex7.13,Pg7.30\n", +"clc;\n", +"Vrms=66.64 \n", +"Rl=15\n", +"Vm=sqrt(2)*Vrms\n", +"printf('\n Vm=%.2f V \n',Vm)\n", +"Im=Vm/Rl\n", +"printf('\n Im=%.2f A \n',Im)\n", +"Idc=Im/%pi\n", +"printf('\n Idc=%.0f A \n',Idc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14: Calculation_of_peak_value_of_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7,Ex7.14,Pg7.30\n", +"clc;\n", +"Vdc=300\n", +"Rl=3000\n", +"Vm=Vdc*%pi/2 //For full wave rectifier\n", +"printf('\n Vm=%.2f V \n',Vm)\n", +"Vrms=Vm/sqrt(2) //RMS value of secondary voltage\n", +"Im=Vm/Rl //Peak diode current\n", +"printf('\n Im=%.2f A \n',Im)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.16: Calculation_of_Vrms.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7,Ex7.16,Pg7.30\n", +"clc;\n", +"Vdc=50\n", +"Rl=800\n", +"Rf=25\n", +"Vm=(Vdc*%pi*(Rf+Rl))/Rl\n", +"printf('\n Vm=%.0f \n',Vm)\n", +"Vrms=Vm/sqrt(2)\n", +"printf('\n Vrms=%.2f V \n',Vrms)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.17: Calculation_of_percent_regulation.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7,Ex 7.17,Pg 7.31\n", +"clc;\n", +"Rf=1\n", +"Idc=100\n", +"Vrms=12.6\n", +"Rs=3 \n", +"Vm=sqrt(2)*Vrms\n", +"printf('\n Vm=%.2f V \n',Vm)\n", +"Im=Idc*%pi\n", +"printf('\n Im=%.3f mA \n',Im)\n", +"//Let us use the formula Im=Vm/(Rs+Rf+Rl) to obtain the value of Rl\n", +"Rl=(17.82-Im*(Rs+Rf))/Im\n", +"printf('\n Rl=%.2f V \n',Rl)\n", +"Vdc=Idc*Rl\n", +"printf('\n Vdc=%.3f V \n',Vdc)\n", +"Vnl=Vm/%pi\n", +"Vfl=Idc*Rl\n", +"percentreg=((Vnl-Vfl)/Vnl)*100\n", +"printf('\n Percent regulation=%.2f \n',percentreg*10^-3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.18: To_find_out_voltage_across_conducting_diode.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter7,Example 7.18,Pg 7.32\n", +"clc;\n", +"Vrms=20 //Root mean square voltage\n", +"Rl=500 //Load resistance in ohms\n", +"Rf=20 //diode forward resistance\n", +"Vm=sqrt(2)*Vrms\n", +"printf('\n Vm=%.2f V \n',Vm)\n", +"Im=Vm/(Rf+Rl)\n", +"printf('\n Im=%.5f A \n',Im)\n", +"Idc=2*Im/%pi\n", +"printf('\n Idc=%.2f mA \n',Idc*10^3)\n", +"Vdc=(2*Vm/%pi)-Idc*Rf\n", +"printf('\n Vdc=%.2f V \n',Vdc)\n", +"Irms=Im/sqrt(2)\n", +"printf('\n Irms=%.2f mA \n',Irms*10^3)\n", +"Pi=(Irms^2)*(Rf+Rl)\n", +"printf('\n Input power=%.3f W \n',Pi)\n", +"r=sqrt(((Irms/Idc)^2)-1)\n", +"printf('\n Ripple factor=%.3f \n',r)\n", +"vcd=Idc*Rf\n", +"printf('\n Voltage across conducting diode=%.4f V \n',vcd)\n", +"disp('Voltage across non conducting diode=20V')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.19: Percentage_regulation.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter7.19,Ex7.19,Pg7.33\n", +"clc;\n", +"Vrms=40\n", +"Rf=1 //Diode forward resistance in ohms\n", +"Rl=19 //load resistance\n", +"Vm=sqrt(2)*Vrms\n", +"printf('\n Vm=%.2f V \n',Vm)\n", +"Im=Vm/(Rf+Rl)\n", +"Idc=(2*Im)/%pi\n", +"printf('\n Idc=%.1f A \n',Idc)\n", +"Pdc=(Idc^2)*Rl\n", +"printf('\n DC load power=%.1f W \n',Pdc)\n", +"Pac=((Im/sqrt(2))^2)*(Rf+Rl)\n", +"printf('\n Pac=%.2f W \n',Pac)\n", +"n=(Pdc/Pac)*100\n", +"printf('\n Efficiency=%.2f percent \n',n)\n", +"Vnl=(2*Vm)/%pi\n", +"Vfl=Idc*Rl\n", +"printf('\n Vfl=%.1f V \n',Vfl)\n", +"percentreg=((Vnl-Vfl)/Vnl)*100\n", +"printf('\n Percentage Regulation=%.2f percent \n',percentreg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: Calculation_of_base_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter7,Pg7.4,Ex1\n", +"clc;\n", +"I=(20-4)/2.2*10^3 //Diode D1 will be forward biased and diode D2 will be reverse biased\n", +"printf('\n I=%.2f mA \n',I*10^-3)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.21: Peak_inverse_voltage.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter7,Ex7.21,Pg7.36\n", +"clc;\n", +"Vrms=250 \n", +"Rl=3000\n", +"IdcRf=1\n", +"Vm=Vrms*sqrt(2)\n", +"printf('\n Vm=%.2f V \n',Vm)\n", +"Vdc=(2*Vm/%pi)-IdcRf\n", +"printf('\n Vdc=%.3f V \n',Vdc)\n", +"Idc=Vdc/Rl\n", +"printf('\n Idc=%.4f A \n',Idc)\n", +"Pdc=(Idc^2)*Rl\n", +"printf('\n Pdc=%.2f W \n',Pdc)\n", +"Rf=1/Idc\n", +"printf('\n Rf=%.2f ohms \n',Rf)\n", +"Irms=Vm/((Rf+Rl)*sqrt(2))\n", +"printf('\n Irms=%.3f A \n',Irms)\n", +"Pac=(Irms^2)*(Rf+Rl)\n", +"printf('\n Pac=%.2f W \n',Pac)\n", +"PIV=2*Vm //Peak inverse voltage\n", +"printf('\n PIV=%.1f V \n',PIV)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Calculation_of_alpha_dc.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter7,Pg7.4,Ex7.2\n", +"clc;\n", +"Bdc=90 //\n", +"Ic=15 //Collector current\n", +"Ib=Ic/Bdc\n", +"printf('\n Ib=%.2f uA \n',Ib*10^3)\n", +"Ie=Ib+Ic\n", +"printf('\n Emitter current Ie=%.2f mA \n',Ie)\n", +"Adc=Bdc/(Bdc+1)\n", +"printf('\n Adc=%.2f \n',Adc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Calculation_of_collector_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7,Ex7.4,Pg7.15\n", +"clc;\n", +"B=100\n", +"Icbo=4 //current in microamperes\n", +"Ib=40 //Current in microamperes\n", +"Ic=B*Ib+(B+1)*Icbo\n", +"printf('\n Ic=%.1f mA \n',Ic*10^-3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: Calculation_of_emitter_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter7,Ex7.5,Pg7.15\n", +"clc;\n", +"B=50\n", +"Ib=20 //Base current in microamperes\n", +"Ic=B*Ib\n", +"printf('\n Ic=%.0f mA \n',Ic*10^-3)\n", +"Ie=Ic+Ib\n", +"printf('\n Ie=%.2f mA \n',Ie*10^-3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Calculation_of_base_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7,Ex7.6,Pg 7.15\n", +"clc;\n", +"a=0.9 \n", +"Ie=10^-3\n", +"Ic=a*Ie //a=Ic/Ie\n", +"Ib=Ie-Ic\n", +"printf('\n Ib=%.1f mA \n',Ib*10^3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: Calculation_of_base_current.sci" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Chapter 7,Ex 7.7,Pg 7.15\n", +"clc;\n", +"a=0.98\n", +"Vce=0.2 \n", +"Ic=2*10^-3\n", +"Vcc=12\n", +"Rc=4\n", +"b=a/(1-a)\n", +"printf('\n Beta=%.0f \n',b)\n", +"Ice=(Vcc-Vce)/Rc\n", +"printf('\n Ic=%.2f mA \n',Ic*10^3)\n", +"Ib=Ic/b\n", +"printf('\n Ib(sat)=%.2f uA \n',Ib*10^6)\n", +"" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |