diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Antenna_and_Wave_Propagation_by_S_Wali | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.gz all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.tar.bz2 all-scilab-tbc-books-ipynb-06b09e7d29d252fb2f5a056eeb8bd1264ff6a333.zip |
Initial commit
Diffstat (limited to 'Antenna_and_Wave_Propagation_by_S_Wali')
13 files changed, 2884 insertions, 0 deletions
diff --git a/Antenna_and_Wave_Propagation_by_S_Wali/1-Review_of_Electromagnetics_and_Transmission_Lines.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/1-Review_of_Electromagnetics_and_Transmission_Lines.ipynb new file mode 100644 index 0000000..891923b --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/1-Review_of_Electromagnetics_and_Transmission_Lines.ipynb @@ -0,0 +1,65 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Review of Electromagnetics and Transmission Lines" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1_1: Find_the_wavelengths.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 1.1.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"\n", +"f1=100;//kHz\n", +"f2=1;//MHz\n", +"f3=10;//MHz\n", +"c=3*10^8;//m/s\n", +"lambda1=c/(f1*10^3);//m\n", +"lambda2=c/(f2*10^6);//m\n", +"lambda3=c/(f3*10^6);//m\n", +"disp(lambda1/1000,'At 100kHz, wavelength(km) : ');\n", +"disp(lambda2,'At 1MHz, wavelength(m) : ');\n", +"disp(lambda3,'At 10MHz, wavelength(m) : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/10-Broadband_and_frequency_independent_antenna.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/10-Broadband_and_frequency_independent_antenna.ipynb new file mode 100644 index 0000000..7b11cd7 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/10-Broadband_and_frequency_independent_antenna.ipynb @@ -0,0 +1,423 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Broadband and frequency independent antenna" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10_1: Elements_length_and_spacing.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.10.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"Gain=8.5;//dB(Gain)\n", +"tau=0.822;sigma=0.149;//for given gain\n", +"alfa=2*atand((1-tau)/4/sigma);//degree\n", +"fL=54;//MHz(Lower frequency)\n", +"fU=216;//MHz(Upper frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambdaU=c/(fU*10^6);//m(Upper wavelength)\n", +"lambdaL=c/(fL*10^6);//m(Lower wavelength)\n", +"l1=lambdaU/2;//m(Length of element1)\n", +"lN=lambdaL/2;//m(Length of longest element)\n", +"l2=l1/tau;l3=l2/tau;l4=l3/tau;l5=l4/tau;l6=l5/tau;l7=l6/tau;l8=l7/tau;l9=l8/tau;//m(Length of elements)\n", +"d1=2*sigma*l1;d2=2*sigma*l2;d3=2*sigma*l3;d4=2*sigma*l4;d5=2*sigma*l5;d6=2*sigma*l6;d7=2*sigma*l7;d8=2*sigma*l8;d9=2*sigma*l9;//meter(Spacing between elements)\n", +"d=d1+d2+d3+d4+d5+d6+d7+d8+d9;//meter(total spacing)\n", +"disp(lN,'Length(m) of longest element : ');\n", +"disp(l1,'Length(m) of element1 : ');\n", +"disp(l2,'Length(m) of element2 : ');\n", +"disp(l3,'Length(m) of element3 : ');\n", +"disp(l4,'Length(m) of element4 : ');\n", +"disp(l5,'Length(m) of element5 : ');\n", +"disp(l6,'Length(m) of element6 : ');\n", +"disp(l7,'Length(m) of element7 : ');\n", +"disp(l8,'Length(m) of element8 : ');\n", +"disp(l9,'Length(m) of element9 : ');\n", +"disp(d1,'Spacing(m) of element1 : ');\n", +"disp(d2,'Spacing(m) of element2 : ');\n", +"disp(d3,'Spacing(m) of element3 : ');\n", +"disp(d4,'Spacing(m) of element4 : ');\n", +"disp(d5,'Spacing(m) of element5 : ');\n", +"disp(d6,'Spacing(m) of element6 : ');\n", +"disp(d7,'Spacing(m) of element7 : ');\n", +"disp(d8,'Spacing(m) of element8 : ');\n", +"disp(d9,'Spacing(m) of element9 : ');\n", +"disp(d,'Total Spacing length(m) : ');\n", +"//Answer is not accurate in the book." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10_2: Design_a_log_periodic_dipole.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.10.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"tau=0.895;//scale factor\n", +"sigma=0.166;//(spacing factor)\n", +"fU=30;//MHz(Upper frequency)\n", +"fL=10;//MHz(Lower frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambdaU=c/(fU*10^6);//m(Upper wavelength)\n", +"lambdaL=c/(fL*10^6);//m(Lower wavelength)\n", +"l1=lambdaU/2;//m(Length of shortest element)\n", +"disp(l1,'Length of shortest element, l1 in meter is : ');\n", +"l2=l1/tau;l3=l2/tau;l4=l3/tau;l4=l3/tau;l5=l4/tau;l6=l5/tau;l7=l6/tau;l8=l7/tau;l9=l8/tau;l10=l9/tau;l11=l10/tau;//m(Length of element)\n", +"disp(l11,l10,l9,l8,l7,l6,l5,l4,l3,l2,'Other elements length(m) l2, l3, l4, l5, l6, l7, l8, l9, l10, l11 are : ');\n", +"alfa=17.97;//degree(angle)\n", +"R1=(l1/2)/tand(alfa/2);//m(Spacing between elements)\n", +"R2=R1/tau;R3=R2/tau;R4=R3/tau;R4=R3/tau;R5=R4/tau;R6=R5/tau;R7=R6/tau;R8=R7/tau;R9=R8/tau;R10=R9/tau;R11=R10/tau;//m\n", +"disp(R11,R10,R9,R8,R7,R6,R5,R4,R3,R2,R1,'Spacing between elements in meter R1, R2, R3, R4, R5, R6, R7, R8,R9, R10, R11 are : ');\n", +"//Answer is not accurate in the book." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5_1: Five_turn_helical_antenna.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.5.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"N=5;//no. of turns\n", +"f=400;//MHz(Frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"disp('Part (i)');\n", +"S=lambda/50;//m(Spacing between turns)\n", +"S_BY_lambda=1/50;//(Spacing/wavelength)\n", +"C_BY_lambda=sqrt(2*S_BY_lambda);//(Circumference/wavelength)\n", +"disp('Circumference is '+string(C_BY_lambda)+'*lambda');\n", +"C=sqrt(2*lambda*S);//m(Circumference)\n", +"disp(C,'Circumference in meter : ');\n", +"disp('Part (ii)');\n", +"Lo_BY_lambda=sqrt(S_BY_lambda^2+C_BY_lambda^2);//(Length/wavelength)\n", +"disp('Length of single turn is '+string(Lo_BY_lambda)+'*lambda');\n", +"Lo=sqrt(S^2+C^2);//m(Length of single turn)\n", +"disp(Lo,'Length of single turn in meter : ');\n", +"disp('Part (iii)');\n", +"Ln_BY_lambda=N*Lo_BY_lambda;//(Overall length/wavelength)\n", +"disp('Overall Length is '+string(Ln_BY_lambda)+'*lambda');\n", +"Ln=N*Lo;//m(Overall length)\n", +"disp(Ln,'Overall Length in meter : ');\n", +"disp('Part (iv)');\n", +"alfa=atand(S/C);//degree(Pitch angle)\n", +"disp(alfa,'Pitch angle, α in degree : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5_2: Five_turn_helical_antenna.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.5.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"N=5;//no. of turns\n", +"f=300;//MHz(Frequency)\n", +"c=3*10^8;//m/s(speed of light)\n", +"disp('Part (i)');\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"C_BY_lambda=1;//(Circumference/wavelength)\n", +"disp('Near optimum circumference is '+string(C_BY_lambda)+'*lambda');\n", +"C=lambda;//m(Circumference)\n", +"disp(C,'Near optimum circumference in meter : ');\n", +"disp('Part (ii)');\n", +"alfa=14;//degree//(Pitch angle)//for near optimum\n", +"S_BY_lambda=C_BY_lambda*tand(alfa);\n", +"disp('Spacing is '+string(S_BY_lambda)+'*lambda');\n", +"S=C*tand(alfa);//m(Spacing)\n", +"disp(S,'Spacing in meter : ');\n", +"disp('Part (iii)');\n", +"Rin=140*C/lambda;//Ω(Input impedence)\n", +"disp(Rin,'Input impedence in Ω : ');\n", +"disp('Part (iv)');\n", +"HPBW=52/(C/lambda*sqrt(N*S/lambda));//degree(HPBW)\n", +"disp(HPBW,'HPBW in degree : ');\n", +"disp('Part (v)');\n", +"FNBW=115/(C/lambda*sqrt(N*S/lambda));//degree(FNBW)\n", +"disp(FNBW,'FNBW in degree : ');\n", +"disp('Part (vi)');\n", +"Do=15*(C/lambda)^2*N*(S/lambda);//unitless////Directivity\n", +"disp(Do,'Directivity(unitless) : ');\n", +"Do_dB=10*log10(Do);//dB(Directivity)\n", +"disp(Do_dB,'Directivity in dB : ');\n", +"disp('Part (vii)');\n", +"AR=(2*N+1)/2/N;//axial ratio\n", +"disp(AR,'Axial ratio : ');\n", +"disp('Part (viii)');\n", +"Rin=140*(C/lambda);//Ω(Input impedence)\n", +"//50 Ω line\n", +"Zo=50;//Ω(Output impedence)\n", +"Tau=(Rin-Zo)/(Rin+Zo);//Scaling factor\n", +"VSWR=(1+Tau)/(1-Tau);//(VSWR)\n", +"disp(VSWR,'VSWR for 50Ω line : ');\n", +"//75 Ω line\n", +"Zo=75;//Ω(Output impedence)\n", +"Tau=(Rin-Zo)/(Rin+Zo);//Scaling factor\n", +"VSWR=(1+Tau)/(1-Tau);//(VSWR)\n", +"disp(VSWR,'VSWR for 75Ω line : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5_3: Various_parameters_of_helix_array.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.5.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"HPBW=39;//degree(HPBW)\n", +"alfa=12.5;//degree(Pitch angle)\n", +"f=475;//MHz(Frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"C=lambda;//m(Circumference)\n", +"disp('Part (i)');\n", +"//it is in axial mode as 3/4*lambda<C<4/3*lambda\n", +"S=C*tand(alfa);//meter(Spacing)\n", +"N=52^2/HPBW^2/(S/lambda)/(C/lambda)^2;//turns\n", +"disp(round(N),'Number of turns : ');\n", +"disp('Part (ii)');\n", +"N=round(N);//turns\n", +"Do=15*(C/lambda)^2*N*(S/lambda);//unitless(Directivity)\n", +"Do_dB=10*log10(Do);//dB(Directivity)\n", +"disp(Do_dB,'Directivity in decibels : ');\n", +"disp('Part (iii)');\n", +"AR=(2*N+1)/2/N;//axial ratio\n", +"disp(AR,'Axial ratio : ');\n", +"disp('Part (iv)');\n", +"//3/4*lambda<C<4/3*lambda\n", +"lambda1=C/(3/4);//meter(Wavelength)\n", +"lambda2=C/(4/3);//meter(Wavelength)\n", +"f1=c/lambda1;//Hz(Frequency)\n", +"f2=c/lambda2;//Hz(Frequency)\n", +"disp('Frequency range is '+string(f1/10^6)+' MHz to '+string(f2/10^6)+' MHz.')\n", +"disp('Part (v)');\n", +"//At design frequency\n", +"Rin=140*C/lambda;//Ω(Input impedence)\n", +"disp(Rin,'At design frequency, Input impedence in Ω is : ');\n", +"//3/4*lambda<C<4/3*lambda\n", +"//At high frequency end\n", +"Rin=140*C/lambda2;//Ω(Input impedence)\n", +"disp(Rin,'At high frequency end, Input impedence in Ω is : ');\n", +"//At low frequency end\n", +"Rin=140*C/lambda1;//Ω(Input impedence)\n", +"disp(Rin,'At low frequency end, Input impedence in Ω is : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5_4: Input_Impedence_HPBW_and_Axial_ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.5.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"Do_dB=14;//dB(Directivity)\n", +"f=2.4;//GHz(Frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"Do=10^(Do_dB/10);//unitless(Directivity)\n", +"C=lambda;//m////for optimum result(Circumference)\n", +"alfa=14;//degree;////for optimum result(Pitch angle)\n", +"S=C*tand(alfa);//m(Spacing)\n", +"N=Do/15/(C/lambda)^2/(S/lambda);//turns\n", +"N=round(N);//turns\n", +"Rin=140*C/lambda;//Ω(Input impedence)\n", +"disp(Rin,'Input impedence in Ω is : ');\n", +"HPBW=52/(C/lambda*sqrt(N*S/lambda));//degree\n", +"disp(HPBW,'HPBW in degree : ');\n", +"format('v',4);\n", +"FNBW=115/(C/lambda*sqrt(N*S/lambda));//degree\n", +"disp(FNBW,'FNBW in degree : ');\n", +"AR=(2*N+1)/2/N;//(Axial ratio)\n", +"disp(AR,'Axial ratio : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8_1: Symmetrical_two_wire_spiral.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.8.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8);\n", +"f=10;//MHz(Frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"d0=10^-3*lambda;//m(spacing)\n", +"Lo=1*lambda;//m(Length)\n", +"fi=%pi;fi0=0;//radian\n", +"r0=d0/2;//m\n", +"disp('Part (i)');\n", +"//R=r0*exp(a*fi-a*fi0);//m\n", +"//a=sqrt(1/Lo^2/(R-r0)^2-1);//per adian\n", +"a=1.166;//rad^-1(by above equation)\n", +"disp(a,'Rate of spiral in rad^-1 : ');\n", +"R_BY_lambda=r0/lambda*exp(a*2*%pi);//m(Radius/wavelength)\n", +"disp('Radius of terminal point is '+string(R_BY_lambda)+'*lambda');\n", +"disp('Part (ii)');\n", +"R=r0*exp(a*2*%pi);//m(Radius)\n", +"disp(R,'Radius at terminal point in meter : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8_2: Design_Equiangular_spiral_Antena.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 10.8.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"fU=900;//MHz(Upper frequency)\n", +"fL=450;//MHz(Lower frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambdaU=c/(fU*10^6);//m(Upper wavelength)\n", +"lambdaL=c/(fL*10^6);//m(Lower wavelength)\n", +"Exp_ratio=4;//expansion ratio\n", +"a=log(Exp_ratio)/(2*%pi);//rad^-1////rate of spiral\n", +"Beta=atand(1/a);//degree\n", +"r0=lambdaU/4;//meter////minimum radius\n", +"disp(r0*100,'Minimum radius in cm : ');\n", +"R=lambdaL/4;//meter////minimum radius\n", +"disp(R*100,'Maximum radius in cm : ');\n", +"fi_m=log(R/r0)/a;//radian\n", +"fi_m=fi_m*180/%pi;//degree\n", +"disp(fi_m,'Φm in degree is ');\n", +"N=1/2;//for Φm=180;//degree\n", +"disp(N,'Number of turns, N is ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/11-Microstrip_Antennas.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/11-Microstrip_Antennas.ipynb new file mode 100644 index 0000000..8320d9e --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/11-Microstrip_Antennas.ipynb @@ -0,0 +1,64 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Microstrip Antennas" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.9_1: Determine_physical_dimensions.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 11.9.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"fr=10;//GHz(center frequency)\n", +"fr=fr*10^9;//Hz(center frequency)\n", +"epsilon_r=10.2;//(constant)\n", +"h=0.127;//cm(height of sustrate)\n", +"c=3*10^10;//cm/s(Speed of light)\n", +"W=c/2/fr*sqrt(2/(epsilon_r+1));//cm(Physical dimension)\n", +"epsilon_reff=(epsilon_r+1)/2+(epsilon_r-1)/2*[1+12*h/W]^(-1/2);//(effective constant)\n", +"delta_L=h*0.412*(epsilon_reff+0.3)*(W/h+0.264)/[(epsilon_reff-0.258)*(W/h+0.8)];//cm(distance)\n", +"L=c/2/fr/sqrt(epsilon_reff)-2*delta_L;//cm(distance)\n", +"disp(L,W,'Design values of W & L(in cm) are : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/12-Reflector_Antennas.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/12-Reflector_Antennas.ipynb new file mode 100644 index 0000000..bcc37f4 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/12-Reflector_Antennas.ipynb @@ -0,0 +1,130 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Reflector Antennas" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9_1: First_null_beam_width_and_power_gain.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 12.9.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"D=2;//m(Diameter)\n", +"f=6000;//MHz(Frequency)\n", +"c=3*10^8;//m/s////speed of light\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"FNBW=140*lambda/D;//degree\n", +"disp(FNBW,'First null beam width(FNBW in degree) : ');\n", +"GP=6*(D/lambda)^2;//unitless(Power gain)\n", +"GP_dB=10*log10(GP);//dB(Power gain)\n", +"disp(GP_dB,'Power Gain in dB : ');\n", +"//Ans in the book is not accurate." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9_2: Diameter_of_mouth_and_HPBW.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 12.9.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"GP=1000;//unitless(Power gain)\n", +"lambda=10;//cm(Wavelength)\n", +"D=sqrt(GP/6)*(lambda/100);//m(Diameter)\n", +"disp(D,'Diameter of mouth in meter : ');\n", +"HPBW=58*(lambda/100)/D;//degree(HPBW)\n", +"disp(HPBW,'Half power beam width(HPBW in degree) : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9_3: Gain_Beamwidth_and_capture_area.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 12.9.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"D=6;//meter(Diameter)\n", +"f=10;//GHz(Frequency)\n", +"c=3*10^8;//m/s////speed of light\n", +"lambda=c/(f*10^9);//m(Wavelength)\n", +"GP=6*(D/lambda)^2;//unitless(Power gain)\n", +"GP_dB=10*log10(GP);//dB(Power gain)\n", +"disp(GP_dB,'Gain in dB : ');\n", +"FNBW=140*lambda/D;//degree(FNBW)\n", +"disp(FNBW,'FNBW in degree : ');\n", +"HPBW=58*lambda/D;//degree(HPBW)\n", +"disp(HPBW,'HPBW in degree : ');\n", +"K=0.65;//constant\n", +"Ao=K*%pi/4*D^2;//m²(Capture area)\n", +"disp(Ao,'Capture area in m² : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/13-Antenna_Measurement.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/13-Antenna_Measurement.ipynb new file mode 100644 index 0000000..280f42c --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/13-Antenna_Measurement.ipynb @@ -0,0 +1,70 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Antenna Measurement" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.4_1: Gains_of_Antennas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 13.4.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"Pr1=0.0297/1000;//W(Recieved power)\n", +"Pr2=0.0471/1000;//W(Recieved power)\n", +"Pr3=0.0374/1000;//W(Recieved power)\n", +"Pt=1;//W(Transmitted power)\n", +"R=10;//m(Radius)\n", +"f=980;//MHz(Frequency)\n", +"f=f*10^6;//Hz(Frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambda=c/f;//m(Wavelength)\n", +"A=20*log10(4*%pi*R/lambda)+10*log10(Pr1/Pt);//(A=G1dB+G2dB)\n", +"B=20*log10(4*%pi*R/lambda)+10*log10(Pr2/Pt);//(B=G1dB+G3dB)\n", +"C=20*log10(4*%pi*R/lambda)+10*log10(Pr3/Pt);//(C=G2dB+G3dB)\n", +"G1dB=(A+B-C)/2;\n", +"G2dB=(A-B+C)/2;\n", +"G3dB=(-A+B+C)/2;\n", +"disp(round(G3dB),round(G2dB),round(G1dB),'Gain of antennas, G1db, G2dB & G3dB(in dB) are : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/14-Ground_Wave_Propagation.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/14-Ground_Wave_Propagation.ipynb new file mode 100644 index 0000000..36105df --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/14-Ground_Wave_Propagation.ipynb @@ -0,0 +1,270 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Ground Wave Propagation" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10_1: Calculate_the_range.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.10.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"ht=100;//m(transmitter height)\n", +"hr=100;//m(receiver height)\n", +"d=3.57*[sqrt(ht)+sqrt(hr)];//km(Range)\n", +"disp(d,'Range of space wave propagation in km : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10_2: Radio_horizo.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.10.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"ht=100;//feet(transmitter height)\n", +"hr=50;//feet(receiver height)\n", +"d=1.4142*[sqrt(ht)+sqrt(hr)];//miles(Range)\n", +"disp(d,'Radio horizon in miles : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10_3: Maximum_covered_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.10.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"ht=80;//m(transmitter height)\n", +"hr=50;//m(receiver height)\n", +"d=4.12*[sqrt(ht)+sqrt(hr)];//km(Range)\n", +"disp(d,'Maximum distance in km : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10_4: Required_height_of_antenna.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.10.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"ht=100;//m(transmitter height)\n", +"d=80;//km(receiver height)\n", +"hr=(d/4.12-sqrt(ht))^2;//m(range)\n", +"disp(hr,'Required height of receiving antenna in meter : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10_5: Radio_horizon_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.10.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"ht=100;//m(transmitter height)\n", +"d=4.12*sqrt(ht);//km(Horizon distance)\n", +"disp(d,'Horizon distance in km : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.10_6: Find_Distance_and_field_strength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.10.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"P=35;//W(Transmitter power\n", +"ht=45;//m(transmitter height)\n", +"hr=25;//m(receiver height)\n", +"f=90;//MHz(frequency)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"d=4.12*[sqrt(ht)+sqrt(hr)];//km(line of sight distance)\n", +"disp(d,'Distance of line of sight communication in km : ');\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"ER=88*sqrt(P)*ht*hr/(lambda*(d*1000)^2);//V/m(Field strength)\n", +"disp(ER*10^6,'Field strength in micro Volt/meter : ');\n", +"//Answer is wrong in the textbook." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6_1: Loss_and_power_received.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.6.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"d=36000;//km(height of satellite)\n", +"f=4000;//MHz(frequency)\n", +"GT=20;//dB(Transmitter gain)\n", +"GR=40;//dB(Reciever gain)\n", +"PT=200;//W(Transmitted power)\n", +"PT=10*log10(PT);//dB(Transmitted power)\n", +"disp('Part (i)');\n", +"Ls=32.44+20*log10(f)+20*log10(d);//dB(Free space transmission loss)\n", +"disp(Ls,'Free space transmission loss in dB : ');\n", +"disp('Part (ii)');\n", +"PT=200;//W(Transmitted power)\n", +"PT_dB=10*log10(PT);//dB(Transmitted power)\n", +"PR_dB=PT_dB+GT+GR-Ls;//dB(Recieved power)\n", +"PR=10^(PR_dB/10);//W(Recieved power)\n", +"disp(PR*10^12,'Received power in pW : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.6_2: Open_circuit_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 14.6.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"f=150;//MHz(frequency)\n", +"c=3*10^8;//m/s(speed of light)\n", +"GT=1.64;//dB(Transmitter gain)\n", +"PT=20;//W(Transmitted power)\n", +"d=50;//km(distance)\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"E=sqrt(30*GT*PT)/(d*1000);//V/m(emf induced)\n", +"le=lambda/%pi;//m(Effective length)\n", +"Voc=E*le;//V/m(Open circuit voltage)\n", +"disp(Voc*10^6,'Open circuit voltage in micro Volt : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/15-Ionospheric_Propagation.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/15-Ionospheric_Propagation.ipynb new file mode 100644 index 0000000..484af74 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/15-Ionospheric_Propagation.ipynb @@ -0,0 +1,208 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Ionospheric Propagation" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.12_1: Calculate_MUF.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 15.12.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"\n", +"d=2000;//km\n", +"H=200;//km\n", +"fc=6;//MHz\n", +"f_MUF=fc*sqrt(1+(d/2/H)^2);//MHz\n", +"disp(f_MUF,'MUF in MHz : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.13_1: Calculate_the_range.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 15.13.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',8);\n", +"\n", +"Eta=0.9;//refractive index\n", +"f_MUF=10;//MHz\n", +"H=400;//km\n", +"Nm=(1-Eta^2)*(f_MUF*10^6)^2/81;//per m^3\n", +"fc=9*sqrt(Nm);//Hz\n", +"Dskip=2*H*sqrt((f_MUF*10^6/fc)^2-1);//km\n", +"disp(Dskip,'Skip distance or range in km : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8_1: Maximum_electron_density.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 15.8.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',11);\n", +"fc_E=2.5;//MHz(critical frequency of E-layer)\n", +"fc_F=8.4;//MHz(critical frequency of F-layer)\n", +"disp('For E-layer : ');\n", +"Nm=(fc_E*10^6)^2/81;//per m^3(Maximum electron density)\n", +"disp(Nm,'Maximum electron density in per m^3 : ');\n", +"disp('For F-layer : ');\n", +"Nm=(fc_F*10^6)^2/81;//per m^3(Maximum electron density)\n", +"disp(Nm,'Maximum electron density in per m^3 : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8_2: Critical_Frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 15.8.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"Nm_D=400;//electron/cm^3(Maximum electron density)\n", +"Nm_E=5*10^5;//electron/cm^3(Maximum electron density)\n", +"Nm_F=2*10^6;//electron/cm^3(Maximum electron density)\n", +"fc_D=9*sqrt(Nm_D);//kHz(critical frequency of D-layer)\n", +"disp(fc_D,'Critical frequency for D-layer in kHz : ');\n", +"fc_E=9*sqrt(Nm_E);//kHz(critical frequency of E-layer)\n", +"disp(fc_E/1000,'Critical frequency for E-layer in MHz : ');\n", +"fc_F=9*sqrt(Nm_F);//kHz(critical frequency of F-layer)\n", +"disp(fc_F/1000,'Critical frequency for F-layer in MHz : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.8_3: Calculate_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 15.8.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"Eta=0.5;//(refractive index)\n", +"N=400;//electron/cm^3(Electron density)\n", +"f=sqrt(81*N/(1-Eta^2));//kHz(frequency)\n", +"disp(f,'Frequency in kHz : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.9_1: Find_the_virtual_height.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 15.9.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"T=5;//milli-seconds(time period)\n", +"c=3*10^8;//m/s///speed of light\n", +"H=1/2*c*T*10^-3;//m(Virtual height)\n", +"disp(H/1000,'Virtual height in km : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/3-Fundamental_parameters_of_Antenna.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/3-Fundamental_parameters_of_Antenna.ipynb new file mode 100644 index 0000000..f62406a --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/3-Fundamental_parameters_of_Antenna.ipynb @@ -0,0 +1,547 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Fundamental parameters of Antenna" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10_1: Power_radiated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.10.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"\n", +"K=90;//%//radiation efficiency\n", +"Pin=10;//W\n", +"Prad=(K/100)*Pin;//W\n", +"disp(Prad,'Radiated power in Watts : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11_1: Gain_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.11.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"\n", +"D=20;//Directivity\n", +"K=90;//%//radiation efficiency\n", +"G=(K/100)*D;//Gain\n", +"GdB=10*log10(G);//dB\n", +"disp(GdB,'Gain in dB : ');\n", +"//Answer is not calculated in the book." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11_2: Directivity_in_dB.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.11.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"Rr=72;//Ω\n", +"RL=8;//Ω\n", +"G=16;//Gain\n", +"K=Rr/(Rr+RL)*100;//%//radiation efficiency\n", +"D=G/(K/100);//Directivity\n", +"DdB=10*log10(D);//dB\n", +"disp(DdB,'Directivity in dB : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13_1: Radiation_Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.13.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"Irms=15;//A(Current Drawn)\n", +"Prad=5;//kW(Radiated Power)\n", +"Rr=Prad*10^3/Irms^2;//Ω(Radiation Resistance)\n", +"disp(Rr,'Radiation resistance in Ω : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13_2: Current_Drawn.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.13.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',4);\n", +"Prad=1000;//W(Radiated Power)\n", +"Rr=300;//Ω(Radiation Resistance)\n", +"Irms=sqrt(Prad/Rr);//A(Current Drawn)\n", +"disp(Irms,'Current drawn in A : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13_3: Maximum_Effective_Aperture.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.13.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"Rr=73;//Ω(Radiation Resistance)\n", +"Z=120*%pi;//Ω(For free space)\n", +"//le=lambda/%pi\n", +"AemBYlambda_sqr=(1/%pi)^2*Z/(4*Rr);\n", +"disp('Maximum effective aperture in m² is '+string(AemBYlambda_sqr)+'*lambda²');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13_4: Effective_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.13.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"\n", +"Rr=73;//Ω\n", +"Z=120*%pi;//Ω(For free space)\n", +"//Aem=0.13*lambda²\n", +"AemBylambda_sqr=0.13;\n", +"leBYlambda=2*sqrt(AemBylambda_sqr*Rr)/sqrt(Z);\n", +"disp('Effective length in meter is '+string(leBYlambda)+'*lambda');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15_1: Polarization_Loss_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.15.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',4);\n", +"\n", +"cos_si_p=1/sqrt(2);\n", +"PLF=cos_si_p^2;//Polarization Loss factor\n", +"PLFdB=10*log10(PLF);//dB\n", +"disp(PLFdB,'Power loss factor in dB : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16_1: Maximum_effective_aperture_and_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.16.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9);\n", +"\n", +"Do_dB=20;//dB\n", +"f=10;//GHz\n", +"Wi=2*10^-3;//W/m²\n", +"c=3*10^8;//m/s\n", +"lambda=c/(f*10^9);//m\n", +"Do=10^(Do_dB/10);//unitless\n", +"Aem=lambda^2/(4*%pi)*Do;//m²\n", +"disp(Aem,'Maximum effective aperture in m² : ');\n", +"Pr=Aem*Wi;//W\n", +"disp(Pr*10^6,'Maximum received power in µW : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16_2: Directivity_of_Antenna.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.16.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"ecd=1;//for lossless antenna\n", +"Aem=2.147;//m²(Maximum Effective aperture)\n", +"Zin=75;//Ω(Input impedence)\n", +"Zo=50;//Ω(Output impedence)\n", +"f=100;//MHz(Operating frequency)\n", +"c=3*10^8;//m/s(speed f light)\n", +"aw_aa=1;//For no polarization loss\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"Tau=(Zin-Zo)/(Zin+Zo);//(Reflection Coefficient)\n", +"Do=Aem/(ecd*(1-Tau^2)*lambda^2/(4*%pi)/aw_aa^2);//unitless(Directivity)\n", +"disp(Do,'Directivity of antenna : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_1: Find_the_power_delivered.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.17.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',11);\n", +"PT=15;//W(Transmitted Power)\n", +"AeT=0.2;//m²(Effective aperture)\n", +"AeR=0.5;//m²(Effective aperture)\n", +"f=5;//GHz(frequency)\n", +"r=15;//km(line of sight distance)\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambda=c/(f*10^9);//m(Wavelength)\n", +"PR=PT*AeT*AeR/((r*1000)^2*lambda^2);//Watts(Power delivered to reciever)\n", +"disp(PR,'Power delivered to receiver in Watts : ');\n", +"//Answer is wrong in the book. lambda is 0.6 instead of 0.06 and lambda^2 is 0.06 instead of 0.0036" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_2: Calculate_the_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.17.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"DT=20;//dB(Transmitter Directivity)\n", +"DR=20;//dB(Reciever Directivity)\n", +"PT=10;//W(Transmitted Power)\n", +"ecdT=1;ecdR=1;//(For lossless antenna)\n", +"aT_aR=1;//(For polarization match)\n", +"DT=10^(DT/10);//unitless(Transmitter Directivity)\n", +"DR=10^(DR/10);//unitless(Reciever Directivity)\n", +"Tau_T=0;Tau_R=0;//(Reflection coefficient)\n", +"rBYlambda=50;//m\n", +"PR=PT*ecdT*ecdR*(1-Tau_T^2)*(1-Tau_R^2)/(4*%pi*rBYlambda)^2*DT*DR*aT_aR^2;//Watts(Power delivered to reciever)\n", +"disp(PR,'Power at receiving antenna in Watts : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17_3: Power_delivered_to_load.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.17.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',9);\n", +"f=3;//GHz\n", +"c=3*10^8;//m/s(Speed of light)\n", +"lambda=c/(f*10^9);//m(wavelength)\n", +"r=500;//m(distance)\n", +"PT=100;//W(Transmitted Power)\n", +"GT=25;//dB(Transmitter Gain)\n", +"GR=20;//dB(Reciever Gain)\n", +"GT=10^(GT/10);//unitless(Transmitter Gain)\n", +"GR=10^(GR/10);//unitless(Reciever Gain)\n", +"PLF=1;aT_aR=1;//(For polarization match)\n", +"PR=PT*(lambda/4/%pi/r)^2*GT*GR*aT_aR^2;//Watts(Power delivered to reciever)\n", +"disp(PR,'Power delivered to load in Watts : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3_1: Half_Power_Beam_Width.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.3.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"E_theta=1/sqrt(2);//Electric Field at half power\n", +"//theta=thetaHP/2;//E(thetaHP/2)=cosd(thetaHP/2)\n", +"thetaHP=2*acosd(E_theta);//degree(Half power beam width)\n", +"disp(thetaHP,'Half power beam width(degree) : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3_2: HPBW_and_FNBW.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.3.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"E_theta=1/sqrt(2);//Electric field at theta=90-thetaHP/2\n", +"//E(90-thetaHP/2)=sind(90-thetaHP/2)\n", +"thetaHP=2*(90-asind(E_theta));//degree(HPBW)\n", +"disp(thetaHP,'HPBW(degree) : ');\n", +"theta1=0;theta2=180;//degree(Pattern angles)\n", +"FNBW=theta2-theta1;//degree(FNBW)//as E is zero at these points\n", +"disp(FNBW,'FNBW(degree) : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3_3: Half_Power_Beam_width.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.3.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"E_theta=1/sqrt(2);//Elecric field at half power point\n", +"//E(thetaHP/2)=(cosd(thetaHP/2))^2\n", +"thetaHP=2*(acosd(sqrt(E_theta)));//degree(HPBW)\n", +"disp(thetaHP,'Half Power Beam Width(degree) : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8_1: Exact_and_Approximate_Directivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 3.8.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"theta1=0;theta2=%pi/2;//radian(Angles)\n", +"fi1=0;fi2=2*%pi;//radian(Angles)\n", +"//Prad=integrate('integrate('U','thheta',theta1,theta2)','fi',fi1,fi2);\n", +"Prad_BY_Um=%pi*(1/2)*(cos(2*theta1)-cos(2*theta2));//(Power radiated/Max intensity)\n", +"Do=4*%pi/Prad_BY_Um;//Exact Directivity\n", +"disp(Do,'Exact Directivity : ');\n", +"//Um*Cosd(thetaHP/2)=0.5*Um\n", +"thetaHP=2*acosd(0.5);//degree(HPBW)\n", +"fiHP=thetaHP;//degree(HPBW)\n", +"Do=41253/(thetaHP*fiHP);//Approximate Directivity\n", +"disp(Do,'Approximate Directivity : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/4-Linear_Wire_Antennas.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/4-Linear_Wire_Antennas.ipynb new file mode 100644 index 0000000..01ce0f8 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/4-Linear_Wire_Antennas.ipynb @@ -0,0 +1,296 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Linear Wire Antennas" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2_1: Er_Etheta_and_Hfi.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.2.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"l=5;//cm(length of antenna)\n", +"f=100;//MHz(operating frequency)\n", +"Io=120;//mA(Terminal current)\n", +"t=1;//s(time)\n", +"theta=45;//degree(Angle)\n", +"r=3;//m(radius)\n", +"c=3*10^8;//m/s////Speed of light\n", +"omega=2*%pi*f*10^6;//rad/sec(rotation)\n", +"k=omega/c;//rad/m(Phase constant)\n", +"kr=2*%pi*r/3;//degree(Phase constant)\n", +"Er=Io*10^-3*l*10^-2/(2*%pi*r^2)*cosd(theta)*120*%pi*[1+1/(%i*kr)]*exp(-%i*kr+%i*omega*t);//V/m(Electric field)\n", +"Er=Er*1000;//mV/m(Electric field)\n", +"Er_mag=abs(Er);//mV/m(magnitude of Er)\n", +"Er_angle=atand(imag(Er),real(Er));//degree(angle of Er)\n", +"disp(Er_angle,Er_mag,'Value of Er : magnitude(mV/m) and angle in degree : ');\n", +"Etheta=Io*10^-3*l*10^-2/(4*%pi*r)*sind(theta)*120*%pi*%i*k*[1+1/(%i*kr)+1/(%i*kr)^2]*exp(-%i*kr+%i*omega*t);//V/m(Electric field)\n", +"Etheta_mag=abs(Etheta);//V/m(magnitude of Etheta)\n", +"Etheta_angle=atand(imag(Etheta),real(Etheta));//degree(angle of Etheta)\n", +"disp(Etheta_angle,Etheta_mag,'Value of Etheta : magnitude(V/m) and angle in degree : ');\n", +"Hfi=Io*10^-3*l*10^-2/(4*%pi*r)*sind(theta)*%i*k*[1+1/(%i*kr)]*exp(-%i*kr+%i*omega*t);//A/m(Magnetic field)\n", +"Hfi_mag=abs(Hfi);//A/m(magnitude of Hfi)\n", +"Hfi_angle=atand(imag(Hfi),real(Hfi));//degree(angle of Hfi)\n", +"disp(Hfi_angle,Hfi_mag,'Value of HΦ : magnitude(A/m) and angle in degree : ');\n", +"//Answer is not accurate in the book." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5_1: Effective_area.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.5.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"f=500;//MHz(Operating Frequency)\n", +"Do=1.643;//for half wave dipole\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"Aem=lambda^2/(4*%pi)*Do;//m²(Effective area)\n", +"disp(Aem,'Effective area in m² : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6_1: Current_required.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.6.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"\n", +"l=1;//m\n", +"Prad=4;//W\n", +"f=1.5;//MHz\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^6);//m\n", +"//here l/lambda<1/50 tells us it is a Hertzian monopole antenna\n", +"h=1;//m\n", +"Rr=40*%pi^2*(h/lambda)^2;//mΩ\n", +"Io=sqrt(2*Prad/Rr);//A\n", +"disp(Io,'Current required in A : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9_1: Power_radiated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.9.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"\n", +"le=100;//m\n", +"Irms=450;//A\n", +"f=40000;//Hz\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/f;//m\n", +"P=160*%pi^2*(le/lambda)^2*Irms^2;//mW\n", +"Rr=160*%pi^2*(le/lambda)^2;//Ω\n", +"disp(P*10^-3,'Power radiated in W : ');\n", +"disp(Rr,'Radiation resistance in Ω : ');\n", +"//Answer wrong for radiation resistance in the book." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9_2: Radiation_resistance_and_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.9.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"\n", +"le=61.4;//m\n", +"Irms=50;//A\n", +"lambda=625;//m\n", +"P=160*%pi^2*(le/lambda)^2*Irms^2;//kW\n", +"Rr=160*%pi^2*(le/lambda)^2;//Ω\n", +"disp(P*10^-3,'Power radiated in kW : ');\n", +"disp(Rr,'Radiation resistance in Ω : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9_3: Power_radiated_and_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.9.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"le=10;//m(effective length)\n", +"Irms=450;//A(rms current)\n", +"Rl=1.5;//Ω(resistance)\n", +"f=50;//kHz(Operating frequency)\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^3);//m(Wavelength)\n", +"P=160*%pi^2*(le/lambda)^2*Irms^2;//kW(Power)\n", +"P=P*1000;//W(Power)\n", +"Rr=160*%pi^2*(le/lambda)^2;//Ω(Radiation resistance)\n", +"Eta=Rr/(Rr+Rl)*100;//%(Efficiency)\n", +"disp(Eta,'Efficiency of antenna in % : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9_4: Radiation_Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.9.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"//l=lambda/8\n", +"lBYlambda=1/8;//(length/Wavelength)\n", +"Rr=80*%pi^2*(lBYlambda)^2;//Ω(Radiation resistance)\n", +"disp(Rr,'Radiation resistance in Ω : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9_5: Radiation_Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 4.9.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"L=1;//m(Length of element)\n", +"f=10;//MHz(Operating frequency)\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"Rr=80*%pi^2*(L/lambda)^2;//Ω(Radiation resistance)\n", +"disp(Rr,'Radiation resistance in Ω : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/6-Antenna_Arrays.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/6-Antenna_Arrays.ipynb new file mode 100644 index 0000000..44ba796 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/6-Antenna_Arrays.ipynb @@ -0,0 +1,408 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Antenna Arrays" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10_1: Find_the_Directivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.10.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"n=10;//no. of elements\n", +"//d=lambda/4;(spacing)\n", +"dBYlambda=1/4;///(Spacing/wavelength)\n", +"//Broadside array\n", +"D=2*n*dBYlambda;//unitless(Directivity)\n", +"D=10*log10(D);//dB(Directivity)\n", +"disp(D,'Directivity for broadside array in dB : ');\n", +"//Endfire array\n", +"D=4*n*dBYlambda;//unitless(Directivity)\n", +"D=10*log10(D);//dB(Directivity)\n", +"disp(D,'Directivity for Ordinary endfire array in dB : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10_2: Design_ordinary_endfire_array.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.10.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"D=20;//dB(Directivity)\n", +"//d=lambda/4;(spacing)\n", +"dBYlambda=1/4;//(spacing/wavelength)\n", +"D=10^(D/10);//unitless(Directivity)\n", +"n=D/4/dBYlambda;//no. of elements\n", +"disp(n,'(i) No. of elements : ');\n", +"LBYlambda=(n-1)*dBYlambda;//(length/wavelength)\n", +"disp('(ii) Length of the array is '+string(LBYlambda)+'*lambda');\n", +"HPBW=2*acosd(1-1.391/%pi/n/dBYlambda);//degree(HPBW)\n", +"disp(HPBW,'(iii) HPBW in degree : ');\n", +"SLL=-13.46;//dB(Side lobe level)\n", +"disp(SLL,'(iv) SLL in dB : ');\n", +"Beta_into_lambda=2*%pi;//(temorary calculatuion)\n", +"//alfa=-Beta*d;//for theta=0\n", +"//alfa=Beta*d;//for theta=180\n", +"alfa1=-Beta_into_lambda*dBYlambda;//radian////for theta=0\n", +"alfa1=alfa1*180/%pi;//degree(angle)\n", +"alfa2=Beta_into_lambda*dBYlambda;//radian////for theta=180\n", +"alfa2=alfa2*180/%pi;//degree(angle)\n", +"disp(alfa2,alfa1,'(v) Progressive phase shift, α for theta equals to 0° & 180° are : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14_1: Four_Element_broadside_array.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.14.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"SLL=19.1;//dB(Side Lobe Level)\n", +"//d=lambda/2;(spacing)\n", +"dBYlambda=1/2;//(Spacing/wavelength)\n", +"n=4;//(no. of elements)\n", +"r=round(10^(SLL/20));//(ratio of main lobe to side lobe)\n", +"m=n-1;//(degree )\n", +"//T3(x0)=r=4*x0^3-3*x0;\n", +"x0=roots([4 0 -3 -r]);//(Coefficient)\n", +"x0=x0(1);//taking real value(Coefficient)\n", +"//E4(z)=T3(x)=4*x^3-3*x=4*a1*z^3-3*a1*z+a0*z\n", +"//4*a1*z^3=4*x^3 where z^3=(x/x0)^3\n", +"a1=4*x0^3/4;//(Coefficient)\n", +"//a0*z-3*z*a1=-3*x\n", +"a0=(3/x0*a1-3)*x0;//(Coefficient)\n", +"disp(a0,a1,'Coefficients of array polynomial a1 & a0 are : ');\n", +"disp(a0/a1,a1/a1,'Relative current amplitudes are :');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2_1: Relative_field_patter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.2.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"n=2;//(No. of point source)\n", +"//E=E0*{exp(%i*%pi/2)-exp(-%i*si/2)} where exp(-%i*si)=-1\n", +"//si=Beta*d*cosd(fi)=2*%pi*cosd(fi)\n", +"//E=2*%i*E0*sind(%pi*cosd(fi)); But 2*%i*E0=1\n", +"fi=[0 30 60 90 120 150 180 210 240 270 300 330];//degree(angle)\n", +"En=sin(%pi*cosd(fi));//Normalized field\n", +"disp('Different values of fi : ');\n", +"disp(string(fi));\n", +"disp('Corresponding normalized field is : ');\n", +"disp(string(abs(En)));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2_2: Radiation_patern.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.2.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"n=2;//(No. of point source)\n", +"//E=E0*{exp(%i*(%pi/4+si/2))-exp(-%i*(%pi/4+si/2))} as exp(%i*theta)+exp(-%i*theta)=2*cos(theta)\n", +"//E=2*E0*cos(%pi/4+si/2);\n", +"//si=Beta*d*cosd(fi)=2*%pi*cosd(fi)\n", +"//En=cos(%pi/4+Beta*d*cosd(%pi/4)); But 2*E0=1\n", +"fi=[0 30 60 90 120 150 180 210 240 270 300 330];//degree(angle)\n", +"En=cos(%pi/4+%pi/4*cosd(fi));//Normalized field\n", +"disp('Different values of fi : ');\n", +"disp(string(fi));\n", +"disp('Corresponding normalized field is : ');\n", +"disp(string(abs(En)));" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2_3: Field_patter.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.2.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"//E=cos(fi)+sin(fi)<si;\n", +"//En=cos(%pi/4+%pi*cosd(fi)) as 2*E0=1\n", +"fi=[0 30 60 90 120 150 180 210 240 270 300 330];//degree(Angle)\n", +"si=%pi/2*(cosd(fi)+1);//(Phase)\n", +"En=cos(%pi/4+%pi*cosd(fi));//Normalized field\n", +"disp('Different values of fi : ');\n", +"disp(string(fi));\n", +"disp('Corresponding normalized field is : ');\n", +"disp(string(abs(En)));\n", +"//Answer in the book is wrong." + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6_1: Location_of_first_null.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.6.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"n=80;//(no. of elements)\n", +"N=1;//for first null\n", +"//d=lambda/2;(spacing)\n", +"dBYlambda=1/2;//(spacing/wavelength)\n", +"fi01=acosd(N/n/dBYlambda);//degree(Angle)\n", +"Null_1st=(%pi/2*180/%pi)-fi01;//degree(First Null)\n", +"disp(Null_1st,'Location of 1st null from maxima in degree : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6_2: Various_parameters_of_isotropic_array.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6.6.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"n=4;//(No. of elements)\n", +"//d=lambda/2;(Spacing)\n", +"dBYlambda=1/2;//(Spacing/wavelength)\n", +"alfa=0;//degree(angle)\n", +"N=1;//(For first null)\n", +"disp('Part (i)');\n", +"theta01=[acosd(+N/2) acosd(-N/2)];//degree(Angle)\n", +"N=2;//(For second null)\n", +"theta02=[acosd(+N/2) acosd(-N/2)];//degree(angle)\n", +"//N=3;//not possible as N/2 is greater than 1\n", +"disp(theta01,'Null directions for N=1 : theta01(degree) ');\n", +"disp(theta02,'Null directions for N=2 : theta02(degree) ');\n", +"disp('Part (ii)');\n", +"m=0;//for maxima\n", +"theta_m=acosd(m/dBYlambda);//degree(angle)\n", +"disp(theta_m,'Direction of maxima : theta_m(degree) ');\n", +"disp('Part (iii)');\n", +"S=1;//for side lobe maxima\n", +"//S=2 & onwards not possible\n", +"theta_S=[acosd((2*S+1)/2/n/dBYlambda) acosd(-(2*S+1)/2/n/dBYlambda)];//degree(angle for side lobe)\n", +"disp(theta_S,'Side lobe maxima : theta_S(degree) ');\n", +"disp('Part (iv)');\n", +"HPBW=2*[90-acosd(1.391/%pi/n/dBYlambda)];//degree(HPBW)\n", +"disp(HPBW,'HPBW(degree) ');\n", +"disp('Part (v)');\n", +"FNBW=2*[90-acosd(1/n/dBYlambda)];//degree(FNBW)\n", +"disp(FNBW,'FNBW(degree) ');\n", +"disp('Part (vi)');\n", +"SLL=-13.46;//dB////for isotropic sources array(Side lobe level)\n", +"disp(SLL,'Side lobe level(dB) ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8_1: Ordinary_endfire_array.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.8.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',5);\n", +"n=4;//(No. of elements)\n", +"//d=lambda/2;(spacing)\n", +"dBYlambda=1/2;//(spacing/wavelength)\n", +"theta=0;//degree(angle)\n", +"//Beta=2*%pi/lambda\n", +"disp('Part (i)');\n", +"Beta_into_lambda=2*%pi;//(Coefficient)\n", +"//alfa=-Beta*d\n", +"alfa=-Beta_into_lambda*dBYlambda;//radian(Progressive phase shift)\n", +"alfa=alfa*180/%pi;//degree(Progressive phase shift)\n", +"disp(alfa,'Progressive phase shift(degree) ');\n", +"disp('Part (ii)');\n", +"N=1:3;//as N=4 is not allowed\n", +"theta01=acosd(1-N(1)/n/dBYlambda);//degree(angle)\n", +"theta02=acosd(1-N(2)/n/dBYlambda);//degree(angle)\n", +"theta03=acosd(1-N(3)/n/dBYlambda);//degree(angle)\n", +"disp(theta03,theta02,theta01,'Null directions, theta01, theta02 & theta03 in degree are : ');\n", +"disp('Part (iii)');\n", +"m=0:1;//as m=2 & onwards is not allowed\n", +"theta0=acosd(1-m(1)/dBYlambda);//degree(angle)\n", +"theta1=acosd(1-m(2)/dBYlambda);//degree(angle)\n", +"disp(theta1,theta0,'Maxima directions, theta0, theta1 in degree are : ');\n", +"disp('Part (iv)');\n", +"FNBW=2*acosd(1-1/n/dBYlambda);//degree(FNBW)\n", +"disp(FNBW,'FNBW in degree : ');\n", +"disp('Part (v)');\n", +"HPBW=2*acosd(1-1.391/n/%pi/dBYlambda);//degree(HPBW)\n", +"disp(HPBW,'HPBW in degree : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8_2: Half_Power_Beam_Width.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 6.8.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"n=16;//no. of point source\n", +"//d=lambda/4;(spacing)\n", +"dBYlambda=1/4;//(Spacing/wavelength)\n", +"HPBW=2*acosd(1-1.391/n/%pi/dBYlambda);//degree(HPBW)\n", +"disp(HPBW,'HPBW in degree : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/7-Loop_Antenna.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/7-Loop_Antenna.ipynb new file mode 100644 index 0000000..40847a2 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/7-Loop_Antenna.ipynb @@ -0,0 +1,234 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Loop Antenna" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10_1: Input_Voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 7.10.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"A=1;//m²(Area of loop)\n", +"N=400;//no. of turns\n", +"Q=100;//Quality factor\n", +"theta=60;//degree(angle)\n", +"Erms=10;//µV/m(field strength)\n", +"f=1;//MHz(tuned frequency)\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"Vr=Q*2*%pi*A*N*cosd(theta)*Erms*10^-6/lambda;//V(reciever input voltage)\n", +"disp(Vr*1000,'Input voltage to the receiver in mV : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10_2: Voltage_induced_in_lop.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 7.10.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"N=12;//no. of turns\n", +"A=1;//m²(Area of loop)\n", +"Erms=100;//µV/m(field strength)\n", +"f=10;//MHz(tuned frequency)\n", +"theta=0;//degree(angle)\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"Vr=2*%pi*A*N*cosd(theta)*Erms*10^-6/lambda;//V(reciever input voltage)\n", +"disp(Vr*10^6,'Voltage induced in loop in µV/m : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10_3: Find_the_field_strength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 7.10.3\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"N=25;//no. of turns\n", +"Vrms=150;//µV(emf induced)\n", +"f=500;//kHz(tuned frequency)\n", +"A=0.5^2;//m²(Area of loop)\n", +"theta=0;//degree(angle)\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^3);//m(Wavelength)\n", +"Erms=lambda/(2*%pi*A*N*cosd(theta))*Vrms*10^-6;//V/m(maximum emf induced)\n", +"disp(Erms*10^3,'Field strength in mV/m : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10_4: Radiation_Resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 7.10.4\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"N1=1;//no. of turns in primary\n", +"N2=8;//no. of turns in secondary\n", +"//a=lambda/25;\n", +"aBYlambda=1/25;//(temporary calculation)\n", +"//A=%pi*a^2\n", +"A_BY_lambda_sqr=%pi*aBYlambda^2;//(temporary calculation)\n", +"Rr1=31200*(N1*A_BY_lambda_sqr)^2;//Ω(Radiation resistance for single turn)\n", +"disp(Rr1,'Radiation resistance for single turn loop in Ω : ');\n", +"Rr2=31200*(N2*A_BY_lambda_sqr)^2;//Ω(Radiation resistance for 8 turn)\n", +"disp(Rr2,'Radiation resistance for 8 turn loop in Ω : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10_5: Radiation_Efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 7.10.5\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"f=100;//MHz(Operating frequency)\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^6);//m(Wavelength)\n", +"a=lambda/25;//m(radius)\n", +"C=2*%pi*a;//m(Circumference)\n", +"d=2*10^-4*lambda;//m(Spacing)\n", +"disp('For single turn : ');\n", +"N=1;//n. of turns\n", +"RL_BY_Rr=3430/(C^3*f^(3.5)*N*d);//(temporary calculation)\n", +"K=1/(1+RL_BY_Rr)*100;//%(Radiation efficiency)\n", +"disp(K,'Radiation efficiency of single turn in % : ');\n", +"disp('For Eight turn : ');\n", +"N=8;//no. of turns\n", +"RL_BY_Rr=3430/(C^3*f^(3.5)*N*d);//(temporary calculation)\n", +"K=1/(1+RL_BY_Rr)*100;//%(Radiation efficiency)\n", +"disp(K,'Radiation efficiency of eight turn in % : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10_6: Directivity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 7.10.6\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6);\n", +"a=0.5;//m(radius)\n", +"f=0.9;//MHz(OPerating frequency)\n", +"c=3*10^8;//m/s////Speed of light\n", +"lambda=c/(f*10^6);//m(wavelength)\n", +"C=2*%pi*a;//m(Circumference)\n", +"if C/lambda<1/3 then\n", +" D=3/2;//Directivity\n", +"elseif C/lambda>1/3 then\n", +" D=0.682*C/lambda;//Directivity\n", +"end\n", +"disp(D,'Directivity : ');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/8-Slot_Antenna.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/8-Slot_Antenna.ipynb new file mode 100644 index 0000000..f614a49 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/8-Slot_Antenna.ipynb @@ -0,0 +1,64 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Slot Antenna" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3_1: Input_Impedence.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 8.3.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"Zcs=73+%i*42.5;//Ω(Impedence of complementry structure)\n", +"Eta=120*%pi;//(Constant for free space)\n", +"ZS=Eta^2/4/Zcs;//Ω(Input Impedence)\n", +"disp(ZS,'Input impedence in Ω : ');\n", +"//At resonance\n", +"Zcs=73;//Ω(Impedence of complementry structure)\n", +"Eta=120*%pi;//(Constant for free space)\n", +"ZS=Eta^2/4/Zcs;//Ω(Input Impedence)\n", +"disp(ZS,'At resonance, Input impedence in Ω : ');\n", +"disp('ZS can be rounded to 500 Ω');" + ] + } +], +"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/Antenna_and_Wave_Propagation_by_S_Wali/9-Horn_Antenna.ipynb b/Antenna_and_Wave_Propagation_by_S_Wali/9-Horn_Antenna.ipynb new file mode 100644 index 0000000..dfb2767 --- /dev/null +++ b/Antenna_and_Wave_Propagation_by_S_Wali/9-Horn_Antenna.ipynb @@ -0,0 +1,105 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Horn Antenna" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6_1: Capture_Area.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 9.6.1\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"f=2;//GHz(Frequency)\n", +"G=12;//dBi(Gain)\n", +"D=12;//dBi(Gain)\n", +"D=10^(D/10);//unitless(Directivity)\n", +"c=3*10^8;//m/s(speed of light)\n", +"lambda=c/(f*10^9);//m(wavelength)\n", +"Ap=D*lambda^2/7.5;//m²(capture area)\n", +"disp(Ap,'Required capture area in m² : ');" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6_2: Various_parameters_of_hor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example No. 9.6.2\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',7);\n", +"aEBYlambda=10;//(Aperture/wavelength)\n", +"del_EBYlambda=0.2;//in E-plane\n", +"del_HBYlambda=0.375;//in H-plane\n", +"LBYlambda=aEBYlambda^2/8/del_EBYlambda;//(Length/wavelength)\n", +"disp('Length of the horn is '+string(LBYlambda)+'*lambda');\n", +"aHBYlambda=sqrt(LBYlambda*8*del_HBYlambda);//(Aperture/wavelength)\n", +"disp('H-plane aperture, aH is '+string(aHBYlambda)+'*lambda');\n", +"theta_E=2*atand(aEBYlambda/2/LBYlambda);//degree(Angle)\n", +"theta_H=2*atand(aHBYlambda/2/LBYlambda);//degree(Angle)\n", +"disp(theta_H,theta_E,'Flare angles theta_E & theta_H(in degree) are : ');\n", +"HPBW_E=56/aEBYlambda;//degree(HPBW for E-plane)\n", +"disp(HPBW_E,'HPBW(E-plane) in degree : ');\n", +"HPBW_H=67/aHBYlambda;//degree(HPBW for H-plane)\n", +"disp(HPBW_H,'HPBW(H-plane) in degree : ');\n", +"FNBW_E=102/aEBYlambda;//degree(FNBW for E-plane)\n", +"disp(FNBW_E,'FNBW(E-plane) in degree : ');\n", +"FNBW_H=172/aHBYlambda;//degree(FNBW for F-plane)\n", +"disp(FNBW_H,'FNBW(H-plane) in degree : ');\n", +"D=10*log10(7.5*aEBYlambda*aHBYlambda);//(Directivity)\n", +"disp(D,'Directivity in dB : ');" + ] + } +], +"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 +} |