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/6-Antenna_Arrays.ipynb | |
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/6-Antenna_Arrays.ipynb')
-rw-r--r-- | Antenna_and_Wave_Propagation_by_S_Wali/6-Antenna_Arrays.ipynb | 408 |
1 files changed, 408 insertions, 0 deletions
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 +} |