summaryrefslogtreecommitdiff
path: root/Microwave_Engineering_by_G_S_Raghuvanshi
diff options
context:
space:
mode:
Diffstat (limited to 'Microwave_Engineering_by_G_S_Raghuvanshi')
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/1-Microwaves.ipynb690
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/10-Striplines_and_Microstrip_Lines.ipynb603
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/11-Microwave_Integrated_Circuits.ipynb108
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/12-Microwave_Measurements.ipynb421
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/2-Waveguides.ipynb1124
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/3-Microwave_Network_Analysis.ipynb227
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/4-Microwave_Resonators_and_Waveguide_Components.ipynb917
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/5-Microwave_Tubes_Klystrons.ipynb893
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/6-Microwave_Travelling_Wave_Tubes_O_type.ipynb504
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/7-Cross_Field_Microwave_Tubes_M_Type.ipynb574
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/8-Microwave_Solid_State_Control_Devices.ipynb468
-rw-r--r--Microwave_Engineering_by_G_S_Raghuvanshi/9-Microwave_Solid_State_Generators_and_Amplifiers.ipynb893
12 files changed, 7422 insertions, 0 deletions
diff --git a/Microwave_Engineering_by_G_S_Raghuvanshi/1-Microwaves.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/1-Microwaves.ipynb
new file mode 100644
index 0000000..4b68043
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/1-Microwaves.ipynb
@@ -0,0 +1,690 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Microwaves"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.10: Transmission_Line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 23\n",
+"//Example 1.10\n",
+"clc;\n",
+"//Given\n",
+"ZL=15+(%i*20); //ohms\n",
+"Z0=50; //ohm\n",
+"\n",
+"//Normalized load impedance\n",
+"z=ZL/Z0;\n",
+"disp(z,'Normalized load impedance:');\n",
+"\n",
+"//From chart\n",
+"T=0.6;\n",
+"disp(T,'Reflection coefficient:');\n",
+"\n",
+"//VSWR\n",
+"p=4;\n",
+"disp(p,'VSWR:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.11: Microwave_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 25\n",
+"//Example 1.11\n",
+"clc;\n",
+"//Given\n",
+"Z0=50; //ohm\n",
+"p=2.4;\n",
+"\n",
+"//From chart\n",
+"zl=1.4+%i;\n",
+"L=Z0*zl;\n",
+"disp('ohm',L,'Load:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.12: Active_Device.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 26\n",
+"//Example 1.12\n",
+"clc;\n",
+"//Given\n",
+"Z0=50; //ohm\n",
+"T=2.23;\n",
+"\n",
+"//From chart\n",
+"zl=2+%i;\n",
+"ZLd=Z0*zl;\n",
+"disp('ohm',ZLd,'Normalized impedance:');\n",
+"\n",
+"//Impedance of device is by negating the real part\n",
+"imp=-real(ZLd)+(imag(ZLd)*%i);\n",
+"disp('ohm',imp,'Impedance of device:');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.13: Transmission_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 27\n",
+"//Example 1.13\n",
+"clc;\n",
+"//Given\n",
+"p=3;\n",
+"m1=54; //cm\n",
+"m2=204; //cm\n",
+"\n",
+"//Point A\n",
+"disp('Point A');\n",
+"lam=4*(m2-m1);\n",
+"dA=0.083*lam;\n",
+"L=m1-dA;\n",
+"disp('cm',L,'Location of stub:');\n",
+"IA=0.114*lam;\n",
+"disp('cm',IA,'Length:');\n",
+"\n",
+"//Point B\n",
+"disp('Point B');\n",
+"dB=0.083*lam;\n",
+"IB=0.386*lam;\n",
+"Lb=dB+m1;\n",
+"disp('cm',Lb,'Location of stub:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.15: Microwave_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 30\n",
+"//Example 1.15\n",
+"clc;\n",
+"//Given\n",
+"Z0=50; //ohm\n",
+"ZL=100; //ohms\n",
+"f=10D+9; //Hz\n",
+"c=0.159D-12; //F\n",
+"\n",
+"//Normalized load impedance\n",
+"z=ZL/Z0;\n",
+"disp(z,'Normalized load impedance:');\n",
+"\n",
+"//From chart\n",
+"zin=0.4+(%i*0.55);\n",
+"ZINN=Z0*zin;\n",
+"disp('ohm',ZINN,'Normalized impedance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.16: EM_Plane.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 42\n",
+"//Example 1.16\n",
+"clc;\n",
+"//From given wave equation we can see\n",
+"w=1D+9;//rad/sec\n",
+"bet=30;//rad/m\n",
+"c=3D+8; //m/s\n",
+"u0=1; //let\n",
+"e0=1/(9D+16);\n",
+"\n",
+"vp=w/bet;//m/sec\n",
+"disp('m/s',vp,'Phase velocity:');\n",
+"\n",
+"e=1/(vp^2*u0);\n",
+"er=e/(e0*u0);\n",
+"disp(er,'Dielectric constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.17: Polyethylene.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 42\n",
+"//Example 1.17\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"f=10D+9;//hz\n",
+"er=6;\n",
+"tandel=2D-4;\n",
+"\n",
+"vp=c/er;//m/sec\n",
+"disp('m/sec',vp,'Phase velocity:');\n",
+"al=(%pi*f*tandel)/vp;//Np/m\n",
+"disp('Np/m',al,'Attenuation constant:');\n",
+"\n",
+"//Answer for velocity is calculated wrong in book, hence answers dont match for both"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.18: Electromagnetic_wave.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 43\n",
+"//Example 1.18\n",
+"clc;\n",
+"//Given\n",
+"er=2.2;\n",
+"n0=377;//ohm\n",
+"n2=n0/sqrt(er);//ohm\n",
+"n1=377;//ohm\n",
+"\n",
+"//Reflection coefficient\n",
+"t=(n2-n1)/(n2+n1);\n",
+"disp(t,'Reflection coefficient:');\n",
+"\n",
+"//Vswr\n",
+"//Taking mod of reflection coefficient\n",
+"t1=-t;\n",
+"p=(1+t1)/(1-t1);\n",
+"disp(p,'VSWR:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.19: Range_in_sea_water.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 43\n",
+"//Example 1.19\n",
+"clc;\n",
+"//Given\n",
+"sig=5;//mohm/m\n",
+"er=80*8.85D-12;\n",
+"eaz=0.1;\n",
+"u=1.26D-6;\n",
+"\n",
+"az=-log(0.1);\n",
+"//(i) Range at 25Khz\n",
+"f=25D+3;//Khz\n",
+"w=2*%pi*f;//rad/sec\n",
+"a=w*(sqrt((u*er/2)*(sqrt(sig^2/(w^2*er^2)+1)-1)));\n",
+"z=az/a;//m\n",
+"disp('m',z,'Range at 25khz:');\n",
+"\n",
+"//(ii) Range at 25Mhz\n",
+"f1=25D+6;//Mhz\n",
+"w1=2*%pi*f1;//rad/sec\n",
+"a1=w1*(sqrt((u*er/2)*(sqrt(sig^2/(w1^2*er^2)+1)-1)));\n",
+"z1=az/a1;//m\n",
+"disp('m',z1,'Range at 25Mhz:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: Lossless_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 12\n",
+"//Example 1.2\n",
+"clc;\n",
+"//Given\n",
+"z0=50;//ohm\n",
+"zg=50;//ohm\n",
+"l=0.25;//m\n",
+"f=4D+9;//hz\n",
+"zl=100;//ohm\n",
+"vg=10;//V\n",
+"w=2*%pi*f;//rad/sec\n",
+"c=3D+8; //m/s\n",
+"\n",
+"//(i) Voltage and current at any point\n",
+"tg=(zg-z0)/(zg+z0);\n",
+"tl=(zl-z0)/(zl+z0);\n",
+"vi=z0*vg/(z0+zg);//V\n",
+"disp('V',vi,'Voltage at any point:');\n",
+"ii=vg/(2*z0);//A\n",
+"disp('A',ii,'Current at any point:');\n",
+"\n",
+"//(ii) Voltage at generator end\n",
+"//Taking z=1\n",
+"z=1;\n",
+"bet=w/c;\n",
+"vz=(vg/2)*exp(-%i*bet*(z+l))*(1+(tl*exp(2*%i*bet*z)));//V\n",
+"disp('V',vz,'Voltage at generator end:');\n",
+"iz=ii*exp(-%i*bet*(z+l))*(1-(tl*exp(2*%i*bet*z)));//A\n",
+"vz1=(vg/2)*exp(-%i*bet*(z+l))*(1+(tl*exp(2*%i*bet*z)));//V\n",
+"\n",
+"//Voltage at load end, z=0\n",
+"z11=0;\n",
+"vl=(vg/2)*exp(-%i*bet*l)*(1+(tl*exp(2*%i*bet*z11)));//V\n",
+"disp('V',vl,'Voltage at load end:');\n",
+"\n",
+"//(iii) Reflection coefficient\n",
+"zx=0.25;\n",
+"tz=tl*exp(%i*2*bet*zx);\n",
+"disp(tz,'Reflection coefficient:');\n",
+"\n",
+"//(iv) VSWR\n",
+"p=(1+tl)/(1-tl);\n",
+"disp(p,'VSWR:');\n",
+"\n",
+"//(v) Average power delivered to the load\n",
+"vl=20/3;\n",
+"pl0=vl^2/(2*zl);//W\n",
+"disp('W',pl0,'Average power delivered to the load:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: Microwave_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 14\n",
+"//Example 1.3\n",
+"clc;\n",
+"//Given\n",
+"pm=3;\n",
+"pl=4;\n",
+"l=24;//cm\n",
+"l1=l/100;//m\n",
+"\n",
+"//Attenuation\n",
+"tin=(pm-1)/(pm+1);\n",
+"tl=(pl-1)/(pl+1);\n",
+"alp=(1/(2*l1))*log(tl/tin);//Np/m\n",
+"disp('Np/m',alp,'Attenuation in the line');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4: Quater_wave_transformer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 14\n",
+"//Example 1.4\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"z0=200;//ohm\n",
+"zl=800;//ohm\n",
+"f=30D+6;//hz\n",
+"\n",
+"//Characterstic impedance\n",
+"z00=sqrt(z0*zl);//ohm\n",
+"disp('ohm',z00,'Characterstic impedance:');\n",
+"\n",
+"//Length of line\n",
+"lam=c/f;//m\n",
+"l=lam/4;//m\n",
+"disp('m',l,'Length of line:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5: Parallel_resonant_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 15\n",
+"//Example 1.5\n",
+"clc;\n",
+"//Given\n",
+"l=1.2;//mH\n",
+"r=8;//ohm\n",
+"c=200D-12;//F\n",
+"\n",
+"//(i) Resonant frequency\n",
+"f0=(1/(2*%pi))*sqrt(1/(l*c));//hz\n",
+"disp('hz',f0,'Resonant frequency:');\n",
+"\n",
+"//(ii) Impedance of circuit\n",
+"disp('ohm',r,'Impedance of circuit:');\n",
+"\n",
+"//(iii)Q factor of the circuit\n",
+"q=1/(2*%pi*f0*c*r);\n",
+"disp(q,'Q factor of the circuit:');\n",
+"\n",
+"//(iv) Bandwidth\n",
+"df=f0/q;//hz\n",
+"disp('hz',df,'Bandwidth:');\n",
+"\n",
+"//The value of resonant frequency is calculated wrong in book\n",
+"//Hence Q factor and bandwidth, all these answers dont match"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.6: Lossless_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number:\n",
+"//Example 1.6\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"le=25;//m\n",
+"zl=40+(%i*30);//ohm\n",
+"f=10D+6;//hz\n",
+"cap=40D-12;//F\n",
+"l=300D-9;//H/m\n",
+"\n",
+"//Input impedance\n",
+"z0=sqrt(l/cap);//ohm\n",
+"zl1=zl/z0;\n",
+"lam=c/f;//m\n",
+"bet=(2*%pi*le)/lam;//rad\n",
+"zin=((zl1*cos(bet))+(%i*sin(bet)))/(cos(bet)+(%i*zl1*sin(bet)));//ohm\n",
+"disp('ohm',zin,'Input impedance:');\n",
+"\n",
+"//Reflection coefficient\n",
+"t=(zl1-1)/(zl1+1);\n",
+"disp(t,'Reflection coefficient:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.7: Lossy_cable.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 16\n",
+"//Example 1.7\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"R=2.25;//ohm\n",
+"L=1D-9;//H/m\n",
+"C=1D-12;//F/m\n",
+"f=0.5D+9;//hz\n",
+"G=0;\n",
+"w=2*%pi*f;//rad/sec\n",
+"\n",
+"//Characterstic impedance\n",
+"z0=sqrt((R+(%i*w*L))/(G+(%i*w*C))); //ohm\n",
+"disp('ohm',z0,'Characterstic impedance:');\n",
+"\n",
+"//Propagation constant\n",
+"gam=sqrt((R+(%i*w*L))*(G+(%i*w*C)));\n",
+"disp(gam,'Propagation constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.8: Transmission_Line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 20\n",
+"//Example 1.8\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"f=3D+9; //Hz\n",
+"ZL=50-(%i*100); //ohms\n",
+"Z0=50; //ohm\n",
+"//Wavelength\n",
+"lam=c/f;\n",
+"disp('cm',lam*100,'Wavelength:');\n",
+"\n",
+"//Normalized load impedance\n",
+"z=ZL/Z0;\n",
+"disp(z,'Normalized load impedance:');\n",
+"\n",
+"//From chart\n",
+"zin=0.45+(%i*1.2);\n",
+"yin=0.27-(%i*0.73);\n",
+"ZINN=Z0*zin;\n",
+"disp('ohm',ZINN,'Line impedance:');\n",
+"YINN=yin/Z0;\n",
+"disp('mho',YINN,'Line admittance:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.9: Transmission_Line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 22\n",
+"//Example 1.9\n",
+"clc;\n",
+"//Given\n",
+"ZL=75+(%i*100); //ohms\n",
+"Z0=50; //ohm\n",
+"\n",
+"//Normalized load impedance\n",
+"z=ZL/Z0;\n",
+"disp(z,'Normalized load impedance:');\n",
+"\n",
+"//(i) 0.051*lam\n",
+"//From chart\n",
+"r=4.6;\n",
+"Zi1=r*Z0;\n",
+"disp('ohm',Zi1,'Input impedance at 0.051 lam:');\n",
+"\n",
+"//(ii) 0.102*lam\n",
+"r1=1.5-(%i*2);\n",
+"Zi2=r1*Z0;\n",
+"disp('ohm',Zi2,'Input impedance at 0.102 lam:');\n",
+" \n",
+"//(iii) 0.301*lam\n",
+"r2=0.22;\n",
+"Zi3=r2*Z0;\n",
+"disp('ohm',Zi3,'Input impedance at 0.301 lam:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/10-Striplines_and_Microstrip_Lines.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/10-Striplines_and_Microstrip_Lines.ipynb
new file mode 100644
index 0000000..f70e588
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/10-Striplines_and_Microstrip_Lines.ipynb
@@ -0,0 +1,603 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Striplines and Microstrip Lines"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.10: Broadside_stripline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 560\n",
+"//Example 10.10\n",
+"clc;\n",
+"//Given\n",
+"W=6; //m\n",
+"s=2.2; //m\n",
+"b=4.8; //m\n",
+"Er=2.2;\n",
+"\n",
+"//Even and odd mode impedance\n",
+"Z0e=((120*%pi)*(b-s))/(2*sqrt(Er)*W);\n",
+"disp('ohm',Z0e,'Even mode impedance:');\n",
+"\n",
+"\n",
+"Z0o=(Z0e*s)/b;\n",
+"disp('ohm',Z0o,'Odd mode impedance:');\n",
+"\n",
+"//Mid band coupling\n",
+"x=(Z0e-Z0o)/(Z0e+Z0o);\n",
+"C=-20*log10(x);\n",
+"disp('db',C,'Mid band coupling:');\n",
+"\n",
+"//Answer in book for C is given as 54.2 but it should be 8.60"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.11: Paralle_stripline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 562\n",
+"//Example 10.11\n",
+"clc;\n",
+"//Given\n",
+"Er=6;\n",
+"d=3D-3; //m\n",
+"Z0=50; //ohm\n",
+"E0=8.854D-12; //F/m\n",
+"Mu0=4*%pi*10D-7; //H/m\n",
+"\n",
+"//(i) W \n",
+"W=(377*d)/(sqrt(Er)*Z0);\n",
+"disp('mm',W*1000,'Required Width:');\n",
+"\n",
+"//(ii)Stripline capacitance\n",
+"C=(E0*Er*W)/d;\n",
+"disp('pF/m',C*10^12,'Stripline capacitance:');\n",
+"\n",
+"//(iii)Stripline inductance\n",
+"L=(Mu0*d)/W;\n",
+"disp('muH/m',L*10^6,'Stripline inductance:');\n",
+"\n",
+"//(iv)Phase velocity\n",
+"c=3D+8;\n",
+"vp=c/sqrt(Er);\n",
+"disp('m/s',vp,'Phase velocity');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.12: Shielded_stripline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 562\n",
+"//Example 10.12\n",
+"clc;\n",
+"//Given\n",
+"Er=2.56;\n",
+"w=25; //mils\n",
+"t=14; //mils\n",
+"d=70; //mils\n",
+"E0=8.854D-12; //F/m\n",
+"\n",
+"//(i) K factor\n",
+"K=1/(1-(t/d));\n",
+"disp(K,'K factor:');\n",
+"\n",
+"//(ii) Fringe capacitance\n",
+"C=[(E0*Er)*[2*K*log(K+1)-(K-1)*log(K^2-1)]]/%pi;\n",
+"disp('pF/m',C*10^12,'Fringe capacitance:');\n",
+"\n",
+"//(iii) Charecteristic Impedance\n",
+"X=1/[((w*K)/d)+(C/(E0*Er))];\n",
+"Z0=(94.15*X)/sqrt(Er);\n",
+"disp('ohm',Z0,'Charecteristic Impedance:');\n",
+"\n",
+"\n",
+"//Answer in book for Z0 is given as 50.29 but it should be 51.7\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.13: Lossless_stripline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 563\n",
+"//Example 10.13\n",
+"clc;\n",
+"//Given\n",
+"Z0=50; //ohm\n",
+"//Sincr ratio of power is 2:3\n",
+"x1=5/2;\n",
+"y1=5/3;\n",
+"//Output Impedance\n",
+"Z1=x1*Z0;\n",
+"Z2=y1*Z0;\n",
+"disp('ohm',Z1,'Output Impedance 1:')\n",
+"disp('ohm',Z2,'Output Impedance 2:')\n",
+"\n",
+"//Input Impedance\n",
+"Zin=[((Z2*2*Z2)/3)/((Z2+(2*Z2)/3))];\n",
+"\n",
+"//Looking into Z1, Z2 is || to Z0\n",
+"A1=(Z2*Z0)/(Z2+Z0);\n",
+"\n",
+"//Looking into Z, Z2 is || to Z0\n",
+"A2=(Z1*Z0)/(Z1+Z0);\n",
+"\n",
+"//Reflection Coeffcients\n",
+"R1=(A1-Z1)/(A1+Z1);\n",
+"R2=(A2-Z2)/(A2+Z2);\n",
+"\n",
+"disp(R2,R1,'Reflection Coeffcients:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: Copper_stripline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 554\n",
+"//Example 10.1\n",
+"clc;\n",
+"//Given,\n",
+"\n",
+"z0=50; //ohm\n",
+"t=0.001; //mm\n",
+"b=0.32; //cm\n",
+"er=2.20; \n",
+"tandel= 0.0005;\n",
+"rs=0.026; //ohm\n",
+"f=10D+9; //Hz\n",
+"c=3D+8;//m/sec\n",
+"\n",
+"p=sqrt(er)*z0;\n",
+"//As p<120\n",
+"w=b*[((30*%pi)/p)-0.441];\n",
+"disp('cm',w,'Width');\n",
+"\n",
+"//Attenuation\n",
+"k={(2*%pi*f*sqrt(er))/c};\n",
+"ad=(k*tandel)/2;\n",
+"\n",
+"//and\n",
+"A=1+{(2*w)/(b-t)}+[{(b+t)/((b-t)*%pi)}*log(((2*b)-t)/t)];\n",
+"//Hence \n",
+"ac=(2.7D-3*rs*er*z0*A)/{30*%pi*(b-t)*1D-2};\n",
+"//Total attenution\n",
+"a=ad+ac;\n",
+"\n",
+"//Total attenution in db\n",
+"x=exp(a);\n",
+"alp=20*log10(x); //db/m\n",
+"\n",
+"//Total attenution in db/lambda:\n",
+"lam=c/(sqrt(er)*f);\n",
+"lamm=lam*1D+2;\n",
+"alph=alp/lamm;\n",
+"disp('db/lambda',alph,'Total attenution in db/lambda:');\n",
+"\n",
+"\n",
+"//Answer in book for alph is given as 0.856 but it should be 0.0856 as value of f is taken as 10D+10 but it should be 10D+9\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: Microstrip_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 555\n",
+"//Example 10.2\n",
+"clc;\n",
+"//Given,\n",
+"er=9.7;\n",
+"h=0.25; //mm\n",
+"w=0.25; //mm\n",
+"f=5D+9; //Hz\n",
+"c=3D+8; //m/s\n",
+"\n",
+"//(i) Dielectric constant\n",
+"dc=((er+1)/2)+(((er-1)/2)*(1/sqrt(1+12*h/w)));\n",
+"disp(dc,'Dielectric constant:');\n",
+"\n",
+"//(ii) Phase constant\n",
+"lam0=c/f;\n",
+"pc=sqrt(dc)*(2*%pi/lam0);\n",
+"disp('rad/m',pc/100,'Phase constant:');\n",
+"\n",
+"//(iii) Microstrip wavelength\n",
+"lams=lam0/sqrt(dc);\n",
+"disp('cm',lams*100,'Microstrip wavelength:');\n",
+"\n",
+"//(iv) Capacitance per unit length\n",
+"e0=8.854D-12;\n",
+"cap=(2*%pi*e0)/log((8*h/w)-(w/(4*h)));\n",
+"disp('F/cm',cap,'Capacitance per unit length:');\n",
+"\n",
+"//(v) Characterstic Impedance\n",
+"ci=(60/sqrt(dc))*log((8*h/w)+(w/(4*h)));\n",
+"disp('ohm',ci,'Characterstic impedance:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: Microstrip.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 556\n",
+"//Example 10.3\n",
+"clc;\n",
+"//Given,\n",
+"er=5.23;\n",
+"w=10; //mils\n",
+"t=2.8; //mils\n",
+"h=7; //mils\n",
+"\n",
+"dc=((er+1)/2)+(((er-1)/2)*(1/sqrt(1+12*h/w)));\n",
+"disp(dc,'Dielectric constant:');\n",
+"\n",
+"//As w/h>1\n",
+"ci=(120*%pi)/(sqrt(dc)*((w/h)+1.393+0.667*log((w/h)+1.444)));\n",
+"disp('ohm',ci,'Characterstic impedance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: Stripline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 556\n",
+"//Example 10.4\n",
+"clc;\n",
+"//Given,\n",
+"\n",
+"q=2.5;\n",
+"dh=1.58;\n",
+"er=9;\n",
+"f=10;\n",
+"c=3D+8;\n",
+"\n",
+"erff=((er+1)/2)+(((er-1)/2)*((1+(12/q))^(-1/2)));\n",
+"vp=(c/sqrt(erff))*erff;\n",
+"fe1=c/(sqrt(vp)*2*dh*q);\n",
+"if f<fe1 then\n",
+" disp('Strip supports TEM mode only');\n",
+"else\n",
+" disp('Strip does not support TEM mode only');\n",
+"end\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5: Microstrip_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 557\n",
+"//Example 10.5\n",
+"clc;\n",
+"//Given,\n",
+"\n",
+"er=9.7;\n",
+"h=0.5; //mm\n",
+"w=0.5; //mm\n",
+"lt=2D-4; \n",
+"t=0.02; //mm\n",
+"f=5D+9; //Hz\n",
+"fg=5; //HZ\n",
+"c=3D+8;\n",
+"rs=8.22D-3*sqrt(fg);\n",
+"\n",
+"//(i) Dielectric constant\n",
+"dc=((er+1)/2)+(((er-1)/2)*(1/sqrt(1+12*h/w)));\n",
+"disp(dc,'Dielectric constant:');\n",
+"\n",
+"//(ii) Characterstic Impedance\n",
+"ci=(60/sqrt(dc))*log((8*h/w)+(w/(4*h)));\n",
+"disp('ohm',ci,'Characterstic impedance:');\n",
+"\n",
+"//(iii) Dielectric attenuation\n",
+"lam0=c/f;\n",
+"alphd=(%pi/lam0)*(er/sqrt(dc))*((dc-1)/(er-1))*lt;\n",
+"disp('Np/m',alphd,'Dielectric attenuation:');\n",
+"\n",
+"//Conductor attenuation\n",
+"r1=[0.94+(0.132*(w/h))-(0.0062*((w/h)^2))]*[(1/%pi)+(1/(%pi^2))*log((4*%pi*w)/t)]*(rs/(w*1D-3));\n",
+"r1m=r1*1D-2;\n",
+"r2=(w/h)/[((w/h)+5.8+(0.03*(h/w)))]*(rs/(w*1D-3));\n",
+"r2m=r2*1D-2;\n",
+"alphc=(r1+r2)/(2*ci);\n",
+"disp('Np/m',alphc,'Conductor attenuation:');\n",
+"\n",
+"//(iv) Total attenuation\n",
+"A=alphc+alphd;\n",
+"Adb=A*8.686*1D-2;\n",
+"disp('db/cm',Adb,'Total attenuation:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6: Microstrip_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 558\n",
+"//Example 10.6\n",
+"clc;\n",
+"//Given\n",
+"\n",
+"sig=5.8D+7;\n",
+"f=10; //GHz\n",
+"h=0.12D-2; //m\n",
+"\n",
+"q=62.8*h*sqrt(f*sig);\n",
+"disp(round(q),'conductor Q of the stripline:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7: Parallel_stripline.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 558\n",
+"//Example 10.7\n",
+"clc;\n",
+"//Given\n",
+"Er=6;\n",
+"h=4D-3; //m\n",
+"\n",
+"//(i) W for Z0=50W\n",
+"Z0=50; //W\n",
+"W=(120*%pi*h)/(sqrt(Er)*Z0);\n",
+"disp('mm',W*1000,'Required Width:');\n",
+"\n",
+"//(ii)Stripline capacitance\n",
+"E0=8.854D-12;\n",
+"C=(E0*Er*W)/h;\n",
+"disp('pF/m',C*10^12,'Stripline capacitance:');\n",
+"\n",
+"//(iii)Stripline inductance\n",
+"Mu0=4*%pi*10D-7;\n",
+"L=(Mu0*h)/W;\n",
+"disp('muH/m',L*10^5,'Stripline inductance:');\n",
+"\n",
+"//(iv)Phase velocity\n",
+"c=3D+8;\n",
+"vp=c/sqrt(Er);\n",
+"disp('m/s',vp,'Phase velocity');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.8: Stripline_coupler.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 559\n",
+"//Example 10.8\n",
+"clc;\n",
+"//Given\n",
+"cl=3D+8; //m/s\n",
+"f=5D+9; //Hz\n",
+"Er=9;\n",
+"C=-10; //db\n",
+"Z0=50; //ohm\n",
+"//Length\n",
+"L=(cl/f)/(4*sqrt(Er));\n",
+"disp('cm',L*100,'Length:');\n",
+"\n",
+"//Coupling coefficient\n",
+"C0=10^(C/20);\n",
+"disp(C0,'Coupling coefficient:');\n",
+"\n",
+"//Even and odd mode impedance\n",
+"Z0e=(Z0*sqrt(1+C0))/sqrt(1-C0);\n",
+"disp('ohm',Z0e,'Even mode impedance:');\n",
+"\n",
+"\n",
+"Z0o=(Z0*sqrt(1-C0))/sqrt(1+C0);\n",
+"disp('ohm',Z0o,'Odd mode impedance:');\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.9: Branch_coupler.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 560\n",
+"//Example 10.9\n",
+"clc;\n",
+"//Given\n",
+"Z0=50; //ohm\n",
+"C=3; //db\n",
+"\n",
+"//Line impedance\n",
+"Z01sqr=(1-(10^(C/-10)));\n",
+"Z01=sqrt(Z0*Z0*Z01sqr);\n",
+"disp('ohm',Z01,'Z01:');\n",
+"\n",
+"Z02=Z01/(sqrt(1-(1/sqrt(2))^2));\n",
+"disp('ohm',round(Z02),'Z02:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/11-Microwave_Integrated_Circuits.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/11-Microwave_Integrated_Circuits.ipynb
new file mode 100644
index 0000000..e5e301e
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/11-Microwave_Integrated_Circuits.ipynb
@@ -0,0 +1,108 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Microwave Integrated Circuits"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: Costs.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 595\n",
+"//Example 11.1\n",
+"clc;\n",
+"//Given\n",
+"fabc=10000; //Rs/waffer\n",
+"c=100;\n",
+"y=40/100; \n",
+"coc=fabc/(y*c);\n",
+"//Cost of one chip\n",
+"disp('Rs',coc,'Cost of one chip:');\n",
+"\n",
+"//Market Cost\n",
+"mc=2*coc;\n",
+"disp('Rs',mc,'Market costof one chip:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2: Yield.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 595\n",
+"//Example 11.2\n",
+"clc;\n",
+"//Given\n",
+"c=5000; //Rs\n",
+"S=0.6; //cm\n",
+"//Sides\n",
+"x=3; //cm\n",
+"y=2.54; //cm \n",
+"//break even cost\n",
+"bec=250;\n",
+"//hence, chips/waffers needed\n",
+"cpw=c/bec;\n",
+"D=x*y;\n",
+"//For given Area, atleast 40 chips are required\n",
+"n=2*cpw;\n",
+"\n",
+"//Diameter\n",
+"N=D/(sqrt(2)*S);\n",
+"//Lower round off\n",
+"NN=floor(N);\n",
+"//Chips possible\n",
+"cp=NN^2;\n",
+"\n",
+"//Yield\n",
+"Y=(n/cp)*100; //Percent\n",
+"disp('%',Y,'Yield:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/12-Microwave_Measurements.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/12-Microwave_Measurements.ipynb
new file mode 100644
index 0000000..a88588e
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/12-Microwave_Measurements.ipynb
@@ -0,0 +1,421 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Microwave Measurements"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.10: Air_filled_cavity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 654\n",
+"//Example 12.10\n",
+"clc;\n",
+"//Given\n",
+"R1=10.6; //GHz\n",
+"R2=8.30; //GHz\n",
+"Q0=8200;\n",
+"Q0d=890;\n",
+"\n",
+"Er=(R1/R2)^2;\n",
+"disp(Er,'Dielectric constant');\n",
+"\n",
+"Qd=(Q0-Q0d)/(Q0*Q0d);\n",
+"disp(Qd,'Loss tangent of dielectric');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.11: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 654\n",
+"//Example 12.11\n",
+"clc;\n",
+"//Given\n",
+"l0=0.15; //cm\n",
+"lmbg=2*2.24; //cm\n",
+"le=1.14; //cm\n",
+"a=2.286; //cm\n",
+"d=2;\n",
+"\n",
+"B0=(2*%pi)/lmbg;\n",
+"x=tan(B0*l0)/(B0*l0);\n",
+"//Also\n",
+"x1=(l0*x)/le;\n",
+"//Correct value seems to be\n",
+"Bele=2.786;\n",
+"e1=((((a/%pi)^2)*(Bele/le)^2)+1);\n",
+"e2=(((2*a)/lmbg)^2)+1;\n",
+"Er=e1/e2;\n",
+"disp(Er,'Er:');\n",
+"\n",
+"\n",
+"//Answer in book for Er is given as 2.062 but it should be 2.038"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1: Microwave_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 649\n",
+"//Example 12.1\n",
+"clc;\n",
+"//Given\n",
+"Is=0.1*(10^-6); //A\n",
+"Pi=0; //dBm\n",
+"Cs=0.1*(10^-12); //F\n",
+"Ls=2*(10^-9);\n",
+"Cj=0.15*(10^-12); //F\n",
+"Rs=10; //ohm\n",
+"T=293; //K\n",
+"nktbye=25*(10^-3); //V\n",
+"\n",
+"//Rj\n",
+"Rj=(nktbye/Is);\n",
+"disp('Kohm',Rj/1000,'Rj:');\n",
+"\n",
+"//Bi\n",
+"Bi=nktbye/2;\n",
+"Bii=Bi*1000;\n",
+"disp('A/W',Bii,'Bi:');\n",
+"\n",
+"//Bv\n",
+"Bv=Rj*Bii;\n",
+"disp('V/W',Bv,'Bv:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2: Detector_mismatch.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 650\n",
+"//Example 12.2\n",
+"clc;\n",
+"//Given\n",
+"vswr=4;\n",
+"\n",
+"modT=(vswr-1)/(vswr+1);\n",
+"Lm=-10*log10(1-(modT*modT)); //dB\n",
+"disp('dB',Lm,'Mismatch Loss:');\n",
+"\n",
+"//Sensitivity reduces by a factor\n",
+"Bvd=(1-(modT*modT));\n",
+"Bvdp=Bvd*100;\n",
+"disp('%',Bvdp,'Voltge sensitivity reduces by:');\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3: Transmission_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 650\n",
+"//Example 12.3\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9; //Hz\n",
+"c=3D+10; //cm/s\n",
+"a=4; //cm\n",
+"s=0.1; //cm\n",
+"lmb=c/f; //cm\n",
+"lmbg=lmb/(sqrt(1-((lmb/(2*a))^2)));\n",
+"vswr=lmbg/(%pi*s);\n",
+"disp(vswr,'VSWR:');\n",
+"\n",
+"//Answer in book for lmbg is given as 3.49 but it should be 3.23 and hence the answer will be 10.3"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4: VSWR_of_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 651\n",
+"//Example 12.4\n",
+"clc;\n",
+"//Given\n",
+"delx=3.5; //cm\n",
+"s=0.25; //cm\n",
+"\n",
+"lmbg=2*delx;\n",
+"vswr=lmbg/(%pi*s);\n",
+"disp(vswr,'VSWR:');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5: Directional_couplers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 651\n",
+"//Example 12.5\n",
+"clc;\n",
+"//Given\n",
+"vswr=2;\n",
+"Pin=4.5D-3; //W\n",
+"\n",
+"modT=(vswr-1)/(vswr+1);\n",
+"//Power reflected,\n",
+"Pr=(modT^2)*Pin;\n",
+"//As coupler samples only 1/1000th power\n",
+"Prr=Pr*1000;\n",
+"disp('W',Prr,'Reflected Power:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6: Microwave_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 652\n",
+"//Example 12.6\n",
+"clc;\n",
+"//Given\n",
+"Z0=50; //ohm\n",
+"p=2.4;\n",
+"L=0.313;\n",
+"x=2*%pi*L;\n",
+"y=tan(x);\n",
+"\n",
+"Zl=(Z0*(1+(p*p*%i)))/(p+(p*%i));\n",
+"T=(Zl-Z0)/(Zl+Z0);\n",
+"p=sqrt((real(T))^2+(imag(T))^2);\n",
+"disp(p,'Reflection coefficient:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.7: Microwave_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 652\n",
+"//Example 12.7\n",
+"clc;\n",
+"//Given\n",
+"Zl=25+25*%i; //ohm\n",
+"Z0=50; //ohm\n",
+"\n",
+"T=(Zl-Z0)/(Zl+Z0);\n",
+"p=sqrt((real(T))^2+(imag(T))^2);\n",
+"disp(p,'Reflection coefficient:');\n",
+"\n",
+"vswrr=(1+p)/(1-p);\n",
+"disp(vswrr,'VSWR:');\n",
+"\n",
+"//Fraction of power delivered\n",
+"Pd=1-(p^2);\n",
+"Pdp=Pd*100;\n",
+"disp('%',Pdp,'Fraction of power delivered:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.8: Rectangular_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 653\n",
+"//Example 12.8\n",
+"clc;\n",
+"//Given\n",
+"d=2.4;//cm\n",
+"lmbc=1.8;\n",
+"c=3*10^10; //cm/s\n",
+"\n",
+"lmbg=2*d;\n",
+"lmb=(lmbg*lmbc)/(sqrt(lmbg^2+lmbc^2));\n",
+"//Operating frequency\n",
+"f=c/lmb;\n",
+"disp('GHz',f/10^9,'Operating frequency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.9: Three_port_circulator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 653\n",
+"//Example 12.9\n",
+"clc;\n",
+"//Given\n",
+"p=1.5;\n",
+"IsL=1; //dB\n",
+"InL=30; //dB\n",
+"\n",
+"S21=10^(-IsL/20);\n",
+"\n",
+"//Assuming tgree ports to be identical\n",
+"S32=S21;\n",
+"S13=S21;\n",
+"\n",
+"//Isolations are also the same\n",
+"S31=10^(-InL/20);\n",
+"S23=S31;\n",
+"S12=S31;\n",
+"\n",
+"//Refelction coefficients are also the same\n",
+"T=(p-1)/(p+1);\n",
+"S11=T;\n",
+"S22=T;\n",
+"S33=T;\n",
+"\n",
+"S=[S11 S12 S13;S21 S22 S23;S31 S32 S33];\n",
+"disp(S,'Matrix is:');\n",
+""
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Microwave_Engineering_by_G_S_Raghuvanshi/2-Waveguides.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/2-Waveguides.ipynb
new file mode 100644
index 0000000..875ac31
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/2-Waveguides.ipynb
@@ -0,0 +1,1124 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Waveguides"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: \n",
+"//Example 2.10\n",
+"clc;\n",
+"//Given,\n",
+"\n",
+"c=3D+8; //m/s\n",
+"a=3; //cm\n",
+"a1=a/100; //m\n",
+"b=2; //cm\n",
+"b1=b/100; //m\n",
+"f=7.5D+9; //HZ\n",
+"p=5D+3; //W\n",
+"\n",
+"mu=%pi*4D-7;\n",
+"w=2*%pi*f;\n",
+"bet=sqrt(((w/c)^2)-((%pi/a1)^2));\n",
+"//Charecteristic impedance\n",
+"z0=w*mu*2*b/(bet*a);\n",
+"disp('ohm',z0,'Charecteristic impedance:');\n",
+"\n",
+"//Peak electric field\n",
+"e0=4*w*mu*p/(bet*a*b);\n",
+"disp('V/m',e0,'Peak electric field:');\n",
+"\n",
+"//Maximum voltage\n",
+"v0=e0*b1;\n",
+"disp('kV',v0/1000,'Maximum voltage:');\n",
+"\n",
+"//Answer for v0 is given as 3.172 kV it should be 33.71 kV"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.14: Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 99\n",
+"//Example 2.14\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"a=1.5;//cm\n",
+"a1=a/100;//m\n",
+"b=0.8;//cm\n",
+"b1=b/100;//m\n",
+"mu=1/c*c;\n",
+"e=4;\n",
+"w=%pi*1D+11;\n",
+"n=377;\n",
+"\n",
+"//(i) Frequency of operation\n",
+"f=w/(2*%pi);\n",
+"f1=f/1D+9;//ghz\n",
+"disp('Ghz',f1,'Frequency of operation:');\n",
+"\n",
+"//(ii) Cutt off frequency\n",
+"fc=(c*sqrt((1/a1)^2+(3/b1)^2))/(2*sqrt(e));\n",
+"fc1=fc/1D+9;//ghz\n",
+"disp('Ghz',fc1,'Cut off frequency:');\n",
+"\n",
+"//(iii) Phase constant\n",
+"bet=(w*sqrt(e)*sqrt(1-(fc/f)^2))/(c);\n",
+"disp('rad/m',bet,'Phase constant:');\n",
+"\n",
+"//(iv) Propogation constant\n",
+"gam=%i*bet;\n",
+"disp('rad/s',gam,'Propogation constant:');\n",
+"\n",
+"//(v) Intrensic wave impedance\n",
+"zte=(n/sqrt(e))/sqrt(1-(fc/f)^2);\n",
+"ztm=(n/sqrt(e))*sqrt(1-(fc/f)^2);\n",
+"disp('Ohm',ztm,'ZTM13','Ohm',zte,'ZTE13','Intrinsic wave impedance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.17: Air_filled_Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 103\n",
+"//Example 2.17\n",
+"clc;\n",
+"//Given\n",
+"a=2; //cm\n",
+"a1=1/100; //m\n",
+"b=1; //cm\n",
+"b1=b/100; //m\n",
+"p=10D-3; //W\n",
+"c=3D+8; //m/s\n",
+"f0=10D+9; //Hz\n",
+"\n",
+"//Peak value of electric field\n",
+"fc=c/(2*a);\n",
+"E02=(4*p*377)/(a1*b1*sqrt(1-(fc/f0)^2));\n",
+"E0=sqrt(E02);\n",
+"disp('V/m',E0,'Peak value of electric field:');\n",
+"\n",
+"//Maximum power transmitted\n",
+"Ed=3D+6; //V/m\n",
+"Pt=2.6D+13*(Ed/f0)^2;\n",
+"disp('kW',Pt/1000,'Maximum power transmitted:');\n",
+"\n",
+"//Answer is given as 2300kW but it is 2340kW"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.18: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 104\n",
+"//Example 2.18\n",
+"clc;\n",
+"//Given\n",
+"f=5D+9; //Hz\n",
+"c=3D+8; //m/s\n",
+"a=7.5; //cm\n",
+"a1=a/100; //m\n",
+"b=3.5; //cm\n",
+"b1=b/100; //m\n",
+"lam=c/f;\n",
+"lamm=lam*100; //m\n",
+"\n",
+"disp('TE10 mode');\n",
+"lamc10=2*a;\n",
+"bet10=(2*%pi*sqrt(((lamc10/lamm)^2)-1))/lamc10;\n",
+"disp('rad/cm',bet10,'Propogation constant:');\n",
+"vp10=(2*%pi*f)/bet10;\n",
+"disp('m/s',vp10/100,'Phase velocity:');\n",
+"\n",
+"disp('TE01 mode');\n",
+"lamc01=2*b;\n",
+"bet01=(2*%pi*sqrt(((lamc01/lamm)^2)-1))/lamc01;\n",
+"disp('rad/cm',bet01,'Propogation constant:');\n",
+"vp01=(2*%pi*f)/bet01;\n",
+"disp('m/s',vp01/100,'Phase velocity:');\n",
+"\n",
+"disp('TE11 mode');\n",
+"lamc11=(2*a*b)/sqrt((a*a)+(b*b));\n",
+"bet11=(2*%pi*sqrt(((lamc11/lamm)^2)-1))/lamc11;\n",
+"disp('rad/cm',bet11,'Propogation constant:');\n",
+"vp11=(2*%pi*f)/bet11;\n",
+"disp('m/s',vp11/100,'Phase velocity:');\n",
+"\n",
+"disp('TE02 mode');\n",
+"lamc02=b;\n",
+"bet02=(2*%pi*sqrt(((lamc02/lamm)^2)-1))/lamc02;\n",
+"disp('rad/cm',bet02,'Propogation constant:');\n",
+"disp('As beta is imaginary, mode gets attenuated');\n",
+"alp=(2*%pi*sqrt(1-((lamc02/lamm)^2)))/lamc02;\n",
+"disp('Np/m',alp,'Propogation constant alpha:');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.19: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 105\n",
+"//Example 2.19\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=2.29; //cm\n",
+"b=1.02; //cm\n",
+"a1=a/100 ;//m\n",
+"b1=b/100; //m\n",
+"f=6D+9; //Hz\n",
+"e=1;\n",
+"mu=1/(c^2);\n",
+"\n",
+"//Cut off frequency\n",
+"lamc=2*a1;\n",
+"fc=c/lamc;\n",
+"w=2*%pi*fc;\n",
+"\n",
+"//Attenuation constant\n",
+"a=(w*sqrt(1-((f/fc)^2)))/c;;\n",
+"adb=-20*log10(exp(-a));\n",
+"disp('dB/m',adb,'Attenuation constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: Dominant_mode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number:91\n",
+"//Example 2.1\n",
+"clc;\n",
+"//Given,\n",
+"\n",
+"a=6;//cm\n",
+"b=4;//cm\n",
+"d=4.47;//cm\n",
+"c=3D+8; //m/s\n",
+"lamc=2*a;\n",
+"lamg=2*d;\n",
+"\n",
+"//Signal wavelength\n",
+"lam=lamg*lamc/(sqrt(lamg^2+lamc^2));\n",
+"lam=lam/100; //m\n",
+"f=c/lam;\n",
+"disp('Ghz',f/1D+9,'Signal frequency of dominant mode:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.20: Ratio_of_cross_sectio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 105\n",
+"//Example 2.20\n",
+"clc;\n",
+"//Given,\n",
+"a1=1.84;\n",
+"a2=%pi;\n",
+"\n",
+"r=2*%pi*(a1/a2)^2;\n",
+"disp(r,'Cross section ratio:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.21: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 106\n",
+"//Example 2.21\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"f=15D+9; //hz\n",
+"a=1.07; //cm\n",
+"a1=a/100; //m\n",
+"b=0.43; //cm\n",
+"b1=b/100; //m\n",
+"er=2.08;\n",
+"tandel=0.0004;\n",
+"lam=c/f;\n",
+"\n",
+"\n",
+"//(i) Cut off frequency\n",
+"m1=1;\n",
+"n1=0;\n",
+"fc10=(c/(2*%pi*sqrt(er))*sqrt((m1*%pi/a1)^2+(n1*%pi/b1)^2));\n",
+"disp('GHz',fc10/10^9,'Cut off frequency for mode TE10:');\n",
+"\n",
+"m2=2;\n",
+"n2=0;\n",
+"fc20=(c/(2*%pi*sqrt(er))*sqrt((m2*%pi/a1)^2+(n2*%pi/b1)^2));\n",
+"disp('Ghz',fc20/10^9,'Cut off frequency at mode TE20:');\n",
+"\n",
+"m3=0;\n",
+"n3=1;\n",
+"fc01=(c/(2*%pi*sqrt(er))*sqrt((m3*%pi/a1)^2+(n3*%pi/b1)^2));\n",
+"disp('Ghz',fc01/10^9,'Cut off frequency at mode TE01:');\n",
+"\n",
+"//Dielectric attenuation constant\n",
+"ad=(%pi*tandel)/(lam*sqrt(1-(fc10/f)^2));\n",
+"adb=-20*log10(exp(-ad));\n",
+"disp('dB/m',adb,'Attenuation constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.22: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 106\n",
+"//Example 2.22\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=2.286; //cm\n",
+"a1=a/100; //m\n",
+"b=1.016; //cm\n",
+"b1=b/100; //m\n",
+"sig=5.8D+7; //s/m\n",
+"f=9.6D+9; //Hz\n",
+"\n",
+"w=2*%pi*f;\n",
+"mu=%pi*4D-7;\n",
+"et=377;\n",
+"\n",
+"lam=c/f;\n",
+"lamc=2*a1;\n",
+"r=lam/lamc;\n",
+"\n",
+"Rs=sqrt((w*mu)/(2*sig));\n",
+"ac=(Rs*(1+(2*(b1/a1)*r*r)))/(et*b1*sqrt(1-(r^2)));\n",
+"adb=-20*log10(exp(-ac));\n",
+"disp('dB/m',adb,'Conductor attenuation constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.23: Circular_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 107\n",
+"//Example 2.23\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"f=9D+9; //hz\n",
+"a=5; //cm\n",
+"a1=a/100; //m\n",
+"e=1;\n",
+"mu=1/(c*c);\n",
+"p11=1.841;\n",
+"\n",
+"fc=(p11*c)/(2*%pi*a1);\n",
+"//Maximum power transmitted\n",
+"pmax=1790*(a1*a1)*sqrt(1-((fc/f)^2)); \n",
+"disp('kW',pmax,'Maximum power transmitted:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.24: Air_filled_circular_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 108\n",
+"//Example 2.26\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=5; //cm\n",
+"a1=a/100; //m\n",
+"f=3D+9; //hz\n",
+"p11=1.841;\n",
+"e=1;\n",
+"w=2*%pi*f;\n",
+"\n",
+"//(i) Cut off frequency\n",
+"fc=(p11*c)/(2*%pi*a1);\n",
+"disp('Ghz',fc/10^9,'Cut off frequency:');\n",
+"\n",
+"//(ii) Guide wavelength\n",
+"bet=sqrt(((w*w)/(c*c))-((p11/a1)^2));\n",
+"lamg=(2*%pi)/bet; \n",
+"lamg1=lamg*100; //cm\n",
+"disp('cm',lamg1,'Guide wavelength:');\n",
+"\n",
+"//(iii) Wave impedance\n",
+"zte=(w*%pi*4D-7)/bet;\n",
+"disp('ohm',round(zte),'Wave impedance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.25: Air_filled_rectangular_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number:108 \n",
+"//Example 2.25\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"p01=2.405;\n",
+"a=1/100;; //cm\n",
+"p11=1.841;\n",
+"\n",
+"fc01=((c*p01)/(2*%pi*a));\n",
+"fc11=((c*p11)/(2*%pi*a));\n",
+"bw=fc01-fc11;\n",
+"disp('Ghz',bw/10^9,'Bandwidth:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.26: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 109\n",
+"//Example 2.26\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=2.286; //cm\n",
+"f=5D+9; //Hz\n",
+"er=2.25; \n",
+"tandel=1D-3;\n",
+"w=2*%pi*f;\n",
+"mu=4D-7;\n",
+"sig=5.8D+7; //s/m\n",
+"\n",
+"lamc=2*a;\n",
+"lamm=c/f;//m\n",
+"lam=lamm*100;//cm\n",
+"\n",
+"ermax=(lam/a)^2;\n",
+"disp(ermax,'Maximum value of dielectric constant:');\n",
+"ermin=(lam/(2*a))^2;\n",
+"disp(ermin,'Minimum value of dielectric constant:');\n",
+"\n",
+"//Guide wavelength\n",
+"lam1=lam/sqrt(er);//cm\n",
+"lamg=lam1/sqrt(1-(lam1/lamc)^2);\n",
+"disp('cm',lamg,'Guide wavelength:');\n",
+"\n",
+"lamm1=lam1/100;\n",
+"ad=(%pi/lamm1)*(tandel/sqrt(1-(lam1/lamc)^2));\n",
+"disp('Np/m',ad,'ad:');\n",
+"bet=2*%pi/lamg;\n",
+"disp('rad/cm',bet,'Beta:');\n",
+"vp=w/(bet*100);\n",
+"disp('m/s',vp,'Phase velocity:');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.27: Circular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 110\n",
+"//Example 2.27\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=0.5; //cm\n",
+"a1=a/100; //m\n",
+"f=14D+9; //Hz\n",
+"er=2.08;\n",
+"p11=1.841;\n",
+"p01=2.405;\n",
+"tandel=4D-4;\n",
+"w=2*%pi*f;\n",
+"u=%pi*4D-7;\n",
+"sig=4.1D+7;\n",
+"et=377;\n",
+"\n",
+"//(i) Cut off frequencies\n",
+"fcte11=p11*c/(2*%pi*a1*sqrt(er));\n",
+"fctm01=p01*c/(2*%pi*a1*sqrt(er));\n",
+"disp('Ghz',fcte11/10^9,'Cut off frequencies for TE11 mode:');\n",
+"disp('Ghz',fctm01/10^9,'Cut off frequencies for TM01 mode:');\n",
+"\n",
+"//(ii) Overall noise\n",
+"//Dielectric attenuation\n",
+"ad=(%pi*sqrt(er)*tandel*f)/(c*sqrt(1-((fcte11/f)^2)));\n",
+"disp('dB/m',ad*8.686,'Dielectric attenuation:');\n",
+"\n",
+"//Conductor attenuation\n",
+"k=(2*%pi*f*sqrt(er))/c;\n",
+"bet=sqrt((k*k)-((p11/a1)^2));\n",
+"//Surface resistance\n",
+"rs=sqrt((w*u)/(2*sig));\n",
+"kc2=(p11/a1)^2;\n",
+"\n",
+"ac=(rs*(kc2-((k^2)/((p11^2)-1))))/(a1*k*et*bet);\n",
+"disp('dB/m',ac*8.686,'Conductor attenuation:');\n",
+"\n",
+"//Total attenuation\n",
+"a=(ac+ad)*8.686;\n",
+"disp('dB/m',a,'Total attenuation:');\n",
+"ta=a*0.3;\n",
+"disp('dB',ta,'Total attenuation in 30 cm line:');\n",
+"\n",
+"//Answer for condcutor attenuation is wrong in book, hence answer for total loss is different"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.28: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 112\n",
+"//Example 2.28\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"er=9;\n",
+"a=7; //cm\n",
+"a1=a/100; //m\n",
+"b=3.5; //cm\n",
+"b1=b/100; //m\n",
+"ur=1;\n",
+"f1=2D+9; //Hz\n",
+"\n",
+"//(i) Cut off frequency\n",
+"lamc=2*a1;\n",
+"fc=c/(lamc*sqrt(ur*er));\n",
+"disp('Ghz',fc/10^9,'Cut off frequency:');\n",
+"\n",
+"//(ii) Phase velocity\n",
+"lam=c/f1;//m\n",
+"lam1=lam*100;//cm\n",
+"lamc1=lamc*100;//cm\n",
+"lamg=lam1/(sqrt((ur*er)-((lamc1/lam1)^2))); //cm\n",
+"lamg1=lamg/100;//m\n",
+"vp=f1*lamg1;\n",
+"disp('m/s',vp,'Phase velocity:');\n",
+"\n",
+"///(iii)Guide wavelength\n",
+"disp('cm',lamg,'Guide wavelength:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.29: Circular_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 112\n",
+"//Example 2.29\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"fc=9D+9; //Hz\n",
+"er=1; \n",
+"er1=4;\n",
+"p11=1.841;\n",
+"\n",
+"//(i) air filled\n",
+"a=(p11*c)/(2*%pi*fc*sqrt(er));\n",
+"disp('cm',a*100,'Inside diameter if air filled:');\n",
+"//(ii) dielectric field\n",
+"a1=(p11*c)/(2*%pi*fc*sqrt(er1));\n",
+"disp('cm',a1*100,'Inside diameter if dielectric filled:');\n",
+"\n",
+"//Answers are calculated wrong in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 92\n",
+"//Example 2.2\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"a=2.5; //cm\n",
+"b=5; //cm\n",
+"lam=4.5; //cm\n",
+"\n",
+"lamc=2*b;\n",
+"\n",
+"//Guide wavelength\n",
+"lamg=lam/(sqrt(1-((lam/lamc)^2)));\n",
+"disp('cm',lamg,'Guide wavelength:');\n",
+"\n",
+"//Phase constant\n",
+"bet=(2*%pi)/lamg;\n",
+"bet=bet*100; //rad/m\n",
+"disp('rad/m',bet,'Phase constant:');\n",
+"\n",
+"//Phase velocity\n",
+"w=(2*%pi*c)/lam;\n",
+"vp=w/bet;\n",
+"disp('m/s',vp,'Phase velocity:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.30: Cutoff_frequencies.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 113\n",
+"//Example 2.30\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"er=2.55;\n",
+"d=1; //mm\n",
+"d1=d/1000;//m\n",
+"\n",
+"//Cut off frequencies\n",
+"fctm0=0;\n",
+"disp('Ghz',fctm0,'Cut off frequency for mode TM0:');\n",
+"\n",
+"fcte1=c/(4*d1*sqrt(er-1));\n",
+"disp('Ghz',fcte1/10^9,'Cut off frequency at mode TE1:');\n",
+"\n",
+"fctm1=c/(2*d1*sqrt(er-1));\n",
+"disp('Ghz',fctm1/10^9,'Cut off frequency at mode TM1:');\n",
+"\n",
+"\n",
+"//Answers are calculated wrong in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.31: Dielectric_constant.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 113\n",
+"//Example 2.31\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"f=15D+9; //hz\n",
+"d=5; //mm\n",
+"d1=d/1000; //m\n",
+"\n",
+"//Cut off frequency\n",
+"fc=0.8*f;\n",
+"//Dielctric constant\n",
+"er=(c/(2*d1*fc))^2+1;\n",
+"disp(er,'Dielectric constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 92\n",
+"//Example 2.3\n",
+"clc;\n",
+"//Given,\n",
+"\n",
+"c=3D+8; //m/s\n",
+"a=4; //cm\n",
+"b=2; //cm\n",
+"f=10D+9; //Hz\n",
+"m=1; \n",
+"n=1;\n",
+"\n",
+"\n",
+"//Cutoff wavelength\n",
+"lamc=2/sqrt((m/a)^2+(n/b)^2);\n",
+"disp('cm',lamc,'Cut-off wavelength:');\n",
+"\n",
+"//Wave impedance\n",
+"lam=c/f;//m\n",
+"lam=lam*100;//cm\n",
+"eeta=120*%pi;\n",
+"z0=eeta*sqrt(1-(lam/lamc)^2);\n",
+"disp('ohm',z0,'Wave impedance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: Wider_dimension.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 93\n",
+"//Example 2.4\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"f=10D+9; //Hz\n",
+"zte=410; //ohm\n",
+"\n",
+"//Wider dimension\n",
+"lam=c/f;//m\n",
+"lam=lam*100;//cm\n",
+"a=3/(2*(sqrt(1-(120*%pi/zte)^2)));\n",
+"disp('cm',a,'Wider dimension:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: Rectangular_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 93\n",
+"//Example 2.5\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"a=3.0; //cm\n",
+"b=1.5; //cm\n",
+"mur=1;\n",
+"er=2.25;\n",
+"x=mur*er;\n",
+"\n",
+"//(i) Cutoff wavelength and frequencuy\n",
+"disp('TE10 mode');\n",
+"m1=1;\n",
+"n1=0;\n",
+"lamc10=2/sqrt((m1/a)^2+(n1/b)^2);\n",
+"disp('cm',lamc10,'Cut-off wavelength:');\n",
+"lamc10=lamc10/100;\n",
+"f10=c/(lamc10*sqrt(x));\n",
+"disp('Ghz',f10/1D+9,'Cutoff frequency:');\n",
+"\n",
+"disp('TE20 mode');\n",
+"m2=2;\n",
+"n2=0;\n",
+"lamc20=2/sqrt((m2/a)^2+(n2/b)^2);\n",
+"disp('cm',lamc20,'Cut-off wavelength:');\n",
+"lamc20=lamc20/100;\n",
+"f20=c/(lamc20*sqrt(x));\n",
+"disp('Ghz',f20/1D+9,'Cutoff frequency:');\n",
+"\n",
+"disp('TE11 mode');\n",
+"m3=1;\n",
+"n3=1;\n",
+"lamc11=2/sqrt((m3/a)^2+(n3/b)^2);\n",
+"disp('cm',lamc11,'Cut-off wavelength:');\n",
+"lamc11=lamc11/100;\n",
+"f11=c/(lamc11*sqrt(x));\n",
+"disp('Ghz',f11/1D+9,'Cutoff frequency:');\n",
+"\n",
+"//(ii) lambg and Z0\n",
+"f=4D+9; //Hz\n",
+"lam=c/f;\n",
+"lamg=lam/(sqrt(x-((lam/lamc10)^2)));\n",
+"disp('cm',lamg*100,'Guide wavelength:');\n",
+"\n",
+"fc=3.33D+9; //Hz\n",
+"Z0=(120*%pi*(1/sqrt(x))*(b/a))/sqrt(1-((fc/f)^2));\n",
+"disp('ohm',round(Z0),'Impedance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: Rectangular_waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 95\n",
+"//Example 2.5\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"a=4; //cm\n",
+"b=2; //cm\n",
+"\n",
+"//(i) Mode\n",
+"lamc=2*a; //cm\n",
+"lamcm=lamc/100; //m\n",
+"fc=c/lamcm;\n",
+"//20% above fc\n",
+"f=1.2*fc; //Hz\n",
+"\n",
+"//Operating wavelength\n",
+"lam1=c/f; //cm\n",
+"\n",
+"//For TE10 mode\n",
+"lamc10=2*b;//cm\n",
+"lamcm10=lamc10/100;//m\n",
+"fc10=c/lamcm10;\n",
+"disp('Hence mode of operation is TE10','Hz',fc,'Since guide is operating at');\n",
+"\n",
+"//(ii)Guide wavelength\n",
+"lamm1=lam1*100;//cm\n",
+"lamg=lamm1/(sqrt(1-(lamm1/lamc)^2));\n",
+"disp('cm',lamg,'Guide wavelength:');\n",
+"\n",
+"//(iii) Phase velocity\n",
+"vp=f*lamg;\n",
+"disp('m/s',vp/100,'Phase velocity:');\n",
+"\n",
+"//(iii) Group velocity\n",
+"vg=c^2/vp;\n",
+"disp('m/s',vg,'Group velocity:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8: Lossless_Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 96\n",
+"//Example 2.8\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"a=7; //cm\n",
+"b=3.5; //cm\n",
+"f=3D+9; //Hz\n",
+"h0=10; //amp/m\n",
+"\n",
+"//Wave impedance\n",
+"lamc=2*a;\n",
+"lam=c/f;//m\n",
+"lam=lam*100;//cm\n",
+"lamg=lam/sqrt(1-(lam/lamc)^2); //cm\n",
+"z0=377*lamg/h0; //ohm\n",
+"\n",
+"a1=a/100;//m\n",
+"b1=b/100;//m\n",
+"//Average power transmitted\n",
+"p=(z0*h0*h0*a1*b1)/4;\n",
+"disp('W',p,'Average power transmitted:');\n",
+"\n",
+"//Peak electric field\n",
+"e0=z0*h0;\n",
+"disp('kV/m',e0/1000,'Peak electric field:');\n",
+"\n",
+"//Answer for p is given as 28.3 W but it should be 32.99W"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9: Dimensions.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 96\n",
+"//Example 2.9\n",
+"clc;\n",
+"//Given,\n",
+"c=3D+8; //m/s\n",
+"fc=3D+9; //Hz\n",
+"\n",
+"//Cutoff wavelength\n",
+"lamc=c/fc; \n",
+"a=lamc/2;//m\n",
+"a=a*100;//cm\n",
+"disp('Dimensions:');\n",
+"disp('cm',a,'a:');\n",
+"b=a/2; //cm\n",
+"disp('cm',b,'b:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/3-Microwave_Network_Analysis.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/3-Microwave_Network_Analysis.ipynb
new file mode 100644
index 0000000..296cb92
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/3-Microwave_Network_Analysis.ipynb
@@ -0,0 +1,227 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Microwave Network Analysis"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12: Transistor_amplifier_circuit.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 163\n",
+"//Example 3.12\n",
+"clc;\n",
+"//Given\n",
+"S11=0.6;\n",
+"S12=0.045;\n",
+"S21=2.5;\n",
+"S22=0.50;\n",
+"TS=0.5;\n",
+"TL=0.4;\n",
+"Z0=50; //ohm\n",
+"Vrms=10; //V\n",
+"\n",
+"//(i) Gain Parameters\n",
+"//(i)Reflection coefficients of input and output\n",
+"Tin=S11+((S12*S21*TL)/(1-(S22*TL)));\n",
+"Tout=S22+((S12*S21*TS)/(1-(S22*TS)));\n",
+"\n",
+"//Transducer Gain\n",
+"x=(1-(TS)^2)/((1-(S11*TS))^2);\n",
+"y=(S21*S21);\n",
+"z=(1-(TL)^2)/((1-(Tout*TL))^2);\n",
+"GT=x*y*z;\n",
+"disp(GT,'Transducer Gain:');\n",
+"\n",
+"//Available Power Gain\n",
+"z1=1-(Tout)^2;\n",
+"GA=(x*y)/z1;\n",
+"disp(GA,'Available power Gain:'); \n",
+"\n",
+"//Power Gain\n",
+"z2=1-(Tin)^2;\n",
+"GP=(x*y)/z2;\n",
+"disp(GP,'Power Gain:');\n",
+"\n",
+"//(ii) Power levels\n",
+"//Power available at source\n",
+"Pavs=(sqrt(2)*Vrms)^2/(8*Z0);\n",
+"disp('W',Pavs,'Power available at source:');\n",
+"\n",
+"Pl=9.4*Pavs;\n",
+"//Power available at input\n",
+"Pin=Pl/13.5;\n",
+"disp('W',Pin,'Power available at input:');\n",
+"\n",
+"//(iii) VSWRs\n",
+"M1=Pin/Pavs;\n",
+"M2=Pl/(9.6*Pavs);\n",
+"\n",
+"Tin1=sqrt(1-M1);\n",
+"Tout1=sqrt(1-M2);\n",
+"\n",
+"vswrin=(1+Tin1)/(1-Tin1);\n",
+"disp(vswrin,'Input VSWR:');\n",
+"vswrout=(1+Tout1)/(1-Tout1);\n",
+"disp(vswrout,'Output VSWR:');\n",
+"\n",
+"//Calculations for gain are done wrong in book, hence answers dont match"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: Scattering_matrix.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 142\n",
+"//Example 3.4\n",
+"clc;\n",
+"//Given\n",
+"\n",
+"[z]=[4 2;2 4];\n",
+"[I]=[1 0;0 1];\n",
+"\n",
+"//Scattering matrix\n",
+"[s]={[z]-[I]}*inv({[z]+[I]});\n",
+"disp([s],'Scattering Matrix:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: Network.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 142\n",
+"//Example 3.5\n",
+"clc;\n",
+"//Given\n",
+"P=12.8D-3; //W\n",
+"l=3; //cm\n",
+"lamb=4.2; //cm\n",
+"vswr=2.2;\n",
+"jfi=%i*4.49;\n",
+"\n",
+"//ap\n",
+"ap=sqrt(2*P);\n",
+"\n",
+"//Phase shift\n",
+"bl=(2*%pi*l)/lamb;\n",
+"//bp\n",
+"bp=(ap*(vswr-1))/(vswr+1);\n",
+"\n",
+"a=ap*exp(jfi);\n",
+"b=bp*exp(jfi);\n",
+"disp(a,b,'Required Waves:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: Microwave_network.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 143\n",
+"//Example 3.6\n",
+"clc;\n",
+"//Given\n",
+"S11=0.10;\n",
+"S12=0.90;\n",
+"A12=-45;\n",
+"S21=0.90;\n",
+"A21=45;\n",
+"S22=0.3;\n",
+"\n",
+"//(i) Network is reciprocal\n",
+"if(A12==A21)\n",
+" disp('Network is reciprocal');\n",
+"else\n",
+" \n",
+" disp('Network is not reciprocal');\n",
+"end\n",
+"\n",
+"//(ii) Network is lossles\n",
+"x=(S11^2)+(S12^2);\n",
+"if(x==1)\n",
+" disp('Network is lossless');\n",
+"else\n",
+" \n",
+" disp('Network is not lossless');\n",
+"end\n",
+"\n",
+"//(iii)Return loss\n",
+"T=S11-((S12*S21)/(1+S22));\n",
+"Tm=-T; //mod of T\n",
+"L=-20*log10(Tm);\n",
+"disp('dB',L,'Return Loss:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/4-Microwave_Resonators_and_Waveguide_Components.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/4-Microwave_Resonators_and_Waveguide_Components.ipynb
new file mode 100644
index 0000000..5da6b9b
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/4-Microwave_Resonators_and_Waveguide_Components.ipynb
@@ -0,0 +1,917 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Microwave Resonators and Waveguide Components"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: Cylindrical_resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 199\n",
+"//Example 4.10\n",
+"clc;\n",
+"//Given\n",
+"a=3;//cm\n",
+"a1=a/100;//m\n",
+"d=10;//cm\n",
+"d1=d/100;//m\n",
+"df=2.5D+6;\n",
+"er=2.25;\n",
+"p11=1.841;\n",
+"c=3D+8; //m/s\n",
+"\n",
+"//Resonant frequency\n",
+"fr=(c/2)*(sqrt((p11/a1)^2+(%pi/d1)^2));//hz\n",
+"disp('Ghz',fr/10^9,'Resonant frequency:');\n",
+"\n",
+"//Q without dielectric\n",
+"q0=fr/df;\n",
+"disp(q0,'Q wirhout dielectric constant:');\n",
+"\n",
+"// Q with dielectric\n",
+"fr1=fr/sqrt(er);\n",
+"qd=1D+3;\n",
+"q=(q0*qd)/(q0+qd);\n",
+"disp(q,'Q with dielectric constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: Cylindrical_resonantor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 200\n",
+"//Example 4.11\n",
+"clc;\n",
+"//Given\n",
+"f=9.375D+9;//hz\n",
+"sig=5.8D+7;\n",
+"eet=377;\n",
+"c=3D+8; //m/s\n",
+"w=2*%pi*f;\n",
+"r=1.5;\n",
+"u=4D-7*%pi;\n",
+"\n",
+"//Radius\n",
+"a=c/(f*2.62);//m\n",
+"disp('cm',a*100,'Radius of resonantor');\n",
+"\n",
+"//O\n",
+"rs=sqrt((w*u)/(2*sig));//ohm\n",
+"x=1.202*eet;\n",
+"y=rs*(1+(1/r));\n",
+"q=x/y;\n",
+"disp(q,'Q of the resonator:');\n",
+"\n",
+"//Answer for Q is calculated as 10875 in book but it is 10763.303"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12: Cylindrical_Resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 215\n",
+"//Example 4.12\n",
+"clc;\n",
+"//Given\n",
+"f=5D+9;//hz\n",
+"sig=5.813D+7;\n",
+"er=2.25;\n",
+"tandel=4D-4;\n",
+"c=3D+8; //m/s\n",
+"h01=3.832;\n",
+"u=4D-7*%pi;\n",
+"\n",
+"//Length of resonator\n",
+"lamr=c/(f*sqrt(er));\n",
+"d=sqrt([{(((2*3.832)^2)+(%pi*%pi))*(lamr*lamr)}/(2*2*%pi*%pi)]);\n",
+"disp('cm',d*100,'Length of resonator:');\n",
+"\n",
+"//Q of resonator\n",
+"n=(120*%pi)/sqrt(er);\n",
+"Rs=sqrt((f*u)/sig);\n",
+"a=d/2;\n",
+"Qw1=n*[[(h01/a)^2+(%pi/d)^2]^(3/2)];\n",
+"Qw2=2*Rs*[((h01*h01)/(a*a*a))+((2*%pi*%pi)/(d*d*d))];\n",
+"Qw=Qw1/Qw2;\n",
+"Qd=1/tandel;\n",
+"Q=(Qw*Qd)/(Qw+Qd);\n",
+"disp(Q,'Q of resonator:');\n",
+"\n",
+"//Value of Qw is calculated wrong in the book, it should be 50057.91 instead of 53473.8\n",
+"//Hence the value of Q also differs\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.13: Lossless_plane_H_tee.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 215\n",
+"//Example 4.13\n",
+"clc;\n",
+"//Given\n",
+"p=100; //mW\n",
+"//As 2 and 3 are matched terminals\n",
+"x=1/2;\n",
+"y=1/sqrt(2);\n",
+"s=[x -x y;-x 0 y;y y 0];\n",
+"\n",
+"//Power delivered\n",
+"//Port 1\n",
+"p1=p*(1-s(1,1)^2);\n",
+"disp('mW',p1,'Power at port 1:');\n",
+"\n",
+"//Port2\n",
+"p2=p*s(2,1)^2;\n",
+"disp('mW',p2,'Power at port 2:');\n",
+"\n",
+"//Port 3\n",
+"p3=p*s(3,1)^2;\n",
+"disp('mW',p3,'Power at port 3:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14: E_plane_tee.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 216\n",
+"//Example 4.14\n",
+"clc;\n",
+"//Given\n",
+"p=40; //mW\n",
+"//Since port 3 is matched\n",
+"x=sqrt(2);\n",
+"s=[1 1 x;1 1 -x;x -x 0];\n",
+"r1=40; //ohm\n",
+"r2=60; //ohm\n",
+"w=50; //ohm\n",
+"\n",
+"//Reflection coefficients\n",
+"T1=(w-r1)/(w+r1);\n",
+"T2=(r2-w)/(r2+w);\n",
+"\n",
+"//As power is fed into 1 and 2 equally\n",
+"pd=p/2;\n",
+"\n",
+"//Power delivered\n",
+"//Port 1\n",
+"p1=pd*(1-T1^2);\n",
+"disp('mW',p1,'Power at port 1:');\n",
+"\n",
+"//Port2\n",
+"p2=pd*(1-T2^2);\n",
+"disp('mW',p2,'Power at port 2:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15: Magic_Tee.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 216\n",
+"//Example 4.15\n",
+"clc;\n",
+"//Given\n",
+"T1=1/2;\n",
+"T2=3/5;\n",
+"T3=0;\n",
+"T4=4/5;\n",
+"p=500D-3; //W\n",
+"//S matrix for magic Tee\n",
+"x=1/sqrt(2);\n",
+"s=[0 0 x x;0 0 x -x;x x 0 0;x -x 0 0];\n",
+"//Using the input output relation\n",
+"//[b]=[s]*[a]\n",
+"b=[0.6565;0.7576;0.5536;0.0892];\n",
+"\n",
+"//(i) Power transmitted through ports\n",
+"//Port 1\n",
+"p1=(1/2)*b(1,1)^2*(1-T1^2);\n",
+"disp('W',p1,'Power at port 1:');\n",
+"\n",
+"//Port2\n",
+"p2=(1/2)*(b(2,1)^2)*(1-(T2^2));\n",
+"disp('W',p2,'Power at port 2:');\n",
+"\n",
+"//Port 4\n",
+"p4=(1/2)*b(4,1)^2*(1-T4^2);\n",
+"disp('W',p4,'Power at port 4:');\n",
+"\n",
+"//(ii) Power reflected at port 3\n",
+"//Port 3\n",
+"p3=p*b(3,1)^2;\n",
+"disp('W',p3,'Power at port 3:');\n",
+"\n",
+"//(iii) Power absorbed\n",
+"pabs=p-(p1+p2+p3+p4);\n",
+"disp('W',pabs,'Power absorbed:');\n",
+"\n",
+"//Answer for power absorbed is calculated wrong in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.18: Directional_Coupler.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 236\n",
+"//Example 4.18\n",
+"clc;\n",
+"//Given\n",
+"C=10; //dB\n",
+"D=30; //dB\n",
+"\n",
+"//Parameters\n",
+"bet=10^(-C/20);\n",
+"x=bet/(10^(D/20));\n",
+"a=sqrt(1-(bet*bet));\n",
+"//Scattering matrix\n",
+"//Assuming symmetery\n",
+"s=[0 a x (bet*%i);a 0 (bet*%i) x;x (bet*%i) 0 a;(bet*%i) x a 0];\n",
+"disp(s,'Scattering matrix:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: Rectangular_cavity_resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 193\n",
+"//Example 4.1\n",
+"clc;\n",
+"//Given\n",
+"a=5;//cm\n",
+"a1=a/100;//m\n",
+"b=2;//cm\n",
+"b1=b/100;//m\n",
+"c=15;//cm\n",
+"c1=c/100;//m\n",
+"\n",
+"//(i) Air filled cavity\n",
+"m=1;\n",
+"n=0;\n",
+"p=1;\n",
+"c=3D+8; //for air\n",
+"fr=(1/2)*c*sqrt((m/a1)^2+(n/b1)^2+(p/c1)^2); //hz\n",
+"disp('Ghz',fr/10^9,'Resonant frequency for an air filled cavity:');\n",
+"\n",
+"//(ii) Dielctric filled cavity\n",
+"er=2.56;\n",
+"fr1=(1/2)*(c/sqrt(er))*sqrt((m/a1)^2+(n/b1)^2+(p/c1)^2);//hz\n",
+"disp('Ghz',fr1/10^9,'Resonant frequency for dielectric cavity:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.20: Directional_coupler.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 238\n",
+"//Example 4.20\n",
+"clc;\n",
+"//Given\n",
+"vswr=2;\n",
+"D1=8; //mW\n",
+"D2=2; //mW\n",
+"\n",
+"//Reflection coefficient at arm 4\n",
+"T=(vswr-1)/(vswr+1);\n",
+"//Powwe delivered to D1\n",
+"P=(D1*100)/(1-T^2);\n",
+"P1=0.99*P;\n",
+"//Power reflected at D1\n",
+"W1=(P/100)*T*T;\n",
+"//Power reflected at load\n",
+"W2=D2-W1;\n",
+"Tt=sqrt((W2*100)/(P1));\n",
+"pt=(1+Tt)/(1-Tt);\n",
+"disp(pt,'VSWR:');\n",
+"Pl=P1*(1-(Tt*Tt));\n",
+"disp('mW',Pl,'Power delivered:');\n",
+"\n",
+"//Answer for P1 should be 792 but it is given as 800"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.21: Isolator_Matrix.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 239\n",
+"//Example 4.21\n",
+"clc;\n",
+"//Given\n",
+"I=30; //dB\n",
+"Il=0.4; //dB\n",
+"\n",
+"S12=10^(I/-20);\n",
+"S21=10^(Il/-20);\n",
+"s=[0 S12;S21 0];\n",
+"disp(s,'Scattering matrix:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.22: Circulator_Matrix.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 240\n",
+"//Example 4.22\n",
+"clc;\n",
+"//Given\n",
+"I=30; //dB\n",
+"Il=2; //dB\n",
+"p=1.3;\n",
+"\n",
+"//Elelments\n",
+"T=(p-1)/(p+1);\n",
+"S11=T;\n",
+"S22=T;\n",
+"S33=T;\n",
+"S12=10^(-Il/20);\n",
+"S13=10^(-I/20);\n",
+"S21=S13;\n",
+"S32=S13;\n",
+"S23=S12;\n",
+"S31=S23;\n",
+"s=[S11 S21 S31;S12 S22 S32;S13 S23 S33];\n",
+"disp(s,'Scattering matrix:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.23: Rectangular_Waveguide.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 249\n",
+"//Example 4.23\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9; //Hz\n",
+"u=4D-7*%pi;\n",
+"c=3D+8; //m/s\n",
+"a=2.29; //cm\n",
+"a1=a/100;\n",
+"b=1.02; //cm\n",
+"b1=b/100;\n",
+"\n",
+"//E/H\n",
+"w=2*%pi*f;\n",
+"EbyH=(w*u)/sqrt(((w/c)^2)+((%pi/a1)^2));\n",
+"lam=c/f;\n",
+"lamc=2*a1;\n",
+"d=(1/4)*(lam/sqrt(1-((lam/lamc)^2)));\n",
+"disp('cm',d*100,'Position:');\n",
+"\n",
+"//Answer for positon is calculated wrong in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.24: Attenuator_matrix.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 250\n",
+"//Example 4.24\n",
+"clc;\n",
+"//Given\n",
+"//As it is perfectly matched\n",
+"S12=1/sqrt(2);\n",
+"S21=S12;\n",
+"s=[0 S12;S21 0];\n",
+"disp(s,'Scattering matrix:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Rectangulr_resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 193\n",
+"//Example 4.2\n",
+"clc;\n",
+"//Given\n",
+"a=0.38;//cm\n",
+"a1=a/100;//m\n",
+"b=0.76;//cm\n",
+"b1=b/100;//m\n",
+"f=50D+9;\n",
+"c=3D+8;\n",
+"\n",
+"//Length for TE102\n",
+"m=1;\n",
+"n=0;\n",
+"p=2;\n",
+"l=1/sqrt((f/c)^2-(1/(4*b1^2)));//m\n",
+"disp('cm',l*100,'Length c:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: X_band_resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 194\n",
+"//Example 4.3\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=2.286;//cm\n",
+"a1=a/100;//m\n",
+"b=1.024;//cm\n",
+"b1=b/100;//m\n",
+"f=10D+9;//hz\n",
+"sig=6D+7;\n",
+"u=4D-7*%pi;\n",
+"w=2*%pi*f;\n",
+"eet=377;\n",
+"\n",
+"//Shortest cavity length\n",
+"lamc=2*a1;//m\n",
+"fc=c/lamc;//hz\n",
+"lam=c/f;//m\n",
+"lamg=lam/sqrt(1-(fc/f)^2);//m\n",
+"sc=lamg/2;//m\n",
+"disp('cm',sc*100,'Shortest cavity length:');\n",
+"\n",
+"//Qw of the resonator operating in TE101 mode\n",
+"rs=sqrt((w*u)/(2*sig));//ohm\n",
+"lamr=c/f;\n",
+"x=(((a1*b1)/(sc^2))+((sc^2+a1^2)/(2*sc*a1))+(b1*sc/a1^2));\n",
+"qw=(2*%pi*eet*a1*b1*sc)/(rs*(lamr^3)*x);\n",
+"disp(qw,'Qw of the resonator operating in TE101 mode');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Rectangular_resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 195\n",
+"//Example 4.4\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=4.8;//cm\n",
+"a1=a/100;//m\n",
+"b=2.2;//cm\n",
+"b1=b/100;//m\n",
+"f=5D+9;//hz\n",
+"er=2.25;\n",
+"tandel=4D-4;\n",
+"sig=5.813D+7;\n",
+"oneby=3D+8;\n",
+"u=4D-7*%pi;\n",
+"w=2*%pi*f;\n",
+"eet=377;\n",
+"\n",
+"//Length at p=1\n",
+"m=1;\n",
+"n=0;\n",
+"p=1;\n",
+"z=(f*2*sqrt(er))/c;\n",
+"cp1=p/sqrt((z^2)-((m/a1)^2)-((n/b1)^2));\n",
+"disp('cm',cp1*100,'Length of resonator at p=1:');\n",
+"\n",
+"//At p=2\n",
+"cp2=cp1*2;\n",
+"disp('cm',cp2*100,'Length of resonator at p=2:');\n",
+"\n",
+"//Qw\n",
+"rs=sqrt((w*u)/(2*sig));//ohm\n",
+"lamr=c/(f*sqrt(er));\n",
+"x=(((a1*b1)/(cp1^2))+((cp1^2+a1^2)/(2*cp1*a1))+(b1*cp1/a1^2));\n",
+"qw=(2*%pi*(eet/sqrt(er))*a1*b1*cp1)/(rs*(lamr^3)*x);\n",
+"qd=1/tandel;\n",
+"q=(qw*qd)/(qw+qd);\n",
+"disp(q,'Q for TE101 mode:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Cylindrical_resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 196\n",
+"//Example 4.5\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=2;//cm\n",
+"a1=a/100;//m\n",
+"b=2.5;//cm\n",
+"b1=b/100;//m\n",
+"\n",
+"disp('TE modes');\n",
+"h01=3.832;\n",
+"fr=(c/(2*%pi))*sqrt((h01/a1)^2+(%pi/b1)^2);//hz\n",
+"disp('Ghz',fr/10^9,'Resonant frequency for mode TE010:');\n",
+"\n",
+"h11=1.841;\n",
+"fr1=(c/(2*%pi))*sqrt((h11/a1)^2+(%pi/b1)^2);//hz\n",
+"disp('Ghz',fr1/10^9,'Resonant frequency for mode TE111:');\n",
+"\n",
+"h21=3.054;\n",
+"fr2=(c/(2*%pi))*sqrt((h21/a1)^2+(%pi/b1)^2);//hz\n",
+"disp('Ghz',fr2/10^9,'Resonant frequency for mode TE211:');\n",
+"\n",
+"disp('TM modes:');\n",
+"l1=0;\n",
+"h011=2.405;\n",
+"fr3=(c/(2*%pi))*sqrt((h011/a1)^2+(%pi*l1/b1)^2);//hz\n",
+"disp('Ghz',fr3/10^9,'Resonant frequency for mode TM010');\n",
+"\n",
+"l2=1;\n",
+"fr4=(c/(2*%pi))*sqrt((h011/a1)^2+(%pi*l2/b1)^2);//hz\n",
+"disp('Ghz',fr4/10^9,'resonant frequency for mode TM011:');\n",
+"\n",
+"l3=1;\n",
+"h111=3.832;\n",
+"fr5=(c/(2*%pi))*sqrt((h111/a1)^2+(%pi*l3/b1)^2);//hz\n",
+"disp('Ghz',fr5/10^9,'Resonant frequency for mode TM111:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Resonator_comparison.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 196\n",
+"//Example 4.6\n",
+"clc;\n",
+"//Given\n",
+"QTM010=1.202;\n",
+"QTE101=1.11;\n",
+"\n",
+"r=QTM010/QTE101;\n",
+"disp(r,'Ratio of Qs of cylindrical and rectangular resonators:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: Cubical_Resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 197\n",
+"//Example 4.7\n",
+"clc;\n",
+"//Given\n",
+"f=7.07D+9;//hz\n",
+"a=3;//cm\n",
+"a1=a/100;//m\n",
+"sig=5.8D+7;\n",
+"er=2.25;\n",
+"tandel=4D-4;\n",
+"ur=1;\n",
+"n=377;\n",
+"w=2*%pi*f;\n",
+"u=4D-7*%pi;\n",
+"\n",
+"//Q of resonantor\n",
+"rs=sqrt(w*u/(2*sig));//ohm\n",
+"qw=(0.7419*n)/(rs*sqrt(2.25));\n",
+"qd=1/tandel;\n",
+"q=(qw*qd)/(qw+qd);\n",
+"disp(q,'Q of resonator:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: Rectangular_Resonant_Cavity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 198\n",
+"//Example 4.8\n",
+"clc;\n",
+"//Given\n",
+"a=5;//cm\n",
+"a1=a/100;//m\n",
+"b=4;//cm\n",
+"b1=b/100;//m\n",
+"c=10;//cm\n",
+"c1=c/100;//m\n",
+"sig=5.8D+7;\n",
+"u0=4D-7*%pi;\n",
+"er=3;\n",
+"eet=377;\n",
+"\n",
+"ur=1;\n",
+"spl=3D+8;\n",
+"tandel=2.5D-4;\n",
+"\n",
+"//TE101 mode\n",
+"m=1;\n",
+"n=0;\n",
+"p=1;\n",
+"fr=(spl/(2*sqrt(er*ur)))*sqrt((m/a1)^2+(n/b1)^2+(p/c1)^2);//hz\n",
+"disp('Ghz',fr/10^9,'Resonant frequency:');\n",
+"\n",
+"w=2*%pi*fr;\n",
+"rs=sqrt((w*u0)/(2*sig));//ohm\n",
+"lamr=spl/(fr*sqrt(er));\n",
+"x=(((a1*b1)/(c1^2))+((c1^2+a1^2)/(2*c1*a1))+((b1*c1)/a1^2));\n",
+"qw=(2*%pi*(eet/sqrt(er))*a1*b1*c1)/(rs*(lamr^3)*x);\n",
+"disp(qw,'Q for TE101 mode:');\n",
+"\n",
+"qd=1/tandel;\n",
+"q=(qw*qd)/(qw+qd);\n",
+"disp(q,'Q for lossy dielectric:');\n",
+"\n",
+"//Value of qw is calculated wrong in book as lamr comes to be 0.08 not 0.89 m\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Rectangular_resonator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 198\n",
+"//Example 4.9\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"a=2.286;//cm\n",
+"a1=a/100;//m\n",
+"b=1.106;//cm\n",
+"b1=b/100;//m\n",
+"\n",
+"//For fr1=9.3D+9;\n",
+"fr1=9.3D+9;//hz\n",
+"lamr1=c/fr1;//m\n",
+"c1=(2*a1)/sqrt((((2*a1)/lamr1)^2)-1);\n",
+"\n",
+"//For fr2=10.2D+9;\n",
+"fr2=10.2D+9;//hz\n",
+"lamr2=c/fr2;//m\n",
+"c2=(2*a1)/sqrt((((2*a1)/lamr2)^2)-1);\n",
+"\n",
+"r=c1-c2;\n",
+"disp('cm',r*100,'Range of piston movement:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/5-Microwave_Tubes_Klystrons.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/5-Microwave_Tubes_Klystrons.ipynb
new file mode 100644
index 0000000..9423a5e
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/5-Microwave_Tubes_Klystrons.ipynb
@@ -0,0 +1,893 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Microwave Tubes Klystrons"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10: Four_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 296\n",
+"//Example 5.10\n",
+"clc;\n",
+"//Given\n",
+"f=4D+9;//hz\n",
+"v0=10D+3;//V\n",
+"i0=0.75;//A\n",
+"v1=2; //V\n",
+"bet=1;\n",
+"rsh=10D+3;//ohm\n",
+"p=5D-5;//C/m^3\n",
+"r=0.6;\n",
+"rsht=4D+3;//ohm\n",
+"e=1.6D-19;\n",
+"m=9.1D-31;\n",
+"ee=8.854D-12;\n",
+"\n",
+"//(i) Induced current and voltage in output cavity\n",
+"w1=sqrt(e*p/(m*ee));//rad/sec\n",
+"w=2*%pi*f;\n",
+"wq=0.5*w1;//rad/sec\n",
+"rr=w/wq;\n",
+"\n",
+"i4=[(i0^3)*(rr^3)*(bet^6)*v1*(rsh^2)]/(8*(v0^3)); //A\n",
+"disp('A',i4,'Induced current:');\n",
+"v4=i4*rsht;//V\n",
+"disp('kV',v4/1000,'Induced voltage:');\n",
+"\n",
+"//(ii) Power output\n",
+"pout=(i4^4)*rsht;//W\n",
+"disp('W',pout,'Power output:');\n",
+"\n",
+"//Answer for Pout should be 13.43 kW but it is given as 10.89kW as value of I4 is calculated as 1.289 but it comes out to be 1.35\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: Reflex_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 297\n",
+"//Example 5.9\n",
+"clc;\n",
+"//Given\n",
+"f=8D+9;//hz\n",
+"v0=500;//V\n",
+"l=1.2;//mm\n",
+"l1=l/1000;//m\n",
+"rsh=18D+3;//ohm\n",
+"ebym=1.759D+11;\n",
+"ee=8.854D-12;\n",
+"\n",
+"//(i) Repeller voltage\n",
+"n=1+(3/4);\n",
+"v11=(ebym*n*n)/(8*(l1^2)*(f^2));\n",
+"vr=sqrt(v0/v11)-v0;\n",
+"disp('V',vr,'Repeller voltage:');\n",
+"\n",
+"//(ii) Required dc current\n",
+"v2=200;//V\n",
+"j1x=0.582;\n",
+"i=v2/(2*rsh*j1x);//A\n",
+"disp('mA',i*1000,'Required dc current:');\n",
+"\n",
+"//Answer for repeller voltage is calculated wrong in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: Reflex_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 298\n",
+"//Example 5.12\n",
+"clc;\n",
+"//Given\n",
+"f=9D+9;//hz\n",
+"v0=361;//V\n",
+"i0=30D-3;//A\n",
+"l=0.1;//cm\n",
+"l1=l/100;//m\n",
+"x=2.408;\n",
+"j1x=0.582;\n",
+"ebym=1.759D+11;\n",
+"\n",
+"//Maximum power output\n",
+"n=1;\n",
+"pout=2*i0*v0*x*j1x/(2*%pi*(n+(3/4)));//W\n",
+"disp('W',pout,'Maximum power output:');\n",
+"\n",
+"//Operating repeller voltage\n",
+"vr=((6.744D-6*sqrt(v0)*l1*f)/(n+(3/4)))-v0;//v\n",
+"disp('V',vr,'Operating repeller voltage:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: Reflex_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 298\n",
+"//Example 5.13\n",
+"clc;\n",
+"//Given\n",
+"f=9D+9;//hz\n",
+"v0=250;//V\n",
+"l=0.5;//cm\n",
+"l1=l/100;//m\n",
+"\n",
+"//Bandwidth\n",
+"n=3;\n",
+"df=(n+(3/4))/(6.774D-6*l1*sqrt(v0));//hz\n",
+"disp('Mhz',df/10^6,'Bandwidth:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14: Reflex_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 299\n",
+"//Example 5.14\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9;//hz\n",
+"v0=600;//V\n",
+"vr=250;//V\n",
+"ebym=1.759D+11;\n",
+"\n",
+"//Repeller space\n",
+"n=1;\n",
+"l=sqrt((ebym*(n+(3/4))^2*(vr+v0)^2)/(8*f^2*v0));//m\n",
+"disp('mm',l*1000,'Repeller space:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: Reflex_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 299\n",
+"//Example 5.15\n",
+"clc;\n",
+"//Given\n",
+"v0=300;//V\n",
+"i0=20D-3;//A\n",
+"v1=40;//V\n",
+"n=2;\n",
+"x=2.408;\n",
+"j1x=0.52;\n",
+"\n",
+"//(i) Input power\n",
+"pin=i0*v0;//W\n",
+"disp('W',pin,'Input power:');\n",
+"\n",
+"//(ii) Output power\n",
+"pout=(2*v0*i0*x*j1x)/((2*%pi*n)-(%pi/2));//W\n",
+"disp('W',pout,'Output power:');\n",
+"\n",
+"//Efficiency\n",
+"eet=pout/pin;\n",
+"disp('%',eet*100,'Efficiency:');\n",
+"\n",
+"//Answer for output power in book is 0.7 which is wrong, it should be 1.3W\n",
+"//Hence answer of efficiency also changes"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: Reflex_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 300\n",
+"//Example 5.16\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9;//hz\n",
+"v0=600;//V\n",
+"l=0.1;//cm\n",
+"l1=l/100;//m\n",
+"bet=0.9;\n",
+"ebym=1.759D+11;\n",
+"n=2;\n",
+"j1x=0.575;//from standard table\n",
+"\n",
+"\n",
+"//(i) Repeller voltage\n",
+"vr=((6.744D-6*sqrt(v0)*l1*f)/(n-(1/4)))-v0;//V\n",
+"disp('V',round(vr),'Repeller voltage:');\n",
+"\n",
+"//(ii) Bunching parameter\n",
+"v1=200;//V\n",
+"x=bet*v1*2*%pi*(n-(1/4))/(2*v0);\n",
+"disp(x,'Bunching parameter:');\n",
+"\n",
+"//(iii) Required DC current\n",
+"rsh=20D+3;//ohm\n",
+"i=v1/(2*rsh*j1x);//A\n",
+"disp('mA',i*1000,'Required DC current:');\n",
+"\n",
+"//(iv) Electronic efficiency\n",
+"eet=2*x*j1x/(2*%pi*(n-(1/4)));\n",
+"disp('%',eet*100,'Electronic efficiency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: Electron_Gun.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 301\n",
+"//Example 5.17\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9;//hz\n",
+"v0=300;//V\n",
+"j0=0.3;//A/cm\n",
+"i0=45D-3;//A\n",
+"\n",
+"rb=sqrt(i0/(%pi*j0));//mm\n",
+"disp('mm',rb*10,'Electron beam radius:');\n",
+"r=rb*(120/100);//mm\n",
+"disp('mm',r*10,'Radius of cathode disc:');\n",
+"d=sqrt(2.335D-6*(300)^(3/2)/j0);//mm\n",
+"disp('mm',d*10,'Cathode anode spacing:');\n",
+"//Anode hole has to be 15% larger than cathode disc\n",
+"ra=r*1.15;//mm\n",
+"disp('mm',ra*10,'Anode hole:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: Re_entrant_Coaxial_Cavity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number:\n",
+"//Example 5.18\n",
+"clc;\n",
+"//Given\n",
+"f=9D+9;//hz\n",
+"v0=300;//V\n",
+"vr=125;//V\n",
+"bet=0.9;\n",
+"c=3D+8; //m/s\n",
+"w=2*%pi*f;\n",
+"br=2.18;//mm\n",
+"e0=8.854D-12;\n",
+"ebym=1.7D+11;\n",
+"\n",
+"//From sin(theta)/theta table, thetag is found out to be\n",
+"thetag=0.25*%pi; \n",
+"d=(2*thetag*0.593D+6*sqrt(v0))/w;\n",
+"disp('mm',d*1000,'Distance:');\n",
+"\n",
+"//Axial cavity length\n",
+"l=c/(10*f);//m\n",
+"disp('mm',l*1000,'Axial cavity length:');\n",
+"\n",
+"//Ratio of outer to inner conductor\n",
+"a=1.5*br;\n",
+"a1=a/1000;\n",
+"x=d/(w*e0*a1*a1*60*tan((w*l)/c));\n",
+"bbya=exp(x);\n",
+"disp(bbya,'Ratio of outer to inner conductor:');\n",
+"\n",
+"//radii of outer and inner conductor\n",
+"disp('mm',a,'Radius of outer conductor:');\n",
+"\n",
+"b=1.52*a;//mm\n",
+"disp('mm',b,'Radius of inner conductor:');\n",
+"\n",
+"//Repeller spacing\n",
+"lopt=sqrt(ebym*(19/4)^2*(v0+vr)^2/(8*f^2*v0));//m\n",
+"disp('mm',lopt*1000,'Repeller spacing:');\n",
+"\n",
+"//Answer for radii of outer and inner conductor have wrong calculations in book\n",
+"//Also ratio of outer to inner conductor is also calculated wrong"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: Two_Cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 288\n",
+"//Example 5.1\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9; //Hz\n",
+"v=9D+3; //V\n",
+"i=40D-3; //A\n",
+"l=3; //cm\n",
+"l1=l/100; //m\n",
+"G=2D-6; //mho\n",
+"bet=0.92;\n",
+"j1x=0.582;\n",
+"x=1.841;\n",
+"ebym=1.7D+11; //J\n",
+"\n",
+"//Maximum voltage\n",
+"w=2*%pi*f;\n",
+"v0x=sqrt(2*ebym);\n",
+"thet=(w*l1)/(v0x*sqrt(v));\n",
+"\n",
+"av=(bet^2*thet*i*j1x)/(x*v*G);\n",
+"disp('V',av,'Maximum voltage:');\n",
+"\n",
+"//Power Gain\n",
+"ic=2*i*j1x;\n",
+"v2=(bet*ic)/G;\n",
+"pout=bet*ic*v2;\n",
+"pin=2*i*v;\n",
+"\n",
+"//Efficiency\n",
+"eet=pout/pin;\n",
+"disp('%',eet*100,'Power gain:');\n",
+"\n",
+"//Answer for effciency comes out to be wrong, it is calculted wrongly in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: Two_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 288\n",
+"//Example 5.2\n",
+"clc;\n",
+"//Given\n",
+"l=2; //cm\n",
+"l1=l/100;//m\n",
+"f=5D+9; //Hz\n",
+"i=25D-3; //A\n",
+"n=21/4; \n",
+"e=1.6D-19;\n",
+"m=9.1D-31;\n",
+"thetag=0;\n",
+"bet=1;\n",
+"j1x=0.582;\n",
+"x=1.841;\n",
+"\n",
+"//(i) Beam Voltage\n",
+"v0=(m*l1*l1*f*f)/(2*e*n*n);\n",
+"disp('V',v0,'Beam voltage:');\n",
+"\n",
+"//(ii) Input voltage\n",
+"v1=x*v0/(%pi*bet*n);\n",
+"disp('V',v1,'Input voltage:');\n",
+"\n",
+"//(iii) Output voltage\n",
+"v2=0.25*v0;\n",
+"disp('V',v2,'Output voltage');\n",
+"\n",
+"//(iv) Power output\n",
+"pmax=i*v0*j1x;\n",
+"disp('W',pmax,'Maximum power output:');\n",
+"\n",
+"//(v) Efficiency\n",
+"eet=j1x*bet*v2/v0;\n",
+"disp('%',eet*100,'Efficiency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: Two_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 289\n",
+"//Example 5.3\n",
+"clc;\n",
+"//Given\n",
+"r0=45D+3; //W\n",
+"j0=25D-3; //A\n",
+"V=1500; //V\n",
+"f=5D+9; //hz\n",
+"d=1; //mm\n",
+"d1=d/1000; //m\n",
+"l=3.5; //cm\n",
+"l1=l/100; //m\n",
+"rsh=32D+3; //ohms\n",
+"j1x=0.582;\n",
+"x=1.841;\n",
+"\n",
+"//(i) Input gap voltage\n",
+"w=2*%pi*f;\n",
+"v0=(5.93D+5*sqrt(V));\n",
+"thetag=(w*d1)/v0;\n",
+"bet=sin(thetag/2)/(thetag/2);\n",
+"theta0=(w*l1)/v0;\n",
+"v1=(2*V*x)/(bet*theta0);\n",
+"disp(v1,'Input gap voltage:');\n",
+"\n",
+"//(ii) Voltage gain\n",
+"av=(bet^2*theta0*j1x*rsh)/(r0*x);\n",
+"disp(av,'Voltage gain:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: Two_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 290\n",
+"//Example 5.4\n",
+"clc;\n",
+"//Given\n",
+"V=1000; //V\n",
+"r0=40D+3; //ohm\n",
+"i0=25D-3; //A\n",
+"f=3D+9; //Hz\n",
+"d=1; //mm\n",
+"d1=d/1000; //m\n",
+"l=4; //cm \n",
+"l1=4/100; //m\n",
+"j1x=0.582;\n",
+"x=1.841;\n",
+"rsh=30D+3; //ohm\n",
+"\n",
+"//(i) Input gap voltage\n",
+"w=2*%pi*f;\n",
+"v0=(5.93D+5*sqrt(V));\n",
+"thetag=(w*d1)/v0;\n",
+"bet=sin(thetag/2)/(thetag/2);\n",
+"theta0=(w*l1)/v0;\n",
+"vmax=(2*V*x)/(bet*theta0);\n",
+"disp('V',vmax,'Input gap voltage:');\n",
+"\n",
+"//(ii) Voltage gain\n",
+"av=(bet*bet*theta0*j1x*rsh)/(r0*x);\n",
+"disp(av,'Voltage gain:');\n",
+"\n",
+"//(iii) Efficiency\n",
+"v2=bet*2*i0*j1x*rsh;\n",
+"eet=(bet*2*i0*j1x*v2)/(2*i0*V);\n",
+"disp('%',eet*100,'Efficiency:');\n",
+"\n",
+"//(iv) Beam loading conductance\n",
+"gbl=(i0/(2*V))*((bet*bet)-(bet*cos(thetag/2)));\n",
+"disp(gbl,'Beam loading conductance:');\n",
+"\n",
+"//Ansewr for beam loading conductance is calculated wrong in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: Two_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 291\n",
+"//Example 5.5\n",
+"clc;\n",
+"//Given\n",
+"f=3D+9; //hz\n",
+"v=900; //V\n",
+"i=30D-3; //A\n",
+"d=4; //cm\n",
+"d1=d/100; //m\n",
+"gap=1; //mm\n",
+"gap1=1/1000; //m\n",
+"rsh=40D+3; //ohm\n",
+"x=1.841;\n",
+"j1x=0.582;\n",
+"r=40D+3; //ohm\n",
+"ebym=1.758D+11; //J\n",
+"\n",
+"//(i) Electron velocity\n",
+"v0=sqrt(2*ebym*v);\n",
+"disp('m/s',v0,'Electron velocity:');\n",
+"\n",
+"//(ii) Electron transit time\n",
+"t=d1/v0;\n",
+"disp('s',t,'Electron transit time:');\n",
+"\n",
+"//(iii) Input voltage gap\n",
+"w=2*%pi*f;\n",
+"theta0=(w*d1)/v0;\n",
+"thetag=(w*gap1)/v0;\n",
+"bet=sin(thetag/2)/(thetag/2);\n",
+"v2=(2*v*x)/(bet*theta0);\n",
+"disp('V',v2,'Input voltage gap:');\n",
+"\n",
+"//(iv) Voltage gain\n",
+"av=(bet^2*theta0*j1x*rsh)/(x*r);\n",
+"disp(av,'Voltage gain:');\n",
+"\n",
+"//Values of v and f are changed in question and answer, hence vaules used in answer are taken.\n",
+"//Also second part has not been done in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: Two_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 292\n",
+"//Example 5.6\n",
+"clc;\n",
+"//Given\n",
+"f=8D+9; //hz\n",
+"i=2.5; //A\n",
+"v=20D+3; //V\n",
+"bet=1;\n",
+"amp=10*sqrt(2); //V\n",
+"rsh=10D+3; //ohm\n",
+"rsho=30D+3; //ohm\n",
+"dc=1D-6; //c/m^3\n",
+"rf=0.5;\n",
+"e=1.6D-19;\n",
+"ee=8.854D-12;\n",
+"m=9.1D-31; //kg\n",
+"\n",
+"//(i) Induced current\n",
+"w=2*%pi*f;\n",
+"wq=rf*sqrt((e*dc)/(m*ee));\n",
+"\n",
+"//Amplitude of induced current\n",
+"ic=(i*w*(bet^2)*amp)/(2*v*wq);\n",
+"disp('A',ic,'Induced current:');\n",
+"\n",
+"//Induced voltage\n",
+"icrms=ic/sqrt(2);\n",
+"v2rms=icrms*rsho;\n",
+"disp('V',v2rms,'Induced voltage:');\n",
+"\n",
+"//(ii) Power gain\n",
+"pg=(((i*w)^2)*(bet^4)*rsh*rsho)/(4*((v*wq)^2));\n",
+"pgdb=10*log10(pg);\n",
+"disp('dB',pgdb,'Power gain:');\n",
+"\n",
+"//(iii) Electronic efficiency\n",
+"eeta=((icrms^2)*rsho)/(i*v);\n",
+"disp('%',eeta*100,'Electronic efficiency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: Two_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 294\n",
+"//Example 5.7\n",
+"clc;\n",
+"//Given\n",
+"f=3D+9; //hz\n",
+"l=4; //cm\n",
+"l1=4/100; //m\n",
+"d=0.1; //cm\n",
+"d1=d/100; //m\n",
+"V=900; //V\n",
+"i0=30D-3; //A\n",
+"rsh=25D+3;//ohm\n",
+"x=1.841;\n",
+"j1x=0.582;\n",
+"\n",
+"//(i) Input voltage for maximum output\n",
+"v0=0.593D+6*sqrt(V);\n",
+"w=2*%pi*f;\n",
+"theta0=w*l1/v0; //rad\n",
+"thetag=w*d1/v0; //rad\n",
+"bet=sin(thetag/2)/(thetag/2);\n",
+"v1max=2*V*x/(bet*theta0); //v\n",
+"disp('V',v1max,'Input voltage for maximum output:');\n",
+"\n",
+"//(ii) Voltage gain\n",
+"r0=V/i0;//ohm\n",
+"av=((bet^2)*theta0*j1x*rsh)/(x*r0);//V\n",
+"disp('V',av,'Voltage gain:');\n",
+"\n",
+"//(iii) Efficiency\n",
+"ic=2*i0*j1x; //A\n",
+"v2=bet*ic*rsh; //V\n",
+"eet=bet*ic*v2/(2*i0*V);\n",
+"disp('%',eet*100,'Efficiency:');\n",
+"\n",
+"//(iv) Beam loading conductance\n",
+"gb=(i0/(V*2))*(bet^2-(bet*cos(thetag/2)));//ohm\n",
+"disp('ohm',gb,'Beam loading conductance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: Two_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 295\n",
+"//Example 5.8\n",
+"clc;\n",
+"//Given\n",
+"f=5D+9; //hz\n",
+"v0=10D+3; //V\n",
+"d=1; //mm\n",
+"d1=d/1000; //m\n",
+"v1=100; //V\n",
+"\n",
+"//(i) Gap transit time\n",
+"vv0=0.593D+6*sqrt(v0);//m/sec\n",
+"tau=d1/vv0;//sec\n",
+"disp('sec',tau,'Gap transit time:');\n",
+"\n",
+"//Gap transit angle\n",
+"w=2*%pi*f;\n",
+"thetag=w*tau;//rad\n",
+"disp('rad',thetag,'Gap transit angle:');\n",
+"\n",
+"//(ii) Beam coupling coefficient\n",
+"betin=sin(thetag/2)/(thetag/2);\n",
+"disp(betin,'Beam coupling coefficient:');\n",
+"\n",
+"//(iii) Velocity of electron leaving buncher gap\n",
+"vig=vv0*(1+((betin*v1)/(2*v0)));//m/sec\n",
+"disp('m/sec',vig,'Velocity of electron leaving buncher gap:');\n",
+"\n",
+"//(iv) Depth of modulation\n",
+"m=betin*v1/v0;\n",
+"disp(m,'Depth of modulation:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: Four_cavity_Klystro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 296\n",
+"//Example 5.9\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9; //hz\n",
+"v0=15D+3; //V\n",
+"i0=2.5D-3; //A\n",
+"d=1; //cm\n",
+"d1=d/100; //m\n",
+"vrms=10; //V\n",
+"bet=1;\n",
+"p=1D-8; //C/m^3\n",
+"rf=0.6;\n",
+"e=1.6D-19;\n",
+"m=9.1D-31;\n",
+"ee=8.854D-12;\n",
+"\n",
+"//(i) DC electron beam phase cobstant\n",
+"vv0=(0.593D+6*sqrt(v0));\n",
+"w=2*%pi*f;\n",
+"bete=w/vv0; //rad/m\n",
+"disp('rad/m',bete,'DC electron beam phase constant:');\n",
+"\n",
+"//(ii) Reduced plasma frequency and reduced plasma phase constant\n",
+"wq=rf*sqrt(e*p/(m*ee));//rad/m\n",
+"disp('rad/m',wq,'Reduced plasma frequency:');\n",
+"betq=wq/vv0;//rad/sec\n",
+"disp('rad/sec',betq,'Reduced plasma phase constant:');\n",
+"\n",
+"//(iii) Gap transit time\n",
+"tau=d1/vv0;//sec\n",
+"vtg=vv0*(1+(bet*vrms*sin(w*tau)/(2*v0)));//m/sec\n",
+"disp('m/sec',vtg,'Gap transit time:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/6-Microwave_Travelling_Wave_Tubes_O_type.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/6-Microwave_Travelling_Wave_Tubes_O_type.ipynb
new file mode 100644
index 0000000..6e0be7a
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/6-Microwave_Travelling_Wave_Tubes_O_type.ipynb
@@ -0,0 +1,504 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Microwave Travelling Wave Tubes O type"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: Low_Power_TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 335\n",
+"//Example 6.10\n",
+"clc;\n",
+"//Given\n",
+"Pout=250; //W\n",
+"n=0.15;\n",
+"V0=7.5D+3; //V\n",
+"f=6.15D+9; //Hz\n",
+"c=3D+8; //m/s\n",
+"\n",
+"//(i) Input Power\n",
+"Pi=Pout/n;\n",
+"disp('W',Pi,'Input Power:');\n",
+"\n",
+"//(ii) Beam current\n",
+"I0=Pi/V0;\n",
+"disp('A',I0,'Beam current:');\n",
+"\n",
+"//(iii) Beam velocity\n",
+"vb=0.593D+6*sqrt(V0);\n",
+"disp('m/s',vb,'Beam velocity:');\n",
+"\n",
+"//(iv) Radius of helix\n",
+"a=(2*vb)/(2*%pi*f);\n",
+"disp('m',a,'Radius of helix:');\n",
+"\n",
+"//(v) Electron beam radius\n",
+"r=(3*a)/4;\n",
+"disp('m',r,'Electron beam radius:');\n",
+"\n",
+"//(vi) Pitch of helix\n",
+"p=(2*%pi*a*vb)/c;\n",
+"disp('m',p,'Pitch of helix:');\n",
+"\n",
+"//(vii) Current density\n",
+"J0=I0/(%pi*r*r);\n",
+"disp('kA/msqr',J0/1000,'Current density:');\n",
+"\n",
+"//(viii) Magnetic field for beam confinement\n",
+"B=(4*8.3D-4*sqrt(I0/(r*r*sqrt(V0))));\n",
+"disp('mT',round(B*1000),'Magnetic field for beam confinement:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 336\n",
+"//Example 6.11\n",
+"clc;\n",
+"//Given\n",
+"I0=30D-3; //A\n",
+"V0=3D+3; //V\n",
+"Z0=10; //ohm\n",
+"l=0.1624; //m\n",
+"f=10D+9; //Hz\n",
+"C=((I0*Z0)/(4*V0))^(1/3);\n",
+"N=(l*f)/(0.593D+6*sqrt(V0));\n",
+"\n",
+"//Gain\n",
+"Ap=-9.54+(47.3*C*N);\n",
+"disp('dB',Ap,'Gain:');\n",
+"\n",
+"ve=0.593D+6*sqrt(V0);\n",
+"be=(2*%pi*f)/ve;\n",
+"\n",
+"//Four propogation constants\n",
+"gam1=((-sqrt(3)*be*C)/2)+(%i*be*(2+C))/2;\n",
+"gam2=((sqrt(3)*be*C)/2)+(%i*be*(2+C))/2;\n",
+"gam3=%i*be*(1-C);\n",
+"gam4=-%i*be*(1-((C*C*C)/4));\n",
+"\n",
+"disp(gam4,gam3,gam2,gam1,'Four propogation constants:');\n",
+"\n",
+"//Calculations for propogation constants are wrong for gam 3 and 4 hence answers dont match"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12: TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 337\n",
+"//Example 6.12\n",
+"clc;\n",
+"//Given\n",
+"I0=35D-3; //A\n",
+"V0=4D+3; //V\n",
+"Z0=20; //ohm\n",
+"f=10D+9; //Hz\n",
+"\n",
+"//(i) Gain parameter\n",
+"C=((I0*Z0)/(4*V0))^(1/3);\n",
+"disp(C,'Gain parameter:');\n",
+"\n",
+"ve=0.593D+6*sqrt(V0);\n",
+"be=(2*%pi*f)/ve;\n",
+"\n",
+"//Four propogation constants\n",
+"gam1=((-sqrt(3)*be*C)/2)+(%i*be*(2+C))/2;\n",
+"gam2=((sqrt(3)*be*C)/2)+(%i*be*(2+C))/2;\n",
+"gam3=%i*be*(1-C);\n",
+"gam4=-%i*be*(1-((C*C*C)/4));\n",
+"\n",
+"disp(gam4,gam3,gam2,gam1,'Four propogation constants:');\n",
+"\n",
+"//Calculations for propogation constants are wrong hence answers dont match"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 330\n",
+"//Example 6.1\n",
+"clc;\n",
+"//Given\n",
+"clc;\n",
+"//Given\n",
+"I0=30D-3; //A\n",
+"V0=3D+3; //V\n",
+"Z0=10; //ohm\n",
+"l=0.1624; //m\n",
+"f=10D+9; //Hz\n",
+"\n",
+"//(i) Gain parameter\n",
+"C=((I0*Z0)/(4*V0))^(1/3);\n",
+"disp(C,'Gain parameter:');\n",
+"\n",
+"N=(l*f)/(0.593D+6*sqrt(V0));\n",
+"\n",
+"//(ii) Power Gain\n",
+"Ap=-9.54+(47.3*C*N);\n",
+"disp('dB',Ap,'Power gain:');\n",
+"\n",
+"ve=0.593D+6*sqrt(V0);\n",
+"be=(2*%pi*f)/ve;\n",
+"\n",
+"//Four propogation constants\n",
+"gam1=((-sqrt(3)*be*C)/2)+(%i*be*(2+C))/2;\n",
+"gam2=((sqrt(3)*be*C)/2)+(%i*be*(2+C))/2;\n",
+"gam3=%i*be*(1-C);\n",
+"gam4=-%i*be*(1-((C*C*C)/4));\n",
+"\n",
+"disp(gam4,gam3,gam2,gam1,'Four propogation constants:');\n",
+"\n",
+"//Calculations for propogation constants are wrong in book for gam 3 and 4, hence answers dont match"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Helix_TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 332\n",
+"//Example 6.2\n",
+"clc;\n",
+"//Given\n",
+"I0=20D-3; //A\n",
+"V0=4D+3; //V\n",
+"Z0=100; //ohm\n",
+"N=30;\n",
+"\n",
+"C=((I0*Z0)/(4*V0))^(1/3);\n",
+"//Gain\n",
+"Ap=-9.54+(47.3*C*N);\n",
+"disp('dB',Ap,'Gain:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Helical_TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 332\n",
+"//Example 6.3\n",
+"clc;\n",
+"//Given\n",
+"c=3D+8; //m/s\n",
+"d=2D-3; //m\n",
+"p=50D+2; //turns per m\n",
+"e=1.6D-19; //J\n",
+"m=9.1D-31;\n",
+"\n",
+"// Axial phase velocity\n",
+"vp=c/(%pi*p*d);\n",
+"disp('m/s',vp,'Axial phase velocity:');\n",
+"\n",
+"//Anode voltage\n",
+"V0=(m*vp*vp)/(2*e);\n",
+"disp('V',V0,'Anode voltage:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: O_type_TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 332\n",
+"//Example 6.4\n",
+"clc;\n",
+"//Given\n",
+"a=(4.4*%pi)/180; //radians\n",
+"c=3D+8 //m/s\n",
+"f=8D+9; //Hz\n",
+"al=2; //Np/m\n",
+"\n",
+"//Phase velocity\n",
+"vp=c*sin(a);\n",
+"\n",
+"//Propogation constant\n",
+"be=(2*%pi*f)/vp;\n",
+"\n",
+"gam=al+(%i*be);\n",
+"disp(gam,'Propogation constant:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: Cavity_coupled.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 333\n",
+"//Example 6.5\n",
+"clc;\n",
+"//Given\n",
+"Vc=11D+3; //V\n",
+"Ir=0.85; //A\n",
+"V0=31D+3; //V\n",
+"Pout=50D+3; //W\n",
+"I=7; //A\n",
+"\n",
+"//Electronic efficiency\n",
+"ne=Pout/(V0*I);\n",
+"disp('%',ne*100,'Electronic efficiency:');\n",
+"\n",
+"//Overall efficiency\n",
+"no=Pout/(Vc*(I-Ir));\n",
+"disp('%',no*100,'Overall efficiency:');\n",
+"\n",
+"//Answer for elecytronic efficiency should be 23.04% but it is given as 36.4 in book"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: O_Type_Backward_Wave_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 333\n",
+"//Example 6.6\n",
+"clc;\n",
+"//Given\n",
+"I0=0.95; //A\n",
+"V0=7D+3; //V\n",
+"Z0=20; //ohm\n",
+"N=20;\n",
+"\n",
+"C=((I0*Z0)/(4*V0))^(1/3);\n",
+"//Gain\n",
+"Ap=-9.54+(47.3*C*N);\n",
+"disp('dB',Ap,'Gain:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: Multicavity_TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 334\n",
+"//Example 6.7\n",
+"clc;\n",
+"//Given\n",
+"Vc=12D+3; //V\n",
+"V0=30D+3; //V\n",
+"Pout=60D+3; //W\n",
+"I=7.5; //A\n",
+"\n",
+"//Electronic efficiency\n",
+"ne=Pout/(V0*I);\n",
+"disp('%',ne*100,'Electronic efficiency:');\n",
+"\n",
+"//Overall efficiency\n",
+"no=Pout/(Vc*I);\n",
+"disp('%',no*100,'Overall efficiency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: Gridded_TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 334\n",
+"//Example 6.8\n",
+"clc;\n",
+"//Given\n",
+"Vc=20D+3; //V\n",
+"V0=32D+3; //V\n",
+"Pout=75D+3; //W\n",
+"I=7; //A\n",
+"\n",
+"//Electronic efficiency\n",
+"ne=Pout/(V0*I);\n",
+"disp('%',ne*100,'Electronic efficiency:');\n",
+"\n",
+"//Overall efficiency\n",
+"no=Pout/(Vc*I);\n",
+"disp('%',no*100,'Overall efficiency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: Helix_TWT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 335\n",
+"//Example 6.9\n",
+"clc;\n",
+"//Given\n",
+"I0=500D-3; //A\n",
+"V0=10D+3; //V\n",
+"Z0=25; //ohm\n",
+"l=.20; //m\n",
+"f=5.93D+9; //Hz\n",
+"\n",
+"//Gain parameter\n",
+"C=((I0*Z0)/(4*V0))^(1/3);\n",
+"disp(C,'Gain parameter:');\n",
+"\n",
+"N=(l*f)/(0.593D+6*sqrt(V0));\n",
+"//Gain\n",
+"Ap=-9.54+(47.3*C*N);\n",
+"disp('dB',Ap,'Gain of TWT:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/7-Cross_Field_Microwave_Tubes_M_Type.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/7-Cross_Field_Microwave_Tubes_M_Type.ipynb
new file mode 100644
index 0000000..c58214c
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/7-Cross_Field_Microwave_Tubes_M_Type.ipynb
@@ -0,0 +1,574 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Cross Field Microwave Tubes M Type"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10: Inverted_coaxial_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 376\n",
+"//Example 7.10\n",
+"clc;\n",
+"//Given\n",
+"V0=10D+3; //V\n",
+"I0=2; //A\n",
+"b=4D-2; //m\n",
+"a=3D-2; //m\n",
+"B0=0.01; //Wb/m2\n",
+"ebym=1.759D+11;\n",
+"\n",
+"//Cut off voltage\n",
+"x=1-((b*b)/(a*a));\n",
+"V=(ebym*(B0^2)*(a^2)*(x^2))/8;\n",
+"disp('KV',V/1000,'Cut off voltage:');\n",
+"\n",
+"//Magnetic flux density\n",
+"y=-sqrt((8*V0)/ebym);\n",
+"B=y/(a*x);\n",
+"disp('T',B,'Magnetic flux density:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11: Linear_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 376\n",
+"//Example 7.11\n",
+"clc;\n",
+"//Given\n",
+"e=1.6D-19; //J\n",
+"B0=0.01; //Wb/m2\n",
+"d=6D-2; //m\n",
+"V0=20D+3; //V\n",
+"ebym=1.759D+11;\n",
+"\n",
+"//(i) Hull cut off voltage\n",
+"Voc=(B0*B0*d*d*ebym)/2;\n",
+"disp('KV',Voc/1000,'Hull cut off voltage:');\n",
+"\n",
+"//(ii) Hull magnetic field\n",
+"Boc=sqrt((2*V0)/ebym)/d;\n",
+"disp('mT',Boc*1000,'Hull magnetic field:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.12: Inverted_Coaxial_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 377\n",
+"//Example 7.12\n",
+"clc;\n",
+"//Given\n",
+"V0=10D+3; //V\n",
+"V01=5D+3; //V\n",
+"I0=2; //A\n",
+"b=3D-2; //m\n",
+"a=2D-2; //m\n",
+"B0=0.01; //Wb/m2\n",
+"ebym=1.759D+11;\n",
+"\n",
+"//Cut off voltage\n",
+"x=1-((b*b)/(a*a));\n",
+"V=(ebym*(B0^2)*(a^2)*(x^2))/8;\n",
+"KV=V/1000; //Kilovolts\n",
+"disp('KV',KV,'Cut off voltage:');\n",
+"\n",
+"//Magnetic flux density\n",
+"y=-sqrt((8*V01)/ebym);\n",
+"B=y/(a*x);\n",
+"disp('Wb/m2',B,'Magnetic flux density:');\n",
+"\n",
+"//Answer in book is wrong for Magnetic flux density as a*a ,where a=2, is taken as 5, which should be 4"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.13: Agile_coaxial_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 377\n",
+"//Example 7.13\n",
+"clc;\n",
+"//Given\n",
+"N=15;\n",
+"t=0.3D-6; //s\n",
+"DC=0.0011; //Duty cycle\n",
+"\n",
+"//(i) Agile excursion\n",
+"A=N/t;\n",
+"disp('MHz',A/10^6,'Agile excursion:');\n",
+"\n",
+"//(ii) Pulse to pulse frequency seperation\n",
+"fp=1/t;\n",
+"disp('Mhz',fp/10^6,'Pulse to pulse frequency seperation:');\n",
+"\n",
+"//(iii) Signal frequency\n",
+"f=DC/t;\n",
+"disp('Khz',f/1000,'Signal frequency:');\n",
+"\n",
+"//(iv) Agile rate\n",
+"Tp=N/f;\n",
+"R=1/(2*Tp);\n",
+"disp('ps',R,'Agile Rate:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: X_band_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 369\n",
+"//Example 7.1\n",
+"clc;\n",
+"//Given\n",
+"f=10D+9; //Hz\n",
+"C=2.5D-12; //F\n",
+"Gr=2D-4; //mho\n",
+"Ge=0.025D-3; //mho\n",
+"Ploss=18.5D+3; //W\n",
+"V0=5.5D+3; //V\n",
+"I0=4.5; //A\n",
+"\n",
+"w=2*%pi*f;\n",
+"\n",
+"//(i) Unloaded Q\n",
+"Qun=(w*C)/Gr;\n",
+"disp(Qun,'Unloaded quality factor:');\n",
+"\n",
+"//External Q\n",
+"Qe=(w*C)/Ge;\n",
+"disp(Qe,'External quality factor:');\n",
+"\n",
+"//(ii) Circuit effciency\n",
+"n=1/(1+(Qe/Qun));\n",
+"disp('%',n*100,'Circuit effciency:');\n",
+"\n",
+"//Electronic effciency\n",
+"ne=1-(Ploss/(V0*I0));\n",
+"disp('%',ne*100,'Electronic effciency:');\n",
+"\n",
+"//Answer for Qe is given as 6285.6 but it should be 6283.1 "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: Cylindrical_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 370\n",
+"//Example 7.2\n",
+"clc;\n",
+"//Given\n",
+"V0=25D+3; //V\n",
+"ebym=1.76D+11;\n",
+"B0=0.0336; //T\n",
+"a=5D-2; //m\n",
+"b=10D-2; //m\n",
+"\n",
+"//(i) Cut off voltage\n",
+"x=(b/((b*b)-(a*a)))^2;\n",
+"V=(ebym*B0*B0)/(8*x);\n",
+"disp('KV',V/1000,'Cut off voltage:');\n",
+"\n",
+"//(ii) Cut off magnetic field\n",
+"y=((8*V0*x)/ebym);\n",
+"B=sqrt(y);\n",
+"disp('mT',B*1000,'Cut off magnetic field:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: Cylindrical_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 371\n",
+"//Example 7.3\n",
+"clc;\n",
+"//Given\n",
+"Pout=250D+3; //W\n",
+"V0=25D+3; //V\n",
+"I0=25; //A\n",
+"ebym=1.76D+11;\n",
+"B0=0.035; //T\n",
+"a=4D-2; //m\n",
+"b=8D-2; //m\n",
+"\n",
+"\n",
+"//(i) Efficiency\n",
+"n=Pout/(V0*I0);\n",
+"disp('%',n*100,'Efficiency:');\n",
+"\n",
+"//(ii) Cyclotron frequency\n",
+"f=(ebym*B0)/(2*%pi);\n",
+"disp('Ghz',f/10^9,'Cyclotron frequency:');\n",
+"\n",
+"//(iii) Cut off magnetic field\n",
+"x=(b/((b*b)-(a*a)))^2;\n",
+"y=((8*V0*x)/ebym);\n",
+"B=sqrt(y);\n",
+"disp('mT',B*1000,'Cut off magnetic field:');\n",
+"\n",
+"//(iv) Cut off voltage\n",
+"V=(ebym*B0*B0)/(8*x);\n",
+"disp('KV',round(V/1000),'Cut off voltage:');\n",
+"\n",
+"//Answer for Cyclotron frequency is is given as 9.8GHz but it should be 0.98 GHz as value of B0=0.035 not 0.35 as taken in part 2"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: Conventional_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 372\n",
+"//Example 7.4\n",
+"clc;\n",
+"//Given\n",
+"Gr=3D-4; //mho\n",
+"Ge=3D-5; //mho\n",
+"Ploss=200D+3; //W\n",
+"V0=22D+3; //V\n",
+"I0=28; //A\n",
+"\n",
+"//(i) Circuit effciency\n",
+"n=1/(1+(Gr/Ge));\n",
+"disp('%',n*100,'Circuit effciency:');\n",
+"\n",
+"//(ii) Electronic effciency\n",
+"ne=1-(Ploss/(V0*I0));\n",
+"disp('%',ne*100,'Electronic effciency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: Conventional_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 372\n",
+"//Example 7.5\n",
+"clc;\n",
+"//Given\n",
+"f=9D+9; //Hz\n",
+"C=2.5D-12; //F\n",
+"Gr=2D-4; //mho\n",
+"Ge=2.5D-5; //mho\n",
+"Ploss=18.5D+3; //W\n",
+"V0=5.5D+3; //V\n",
+"I0=4.5; //A\n",
+"\n",
+"//(i) Angular resonant frequency\n",
+"w=2*%pi*f;\n",
+"disp('rad/s',w,'Angular resonant frequency:');\n",
+"\n",
+"//(ii) Unloaded Q\n",
+"Qun=round((w*C)/Gr);\n",
+"disp(Qun,'Unloaded quality factor:');\n",
+"\n",
+"//(iii) Loaded Q\n",
+"Ql=round((w*C)/(Gr+Ge));\n",
+"disp(Ql,'Loaded quality factor:');\n",
+"\n",
+"//(iv) External Q\n",
+"Qe=(w*C)/Ge;\n",
+"disp(Qe,'External quality factor:');\n",
+"\n",
+"//(v) Circuit effciency\n",
+"n=1/(1+(Qe/Qun));\n",
+"disp('%',n*100,'Circuit effciency:');\n",
+"\n",
+"//(vi) Electronic effciency\n",
+"ne=1-(Ploss/(V0*I0));\n",
+"disp('%',ne*100,'Electronic effciency:');\n",
+"\n",
+"//Answer for external Q is given as 56.57 but it should be 5654.8"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: Carcinotron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 373\n",
+"//Example 7.6\n",
+"clc;\n",
+"//Given\n",
+"f=4D+9; //Hz\n",
+"V0=25D+3; //V\n",
+"I0=3; //A\n",
+"B0=0.3; //T\n",
+"D=0.8;\n",
+"Z0=50; //ohm\n",
+"ebym=1.76D+11;\n",
+"\n",
+"//(i) Electron beam phase constant\n",
+"be=(2*%pi*f)/sqrt(2*ebym*V0);\n",
+"disp('rad/s',be,'Electron beam phase constant:');\n",
+"\n",
+"//(ii) Gain Parameter\n",
+"C=((I0*Z0)/(4*V0))^(1/3);\n",
+"disp(C,'Gain Parameter:');\n",
+"\n",
+"//(iii) Length for oscillation condition\n",
+"N=1.25/D;\n",
+"l=(2*%pi*N)/be;\n",
+"disp('m',l,'Length for oscillation condition:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: Frequency_Aglile_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 374\n",
+"//Example 7.7\n",
+"clc;\n",
+"//Given\n",
+"N=20;\n",
+"t=0.2D-6; //s\n",
+"DC=0.001; //Duty cycle\n",
+"\n",
+"//(i) Agile excursion\n",
+"A=N/t;\n",
+"disp('MHz',A/10^6,'Agile excursion:');\n",
+"\n",
+"//(ii) Signal frequency\n",
+"f=DC/t;\n",
+"disp('Khz',f/1000,'Signal frequency:');\n",
+"\n",
+"//(iii) Agile rate\n",
+"R=f/(2*N);\n",
+"disp('Hz',R,'Agile Rate:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: Cross_field_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 375\n",
+"//Example 7.8\n",
+"clc;\n",
+"//Given\n",
+"V0=1.8D+3; //V\n",
+"I0=1.3; //A\n",
+"Pin=70; //W\n",
+"n=0.22;\n",
+"\n",
+"//(i) Power generated\n",
+"Pgen=n*I0*V0;\n",
+"disp('W',Pgen,'Power generated:');\n",
+"\n",
+"//(ii) Total RF power generated\n",
+"Pt=Pin+Pgen;\n",
+"disp('W',Pt,'Total RF power generated:');\n",
+"\n",
+"//(iii) Power gain\n",
+"G=Pt/Pin;\n",
+"Gdb=10*log10(G);\n",
+"disp('dB',Gdb,'Power Gain:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9: Inverted_coaxial_Magnetron.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 375\n",
+"//Example 7.9\n",
+"clc;\n",
+"//Given\n",
+"V0=10D+3; //V\n",
+"I0=2; //A\n",
+"b=4D-2; //m\n",
+"a=3D-2; //m\n",
+"B0=0.01; //Wb/m2\n",
+"ebym=1.759D+11;\n",
+"\n",
+"//Cut off voltage\n",
+"x=1-((b*b)/(a*a));\n",
+"V=(ebym*(B0^2)*(a^2)*(x^2))/8;\n",
+"KV=V/1000; //Kilovolts\n",
+"disp('KV',KV,'Cut off voltage:');\n",
+"\n",
+"//Magnetic flux density\n",
+"y=-sqrt((8*V0)/ebym);\n",
+"B=y/(a*x);\n",
+"disp('T',B,'Magnetic flux density:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/8-Microwave_Solid_State_Control_Devices.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/8-Microwave_Solid_State_Control_Devices.ipynb
new file mode 100644
index 0000000..9a6720b
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/8-Microwave_Solid_State_Control_Devices.ipynb
@@ -0,0 +1,468 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Microwave Solid State Control Devices"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10: 3_phase_CCD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 434\n",
+"//Example 8.10\n",
+"clc;\n",
+"//Given\n",
+"Qmax=0.05D-12; //C\n",
+"f=10D+6; //Hz\n",
+"V=10; //V\n",
+"n=3;\n",
+"\n",
+"//Power disspated per bit\n",
+"P=n*f*V*Qmax;\n",
+"disp('muW',P*10^6,'Power disspated per bit:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.11: Surface_channel_CCD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 434\n",
+"//Example 8.11\n",
+"clc;\n",
+"//Given\n",
+"e0=8.854D-12;\n",
+"er=3.9;\n",
+"d=0.15D-6; //m\n",
+"e=1.6D-19; //J\n",
+"Nmax=2.2D+16; //m-2\n",
+"A=0.6D-8; //m\n",
+"P=0.67D-3; //W\n",
+"n=3;\n",
+"\n",
+"//(i) Junction capacitance\n",
+"Ci=(e0*er)/d;\n",
+"\n",
+"//Gate voltage\n",
+"V=(Nmax*e)/Ci;\n",
+"disp('V',V,'Gate voltage:');\n",
+"\n",
+"//(ii) Charge stored\n",
+"Qmax=Nmax*e*A;\n",
+"\n",
+"//Clock frequency\n",
+"f=P/(n*V*Qmax);\n",
+"disp('MHz',f/10^6,'Clock frequency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.12: 3_phase_CCD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 435\n",
+"//Example 8.12\n",
+"clc;\n",
+"//Given\n",
+"Qmax=0.06D-12; //C\n",
+"f=20D+6; //Hz\n",
+"V=10; //V\n",
+"n=3;\n",
+"\n",
+"//Power disspated per bit\n",
+"P=n*f*V*Qmax;\n",
+"disp('muW',P*10^6,'Power disspated per bit:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.13: Surface_channel_CCD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 435\n",
+"//Example 8.13\n",
+"clc;\n",
+"//Given\n",
+"e0=8.854D-12;\n",
+"er=4;\n",
+"d=0.1D-6; //m\n",
+"si=0.85;\n",
+"e=1.6D-19; //J\n",
+"Na=1D+20;\n",
+"\n",
+"Ci=(e0*er)/d;\n",
+"disp('F/m',Ci,'Junction capacitance:');\n",
+"\n",
+"W=sqrt((2*e0*er*si)/(e*Na));\n",
+"disp('m',W,'Depletion layer width:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1: Single_pole_Switch.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 389\n",
+"//Example 8.1\n",
+"clc;\n",
+"//Given\n",
+"Rf=0.5; //ohm\n",
+"Rr=1; //ohm\n",
+"Ls=0.3D-9; //H\n",
+"Cj=0.1D-12; //F\n",
+"f=3.18D+9; //Hz\n",
+"Z0=50; //ohm\n",
+"\n",
+"Zf=Rf+(%i*round(2*%pi*f*Ls));\n",
+"Zr=Rr+(%i*(round(2*%pi*f*Ls)-(1/(2*%pi*f*Cj))));\n",
+"\n",
+"//Series Configuration\n",
+"disp('Series Configuration');\n",
+"\n",
+"//Insertion Loss\n",
+"x=(2*Z0)/((2*Z0)+Zf);\n",
+"x1=sqrt((real(x))^2+(imag(x))^2);\n",
+"IN=-20*log10(x1);\n",
+"disp('dB',IN,'Insertion Loss:');\n",
+"\n",
+"//Isolation Loss\n",
+"y=(2*Z0)/((2*Z0)+Zr);\n",
+"y1=sqrt((real(y))^2+(imag(y))^2);\n",
+"IS=-20*log10(y1);\n",
+"disp('dB',IS,'Isolation Loss:');\n",
+"\n",
+"//Shunt Configuration\n",
+"disp('Shunt Configuration');\n",
+"\n",
+"//Insertion Loss\n",
+"a=(2*Zr)/((2*Zr)+Z0);\n",
+"a1=sqrt((real(a))^2+(imag(a))^2);\n",
+"INs=-20*log10(a1);\n",
+"disp('dB',INs,'Insertion Loss:');\n",
+"\n",
+"//Isolation Loss\n",
+"b=(2*Zf)/((2*Zf)+Z0);\n",
+"b1=sqrt((real(b))^2+(imag(b))^2);\n",
+"ISs=-20*log10(b1);\n",
+"disp('dB',ISs,'Isolation Loss:');\n",
+"\n",
+"//Answer for Series configuration insertion loss is 0.058 but is given as 0.58db"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2: Pin_diode_switches.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 390\n",
+"//Example 8.2\n",
+"clc;\n",
+"//Given\n",
+"Rf=1; //ohm\n",
+"Rr=4; //ohm\n",
+"Ls=0.3D-9; //H\n",
+"Cj=0.1D-12; //F\n",
+"f=3.18D+9; //Hz\n",
+"Z0=50; //ohm\n",
+"\n",
+"Zf=Rf+(%i*round(2*%pi*f*Ls));\n",
+"Zr=Rr+(%i*(round(2*%pi*f*Ls)-(1/(2*%pi*f*Cj))));\n",
+"\n",
+"//Series Configuration\n",
+"disp('Series Configuration');\n",
+"\n",
+"//Insertion Loss\n",
+"x=(2*Z0)/((2*Z0)+Zf);\n",
+"x1=sqrt((real(x))^2+(imag(x))^2);\n",
+"IN=-20*log10(x1);\n",
+"disp('dB',IN,'Insertion Loss:');\n",
+"\n",
+"//Isolation Loss\n",
+"y=(2*Z0)/((2*Z0)+Zr);\n",
+"y1=sqrt((real(y))^2+(imag(y))^2);\n",
+"IS=-20*log10(y1);\n",
+"disp('dB',IS,'Isolation Loss:');\n",
+"\n",
+"//Shunt Configuration\n",
+"disp('Shunt Configuration');\n",
+"\n",
+"//Insertion Loss\n",
+"a=(2*Zr)/((2*Zr)+Z0);\n",
+"a1=sqrt((real(a))^2+(imag(a))^2);\n",
+"INs=-20*log10(a1);\n",
+"disp('dB',INs,'Insertion Loss:');\n",
+"\n",
+"//Isolation Loss\n",
+"b=(2*Zf)/((2*Zf)+Z0);\n",
+"b1=sqrt((real(b))^2+(imag(b))^2);\n",
+"ISs=-20*log10(b1);\n",
+"disp('dB',ISs,'Isolation Loss:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3: Silicon_switching_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 392\n",
+"//Example 8.3\n",
+"clc;\n",
+"//Given\n",
+"Vbd=1000; //V\n",
+"f=30D+9; //Hz\n",
+"E=3D+5; //V/cm\n",
+"Cj=0.3D-12; //F\n",
+"er=11.8;\n",
+"e0=8.854D-12;\n",
+"\n",
+"W=Vbd/E;\n",
+"Wpi=W/100; //mu\n",
+"\n",
+"//Total series resistance\n",
+"R=1/(2*%pi*f*Cj);\n",
+"disp('ohms',R,'Total series resistance:');\n",
+"\n",
+"//Junction Area\n",
+"A=(Cj*Wpi)/(e0*er);\n",
+"disp('cm2',A*10000,'Junction Area:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6: Parametric_upconverter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 428\n",
+"//Example 8.6\n",
+"clc;\n",
+"//Given\n",
+"MQ=10;\n",
+"M=0.4;\n",
+"r=20;\n",
+"Td=300; //K\n",
+"T=290; //K\n",
+"\n",
+"x=(MQ*MQ)/r;\n",
+"//Power Gain\n",
+"Ap=(r*x)/((1+sqrt(1+x))^2);\n",
+"Apdb=10*log10(Ap);\n",
+"disp('dB',Apdb,'Power gain:');\n",
+"\n",
+"//Noise figure\n",
+"z=(Td/T)/sqrt(1+((MQ*MQ)/r));\n",
+"F=1+z;\n",
+"Fdb=10*log10(F);\n",
+"disp('dB',F,'Nosie figure:');\n",
+"\n",
+"//Bandwidth\n",
+"BW=2*M*sqrt(r);\n",
+"disp(BW,'Bandwidth:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7: Parametric_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 428\n",
+"//Example 8.7\n",
+"clc;\n",
+"//Given\n",
+"MQ=10;\n",
+"r=10;\n",
+"\n",
+"x=(MQ*MQ)/r;\n",
+"\n",
+"//Gain\n",
+"Ap=(r*x)/((1+sqrt(1+x))^2);\n",
+"Apdb=10*log10(Ap);\n",
+"disp('dB',Apdb,'Gain:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8: Negative_resistance_parametric_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 429\n",
+"//Example 8.8\n",
+"clc;\n",
+"//Given\n",
+"Rs=1; //ohm\n",
+"ws=5D+9; //Hz\n",
+"M=0.25;\n",
+"C0=2D-12; //F\n",
+"\n",
+"//(i) Effective Q\n",
+"Q=1/(Rs*ws*C0*(1-(M*M)));\n",
+"disp(Q,'Effective Q:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.9: 330_stage_CCD.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 434\n",
+"//Example 8.9\n",
+"clc;\n",
+"//Given\n",
+"e=0.0001;\n",
+"s=330;\n",
+"\n",
+"//Charge transfer effciency\n",
+"n=1-e;\n",
+"\n",
+"//Final charge pulse\n",
+"//x=P/P0\n",
+"x=(1-(e*s));\n",
+"disp(x,'Final charge pulse:');"
+ ]
+ }
+],
+"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/Microwave_Engineering_by_G_S_Raghuvanshi/9-Microwave_Solid_State_Generators_and_Amplifiers.ipynb b/Microwave_Engineering_by_G_S_Raghuvanshi/9-Microwave_Solid_State_Generators_and_Amplifiers.ipynb
new file mode 100644
index 0000000..f4e0a76
--- /dev/null
+++ b/Microwave_Engineering_by_G_S_Raghuvanshi/9-Microwave_Solid_State_Generators_and_Amplifiers.ipynb
@@ -0,0 +1,893 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Microwave Solid State Generators and Amplifiers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10: Gunn_device.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 486\n",
+"//Example 9.10\n",
+"clc;\n",
+"//Given\n",
+"vd=2D+5; //m/s\n",
+"L=10D-6; //m\n",
+"Ec=3.2D+5; //V/m\n",
+"\n",
+"//Natural frequency\n",
+"f=vd/L;\n",
+"disp('GHz',f/10^9,'Natural frequency:');\n",
+"\n",
+"//Critical voltage\n",
+"Vc=Ec*L;\n",
+"disp('V',Vc,'Critical voltage:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11: Gunn_oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 487\n",
+"//Example 9.11\n",
+"clc;\n",
+"//Given\n",
+"n=0.08;\n",
+"A=3D-8; //m2\n",
+"n0=1D+21; //m-3\n",
+"e=1.6D-19;\n",
+"vd=1.5D+5; //m/s\n",
+"M=3.2\n",
+"E=350D+3; //V\n",
+"L=12D-6; //m\n",
+"\n",
+"//Power output\n",
+"Pout=n*A*n0*e*vd*M*L*E;\n",
+"disp('mW',Pout*1000,'Power output:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.12: Tunnel_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 487\n",
+"//Example 9.12\n",
+"clc;\n",
+"//Given\n",
+"G=15.85;\n",
+"Rn=75; //ohm\n",
+"\n",
+"Rl=Rn-(Rn/G);\n",
+"C=Rl+(10*%i);\n",
+"disp('ohms',C,'Cavity impedance:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.13: Gunn_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 487\n",
+"//Example 9.13\n",
+"clc;\n",
+"//Given\n",
+"e=1.6D-19;\n",
+"n1=1D+16; //m-3\n",
+"mu1=8000D-4; //m2/Vs\n",
+"nu=1D+14; //m-3\n",
+"muu=180D-4; //m2/Vs\n",
+"\n",
+"///Conductivity\n",
+"C=e*((n1*mu1)+(nu*muu));\n",
+"disp('m mho',C*1000,'Conductivity:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.14: Gunn_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 488\n",
+"//Example 9.14\n",
+"clc;\n",
+"//Given\n",
+"e0=8.854D-12;\n",
+"er=13.1;\n",
+"vd=2.5D+5; //m/s\n",
+"e=1.6D-19;\n",
+"mu=0.015; //m2/Vs\n",
+"\n",
+"//Criteria\n",
+"n0L=(e0*er*vd)/(e*mu);\n",
+"disp('m^-3',n0L,'n0L should be greater than');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.15: Gunn_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 488\n",
+"//Example 9.15\n",
+"clc;\n",
+"//Given\n",
+"L=10D-6; //m\n",
+"f=10D+9; //Hz\n",
+"e=1.6D-19;\n",
+"n0=2D+20; //m3\n",
+"E=3200D+2; //V/m\n",
+"\n",
+"//Current density\n",
+"vd=L*f;\n",
+"J=n0*e*vd;\n",
+"disp('A/m sqr',J,'Current density:');\n",
+"\n",
+"//Negative electron mobility\n",
+"mu=-vd/E;\n",
+"disp('cm sqr/Vs',mu*10000,'Negative electron mobility:');\n",
+"\n",
+"//Answer for Negative electron mobility is 3125 but it is given as 3100\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.17: IMPATT_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 497\n",
+"//Example 9.17\n",
+"clc;\n",
+"//Given\n",
+"n=0.15;\n",
+"Vdc=100; //V\n",
+"Idc=200D-3; //A\n",
+"vd=2D+5; //m/s\n",
+"L=6D-6; //m\n",
+"\n",
+"//(i) Maximum CW output power\n",
+"Pdc=Vdc*Idc;\n",
+"Pout=n*Pdc;\n",
+"disp('W',Pout,'Maximum CW power output:');\n",
+"\n",
+"//(ii) Resonant frequency\n",
+"f=vd/(2*L);\n",
+"disp('GHz',f/10^9,'Resonant frequency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.18: IMPATT_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 497\n",
+"//Example 9.18\n",
+"clc;\n",
+"//Given\n",
+"n=0.1;\n",
+"Vdc=100; //V\n",
+"Idc=100D-3; //A\n",
+"vd=2D+5; //m/s\n",
+"L=5D-6; //m\n",
+"V0=90; //V\n",
+"k=3;\n",
+"\n",
+"//(i) Maximum CW output power\n",
+"Pdc=Vdc*Idc;\n",
+"Pout=n*Pdc;\n",
+"disp('W',Pout,'Maximum CW power output:');\n",
+"\n",
+"//(ii) Resonant frequency\n",
+"f=vd/(2*L);\n",
+"disp('Hz',f,'Resonant frequency:');\n",
+"\n",
+"//(iii)Transit time\n",
+"T=L/vd;\n",
+"disp('s',T,'Transit time:');\n",
+"\n",
+"//(iv) Avalanche multiplication factor\n",
+"M=1/(1-((Vdc/V0)^k));\n",
+"disp(-M,'Avalanche multiplication factor:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.19: IMPATT_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 498\n",
+"//Example 9.19\n",
+"clc;\n",
+"//Given\n",
+"n=0.1;\n",
+"Vdc=100; //V\n",
+"Idc=0.9; //A\n",
+"t=0.01D-9; //s\n",
+"f=16D+9; //Hz\n",
+"\n",
+"//(i)Power output\n",
+"Pdc=Vdc*Idc;\n",
+"Pout=n*Pdc;\n",
+"disp('W',Pout,'Power output:');\n",
+"\n",
+"//(ii)Duty cycle\n",
+"D=(t/2)+(1/(2*f));\n",
+"disp('s',D,'Duty cycle:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.20: IMPATT_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 498\n",
+"//Example 9.20\n",
+"clc;\n",
+"//Given\n",
+"Cj=0.5D-12; //F\n",
+"Lp=0.5D-9; //H\n",
+"Irf=0.65; //A\n",
+"Rl=2; //ohms\n",
+"Vbd=80; //V\n",
+"Idc=0.08; //A\n",
+"\n",
+"//Resonant frequency\n",
+"f=1/(2*%pi*sqrt(Cj*Lp));\n",
+"disp('Hz',f,'Resonant frequency:');\n",
+"\n",
+"//Efficiency\n",
+"Pout=(Irf*Irf*Rl)/2;\n",
+"Pin=Vbd*Idc;\n",
+"n=(Pout*100)/Pin;\n",
+"disp('%',n,'Efficiency:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.21: TRAPATT_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 501\n",
+"//Example 9.21\n",
+"clc;\n",
+"//Given\n",
+"J=25D+7; //A/m;\n",
+"Na=2.5D+21; //m3\n",
+"e=1.6D-19;\n",
+"\n",
+"//Avlance zone velocity\n",
+"vz=J/(Na*e);\n",
+"disp('m/s',vz,'Avlanche zone velocity:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.22: BARITT_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 503\n",
+"//Example 9.22\n",
+"clc;\n",
+"//Given\n",
+"e=1.6D-19;\n",
+"N=4D+21; //m\n",
+"L=10D-6; //m\n",
+"e0=8.854D-12;\n",
+"er=11;\n",
+"\n",
+"//Breakdown voltage\n",
+"Vbd=(e*N*L*L)/(e0*er);\n",
+"disp('V',round(Vbd),'Breakdown voltage:');\n",
+"\n",
+"//Breakdown electric field\n",
+"E=Vbd/L;\n",
+"disp('V/m',E,'Breakdown electric field:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.23: Laser.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 515\n",
+"//Example 9.23\n",
+"clc;\n",
+"//Given\n",
+"lam=8000D-10; //m\n",
+"a=0.5D-2; //m\n",
+"D=4D+8; //m\n",
+"\n",
+"//Angular Spread\n",
+"t=(1.22*lam)/a;\n",
+"disp('rad',t,'Angular spread:');\n",
+"\n",
+"//Aerial spread\n",
+"A=%pi*((D*t)^2);\n",
+"disp('m sqr',A,'Aerial spread:');\n",
+"\n",
+"\n",
+"//Answer for A is given as 193 m sqr but it is 1.915D+10 m sqr"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.24: Laser.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 515\n",
+"//Example 9.24\n",
+"clc;\n",
+"//Given\n",
+"E=10; //W\n",
+"T=1D-9; //s\n",
+"c=3D+8; //m/s\n",
+"lam=650D-9; //m\n",
+"\n",
+"//Pulse Power\n",
+"P=E/T;\n",
+"disp('W',P,'Pulse Power:');\n",
+"\n",
+"//Q value\n",
+"Q=(c*T)/lam;\n",
+"disp(Q,'Q value:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.25: Heterojunction_laser.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 515\n",
+"//Example 9.25\n",
+"clc;\n",
+"//Given\n",
+"h=6.626D-34; \n",
+"c=3D+8; //m/s\n",
+"e=1.6D-19;\n",
+"Eg=1.85; //eV\n",
+"\n",
+"//Wavelenght emitted\n",
+"lam=(h*c)/(Eg*e);\n",
+"lamarm=lam*1D+10;\n",
+"disp('A',round(lamarm),'Wavelenght emitted:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2: Bipolar_transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 448\n",
+"//Example 9.2\n",
+"clc;\n",
+"//Given\n",
+"fc=5D+9; //Hz\n",
+"Em=2D+7; //V/m\n",
+"vs=4D+3; //ms/s\n",
+"Xc=1; //ohm\n",
+"\n",
+"//Maximum allowable power\n",
+"Pm=((Em*vs)^2)/(((2*%pi*fc)^2)*Xc);\n",
+"disp('W',Pm,'Maximum allowable power:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.3: Heterojunction_transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 451\n",
+"//Example 9.3\n",
+"clc;\n",
+"//Given\n",
+"XeGe=4.0; //eV\n",
+"XeGaAs=4.1; //eV\n",
+"delEgGe=0.78; //eV\n",
+"delEgGaAs=1.42; //eV\n",
+"\n",
+"//Conduction band differential\n",
+"delEc=XeGe-XeGaAs;\n",
+"disp('eV',delEc,'Conduction band differential:');\n",
+"\n",
+"//Valence band differential\n",
+"delEv=delEgGaAs-delEgGe-delEc;\n",
+"disp('eV',delEv,'Valence band differential:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4: GaAs_FET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 454\n",
+"//Example 9.4\n",
+"clc;\n",
+"//Given\n",
+"S11=0.89;\n",
+"S12=0.02;\n",
+"S21=3.1;\n",
+"S22=0.78;\n",
+"\n",
+"del=(S11*S22)-(S12*S21);\n",
+"K=[1-(S11)^2-(S22)^2+(del)^2;]/(2*S12*S21);\n",
+"if(K<1)\n",
+" disp('Amplifier is potentially unstable');\n",
+"else\n",
+" disp('Amplifier is potentially stable');\n",
+" end\n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5: Microwave_transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 454\n",
+"//Example 9.5\n",
+"clc;\n",
+"//Given\n",
+"S11=0.40;\n",
+"S12=0.01;\n",
+"S21=2.00;\n",
+"S22=0.35;\n",
+"\n",
+"ZL=20; //ohm\n",
+"ZS=30; //ohm\n",
+"Z0=ZL+ZS; //ohm\n",
+"\n",
+"//Reflection coefficients of source and load\n",
+"TL=(ZL-Z0)/(ZL+Z0);\n",
+"TLm=-TL;\n",
+"TS=(ZS-Z0)/(ZS+Z0);\n",
+"TSm=-TS;\n",
+"\n",
+"//Reflection coefficients of input and output\n",
+"Tin=S11+((S12*S21*TL)/(1-(S22*TL)));\n",
+"Tout=S22+((S12*S21*TS)/(1-(S22*TS)));\n",
+"\n",
+"//Transducer Gain\n",
+"x=(1-(TSm)^2)/((1-(S11*TSm))^2); //Value of should be 1.145\n",
+"y=(S21*S21);\n",
+"z=(1-(TLm)^2)/((1-(Tout*TLm))^2);\n",
+"GT=x*y*z;\n",
+"disp(GT,'Transducer Gain:');\n",
+"\n",
+"//Available Power Gain\n",
+"z1=1-(Tout)^2;\n",
+"GA=(x*y)/z1;\n",
+"disp(GA,'Available power Gain:'); \n",
+"\n",
+"//Power Gain\n",
+"z2=1-(Tin)^2;\n",
+"GP=(x*y)/z2;\n",
+"disp(GP,'Power Gain:');\n",
+"\n",
+"//All the end calculations of finding gain are not accurate in the book, hence the answers dont match\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6: Transistor_Amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 455\n",
+"//Example 9.6\n",
+"clc;\n",
+"//Given\n",
+"S11=0.60;\n",
+"S12=0.045;\n",
+"S21=2.50;\n",
+"S22=0.50\n",
+"TS=0.5;\n",
+"TL=0.4;\n",
+"Vrms=10; //V\n",
+"Z0=50; //ohm\n",
+"\n",
+"//(i)Reflection coefficients of input and output\n",
+"Tin=S11+((S12*S21*TL)/(1-(S22*TL)));\n",
+"Tout=S22+((S12*S21*TS)/(1-(S22*TS)));\n",
+"disp(Tin,'Reflection coefficients of input:');\n",
+"disp(Tout,'Reflection coefficients of output:');\n",
+"\n",
+"//(ii) Gains\n",
+"//Transducer Gain\n",
+"x=(1-(TS)^2)/((1-(S11*TS))^2);\n",
+"y=(S21*S21);\n",
+"z=(1-(TL)^2)/((1-(Tout*TL))^2);\n",
+"GT=x*y*z;\n",
+"disp(GT,'Transducer Gain:');\n",
+"\n",
+"//Available Power Gain\n",
+"z1=1-(Tout)^2;\n",
+"GA=(x*y)/z1;\n",
+"disp(GA,'Available power Gain:'); \n",
+"\n",
+"//Power Gain\n",
+"z2=1-(Tin)^2;\n",
+"GP=(x*y)/z2;\n",
+"disp(GP,'Power Gain:');\n",
+"\n",
+"//Calculation for Tout and Gains are wrong in the book, hence the answers dont match\n",
+"\n",
+"//(iii) Power available\n",
+"Gt=9.4;\n",
+"Pas=(sqrt(2)*Vrms)^2/(8*Z0);\n",
+"Pal=Gt*Pas;\n",
+"disp('W',Pas,'Power available at source:');\n",
+"disp('W',Pal,'Power available at load:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7: Microwave_transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 457\n",
+"//Example 9.7\n",
+"clc;\n",
+"//Given\n",
+"S11=0.90;\n",
+"S12=0;\n",
+"S21=2.40;\n",
+"S22=0.80;\n",
+"\n",
+"Gmax=(S21*S21)/((1-(S11)^2)*(1-(S22)^2));\n",
+"Gdb=10*log10(Gmax);\n",
+"disp(Gdb,'Maximum gain:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8: JEFT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 468\n",
+"//Example 9.8\n",
+"clc;\n",
+"//Given\n",
+"e=1.6D-19;\n",
+"Nd=1.1D+23; //m-3\n",
+"a=0.2D-6; //m\n",
+"er=11.8;\n",
+"e0=8.854D-12;\n",
+"mue=800D-4; //m2/Vs\n",
+"Z=50D-6; \n",
+"L=8.5D-6; //m\n",
+"W0=1; //V\n",
+"Vd=12; //V\n",
+"Vg=1.5; //V\n",
+"\n",
+"//(i) Pinch off voltage and pinch off current\n",
+"Vp=(e*Nd*a*a)/(2*er*e0);\n",
+"disp('V',Vp,'Pinch off voltage:');\n",
+"\n",
+"Ip=(mue*e*e*Nd*Nd*Z*a*a)/(e0*er*L);\n",
+"disp('A',Ip,'Pinch off current:');\n",
+"//Answer for Ip is 55809 A but it is given as 0.00558 A\n",
+"\n",
+"//(ii) Drain and maximum drain current\n",
+"//Taking Ip=5.58mA as given in book\n",
+"Ip1=0.00558; //A\n",
+"x=(2/3)*(((Vd+Vg+W0)/Vp)^(3/2));\n",
+"y=(2/3)*(((Vg+W0)/Vp)^(3/2));\n",
+"Id=Ip1*[(Vd/Vp)-x+y];\n",
+"disp('A',-Id,'Drain current:');\n",
+"\n",
+"//Saturation Current\n",
+"Is=Ip1*[(1/3)-((Vg+W0)/Vp)+((2/3)*(((Vg+W0)/Vp)^(3/2)))];\n",
+"disp('A',Is,'Drain saturation current:');\n",
+"\n",
+"//(iii) Cut off frequency\n",
+"f=(2*mue*e*Nd*a*a)/(%pi*er*e0*L*L);\n",
+"disp('GHz',f/10^9,'Cutt off freqency:');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.9: MESFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//Page Number: 469\n",
+"//Example 9.9\n",
+"clc;\n",
+"//Given\n",
+"e=1.6D-19;\n",
+"Nd=8D+23; //m-3\n",
+"a=0.12D-6; //m\n",
+"er=13.2;\n",
+"e0=8.854D-12;\n",
+"\n",
+"//Pinch off voltage\n",
+"Vp=(e*Nd*a*a)/(2*er*e0);\n",
+"disp('V',Vp,'Pinch off voltage:');"
+ ]
+ }
+],
+"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
+}