diff options
author | prashantsinalkar | 2020-04-14 10:19:27 +0530 |
---|---|---|
committer | prashantsinalkar | 2020-04-14 10:23:54 +0530 |
commit | 476705d693c7122d34f9b049fa79b935405c9b49 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Transmission_Lines_And_Networks_by_U_Sinha | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
download | all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.gz all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.tar.bz2 all-scilab-tbc-books-ipynb-476705d693c7122d34f9b049fa79b935405c9b49.zip |
Initial commit
Diffstat (limited to 'Transmission_Lines_And_Networks_by_U_Sinha')
15 files changed, 7195 insertions, 0 deletions
diff --git a/Transmission_Lines_And_Networks_by_U_Sinha/1-Transmission_Lines.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/1-Transmission_Lines.ipynb new file mode 100644 index 0000000..cfdc378 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/1-Transmission_Lines.ipynb @@ -0,0 +1,541 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Transmission Lines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: Calculating_characteristic_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R=20;L=10*(10^-3);ins=0.1*(10^6);C=.1*(10^-6);w=5000; //ins=insulation resistance\n", +"G=1/ins;\n", +"Z=R+(%i*w*L);\n", +"Y=G+%i*w*C;\n", +"Zo=sqrt(Z/Y);\n", +"C=real(Zo);\n", +"D=imag(Zo);\n", +"printf('Input impedance Zo = %f /_%f ohms\n',(abs(Zo)),round(((atan(imag(Zo),real(Zo))*180/%pi))*10)/10);\n", +"//the difference in result of Zo is due to erroneous value in textbook.\n", +"disp('The difference in result of Zo is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: Calculating_the_voltage_across_load_in_terms_of_the_sending_end_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"x=1;l=12;V=0.1;\n", +"V1=1-V; \n", +"//V1=ratio of voltage at 1km from the sending end to the voltage at sending end\n", +"P=-log(V1);\n", +"V2=exp(-P*l);\n", +"x=V2*100;x1=round(x*100)/100;\n", +"//x=ratio of voltage across the load impedance to the voltage at sending end\n", +"printf('Voltage across the load impedance is %f percentage of the sending end voltage',x1);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: Calculating_dc_resistance_and_inductance_and_capacitance_and_ac_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"a=.1;d=30;Ur=1;s=5.57*(10^7);e=1;f=30000;\n", +"//ur= relative magnetic permeability of conductor material,\n", +"//s=conductivity of material\n", +"//e=relative dielectric constant of the material\n", +"L=(Ur+9.21*log10(d/a))*10^-7;\n", +"printf('-Inductance L = %f mH/km\n',L*10^3);\n", +"C=12.07*e/(log10(d/a));\n", +"printf('-Capacitance C = %f micromicrofarads/km\n',round(C*100)/100);\n", +"Rdc=2/(%pi*a*a*10^-2*10^-2*s);\n", +"Rdc1=Rdc*10^3;\n", +"printf('-D.C.resistance of line Rdc = %f ohms/km\n',round(Rdc1*100)/100);\n", +"Uo=4*%pi*10^-7;\n", +"//Uo=absolute permeability\n", +"Rac=(1/(a*10^-2))*(sqrt(f*Uo/(%pi*s)));\n", +"Rac1=Rac*10^3;\n", +"printf('-A.C.resistance of line = %f ohms/km',round(Rac1*100)/100);\n", +"//the difference in result of innductance and capacitance is due to erroneous value in textbook.\n", +"disp('The difference in result of inductance and capacitance is due to erroneous value in textbook')\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: EX1_13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"a=0.2;b=0.8;c=1;\n", +"a1=a*10^-2;b1=b*10^-2;c1=c*10^-2;s=5.57*(10^7);e=2.5;f=100*(10^3);\n", +"//e=relative dielectric constant of the material\n", +"//s=conductivity of copper\n", +"eo=(1/(36*%pi))*10^-9;\n", +"Uo=4*%pi*10^-7;\n", +"//Uo=absolute permeability\n", +"Llf=(((Uo/(2*%pi))*log(b1/a1))+((Uo/(8*%pi))*((((4*c1^4)/(((c1^2)-(b1^2))^2))*log(c1/b1))-((2*c1^2)/((c1^2)-(b1^2))))))*10^3;\n", +"printf('-Low frequency inductance = %f mH/km\n',round(Llf*(10^3)*10000)/10000);\n", +"Lhf=((Uo/(2*%pi))*log(b1/a1))*10^3;\n", +"printf('-High frequency inductance = %f mH/km\n',round(Lhf*(10^3)*1000)/1000);\n", +"C=(2*%pi*eo*e/(log(b1/a1)))*10^3;\n", +"printf('-Capacitance = %f microfarads/km\n',round(C*(10^6)*10000)/10000);\n", +"Rdc=((1/(%pi*s))*((1/(a1^2))+(1/((c1^2)-(b1^2)))))*10^3;\n", +"printf('-D.c.resistance = %f ohms/km\n',round(Rdc*1000)/1000);\n", +"Rac=((sqrt(f*Uo/(4*%pi*s)))*((1/a1)+(1/b1)))*10^3;\n", +"printf('-A.c.resistance = %f ohms/km',round(Rac*100)/100);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: Calculating_line_attenuation_and_velocity_of_propagation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Vd=10;l=2;b=20;f=796;\n", +"w=2*%pi*f;\n", +"//Vd=voltage drop(in percentage),b=phase change(in degrees)\n", +"V=(100-Vd)/100; //V=Vr/Vs;\n", +"a=(20*log10(1/V))/l;\n", +"printf('(i)Attenuation = %f db/km\n',round(a*1000)/1000);\n", +"b1=(b/l)*(%pi/180); //b1=phase constant/km(in radians)\n", +"Vp=w/b1;\n", +"printf('(ii)The velocity of propagation = %d km/sec',Vp);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: Calculating_sending_and_receiving_end_voltages_and_currents_and_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"l=200;Vg=10;Zg=500;Zs=683-(%i*138);P=0.0074+(%i*0.0356);Zo=Zs;\n", +"Is=Vg/(Zg+Zs);\n", +"modIs=abs(Is);\n", +"printf('-Sending end current = %f mA\n',round(modIs*(10^3)*100)/100);\n", +"Vs=Is*Zs;\n", +"modVs=abs(Vs);\n", +"printf('-Sending end voltge = %f V r.m.s.\n',round(modVs*100)/100);\n", +"Rs=real(Zs);\n", +"Ps=((modIs)^2)*Rs;\n", +"printf('-Sending end power = %f mW\n',round(Ps*(10^3)*100)/100);\n", +"Vr=modVs*exp(-P*l);\n", +"A=imag(-P*l);\n", +"printf('-Receiving end voltage = %f /_ %f V\n',round(abs(Vr)*100)/100,A);\n", +"Zr=Zs;\n", +"Ir=Vr/Zr;\n", +"modIr=abs(Ir);\n", +"printf('-Receiving end current = %f mA\n',round(modIr*(10^3)*100)/100);\n", +"Rr=Rs;\n", +"Pr=((modIr)^2)*Rr;\n", +"printf('-Receiving end power = %f mW',fix(Pr*(10^3)*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: EX1_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=710* exp(%i*(-%pi/(180/16)));f=1000;\n", +"w=2*%pi*f;\n", +"a=.01;b=.035;\n", +"P=a+%i*b;\n", +"Z=Zo*P;\n", +"R=real(Z);\n", +"r=round(R*100)/100;\n", +"printf('-Resistance R = %f ohms/km\n',r);\n", +"L=((imag(Z))/w)*10^3;\n", +"l=round(L*100)/100;\n", +"printf('-Inductance L = %f mH/km\n',l);\n", +"Y=P/Zo;\n", +"G=real(Y);\n", +"printf('-Conductance G = %f mhos/km\n',-G);\n", +"C=((imag(Y))/w)*10^6;\n", +"c=round(C*1000)/1000;\n", +"printf('-Capacitance C = %f microfarads/km\n',c);\n", +"Vp=round(w*1000/(b*10^5))/1000;\n", +"printf('-Velocity of propagation Vp = %f^* 10^5 km/sec',Vp);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: Calculating_the_values_of_the_line_constants.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=2039.6;f=800; //value of Zo as taken in solution\n", +"P=0.054* exp(%i*(%pi/(180/87.9)));\n", +"w=2*%pi*f;\n", +"Z=Zo*P;\n", +"R=real(Z);\n", +"printf('-Resistance R = %f ohms/km\n',R);\n", +"L=(imag(Z))/w;\n", +"printf('-Inductance L = %f mH/km\n',L*(10^3));\n", +"Y=P/Zo;\n", +"G=real(Y);\n", +"printf('-Conductance G = %f micromhos/km\n',G*(10^6));\n", +"C=((imag(Y))/w)*(10^6);c=round(C*10000)/10000\n", +"printf('-Capacitance C = %f microfarads/km\n',c);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: Determining_Zo_and_a_and_b.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10;L=.0037;f=1000;G=.4*(10^-6);C=.0083*(10^-6);\n", +"w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"C=round(real(Zo));\n", +"D=round(imag(Zo));\n", +"printf('-Zo = %f + j(%f) ohms\n',C,D);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"a1=round(a*10000)/10000;\n", +"printf('-Attenuation constant a = %f neper/km\n',a1);\n", +"b=imag(P);\n", +"b1=round(b*10000)/10000;\n", +"printf('-Phase constant b = %f radians/km',b1);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: Calculating_terminating_impedance_and_attenuation_and_phase_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=1000;R=6;L=.0022;G=.25*(10^-6);C=.005*(10^-6);l=100; \n", +"//value of C as taken in solution\n", +"w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"C=real(Zo);\n", +"D=imag(Zo);\n", +"printf('(i)Terminating impedance for which there will be no reflection is Zo = %f /_%f ohms\n',fix(abs(Zo)),round(((atan(imag(Zo),real(Zo))*180/%pi))*10)/10);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"b=imag(P);\n", +"a1=a*l*8.66;\n", +"printf('(ii)(a)Attenuation suffered while travelling = %f db\n',a1);\n", +"Vp=(w/b)*(10^-5);v=round(Vp*100)/100;\n", +"printf('(ii)(b)Phase velocity Vp = %f * 10^5 km/sec\n',v);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: EX1_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=1000;R=10.4;L=.0037;G=.8*(10^-6);C=.00835*(10^-6);l=1000;Vs=1;\n", +"w=2*%pi*f;\n", +"Z=R+round((%i*w*L));\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"printf('-Characteristic impedance is Zo = %f /_%f ohms\n',fix(abs(Zo)),round(((atan(imag(Zo),real(Zo))*180/%pi))));\n", +"P=sqrt(Z*Y);\n", +"printf('-Propagation constant P = %f + j(%f)\n',fix(real(P)*10^4)/10^4,round(imag(P)*10^4)/10^4);\n", +"b=imag(P);\n", +"\n", +"Is=Vs/Zo;Vp=(w/b)*(10^-5);v=round(Vp*100)/100;\n", +"printf('-Phase velocity Vp = %f * 10^5 km/sec\n',v);\n", +"Ir=Is*exp(-P*l);\n", +"P=((abs(Ir))^2)*real(Zo);\n", +"printf('-Power delivered at receiving end = %f micro-watt',P*(10^6));\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: Calculating_characteristic_impedance_and_propagation_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=5000/(2*%pi);R=196;C=.09*(10^-6);L=.71*(10^-3);G=0;\n", +"//value of C as taken in solution\n", +"w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"printf('-Characteristic impedance is Zo = %f /_%f ohms\n',fix(abs(Zo)),round(((atan(imag(Zo),real(Zo))*180/%pi))*10)/10);\n", +"P=sqrt(Z*Y);F=fix(abs(P)*100)/100;\n", +"printf('-Propagation constant P = %f /_%f ohms\n',F,((atan(imag(P),real(P))*180/%pi))); \n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: Calculating_Zo_and_a_and_b_and_Vp.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"R=10.4;L=3.666*(10^-3);G=.08*(10^-6);C=.00835*(10^-6);w=5000;\n", +"//value of L and C as taken in solution\n", +"Z=R+(%i*w*L);\n", +"Y=G+%i*w*C;\n", +"Zo=sqrt(Z/Y);\n", +"printf('-Zo = %f /_%f ohms\n',fix(abs(Zo)),round(((atan(imag(Zo),real(Zo))*180/%pi))*10)/10);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"b=imag(P);\n", +"printf('-Attenuation constant a = %f neper/km\n',a);\n", +"printf('-Phase constant b = %f radians/km\n',b);\n", +"Vp=(w/b)*(10^-5);v=round(Vp*1000)/1000;\n", +"printf('(ii)(b)Phase velocity Vp = %f * 10^5 km/sec\n',v);\n", +"//the difference in result of Zo is due to erroneous value in textbook.\n", +"disp('The difference in result of Zo is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: Calculating_characteristic_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=65;L=1.6*(10^-3);C=.1*(10^-6);G=2.25*(10^-6);f=800;\n", +"w=5000;\n", +"Z=R+round(%i*w*L);\n", +"Y=G+%i*w*C;\n", +"Zo=sqrt(Z/Y);\n", +"printf('-Characteristic impedance is Zo = %f /_%f ohms\n',(abs(Zo)),(((atan(imag(Zo),real(Zo))*180/%pi))));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: Calculating_phase_velocity_and_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=6;L=2*(10^-3);G=.5*(10^-6);C=.005*(10^-6);f=1000;l=100;\n", +"w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+%i*w*C;\n", +"Zo=sqrt(Z/Y);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"b=imag(P);\n", +"a1=fix(a*8.66*l*10^3)/10^3;\n", +"printf('-Attenuation suffered while travelling = %f db\n',a1);\n", +"Vp=fix(w/b)/10^3;\n", +"printf('-Phase velocity Vp = %f km/sec',Vp );" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/11-Networks.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/11-Networks.ipynb new file mode 100644 index 0000000..333f37e --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/11-Networks.ipynb @@ -0,0 +1,780 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Networks" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.10: Designing_a_reactive_T_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc; //solved using the value of w used in the solution\n", +"Rl=1000;Xg=250+(%i*200);w=2*(10^6);\n", +"Rg=real(Xg);\n", +"X1=sqrt(Rg*Rl);\n", +"X2=X1;\n", +"X3=X1;\n", +"C3=1/(w*X3);\n", +"printf('-C3 = %d pf\n',C3*(10^12));\n", +"L1=X1/w;\n", +"printf('-L1 = %d micro-henry\n',L1*(10^6));\n", +"L2=X2/w;\n", +"Xc=-%i*imag(Xg);\n", +"X21=X2+(Xc/%i);\n", +"L21=X21/w;\n", +"printf('-L2 = %d micro-henry',L21*(10^6));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.11: Determining_the_equivalent_T_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zin=400+(%i*4000);Zout1=100+(%i*1000);Zout2=38+(%i*380);\n", +"Zoc1=Zin;Zoc2=Zout1;Zsc2=Zout2;\n", +"Z3=sqrt(Zoc1*(Zoc2-Zsc2));\n", +"Z1=Zoc1-Z3;\n", +"Z2=Zoc2-Z3;\n", +"A=real(Z1);\n", +"B=imag(Z1);\n", +"C=real(Z2);\n", +"D=imag(Z2);\n", +"E=real(Z3);\n", +"F=imag(Z3);\n", +"printf('-Z1 = %f + j(%f) ohms\n',round(A*10)/10,round(B*10)/10);\n", +"printf('-Z2 = %f + j(%f) ohms\n',fix(C*10)/10,fix(D));\n", +"printf('-Z3 = %f + j(%f) ohms\n',fix(E*10)/10,fix(F));\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.12: Finding_the_elements_of_the_arms_of_a_loss_less_T_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"w=5*(10^6);Rg=800;Rl=200;b=-12;\n", +"X3=-(sqrt(Rg*Rl))/sin(b*%pi/180);\n", +"L3=X3/w;\n", +"X1=(-Rg/tan(b*%pi/180))+((sqrt(Rg*Rl)/sin(b*%pi/180)));\n", +"L1=X1/w;\n", +"X2=(-Rl/tan(b*%pi/180))+((sqrt(Rg*Rl)/sin(b*%pi/180)));\n", +"C2=-1/(X2*w);\n", +"printf('-L3 = %f micro-henry\n',fix(L3*(10^6)));\n", +"printf('-L1 = %f micro-henry\n',fix(L1*(10^6)));\n", +"printf('-C2 = %f pf',round(C2*(10^12)));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.13: Determining_the_image_and_iterative_impedance_and_equivalent_T_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ya=40*(10^-3);Yb=50*(10^-3);Yc=20*(10^-3);\n", +"Za=1/Ya;Zb=1/Yb;Zc=1/Yc;\n", +"Z1=Zb*Zc/(Za+Zb+Zc);\n", +"Z2=Za*Zc/(Za+Zb+Zc);\n", +"Z3=Zb*Za/(Za+Zb+Zc);\n", +"Zi1=sqrt(((Z3+Z1)/(Z3+Z2))*((Z1*Z2)+(Z2*Z3)+(Z1*Z3)));\n", +"printf('(a)Zi1 = %f ohms\n',round(Zi1));\n", +"Zi2=sqrt(((Z3+Z2)/(Z3+Z1))*((Z1*Z2)+(Z2*Z3)+(Z1*Z3)));\n", +"printf(' Zi2 = %f ohms\n',round(Zi2*100)/100);\n", +"Zt1=(1/2)*((Z1-Z2)+(sqrt(((Z1-Z2)^2)+(4*((Z1*Z2)+(Z2*Z3)+(Z1*Z3))))));\n", +"printf(' Zt1 = %f ohms\n',fix(Zt1*100)/100);\n", +"Zt2=(1/2)*((Z2-Z1)+(sqrt(((Z1-Z2)^2)+(4*((Z1*Z2)+(Z2*Z3)+(Z1*Z3))))));\n", +"printf(' Zt2 = %f ohms\n\n',fix(Zt2*100)/100);\n", +"Zb1=Za*Zb/(Za+Zb);\n", +"Z11=Zb*Zc/(Zb+Zc+Zb1);\n", +"Z21=Zb1*Zc/(Zb+Zc+Zb1);\n", +"Z31=Zb1*Zb/(Zb+Zc+Zb1);\n", +"Zr=Zc+Z21;\n", +"Zs=Z21+Zb;\n", +"Z12=Z31*Zs/(Z31+Zr+Za);\n", +"Z22=Zr*Za/(Z31+Zr+Za);\n", +"Z32=Z31*Za/(Z31+Zr+Za);\n", +"Z121=Z12+Z11;\n", +"printf(' The desired T network will be as:\n');\n", +"printf(' Z1 = %f ohms\n',round(Z121*100)/100);\n", +"printf(' Z2 = %f ohms\n',fix(Z22*10)/10);\n", +"printf(' Z3 = %f ohms\n',round(Z32*10^4)/10^4);\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.14: EX11_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"L=20*(10^-3);C=0.064*(10^-6);f=400;\n", +"w=2*%pi*f;\n", +"Z1=round(2*%i*w*L*10)/10;\n", +"Z2=1/(%i*w*C);\n", +"Zo=sqrt((Z1*Z1/4)+(Z1*Z2));\n", +"printf('Characteristic impedance = %f ohms\n',round(Zo*100)/100);\n", +"Pf=(1+(Z1/(2*Z2)));\n", +"printf(' Propagation constant = %f',round(Pf*100)/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.15: Calculating_characteristic_impedance_and_propagation_function.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Za=300;Zc=600;R=1000;\n", +"Zi1=sqrt((Za*Za)+(Za*Zc));\n", +"Zi2=Za*Zc/sqrt((Za*Za)+(Za*Zc));\n", +"Zt1=(Za/2)+sqrt((Za*Za/4)+(Za*Zc));\n", +"Zt2=(-Za/2)+sqrt((Za*Za/4)+(Za*Zc));\n", +"printf('The image impedances are:\n ');\n", +"printf('Zi1 = %f ohms\n',round(Zi1*10)/10);\n", +"printf(' Zi2 = %f ohms\n',round(Zi2*10)/10);\n", +"printf(' Zt1 = %f ohms\n',Zt1);\n", +"printf(' Zt2 = %f ohms\n\n',Zt2);\n", +"I=(((R+Zt1+Zt2)*(R+Zt1)/(Zt1))-Zt1)*(1/(R+R));\n", +"Ir=20*log10(round((I*1000))/1000);\n", +"printf(' Insertion loss = %f db',Ir);\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.16: Designing_a_L_matching_loss_less_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rg=100;Rl=50;f=5*(10^6);\n", +"w=2*%pi*f;\n", +"X21=sqrt(Rl*(Rg-Rl));\n", +"X22=-X21;\n", +"X31=-Rg*sqrt(Rl/(Rg-Rl));\n", +"X32=-X31;\n", +"L2=X21/w;\n", +"printf('(i)X2 is inductive and X3 is capacitive where\n X2=L2 = %f microhenry\n',round(L2*(10^6)*1000)/1000);\n", +"C2=-1/(w*X31);\n", +"printf(' X3=C3 = %f pf\n',round(C2*(10^12)*10)/10);\n", +"L31=X32/w;\n", +"printf('(ii)X3 is inductive and X2 is capacitive where\n X3=L3 = %f microhenry\n',round(L31*(10^6)*1000)/1000);\n", +"C21=-1/(w*X22);\n", +"printf(' X2=C2 = %f pf',round(C21*(10^12)));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.17: Calculating_different_losses_and_total_insertion_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zl=100;Zsh=500;Zg=300;\n", +"Zoc=Zl+Zsh;\n", +"Zsc=Zl+(1/((1/Zl)+(1/Zsh)));\n", +"Zi1=sqrt(Zoc*Zsc);\n", +"Zi2=Zi1;\n", +"theta=atanh(sqrt(Zsc/Zoc));\n", +"att=theta*8.686;\n", +"printf('-Attenuation loss = %f db\n',round(att*10)/10);\n", +"inp=20*log10(round((Zi1+Zg))/(2*sqrt(Zi1*Zg)));\n", +"printf('-Loss due to mismatch at the input = %f db\n',round(inp*100)/100);\n", +"out=20*log10((Zi2+Zl)/(2*(sqrt(Zi2*Zl))));\n", +"printf('-Loss due to mismatch at output = %f db\n',round(out*100)/100);\n", +"Ki1=(Zi1-Zg)/(Zi1+Zg);\n", +"Ki2=(Zi2-Zl)/(Zi2+Zl);\n", +"inte=-20*log10(1-(Ki1*Ki2*exp(-2*theta)));\n", +"printf('-Loss due to interaction = %f db\n',fix(inte*100)/100);\n", +"ext=20*log10((Zg+Zl)/(2*sqrt(Zg*Zl)));\n", +"printf('-External reflection loss = %f db\n',round(ext*100)/100);\n", +"tot=att+inp+out-inte-ext;\n", +"printf('-Total insertion loss = %f db\n',fix(tot*100)/100);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.18: Calculating_the_elements_of_a_L_section_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rg=8000;Zl=500+(%i*500);f=5*(10^6);\n", +"//value of f as taken in solution\n", +"w=2*%pi*f;\n", +"Xc=-%i*imag(Zl);\n", +"Rl=real(Zl);\n", +"X21=sqrt(Rl*(Rg-Rl));\n", +"X22=-X21;\n", +"X31=-Rg*sqrt(Rg/(Rg-Rl));\n", +"X32=-X31;\n", +"X2a=X21+(Xc/%i);\n", +"L2a=X2a/w;\n", +"C3a=-1/(w*X31);\n", +"printf('(a)X2 is inductive and X3 is capacitive where\n X2=L2 = %f mH\n',round(L2a*(10^3)*1000)/1000);\n", +"printf(' X3=C3 = %f pf\n',round(C3a*(10^12)*1000)/1000);\n", +"X2b=X22+(Xc/%i);\n", +"C2b=-1/(w*X2b);\n", +"L3b=X32/w;\n", +"printf('(b)X2 is capacitive and X3 is inductive where\n X2=C2 = %f pf\n',round(C2b*(10^12)*100)/100);\n", +"printf(' X3=L3 = %f mH',round(L3b*(10^3)*1000)/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.19: Calculating_image_impedance_and_transfer_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zoc1=-%i*400;Zoc2=-%i*600;Zsc1=%i*267;Zsc2=%i*400;\n", +"A=Zoc1/Zsc1;\n", +"B=Zoc2/Zsc2;\n", +"printf('(a)Since Zoc1/Zsc1 = Zoc2/Zsc2 = %f the results are consistant\n',round(A*10)/10);\n", +"Zi1=sqrt(Zoc1*Zsc1);\n", +"Zi2=sqrt(Zoc2*Zsc2);\n", +"printf('The image impedances are:\n Zi1 = %f ohms\n Zi2 = %f ohms\n',round(Zi1*10)/10,round(Zi2*10)/10);\n", +"C=(1+sqrt(B))/(1-sqrt(B));\n", +"phi=round(atan(imag(C),real(C))*180*10/%pi)/10;\n", +"theta=round(%i*phi*%pi*1000/(2*180))/1000;\n", +"printf('Image transfer constant = j %f',theta/%i);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: Calculating_image_and_iterative_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Za=200;\n", +"Zb=400;\n", +"Zc=500;\n", +"Zi1=sqrt((Za+Zc)*((Za*Zc)+(Za*Zb)+(Zc*Zb))/(Zb+Zc));\n", +"printf('(a)Image impedance Zi1 = %f ohms\n',round(Zi1*10)/10);\n", +"Zi2=sqrt((Zb+Zc)*((Za*Zc)+(Za*Zb)+(Zc*Zb))/(Za+Zc));\n", +"printf(' Image impedance Zi2 = %f ohms\n',round(Zi2));\n", +"Zt1=(1/2)*((Za-Zb)+sqrt(((Za-Zb)^2)+(4*((Za*Zb)+(Za*Zc)+(Zb*Zc)))));\n", +"printf('(b)Iterative impedances Zt1 = %f ohms\n',round(Zt1*10)/10);\n", +"Zt2=(1/2)*((Zb-Za)+sqrt(((Zb-Za)^2)+(4*((Za*Zb)+(Za*Zc)+(Zb*Zc)))));\n", +"printf(' Iterative impedances Zt2 = %f ohms',round(Zt2*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.20: Calculating_reduction_in_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zg=300;Zi=400;Zi1=600;theta=10;\n", +"thetai=theta/8.686;\n", +"Zi2=Zi1;\n", +"Ir=thetai + log(((Zi1+Zg)/(2*sqrt(Zi1*Zg)))*((Zi1+Zi)/(2*sqrt(Zi1*Zi)))*((Zi+Zg)/(2*sqrt(Zi*Zg)))*((1-(((Zg-Zi1)/(Zg+Zi1))*((Zi-Zi1)/(Zi+Zi1))*exp(-2*thetai)))));\n", +"Ir1=(round(Ir*10)/10)*8.686;\n", +"printf('The reduction in power will be = %f db',round(Ir1*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.21: EX11_21.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=200;L1=100*(10^-3);R2=200;L2=100*(10^-3);C2=2.5*(10^-6);w=2000;\n", +"Z1=R1+(%i*w*L1);\n", +"Z2=1/(%i*w*C2);\n", +"Zoc=Z1+Z2;\n", +"Zsc=Z1+(1/((1/Z1)+(1/Z2)));\n", +"Zo=sqrt(Zoc*Zsc);\n", +"printf('-Characteristic impedance = %f ohms\n',round(Zo));\n", +"P=atanh(sqrt(Zsc/Zoc));\n", +"a=real(P);\n", +"printf('-Attenuation constant = %f nepers\n',round(a*100)/100);\n", +"b=(imag(P))*180/%pi;\n", +"printf('-Phase shift constant = %d degrees',b);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.22: Calculating_image_impedance_and_propagation_constant_and_elements_of_T_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1o=1260*(exp(%i*30/(180/(%pi))));Z2o=2430*(exp(-%i*34/(180/(%pi))));\n", +"Z1s=318*(exp(%i*72/(180/(%pi))));Z2s=613*(exp(%i*8/(180/(%pi))));\n", +"Zi1=sqrt(Z1o*Z1s);\n", +"A=real(Zi1);\n", +"B=imag(Zi1);\n", +"printf('(i)Image impedance Zi1 = %f /_ %f ohms\n',round(abs(Zi1)),atan(B,A)*180/%pi);\n", +"Zi2=sqrt(Z2o*Z2s);\n", +"C=real(Zi2);\n", +"D=imag(Zi2);\n", +"printf(' Image impedance Zi2 = %f /_ %f ohms\n',round(abs(Zi2)),atan(D,C)*180/%pi);\n", +"Z3=sqrt(Z2o*(round(Z1o)-round(Z1s)));\n", +"Z1=Z1o-Z3;\n", +"Z2=Z2o-Z3;\n", +"\n", +"P=atanh(sqrt(Z1s/Z1o));\n", +"printf(' (ii)Propagation constant = %f /_ %f\n',round(abs(P*100))/100,round(atan(imag(P),real(P))*100)/100);\n", +"printf(' (iii)The elements of the T network are:\n');\n", +"printf(' Z1 = %f + j(%f) ohms\n',round(real(Z1)),round(imag(Z1)));\n", +"printf(' Z2 = %f + j(%f) ohms\n',round(real(Z2)),round(imag(Z2)));\n", +"printf(' Z3 = %f + j(%f) ohms',round(real(Z3)),round(imag(Z3)));\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: Calculating_iterative_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Za=%i*200;Zc=-%i*500;\n", +"Zt1=(Za/2)+(sqrt((Za*Za/4)+(Za*Zc)));\n", +"A=real(Zt1);\n", +"B=imag(Zt1);\n", +"printf('Iterative impedances Zt1 = %d + j(%d) ohms\n ',A,B);\n", +"Zt2=(-Za/2)+(sqrt((Za*Za/4)+(Za*Zc)));\n", +"C=real(Zt2);\n", +"D=imag(Zt2);\n", +"printf('Iterative impedances Zt2 = %d + j(%d) ohms',C,D);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: Calculating_iterative_and_image_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1=30+(%i*7.5);Z2=50+(%i*10);Z3=-%i*3229;\n", +"Za=Z1;Zb=Z2;Zc=Z3;\n", +"a=Za+Zc;\n", +"b=Zb+Zc;\n", +"s=(Za*Zb)+(Zb*Zc)+(Zc*Za);\n", +"Zi1=sqrt(a*s/b);\n", +"printf('Image impedances Zi1 = %f /_ %f ohms\n',round(abs(Zi1)*10)/10,round(atan(imag(Zi1),real(Zi1))*180*100/%pi)/100);\n", +"Zi2=sqrt(b*s/a);\n", +"printf(' Image impedances Zi1 = %f /_ %f ohms\n',round(abs(Zi2)*10)/10,round(atan(imag(Zi2),real(Zi2))*180*100/%pi)/100);\n", +"Zt1=(1/2)*((Za-Zb)+sqrt(((Za-Zb)^2)+(4*s)));\n", +"printf(' Iterative impedances Zt1 = %f + j(%f) ohms\n',round(real(Zt1)*100)/100,round(imag(Zt1)*100)/100);\n", +"Zt2=(1/2)*((Zb-Za)+sqrt(((Za-Zb)^2)+(4*s)));\n", +"printf(' Iterative impedances Zt1 = %f + j(%f) ohms\n',round(real(Zt2)*100)/100,round(imag(Zt2)*100)/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.4: Calculating_image_and_iterative_impedances_and_transfer_constants.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Za=%i*300;Zc=-%i*700;\n", +"Zoc1=Za+Zc;\n", +"Zsc1=Za;\n", +"Zoc2=Zc;\n", +"Zsc2=(Za*Zc)/(Za+Zc);\n", +"Zi1=sqrt(Zoc1*Zsc1);\n", +"printf('-Image impedance Zi1 = %f ohms\n',round(Zi1));\n", +"Zi2=sqrt(Zoc2*Zsc2);\n", +"printf('-Image impedance Zi2(in ohms)= %f ohms\n',round(Zi2));\n", +"Zt1=(Za/2)+(sqrt((Za*Za/4)+(Za*Zc)));\n", +"A=real(Zt1)\n", +"B=imag(Zt1);\n", +"printf('-Iterative impedance Zt1 = %f + j(%f) ohms\n',round(A),B);\n", +"Zt2=(-Za/2)+(sqrt((Za*Za/4)+(Za*Zc)));\n", +"C=real(Zt2);\n", +"D=imag(Zt2);\n", +"printf('-Iterative impedance Zt2 = %f + j(%f) ohms\n',round(C),D);\n", +"I=(1+(sqrt(Zsc1/Zoc1)))/(1-(sqrt(Zsc1/Zoc1)));\n", +"Qi=(log(I))/2;\n", +"E=real(Qi);\n", +"F=imag(Qi);\n", +"printf('-Image transfer constant = %f + j(%f)\n',E,round(F*1000)/1000);\n", +"I1=(Zt1+Zc);\n", +"I2=Zc;\n", +"Q2=log(I1/I2);\n", +"G=real(Q2);\n", +"H=imag(Q2);\n", +"printf('-Iterative transfer constant = %f +j(%f)',G,round(H*180*10/%pi)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.5: Computing_the_insertion_ratio_and_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zg=100;Zl=500;b=63.4;a=0;\n", +"theta=a+(%i*b);\n", +"Fr=2*(sqrt(Zg*Zl))/(Zg+Zl);\n", +"IR=Fr*exp(theta);\n", +"A=real(IR);\n", +"B=imag(IR);\n", +"printf('-Insertion ratio = %f /_ %f\n',fix(abs(IR)*100)/100,theta/%i);\n", +"IL=-20*log10(Fr);\n", +"printf('-Insertion loss = %f db',round(IL*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.6: Determining_the_components_of_a_symmetrical_T_section_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zoc=800;Zsc=600;\n", +"R2=sqrt((Zoc*Zoc)-(Zsc*Zoc));\n", +"R1=2*(Zoc-R2);\n", +"printf('The components of the network are:\n');\n", +"printf(' R1/2 = %d ohms\n',R1/2);\n", +"printf(' R2 = %d ohms',R2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.7: Calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1=20;Z2=10;Vrms=10;\n", +"Zot=sqrt(((Z1*Z1)/4)+(Z1*Z2));\n", +"I=Vrms/Zot;\n", +"a=[30 27.32;1 -3.732];\n", +"b=[0.577;0];\n", +"b=inv(a)*b;\n", +"printf('Current flowing through the terminating impedance = %f mA',round(b(2,1)*(10^4)*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.8: Calculating_characteristic_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1=50+(%i*125);Z2=200-(%i*100);\n", +"Zot=sqrt((Z1/4)*(Z1+(4*Z2)));\n", +"A=real(Zot);\n", +"B=imag(Zot);\n", +"printf('Characteristic impedance = %f + j(%f) ohms',round(A),round(B*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.9: Designing_a_L_section.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zl=20+(-%i*5);w=5*(10^6);Rg=600;\n", +"Rl=real(Zl);\n", +"Xc=-%i*imag(Zl);\n", +"A=imag(Xc);\n", +"printf('Compensating reactance = j(%d) ohms\n ',A);\n", +"X21=-sqrt(Rl*(Rg-Rl));\n", +"X22=-X21;\n", +"X31=-Rg*sqrt(Rl/(Rg-Rl));\n", +"X32=-X31;\n", +"X2a=X22+(Xc/%i);\n", +"L2=X2a/w;\n", +"C3=-1/(w*X31);\n", +"printf('(a)In the first case X2 is inductive, X2=L2 = %f micro-henry\n',round(L2*(10^6)*100)/100);\n", +"printf('\t\t\t\t\tX3=C3 = %f pf\n',round(C3*(10^12)));\n", +"X2b=X21+(Xc/%i);\n", +"C2=-1/(w*X2b);\n", +"L3=X32/w;\n", +"printf('(b)In the second case X2 is capacitive,X2=C2 = %f pf\n',round(C2*(10^12)));\n", +"printf('\t\t\t\t\tX3=L3 = %f micro-henry',round(L3*(10^6)*10)/10);" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/12-Network_Theorems.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/12-Network_Theorems.ipynb new file mode 100644 index 0000000..04976ef --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/12-Network_Theorems.ipynb @@ -0,0 +1,836 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Network Theorems" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.10: Verifying_reciprocity_theorem.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"I=5*exp(%i*(90)/(180/%pi));Z1=5+(%i*5);Z2=2;Z3=-%i*2;\n", +"I2=I*Z1/(Z1+Z2+Z3);\n", +"V2=I2*Z3;\n", +"I1=I*Z3/(Z1+Z2+Z3);\n", +"V1=I1*Z1;\n", +"printf('The reciprocity theorem has been verified.');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.11: Calculating_value_of_compensation_source.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1=%i*10;Z2=3+(%i*4);Z=5;V=20;\n", +"Zeq=1/((1/Z1)+(1/Z2));\n", +"Zi=Z+Zeq;\n", +"I=V/Zi;\n", +"Vc=I*Zeq;\n", +"A=real(Vc);\n", +"B=imag(Vc);\n", +"printf('Compensation source Vc = %f /_ %f volts',round(abs(Vc)*10)/10,round(atan(B,A)*180*10/%pi)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.12: Calculating_power_in_load_and_turns_ratio_for_maximum_power_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zg=10000;Zl=24+(%i*7);Vrms=100; \n", +"Rl=real(Zl);\n", +"Xl=imag(Zl);\n", +"Zeq=sqrt(((Rl+Zg)^2)+((Xl)^2));\n", +"Irms=Vrms/Zeq;\n", +"P=Irms*Irms*Rl;\n", +"printf('(i)Power in the load if connected directly to the generator = %f mW\n',round(P*(10^3)*10)/10);\n", +"ampZl=sqrt((Rl*Rl)+(Xl*Xl));\n", +"n=1/sqrt(ampZl/Zg);\n", +"printf('(ii)The desired turn ratio of transformer is 1:%d\n',n);\n", +"Pl=Vrms*Vrms/(4*Zg);\n", +"printf('(iii)Power transferred under ideal load conditions =%f mW',Pl*(10^3));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.13: Determining_value_of_maximum_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zg=10+(%i*20);V=50;\n", +"Rg=real(Zg);Xg=imag(Zg);\n", +"ampZg=sqrt((Rg*Rg)+(Xg*Xg));\n", +"Rl=ampZg;\n", +"I=V/(Zg+Rl);\n", +"ampI=round(sqrt((real(I))^2+(imag(I))^2)*100)/100;\n", +"P=ampI*ampI*round(Rl*10)/10;\n", +"printf('Power delivered to the load = %f Watt',round(P*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.14: EX12_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V=50*exp(%i*45/(180/%pi));Z1=3;Z2=2+(%i*10);Xl=2;\n", +"Voc=V*Z2/(Z1+Z2);\n", +"Zab=1/((1/Z1)+(1/Z2));\n", +"Zg=Zab\n", +"Rl1=Zg-(%i*Xl);\n", +"Rl=abs(Rl1);\n", +"Z=Zab+Rl-(%i*Xl);\n", +"I1=Voc/Z;\n", +"I=abs(I1);\n", +"P=I*I*Rl;\n", +"printf('-Rl = %f ohms\n',round(Rl*100)/100);\n", +"printf('-Xl = %f ohms\n',Xl);\n", +"printf('-Maximum power delivered to load = %f Watts',round(P));\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.17: EX12_17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=5*(10^6);C=400*(10^-12);R=10*(10^3);\n", +"w=2*%pi*f;\n", +"L=2/(w*w*C);\n", +"r=1/(w*w*C*C*R);\n", +"printf('-Effective resistance of the coil = %f ohms\n',round(r*100)/100);\n", +"printf('-Inductance of effective resistance of the coil = %f mH',round(L*(10^3)*1000)/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.19: Determining_the_elements_of_a_series_type_Foster_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"w1=2*(10^6);w2=3*(10^6);w3=4*(10^6);w=1*(10^6);Z=%i*100;\n", +"F=((w*w)-(w2*w2))/(((w*w)-(w1*w1))*((w*w)-(w3*w3)));\n", +"H=Z/(%i*w*F);H1=round(H*10^-8*100)/(100*10^-8);\n", +"A=((w1*w1)-(w2*w2))/((w1*w1)-(w3*w3));\n", +"B=((w3*w3)-(w2*w2))/((w3*w3)-(w1*w1));\n", +"C2=-1/(H1*A);\n", +"printf('Elements of the series type Foster network are:\n');\n", +"printf('-C2 = %f pf\n',fix(C2*(10^12)))\n", +"L2=1/(w1*w1*C2);\n", +"printf('-L2 = %f microhenry\n',round(L2*(10^6)*10)/10);\n", +"C4=-1/(H1*B);\n", +"printf('-C4 = %f pf\n',fix(C4*(10^12)));\n", +"L4=1/(w3*w3*C4);\n", +"printf('-L4 = %f microhenry',round(L4*(10^6)*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: Finding_the_rms_value_of_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"w=2*%pi*(10^6);C=100*(10^-12);V=10;L=100*(10^-6);\n", +"Zc=1/(w*C);\n", +"Ic=(V/sqrt(2))/Zc;\n", +"printf('-R.m.s. value of current flowing through capacitor C = %f mA\n',round(Ic*(10^3)*100)/100);\n", +"Zl=w*L;\n", +"Il=(V/sqrt(2))/Zl;\n", +"printf('-R.m.s. value of current flowing through inductor L = %f mA',fix(Il*(10^3)*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.20: Determining_the_elements_of_series_type_Foster_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"w1=1000;w2=1500;w3=2000;w4=3000;w5=5000;w=100;Z=%i*100;\n", +"F=((w*w)-(w2*w2))*((w*w)-(w4*w4))/(((w*w)-(w1*w1))*((w*w)-(w3*w3))*((w*w)-(w5*w5)));\n", +"H=Z/(%i*w*F);\n", +"A=((w1*w1)-(w2*w2))*((w1*w1)-(w4*w4))/(((w1*w1)-(w3*w3))*((w1*w1)-(w5*w5)));\n", +"B=((w3*w3)-(w2*w2))*((w3*w3)-(w4*w4))/(((w3*w3)-(w5*w5))*((w3*w3)-(w1*w1)));\n", +"C=((w5*w5)-(w2*w2))*((w5*w5)-(w4*w4))/(((w5*w5)-(w1*w1))*((w5*w5)-(w3*w3)));\n", +"C2=-1/(H*A);\n", +"printf('-C2 = %f microfarads\n',round(C2*(10^6)*100)/100)\n", +"L2=1/(w1*w1*C2);\n", +"printf('-L2 = %f henry\n',round(L2*100)/100);\n", +"C4=-1/(H*B);\n", +"printf('-C4 = %f microfarads\n',round(C4*(10^6)*100)/100);\n", +"L4=1/(w3*w3*C4);\n", +"printf('-L4 = %f henry\n',round(L4*100)/100);\n", +"C6=-1/(H*C);\n", +"L6=1/(w5*w5*C6);\n", +"printf('-C6 = %f microfarads\n',round(L6*100)/100);\n", +"printf('-L6 = %f henry\n',round(C6*(10^6)*100)/100)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.21: Finding_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V=10;Rl=10;Z1=5;Z2=5;\n", +"Zab=1/((1/Z1)+(1/Z2));\n", +"I1=V/(Z1+Z2);\n", +"Voc=I1*Z1;\n", +"I=Voc/(Zab+Rl);\n", +"printf('Current in the 10 ohm resistor = %d mA',I*(10^3));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.22: Using_Thevenins_theorem_to_calculate_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rl=10;V=100;Z1=-%i*30;Z2=-%i*30;Z3=20+(%i*10);\n", +"I=V/(Z1+Z2);\n", +"Voc=I*Z2;\n", +"Zab=1/((1/Z1)+(1/Z2))+Z3;\n", +"Z=Zab+Rl;\n", +"Il=Voc/Z;\n", +"ampIl=sqrt(real(Il)^2+imag(Il)^2);\n", +"Pl=ampIl*ampIl*Rl;\n", +"printf('Power in the load = %f Watts',round(Pl*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.23: Finding_Thevenins_equivalent_generator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V=100;R1=10;R2=10;R3=10;R4=10;\n", +"I=V/(R1+R2);\n", +"Vab=I*R2;\n", +"Zab=1/((1/R1)+(1/R2));\n", +"V1=Vab*R4/(Zab+R3+R4);\n", +"Z1=1/((1/(Zab+R3))+(1/R4));\n", +"printf('The equivalent Thevenin circuit has an emf of %d volts and an internal impedance of %f ohms',V1,Z1);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.25: EX12_25.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V=100;Z1=20;Z2=-%i*100;Z3=100;\n", +"Zab=1/((1/(Z2))+(1/Z3));\n", +"Voc=V*Z3/(Z2+Z3);\n", +"I=Voc/(Zab+Voc);\n", +"P=(abs(I))^2 * real(Zab);\n", +"Z=conj(Zab);\n", +"A=real(Z);\n", +"B=imag(Z);\n", +"printf('Value of load value for maximum power = %d + j(%d) ohms\n',A,B);\n", +"printf(' Maximum Power = %d Watts',P);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.26: Determining_Thevenins_equivalent_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V=100;R1=50;R2=60;R3=40;R4=60;R5=40;\n", +"Rac=1/((1/(R2+R3))+(1/(R4+R5)));\n", +"Rt=Rac+R1;\n", +"I=V/Rt;\n", +"V1=I*R1;\n", +"Vac=V-V1;\n", +"Vab=R2*Vac/(R2+R3);\n", +"Vad=R5*Vac/(R4+R5);\n", +"Vbd=Vab-Vad;\n", +"Voc=Vbd;\n", +"R1y=R5*R1/(R1+R4+R5);\n", +"R2y=R1*R4/(R1+R4+R5);\n", +"R3y=R4*R5/(R1+R4+R5);\n", +"Rbd=R3y+(1/((1/(R1y+R2))+(1/(R2y+R3))));\n", +"printf('The equivalent Thevenin circuit has an emf of %d volts and an internal impedance of %d ohms',Vbd,Rbd);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.27: Calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V1=6;V2=6;R1=2;R2=1;R3=2;\n", +"Y1=1/R1;Y2=1/R2;\n", +"Vm=((V1*Y1)+(V2*Y2))/(Y1+Y2);\n", +"Zm=1/(Y1+Y2);\n", +"I=Vm/(Zm+R3);\n", +"printf('Current in resistor R3 = %f Amp',I);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.28: Using_Millmans_theorem_to_find_current_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V1=5;V2=4;R1=5;R2=4;I3=1;R3=10;R4=5;\n", +"V3=I3*R3;\n", +"Y1=1/R1;Y2=1/R2;Y3=1/R3;\n", +"V4=((V1*Y1)+(V2*Y2)+(V3*Y3))/(Y1+Y2+Y3);\n", +"I4=V4/R4;\n", +"printf('Voltage across resistor R4 = %f volts\n',V4);\n", +"printf('Current in resistor R4 = %f Amp',I4);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.29: Verifying_Tellegens_theorem.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V=120;R1=6;R2=8;R3=3;R4=5;\n", +"a=[7 -4;-1 2];\n", +"b=[60;0];\n", +"b=inv(a)*b;\n", +"I1=b(1,1);\n", +"I2=b(2,1);\n", +"VI1=(R1*I1)+(R2*(I1-I2))-V;\n", +"printf('Summation V*I for first loop = %d\n',VI1);\n", +"VI2=(R3*I2)+(R4*I2)-(R2*(I1-I2));\n", +"printf('Summation V*I for second loop = %d\n',VI2);\n", +"printf('Hence Tellegens theorem has been verified.');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: Calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1=10;Z2=5;Z3=2;I1=2;I2=4;\n", +"Vab1=I1*(1/((1/Z2)+(1/(Z1+Z3))));\n", +"I5=I2*Z3/(Z1+Z2+Z3); //I5=current through the 5 ohm resistor\n", +"Vab2=Z2*I5;\n", +"Vab=Vab1+Vab2;\n", +"printf('Vab = %f volts',round(Vab*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.30: Verifying_Tellegens_theorem.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V1=4;V2=2;V3=2;V4=3;V5=-1;V6=-5;i1=2;i2=2;i3=4;i4=-2;i5=-6;i6=4;\n", +"Va=V2+V3-V1;\n", +"printf('V2+V3-V1= %d volts\n',Va);\n", +"Vb=V2+V4+V6;\n", +"printf('V2+V4+V6= %d volts\n',Vb);\n", +"Vc=V4+V5-V3;\n", +"printf('V4+V5-V6= %d volts\n',Vc);\n", +"printf('-Hence KVL is satisfied for all three loops PQTU,PRYX and QRST respectively.\n\n');\n", +"Ia=i1+i2-i6;\n", +"printf('i1+i2-i6= %d Amp\n',Ia);\n", +"Ib=i3+i4-i2;\n", +"printf('i3+i4-i2= %d Amp\n',Ib);\n", +"Ic=i5+i6-i4;\n", +"printf('i5+i6-i2= %d Amp\n',Ic);\n", +"printf('-Hence KCL is satisfied at all three nodes P,Q and R respectively.\n\n');\n", +"VI=(V1*i1)+(V2*i2)+(V3*i3)+(V4*i4)+(V5*i5)+(V6*i6);\n", +"printf('-Summation V*I= %d\n\n',VI);\n", +"printf('-This proves Tellegens theorem.');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.31: Finding_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Vrms=10;R1=5;Z1=20;Z2=20;Z3=10;Z4=10;\n", +"Zab=(1/((1/Z1)+(1/Z2)))+(1/((1/Z3)+(1/Z4)));\n", +"Voc=R1;\n", +"I=Voc/(Zab+R1);\n", +"printf('Current I = %f Amps',I);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.32: Calculating_current_and_voltage_using_Thevenins_theorem.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"I1=6;I2=8;R1=4;R2=4;R3=6;R4=4;Rl=3;\n", +"V1=I1*R1;V2=I2*R4;\n", +"Voc1=V1*(R3+R4)/(R1+R2+R3+R4);\n", +"Voc2=V2*(R1+R2)/(R1+R2+R3+R4);\n", +"Voc=Voc1+Voc2;\n", +"Zab=1/((1/(R1+R2))+(1/(R3+R4)));\n", +"Il=Voc/(Zab+Rl);\n", +"printf('-il = %f Amp\n',round(Il*10)/10);\n", +"el=Il*Rl;\n", +"printf('-el = %f volts',round(el*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: Calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=5;R2=%i*5;R3=3+(%i*4);V1=50*exp(%i*90/(180/%pi));V2=50;\n", +"Z1=R1+(1/((1/R2)+(1/R3)));\n", +"I1=V1/Z1;\n", +"Iz1=I1*R2/(R2+R3);\n", +"Z2=R2+(1/((1/R1)+(1/R3)));\n", +"I2=V2/Z2;\n", +"Iz2=-I2*R1/(R1+R3);\n", +"Iz=Iz1+Iz2;\n", +"printf('Total current in the (3+j4)ohm branch = %f /_ %f Amp',round(abs(Iz)*10)/10,round(atan(imag(Iz),real(Iz))*180*10/%pi)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5: Determining_Thevenins_equivalent_generator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Isc=10;Voc=120;Rl=8;Il=6;\n", +"Zeq=Voc/Isc; //Zeq=impedance of the equivalent thevenin's generator Z=R+jX\n", +"t=Voc/Isc; //(R^2)+(X^2)=(t^2)\n", +"R=(((Voc/Il)^2)-(t^2)-(Rl^2))/(2*Rl);\n", +"X=sqrt((t^2)-(R^2));\n", +"printf('The equivalent Thevenin generator has an emf of %d volts and an internal impedance of (%d + j%d) ohms',Voc,R,X);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6: Determining_Thevenins_equivalent_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V=10;R1=5;R2=%i*5;R3=3+(%i*4);\n", +"Zab=R2+(1/((1/R1)+(1/R3)));\n", +"A=real(Zab);\n", +"B=imag(Zab);\n", +"I=V/(R1+R3);\n", +"Voc=I*R3;\n", +"C=real(Voc);\n", +"D=imag(Voc);\n", +"printf('The equivalent Thevenin circuit has an emf of %f /_ %f volts and an internal impedance of (%f + j%f) ohms',fix(abs(Voc)*100)/100,fix(atan(D,C)*180/%pi),A,B);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7: Deriving_the_equivalent_voltage_generator_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Voc=150;Rl=10;Il=2.65;Isc=3;\n", +"t=Voc/Isc; //(R^2)+(X^2)=(t^2)\n", +"R=(((Voc/Il)^2)-(t^2)-(Rl^2))/(2*Rl);\n", +"X=sqrt((t^2)-(R^2));\n", +"printf('-The equivalent voltage generator circuit has an emf of %d volts and an internal impedance of (%f + j%f) ohms\n',Voc,fix(R*100)/100,round(X*100)/100);\n", +"if X>0 then\n", +" printf('-Since X has a positive value the circuit will be inductive');\n", +"else \n", +" disp('-Since X has a negative value the circuit will be capacitve');\n", +"end\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.8: Determining_the_Nortons_equivalent_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Za=-%i*5;Zb=5+(%i*5);V=50;Z1=5-(%i*5);Z2=10;\n", +"Isc=V/Za;\n", +"A=real(Isc);\n", +"B=imag(Isc);\n", +"printf('-Short circuit current = %d /_ %d Amps\n',abs(Isc),atan(B,A)*180/%pi);\n", +"Zab=1/((1/Za)+(1/Zb));\n", +"C=real(Zab);\n", +"D=imag(Zab);\n", +"printf('-Equivalent impedance = %d + j(%d) ohms\n',C,D);\n", +"I1=Isc*(Zab/(Zab+Z1));\n", +"E=real(I1);\n", +"F=imag(I1);\n", +"printf('-Current through impedance Z1(=5-j5) = %d /_ %d Amps\n',abs(I1),atan(F,E)*180/%pi);\n", +"I2=Isc*(Zab/(Zab+Z2));\n", +"G=real(I2);\n", +"H=imag(I2);\n", +"printf('-Current through impedance Z2(=10) = %f /_ %f Amps',round(abs(I2)*100)/100,round(atan(H,G)*100*180/%pi)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9: Obtaining_Nortons_equivalent_circuit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V1=10;V2=20;R1=5;R2=15;\n", +"Isc=(V1/R1)+(V2/R2);\n", +"Zab=1/((1/R2)+(1/R1));\n", +"printf('-Short circuit current = %f Amp\n',round(Isc*100)/100);\n", +"printf('-Equivalent impedance = %f ohm',Zab);" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/13-Network_Parameters.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/13-Network_Parameters.ipynb new file mode 100644 index 0000000..81f378f --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/13-Network_Parameters.ipynb @@ -0,0 +1,663 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Network Parameters" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.10: Finding_ABCD_parameters_and_the_equivalent_T_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"z11=10;z22=20;z12=5;z21=5;\n", +"deltaz=(z11*z22)-(z12*z21);\n", +"A=z11/z12;\n", +"printf('(a)The ABCD parameters are:\n');\n", +"printf(' A = %f\n',A);\n", +"B=deltaz/z21;\n", +"printf(' B = %f ohms\n',B);\n", +"C=1/z12;\n", +"printf(' C = %f mho\n',C);\n", +"D=z22/z21;\n", +"printf(' D = %f\n\n',D);\n", +"Z3=z21;\n", +"Z1=z11-Z3;\n", +"Z2=z22-Z3;\n", +"printf('(b)The equivalent T-network:\n');\n", +"printf(' Z1 = %f ohms\n',Z1);\n", +"printf(' Z2 = %f ohms\n',Z2);\n", +"printf(' Z13 = %f ohms\n',Z3);\n", +"\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.11: Obtaining_the_parameters_Ya_and_Yb_and_Yc.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V1=10;I1=2.5;I2a=-0.5; //values with terminals 3-4 short-circuited\n", +"V2=V1;I2b=1.5; //values with terminals 1-2 short circuited\n", +"Yb=-I2a/V1;\n", +"Ya=(I1/V1)-Yb;\n", +"Yc=(I2b/V2)-Yb;\n", +"printf('-Ya = %f mho\n',Ya);\n", +"printf('-Yb = %f mhp\n',Yb);\n", +"printf('-Yc = %f mho',Yc);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.12: Finding_the_equivalent_pi_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Za=2;Zb=2.5;Zc=5;\n", +"Ya=1/Za;Yb=1/Zb;Yc=1/Zc;\n", +"Y1=(Ya*Yc)/(Ya+Yb+Yc);\n", +"Z1=1/Y1;\n", +"Y2=(Yb*Yc)/(Ya+Yb+Yc);\n", +"Z2=1/Y2;\n", +"Y3=(Ya*Yb)/(Ya+Yb+Yc);\n", +"Z3=1/Y3;\n", +"printf('The equivalent pi network is: \n');\n", +"printf(' Z1 = %f ohms\n',Z1);\n", +"printf(' Z2 = %f ohms\n',Z2);\n", +"printf(' Z3 = %f ohms\n',Z3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.13: Obtaining_the_z_and_y_and_ABCD_parameters_and_the_equivalent_pi_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"y11=0.5;y12=-0.2;y21=-0.2;y22=1;\n", +"Y2=-y12;\n", +"Y1=y11-Y2;\n", +"Y3=y22-Y2;\n", +"deltay=(y11*y22)-(y12*y21);\n", +"z11=y22/deltay;\n", +"z22=y11/deltay;\n", +"z12=y12/deltay;\n", +"z21=z12;\n", +"A=-y22/y12;\n", +"B=-1/y12;\n", +"C=-deltay/y12;\n", +"D=-y11/y12;\n", +"printf('The y parameters are\n');\n", +"printf(' y11 = %f mho\n',y11);\n", +"printf(' y12 = %f mho\n',y12);\n", +"printf(' y21 = %f mho\n',y21);\n", +"printf(' y22 = %f mho\n\n',y22);\n", +"printf(' The z parameters are\n');\n", +"printf(' z11 = %f ohm\n',round(z11*1000)/1000);\n", +"printf(' z12 = %f ohm\n',round(z12*10^4)/10^4);\n", +"printf(' z21 = %f ohm\n',round(z21*10^4)/10^4);\n", +"printf(' z22 = %f ohm\n\n',round(z22*1000)/1000);\n", +"printf(' The ABCD parametrs are\n');\n", +"printf(' A = %f\n',A);\n", +"printf(' B = %f ohm\n',B);\n", +"printf(' C = %f mho\n',C);\n", +"printf(' D = %f\n\n',D);\n", +"printf(' The equivalent pi network is\n');\n", +"printf(' Y1 = %f mho\n',Y1);\n", +"printf(' Y2 = %f mho\n',Y2);\n", +"printf(' Y3 = %f mho',Y3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.14: Finding_y_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Y1=1;Y2=2;Y3=1;\n", +"y11=Y1+Y2;\n", +"y12=-Y2;\n", +"y21=y12;\n", +"y22=Y2+Y3;\n", +"Y11=y11+y11;\n", +"Y12=y12+y12;\n", +"Y21=Y12;\n", +"Y22=y22+y22;\n", +"printf('The y-parameters are:\n');\n", +"printf(' Y11 = %f mho\n',Y11);\n", +"printf(' Y12 = %f mho\n',Y12);\n", +"printf(' Y21 = %f mho\n',Y21);\n", +"printf(' Y22 = %f mho\n',Y22);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.15: Determining_the_ABCD_parameters_and_image_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Za=10;Zb=10;Zc=5;\n", +"Ya=1/Za;Yb=1/Zb;Yc=1/Zc;\n", +"A=1+(Za*Yb);\n", +"printf('The ABCD parameters are:\n');\n", +"printf(' A = %f\n',A);\n", +"B=Za+Zb+(Za*Zb*Yc);\n", +"printf(' B = %f ohm\n',B);\n", +"C=Yc;\n", +"printf(' C = %f mho\n',C);\n", +"D=1+(Zb*Yc);\n", +"printf(' D = %f \n\n',D);\n", +"Zi1=sqrt((A*B)/(C*D));\n", +"printf(' Image impedances of the two port network are:\n');\n", +"printf(' Zi1 = %f ohms\n',round(Zi1*10)/10);\n", +"Zi2=sqrt((D*B)/(A*C));\n", +"printf(' Zi2 = %f ohms',round(Zi2*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.17: Determining_the_open_and_short_circuit_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=2;R2=1;R3=1;R4=2;\n", +"A=[R1+R2 R2 -R4;R2 R2+R4 R4;-R1 R1 R4+R3+R1]; \n", +"B=det(A);\n", +"C=[1 R2 -R1;0 R2+R1 R1;0 R4 R4+R3+R1];\n", +"D=det(C);\n", +"E=[1 -R1;0 R4+R3+R1];\n", +"F=[R2+R1 -R1;-R1 R4+R3+R1]; \n", +"G=[R4+R2 0 -R4;R1 1 R4;-R4 0 R4+R2];\n", +"H=[1 R1;0 R4+R3+R1];\n", +"I=[R2+R1 R1;R1 R4+R3+R1]; \n", +"printf('Z1s = %d/%d ohms\n',B,D);\n", +"printf(' Z1o = %d/%d ohms\n',det(F),det(E));\n", +"printf(' Z2s = %d/%d ohms\n',det(A),det(C));\n", +"printf(' Z2o = %d/%d ohms\n',det(I),det(H));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.18: Calculating_y_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=2;R2=1;R3=2;R4=1;R5=2;\n", +"R3=R3/2;\n", +"z11=R2+R1;\n", +"z22=R3+R2;\n", +"z12=R2;\n", +"z21=R2;\n", +"Z11=z11+z11;\n", +"Z12=z12+z12;\n", +"Z21=z21+z21;\n", +"Z22=z22+z22;\n", +"deltaZ=(Z11*Z22)-(Z12*Z21);\n", +"y11=Z22/deltaZ;\n", +"y12=-Z12/deltaZ;\n", +"y21=y12;\n", +"y22=Z11/deltaZ;\n", +"printf('The y-parameters are:\n');\n", +"printf('-y11 = %f mho\n',y11);\n", +"printf('-y12 = %f mho\n',y12);\n", +"printf('-y21 = %f mho\n',y21);\n", +"printf('-y22 = %f mho\n',y22);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.19: Determining_the_image_impedances.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=3;R2=2;R3=2;\n", +"A=(R3+R3+R2+R2)/(R1+R3+R1+R2);\n", +"Zi1=sqrt((R2*(R1+R3)+(R1*R2))/A);\n", +"printf('Zi1 = %f ohms\n',round(Zi1*10)/10);\n", +"Zi2=R2+(R3*(R1+Zi1)/(R3+R1+Zi1));\n", +"printf(' Zi2 = %f ohms\n',round(Zi2*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1: Determining_z_and_y_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1=%i*20;Z2=%i*25;Z3=30;\n", +"Z11=Z1+Z3; //Z11=V1/I1 when I2=0\n", +"Z12=Z3; //Z12=V1/I2 when I1=0\n", +"Z21=Z3; //Z21=V2/I1 when I2=0\n", +"Z22=Z2+Z3; //Z22=V2/I2 when I1=0\n", +"printf('(a)The z-parameters are\n');\n", +"printf(' Z11 = %f + j(%f) ohms\n',real(Z11),imag(Z11));\n", +"printf(' Z12 = %f ohms\n',Z12);\n", +"printf(' Z21 = %f ohms\n',Z21);\n", +"printf(' Z22 = %f + j(%f) ohms\n',real(Z22),imag(Z22));\n", +"deltaz=(Z11*Z22)-(Z12*Z21);\n", +"y11=Z22/deltaz;\n", +"y12=-Z12/deltaz;\n", +"y21=-Z21/deltaz;\n", +"y22=Z11/deltaz;\n", +"\n", +"printf('(b)The y-parameters are\n');\n", +"printf(' y11 = %f + j(%f) mhos\n',real(y11),imag(y11));\n", +"printf(' y12 = %f + j(%f) mhos\n',real(y12),imag(y12));\n", +"printf(' y21 = %f + j(%f) mhos\n',real(y21),imag(y21));\n", +"printf(' y22 = %f + j(%f) mhos\n',real(y22),imag(y22));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2: Obtaining_the_open_circuit_impedance_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"L=1;C=1;R=1;\n", +"printf('z11 = s + %d ohms\n',C);\n", +"printf(' z21 = %d ohms\n',C);\n", +"printf(' z22 = 1/s + %d ohms\n',C);\n", +"printf(' z12 = %d ohms\n',C);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.3: Finding_driving_point_and_transfer_impedances_and_loop_equations_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Voc2=100;I1=10;V2=25;\n", +"Voc1=100;I2=20;V1=50;\n", +"z11=Voc1/I1;\n", +"z21=V2/I1;\n", +"z22=Voc2/I2;\n", +"z12=V1/I2;\n", +"printf('(a)The driving point impedances are:\n');\n", +"printf(' z11 = %f ohms\n',z11);\n", +"printf(' z22 = %f ohms\n\n',z22);\n", +"printf(' The transfer impedances are:\n');\n", +"printf(' z12 = %f ohms\n',z12);\n", +"printf(' z21 = %f ohms\n\n',z21);\n", +"printf(' The loop equations are:\n');\n", +"printf(' V1= %f*I1 + %f*I2\n',z11,z12);\n", +"printf(' V2= %f*I1+ %f*I2\n\n',z21,z22);\n", +"Rl=10;\n", +"a=[z11 z12 ; z21 (z22+Rl)];\n", +"b=[100 ; 0];\n", +"b=inv(a)*b;\n", +"I2=b(2,1);\n", +"Vl=-I2*Rl;\n", +"printf('(b)Voltage across resistor = %f volts',round(Vl*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.4: Computing_y_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"z11=10;z22=12;z12=5;z21=5;\n", +"deltaz=(z11*z22)-(z12*z21);\n", +"y11=z22/deltaz;\n", +"printf('The y-parameters are:\n');\n", +"printf('-y11 = %f mho\n',round(y11*10^4)/10^4);\n", +"y22=z11/deltaz;\n", +"printf('-y22 = %f mho\n',round(y22*10^4)/10^4);\n", +"y12=-z12/deltaz;\n", +"printf('-y12 = %f mho\n',round(y12*10^3)/10^3);\n", +"y21=y12;\n", +"printf('-y21 = %f mho',round(y21*10^3)/10^3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.5: Finding_the_z_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Y1=1;Y2=1;Y3=2;V3=3;\n", +"Z1=1/Y1;Z2=1/Y2;Z3=1/Y3;\n", +"V1=1;I1=-1;\n", +"z11=V1/I1;\n", +"V2=1;I2=3;\n", +"z22=V2/I2;\n", +"z21=V2/I1;\n", +"printf('z11 = %f ohms\n',z11);\n", +"printf(' z22 = %f ohms\n',z22);\n", +"printf(' z21 = %f ohms\n',z21);\n", +"printf(' z11 = %f ohms\n',0);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.6: Computing_h_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Vs1=25;Is1=1;Is2=2; //values with output terminal short circuited\n", +"Vo1=10;Vo2=50;Io2=2; //values with input terminal open circuited\n", +"Vs2=0;\n", +"h11=Vs1/Is1;\n", +"printf('The h-parameters are:\n');\n", +"printf('-h11 = %f ohms\n',h11); //with output terminals short circuited\n", +"h21=Is2/Is1;\n", +"printf('-h21 = %f\n',h21); //with input terminals open circuited\n", +"h12=Vo1/Vo2;\n", +"printf('-h12 = %f\n',h12); //with input terminals open circuited\n", +"h22=Io2/Vo2;\n", +"printf('-h22 = %f mho',h22); //with output terminals short circuited\n", +"//the difference in result of h22 is due to erroneous value in textbook.\n", +"disp('The difference in result of h22 is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.7: Calculating_transmission_parameters_and_loop_equations.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"z11=40;z22=30;z12=20;z21=20;\n", +"deltaz=(z11*z22)-(z12*z21);\n", +"A=z11/z12;\n", +"printf('The transmission parameters are:\n');\n", +"printf(' A = %f\n',A);\n", +"B=deltaz/z21;\n", +"printf(' B = %f ohms\n',B);\n", +"C=1/z21;\n", +"printf(' C = %f mho\n',C);\n", +"D=z22/z21;\n", +"printf(' D = %f\n',D);\n", +"printf(' The network equations using z-parameter are\n');\n", +"printf(' V1 = %fI1 + %fI2\n',z11,z12);\n", +"printf(' V2 = %fI1 + %fI2\n',z21,z22);\n", +"printf(' The network equations using ABCD parameter are\n');\n", +"printf(' V1 = %fV2 - %fI2\n',A,B);\n", +"printf(' I1 = %fV2 - %fI2\n',C,D);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.8: Obtaining_the_transmission_parameters.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"V1=1;R1=1;R2=2;R3=1;R4=2;I2=0;\n", +"//I2=0 because port 2-2' has been open circuited\n", +"a=[R1+R2 -R2;-2 5];\n", +"b=[1;0];\n", +"b=inv(a)*b;\n", +"I1=b(1,1);\n", +"I3=b(2,1);\n", +"V2=I3*R4;\n", +"A=V1/V2;\n", +"C=I1/V2;\n", +"V21=0; //because port 2-2' has been short circuited\n", +"c=[3 -2;-2 3];\n", +"d=[1;0];\n", +"d=inv(c)*d;\n", +"I11=d(1,1);\n", +"I21=d(2,1);\n", +"B=V1/I21;\n", +"D=I11/I21;\n", +"R=(A*D)-(B*C);\n", +"printf('The transmission parameters are:\n');\n", +"printf(' A = %f\n',A);\n", +"printf(' B = %f ohms\n',B);\n", +"printf(' C = %f mhos\n',C);\n", +"printf(' D = %f\n\n',D);\n", +"printf(' AD-BC = %f . Hence the circuit is reciprocal.',R);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.9: Calculating_input_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rl=3;z11=5;z12=2;z21=2;z22=1;\n", +"Zi=z11-(z12/z21);\n", +"printf('Input impedance = %f ohms',Zi);" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/14-Filters.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/14-Filters.ipynb new file mode 100644 index 0000000..1f47667 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/14-Filters.ipynb @@ -0,0 +1,773 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Filters" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10: Designing_a_high_pass_composite_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=1.2*(10^3);fi=1.1*(10^3);Rk=600; //fi=frequency at which infinite attenuation occrus\n", +"L0=Rk/(4*%pi*fc);\n", +"C0=1/(4*%pi*fc*Rk);\n", +"printf('The elements of the constant-K H.P. are:\n');\n", +"printf(' L = %f mH\n',fix(L0*(10^3)*100)/100);\n", +"printf(' C = %f microfarads\n\n',fix(C0*(10^6)*100)/100);\n", +"m1=round(sqrt(1-((fi/fc)^2))*10)/10;\n", +"C1=2*C0/m1;\n", +"L1=L0/m1;\n", +"C2=4*m1*C0/(1-(m1*m1));\n", +"printf('The elements of the m-derived H.P.T. filter are:\n');\n", +"printf(' 2C/m = %f microfarads\n',fix(C1*(10^6)*100)/100);\n", +"printf(' L/m = %f mH\n',round(L1*(10^3)*10)/10);\n", +"printf(' 4mC/(1-m^2) = %f microfarads\n\n',fix(C2*(10^6)*100)/100);\n", +"m2=0.6;\n", +"C3=2*C0/m2;\n", +"L2=L0/m2;\n", +"C4=4*m2*C0/(1-(m2*m2));\n", +"printf('The elements of the terminating half section m-derived H.P.T. filter are:\n');\n", +"printf(' 2C/m = %f microfarads\n',round(C3*(10^6)*100)/100);\n", +"printf(' L/m = %f mH\n',round(L2*(10^3)*100)/100);\n", +"printf(' 4mC/(1-m^2) = %f microfarads\n\n',round(C4*(10^6)*100)/100);\n", +"printf('The complete composite filter is constructed by using the constant-K in cascade with the sharp-cut off m-derived section and terminating half section');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.11: Designing_a_high_pass_filter_and_finding_the_frequency_of_peak_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=1*(10^6);Rk=75;m=0.6;\n", +"L0=Rk/(4*%pi*fc);\n", +"C0=1/(4*%pi*fc*Rk);\n", +"printf('The elements of the prototype T-section H.P. are:\n');\n", +"printf(' L = %f mH\n',round(L0*(10^3)*1000)/1000);\n", +"printf(' C = %f picofarads\n\n',round(C0*(10^12)));\n", +"C1=2*C0/m;\n", +"L1=L0/m;\n", +"C2=4*m*C0/(1-(m*m));\n", +"printf(' The elements of the terminating half section m-derived H.P.T. filter are:\n');\n", +"printf(' 2C/m = %f picofarads\n',fix(C1*(10^12)));\n", +"printf(' L/m = %f mH\n',round(L1*(10^6))/1000);\n", +"printf(' Cshunt = %f picofarads\n\n',round(C2*(10^12)));\n", +"fi=fc*sqrt(1-(m*m));\n", +"printf(' Frequency of peak attenuation = %d kHz',fi*(10^-3));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.12: Designing_a_low_pass_composite_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rk=500;fc=1000;fi1=1065;fi2=1250;\n", +"L0=Rk/(%pi*fc);\n", +"C0=1/(%pi*fc*Rk);\n", +"printf('The elements of the constant-K L.P. are:\n');\n", +"printf(' L = %f mH\n',round(L0*(10^3)));\n", +"printf(' C = %f microfarads\n\n',round(C0*(10^6)*100)/100);\n", +"m1=0.4\n", +"L1=m1*L0/2;\n", +"L2=(1-(m1*m1))*L0/(4*m1);\n", +"C1=m1*C0;\n", +"printf('The elements of the m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',round(L1*(10^3)*10)/10);\n", +"printf(' mC = %f microfarads\n',round(C1*(10^6)*1000)/1000);\n", +"printf(' (1-m^2)L/4m = %f mH\n\n',fix(L2*(10^3)*10)/10);\n", +"m2=sqrt(1-((fc/fi2)^2));\n", +"L3=m2*L0/2;\n", +"L4=(1-(m2*m2))*L0/(4*m2);\n", +"C2=m2*C0;\n", +"printf('The elements of the terminating half sections m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',fix(L3*(10^3)*10)/10);\n", +"printf(' C = %f microfarads\n',round(C2*(10^6)*1000)/1000);\n", +"printf(' Lshunt = %f mH\n\n',fix(L4*(10^3)*10)/10);\n", +"printf('The complete composite filter is constructed by using the constant-K in cascade with the short-cut of m-derived section and terminating half section');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.13: Designing_a_prototype_band_pass_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f1=1000;f2=4000;Rk=600;\n", +"C1=(f2-f1)/(4*%pi*Rk*f1*f2);\n", +"L1=Rk/(%pi*(f2-f1));\n", +"C2=1/(%pi*Rk*(f2-f1));\n", +"L2=Rk*(f2-f1)/(4*%pi*f1*f2);\n", +"printf('The elements of the prototype band pass filter are:\n');\n", +"printf(' L1 = %f mH\n',fix(L1*(10^5))/100);\n", +"printf(' C1 = %f microfarads\n',round(C1*(10^11))/10^5);\n", +"printf(' L2 = %f mH\n',round(L2*(10^4))/10);\n", +"printf(' C2 = %f microfarads',round(C2*(10^10))/10^4);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.14: Designing_a_prototype_T_section_of_a_band_pass_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f1=12000;f2=16000;Rk=600;\n", +"C1=(f2-f1)/(4*%pi*Rk*f1*f2);\n", +"L1=Rk/(%pi*(f2-f1));\n", +"C2=1/(%pi*Rk*(f2-f1));\n", +"L2=Rk*(f2-f1)/(4*%pi*f1*f2);\n", +"printf('The elements of the prototype band pass filter are:\n');\n", +"printf(' L1 = %f mH\n',round(L1*(10^5))/100);\n", +"printf(' C1 = %f picofarads\n',round(C1*(10^12)));\n", +"printf(' L2 = %f mH\n',L2*(10^3));\n", +"printf(' C2 = %f microfarads',C2*(10^6));\n", +"//the difference in result of L2 and C2 is due to erroneous value in textbook.\n", +"disp('The difference in result of C2 and L2 is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.15: Designing_a_m_derived_low_pass_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=5000;fi=1.25*fc;Rk=600; //fi=frequency at which infinite attenuation occus\n", +"L0=Rk/(%pi*fc);\n", +"C0=1/(%pi*fc*Rk);\n", +"m=sqrt(1-((fc/fi)^2));\n", +"L1=m*L0/2;\n", +"L2=(1-(m*m))*L0/(4*m);\n", +"C1=m*C0;\n", +"printf('The elements of the m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',round(L1*(10^5))/100);\n", +"printf(' mC = %f microfarads\n',fix(C1*(10^10))/10^4);\n", +"printf(' (1-m^2)L/4m = %f mH',round(L2*(10^4))/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.16: Determining_the_values_of_shun_arm_of_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"L=0.5*(10^-3);C=0.01*(10^-6);Rk=600;\n", +"L1=2*L;\n", +"C1=C/2;\n", +"L2=Rk*Rk*C1;\n", +"C2=L1/(Rk*Rk);\n", +"printf('The elements of the shunt arm will be an inductance of %f mH in parallel with a capacitance of %f microfarads',L2*(10^3),round(C2*(10^10))/10^4);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.17: Designing_a_low_pass_composite_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=2400;fi=2500;Rk=600; //fi=frequency at which infinite attenuation occus\n", +"L0=Rk/(3.14*fc);\n", +"C0=1/(3.14*fc*Rk);\n", +"printf('The elements of the constant-K L.P. are:\n');\n", +"printf(' L = %f mH\n',round(L0*(10^5))/100);\n", +"printf(' C = %f microfarads\n\n',round(C0*(10^10))/10^4);\n", +"m1=sqrt(1-((fc/fi)^2));\n", +"L1=m1*L0/2;\n", +"L2=(1-(m1*m1))*L0/(4*m1);\n", +"C1=m1*C0;\n", +"printf('The elements of the m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',round(L1*(10^5))/100);\n", +"printf(' mC = %f microfarads\n',round(C1*(10^10))/10^4);\n", +"printf(' (1-m^2)L/4m = %f mH\n\n',round(L2*(10^5))/100);\n", +"m2=0.6;\n", +"L3=m2*L0/2;\n", +"L4=(1-(m2*m2))*L0/(2*m2);\n", +"C2=m2*C0/2;\n", +"printf('The elements of the terminating half sections m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',round(L3*(10^5))/100);\n", +"printf(' mC/2 = %f microfarads\n',round(C2*(10^10))/10^4);\n", +"printf(' (1-m^2)L/2m = %f mH\n\n',fix(L4*(10^5))/100);\n", +"printf('The complete composite filter is constructed by using the constant-K in cascade with the short-cut of m-derived section and terminating half section');\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.18: Determining_the_cut_off_frequency_and_characteristic_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"C0=1*(10^-6);L0=10*(10^-3);\n", +"C=C0/2;\n", +"L=L0;\n", +"Rk1=sqrt(L/C);\n", +"fc1=1/(4*%pi*sqrt(L*C));\n", +"printf('The cut-off frequency(high pass) = %f Hz\n',round(fc1));\n", +"printf(' The characteristic impedance(high pass) = %f ohms\n\n',round(Rk1*10)/10);\n", +"C1=C0*2;\n", +"Rk2=sqrt(L/C1);\n", +"fc2=1/(%pi*sqrt(L*C1));\n", +"printf(' The cut-off frequency(low pass) = %f Hz\n',fix(fc2));\n", +"printf(' The characteristic impedance(low pass) = %f ohms',fix(Rk2*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.19: Designing_a_low_pass_composite_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rk=500;fc=4000;fi=5000; //fi=frequency at which infinite attenuation occurs\n", +"L0=Rk/(%pi*fc);\n", +"C0=1/(%pi*fc*Rk);\n", +"printf('The elements of the constant-K L.P. are:\n');\n", +"printf(' L = %f mH\n',round(L0*(10^4))/10);\n", +"printf(' C = %f microfarads\n\n',round(C0*(10^9))/1000);\n", +"m1=sqrt(1-((fc/fi)^2));\n", +"L1=m1*L0/2;\n", +"L2=(1-(m1*m1))*L0/(4*m1);\n", +"C1=m1*C0;\n", +"printf('The elements of the m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',round(L1*(10^5))/100);\n", +"printf(' C = %f microfarads\n',round(C1*(10^10))/10^4);\n", +"printf(' Lshunt = %f mH\n\n',round(L2*(10^5))/100);\n", +"m2=0.6;\n", +"L3=m2*L0/2;\n", +"L4=(1-(m2*m2))*L0/(2*m2);\n", +"C2=m2*C0/2;\n", +"printf('The elements of the terminating half sections m-derived L.P.T. filter are:\n');\n", +"printf(' Lseris = %f mH\n',round(L3*(10^5))/100);\n", +"printf(' C = %f microfarads\n',round(C2*(10^10))/10^4);\n", +"printf(' Lshunt = %f mH\n\n',round(L4*(10^5))/100);\n", +"printf('The complete composite filter is constructed by using the constant-K in cascade with the short-cut of m-derived section and terminating half section');\n", +"//the difference in result of the elements of the m derived L.P. T section is due to erroneous value in textbook.\n", +"disp('The difference in result of the elements of the m derived L.P. T section is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1: Calculating_values_of_inductor_and_capacitor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rk=600;fc=3000;\n", +"L=Rk/(%pi*fc);\n", +"printf('-Desired value of inductor L = %f mH\n',round(L*(10^3)*10)/10);\n", +"C=1/(%pi*Rk*fc);\n", +"printf('-Desired value of capacitor C = %f microfarads',round(C*(10^6)*10^4)/10^4);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.20: Determining_the_second_resonance_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fr=1*(10^6);C=0.04*(10^-12);C1=6*(10^-12);\n", +"fa=fr*(1+(C/(2*C1)));\n", +"printf('The second resonance frequency = %f MHz',round(fa*(10^-2))/10^4);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.21: Computing_the_values_of_elements_of_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rk=600;f1=120*(10^3);f2=123*(10^3);\n", +"C1=(f2-f1)/(4*%pi*Rk*f1*f2);\n", +"L1=Rk/(%pi*(f2-f1));\n", +"C2=L1/(Rk*Rk);\n", +"L2=Rk*(f2-f1)/(4*%pi*f1*f2);\n", +"printf('The elements of the T-type constant k band pass filter are:\n');\n", +"printf(' L1 = %f mH\n',fix((L1)*(10^4))/10);\n", +"printf(' C1 = %f picofarads\n',fix((C1)*(10^14))/100);\n", +"printf(' L2 = %f microhenry\n',fix((L2)*(10^7))/10);\n", +"printf(' C2 = %f microfarads',round((C2)*(10^9))/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.22: Calculating_bandwidth.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"C=1/100;fo=1000; //C=C1/C2\n", +"//value of fo as taken in solution\n", +"f1=fo*((sqrt(C+1))-sqrt(C));\n", +"f2=fo*((sqrt(C+1))+sqrt(C));\n", +"BW=f2-f1;\n", +"printf('Bandwidth = %d Hz',(BW));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.23: Finding_the_values_of_the_elements_of_a_prototype_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ro=600;f=120;fo=1500; //f=f2-f1\n", +"F=fo*fo; //F=f1*f2\n", +"l1=Ro/(2*%pi*f);\n", +"c1=round(f*10^11/(2*Ro*%pi*F))/10^5;\n", +"c2=round(1*10^8/(%pi*Ro*f))/100;\n", +"l2=Ro*f/(4*%pi*F);\n", +"n=(1/2)*(sqrt(((2*c2/(c1/2))+9)-1));\n", +"C1=((2*n)-1)*c1*10^-6/(2*n);\n", +"C2=c1*10^-6/n;\n", +"L=n*n*l2;\n", +"C3=c2*10^-6/(n*n);\n", +"printf('The elements of the filter are:\n');\n", +"printf(' (2n-1)C1/n = %f microfarads\n',fix(C1*(10^9))/1000);\n", +"printf(' 2C1/n = %f microfarads\n',fix((C2)*(10^10))/10^4);\n", +"printf(' (n^2)L2 = %f H\n',round(L*10)/10);\n", +"printf(' C2/(n^2) = %f microfards',round((C3)*(10^9))/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2: Calculating_cut_off_frequency_and_attenuation_and_phase_shift.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"L=20*(10^-3);C=0.32*(10^-6);f=15*(10^3);\n", +"fc=(1/(3.14*(sqrt(L*C))));\n", +"printf('Cutoff frequency fc = %f kHz\n',fix(fc*0.1)/100);\n", +"Rk=sqrt(L/C);\n", +"printf(' Value of nominal terminating impedance Rk = %f ohms\n',fix(Rk*10)/10);\n", +"a=2*(acosh(f/fc));\n", +"printf(' Value of attenuation a = %f db\n',fix(a*8.686*100)/100);\n", +"printf(' Phase shift of the low pass filter = pi radians');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3: Calculating_value_of_L_and_C.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=10*(10^3);Rk=600;\n", +"L=Rk/(4*%pi*fc);\n", +"printf('-Value of L = %f mH\n',fix(L*(10^3)*10^3)/10^3);\n", +"C=1/(4*%pi*fc*Rk);\n", +"printf('-Value of C = %f microfarads',fix(C*(10^6)*10^5)/10^5);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4: EX14_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"L=60*(10^-3);C=0.2*(10^-6);\n", +"fc=1/(%pi*(sqrt(L*C)));\n", +"printf('(i)Cut off frequency fc for the low pass filter = %f kHz\n\n',round(fc*(10^-1))/100);\n", +"fa=1000;\n", +"Za=(sqrt(L/C))*(sqrt(1-((fa/fc)^2)));\n", +"printf(' (ii)Iterative impedance at f=1 KHz = %f ohms\n',fix(Za));\n", +"fb=5000;\n", +"Zb=(sqrt(L/C))*(sqrt(1-((fb/fc)^2)));\n", +"printf(' Iterative impedance at f=5 KHz = j(%f) ohms\n\n',fix(Zb/%i));\n", +"aa=0; //attenuation at frequency fa\n", +"ba=2*(asind(fa/fc)); //phase shift at frequency fa\n", +"ab=2*acosh(fb/fc); //attenuation at frequency fb\n", +"bb=180; //attenuation at frequency fb\n", +"V1=exp(aa); //V1=(Vin/Vout) at frequency of 1kHz\n", +"V2=exp(ab); //V2=(Vin/Vout) at frequency of 5kHz\n", +"printf(' (iii)At 5kHz,the voltage ratio = %f and phase difference = %f degrees\n',round(V2*10)/10,bb);\n", +"printf(' At 1kHz,the voltage ratio = %f and phase difference = %f degrees\n',V1,fix(ba*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.5: Determining_the_elements_of_a_prototype_HP_T_section_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=1000;Rk=600;\n", +"L=Rk/(4*%pi*fc);\n", +"C=1/(4*%pi*fc*Rk);\n", +"printf('Thus,the series elements are two capacitors of value %f microfarad each and shunt inductance of value %f mH.',round(C*(10^3)*10^6)/10^5,fix(L*(10^3)*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6: Calculating_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"a=1.15;\n", +"F=cosh(a/2);\n", +"printf('The frequency at which low pass filter will havean attenuation 10 db will be %f times the cut off frequency',round(F*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.7: Designing_a_m_derived_T_section_low_pass_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Rk=600;fc=1000;fi=1050;\n", +"L0=Rk/(%pi*fc);\n", +"C0=1/(%pi*fc*Rk);\n", +"m=round(sqrt(1-((fc/fi)^2))*10)/10;\n", +"L1=m*L0/2;\n", +"printf('-mL/2 = %f mH\n',round(L1*(10^3)*100)/100);\n", +"C=m*C0;\n", +"printf('-mC = %f microfarads\n',round(C*(10^6)*1000)/1000);\n", +"L2=L0*((1-(m*m))/(4*m));\n", +"printf('-(1-m^2)L/(4m) = %f mH',L2*(10^3));\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.8: Designing_an_m_derived_T_section_high_pass_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=20*(10^3);Rk=600;m=0.6;\n", +"L0=Rk/(4*%pi*fc);\n", +"C0=1/(4*%pi*fc*Rk);\n", +"C1=2*C0/m;\n", +"printf('-2C/m = %f microfarads\n',round(C1*(10^6)*1000)/1000);\n", +"L=L0/m;\n", +"printf('-L/m = %f mH\n',round(L*(10^3)*100)/100)\n", +"C2=C0*((4*m)/(1-(m*m)));\n", +"printf('-4mC/(1-m^2) = %f microfarads',round(C2*(10^6)*1000)/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.9: Designing_a_low_pass_filter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"fc=2000;fi=2050;Rk=500; //fi=frequency at which infinite attenuation occurs\n", +"L0=Rk/(%pi*fc);\n", +"C0=1/(%pi*fc*Rk);\n", +"printf('The elements of the constant-K L.P. are:\n');\n", +"printf(' L = %f mH\n',fix(L0*(10^3)*10)/10);\n", +"printf(' C = %f microfarads\n\n',fix(C0*(10^6)*1000)/1000);\n", +"m1=round(sqrt(1-((fc/fi)^2))*100)/100;\n", +"L1=m1*L0/2;\n", +"L2=(1-(m1*m1))*L0/(4*m1);\n", +"C1=m1*C0;\n", +"printf('The elements of the m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',fix(L1*(10^3)*100)/100);\n", +"printf(' mC = %f microfarads\n',fix(C1*(10^6)*100)/100);\n", +"printf(' (1-m^2)L/4m = %f mH\n\n',fix(L2*(10^3)*100)/100);\n", +"m2=0.6;\n", +"L3=m2*L0/2;\n", +"L4=(1-(m2*m2))*L0/(4*m2);\n", +"C2=m2*C0;\n", +"printf('The elements of the terminating half sections m-derived L.P.T. filter are:\n');\n", +"printf(' mL/2 = %f mH\n',fix(L3*(10^3)*10)/10);\n", +"printf(' mC = %f microfarads\n',fix(C2*(10^6)*10000)/10000);\n", +"printf(' (1-m^2)L/4m = %f mH\n\n',fix(L4*(10^3)*10)/10);\n", +"printf('The complete composite filter is constructed by using the constant-K in cascade with the short-cut of m-derived section and terminating half section');" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/15-Equalizers.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/15-Equalizers.ipynb new file mode 100644 index 0000000..4ed1607 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/15-Equalizers.ipynb @@ -0,0 +1,261 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Equalizers" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.10: Calculating_value_of_R_and_L.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=1;C=0.05;R0=1;\n", +"R2=R0*R0/R1;\n", +"printf('-Series arm will have a resistance R2 = %f ohms\n',R2);\n", +"L=C*R0*R0;\n", +"printf(' -Value of inductance in parallel with R2 = %f henry',L);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.11: Designing_a_constant_resistance_equalizer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=500;Ro=400;f1=50;D1=17;\n", +"M1=10^(D1/10);\n", +"D2=4;f2=2500;\n", +"M2=10^(D2/10);\n", +"B=sqrt(((f1*f1*(M1-1))-(f2*f2*(M2-1)))/(M2-M1));\n", +"A=sqrt((B*B*M2)+(f2*f2*(M2-1)));\n", +"L11=Ro/(%pi*(A+B));\n", +"L12=Ro/(%pi*(A-B));\n", +"R11=L11*%pi*(A-B);\n", +"R12=L12*%pi*(A+B);\n", +"R21=Ro*Ro/R11;\n", +"R22=Ro*Ro/R12;\n", +"C21=L11/(Ro*Ro);\n", +"C22=L12/(Ro*Ro);\n", +"printf('The designed equalizer will have the configuration:\n');\n", +"printf(' I. R1 = %f ohms, C2 = %f microfarads, R2 = %f ohms, L1 = %f mH\n',round(R11),round(C21*(10^9))/1000,fix(R21),round(L11*(10^4))/10);\n", +"printf(' II. R1 = %f ohms, C2 = %f microfarads, R2 = %f ohms, L1 = %f mH\n\n',fix(R12),round(C22*(10^9))/1000,round(R22),round(L12*(10^3)));\n", +"M=((A*A)+(f*f))/((B*B)+(f*f));\n", +"F=10*log10(M);\n", +"printf(' Loss aat 500Hz = %f db',fix(F*10)/10);\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.12: Designing_a_constant_resistance_equalizer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R0=600;D=10;b=10/6;fr=8.5*(10^3);\n", +"k=round((10^(D/20)*100))/100;\n", +"fb=fr/b;\n", +"Cb=1/(2*%pi*fb*R0);\n", +"Lb=R0/(2*%pi*fb);\n", +"printf('The desired bridged-T constant resistance equalizer will be as:\n');\n", +"printf('-Ro = %f ohms\n',R0);\n", +"L1=Lb*((k-1)/sqrt(k))*(((b*b)-1)/(b*b));\n", +"printf('-L1 = %f Henry\n',round(L1*10^4)/10^4);\n", +"C1=Cb*(sqrt(k)/(k-1))*(1/((b*b)-1));\n", +"printf('-C1 = %f microfarads\n',round(C1*(10^10))/10^4);\n", +"L2=Lb*((sqrt(k))/(k-1))*(1/((b*b)-1));\n", +"printf('-L2 = %f Henry\n',round(L2*10^5)/10^5);\n", +"C2=Cb*((k-1)/sqrt(k))*(((b*b)-1)/(b*b));\n", +"printf('-C2 = %f microfarads\n',round(C2*(10^10))/10^4);\n", +"R1=R0*(k-1);\n", +"printf('-R1 = %f ohms\n',round(R1));\n", +"R2=R0/(k-1);\n", +"printf('-R2 = %f ohms',round(R2));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.13: Designing_a_lattice_equalizer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f1=200;f2=2400;Li=2.6;Lc1=0.494;Lc2=1.949;Ro=600;\n", +"//Li=total insertion loss\n", +"//value of f1 as taken in solution\n", +"//Lc=cable loss\n", +"Le1=Li-Lc1; //Le=equalizer loss\n", +"Le2=Li-Lc2;\n", +"M1=fix(exp(2*Le1));\n", +"M2=round(exp(2*Le2)*100)/100;\n", +"Q=((f2*f2*(M2-1))-(f1*f1*(M1-1)))/(M1-M2);\n", +"P=(f1*f1*(M1-1))+(M1*Q);\n", +"R11b=Ro*(sqrt(P)+sqrt(Q))/(sqrt(P)-sqrt(Q));\n", +"R21b=Ro*Ro/R11b;\n", +"L12b=Ro/(%pi*(sqrt(P)-sqrt(Q)));\n", +"C22b=L12b/(Ro*Ro);\n", +"L12a=Ro/(%pi*(sqrt(P)+sqrt(Q)));\n", +"R11a=Ro*(sqrt(P)-sqrt(Q))/(sqrt(P)+sqrt(Q));\n", +"R21a=Ro*Ro/R11a;\n", +"C22a=L12a/(Ro*Ro);\n", +"printf('The required equalizer will have the folllowing configuration:\n');\n", +"printf('I. R11 = %f ohms\n',fix(R11a));\n", +"printf('-L12 = %f mH\n',round(L12a*(10^4))/10);\n", +"printf('-R21 = %f ohms\n',round(R21a));\n", +"printf('-C22 = %f microfarads\n\n',round(C22a*(10^9))/10^3);\n", +"printf('II. R11 = %f ohms\n',round(R11b));\n", +"printf('-L12 = %f mH\n',fix(L12b*(10^4))/10);\n", +"printf('-R21 = %f ohms\n',round(R21b*100)/100);\n", +"printf('-C22 = %f microfarads',fix(C22b*(10^9))/10^3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.4: Finding_the_elements_of_the_lattice.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R0=600;R1=400;L=40*(10^-3);\n", +"R2=R0*R0/R1;\n", +"printf('-Other arm of lattice equalizer will have a resistance of R2 = %f ohms\n',R2);\n", +"C=L/(R0*R0);\n", +"printf(' -R2 resistance will be in parallel with a capacitance of C = %f microfarads',round(C*(10^8))/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.5: Calculating_values_of_L_and_C.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=600;f=4000;\n", +"a=3;\n", +"w=2*%pi*f;\n", +"C=sqrt((exp(2*3*0.115)-1)/(4*w*w*R*R));\n", +"printf('-C = %f microfarads\n',round(C*(10^9))/1000);\n", +"L=2*C*R*R;\n", +"printf(' -L = %f mH',fix(L*(10^5))/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.6: EX15_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=1000;C1=0.0212*(10^-6);R2=250;\n", +"R0=sqrt(R1*R2);\n", +"printf('Characteristic impedance of line = %f ohms\n',R0);\n", +"L2=C1*R0*R0;\n", +"printf('Components of the shunt arm are inductance of %f mH in parallel with a given resistance of %f ohms.',L2*(10^3),R0);" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/16-Attenuators.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/16-Attenuators.ipynb new file mode 100644 index 0000000..4a7dfa4 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/16-Attenuators.ipynb @@ -0,0 +1,558 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 16: Attenuators" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.10: Designing_a_T_pad.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ri1=50;Ri2=200;p=5;\n", +"d=p/100;\n", +"Ai=atanh(1/(1+d));A=fix(Ai*100)/100;\n", +"R3=(sqrt(Ri1*Ri2))/sinh(A);\n", +"R2=(Ri2/tanh(A))-R3;\n", +"R1=(Ri1/tanh(A))-R3;\n", +"printf('The desired elements of T-pad are:\n');\n", +"printf(' R1 = %f ohms\n',round(R1));\n", +"printf(' R2 = %f ohms\n',fix(R2*10)/10);\n", +"printf(' R3 = %f ohms\n',round(R3*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.11: Designing_an_unbalances_pi_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=20;Ri1=200;Ri2=500;\n", +"Ai=D*0.115;\n", +"Gi1=1/Ri1;Gi2=1/Ri2;\n", +"G3=(sqrt(Gi1*Gi2))/sinh(Ai);\n", +"G2=(Gi2/tanh(Ai))-G3;\n", +"G1=(Gi1/tanh(Ai))-G3;\n", +"R3=1/G3;R2=1/G2;R1=1/G1;\n", +"printf('The desired pi attenuator will be:\n');\n", +"printf(' R1 = %f ohms\n',round(R1*10)/10);\n", +"printf(' R2 = %f ohms\n',round(R2*10)/10);\n", +"printf(' R3 = %f ohms\n',round(R3));\n", +"//the difference in result of R3 is due to erroneous value in textbook.\n", +"disp('The difference in result of R3 is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.12: Designing_a_T_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=500;R2=110;\n", +"Ro=sqrt((2*2*R1*R1/4)+(2*R1*R2));\n", +"a=acosh(1+(2*R1/(2*R2)));\n", +"Ri1=Ro;Ri2=150;Ai=round(a*10)/10;\n", +"R3=(sqrt(Ri1*Ri2))/(fix(sinh(Ai)*100)/100);\n", +"R2=(Ri2/(round(tanh(Ai)*10^4)/10^4))-(fix(R3*100)/100);\n", +"R1=(Ri1/(round(tanh(Ai)*10^4)/10^4))-R3;\n", +"printf('The desired elements of the attenuator are:\n');\n", +"printf('R1 = %f ohms\n',fix(R1*100)/100);\n", +"printf('R2 = %f ohms\n',fix(R2*100)/100);\n", +"printf('R3 = %f ohms\n',fix(R3*100)/100);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.13: Designing_a_ladder_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ro=600;D=5;\n", +"N=10^(D/20);\n", +"R1=Ro*(N+1)/(N-1);\n", +"R2=Ro*((N*N)-1)/(2*N);\n", +"printf('The desired ladder attenuator will be:\n');\n", +"printf('R1 = %f ohms\n',round(R1));\n", +"printf('R2 = %f ohms\n',round(R2));\n", +"//the difference in result of R1 is due to erroneous value in textbook.\n", +"disp('The difference in result of R1 is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.14: Designing_an_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"d=12;Ro=500;\n", +"D=(d-3)/3;\n", +"N=round(10^(D/20)*1000)/1000;\n", +"R1=Ro*(N+1)/(N-1);\n", +"R2=Ro*(round((N*N))-1)/(2*N);\n", +"printf('The desired attenuator will be:\n');\n", +"printf('R1 = %f ohms\n',round(R1));\n", +"printf('R2 = %f ohms\n',round(R2));\n", +"//the difference in result of R1 is due to erroneous value in textbook.\n", +"disp('The difference in result of R1 is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.15: Designing_a_balanced_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"d1=0;d2=5;d3=10;d4=15;d5=20;Ro=600;\n", +"printf('For 0 db loss:\n');\n", +"printf(' R1 = 0\n R2 = infinite\n\n');\n", +"n=4;\n", +"for i=1:n\n", +" N=10^(5*i/20);\n", +" R2=Ro*(N-1);\n", +" R1=Ro/(N-1);\n", +" printf('\n For %d db loss:\n',5*i);\n", +" printf(' R1=%f\n',round(R1));\n", +" printf(' R2=%f\n',round(R2));\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.16: EX16_16.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ro=600;R1=240;\n", +"R2=((Ro*Ro)-(4*R1*R1))/(4*R1);\n", +"d=acosh(1+(2*R1/R2));\n", +"printf('Value of shunt resistance = %d ohm\n',R2);\n", +"printf(' Attenuation = %f db',round(d*8.686*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.17: Designing_a_L_type_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ri1=500;d=15;\n", +"P=d/8.686;\n", +"N=exp(P);\n", +"R1=Ri1*(1-(1/N));\n", +"R2=Ri1/(N-1);\n", +"printf('The desired attenuator will be:\n');\n", +"printf(' R1 = %f ohms\n',round(R1));\n", +"printf(' R2 = %f ohms\n',round(R2));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.18: Designing_a_minimum_loss_pad.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ri1=72;Ri2=52;\n", +"R1=Ri1*sqrt(1-(Ri2/Ri1));\n", +"R2=Ri2/sqrt(1-(Ri2/Ri1));\n", +"x=sqrt(Ri1/Ri2);\n", +"L=20*log10(x+(sqrt((x*x)-1)));\n", +"printf('The desired elements will be:\n');\n", +"printf(' R1 = %f ohms\n',round(R1));\n", +"printf(' R2 = %f ohms\n',fix(R2*10)/10);\n", +"printf(' Value of loss produced by the network = %f db',round(L));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.1: Designing_a_symmetrical_bridge_T_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=40;Ro=600;\n", +"N=10^(D/20);\n", +"R3=Ro*(N-1);\n", +"R2=Ro/(N-1);\n", +"R1=Ro;\n", +"printf('R1 = %f ohms\n',R1);\n", +"printf(' R2 = %f ohms\n',round(R2*100)/100);\n", +"printf(' R3 = %f k ohms\n',R3*(10^-3));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.2: Designing_a_T_pad_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=20;Ro=600;\n", +"N=10^(D/20);\n", +"R1=Ro*(N-1)/(N+1);\n", +"R2=Ro*2*N/((N*N)-1);\n", +"printf('R1 = %f ohms\n',round(R1*10)/10);\n", +"printf(' R2 = %f ohms\n',round(R2*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.3: Designing_a_T_type_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=20;Ro=75;\n", +"N=10^(D/20);\n", +"R1=Ro*(N-1)/(N+1);\n", +"R2=Ro*2*N/((N*N)-1);\n", +"printf('R1 = %f ohms\n',round(R1*100)/100);\n", +"printf(' R2 = %f ohms\n',round(R2*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.4: Designing_an_attenuator_and_determining_its_equivalent_T_structure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=20;Ro=500;\n", +"N=10^(D/20);\n", +"R1=Ro*(N-1)/(N+1);\n", +"R2=Ro*(N+1)/(N-1);\n", +"printf('The elements of the attenuator are:\n');\n", +"printf('R1 = %f ohms\n',round(R1*100)/100);\n", +"printf(' R2 = %f ohms\n\n',round(R2*100)/100);\n", +"r1=R1;\n", +"r2=(R2-R1)/2;\n", +"printf('The equivalent T structure of the designed lattice:\n');\n", +"printf(' R1 = %f ohms\n',round(r1*100)/100);\n", +"printf(' R2 = %f ohms\n',round(r2*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.5: Finding_the_elements_of_the_arm_of_a_T_section_symmetrical_resistive_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=15;Ro=75;\n", +"N=10^(D/20);\n", +"R1=Ro*(N-1)/(N+1);\n", +"R2=Ro*2*N/((N*N)-1);\n", +"printf('The arms of the T section will contain:\n');\n", +"printf(' R1 = %f ohms\n',round(R1*100)/100);\n", +"printf(' R2 = %f ohms\n',round(R2*100)/100);\n", +"//the difference in result of R1 is due to erroneous value in textbook.\n", +"disp('The difference in result of R1 is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.6: Calculating_the_characteristic_and_attenuation_per_section_of_an_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R1=175;R2=350;\n", +"y=poly([1 -3 1],'N','coeff');\n", +"f=roots(y);\n", +"N=f(1,1);\n", +"D=20*log10(N);\n", +"Ro=R1*(N+1)/(N-1);\n", +"printf('The characteristic impedance of T attenuator = %f ohms and its attenuation per section is %f db',round(Ro*10)/10,round(D*100)/100);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.7: Determining_the_resistance_value_of_a_T_type_attenuator_pad.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=40;Ri1=70;Ri2=600;\n", +"Ai=D*0.115;\n", +"R3=(sqrt(Ri1*Ri2))/sinh(Ai);\n", +"R2=(Ri2/tanh(Ai))-R3;\n", +"R1=(Ri1/tanh(Ai))-R3;\n", +"printf('The desired elements of T-pad are:\n');\n", +"printf(' R1 = %f ohms\n',round(R1*100)/100);\n", +"printf(' R2 = %f ohms\n',round(R2));\n", +"printf(' R3 = %f ohms\n',round(R3*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.8: Finding_the_elements_of_a_balanced_T_pad.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"D=10;Ri1=150;Ri2=75;\n", +"Ai=D*0.115;\n", +"R3=(sqrt(Ri1*Ri2))/sinh(Ai);\n", +"R2=(Ri2/tanh(Ai))-R3;\n", +"R1=(Ri1/tanh(Ai))-R3;\n", +"printf('The desired elements of T-pad are:\n');\n", +"printf(' R1 = %f ohms\n',round(R1*100)/100);\n", +"printf(' R2 = %f ohms\n',round(R2*10)/10);\n", +"printf(' R3= %f ohms\n\n',fix(R3*100)/100);\n", +"R2a=sqrt((Ri1*Ri2*Ri2)/(Ri1-Ri2));\n", +"R1a=sqrt(Ri1*(Ri1-Ri2));\n", +"printf('The minimum loss pad will be a L attenuator:\n');\n", +"printf(' R1 = %f ohms\n',round(R1a));\n", +"printf(' R2 = %f ohms\n',round(R2a));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 16.9: Designing_L_type_attenuator.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ri1=500;D=15;\n", +"N=10^(D/20);N1=fix(N*1000)/1000;\n", +"R2=Ri1/(N1-1);\n", +"R1=Ri1*(1-(1/N));\n", +"printf('The series arm of the L attenuator is %f ohms,while its shunt arm is %f ohms',round(R1),round(R2));\n", +"//the difference in result of R2 is due to erroneous value in textbook.\n", +"disp('The difference in result of R2 is due to erroneous value in textbook')" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/2-Open_and_Short_Circuited_Lines.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/2-Open_and_Short_Circuited_Lines.ipynb new file mode 100644 index 0000000..be045d2 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/2-Open_and_Short_Circuited_Lines.ipynb @@ -0,0 +1,424 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Open and Short Circuited Lines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: Calculating_Zo_and_a_and_b.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=20*(10^6);l=32;Zsc=17+(%i*19.4);Zoc=115-(%i*138);\n", +"Zo=sqrt(Zoc*Zsc);\n", +"X=real(Zo);\n", +"Y=imag(Zo);\n", +"printf('-Characteristic impedance = %f /_ %f ohms\n',round(abs(Zo)),round(atan(Y,X)*180*10/%pi)/10);\n", +"Z1=sqrt(Zsc/Zoc);\n", +"A=real(Z1);\n", +"B=imag(Z1);\n", +"D=(1+A+(%i*B))/(1-(A+(%i*B)));\n", +"r=sqrt(((real(D))^2)+((imag(D))^2));\n", +"theta=atan((imag(D))/(real(D)));\n", +"n=6;\n", +"P=(1/(2*l))*((log(r))+(%i*(theta+(2*n*%pi))));\n", +"b=imag(P);\n", +"a=real(P);\n", +"printf('-Attenuation factor = %f neper/m\n',round(a*10000)/10000);\n", +"printf('-Phase propagation factor = %f radians/m',round(b*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11: Calculating_Zo_and_a_and_b.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=20*(10^6);Zoc=1390;Zsc=4.61;l=5; \n", +"lo=(3*(10^8))/f; //lo=wavelength\n", +"Zo=sqrt(Zoc*Zsc);\n", +"printf('-Characteristic impedance = %f ohms\n',round(Zo));\n", +"er=(lo/l)^2; //er=relative permittivity of dielectric\n", +"printf('-Relative permittivity of dielectric = %f\n',er);\n", +"P=fix(((atanh(sqrt(Zsc/Zoc)))/l)*10000)/10000;\n", +"a=P*8.686;\n", +"printf('-a = %f db/m\n',fix(a*10000)/10000);\n", +"Vp=(3*(10^8))/(sqrt(er)*10^8);\n", +"printf('-Velocity of propagation = %f * 10^8 m/sec',Vp);\n", +"//the difference in result of attenuation constant is due to erroneous value in textbook.\n", +"disp('The difference in result of the value of attenuation constant is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: Calculating_Zo.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Zoc=900*exp(%i*(-%pi/(180/30)));Zsc=400*exp(%i*(-%pi/(180/10)));f=1.6*(10^3);\n", +"Zo=sqrt(Zoc*Zsc);\n", +"A=real(Zo);\n", +"B=imag(Zo);\n", +"printf('Zo = %f /_ %f ohms',abs(Zo),atan(B,A)*180/%pi);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: Calculating_the_line_constants.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=796;Zoc=328*exp(%i*(-%pi/(180/29.2)));Zsc=1548*exp(%i*(%pi/(180/6.8)));l=50;\n", +"Zo=sqrt(Zoc*Zsc);\n", +"C=real(Zo);\n", +"D=imag(Zo);\n", +"printf('-Zo = %f /_ %f ohms\n',fix(abs(Zo)),atan(D,C)*180/%pi);\n", +"w=2*%pi*f;\n", +"Z1=sqrt(Zsc/Zoc);\n", +"A=real(Z1);\n", +"B=imag(Z1);\n", +"D=(1+A+(%i*B))/(1-(A+(%i*B)));\n", +"r=abs(D);\n", +"theta=atan((imag(D))/(real(D)))-%pi;\n", +"n=1;\n", +"P=(1/(2*l))*((log(r))+(%i*(theta+(2*n*%pi))));\n", +"E=real(P);\n", +"F=imag(P);\n", +"printf('-P = %f /_ %f\n',round(abs(P)*10000)/10000,round(atan(F,E)*180*100/%pi)/100);\n", +"Z=P*Zo;\n", +"R=real(Z);\n", +"L=(imag(Z))/w;\n", +"printf('-R = %f ohms/km\n',round(R*100)/100);\n", +"printf('-L = %f mH/km\n',round(L*(10^3)*100)/100);\n", +"Y=P/Zo;\n", +"G=real(Y);\n", +"C=(imag(Y))/w;\n", +"printf('-G = %f micro-mhos/km\n',round(G*(10^6)));\n", +"printf('-C = %f microfarads/km',round(C*(10^6)*10000)/10000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: Calculating_the_received_current_and_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=600;a=0.1;b=0.05;x=10;Is=20*(10^-3);\n", +"Vr=0;\n", +"printf('-Receiving end voltage Vr=0 because the receiving end has been short ciruited\n');\n", +"P=a+(%i*b);\n", +"Ir=Is/(cosh(10*P));\n", +"A=real(Ir);\n", +"B=imag(Ir);\n", +"printf('-Received current is Ir = %f /_ %f mA ',round(abs(Ir)*(10^3)*100)/100,fix(atan(B,A)*180*10/%pi)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: Determining_Zo_and_a_and_b_and_primary_constants_of_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zoc=1930*exp(%i*(%pi/(180/68.9)));Zsc=1308*exp(%i*(-%pi/(180/76.2)));l=8;w=5000;\n", +"Zo=sqrt(Zoc*Zsc);\n", +"C=real(Zo);\n", +"D=imag(Zo);\n", +"printf('-Zo = %f /_ %f ohms\n',round(abs(Zo)),round(atan(D,C)*180*100/%pi)/100);\n", +"Z1=sqrt(Zsc/Zoc);\n", +"A=round(real(Z1)*1000)/1000;\n", +"B=round(imag(Z1)*1000)/1000;\n", +"D=(1+A+(%i*B))/(1-(A+(%i*B)));K=round((1+A+(%i*B))*100)/100;J=round((1-(A+(%i*B)))*10)/10;\n", +"phi1=atan(imag(K),real(K))+(%pi/4);\n", +"phi2=atan(imag(J),real(J));\n", +"phi3=phi1-phi2;\n", +"P=(1/(2*8))*(log(round(abs(K/J)*10)/10)+(%i*(round(phi3*10)/10+(6.28))));\n", +"printf(' -a = %f neper/km\n',fix(real(P)*100)/100);\n", +"printf(' -b = %f radians/km\n',fix(imag(P)*1000)/1000);\n", +"Z=P*Zo;\n", +"R=real(Z);\n", +"L=(imag(Z))/w;\n", +"printf(' -R = %f ohms/km\n',round(R*1000)/1000);\n", +"printf(' -L = %f mH/km\n',round(L*(10^6))/1000);\n", +"Y=P/Zo;\n", +"G=real(Y);\n", +"C=(imag(Y))/w;\n", +"printf(' -G = %f micro-mhos/km\n',-round(G*(10^9))/1000);\n", +"printf(' -C = %f microfarads/km',round(C*(10^9))/1000);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: Calculating_the_line_constants.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"w=5000;Zoc=1300*exp(%i*(%pi/(180/80)));Zsc=3200*exp(%i*(-%pi/(180/80)));l=40;\n", +"Zo=sqrt(Zoc*Zsc);\n", +"Z1=sqrt(Zsc/Zoc);\n", +"A=real(Z1);\n", +"B=imag(Z1);\n", +"D=(1+A+(%i*B))/(1-(A+(%i*B)));K=(1+A+(%i*B));J=(1-(A+(%i*B)));\n", +"r=round(abs(D)*1000)/1000;\n", +"theta=round(atan((imag(D))/(real(D)))*10)/10;\n", +"P=(1/(2*l))*((log(r))+(%i*(theta+6.28)));\n", +"b=imag(P);\n", +"Z=P*Zo;\n", +"R=real(Z);\n", +"L=(imag(Z))/w;\n", +"printf('R = %f ohms\n',fix(R*100)/100);\n", +"printf(' L = %f mH/km\n',round(L*(10^6))/1000);\n", +"Y=P/Zo;\n", +"G=real(Y);\n", +"C=(imag(Y))/w;\n", +"printf(' G = %f micro-mhos/km\n',round(G*(10^8))/100);\n", +"printf(' C = %f micro-farads/km',round(C*(10^9))/1000);\n", +"//the difference in result of L and C is due to erroneous value in textbook.\n", +"disp('The difference in result of L and C is due to erroneous value in textbook')\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: Calculating_Zo_and_P_and_line_constants.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zoc=286*exp(%i*(-%pi/(180/40)));Zsc=1520*exp(%i*(%pi/(180/16)));l=50;f=700;\n", +"w=2*%pi*f;\n", +"Zo=sqrt(Zoc*Zsc);\n", +"S=real(Zo);\n", +"T=imag(Zo);\n", +"printf('-Characteristic impedance of transmission line is Zo = %f /_ %f ohms\n',round(abs(Zo)*100)/100,atan(T,S)*180/%pi);\n", +"A=atanh(sqrt(Zsc/Zoc));\n", +"P=A/l;\n", +"U=real(P);\n", +"V=imag(P);\n", +"printf('-Propagation constant = %f /_ %f\n',fix(abs(P)*1000)/1000,round(atan(V,U)*180*100/%pi)/100)\n", +"Z=P*Zo;\n", +"R=real(Z);\n", +"L=(imag(Z))/w;\n", +"printf('-R = %f ohms/km\n',round(R*100)/100);\n", +"printf('-L = %f mH/km\n',fix(L*(10^3)*100)/100);\n", +"Y=P/Zo;\n", +"G=real(Y);\n", +"C=(imag(Y))/w;\n", +"printf('-G = %f micromhos/km\n',fix(G*(10^6)*100)/100);\n", +"printf('-C = %f microfarads/km',fix(C*(10^6)*10^5)/10^5);\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: Calculating_the_series_impedance_and_shunt_admittance_per_km_of_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zoc=2500*exp(%i*(-%pi/(180/70)));Zsc=49*exp(%i*(%pi/(180/25)));l=1;\n", +"f=(8000)/(2*%pi);\n", +"w=2*%pi*f;\n", +"Zo=sqrt(Zoc*Zsc);\n", +"A=atanh(sqrt(Zsc/Zoc));\n", +"P=A/l;\n", +"P1=P*l/1000;\n", +"Z=P1*Zo;\n", +"printf('Series impedance of line is Z = %f /_ %f ohms/km\n',round(abs(Z)*1000)/1000,atan(imag(Z),real(Z))*180/%pi);\n", +"Y=P1/Zo;\n", +"printf('Shunt admittance of line is Y = %f /_ %f mhos/km',round(abs(Y)*10^6*10)/10,atan(imag(Y),real(Y))*180/%pi);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: Calculating_Zo_and_a_and_b.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zoc=2000*exp(%i*(-%pi/(180/80)));Zsc=20*exp(%i*(%pi/(180/20)));l=0.5;w=10000;\n", +"//value of length of cable as taken in solution\n", +"Zo=sqrt(Zoc*Zsc);\n", +"C=real(Zo);\n", +"D=imag(Zo);\n", +"printf('-Zo = %f /_ %f ohms\n',abs(Zo),atan(D,C)*180/%pi);\n", +"A=atanh(sqrt(Zsc/Zoc));\n", +"P=A/l;\n", +"a=real(P);\n", +"printf('-a = %f neper/km\n',fix(a*10000)/10000);\n", +"b=imag(P);\n", +"printf('-b = %f henry/km',round(b*10000)/10000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: Calculating_output_current_when_far_end_is_short_circuited.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Vs=1;f=1000;l=150;Zo=692*exp(%i*(-%pi/(180/12)));a=0.0047;b=0.022;Vr=0;\n", +"P=a+(%i*b);\n", +"Ir=1/(Zo*sinh((a*l)+(b*l)));\n", +"C=real(Ir);\n", +"D=imag(Ir);\n", +"printf('Output current(in amperes)= %f /_ %f mA',round(abs(Ir)*10^6)/1000,atan(D,C)*180/%pi);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/3-Line_with_any_Termination.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/3-Line_with_any_Termination.ipynb new file mode 100644 index 0000000..372eb17 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/3-Line_with_any_Termination.ipynb @@ -0,0 +1,640 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Line with any Termination" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: Calculating_power_delivered_at_receiving_end.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=1000;l=1000;R=10.4;L=0.00367;G=0.8*(10^-6);C=0.00835*(10^-6);Es=10;\n", +"//value of Es as taken in solution\n", +"w=2*%pi*f;\n", +"Z=R+round((%i*w*L));\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"P=sqrt(Z*Y);\n", +"Is=Es/Zo;\n", +"Ir=Is*exp(-P*l);\n", +"P=((abs(Ir))^2)*real(Zo);\n", +"printf('-Power delivered at receiving end = %f micro-watt',P*(10^6));\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11: EX3_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"l=50;Zo=692*exp(%i*(-%pi/(180/12)));a=0.00755;b=0.0355;Zr=300;f=1000;Vs=10;\n", +"P=a+(%i*b);\n", +"Zin=Zo*((Zr*cosh(P*l))+(Zo*sinh(P*l)))/((Zo*cosh(P*l))+(Zr*sinh(P*l)));\n", +"Is=Vs/Zin*(10)^-1;\n", +"A=real(Is);\n", +"B=imag(Is);\n", +"printf('-Sending end current = %f /_ %f Amp\n',round(abs(Is)*10^5)/10^5,round(atan(B,A)*180*10/%pi)/10);\n", +"Vr=Vs*((cosh(P*l))-((Zo*sinh(P*l))/Zin));\n", +"C=real(Vr);\n", +"D=imag(Vr);\n", +"printf('-Receiving end voltage = %f /_ %f volts\n',round(abs(Vr)*10)/10,round(atan(D,C)*180/%pi));\n", +"Ir=Vr/Zr;\n", +"E=real(Ir);\n", +"F=imag(Ir);\n", +"printf('-Receiving end current = %f /_ %f Amp\n',round(abs(Ir)*1000)/1000,round(atan(F,E)*180/%pi));\n", +"modIr=abs(Ir);\n", +"Rr=Zr;\n", +"Pr=((modIr)^2)*Rr;\n", +"theta=atan((imag(Zin))/(real(Zin)));\n", +"modIs=abs(Is);\n", +"Ps=Vs*modIs*cos(theta);\n", +"n=(Pr/Ps)*10;\n", +"printf('-Efficiency of transmission(in percentage)= %f',round(n));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: Calculating_the_resistance_and_inductance_of_the_series_and_shunt_elements.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"l=10;Zo=280*exp(-%i*(%pi/(180/30)));P=0.08*exp(%i*(%pi/(180/40)));f=5000/(2*%pi);\n", +"w=2*%pi*f;\n", +"Z1=Zo*tanh(P*l/2);\n", +"Rs=real(Z1); \n", +"Ls=imag(Z1)/w;\n", +"printf('-Resistance of series element = %f ohms\n',fix(Rs));\n", +"printf('-Inductance of series element = %f mH\n',round(Ls*(10^3)*100)/100);\n", +"Z2=Zo/(sinh(P*l));\n", +"Rsh=real(Z2);\n", +"Csh=-imag(Z2)/w;\n", +"printf('-Resistance of shunt element = %f ohms\n',round(Rsh*10)/10);\n", +"printf('-Capacitance of shunt element = %f microfarads',fix(Csh*1000)/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13: Determining_the_characteristic_impedance_and_propagation_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"l=5;f=5000/(2*%pi);Rs=175;Ls=10*(10^-3);Rsh=270;Csh=0.2*(10^-6);\n", +"w=2*%pi*f;\n", +"Z1=(Rs+(%i*w*Ls)); //Z1=Z1/2\n", +"Z2=Rsh-(%i/(w*Csh));\n", +"t=sqrt((Z1)/((Z1)+(2*Z2)));\n", +"P=2*(atanh(t))/l;\n", +"A=real(P);\n", +"B=imag(P);\n", +"printf('Propagation constant = % f + %f per loop km\n',round(A*100)/100,round(B*100)/100);\n", +"Zo=Z1/(tanh((P*l)/2));\n", +"C=real(Zo);\n", +"D=imag(Zo);\n", +"printf('Characteristic impedance = %f /_ %f ohms',round(abs(Zo)*1000)/1000,round(atan(D,C)*180/%pi));\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.14: Calculating_voltage_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"a=0;Zo=50;Vr=100;l=50;y=10;Ir=0;f=20*(10^6);\n", +"lo=300/f; //lo=lambda\n", +"b=2*%pi/lo;\n", +"P=a+(%i*b);\n", +"V=(Vr*cosh(P*y))+(Ir*Zo*sinh(P*y));\n", +"printf('-Voltage at the required point = %f /_ %f volts\n',abs(V),atan(imag(V),real(V))*180/%pi);\n", +"I=((Vr/Zo)*sinh(P*y))+(Ir*cosh(P*y));\n", +"A=real(I);\n", +"B=imag(I);\n", +"printf('-Current at required point = %f /_ %f Amps',round(abs(I)*1000)/1000,atan(B,A)*180/%pi);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15: Calculating_input_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=600;Zr=%i*150;l=0.25;f=300*(10^6);\n", +"lo=300/f; //lo=lambda\n", +"b=2*%pi/lo;\n", +"Zin=Zo*Zo/Zr;\n", +"A=real(Zin);\n", +"B=imag(Zin);\n", +"printf('Zin = %f + j(%f) ohms',A,B);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16: Calculating_power_consumed_in_load.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=7.5*(10^3);R=2.6;L=2.4*(10^-3);C=.0078*(10^-6);G=.11*(10^-6);l=50;Vs=10;\n", +"w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"P=sqrt(Z*Y);\n", +"Is=Vs/Zo;\n", +"Ir=Is*(exp(-P*l));\n", +"Ir1=abs(Ir);\n", +"Rr=real(Zo);\n", +"Pr=Ir1*Ir1*Rr;\n", +"printf('Power consumed in load is Pr = %f mW',round(Pr*(10^3)*10)/10);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17: Calculating_the_exact_and_approximate_distance_to_fault.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10.4;L=0.0036;C=0.0083*(10^-6);G=0;f1=1420;f2=1860;\n", +"Favg=(f1+f2)/2;\n", +"w=2*%pi*Favg;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"b=imag(P);\n", +"v=w/b;\n", +"d=v/(2*(f2-f1));\n", +"printf('-Approximate distance = %f km\n',round(d));\n", +"w1=2*%pi*f1;\n", +"Z1=R+(%i*w1*L);\n", +"Y1=G+(%i*w1*C);\n", +"P1=sqrt(Z1*Y1);\n", +"a1=real(P1);\n", +"b1=imag(P1);\n", +"v1=w1/b1;\n", +"w2=2*%pi*f2;\n", +"Z2=R+(%i*w2*L);\n", +"Y2=G+(%i*w2*C);\n", +"P2=sqrt(Z2*Y2);\n", +"a2=real(P2);\n", +"b2=imag(P2);\n", +"v2=w2/b2;\n", +"D=(v1*v2)/(2*((v1*f2)-(v2*f1)));\n", +"printf('-Exact distance = %f km',round(D*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18: Calculating_the_reflection_factor_and_reflection_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Z1=300;Zo=650*exp(%i*(-%pi/(180/12)));Z2=Zo;\n", +"Z=Z1+Z2;\n", +"K=(2*sqrt(Z1*abs(Z2)))/abs(Z);\n", +"printf('-Reflection factor = %f\n',round(K*1000)/1000);\n", +"L=20*(log10(1/K));\n", +"printf('-Reflection loss = %f db',round(L*100)/100);\n", +"//the difference in result of reflection loss is due to erroneous value in textbook.\n", +"disp('The difference in result of reflection loss is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19: Calculating_reflection_coefficient_and_input_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=600;a=0.01;b=0.03;l=100;Zr=200;\n", +"P=a+(%i*b);\n", +"K=(Zr-Zo)/(Zr+Zo);\n", +"printf('Reflection coefficient = %f /_- %f\n',abs(K),atan(imag(K),real(K))*180/%pi);\n", +"k=((abs(K))*exp(-2*P*l));\n", +"b=(1+k)/(1-k);\n", +"Zin=Zo*b;\n", +"C=real(Zin);\n", +"D=imag(Zin);\n", +"printf('Input impedance Zin = %f + j(%f) ohms',round(C*1000)/1000,round(D*100)/100);\n", +"//Zin has been wrongly calculated in the book\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: Calculating_sending_end_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"l=10;a=0.03;b=0.03;Vr=4;f=1000;\n", +"P=a+(%i*b);\n", +"Vs=Vr*(exp(P*l));\n", +"C=real(Vs);\n", +"D=imag(Vs);\n", +"printf('Sending end voltage is Vs = %f /_ %f volts',fix(abs(Vs)*100)/100,round(atan(D,C)*180/%pi));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20: Finding_reflection_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Zo=632.8;Zr=80;\n", +"F=20*log10((2*Zr*Zo)/(Zo+Zr));\n", +"printf('Reflection loss = %f db',round(F*100)/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: Calculating_rms_value_voltage_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=50;Vr=10;Ir=0;a=0;\n", +"B=%pi/4;\n", +"V=(Vr*cos(B))+(%i*(Ir*Zo*sin(B)));\n", +"I=(Ir*cos(B))+(%i*((Vr*sin(B))/Zo));\n", +"C=real(I);\n", +"D=imag(I);\n", +"printf('-R.m.s.voltage at the required distance is V = %f volts\n',round((V)*100)/100);\n", +"printf('-R.m.s.current at required distance is I = %f /_ %f Amps',round(abs(I)*1000)/1000,atan(D,C)*180/%pi);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: Calculating_the_rms_value_of_voltage_and_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"Zo=500*exp(%i*(-%pi/(180/43)));l=10;P=0.07+(%i*0.08);Vs=5;\n", +"V=Vs*(exp(-P*l));\n", +"I=V/Zo;\n", +"C=real(V);\n", +"D=imag(V);\n", +"E=real(I)*(10^3);\n", +"F=imag(I)*(10^3);\n", +"printf('-R.m.s.voltage at the required distance is V = %f /_ %f V\n',round(abs(V)*10)/10,round(atan(D,C)*180*10/%pi)/10);\n", +"printf('-R.m.s.current at required distance is I = %f/_ %f mA',round(abs(I)*10^3),round(atan(F,E)*180*10/%pi)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: Calculating_the_input_impedance_of_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=710*exp(%i*(%pi/(180/14)));l=100;P=0.007+(%i*0.028);Zr=300;\n", +"K=round(sinh(P*l)*100)/100;J=round(cosh(P*l)*100)/100;\n", +"Zin=Zo*((Zr*J)+(Zo*K))/((Zo*J)+(Zr*K));\n", +"C=real(Zin);\n", +"D=imag(Zin);\n", +"printf('Input impedance of line is Zin = %f /_ %f ohms',abs(Zin),round(atan(D,C)*180*10/%pi)/10);\n", +"A=((Zr*J)+(Zo*K));\n", +"B=((Zo*J)+(Zr*K));\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: Calculating_sending_end_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=55;Zr=115+(%i*75);n=1.183;\n", +"//value of Zr as taken in solution\n", +"m=(2*%pi*n)-(2*%pi);\n", +"Zin=Zo*(Zr+(%i*Zo*tan(m)))/(Zo+(%i*Zr*tan(m)));\n", +"C=real(Zin);\n", +"D=imag(Zin);\n", +"printf('Sending end impedance is Zin = %f + j(%f) ohms',fix(C*10)/10,fix(D*10)/10);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: Calculating_input_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=50*exp(-%i*(%pi/(180/5)));a=0.001;b=%pi/1.8;Vr=0.5*exp(%i*(%pi/(180/30)));\n", +"l=100;x=4; //Vr=voltage reflection coefficient\n", +"modVr=abs(Vr);\n", +"A=modVr*exp(-2*a*(l-x));\n", +"Zin=Zo*(1+A)/(1-A);\n", +"C=real(Zin);\n", +"D=imag(Zin);\n", +"printf('Input impedance of transmission line = %f /_ %f ohms',fix(abs(Zin)*100)/100,atan(D,C)*180/%pi);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: Calculating_the_value_of_voltage_reflection_coefficient.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ka=0.2*exp(%i*(-%pi/(180/30)));d=1/12;\n", +"Kb=Ka/exp(%i*%pi*4*d);\n", +"printf('Desired value of voltage reflection coefficient = %f /_ %f',abs(Kb),atan(imag(Kb),real(Kb))*180/%pi);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: Calculating_the_ratio_of_transmitter_voltage_to_receiver_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=710*exp(%i*(-%pi/(180/16)));a=0.01;b=0.035;l=100;Zr=300;\n", +"P=a+(%i*b);\n", +"V=(cosh(P*l))+((Zo/Zr)*sinh(P*l)); //V=Vs/Vr\n", +"modV=abs(V);\n", +"V1=log(modV)*8.686;\n", +"V2=log(modV);\n", +"printf('-Ratio of the transmitter voltage and the receiver voltage in nepers = %f\n',round((V2)*100)/100);\n", +"printf('-Ratio of the transmitter voltage and the receiver voltage in decibels = %f\n',round((V1)*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9: Calculating_the_value_of_voltage_reflection_coefficient.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=692*exp(%i*(-%pi/(180/12 )));Zr=200;l=100;V=1;f=1000;\n", +"K=(Zr-Zo)/(Zr+Zo);\n", +"C=real(K);\n", +"D=imag(K);\n", +"printf('Voltage reflection coefficient = %f /_ %f',round(abs(K)*100)/100,round(atan(D,C)*180*10/%pi)/10);" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/4-Power_Lines.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/4-Power_Lines.ipynb new file mode 100644 index 0000000..f4c903f --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/4-Power_Lines.ipynb @@ -0,0 +1,213 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Power Lines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: Determining_equivalent_pi_network.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc\n", +"l=225;Zo=401-(%i*29);P=(0.148+(%i*2.06))*(10^-3);\n", +"Zs=Zo*sinh(P*l);\n", +"A=real(Zs);\n", +"B=imag(Zs);\n", +"printf('-Series branch of the equivalent network will have the impedance = %f + j(%f) ohms\n',round(A),round(B));\n", +"Zsh=Zo*coth(P*l/2);\n", +"C=real(Zsh);\n", +"D=imag(Zsh);\n", +"printf('-Shunt branch of the equivalent network will have the impedanc = j(%f) ohms',round(D))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: Calculating_inductance_per_km_of_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"r=1.25;d1=75;d2=150;\n", +"r1=0.7718*r;\n", +"ds=nthroot((r1*r1*d1*d1),4);\n", +"dm=sqrt(d2*(sqrt((d2*d2)+(d1*d1))));\n", +"L=0.9212*log10(dm/ds);\n", +"printf('Total loop inductance = %f mH/loop km',round(L*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: Calculating_characteristic_impedance_and_propagation_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"l=440;L=2.2*(10^-3);C=0.0136*(10^-6);R=0.120;G=0;f=60;\n", +"w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"A=real(Zo);\n", +"B=imag(Zo);\n", +"printf('-Characteristic impedance = %f + j(%f) ohms\n',round(A),round(B));\n", +"P=sqrt(Z*Y);\n", +"E=real(P)*10^4;\n", +"F=imag(P)*10^3;\n", +"printf('-Propagation constant = %f * 10^-4 + j(%f) * 10^-3 per km',fix(E*100)/100,fix(F*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: Calculating_inductive_reactance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=50;r=5*(10^-3);x=.5;y=3;z=4.5;t=6;s=5;\n", +"r1=0.7788*r; //r1=GMR\n", +"Dab=round(sqrt((y^2)+(x^2))*1000)/1000;\n", +"Dab1=round(sqrt((y^2)+(s^2))*1000)/1000;\n", +"Daa=sqrt((t^2)+(z^2));\n", +"Dab2=Dab;\n", +"Dab3=Dab1;\n", +"dab=round(nthroot((Dab1*Dab3*Dab*Dab2),4)*100)/100;\n", +"dca=fix(nthroot((t*t*z*z),4)*100)/100;\n", +"ds1=nthroot((r1*r1*7.5*7.5),4);\n", +"ds2=nthroot((r1*r1*5.5*5.5),4);\n", +"ds3=ds1;\n", +"ds=round(nthroot((ds1*ds2*ds3),3)*1000)/1000;\n", +"La=fix(0.4606*log10(dca/ds)*100)/100;\n", +"X=2*3*f*La*10^-3;\n", +"printf('Inductive reactance = %f ohm/km/phase',X);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: Calculating_capacitive_susceptance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"dia=2*(10^-2);f=50;d=3.5;\n", +"r=dia/2;\n", +"Cab=0.01207/(log10(d/r))*(10^-6);\n", +"Xc=1/(2*%pi*f*Cab);\n", +"Bc=(1/Xc)*10^6;\n", +"printf('Capacitive susceptance per km = %f * 10^-6 mho/km',round(Bc*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: Determining_the_capacitance_per_km_and_charging_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"dia=2*(10^-2);f=50;d1=3.5;V=66000;\n", +"r=dia/2;\n", +"Cn1=0.02414/(log10(d1/r))*(10^-6);\n", +"printf('(a)Capacitance per km = %f microfarads/km,to neutral\n',fix(Cn1*(10^6)*10^5)/10^5);\n", +"Vn=V/sqrt(3);\n", +"Ic1=Vn*2*%pi*f*Cn1;\n", +"printf('\tCharging current = %f mA/km\n',fix(Ic1*(10^3)*10)/10);\n", +"d1=3.5;d2=4.5;d3=5.5;\n", +"Deq=nthroot(d1*d2*d3,3);\n", +"Cn2=0.02414/(log10(Deq/r))*(10^-6);\n", +"printf('(b)Capacitance per km =%f microfarads/km,to neutral\n',fix(Cn2*(10^6)*10^5)/10^5);\n", +"Ic2=Vn*2*%pi*f*Cn2;\n", +"printf('\tCharging current = %f mA/km',round(Ic2*(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/Transmission_Lines_And_Networks_by_U_Sinha/5-Telegraph_and_Telephone_Lines.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/5-Telegraph_and_Telephone_Lines.ipynb new file mode 100644 index 0000000..e461be5 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/5-Telegraph_and_Telephone_Lines.ipynb @@ -0,0 +1,566 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Telegraph and Telephone Lines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10: Calculating_length_of_line_for_a_given_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"a=0.005;f=1000;al=0.05;att=10 //att=given attenuation in db\n", +"lo=att/(a*8.686);\n", +"printf('-For the open wire line the required length is lo = %f km\n',round(lo*10)/10);\n", +"lc=att/(al*8.686);\n", +"printf('-For the cable the required length is lc = %f km',fix(lc*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11: Calculating_cutoff_frequency_and_attenuation_and_phase_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=20;C=0.03*(10^-6);L=0;G=0;r=18.2;l=78*(10^-3);d=2.1;f=3000/(2*%pi);\n", +"Rc=R+(r/d);\n", +"Lc=L+(l/d);\n", +"Fc=1/(%pi*(sqrt(Lc*C*d)));\n", +"printf('(i)Cutoff frequency = %f kHz\n',round(Fc*(10^-3)*100)/100);\n", +"al=((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C));\n", +"printf('(ii)Attenuation per km = %f neper/km\n',fix(al*10000)/10000);\n", +"Vp1=(1/(sqrt(Lc*C)))*10^-4;\n", +"printf('(iii)Phase velocity = %f * 10^4 km/sec',fix(Vp1*1000)/1000);\n", +"//the difference in result of attenuation per km and phase velocity is due to erroneous value in textbook.\n", +"disp('The difference in result of attenuation per km and phase velocity is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12: EX5_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=80;C=0.06*(10^-6);L=0;G=0;f=2500;al=0.04;ratio=40;\n", +"fc=2*f;\n", +"//ratio=ratio off resistance to inductance of loading coil\n", +"A=2/(3.14*3.14*C*4*f*f); //A=Lc*d\n", +"B=al/(%pi*f*1.414*C/2);\n", +"C=%pi*f*1.414*C/2;\n", +"y=poly([ratio*C*100*A -al*100 80*100*C],'x','coeff');\n", +"a=roots(y);\n", +"b=round(a(1,1)*100)/100;\n", +"Lo=round((A/b)*1000)/1000;\n", +"printf('Adding %f Henry coils at intervals of %f km is the practical and economically possible solution.',Lo,b)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13: Calculating_rate_of_transmission_of_information.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"B=3000; //B=band width\n", +"D=30; //D=ratio of signal power to noise power in db\n", +"P=10^(D/10); // P=converting D into a numerical ratio\n", +"A=fix(log2(1+P)*100)/100\n", +"C=B*A;\n", +"printf('Rate of transmission of information = %f bits/sec',C);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14: Calculating_a_and_b_and_cut_off_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=55;L=0.6*(10^-3);G=1*(10^-6);C=0.04*(10^-6);f=800;r=8;l=0.1;d=2.5; //value of l(loading coil inductance) as taken in solution\n", +"w=2*%pi*f;\n", +"Z=round(R+(%i*w*L));\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"P=round(sqrt(Z*Y)*10^4)/10^4;\n", +"Zc=r+(%i*w*l);\n", +"A=fix(((cosh(P*d))+(Zc*(sinh(P*d))/(2*Zo)))*10^3)/10^3;\n", +"Pl=(acosh(A))/d;\n", +"al=real(Pl);\n", +"bl=imag(Pl);\n", +"printf('New value of attenuation constant = %f neper/km\n',round(al*100)/100);\n", +"printf(' New value of phase constant = %f rad/km\n',round(bl*1000)/1000);\n", +"Lc=L+(l/(d*10^3));\n", +"Fc=1/(3.14*(sqrt(Lc*C*d)));\n", +"printf(' Cutoff frequency = %f * 10^4 Hz',round(Fc*10^-2)/10^2);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.15: Calculating_wavelength_of_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10;C=0.008*(10^-6);l=60; //value of R as taken in solution\n", +"Rt=R*l; //Rt=total resistannce\n", +"Ct=C*l; //Ct=total capacitance\n", +"f=1600 //assupmtion\n", +"w=2*%pi*f;\n", +"b=sqrt(f*Rt*Ct/2);\n", +"lo=2*%pi/b;\n", +"printf('Wavelength of line = %f metres',fix(lo*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.16: Calculating_the_value_of_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=45;L=1.2*(10^-3);G=5*(10^-6);C=0.065*(10^-6);w=20000;l=22*(10^-3);s=1.1;\n", +"pf=0.005//pf=power factor //value of pf as taken in solution\n", +"r=pf*w*L;\n", +"Rc=R+(r/s);\n", +"Lc=L+(l/s);\n", +"P=sqrt((Rc+(%i*w*Lc))*(G+(%i*w*C)));\n", +"theta=round(atan(imag(P),real(P))*180/%pi);\n", +"a=abs(P)*cos(theta*%pi/180);\n", +"printf('Attenuation constant of line = %f neper/km',fix(a*10^4)/10^4);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17: Calculating_potential_at_mid_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"l=100;R=10;G=10^-5;Vs=40;Zr=0;\n", +"Zo=sqrt(R/G);\n", +"P=sqrt(R*G);\n", +"Zin=Zo*(Zr+(Zo*tanh(P*l)))/(Zo+(Zr*tanh(P*l)));\n", +"Is=Vs/Zin;\n", +"V=(Vs*(cosh(P*l)))-(Is*Zo*(sinh(P*l)));\n", +"Vm=2*V;\n", +"printf('Potential at mid point = %f volts',Vm);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: Calculating_decrease_in_attenuation_and_cut_off_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=28;C=0.04*(10^-6);G=0;L=0;f=1600;s=2000;r=3.7;l=88*(10^-3);\n", +"Rc=R+(r/(s*(10^-3)));\n", +"Lc=L+(l/(s*(10^-3)));\n", +"Fc=1/(%pi*(sqrt(Lc*C)));\n", +"printf('-Cutoff frequency = %f Hz\n',round(Fc));\n", +"w=2*%pi*f;\n", +"a=sqrt(w*C*R/2);\n", +"al=((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C));\n", +"A=(a-al)*8.686;\n", +"printf('-Decrease in attenuation = %f db/km',round(A*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: Calculating_Zo_and_a_and_b_and_Vp.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10.15;L=3.93*(10^-3);G=0.29*(10^-6);C=0.008*(10^-6);w=5000;r=7.3;l=246*(10^-3);\n", +"s=7.88;\n", +"Rc=R+(r/s);\n", +"Lc=L+(l/s);\n", +"al=((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C));\n", +"printf('-a = %f neper/km\n',round(al*10000)/10000);\n", +"b=w*(sqrt(Lc*C));\n", +"printf('-b = %f radians/km\n',round(b*10^4)/10^4);\n", +"lo=2*%pi/b; //lo=lambda\n", +"printf('-lo = %f km\n',round(lo*100)/100);\n", +"Vp=(w/b)*10^-4;\n", +"printf('-Vp = %f * 10^4 km/sec\n',round(Vp*100)/100);\n", +"Zo=(sqrt(Lc/C))*10^-3;\n", +"printf('-Zo = %f * 10^3 ohms',fix(Zo*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: Calculating_modified_Zo_and_a_and_Vp.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10.4;L=3.67*(10^-3);G=0.8*(10^-6);C=0.00835*(10^-6);w=5000;r=7.3;l=246*(10^-3);\n", +"s=7.88;\n", +"Rc=R+(r/s);\n", +"Lc=L+(l/s);\n", +"Z=fix((Rc+(%i*w*Lc))*100)/100;\n", +"Y=G+(%i*w*C);\n", +"Zo=sqrt(Z/Y);\n", +"A=real(Zo);\n", +"B=imag(Zo);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"b=imag(P);\n", +"Vp=w/b;\n", +"phi=(round(atan(imag(Z),real(Z))*180*10/%pi)/10)-round(atan(imag(Y),real(Y))*180*10/%pi)/10;\n", +"printf('(i)Using exact method Zo = %f /_ %f ohms\n',round(abs(Zo)),phi);\n", +"printf('\t\t\ta = %f neper/km\n',round(a*10^4)/10^4);\n", +"printf('\t\t\tVp = %f * 10^4 km/sec\n',round(Vp*10^-2)/10^2);\n", +"Zo1=sqrt(Lc/C);\n", +"printf('(ii)Using approximate methos Zo = %f ohms\n',round(Zo1));\n", +"al=((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C));\n", +"printf('\t\t\ta = %f neper/km\n',round(al*10^5)/10^5);\n", +"b1=w*(sqrt(Lc*C));\n", +"Vp1=1/(sqrt(Lc*C));\n", +"printf('\t\t\tVp = %f * 10^4 km/sec',round(Vp1*10^-2)/10^2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: EX5_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10;C=0.04*(10^-6);L=0;G=0;f=1000;l=100*(10^-3);r=12;d=0.9;\n", +"w=2*%pi*f;\n", +"a=sqrt(w*C*R/2);\n", +"b=sqrt(w*C*R/2);\n", +"Vp=(w/b)*10^-5;\n", +"printf('-Phase velocity before loading = %f * 10^5 km/sec\n',fix(Vp*10)/10);\n", +"Rc=R+(r/d);\n", +"Lc=L+(l/d);\n", +"al=((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C));\n", +"Vpl=(1/(sqrt(Lc*C)))*10^-4;\n", +"printf('-Phase velocity after loading = %f * 10^4 km/sec\n',Vpl);\n", +"A=a-al;\n", +"printf('-Decrease in attenuation = %f neper/km\n',round(A*10000)/10000);\n", +"Fc=1/(%pi*(sqrt(Lc*C*d)));\n", +"printf('-Cutoff frequency = %f kHz',round(Fc*(10^-3)*1000)/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: Calculating_attenuation_and_cut_off_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=40;C=0.06*(10^-6);L=0;G=0;r=15;l=80*(10^-3);d=1.2;f=(5/(2*%pi))*10^3;\n", +"Rc=R+(r/d);\n", +"Lc=L+(l/d)\n", +"w=2*%pi*f;\n", +"Z=Rc+(%i*w*Lc);\n", +"Y=G+(%i*w*C);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"printf('(a)Attenuation constant a = %f neper/km\n',round(a*1000)/1000);\n", +"Fc=1/(%pi*(sqrt(l*C*d)));\n", +"printf('(b)Cutoff frequency = %f kHz',round(Fc*(10^-3)*1000)/1000);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: Calculating_attenuation_and_highest_frequency_of_transmission.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=25;C=0.04*(10^-6);L=0.6*(10^-3);G=0;l=45*(10^-3);r=20;d=1;f=1000;\n", +"Rc=R+(r/d);\n", +"Lc=L+(l/d)\n", +"w=2*%pi*f;\n", +"Z=Rc+(%i*w*Lc);\n", +"Y=G+(%i*w*C);\n", +"P=sqrt(Z*Y);\n", +"a=real(P);\n", +"printf('-Attenuation per km line = %f neper/km\n',round(a*10^5)/10^5);\n", +"Fc=1/(%pi*(sqrt(Lc*C*d)));\n", +"printf('-Highest frequency of transmission will be cutoff frequency = %f kHz',round(Fc*(10^-3)*10^3)/10^3);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: Calculating_the_value_of_Zo_and_a_and_Vp_after_loading.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=42.1;L=1*(10^-3);G=1.5*(10^-6);C=0.062*(10^-6);f=796;r=2.7;l=31*(10^-3);\n", +"d=1.135;\n", +"Rc=R+(r/d);\n", +"Lc=round((L+(l/d))*1000)/1000;\n", +"Zo=sqrt(Lc/C);\n", +"printf('-Zo after loading = %f ohms\n',round(Zo));\n", +"al=((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C));\n", +"printf('-a after loading = %f neper/km\n',round(al*10^4)/10^4);\n", +"Vp=1/(sqrt(Lc*C));\n", +"printf('-Approximate value of Vp = %f km/sec',fix(Vp));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: Calculating_cut_off_frequency_and_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=30;L=0;G=0;C=7000*(10^-12);f=3/(2*%pi)*(10^3);r=35;l=70*(10^-3);\n", +"d=1;\n", +"Rc=R+(r/d);\n", +"Lc=L+(l/d);\n", +"Fc=1/(%pi*(sqrt(Lc*C*d)));\n", +"printf('-Approximate value of highest frequency = %f kHz\n',round(Fc*(10^-3)*100)/100);\n", +"al=((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C));\n", +"printf('-Approximate value of attenuation per km after = %f neper/km',round(al*10^4)/10^4);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: Calculating_Zo_and_a_and_b.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=44;L=0.001;G=1*(10^-6);C=0.065*(10^-6);f=1600;r=3.7;l=88*(10^-3);\n", +"d=1.136;\n", +"w=2*%pi*f;\n", +"Rc=R+(r/d);\n", +"Lc=L+(l/d);\n", +"Zo=sqrt(Lc/C);\n", +"printf('-Approximate value of Zo = %f ohms\n',round(Zo*100)/100);\n", +"al=(((Rc/2)*sqrt(C/Lc))+((G/2)*sqrt(Lc/C)))*8.686;\n", +"printf('-Approximate value of a = %f db/km\n',fix(al*1000)/1000);\n", +"b=w*(sqrt(Lc*C));\n", +"printf('-Approximate value of b = %f radians/km',fix(b*1000)/1000);\n", +"//the difference in result of Zo is due to erroneous value in textbook.\n", +"disp('The difference in result of Zo is due to erroneous value in textbook')" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/6-Ultrahigh_Frequency_Lines.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/6-Ultrahigh_Frequency_Lines.ipynb new file mode 100644 index 0000000..b0e5c08 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/6-Ultrahigh_Frequency_Lines.ipynb @@ -0,0 +1,419 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Ultrahigh Frequency Lines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: Calculating_point_of_attachment_and_length_of_stub.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"ZR=100;Zo=600;f=100*(10^6);\n", +"lo=300/(f*(10^-6)); //lo=wavelength\n", +"Ls=(lo/(2*%pi))*(atan(sqrt(ZR/Zo)));\n", +"printf('-Point of attachment = %f cms\n',round(Ls*(10^2)*10)/10)\n", +"Lt=(lo/(2*%pi))*(%pi+(atan((sqrt(ZR*Zo))/(ZR-Zo))));\n", +"printf('-Length of the short circuited stub = %f cms',round(Lt*(10^2)));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14: Calculating_point_of_attachment_and_length_of_stub.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=10^9;K=0.5*exp(%i*(30)/(180/%pi));\n", +"lo=300/(f*(10^-6)); //lo=wavelength\n", +"ampK=abs(K);\n", +"phi=atan(imag(K)/real(K));\n", +"Ls=(lo/(4*%pi))*(phi+%pi-acos(ampK));\n", +"printf('-Position of stub = %f cm\n',Ls*(10^2));\n", +"Lt=(lo/(2*%pi))*(atan(sqrt(1-(ampK*ampK)))/(2*ampK));\n", +"printf('-Length of the stub = %f cm',round(Lt*(10^2)*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15: Calculating_point_of_attachment_and_length_of_stub.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=400;ZR=200-(%i*100);lo=3; //lo=wavelength\n", +"//value os Zo as taken in solution\n", +"K=(ZR-Zo)/(ZR+Zo);\n", +"ampK=abs(K);\n", +"phi=%pi + atan(imag(K)/real(K));\n", +"Ls=(lo/(4*%pi))*(phi+%pi-acos(ampK));\n", +"printf('Shortest distance from the lead to the stub location = %f metres\n',round(Ls*100)/100);\n", +"Lt=(lo/(2*%pi))*(atan(sqrt(1-(ampK*ampK)))/(2*ampK));\n", +"printf('Length of the short circuited stub = %f metres',fix(Lt*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.17: Calculating_the_dimensions_of_a_quarter_wave_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"ZR=300;s=9;d=0.1\n", +"r=d/2;\n", +"Zof=276*log10(s/r);\n", +"Zoq=sqrt(ZR*Zof);\n", +"do=(s*2)/10^(Zoq/276);\n", +"printf('Diameter of wire used = %f cm',fix(do*10)/10);\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.18: Designing_a_quarter_wave_transformer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zin=36;Zt=500;f=40;x=0.97\n", +"Zo=sqrt(Zin*Zt);\n", +"A=10^(Zo/276);\n", +"lo=300/f;\n", +"l1=lo*x/4;\n", +"printf('-The characteristic impedance of the transmission line = %f ohms\n',round(Zo));\n", +"printf('-The spacing between the conductors shud be %f times the radius of the conductor\n',round(A));\n", +"printf('-The length of the quarter wavelength transformer must be %f metres',round(l1*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.19: Designing_a_single_stub_matching_given_system_to_eliminate_standing_wave_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=150;S=4.48;Ymin=6*(10^-2);\n", +"lo=300/(f); //lo=wavelength\n", +"b=(2*%pi)/lo;\n", +"phi=round(((2*b*Ymin)-%pi)*100)/100;\n", +"phi1=-phi;\n", +"ampK=round(((S-1)/(S+1))*10)/10;\n", +"Ls=(lo/(4*%pi))*(phi1+%pi-round(acos(ampK)));\n", +"printf('Point of attachment = %f cm\n',round(Ls*(10^4))/100);\n", +"Lt=(lo/(2*%pi))*(atan(sqrt(1+(ampK*ampK)))/(2*ampK));\n", +"printf('Length of the stub = %f cm',round(Lt*(10^4))/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: Calculating_complex_reflection_coefficient_and_terminal_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"f=200*(10^6);s=4.48;ymin=6;Zo=300; //s=standing wave ratio\n", +"lo=300/(f*(10^-6)); //where f is in megahertz ,lo=wavelength of wave in air\n", +"b=2*%pi/lo;\n", +"phi=(2*b*ymin*(10^-2))-%pi;\n", +"ampK=(s-1)/(s+1); //ampK=amplitude of the reflection coefficient\n", +"K=ampK*(exp(%i*phi));\n", +"A=real(K);\n", +"B=imag(K);\n", +"printf('-Complex reflection coefficient= %f /_ %f\n',round(abs(K)*1000)/1000,round(atan(B,A)*180/%pi));\n", +"ZR=(Zo*(1+K))/(1-K);\n", +"C=real(ZR);\n", +"D=imag(ZR);\n", +"printf('-Terminating impedance of line = %f /_ %f ohms',abs(ZR),round(atan(D,C)*180*10/%pi)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.20: calculating_frequency_and_terminated_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"s=3.3;Zo=300;l=15;\n", +"ampK=round(((s-1)/(s+1))*100)/100;\n", +"Zr=Zo*(1+ampK)/(1-ampK);\n", +"printf('-Terminated impedance = %f ohms\n',fix(Zr));\n", +"lo=(2*2*%pi*l*(10^-2))/%pi; //lo=wavelength\n", +"f=300/lo;\n", +"printf('-Frequency = %f MHz',f);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.21: Calculating_load_and_input_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ymin=18*(10^-2);S=2.5;dmin=20*(10^-2);l=52*(10^-2);Zo=300;\n", +"//dmin=distance betweeen adjacent voltage minimas\n", +"ampK=round(((S-1)/(S+1))*100)/100;\n", +"ZR=fix(Zo*(1+ampK)/(1-ampK));\n", +"printf('Input impedance = %f ohms\n',ZR);\n", +"lo=2*dmin; //lo=wavelength\n", +"b=(2*%pi)/lo;\n", +"phi=(2*b*Ymin)-%pi;\n", +"theta=-fix((phi-(2*b*l)));\n", +"Zm=Zo*(round((1+(ampK*exp(%i*theta)))*100)/100)/(round((1-(ampK*exp(%i*theta)))*100)/100);\n", +"printf('Load impedance = %f + j(%f) ohms',round(real(Zm*100))/100,round(imag(Zm*100))/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: Calculating_value_of_load_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=75;s=3;d=1/5;\n", +"B=2*%pi*d; //B=b*ymax where ymax=position of the current maxima which is 1/5th wavelength away from the load(here)\n", +"phi=2*B;\n", +"ampK=(s-1)/(s+1); //ampK=amplitude of the reflection coefficient\n", +"K=ampK*(exp(%i*phi));\n", +"ZR=round(((Zo*(1+K))*100)/100)/(round((1-K)*1000)/1000);\n", +"C=real(ZR);\n", +"D=imag(ZR);\n", +"printf('Load impedance = %f /_ %f ohms',round(abs(ZR)*10)/10,round(atan(imag(ZR),real(ZR))*180*100/%pi)/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: Calculating_VSWR_and_position_of_voltage_minimum_nearest_to_load.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=50;f=300*(10^6);ZR=50+(%i*50);\n", +"lo=300/(f*(10^-6)); //where f is in megahertz ,lo=wavelength of wave in air\n", +"K=(ZR-Zo)/(ZR+Zo);\n", +"ampK=sqrt((real(K)^2)+(imag(K)^2));\n", +"S=(1+ampK)/(1-ampK);\n", +"printf('-VSWR = %f\n',round(S*100)/100);\n", +"phi=atan(imag(K)/real(K));\n", +"ymax=phi*lo/(2*2*%pi);\n", +"ymin=ymax+(lo/4);\n", +"printf('-Position of voltage minimum nearest load = %f metres',round(ymin*10000)/10000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: Calculating_standing_wave_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Zo=400;ZRa=70,ZRb=800;ZRc=650-(%i*475);\n", +"Ka=(ZRa-Zo)/(ZRa+Zo);\n", +"ampKa=sqrt((real(Ka)^2)+(imag(Ka)^2));\n", +"Sa=(1+ampKa)/(1-ampKa);\n", +"printf('(a)Standing wave ratio = %f\n',round(Sa*100)/100);\n", +"Kb=(ZRb-Zo)/(ZRb+Zo);\n", +"ampKb=sqrt((real(Kb)^2)+(imag(Kb)^2));\n", +"Sb=(1+ampKb)/(1-ampKb);\n", +"printf('(b)Standing wave ratio = %f\n',Sb);\n", +"Kc=(ZRc-Zo)/(ZRc+Zo);\n", +"ampKc=sqrt((real(Kc)^2)+(imag(Kc)^2));\n", +"Sc=(1+ampKc)/(1-ampKc);\n", +"printf('(c)Standing wave ratio = %f',round(Sc*1000)/1000);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: Calculating_value_of_load_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"s=2;f=300*(10^6);lo=1;ymin=0.8; //lo=wavelength\n", +"ampK=(s-1)/(s+1);\n", +"b=2*%pi/lo;\n", +"phi=(2*b*ymin)-%pi;\n", +"K=ampK*(exp(%i*phi));\n", +"Zr=(1+K)/(1-K);\n", +"A=real(Zr);\n", +"B=imag(Zr);\n", +"printf('Value of load impedance = %f /_ %f ohms',round(abs(Zr)*10)/10,fix(atan(B,A)*180*100/%pi)/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/7-Waveguides.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/7-Waveguides.ipynb new file mode 100644 index 0000000..a997a97 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/7-Waveguides.ipynb @@ -0,0 +1,236 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Waveguides" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: Calculating_critical_and_guide_wavelengths.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"c=3*(10^8);\n", +"f=3000*(10^8);\n", +"lo=c/f;\n", +"l=lo*(10^4);\n", +"m=1;n=0;a=7.62;\n", +"lc=2*a;\n", +"printf('-Critical wavelength = %f cm\n',lc);\n", +"lg=sqrt((l*l*lc*lc)/((lc*lc)-(l*l)));\n", +"printf('-Guide wavelength = %f cm',round(lg*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: Finding_the_value_of_the_dominant_mode.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc\n", +"a=3;\n", +"lc=2*a;\n", +"Zs=500;n=377;c=3*(10^8);\n", +"lo=sqrt(1-((n/Zs)^2))*lc;\n", +"f=c/lo;\n", +"f1=f/(10^7);\n", +"printf('Frequency of dominant mode = %f GHz',round(f1*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: EX7_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc\n", +"a=4.5;b=3;f=9*(10^9);c=3*(10^8);n=377\n", +"lo=c/f;\n", +"l=lo*(10^2);\n", +"lc=2*a;\n", +"printf('(i)Cutoff wavelegth = %f cm\n',lc);\n", +"lg=l /(sqrt(1-((l/lc)^2)));\n", +"printf('(ii)Guide wavelength = %f cm\n',fix(lg*100)/100);\n", +"Vp=(lg/l)*c*10^-8;\n", +"printf('(iii)Phase velocity = %f * 10^8 m/sec\n',fix(Vp*100)/100);\n", +"Vg=(l/lg)*c*10^-8;\n", +"printf(' Group velocity = %f * 10^8 m/sec\n',round(Vg*100)/100);\n", +"Z=n/(sqrt(1-((l/lc)^2)));\n", +"printf('(iv)Characteristic impedance = %f ohm',fix(Z));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: Calculating_voltage_attenuation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"a=1;c=3*(10^8);f=(10^9);d=25;\n", +"lc=2*a;\n", +"lo=c/f;\n", +"l=lo/(10^2);\n", +"att=(54.55/lc)*d;\n", +"printf('Total attenuation = %f db',round(att*100)/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: Calculating_group_and_phase_velocities_and_phase_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"c=3*(10^8);f=3000*(10^6);a=.0722;\n", +"lo=c/f;\n", +"lc=2*a;\n", +"lg=lo/(sqrt(1-((lo/lc)^2)));\n", +"Vp=(lg/lo)*c*10^-8;\n", +"printf('-Phase velocity Vp = %f * 10^8 m/sec\n',round(Vp*10)/10);\n", +"Vg=(lo/lg)*c*10^-8;\n", +"printf('-Group velocity Vg = %f * 10^8 m/sec\n',round(Vg*10)/10);\n", +"b=(2*%pi)/lg;\n", +"printf('-Phase constant = %f radians/m',round(b));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: Calculating_cut_off_frequencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc\n", +"d=5;c=3*(10^8);\n", +"lo=1.706*d;\n", +"f=c/lo;\n", +"ff=f/(10^7);\n", +"printf('(i)Cutoff frequency for TE11 = %f GHz\n',round(ff*100)/100);\n", +"l=1.306*d;\n", +"fc=c/l;\n", +"ffc=fc/(10^7);\n", +"printf('(ii)Cutoff frequency for TE01 = %f GHz',round(ffc*10)/10);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: EX7_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"c=3*(10^8);f=8*(10^9);r=2.5;h=1.84;n=377;\n", +"l=c/f;\n", +"lo=l*(10^2);\n", +"lc=2*%pi*r/h;\n", +"printf('-Cutoff wavelength = %f cm\n',round(lc*100)/100);\n", +"lp=lo/(sqrt(1-((lo/lc)^2)));\n", +"printf('-Guide wavelength = %f cm\n',round(lp*100)/100);\n", +"Zo=n/(sqrt(1-((lo/lc)^2)));\n", +"printf('-Characteristic wave impedance = %f ohm',fix(Zo*10)/10);" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/8-Transmission_Lines_Measurements.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/8-Transmission_Lines_Measurements.ipynb new file mode 100644 index 0000000..53b5c19 --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/8-Transmission_Lines_Measurements.ipynb @@ -0,0 +1,107 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Transmission Lines Measurements" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: Calculating_the_value_of_load_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"K=0.5*exp(%i*(30)/(180/%pi));\n", +"Zo=100;\n", +"Zl=Zo*(1+K)/(1-K);\n", +"A=real(Zl);\n", +"B=imag(Zl);\n", +"printf('Load impedance = %f /_ %f ohms',fix(abs(Zl)),round(atan(B,A)*180/%pi));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: Calculating_insertion_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"P1=67;P2=30;\n", +"L=10*log10(P1/P2);\n", +"printf('Insertion loss = %f db',fix(L*100)/100);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: Calculating_insertion_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"S=2;\n", +"Lr=10*log10(((S+1)^2)/(4*S));\n", +"Ld=10*log10((S+1)/(S-1));\n", +"L=Ld+Lr;\n", +"printf('Insertion loss = %f db',round(L*100)/100);\n", +"//the difference in result is due to erroneous value in textbook.\n", +"disp('The difference in result is due to erroneous value in textbook')" + ] + } +], +"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/Transmission_Lines_And_Networks_by_U_Sinha/9-Artificial_Lines.ipynb b/Transmission_Lines_And_Networks_by_U_Sinha/9-Artificial_Lines.ipynb new file mode 100644 index 0000000..a2d487e --- /dev/null +++ b/Transmission_Lines_And_Networks_by_U_Sinha/9-Artificial_Lines.ipynb @@ -0,0 +1,178 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Artificial Lines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Designing_an_artificial_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10.4;L=3.67*(10^-3);G=0.8*(10^-6);C=0.00835*(10^-6);bmax=0.1;\n", +"f=5.5*(10^3); //artificial line will be designed fr highest frequecy of operation\n", +"w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"P=sqrt(Z*Y);\n", +"b=imag(P);\n", +"l=bmax/b;\n", +"Zs=Z*l/2;\n", +"Zsh=1/(Y*l);\n", +"Zr=Y*l;\n", +"R1=real(Zs);\n", +"printf('-R1/2 = %f ohms\n',round(R1*10)/10);\n", +"L1=imag(Zs)/w;\n", +"printf('-L1/2 = %f mH\n',fix(L1*(10^3)*100)/100);\n", +"C2=imag(Zr)/w;\n", +"printf('-C2 = %f microfarads\n',fix(C2*(10^6)*10^4)/10^4);\n", +"G2=real(Zr);\n", +"R2=1/(round(G2*10^6*10)/10);\n", +"printf('-R2 = %f m ohms',R2);" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: Designing_an_artificial_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=16.64;L=5.87*(10^-3);G=1.28*(10^-6);C=0.0134*(10^-6);bmax=0.1;f2=5500;f1=30;\n", +"w=2*%pi*f2;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"P=fix(sqrt(Z*Y)*10^4)/10^4;\n", +"a=-f1*((-3*real(P)*real(P)*imag(P))-((imag(P))^3))/24;\n", +"a1=round(a*1000)/1000;\n", +"v=sqrt(bmax/a1);\n", +"l=f1/v;\n", +"R1=R*f1/(2*l);\n", +"L1=L*f1*10^3/(2*l);\n", +"C1=C*f1*10^6/l;\n", +"G1=G*f1/l;\n", +"Rg=1/G1;\n", +"printf('The elements of the artificial line are:\n');\n", +"printf(' R/2 = %f ohms\n',fix(R1*100)/100);\n", +"printf(' L/2 = %f mH\n',fix(L1*100)/100);\n", +"printf(' C = %f microfarads\n',fix(C1*1000)/1000);\n", +"printf(' Rg = %f k ohms\n',round((Rg*0.1)/100));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: Designing_a_delay_line_using_T_section.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"Ro=500;Td=1*(10^-6);Tr=0.3*(10^-6);\n", +"n=1.1*((Td/Tr)^(3/2));\n", +"N=round(n);\n", +"printf('-Number of T-sections required = %f\n',N);\n", +"C=Td/(1.07*N*Ro);\n", +"printf('-C = %f microfarads\n',C*(10^6));\n", +"L=(Ro*Td)/(1.07*n);\n", +"printf('-L = %f mH',L*(10^3));\n", +"//the difference in result of L is due to erroneous value in textbook.\n", +"disp('The difference in result of L is due to erroneous value in textbook')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: Designing_an_artificial_line.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clear;\n", +"clc;\n", +"R=10.4;L=3.66*(10^-3);G=0.8*(10^-6);C=0.00835*(10^-6);bmax=0.1;s=7.88;f=5000;w=2*%pi*f;\n", +"Z=R+(%i*w*L);\n", +"Y=G+(%i*w*C);\n", +"P=sqrt(Z*Y);\n", +"b=imag(P);\n", +"lmax=bmax/b;\n", +"l=s/20; //l<lmax\n", +"Zs=Z*l/2;\n", +"Zsh=1/(Y*l);\n", +"Zr=Y*l;\n", +"R1=real(Zs);\n", +"printf('-R1 = %f ohms\n',round(R1*100)/100);\n", +"L1=imag(Zs)/w;\n", +"printf('-L1 = %f mH\n',round(L1*(10^3)*100)/100);\n", +"C2=imag(Zr)/w;\n", +"printf('-C2 = %f microfarads\n',C2*(10^6));\n", +"G2=real(Zr);\n", +"printf('-G2 = %f micromhos',G2*(10^6));" + ] + } +], +"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 +} |