diff options
Diffstat (limited to 'Engineering_Basics_by_T_Thyagarajan/4-Ac_circuit.ipynb')
-rw-r--r-- | Engineering_Basics_by_T_Thyagarajan/4-Ac_circuit.ipynb | 1004 |
1 files changed, 1004 insertions, 0 deletions
diff --git a/Engineering_Basics_by_T_Thyagarajan/4-Ac_circuit.ipynb b/Engineering_Basics_by_T_Thyagarajan/4-Ac_circuit.ipynb new file mode 100644 index 0000000..013ed63 --- /dev/null +++ b/Engineering_Basics_by_T_Thyagarajan/4-Ac_circuit.ipynb @@ -0,0 +1,1004 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Ac circuit" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12: power_dissipated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the power dissipiated in resistance\n", +"//v=200 sind 314t\n", +"Vm=200;\n", +"o=314; //@=omega\n", +"//i=50 sind 314t\n", +"Im=50\n", +"o=314\n", +"R=Vm/Im\n", +"I=Im/1.414\n", +"P=(I*I*R)\n", +"disp( 'power dissipiated in resistance='+string(P)+' watts')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: inductive_reactance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the inductive reactance of the coil\n", +"L=0.25;//henry....inductance\n", +"f=50;//hertz...frequency\n", +"X=2*3.14*f*L\n", +"disp('value of inductive reactance='+string(X)+'ohms');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.15: current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate the current flowing through the coil\n", +"L=0.05\n", +"V=230\n", +"f=60\n", +"X=(2*%pi*f*L)\n", +"I=V/X\n", +"disp(' the current flowing through the coil='+string(I)+'amps')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.16: inductance_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//detrmine the value of inductance\n", +"I=5;//amp\n", +"V=200;//volt\n", +"f=50;//hertz\n", +"X=V/I;\n", +"L=40/(2*%pi*50);\n", +"disp('the value of inductive.reactance='+string (X)+'ohms' , 'value of inductors='+string(L)+'henry');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.17: voltage_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//write the time equation for voltage and current\n", +"Vrms=150\n", +"Vm=2*1.414*Vrms\n", +"f=50\n", +"L=0.2\n", +"X=2*3.14*f*L\n", +"Im=Vm/X\n", +"disp('current equation i=212.132sin(314)t' , 'voltage equation v=3.376sin(314t-90)' , ' Im= '+string(Im)+ ' ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.18: current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate the current\n", +"C=25e-6;\n", +"V=200\n", +"f=60 //frequency half\n", +"f2=120 //frequency doubled\n", +"Xc=1/(2*%pi*f*C)\n", +"Xc=1/(2*%pi*f2*C)\n", +"I=V/Xc\n", +"disp('frequency half='+string(f)+'hz' , 'frequency douled='+string(f2)+'hz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.19: capacitance_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the value of capacitance nd current\n", +"Xc=25\n", +"V=200\n", +"f=50\n", +"C=1/(2*%pi*f*Xc)\n", +"I=V/Xc\n", +"disp('the value of capacitance ='+string(C)+'farad', 'the value of current='+string(I)+'amps')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: voltage_and_current_factors.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//\n", +"//i=40sin 314t \n", +"//i=Imsin wt\n", +"Im=40\n", +"w=314\n", +"Iav=Im/1.414\n", +"Irms=Im*2/3.14\n", +"f=w/(2*3.14)\n", +"Ff=Irms/Iav\n", +"Pf=Im/Irms\n", +"disp('peak factor='+string(Pf)+ ' ' , 'form factor='+string(Ff)+ ' ' , 'frequency ='+string(f)+ ' ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.20: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//find the frquency\n", +"Vrms=110\n", +"c=15e-6\n", +"I=0.518\n", +"Xc=Vrms/I\n", +"f=1/(2*%pi*Xc*c)\n", +"disp('value of frequency='+string(f)+'hz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.21: phase_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate the value of current\n", +"R=10;//ohms\n", +"L=0.02;//henry\n", +"V=250;//volt\n", +"f=50;//hertz\n", +"X=(2*%pi*f*L)\n", +"Z=sqrt(R^2+X^2)\n", +"I=V/Z\n", +"coso=R/Z\n", +"o=acosd(coso)\n", +"disp('phase angle='+string(o)+'degree', 'current flowing through coil='+string(I)+'amp')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.22: voltage_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//find the inductance impd,curent,power factr,voltage.power\n", +"R=50;//ohms\n", +"L=0.5;//henry\n", +"V=200;//volt\n", +"f=50;//hertz\n", +"X=(2*%pi*f*L)\n", +"Z=sqrt(R^2+X^2)\n", +"I=V/Z\n", +"coso=R/Z\n", +"sino=R/Z\n", +"o=acosd(coso)\n", +"o1=asind(sino)\n", +"Vr=I*R\n", +"Vl=I*X\n", +"AP=V*I*coso\n", +"RP=V*I*sino\n", +"APP=V*I;\n", +"//disp('Apprent power='+string(AP)+'degree''phase angle='+string(o)+'degree', 'crnt flowing through coil='+string(I)+'amp')\n", +"disp('The time equation of current = 1.711sin(314t-72.34)')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.23: voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the supply voltage \n", +"R=15;//ohms \n", +"L=0.15;//henry\n", +"I=20;//ampss\n", +"f=50;//hertz\n", +"X=2*%pi*50*0.15\n", +"Z=sqrt(R^2+X^2)\n", +"V=I*Z\n", +"disp('supply voltage = '+string(V)+'volts');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.24: resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the supply voltage \n", +"V=200;//ohms \n", +"L=0.4;//henry\n", +"I=0.5;//ampss\n", +"f=50;//hertz\n", +"Z=V/I\n", +"X=2*%pi*f*L\n", +"R=sqrt(Z^2+X^2)\n", +"disp('Resistance = '+string(R)+'ohms')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.25: inductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the inductance of the coil\n", +"R=6\n", +"V=250;//volts\n", +"I=1.5;//amps\n", +"Z=V/I;//impedance\n", +"f=60;//hetrz\n", +"X=sqrt(Z^2-R^2)\n", +"L=X/(2*%pi*f)\n", +"disp('inductance of coil='+string(L)+ 'henry')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.27: voltage_across_choking_coil.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the inductance of the coil and voltage across each element\n", +"I=7\n", +"V=200\n", +"f=50\n", +"R=10\n", +"r=1.5 //rasistance choke coil\n", +"V1=I*R\n", +"V3=I*r\n", +"V2=sqrt(V^2-(V1+V3)^2)\n", +"X=V2/I //inductive reactance\n", +"L=X/(2*%pi*f)\n", +"V4=sqrt(V2^2+V3^2) ///voltage across choking coil\n", +"disp('voltage across choking coil='+string(V4)+'volts' , 'inductor='+string(L)+'henry')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.28: time_equation_for_v_and_i.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"4.28//voltage across R$C \n", +"C=15e-6;//farad..\n", +"R=100;//ohms\n", +"V=100;//volts\n", +"f=50;//hertz\n", +"Xc=1/(2*%pi*f*C);\n", +"Z=sqrt(R^2+(Xc^2));\n", +"I=V/Z;\n", +"coso=R/Z;\n", +"sino=R/Z\n", +"o=acosd(coso);\n", +"o=asind(sino)\n", +"Vr=I*R;\n", +"Vc=I*Xc;\n", +"AP=V*I*coso\n", +"RP=V*I*sino\n", +"APP=V*I;\n", +"disp('The time equation of current i = (0.426)1.414sin(314t-64.34)' , 'Apparent power ='+string(APP)+'vars ' , 'ACTIVE POWER ='+string(AP)+ ' watts' )\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.29: current_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the frequency\n", +"R=30;//ohms\n", +"L=0.5;//henry\n", +"f=50;//hertz\n", +"X=(2*%pi*f*L)\n", +"Z=R+%i*X\n", +"V=86.6+%i*50\n", +"I=V/Z\n", +"disp('current = '+string(I)+ 'A')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: voltage_equatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the voltage sin wave\n", +"f=50\n", +"V=50\n", +"Vm=V*1.414\n", +"w=2*3.14*f\n", +"t=(0:0.1:5*%pi)';\n", +"plot2d1('onn',t,[5*sin(t)])\n", +"disp('voltage equation v=70.7sin(314)t')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.30: voltage_across_R_and_C.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//find the equation of voltage and current \n", +"C=10e-6;//farad..\n", +"R=300;//ohms\n", +"//i=2 sin 314t\n", +"V=100;//volts\n", +"f=50;//hertz\n", +"Xc=1/(2*%pi*f*C);\n", +"Z=sqrt(R^2+(Xc^2));\n", +"Im=2\n", +"Vm=2*Z\n", +"coso=R/Z;\n", +"o=acosd(coso);\n", +"disp('The time equation of voltage Vr = 600sin(314t)' , 'The time equation of voltage Vc = 636sin(wt-90)')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.31: resistance_and_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate the value of RESISTANCE AND CAPACITANCE \n", +"I=2.5;//amps\n", +"V=150;//volts\n", +"f=50;//hetz\n", +"Z=V/I;\n", +"P=100;//watt..power\n", +"R=P/(I*I)\n", +"Xc=sqrt(Z^2-R^2)\n", +"C=1/(2*3.14*f*Xc);// capacitance\n", +"disp('find tha value of capacitance='+string(C)+'farad');\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.32: capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the value of capacitance\n", +"V1=100;//volts\n", +"V=250;//volts\n", +"f=50;//hertz\n", +"P=500;//watt\n", +"I=P/V;\n", +"V2=sqrt(V^2-V1^2);//volts\n", +"Xc=V2/I;\n", +"C=1/(2*%pi*f*Xc);\n", +"disp('determine the value of capacitance='+string(C)+'farad');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.33: voltage_across_RLC.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the ind.reactance nd capacitance nd voltage across R L C\n", +"R=25\n", +"C=20e-6\n", +"L=0.15\n", +"V=250\n", +"f=50\n", +"X=2*%pi*f*L\n", +"Xc=1/(2*%pi*f*C)\n", +"Z=sqrt(R^2+(X-Xc)^2)\n", +"I=V/Z\n", +"coso=R/Z\n", +"o=acosd(coso)\n", +"Vr=I*R\n", +"Vl=I*X\n", +"Vc=I*Xc\n", +"disp('Vr='+string(Vr)+'volts' , 'Vl='+string(Vl)+'volts' , 'Vc='+string(Vc)+'volts' , 'phase angle='+string(o)+'degree' , 'current='+string(I)+'amps' , 'impedence='+string(Z)+'ohms' , 'ind.reactance='+string(X)+'ohms' , 'ind capacitance='+string(Xc)+'ohms')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.34: current_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the current also V1 nd V2\n", +"V=250\n", +"f=50\n", +"R1=10\n", +"L1=0.15\n", +"C1=10e-6\n", +"X1=2*%pi*f*L1\n", +"Xc1=1/(2*%pi*f*C1)\n", +"R2=8\n", +"L2=0.25\n", +"X2=2*%pi*f*L2\n", +"Z=sqrt((R1+R2)^2+[(X1+X2)-Xc1]^2)\n", +"I=V/Z\n", +"Z1=sqrt(R1^2+(X1-Xc1)^2)\n", +"V1=I*Z1\n", +"Z2=sqrt(R2^2+X2^2)\n", +"V2=I*Z2\n", +"disp('value of current='+string(I)+'amps' , 'v1='+string(V1)+'volts', 'V2='+string(V2)+'volts')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.35: maximum_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the value of max. current\n", +"C=30e-6;//farad\n", +"R=12;//ohms\n", +"L=0.2;//henry\n", +"V=200;//volt\n", +"I=V/R\n", +"f=1/(2*%pi*sqrt (L*C))\n", +"disp('frequency='+string(f)+'hertz','maximum crnt='+string(I)+'amp')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.36: frequency_response.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate freq at resonance\n", +"C=30*10^-6\n", +"L=0.2\n", +"R=12\n", +"F= sqrt(1/(L*C)-R^2/(L*L))\n", +"f=1/(2*3.14)*F\n", +"disp(('freq at resonance='+string(f)+'hz'))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.37: current_voltage_and_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the current also power nd power factor\n", +"V=200+%i*0\n", +"f=50\n", +"R1=30\n", +"L1=0.2\n", +"C1=10e-6\n", +"X1=2*%pi*f*L1\n", +"Z1=R1+%i*X1\n", +"R2=40\n", +"L2=0.12\n", +"X2=2*%pi*f*L2\n", +"Z2=R2+%i*X2\n", +"Z=(Z1*Z2)/(Z1+Z2)\n", +"I=V/Z\n", +"R=18.858//calculatimg Z and I we get R and Z,I\n", +"Z=31.06\n", +"coso=R/Z\n", +"I=6.44\n", +"P=I^2*R\n", +"I1=(I*Z1)/(Z1+Z2)\n", +"I2=(I*Z1)/(Z1+Z2)\n", +"coso1=R1/Z1\n", +"P1=I1^2*R1\n", +"coso2=R2/Z2\n", +"P2=(I2)^2*R2\n", +"disp('P2 ='+string(P2)+ 'watt' ,'P1 ='+string(P1)+ 'watt ' , 'Total power factr='+string(coso)+'' , 'Total power='+string(P)+'watt' , 'total current ='+string(I)+'amps' , 'total impedance='+string(Z)+'ohms' )" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.38: current_and_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the current also power nd power factor\n", +"V=200+%i*0\n", +"f=50\n", +"R1=10\n", +"X1=12\n", +"Z1=R1+%i*X1\n", +"R2=15\n", +"Xc2=20\n", +"Z2=R2-%i*Xc2\n", +"Z=(Z1*Z2)/(Z1+Z2)\n", +"I=V/Z//calculatimg Z and I we get R and Z,I\n", +"R=14.36\n", +"I=13.46\n", +"coso=R/Z\n", +"P=I*I*R\n", +"I1=(I*Z2)/(Z1+Z2)\n", +"I2=(I*Z1)/(Z1+Z2)\n", +"coso1=R1/Z1\n", +"P1=I1*I1*R1\n", +"coso2=R2/Z2\n", +"P2=I2*I2*R2\n", +"disp('P2 ='+string(P2)+ 'watt' ,'P1 ='+string(P1)+ 'watt ' , 'Total power factr='+string(coso)+'' , 'Total power='+string(P)+'watt' , 'total current ='+string(I)+'amps' , 'total impedance Z ='+string(Z)+'ohms' )" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: volatage_and_time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//determine the time taken to reach the intantaneous of 150\n", +"f=50\n", +"Vr=200\n", +"Vm=Vr*1.414\n", +"t=2.5e-3\n", +"w=2*3.14*f*t\n", +"v=Vm*sind(w*180/%pi)\n", +"v1=150 //v1=Vmsimwt\n", +"t=1/18000*asind(150/282.8)\n", +"disp( 'voltage equation='+string(v)+' volts ' , 'time='+string(t)+' seconds ')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.40: voltage_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate the line currnt nd voltage\n", +"R=200\n", +"Vl=440\n", +"f=50\n", +"V=Vl/1.732//star connection\n", +"I=V/R\n", +"Il=I\n", +"coso=1\n", +"P=3*V*I*coso\n", +"Vp=440//delta connection\n", +"Vl=440\n", +"I1=1.732*I\n", +"P1=3*Vp*I*coso\n", +"disp('active power='+string(P)+'watt' , 'active power='+string(P1)+'watt' )" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.41: power_absorbed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate total power absrbed\n", +"R=15\n", +"L=0.25\n", +"f=50\n", +"X=2*%pi*f*L\n", +"Z=sqrt(R^2+X^2)\n", +"Vl=400\n", +"V=Vl/1.732 //in star connection\n", +"I=V/Z\n", +"Il=I\n", +"coso=R/Z\n", +"P=3*V*Il*coso\n", +"disp('total power absorbed='+string(P)+'watt')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.42: power_absorbed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate resistance nd reactance of circuit\n", +"P=15000; //power\n", +"Vl=400;//line voltage\n", +"V=Vl/1.732\n", +"I=35;//line current equal to phase current\n", +"Z=V/I\n", +"coso=15e3/(1.732*400*35)\n", +"R=Z*coso\n", +"X=sqrt(Z^2-R^2)\n", +"disp('reactance='+string(X)+'ohms' ,'resistance='+string(R)+'ohms')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.43: power_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"\n", +"//calculate power factor\n", +"W1=5000//W1=V*L*cos(30+o)\n", +"W2=3000//W2=V*L*cos(30-o)\n", +"o=atand (1.732*(W1-W2)/(W1+W2))\n", +"disp('power factor='+string(o)+' ')" + ] + } +], +"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 +} |