summaryrefslogtreecommitdiff
path: root/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov')
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/1-Introduction.ipynb204
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/10-Oscillators_and_Mixers.ipynb324
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/2-Transmission_line_analysis.ipynb291
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/3-The_Smith_Chart.ipynb92
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/4-Single_and_Multiport_Networks.ipynb91
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/5-An_Overview_of_RF_Filter_Design.ipynb132
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/6-Active_RF_Components.ipynb466
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/7-Active_RF_Component_Modelling.ipynb275
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/8-Matching_and_biasing_networks.ipynb97
-rw-r--r--Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/9-RF_Transistor_Amplifier_Design.ipynb471
10 files changed, 2443 insertions, 0 deletions
diff --git a/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/1-Introduction.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/1-Introduction.ipynb
new file mode 100644
index 0000000..33bf5e0
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/1-Introduction.ipynb
@@ -0,0 +1,204 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Introduction"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: Intrinsic_wave_impedance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"mu0=4*%pi*10^-7;// defining permeability of free space\n",
+"epsilon0=8.85*10^-12;// defining permittivity of free space\n",
+"z0=sqrt(mu0/epsilon0);// calculating intrinsic impedance\n",
+"epsilonr=4.6;// defining relative permittivity\n",
+"vp=1/sqrt(mu0*epsilon0*epsilonr);// calculating phase velocity\n",
+"f1=30*10^6;\n",
+"f2=3*10^9;\n",
+"lambda1=vp/(f1);\n",
+"lambda2=vp/(f2);\n",
+"disp('metre',lambda1,'Wavelength corresponding to f1');//displaying wavelengths\n",
+"disp('metre',lambda2,'Wavelength corresponding to f2');//displaying wavelengths"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: Comparing_Inductances_at_different_frequencies.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"mu0=4*%pi*10^-7;\n",
+"a=8*2.54*10^-5; //radius of copper wire\n",
+"sigmac=64.5*10^6; //conductivity of copper\n",
+"l=2*10^-2; //length of wire\n",
+"rdc=l/(%pi*a*a*sigmac);\n",
+"f1=100*10^6;\n",
+"f2=2*10^9;\n",
+"f3=5*10^9;\n",
+"skindepth1=1/sqrt(%pi*mu0*f1*sigmac);\n",
+"skindepth2=1/sqrt(%pi*mu0*f2*sigmac);\n",
+"skindepth3=1/sqrt(%pi*mu0*f3*sigmac);\n",
+"Lin1=(a*rdc)/(2*skindepth1*2*%pi*f1); //internal inductance\n",
+"Lin2=(a*rdc)/(2*skindepth2*2*%pi*f2); //internal inductance\n",
+"Lin3=(a*rdc)/(2*skindepth3*2*%pi*f3); //internal inductance\n",
+"temp=log(2*l/a)/log(%e);\n",
+"Lex=mu0*l*(temp-1)/(2*%pi); //external inductance\n",
+"disp('metre',skindepth1,'Skin depth at f1');\n",
+"disp('metre',skindepth2,'Skin depth at f2');\n",
+"disp('metre',skindepth3,'Skin depth at f3');\n",
+"disp('Henry',Lin1,'Internal inductance at f1');\n",
+"disp('Henry',Lin2,'Internal inductance at f2');\n",
+"disp('Henry',Lin3,'Internal inductance at f3');\n",
+"disp('Henry',Lex,'External inductance');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: Frequency_response_of_high_frequency_resistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"f=10^4:10^5:10^10;\n",
+"w=2*%pi.*f;\n",
+"mu0=4*%pi*10^-7;\n",
+"l=2*2.5*10^-2;\n",
+"a=2.032*10^-4;\n",
+"temp=log(2*l/a)/log(%e);\n",
+"lex=mu0*l*(temp-1)/(2*%pi); //external inductance\n",
+"r=2*10^3; // resistance\n",
+"c=5*10^-12; //capacitance\n",
+"z=w*lex*%i+1 ./(w*c*%i+1/r); //impedance\n",
+"plot2d('gll',f,abs(z));\n",
+"title('High frequency impedance behaviour of a 2k ohm metal film resistor ');\n",
+"xlabel('Frequency (f) in Hz');\n",
+"ylabel('Absolute Impedance (|Z|) in ohms');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4: Frequency_response_of_high_frequency_capacitor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"f=10^6:10^7:10^10;\n",
+"rs=(4.8*10^-6).*sqrt(f);\n",
+"re=(33.9*10^12) ./f;\n",
+"c=47*10^-12;\n",
+"w=2*%pi.*f;\n",
+"l=2*1.25*10^-2;\n",
+"a=2.032*10^-4;\n",
+"temp=log(2*l/a)/log(%e);\n",
+"lex=mu0*l*(temp-1)/(2*%pi); //external inductance\n",
+"z=1 ./(1 ./re +w*c*%i)+rs+w.*lex*%i; // impedance of frequency dependent capacitor\n",
+"zideal=1 ./(w*c*%i); //impedance of an ideal capacitor\n",
+"plot2d('gll',f,abs(z));\n",
+"plot2d(f,abs(zideal));\n",
+"title('Frequency responce of a high frequency capacitor');\n",
+"xlabel('Frequency (f) in Hz');\n",
+"ylabel('Absolute impedance (|Z|) in ohms');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5: frequency_response_of_high_frequency_inductor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"f=10^7:10^8:10^10;\n",
+"w=2*%pi.*f;\n",
+"N=3.5; //number of turns\n",
+"rad=0.05*0.0254;\n",
+"len=0.05*0.0254; //length of wire\n",
+"a=(5*0.0254*10^-3)/2;\n",
+"u0=4*%pi*10^-7;\n",
+"sig_cu=64.516*10^6;\n",
+"e0=8.854*10^-12;\n",
+"l=(%pi*rad^2*u0*(N^2))/len;\n",
+"c=(e0*4*%pi*rad*(N^2)*a)/len;\n",
+"r=(2*rad*N)/(sig_cu*(a^2));\n",
+"z=1 ./((1 ./(r+w*%i*l))+w*%i*c); //impedance\n",
+"zideal=w*%i.*l; //impedance of an ideal inductor\n",
+"plot2d('gll',f,abs(z));\n",
+"plot2d(f,abs(zideal));\n",
+"title('Frequency response of the impedance of an RFC');\n",
+"xlabel('Frequency (f) in Hz');\n",
+"ylabel('Absolute Impedance (|Z|) in ohms');"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/10-Oscillators_and_Mixers.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/10-Oscillators_and_Mixers.ipynb
new file mode 100644
index 0000000..88da20a
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/10-Oscillators_and_Mixers.ipynb
@@ -0,0 +1,324 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Oscillators and Mixers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: Design_of_a_Colpitt_oscillator.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"fo=200*10^6;\n",
+"Vce=3;\n",
+"Ic=3*10^-3;\n",
+"\n",
+"Cbc=0.1*10^-15;\n",
+"rBE=2*10^3;\n",
+"rCE=10*10^3;\n",
+"Cbe=100*10^-15;\n",
+"L3=50*10^-9;\n",
+"L=50*10^-9;\n",
+"gm=0.11666;\n",
+"\n",
+"disp('DC values of Hparameters are');\n",
+"h11=rBE;\n",
+"h12=0;\n",
+"h21=rBE*gm;\n",
+"h22=1/rCE;\n",
+"\n",
+"disp('Mho',h22,'h22',h21,'h21',h12,'h12','Ohms',h11,'h11');\n",
+"k=h21/(h11*h22-h21*h12);\n",
+"A=(1+k)/L;\n",
+"B=A^2;\n",
+"C=16*k*(%pi)^2*fo^2*(h22/h11);\n",
+"D=8*k*(%pi)^2*fo^2;\n",
+"C2=(A+sqrt(B+C))/D;\n",
+"C1=k*C2;\n",
+"\n",
+"disp('H parameters at resonance frequency');\n",
+"w=2*%pi*fo;\n",
+"E=1+%i*w*(Cbe+Cbc)*rBE;\n",
+"\n",
+"hie=rBE/E;\n",
+"hre=(%i*w*Cbc*rBE)/E;\n",
+"hfe=(rBE*(gm-%i*w*Cbc))/E;\n",
+"hoe=h22+(%i*w*Cbc*(1+gm*rBE+%i*w*Cbe*rBE))/E;\n",
+"disp('Mho',hoe,'hoe',hfe,'hfe',hre,'hre','Ohms',hie,'hie');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: Prediction_of_resonance_frequencies_of_quartz_crystal.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"stacksize('max');\n",
+"//define crystal parameters\n",
+"Lq=0.1;\n",
+"Rq=25;\n",
+"Cq=0.3*10^-12;\n",
+"C0=1*10^-12;\n",
+"\n",
+"//find series resonance frequency\n",
+"ws0=1/sqrt(Lq*Cq);\n",
+"disp(ws0);\n",
+"ws=ws0*(1+Rq^2/2*C0/Lq);\n",
+"fs=ws/2/%pi \n",
+"\n",
+"//find parallel resonance frequency\n",
+"wp0=sqrt((Cq+C0)/(Lq*Cq*C0));\n",
+"wp=wp0*(1-Rq^2/2*C0/Lq);\n",
+"fp=wp/2/%pi\n",
+"\n",
+"//define frequency range for this plot\n",
+"f=(0.9:0.00001:1.1)*1e6;\n",
+"w=2*%pi*f;\n",
+"\n",
+"//find abmittance of the resonator\n",
+"Y=%i.*w*C0+1./(Rq+%i*(w*Lq-1./(w*Cq)));\n",
+"\n",
+"plot(f/1e6,abs(imag(Y)));\n",
+"mtlb_axis([0.9 1.1 1e-10 1e-1]);\n",
+"title('Admittance of the quartz crystal resonator');\n",
+"xlabel('Frequency {\itf}, MHz');\n",
+"ylabel('Susceptance |B|, \Omega');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: Adding_a_positive_feedback_element_to_initiate_oscillations.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Z0=50;\n",
+"//oscillation frequency\n",
+"f=2*10^9;\n",
+"w=2*%pi*f;\n",
+"//transistor S-parameters at oscillation frequency\n",
+"\n",
+"s_tr=[0.94*exp(%i*174/180*%pi),0.013*exp(-%i*98/180*%pi);1.9*exp(-%i*28/180*%pi),1.01*exp(-%i*17/180*%pi)];\n",
+"s11=ss2tf(1,1);\n",
+"s12=ss2tf(1,2);\n",
+"s21=ss2tf(2,1);\n",
+"s22=ss2tf(2,2);\n",
+"\n",
+"//find the Z-parameters of the transistor\n",
+"z_tr=ss2tf(s_tr,Z0);\n",
+"\n",
+"//attempt to add inductor to base in order to increase instability\n",
+"L=(0:0.01:2)*1e-9;\n",
+"\n",
+"Z_L=%i*w*L;\n",
+"z_L=[1,1;1,1];\n",
+"\n",
+"N=length(L);\n",
+"\n",
+"//create variables for the S_parameters of the transistor with the inductor\n",
+"s11=zeros([1 N]);\n",
+"s12=zeros([1 N]);\n",
+"s21=zeros([1 N]);\n",
+"s22=zeros([1 N]);\n",
+"\n",
+"//Rollett stability factor\n",
+"K=zeros([1 N]);\n",
+"\n",
+"for n=1:N\n",
+" z_total=z_tr+z_L*Z_L(n);\n",
+" s_total=ss2tf(z_total,Z0);\n",
+" s11(n)=s_total(1,1);\n",
+" s12(n)=s_total(1,2);\n",
+" s21(n)=s_total(2,1);\n",
+" s22(n)=s_total(2,2);\n",
+" K(n)=(1-abs(s11(n))^2-abs(s22(n))^2+abs(det(s_total))^2)/2/abs(s12(n)*s21(n));\n",
+"end;\n",
+"\n",
+"plot(L/1e-9,K);\n",
+"title('Stability factor of the transistor in common-base mode vs. base inductance');\n",
+"xlabel('Base inductance L, nH');\n",
+"ylabel('Rollett stability factor \itk')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6: Dielectric_resonator_oscillator_design.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define the S-paramters of the transistor at resonance frequency\n",
+"s11=1.1*exp(%i*(170)/180*%pi);\n",
+"s12=0.4*exp(%i*(-98)/180*%pi);\n",
+"s21=1.5*exp(%i*(-163)/180*%pi);\n",
+"s22=0.9*exp(%i*(-170)/180*%pi);\n",
+"\n",
+"s=[s11,s12;s21,s22];\n",
+"\n",
+"//define oscillation frequency\n",
+"f0=8e9;\n",
+"w0=2*%pi*f0;\n",
+"\n",
+"//define parameters of the dielectric resonator\n",
+"Z0=50;\n",
+"beta=7;\n",
+"R=beta*2*Z0;\n",
+"Qu=5e3;\n",
+"\n",
+"//compute equivalent L and C\n",
+"L=R/(Qu*w0);\n",
+"C=1/(L*w0^2);\n",
+"\n",
+"//find output reflection coefficient of the DR\n",
+"Gout_abs=beta/(1+beta);\n",
+"Gout_angle=-atan(imag(s11),real(s11))/%pi*180;\n",
+"\n",
+"//compute electrical length of the transmission line for the DR\n",
+"theta0=-1/2*Gout_angle\n",
+"Gout=Gout_abs*exp(%i*Gout_angle*%pi/180);\n",
+"\n",
+"//find the output impedance of the DR\n",
+"Zout=Z0*(1+Gout)/(1-Gout)\n",
+"\n",
+"\n",
+"// find the equivalent capacitance (it will be necessary for the computation of the oscillator without DR)\n",
+"CC=-1/(w0*imag(Zout))\n",
+"\n",
+"Rs=50;\n",
+"\n",
+"//define the frequency for the plot\n",
+"delta_f=0.05e9; //frequency range\n",
+"f=f0-delta_f/2 : delta_f/100 : f0+delta_f/2;\n",
+"w=2*%pi*f;\n",
+"\n",
+"if theta0<0\n",
+" theta0=360+theta0;\n",
+"end;\n",
+"\n",
+"theta=theta0*f/f0/180*%pi;\n",
+"\n",
+"//repeat the same computations as above, but for specified frequency range\n",
+"Gs=(Rs-Z0)/(Rs+Z0);\n",
+"G1=Gs*exp(-%i*2*theta);\n",
+"R1=Z0*(1+G1)./(1-G1);\n",
+"Zd=1./(1/R+1./(%i*w*L+%i*w*C));\n",
+"R1d=R1+Zd;\n",
+"G1d=(R1d-Z0)./(R1d+Z0);\n",
+"G2=G1d.*exp(-%i*2*theta);\n",
+"\n",
+"//compute the output reflection coefficient (we have oscillations if |Gout|>1)\n",
+"Gout=s22+s12*s21*G2./(1-s11*G2);\n",
+"\n",
+"figure;\n",
+"plot(f/1e9,abs(Gout),'b','linewidth',2);\n",
+"title('Output reflection coefficient of the oscillator with DR');\n",
+"xlabel('Frequency f, GHz');\n",
+"ylabel('Output reflection coefficient |\Gamma_{out}|');\n",
+"mtlb_axis([7.975 8.025 0 14]);\n",
+"\n",
+"\n",
+"//Redefine the frequency range (we have to increase it in order to be able to observe any variations in the response\n",
+"delta_f=5e9;\n",
+"f=f0-delta_f/2 : delta_f/100 : f0+delta_f/2;\n",
+"w=2*%pi*f;\n",
+"\n",
+"//Compute the output reflection coefficient of the oscillator but with DR replaced by a series combination of resistance and capacitance\n",
+"ZZ2=real(Zout)+1./(%i*w*CC);\n",
+"GG2=(ZZ2-Z0)./(ZZ2+Z0);\n",
+"GG=s22+s12*s21*GG2./(1-s11*GG2);\n",
+"\n",
+"figure;\n",
+"plot(f/1e9,abs(GG),'r','linewidth',2);\n",
+"title('Output reflection coefficient of the oscillator without DR');\n",
+"xlabel('Frequency f, GHz');\n",
+"ylabel('Output reflection coefficient |\Gamma_{out}|');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.8: Local_oscillator_frequency_selection.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"fRF=1.89*10^9; //RF frequency\n",
+"BW=20*10^6; //Bandwidth\n",
+"fIF=200*10^6; //Intermediate Frequency\n",
+"flo=fRF+fIF; //Local oscillator frequency\n",
+"Q=fIF/BW; //Quality factotr\n",
+"disp(Q,'Quality Factor');"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/2-Transmission_line_analysis.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/2-Transmission_line_analysis.ipynb
new file mode 100644
index 0000000..954b756
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/2-Transmission_line_analysis.ipynb
@@ -0,0 +1,291 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Transmission line analysis"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10: Return_Loss_of_Transmission_line_section.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"RL=20; //load resistance\n",
+"Zo=50; //intrinsic impedance\n",
+"Rin=50; //input resistance\n",
+"Tin=10^(-RL/20); //reflection coefficient at input\n",
+"Rg1=Rin*(1+Tin)/(1-Tin);\n",
+"Rg2=Rin*(1-Tin)/(1+Tin);\n",
+"disp('Ohms',Rg1,'Source resistance for positive Tin=');\n",
+"disp('Ohms',Rg2,'Source resistance for negative Tin=');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: Magnetic_field_inside_and_outside_infinitely_long_current_carrying_wire.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"I=5; //current in infinitely long wire\n",
+"a=0.005; //radius of infinitely long wire\n",
+"r_max=10*a; \n",
+"N=100;\n",
+"r=(0:N)/N*r_max;\n",
+"for k=1:N+1\n",
+"if(r(k)<=a)\n",
+"H(k)=I*r(k)/(2*%pi*a*a); \n",
+"else\n",
+"H(k)=I/(2*%pi*r(k));\n",
+"end;\n",
+"end;\n",
+"plot(r*1000,H);\n",
+"plot([a a]*1000,[0 160],'r:');\n",
+"title('Magnetic field distribution vs. distance from the center');\n",
+"xlabel('Distance from the center of the wire,mm');\n",
+"ylabel('Magnetic field,A/m');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: Transmission_line_parameters_of_a_parallel_copper_plate_transmission_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"f=1*10^9;\n",
+"w=6*10^-3; //width\n",
+"d=1*10^-3; //seperation\n",
+"epsilonr=2.25;\n",
+"epsilon0=8.85*10^-12;\n",
+"sigma_diel=0.125;\n",
+"sigma_cond=64.5*10^6;\n",
+"mu0=4*%pi*10^-7;\n",
+"skindepth=1/sqrt(%pi*sigma_cond*mu0*f);\n",
+"r=2/(w*sigma_cond*skindepth);\n",
+"L=2/(w*sigma_cond*2*%pi*f*skindepth);\n",
+"c=epsilon0*epsilonr*w/d;\n",
+"G=sigma_diel*w/d;\n",
+"disp('R,L,G,C parameters of a parallel copper plate transmission line ')\n",
+"disp(r,'Resistance in ohm/m');\n",
+"disp(L,'Inductance in Henry/m');\n",
+"disp(c,'Capacitance in Farad/m');\n",
+"disp(G,'Conductance in mS/m');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: Phase_velocity_and_Wavelength_of_PCB_material.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"epsilonr=4.6;\n",
+"f=2*10^9;\n",
+"z0=50; //line impedance\n",
+"mu0=4*%pi*10^-7;\n",
+"epsilon0=8.85*10^-12;\n",
+"zf=sqrt(mu0/epsilon0); //free space impedance\n",
+"temp=((epsilonr-1)/(epsilonr+1))*(0.23+(0.11/epsilonr));\n",
+"temp1=2*%pi*(z0/zf)*sqrt((epsilonr+1)/2);\n",
+"A=temp+temp1;\n",
+"wtoh=(8*%e^A)/((%e^2*A)-2);\n",
+"Eff=(epsilonr+1)/2+(epsilonr-1)/2*1/(sqrt(1+12*(1/(wtoh))));\n",
+"vp=3*10^8/sqrt(Eff);\n",
+"lambda=vp/f;\n",
+"disp('metre/second',vp,'Phase velocity');\n",
+"disp('metre',lambda,'Wavelength');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: Input_Impedance_for_a_short_circuited_transmission_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"L=209.4*10^-9; //line inductance in H/m\n",
+"C=119.5*10^-12; //line capacitance in F/m\n",
+"vp=1/sqrt(L*C); // phase velocity\n",
+"Z0=sqrt(L/C); // characteristic line impedance\n",
+"d=0.1; // line length\n",
+"N=500; // number of sampling points\n",
+"f=1*10^9+3*10^9*(0:N)/N; // set frequency range\n",
+"Z=tan(2*%pi*f*d/vp); // short circuit impedance\n",
+"plot(f/1*10^9,abs(Z0*Z));\n",
+"title('Input impedance of a short-circuited transmission line');\n",
+"xlabel('Frequency,GHz');\n",
+"ylabel('Input impedance,|Z');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: Input_impedance_of_open_circuited_transmission_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"L=209.4*10^-9; //line inductance in H/m\n",
+"C=119.5*10^-12; //line capacitance in F/m\n",
+"vp=1/sqrt(L*C); // phase velocity\n",
+"Z0=sqrt(L/C); // characteristic line impedance\n",
+"d=0.1; // line length\n",
+"N=500; // number of sampling points\n",
+"f=1e9+4e9*(0:N)/N; // set frequency range\n",
+"Z=cotg(2*%pi*f*d/vp); // short circuit impedance\n",
+"plot(f/1e9,abs(Z0*Z));\n",
+"title('Input impedance of an open-circuited line');\n",
+"xlabel('Frequency , GHz');\n",
+"ylabel('Input impedance |Z|, {\Omega}');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8: Quarter_wave_parallel_plate_line_transformer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"ZL=25; //input impedance\n",
+"Z0=50; //characteristic impedance\n",
+"epsilonr=4;\n",
+"dp=0.001;\n",
+"f0=500e6;\n",
+"mu0=4*%pi*1e-7;\n",
+"epsilon0=8.85e-12;\n",
+"Zline=sqrt(Z0*ZL); //line impedance\n",
+"w=dp/Zline*sqrt(mu0/epsilon0/epsilonr);\n",
+"L=mu0*dp/w; //inductance\n",
+"C=epsilon0*epsilonr*w/dp; //capacitance\n",
+"vp=1/sqrt(L*C); //phase velocity\n",
+"Z0=sqrt(L/C);\n",
+"d=1/(4*f0*sqrt(L*C));\n",
+"N=100;\n",
+"f=2e9*(0:N)/N;\n",
+"betta=2*%pi*f/vp;\n",
+"Z=Zline*((ZL+%i*Zline*tan(betta*d))./(Zline+%i*ZL*tan(betta*d)));\n",
+"plot(f/1e9,real(Z));\n",
+"title('Input impedance of the quarter-wave transformer');\n",
+"xlabel('Frequency {\itf}, GHz');\n",
+"ylabel('Input impedance |Z_{in}|, {\Omega}');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9: Power_considerations_of_a_transmission_line.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Zg=50; //generator impedance\n",
+"Zo=75; //intrinsic impedance\n",
+"Zl=40; //line impedance\n",
+"Vg=5; //generator voltage\n",
+"Ts=(Zg-Zo)/(Zg+Zo); //reflection coefficient at source\n",
+"To=(Zl-Zo)/(Zl+Zo); //reflection coefficient at load\n",
+"temp=1-(To^2);\n",
+"temp1=(1-Ts)^2;\n",
+"temp2=(1-Ts*To)^2;\n",
+"Pin=((Vg)^2*temp1*temp2)/(8*Zo*temp); //input power\n",
+"Pl=Pin; //power delivered to the load\n",
+"disp('Watts',Pl,'The Power delivered to the load is same as that at the input-->');"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/3-The_Smith_Chart.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/3-The_Smith_Chart.ipynb
new file mode 100644
index 0000000..a121807
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/3-The_Smith_Chart.ipynb
@@ -0,0 +1,92 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: The Smith Chart"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: Input_Impedance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Zl=30+%i*60; //load impedance\n",
+"Z0=50; // intrinsic impedance\n",
+"d=2*10^-2; //length of wire\n",
+"f=2*10^9;\n",
+"c=3*10^8;\n",
+"T0=((Zl-Z0)/(Zl+Z0)); //load reflection coefficient\n",
+"beta=((2*%pi*f)/(0.5*c));\n",
+"T=-0.32-%i*0.55;\n",
+"Zin=Z0*((1+T)/(1-T)); //input impedance\n",
+"disp('Ohms',Zin,'Input impedance-->');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: SWR_circles.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Z0=50; //define 50 Ohm characteristic impedance\n",
+"Z=[50 48.5 75+%i*25 10-%i*5]; //define impedances for this example\n",
+"Gamma=(Z-Z0)./(Z+Z0) //compute corresponding reflection coefficients\n",
+"SWR=(1+abs(Gamma))./(1-abs(Gamma)); //find the SWRs\n",
+"a=0:0.01:2*%pi;\n",
+"for n=1:length(Z)\n",
+"\n",
+"plot(abs(Gamma(n))*cos(a),abs(Gamma(n))*sin(a),'b','linewidth',2);\n",
+"plot(real(Gamma(n)), imag(Gamma(n)),'ro');\n",
+"end;\n",
+"\n",
+"for n=1:length(Z)\n",
+" if n~=1\n",
+" end;\n",
+"end;"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/4-Single_and_Multiport_Networks.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/4-Single_and_Multiport_Networks.ipynb
new file mode 100644
index 0000000..4862023
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/4-Single_and_Multiport_Networks.ipynb
@@ -0,0 +1,91 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Single and Multiport Networks"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Internal_resistances_and_current_gain_of_BJT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"hie=5*10^3; //input impedance\n",
+"hre=2*10^-4; //voltage feedback ratio\n",
+"hfe=250; // small signal current gain\n",
+"hoe=20*10^-6; //output admittance\n",
+"rbc=hie/hre; // calculating base-collector resistance\n",
+"rbe=hie/(1-hre); //calculating base-emitter resistance\n",
+"beta=(hre+hfe)/(1-hre); //c calculating urrent gain\n",
+"rce=hie/(hoe*hie-hre*hfe-hre); //collector-emitter resistance\n",
+"disp('Ohms',rbc,'base collector resistance');\n",
+"disp('Ohms',rbe,'base emitter resistance');\n",
+"disp('Ohms',rce,'collector emitter resistance');\n",
+"disp(beta,'current gain');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: S_parameters_and_resistive_elements_of_T_network.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Zin=50; //input impedance\n",
+"Z0=50;\n",
+"// defining scattering parameters\n",
+"S11=0;\n",
+"S22=0;\n",
+"S21=1/sqrt(2);\n",
+"S12=1/sqrt(2);\n",
+"R1=((sqrt(2)-1)/(sqrt(2)+1))*Z0;\n",
+"R2=R1;\n",
+"R3=2*sqrt(2)*Z0;\n",
+"disp(S21,S12,S22,S11,'Scattering parameters');\n",
+"disp('Ohms',R3,'Ohms',R2,'Ohms',R1,'Resistance values R1,R2,R3:');"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/5-An_Overview_of_RF_Filter_Design.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/5-An_Overview_of_RF_Filter_Design.ipynb
new file mode 100644
index 0000000..a5e4a3e
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/5-An_Overview_of_RF_Filter_Design.ipynb
@@ -0,0 +1,132 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: An Overview of RF Filter Design"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: Resonance_frequency_of_a_Bandpass_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"stacksize('max');\n",
+"C=2*10^-12;\n",
+"L=5*10^-9;\n",
+"R=20;\n",
+"Z0=50;\n",
+"//f=[10^7:10^8:10^11];\n",
+"//define frequency range\n",
+"f_min=10e6; //lower frequency limit\n",
+"f_max=100e9; // upper frequency limit\n",
+"N=100; // number of points in the graph\n",
+"f=f_min*((f_max/f_min).^((0:N)/N)); // compute frequency points on log scale\n",
+"w=2*%pi.*f; \n",
+"A=(w.*w*L*C-1)/(w*C);\n",
+"S21=2*Z0./(2*Z0+R+%i*A);\n",
+"f0=1./(2*%pi*sqrt(L*C));\n",
+"disp('Hertz',f0,'Resonance frequency');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: Quality_factors_of_a_filter.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define problem parameters\n",
+"\n",
+"Z0=50; //characteristic line impedance\n",
+"ZG=50; //source impedance\n",
+"ZL=50; //load impedance\n",
+"\n",
+"//series RLC filter parameters\n",
+"R=10;\n",
+"L=50e-9;\n",
+"C=0.47e-12;\n",
+"\n",
+"VG=5; //generator voltage\n",
+"\n",
+"//compute series resonance frequency\n",
+"w0=1/sqrt(L*C);\n",
+"f0=w0/(2*%pi);\n",
+"\n",
+"//define a frequency range\n",
+"delta=0.2;\n",
+"w=((1-delta):2*delta/1000:(1+delta))*w0;\n",
+"\n",
+"//compute quality factors\n",
+"Q_LD=w0*L/(R+2*ZL) //loaded quality factor\n",
+"Q_F=w0*L/R //filter quality factor\n",
+"Q_E=w0*L/(2*ZL) //external quality factor\n",
+"\n",
+"// compute Bandwidth\n",
+"BW=f0/Q_LD\n",
+"\n",
+"//compute input and load power\n",
+"P_in=VG^2/(8*Z0)\n",
+"P_L=P_in*Q_LD^2/Q_E^2\n",
+"\n",
+"//compute insertion loss and load factor\n",
+"epsilon=w/w0-w0./w;\n",
+"LF=(1+epsilon.^2*Q_LD^2)/(1-Q_LD/Q_F)^2; \n",
+"IL=10*log10(LF);\n",
+"\n",
+"disp(Q_LD,'Loaded Quality Factor');\n",
+"disp(Q_F,'Filter Quality Factor');\n",
+"disp(Q_E,'External Quality Factor');\n",
+"disp('Watts',P_in,'Input Power');\n",
+"disp('Watts',P_L,'Power delivered to the load');\n",
+"disp('Hertz',f0,'resonance frequency of the filter');\n",
+"disp('Hertz',BW,'Bandwidth of the filter');\n",
+"plot(w/2/%pi/1e9,IL);\n",
+"title('Insertion loss versus frequency');\n",
+"xlabel('Frequency, GHz');\n",
+"ylabel('Insertion loss, dB');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/6-Active_RF_Components.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/6-Active_RF_Components.ipynb
new file mode 100644
index 0000000..dbcb3eb
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/6-Active_RF_Components.ipynb
@@ -0,0 +1,466 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Active RF Components"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: Current_Voltage_characterisitcs_of_a_MESFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define problem parameters\n",
+"Nd=1e16*1e6;\n",
+"d=0.75e-6;\n",
+"W=10e-6;\n",
+"L=2e-6;\n",
+"eps_r=12;\n",
+"Vd=0.8;\n",
+"mu_n=8500*1e-4;\n",
+"lambda=0.03;\n",
+"\n",
+"//define physical constants\n",
+"q=1.60218e-19; //electron charge\n",
+"eps0=8.85e-12; //permittivity of free space\n",
+"\n",
+"eps=eps_r*eps0;\n",
+"\n",
+"// pinch-off voltage\n",
+"Vp=q*Nd*d^2/(2*eps)\n",
+"\n",
+"//threshold voltage\n",
+"Vt0=Vd-Vp\n",
+"\n",
+"//conductivity of the channel\n",
+"sigma=q*mu_n*Nd\n",
+"\n",
+"//channel conductance\n",
+"G0=q*sigma*Nd*W*d/L\n",
+"\n",
+"//define the range for gate source voltage\n",
+"Vgs_min=-2.5;\n",
+"Vgs_max=-1;\n",
+"Vgs=Vgs_max:-0.5:Vgs_min;\n",
+"\n",
+"//drain source voltage\n",
+"Vds=0:0.01:5;\n",
+"\n",
+"//compute drain saturation voltage\n",
+"Vds_sat=Vgs-Vt0;\n",
+"\n",
+"//first the drain current is taken into account the channel length modulation\n",
+"for n=1:length(Vgs)\n",
+" if Vgs(n)>Vt0\n",
+" Id_sat=G0*(Vp/3-(Vd-Vgs(n))+2/(3*sqrt(Vp))*(Vd-Vgs(n))^(3/2));\n",
+" else\n",
+" Id_sat=0;\n",
+" end;\n",
+" \n",
+" Id_linear=G0*(Vds-2/(3*sqrt(Vp)).*((Vds+Vd-Vgs(n)).^(3/2)-(Vd-Vgs(n))^(3/2))).*(1+lambda*Vds);\n",
+" Id_saturation=Id_sat*(1+lambda*Vds);\n",
+" Id=Id_linear.*(Vds<=Vds_sat(n))+Id_saturation.*(Vds>Vds_sat(n)); \n",
+" plot(Vds,Id);\n",
+"set(gca(),'auto_clear','off');\n",
+"end;\n",
+"\n",
+"//next the channel length modulation is not taken into account\n",
+"for n=1:length(Vgs)\n",
+" if Vgs(n)>Vt0\n",
+" Id_sat=G0*(Vp/3-(Vd-Vgs(n))+2/(3*sqrt(Vp))*(Vd-Vgs(n))^(3/2));\n",
+" else\n",
+" Id_sat=0;\n",
+" end;\n",
+" \n",
+" Id_linear=G0*(Vds-2/(3*sqrt(Vp)).*((Vds+Vd-Vgs(n)).^(3/2)-(Vd-Vgs(n))^(3/2)));\n",
+" Id_saturation=Id_sat;\n",
+" Id=Id_linear.*(Vds<=Vds_sat(n))+Id_saturation.*(Vds>Vds_sat(n)); \n",
+" plot(Vds, Id);\n",
+"end;\n",
+"\n",
+"//computation of drain saturation current\n",
+"\n",
+"Vgs=0:-0.01:-4;\n",
+"Vds_sat=Vgs-Vt0;\n",
+"\n",
+"Id_sat=G0*(Vp/3-(Vd-Vgs)+2/(3*sqrt(Vp))*(Vd-Vgs).^(3/2)).*(1+lambda*Vds_sat).*(1-(Vgs<Vt0));\n",
+"\n",
+"plot(Vds_sat, Id_sat);\n",
+"\n",
+"mtlb_axis([0 5 0 4]);\n",
+"title('Drain current vs. V_{DS} plotted for different V_{GS}');\n",
+"xlabel('Drain-source voltage V_{DS}, V');\n",
+"ylabel('Drain current I_{D}, A');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: Computation_of_HEMT_related_electric_characteristics.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define problem parameters\n",
+"Nd=1e18*1e6;\n",
+"Vb=0.81;\n",
+"eps_r=12.5;\n",
+"d=50e-9;\n",
+"dWc=3.5e-20;\n",
+"W=10e-6;\n",
+"L=0.5e-6;\n",
+"mu_n=8500*1e-4;\n",
+"\n",
+"//define physical constants\n",
+"q=1.60218e-19;//electron charge\n",
+"eps0=8.85e-12;//permittivity of free space\n",
+"\n",
+"eps=eps_r*eps0;\n",
+"\n",
+"//pinch-off voltage\n",
+"Vp=q*Nd*d^2/(2*eps)\n",
+"\n",
+"//threshold voltage\n",
+"Vth=Vb-dWc/q-Vp\n",
+"\n",
+"//drain-source applied voltage range\n",
+"Vds=0:0.01:5;\n",
+"\n",
+"//gate-source voltages\n",
+"Vgs_r=-1:0.25:0;\n",
+"\n",
+"\n",
+"\n",
+"\n",
+"for n=1:length(Vgs_r)\n",
+" Vgs=Vgs_r(n);\n",
+" Id=mu_n*W*eps/(L*d)*((Vds*(Vgs-Vth)-Vds.*Vds/2).*(1-(Vds>(Vgs-Vth)))+1/2*(Vgs-Vth)^2*(1-(Vds<=(Vgs-Vth))));\n",
+" plot(Vds,Id/1e-3);\n",
+" set(gca(),'auto_clear','off');\n",
+"end;\n",
+" \n",
+"\n",
+"title('Drain current vs. V_{DS} plotted for different V_{GS}');\n",
+"xlabel('Drain-source voltage V_{DS}, V');\n",
+"ylabel('Drain current I_{D}, mA');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Conductivity_of_Si_and_Ge_and_GaAs.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define physical constants\n",
+"q=1.60218e-19;\n",
+"k=1.38066e-23;\n",
+"\n",
+"// define material properties\n",
+"Nc_300=[1.04e19 2.8e19 4.7e17];\n",
+"Nv_300=[6e18 1.04e19 7e18];\n",
+"mu_n= [3900 1500 8500];\n",
+"mu_p= [1900 450 400];\n",
+"Wg= [0.66 1.12 1.424];\n",
+"\n",
+"T0=273;\n",
+"T=-50:250; // temperature range in centigrade\n",
+"\n",
+"sigma=zeros([3 length(T)]);\n",
+"\n",
+"for s=1:3 //loop through all semi conductor materials\n",
+" Nc=Nc_300(s)*((T+T0)/300).^(3/2);\n",
+" Nv=Nv_300(s)*((T+T0)/300).^(3/2);\n",
+"sigma=[q*sqrt(Nc.*Nv).*(exp(-Wg(s)./(2*k*(T+T0)/q)))*(mu_n(s)+mu_p(s))];\n",
+"end;\n",
+"\n",
+"plot(T,sigma(1),T,sigma(2),T,sigma(3));\n",
+"legend('Ge','Si','GaAs',2);\n",
+"title('Conductivity of semiconductor at different temperatures');\n",
+"xlabel('Temperature, {\circ}C');\n",
+"ylabel('Conductivity \sigma, \Omega^{-1}cm^{-1}');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Barrier_Voltage_of_a_pn_Junction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"// doping concentrations\n",
+"Na=1*10^18;\n",
+"Nd=5*10^15;\n",
+"//intrinsic concentrations\n",
+"ni=1.5*10^10;\n",
+"T=300;\n",
+"term=(Na*Nd)/(ni*ni);\n",
+"k=1.38*10^-23;\n",
+"q=1.6*10^-19;\n",
+"Vdiff=(k*T)*log(term)/q;\n",
+"disp('Volts',Vdiff,'Barrier voltage');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Depletion_Layer_Capacitance_of_a_pn_Junction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define problem parameters\n",
+"\n",
+"ni=1.5e10*1e6; //intrinsic carrier concentration in Si [m^(-3)]\n",
+"Na=1e15*1e6; //acceptor doping concentration [m^(-3)]\n",
+"Nd=5e15*1e6; //donor concentration [m^(-3)]\n",
+"A=1e-4*1e-4; //cross sectional area [m^2]\n",
+"eps_r=11.9; //cross sectional area [m^2]\n",
+"\n",
+"//define physical constants (SI units)\n",
+"q=1.60218e-19; //electron charge\n",
+"k=1.38066e-23; //Boltzmann's constant\n",
+"eps0=8.85e-12; //permittivity of free space\n",
+"\n",
+"eps=eps_r*eps0;\n",
+"\n",
+"T=300; //temperatuure\n",
+"\n",
+"//compute diffusion barrier voltage\n",
+"Vdiff=k*T/q*log(Na*Nd/ni^2)\n",
+"\n",
+"//junction capacitance at zero applied voltage\n",
+"C0=A*sqrt(q*eps/(1/Na+1/Nd)/2/Vdiff)\n",
+"\n",
+"//extents of the space charge region\n",
+"dn=sqrt(2*eps*Vdiff/q*Na/Nd/(Na+Nd));\n",
+"dp=sqrt(2*eps*Vdiff/q*Nd/Na/(Na+Nd));\n",
+"\n",
+"//define range for applied voltage\n",
+"VA=-5:0.1:Vdiff;\n",
+"\n",
+"//compute junction capacitance\n",
+"C=C0*(1-VA/Vdiff).^(-1/2);\n",
+"\n",
+"plot(VA,C/1e-12);\n",
+"title('Junction capacitance of abrupt Si pn-contact');\n",
+"xlabel('Applied junction voltage V_A, Volts');\n",
+"ylabel('Junction capacitance C, pF');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: Parameters_of_a_Schottky_diode.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//doping concentrations\n",
+"Nc=2.8*10^19;\n",
+"Nd=1*10^16;\n",
+"term=Nc/Nd;\n",
+"k=1.38*10^-23; //Boltzman's constant\n",
+"q=1.6*10^-19; //charge\n",
+"Vc=(k*T)*log(term)/q;\n",
+"Vm=5.1; //workfunction\n",
+"X=4.05; //affinity\n",
+"Vd=(Vm-X)-Vc; //Barrier Voltage\n",
+"Epsilon=11.9*8.854*10^-12;\n",
+"ds=sqrt((2*Epsilon*Vd)/(q*Nd));\n",
+"A=1*10^-4; //cross-sectional area\n",
+"Cj=(A*Epsilon)/(ds); //junction capacitance\n",
+"disp('Volts',Vc,'Conduction Band potential');\n",
+"disp('Volts',Vd,'Built in Barrier Voltage');\n",
+"disp('metre',ds,'Space Charge Width');\n",
+"disp('Farads',Cj,'Junction Capacitance');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: Maximum_forward_current_gain_of_bipolar_junction_transistor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Ndemitter=1*10^19; // donor concentration in emitter\n",
+"Nabase=1*10^17; //acceptor concentration in base\n",
+"de=0.8*10^-6; //spatial extent of the emitter\n",
+"db=1.2*10^-6; //spatial extent of the base\n",
+"alpha=2.8125;\n",
+"beta=(alpha*Ndemitter*de)/(Nabase*db);\n",
+"disp(beta,'Maximum forward current gain');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: Thermal_analysis_involving_a_BJT_mounted_on_a_heat_sink.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Tj=150;\n",
+"Ts=25;\n",
+"Pw=15;\n",
+"Rthjs=(Tj-Ts)/Pw; //Junction-to-solder point resistance\n",
+"Rthca=2;\n",
+"Rthhs=10;\n",
+"Ta=60;\n",
+"Rthtot=Rthjs+Rthca+Rthhs; //total thermal resistance\n",
+"Pth=(Tj-Ta)/(Rthtot); //dissipated power\n",
+"disp('Watts',Pth,'Maximum dissipated power');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: Drain_saturation_current_in_a_MESFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define problem parameters\n",
+"Nd=1e16*1e6;\n",
+"d=0.75e-6;\n",
+"W=10e-6;\n",
+"L=2e-6;\n",
+"eps_r=12;\n",
+"Vd=0.8;\n",
+"mu_n=8500e-4;\n",
+"Vgs=0:-0.01:-4;\n",
+"\n",
+"//define physical constants\n",
+"q=1.60218e-19;// electron charge\n",
+"eps0=8.85e-12;// permittivity of free space\n",
+"\n",
+"eps=eps_r*eps0;\n",
+"\n",
+"//pinch-off voltage\n",
+"Vp=q*Nd*d^2/(2*eps)\n",
+"\n",
+"//threshold voltage\n",
+"Vt0=Vd-Vp\n",
+"\n",
+"//conductivity of the channel\n",
+"sigma=q*mu_n*Nd\n",
+"\n",
+"//Channel conductance\n",
+"G0=q*sigma*Nd*W*d/L\n",
+"\n",
+"//saturation current using the exact formula\n",
+"Id_sat=G0*(Vp/3-(Vd-Vgs)+2/(3*sqrt(Vp))*(Vd-Vgs).^(3/2)).*(1-(Vgs<Vt0));\n",
+"Idss=Id_sat(1)\n",
+"\n",
+"//saturation current using the quadratic law approximation\n",
+"Id_sat_square=Idss*(1-Vgs/Vt0)^2;\n",
+"\n",
+"plot(Vgs,Id_sat,Vgs,Id_sat_square);\n",
+"legend('exact formula', 'quadratic approximation',2);\n",
+"title('FET saturation current as a function of the gate-source voltage');\n",
+"xlabel('Gate-source voltage V_{GS}, V');\n",
+"ylabel('Drain saturation current I_{DSat}, A');"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/7-Active_RF_Component_Modelling.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/7-Active_RF_Component_Modelling.ipynb
new file mode 100644
index 0000000..1e78abd
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/7-Active_RF_Component_Modelling.ipynb
@@ -0,0 +1,275 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Active RF Component Modelling"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: Small_signal_pn_diode_model.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define problem parameters\n",
+"TT=500e-12; // transit time\n",
+"T0=300; //temperature\n",
+"Is0=5e-15; // reverse saturation current at 300K\n",
+"Rs=1.5; // series resistance\n",
+"nn=1.16; //emission coefficient\n",
+"\n",
+"// parameters needed to describe temperature behavior of \n",
+"// the band-gap energy in Si\n",
+"alpha=7.02e-4; \n",
+"beta=1108;\n",
+"Wg0=1.16;\n",
+"pt=3;\n",
+"\n",
+"// quiescent current\n",
+"Iq=50e-3;\n",
+"\n",
+"// frequency range 10MHz to 1GHz\n",
+"f_min=10e6; // lower limit\n",
+"f_max=1e9; //upper limit\n",
+"N=300; // number of points in the graph\n",
+"f=f_min*((f_max/f_min).^((0:N)/N)); // compute frequency points on log scale\n",
+"\n",
+"// temperatures for which analysis will be performed\n",
+"T_points=[250 300 350 400];\n",
+"\n",
+"// define physical constants\n",
+"q=1.60218e-19; // electron charge\n",
+"k=1.38066e-23; // Boltzmann's constant\n",
+"\n",
+"for n=1:length(T_points) \n",
+" T=T_points(n);\n",
+" s=sprintf('T=%.f\n',T);\n",
+" Vt=k*T/q;\n",
+" \n",
+" Wg=Wg0-alpha*T^2/(beta+T);\n",
+" s=sprintf('%s Wg(T)=%f\n',s,Wg);\n",
+" \n",
+" Is=Is0*(T/T0)^(pt/nn)*exp(-Wg/Vt*(1-T/T0));\n",
+" s=sprintf('%s Is(T)=%e\n',s,Is);\n",
+" \n",
+" Vq=nn*Vt*log(1+Iq/Is);\n",
+" s=sprintf('%s Vq(T)=%f\n',s,Vq);\n",
+" \n",
+" Rd=nn*Vt/Iq;\n",
+" s=sprintf('%s Rd(T)=%f\n',s,Rd);\n",
+" \n",
+" Cd=Is*TT/nn/Vt*exp(Vq/nn/Vt);\n",
+" s=sprintf('%s Cd(T)=%fpF\n',s,Cd/1e-12)\n",
+" \n",
+" Zc=1./(%i*2*%pi*f*Cd);\n",
+" \n",
+" Zin=Rs+Rd*Zc./(Rd+Zc);\n",
+" \n",
+" plot(f/1e6,abs(Zin));\n",
+" set(gca(),'auto_clear','off');\n",
+"end; \n",
+"\n",
+"title('Frequency behavior of small-signal diode model');\n",
+"xlabel('Frequency {\itf}, MHz');\n",
+"ylabel('Impedance |Z|, \Omega');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: Parameters_of_BJT.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//first we define all parameters for the transistor and the circuit\n",
+"Z0=50; //characteristic imedance of the system\n",
+"\n",
+"Vcc=3.6; //power supply voltage\n",
+"Vce=2; //collector voltage \n",
+"Ic=10e-3; //collector current\n",
+"\n",
+"T=300; //ambient temperature (300K)\n",
+"\n",
+"//transistor parameters (they are very similar to BFG403W)\n",
+"beta=145; // current gain\n",
+"Is=5.5e-18; // saturation current\n",
+"VAN= 30; // forward Early voltage\n",
+"tau_f=4e-12; // forward transition time\n",
+"rb=125; // base resistance\n",
+"rc=15; // collector resistance\n",
+"re=1.5; // emitter resistance\n",
+"Lb=1.1e-9; // base inductance\n",
+"Lc=1.1e-9; // collector inductance\n",
+"Le=0.5e-9; // emitter inductance\n",
+"Cjc=16e-15; // collector junction capacitance at zero applied voltage\n",
+"mc=0.2; // collector junction grading coefficient\n",
+"Cje=37e-15; // emitter junction capacitance at zero applied voltage\n",
+"me=0.35; // emitter junction grading coefficient\n",
+"phi_be=0.9; // base-emitter diffusion potential\n",
+"phi_bc=0.6; // base-collector diffusion potential\n",
+"Vbe=phi_be; // base-emitter voltage\n",
+"\n",
+"// some physical constants\n",
+"k=1.38e-23; // Boltzmann's constant\n",
+"q=1.6e-19; // elementary charge\n",
+"VT=k*T/q; // thermal potential\n",
+"\n",
+"disp('DC biasing parameters');\n",
+"\n",
+"Ib=Ic/beta;\n",
+"disp('Amperes',Ib,'Base current');\n",
+"\n",
+"Rc=(Vcc-Vce)/Ic;\n",
+"disp('Ohms',Rc,'Collector resistance');\n",
+"\n",
+"Rb=(Vcc-Vbe)/Ib;\n",
+"disp('Ohms',Rb,'Base resistance');\n",
+"\n",
+"\n",
+"r_pi=VT/Ib;\n",
+"disp('Ohms',r_pi,'Rpi');\n",
+"\n",
+"r0=VAN/Ic;\n",
+"disp('Ohms',r0,'R0');\n",
+"\n",
+"gm=beta/r_pi;\n",
+"disp('Mho',gm,'Gm');\n",
+"\n",
+"Vbc=Vbe-Vce;\n",
+"Cmu=Cjc*(1-Vbc/phi_bc)^(-mc);\n",
+"disp('Farads',Cmu,'base collector capacitance');\n",
+"\n",
+"if(Vbe<0.5*phi_be)\n",
+" Cpi_junct=Cje*(1-Vbe/phi_be)^(-me);\n",
+"else\n",
+" C_middle=Cje*0.5^(-me);\n",
+" k_middle=1-0.5*me;\n",
+" Cpi_junct=C_middle*(k_middle+me*Vbe/phi_be);\n",
+"end;\n",
+"\n",
+"disp('Farads',Cpi_junct,'Junction Capacitance');\n",
+"\n",
+"Cpi_diff=Is*tau_f/VT*exp(Vbe/VT);\n",
+"disp('Farads',Cpi_diff,'Differential capacitance');\n",
+"\n",
+"Cpi=Cpi_junct+Cpi_diff;\n",
+"disp('Farads',Cpi,'Total Capacitance');\n",
+"\n",
+"C_miller=Cmu*(1+gm*r_pi/(r_pi+rb)*Z0*r0/(r0+rc+Z0));\n",
+"disp('Farads',C_miller,'Miller Capacitance');\n",
+"\n",
+"C_input=Cpi+C_miller;\n",
+"disp('Farads',C_input,'Total input capacitance');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: Cutoff_frequency_of_GaAs_MESFET.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"l=1*10^-6; //length\n",
+"w=200*10^-6; //width\n",
+"d=0.5*10^-6; //depth\n",
+"E0=8.854*10^-12; \n",
+"Er=13.1;\n",
+"q=1.6*10^-19; //electron charge\n",
+"Nd=1*10^16; //doping concentration\n",
+"mun=8500;\n",
+"Vp=(q*Nd*d^2)/(2*Er*E0);\n",
+"G0=(q*mun*Nd*w)/l;\n",
+"gm=0.0358;\n",
+"Cap=(E0*Er*w*l)/d;\n",
+"fT=gm/(2*%pi*Cap);\n",
+"disp('Hertz',fT,'Cut off frequency');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: Small_signal_Hybrid_pi_parameters_without_Miller_Effect.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Icq=6*10^-3;\n",
+"Ibq=40*10^-6;\n",
+"Van=30; //Early voltage\n",
+"q=1.6*10^-19;\n",
+"k=1.38*10^-23;\n",
+"T=300;\n",
+"fT=37*10^9; //Transition frequency\n",
+"gm=(Icq*q)/(k*T);\n",
+"beta0=Icq/Ibq;\n",
+"r0=Van/Icq;\n",
+"rpi=beta0/gm;\n",
+"Cpi=(beta0)/(2*%pi*fT*rpi);\n",
+"disp('Hybrid pi parametrs without Miller effect');\n",
+"disp('Mho',gm,'gm');\n",
+"disp('Ohms',rpi,'Rpi');\n",
+"disp('Farads',Cpi,'Cpi');\n",
+"disp('Ohms',r0,'R0');\n",
+"disp(beta0,'Beta0');"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/8-Matching_and_biasing_networks.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/8-Matching_and_biasing_networks.ipynb
new file mode 100644
index 0000000..4ec24bf
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/8-Matching_and_biasing_networks.ipynb
@@ -0,0 +1,97 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Matching and biasing networks"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.11: Efficiency_of_different_types_of_amplifiers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"theta=(1:1:360)/180*%pi; //define conduction angle\n",
+"\n",
+"//compute efficiency\n",
+"nu=-1/2*(theta-sin(theta))./(theta.*cos(theta/2)-2*sin(theta/2)); \n",
+"\n",
+"plot(theta/%pi*180,nu*100,'r','linewidth',2);\n",
+"set(gca(),'auto_clear','off');\n",
+"plot([0 180],[%pi/4*100 %pi/4*100],'b:');\n",
+"plot([180 180],[0 %pi/4*100],'b:');\n",
+"plot(180,%pi/4*100,'bo');\n",
+"plot(360,50,'bo');\n",
+"mtlb_axis([0 360 50 100]);\n",
+"title('Maximum theoretical efficiency of the amplifier');\n",
+"xlabel('Conduction angle \Theta_0, deg.');\n",
+"ylabel('Efficiency \eta, %');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.12: Design_of_passive_biasing_networks_for_a_BJT_in_CE_config.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"Ic=10*10^-3; //Collector current\n",
+"Vce=3;\n",
+"Vcc=5;\n",
+"beta=100; //current gain\n",
+"Vbe=0.8;\n",
+"I1=Ic+Ic/beta;\n",
+"R1=(Vcc-Vce)/I1;\n",
+"R2=(Vce-Vbe)/(Ic/beta);\n",
+"Vx=1.5;\n",
+"R3=(Vx-Vbe)/(Ic/beta);\n",
+"Ix=10*(Ic/beta);\n",
+"R11=(Vx/Ix);\n",
+"R22=(Vcc-Vx)/(Ix+(Ic/beta));\n",
+"R4=(Vcc-Vce)/Ic;\n",
+"disp('Amperes',I1,'I1','Ohms',R1,'R1','Ohms',R2,'R2','Ohms',R3,'R3','Ohms',R11,'R11','Ohms',R22,'R22','Ohms',R4,'R4');"
+ ]
+ }
+],
+"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/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/9-RF_Transistor_Amplifier_Design.ipynb b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/9-RF_Transistor_Amplifier_Design.ipynb
new file mode 100644
index 0000000..2574161
--- /dev/null
+++ b/Radio_Frequency_Circuit_Design_by_R_Ludwig_And_G_Bogdanov/9-RF_Transistor_Amplifier_Design.ipynb
@@ -0,0 +1,471 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: RF Transistor Amplifier Design"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.13: Amplifier_design_using_the_constant_operating_gain_circles.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define the S-parameters of the transistor\n",
+"s11=0.3*exp(%i*(+30)/180*%pi);\n",
+"s12=0.2*exp(%i*(-60)/180*%pi);\n",
+"s21=2.5*exp(%i*(-80)/180*%pi);\n",
+"s22=0.2*exp(%i*(-15)/180*%pi);\n",
+"\n",
+"K=1.18\n",
+"\n",
+"//find the maximum gain\n",
+"Gmax=abs(s21/s12)*(K-sqrt(K^2-1));\n",
+"Gmax_dB=10*log10(Gmax)\n",
+"\n",
+"//specify the target gain\n",
+"G_goal_dB=8; //would like to build an amplifier with 8dB gain\n",
+"G_goal=10^(G_goal_dB/10); //convert from dB to normal units\n",
+"\n",
+"//find constant operating power gain circles\n",
+"go=G_goal/abs(s21)^2;\n",
+"\n",
+"//find the center of the constant operating power gain circle\n",
+"dgo=go*conj(s22-conj(s11))/(1+go*(abs(s22)^2));\n",
+"\n",
+"\n",
+"//find the radius of the circle \n",
+"rgo1=sqrt(1-2*K*go*abs(s12*s21)+go^2*abs(s12*s21)^2);\n",
+"rgo=rgo1/abs(1+go*(abs(s22)^2));\n",
+"\n",
+"//plot a circle in the Smith Chart\n",
+"a=(0:360)/180*%pi;\n",
+"\n",
+"set(gca(),'auto_clear','off');\n",
+"plot(real(dgo)+rgo*cos(a),imag(dgo)+rgo*sin(a),'r','linewidth',2);\n",
+"\n",
+"//choose the load reflection coefficient\n",
+"zL=1-%i*0.53\n",
+"GL=(zL-1)/(zL+1);\n",
+"\n",
+"plot(real(GL),imag(GL),'bo');\n",
+"\n",
+"[Ro,Theta]=polar(atan(imag(Gs),real(Gs)));\n",
+"Gin=s11+s12*s21*GL/(1-s22*GL);\n",
+"Gs=conj(Gin);\n",
+"Gs_abs=abs(Gs)\n",
+"Gs_angle=(Theta/%pi)*180;\n",
+"\n",
+"zs=(1+Gs)/(1-Gs);\n",
+"\n",
+"\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.14: Design_of_small_signal_amplifier_for_minimum_noise_figure_and_specified_gain.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"global Z0;\n",
+"Z0=50;\n",
+"\n",
+"//define the S-parameters of the transistor\n",
+"s11=0.3*exp(%i*(+30)/180*%pi);\n",
+"s12=0.2*exp(%i*(-60)/180*%pi);\n",
+"s21=2.5*exp(%i*(-80)/180*%pi);\n",
+"s22=0.2*exp(%i*(-15)/180*%pi);\n",
+"\n",
+"//pick the noise parameters of the transistor\n",
+"Fmin_dB=1.5\n",
+"Fmin=10^(Fmin_dB/10);\n",
+"Rn=4;\n",
+"Gopt=0.5*exp(%i*45/180*%pi);\n",
+"\n",
+"//compute a noise circle\n",
+"Fk_dB=1.6;\n",
+"Fk=10^(Fk_dB/10);\n",
+"\n",
+"\n",
+"Qk=abs(1+Gopt)^2*(Fk-Fmin)/(4*Rn/Z0) //noise circle parameter\n",
+"dfk=Gopt/(1+Qk); //circle center location\n",
+"rfk=sqrt((1-abs(Gopt)^2)*Qk+Qk^2)/(1+Qk) //circle radius\n",
+" \n",
+"\n",
+"//plot a noise circle\n",
+"a=[0:360]/180*%pi;\n",
+"set(gca(),'auto_clear','off');\n",
+"plot(real(dfk)+rfk*cos(a),imag(dfk)+rfk*sin(a),'b','linewidth',2);\n",
+"\n",
+"// plot optimal reflection coefficient\n",
+"plot(real(Gopt),imag(Gopt),'bo');\n",
+"\n",
+"\n",
+"//specify the desired gain\n",
+"G_goal_dB=8;\n",
+"G_goal=10^(G_goal_dB/10);\n",
+"\n",
+"//find the constant operating power gain circles\n",
+"go=G_goal/abs(s21)^2; // normalized the gain\n",
+"dgo=go*conj(s22-conj(s11))/(1+go*(abs(s22)^2)); //center\n",
+"\n",
+"rgo=sqrt(1-2*K*go*abs(s12*s21)+go^2*abs(s12*s21)^2);\n",
+"rgo=rgo/abs(1+go*(abs(s22)^2));\n",
+"\n",
+"//map a constant gain circle into the Gs plane\n",
+"rgs=rgo*abs(s12*s21/(abs(1-s22*dgo)^2-rgo^2*abs(s22)^2));\n",
+"dgs=((1-s22*dgo)*conj(s11-dgo)-rgo^2*s22)/(abs(1-s22*dgo)^2-rgo^2*abs(s22)^2);\n",
+"\n",
+"//plot a constant gain circle in the Smith Chart\n",
+"set(gca(),'auto_clear','off');\n",
+"plot(real(dgs)+rgs*cos(a),imag(dgs)+rgs*sin(a),'r','linewidth',2);\n",
+"\n",
+"\n",
+"\n",
+"//choose a source reflection coefficient Gs\n",
+"Gs=dgs+%i*rgs;\n",
+"plot(real(Gs), imag(Gs), 'ro');\n",
+"//text(real(Gs)-0.05,imag(Gs)+0.08,'\bf\Gamma_S');\n",
+"\n",
+"//find the actual noise figure\n",
+"F=Fmin+4*Rn/Z0*abs(Gs-Gopt)^2/(1-abs(Gs)^2)/abs(1+Gopt)^2;\n",
+"\n",
+"//print out the actual noise figure\n",
+"Actual_F_dB=10*log10(F)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.15: Constant_VSWR_design_for_given_gain_and_noise_figure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"global Z0;\n",
+"Z0=50;\n",
+"\n",
+"//define the S-parameters of the transistor\n",
+"s11=0.3*exp(%i*(+30)/180*%pi);\n",
+"s12=0.2*exp(%i*(-60)/180*%pi);\n",
+"s21=2.5*exp(%i*(-80)/180*%pi);\n",
+"s22=0.2*exp(%i*(-15)/180*%pi);\n",
+"\n",
+"//noise parameters of the transistor\n",
+"Fmin_dB=1.5\n",
+"Fmin=10^(Fmin_dB/10);\n",
+"Rn=4;\n",
+"Gopt=0.5*exp(%i*45/180*%pi);\n",
+"\n",
+"\n",
+"//compute a noise circle\n",
+"Fk_dB=1.6;//desired noise performance\n",
+"Fk=10^(Fk_dB/10);\n",
+"\n",
+"Qk=abs(1+Gopt)^2*(Fk-Fmin)/(4*Rn/Z0); //noise circle parameter\n",
+"dfk=Gopt/(1+Qk); //circle center location\n",
+"rfk=sqrt((1-abs(Gopt)^2)*Qk+Qk^2)/(1+Qk); //circle radius\n",
+"\n",
+"\n",
+"//plot a noise circle\n",
+"a=[0:360]/180*%pi;\n",
+"set(gca(),'auto_clear','off');\n",
+"plot(real(dfk)+rfk*cos(a),imag(dfk)+rfk*sin(a),'b','linewidth',2);\n",
+"\n",
+"//specify the goal gain\n",
+"G_goal_dB=8;\n",
+"G_goal=10^(G_goal_dB/10);\n",
+"\n",
+"\n",
+"//find constant operating power gain circles\n",
+"go=G_goal/abs(s21)^2; //normalized gain\n",
+"dgo=go*conj(s22-delta*conj(s11))/(1+go*(abs(s22)^2)); //center\n",
+"\n",
+"rgo=sqrt(1-2*K*go*abs(s12*s21)+go^2*abs(s12*s21)^2);\n",
+"rgo=rgo/abs(1+go*(abs(s22)^2)); //radius\n",
+"\n",
+"//map a constant gain circle into the Gs plane\n",
+"rgs=rgo*abs(s12*s21/(abs(1-s22*dgo)^2-rgo^2*abs(s22)^2));\n",
+"dgs=((1-s22*dgo)*conj(s11-delta*dgo)-rgo^2*s22)/(abs(1-s22*dgo)^2-rgo^2*abs(s22)^2);\n",
+"\n",
+"//plot constant gain circle in the Smith Chart\n",
+"set(gca(),'auto_clear','off');\n",
+"plot(real(dgs)+rgs*cos(a),imag(dgs)+rgs*sin(a),'r','linewidth',2);\n",
+"\n",
+"\n",
+"//choose a source reflection coefficient Gs\n",
+"Gs=dgs+%i*rgs;\n",
+"\n",
+"//find the corresponding GL\n",
+"GL=(s11-conj(Gs))/(delta-s22*conj(Gs));\n",
+"\n",
+"//find the actual noise figure\n",
+"F=Fmin+4*Rn/Z0*abs(Gs-Gopt)^2/(1-abs(Gs)^2)/abs(1+Gopt)^2;\n",
+"\n",
+"//% print out the actual noise figure\n",
+"Actual_F_dB=10*log10(F)\n",
+"\n",
+"//find the input and output reflection coefficients\n",
+"Gin=s11+s12*s21*GL/(1-s22*GL);\n",
+"Gout=s22+s12*s21*Gs/(1-s11*Gs);\n",
+"\n",
+"\n",
+"//find the VSWRin and VSWRout\n",
+"Gimn=abs((Gin-conj(Gs))/(1-Gin*Gs));\n",
+"Gomn=abs((Gout-conj(GL))/(1-Gout*GL));\n",
+"\n",
+"VSWRin=(1+Gimn)/(1-Gimn); //VSWRin should be unity since we used the constant operating gain approach\n",
+"VSWRout=(1+Gomn)/(1-Gomn);\n",
+"\n",
+"//specify the desired VSWRin\n",
+"VSWRin=1.5;\n",
+"\n",
+"//find parameters for constant VSWR circle\n",
+"Gimn=(1-VSWRin)/(1+VSWRin)\n",
+"dvimn=(1-Gimn^2)*conj(Gin)/(1-abs(Gimn*Gin)^2); //circle center\n",
+"rvimn=(1-abs(Gin)^2)*abs(Gimn)/(1-abs(Gimn*Gin)^2); //circle radius\n",
+"\n",
+"//plot VSWRin=1.5 circle in the Smith Chart\n",
+"plot(real(dvimn)+rvimn*cos(a),imag(dvimn)+rvimn*sin(a),'g','linewidth',2);\n",
+"\n",
+"\n",
+"//plot a graph of the output VSWR as a function of the Gs position on the constant VSWRin circle \n",
+"Gs=dvimn+rvimn*exp(%i*a); \n",
+"Gout=s22+s12*s21*Gs./(1-s11*Gs);\n",
+"\n",
+"//find the reflection coefficients at the input and output matching networks\n",
+"Gimn=abs((Gin-conj(Gs))./(1-Gin*Gs));\n",
+"Gomn=abs((Gout-conj(GL))./(1-Gout*GL));\n",
+"\n",
+"//and find the corresponding VSWRs\n",
+"VSWRin=(1+Gimn)./(1-Gimn);\n",
+"VSWRout=(1+Gomn)./(1-Gomn);\n",
+"\n",
+"figure; //open new figure for the VSWR plot\n",
+"plot(a/%pi*180,VSWRout,'r',a/%pi*180,VSWRin,'b','linewidth',2);\n",
+"legend('VSWR_{out}','VSWR_{in}');\n",
+"title('Input and output VSWR as a function of \Gamma_S position');\n",
+"xlabel('Angle \alpha, deg.');\n",
+"ylabel('Input and output VSWRs');\n",
+"mtlb_axis([0 360 1.3 2.3])\n",
+"\n",
+"\n",
+"//choose a new source reflection coefficient\n",
+"Gs=dvimn+rvimn*exp(%i*85/180*%pi);\n",
+"\n",
+"//find the corresponding output reflection coefficient\n",
+"Gout=s22+s12*s21*Gs./(1-s11*Gs);\n",
+"\n",
+"//compute the transducer gain in this case\n",
+"GT=(1-abs(GL)^2)*abs(s21)^2.*(1-abs(Gs).^2)./abs(1-GL*Gout).^2./abs(1-Gs*s11).^2;\n",
+"GT_dB=10*log10(GT)\n",
+"\n",
+"//find the input and output matching network reflection coefficients\n",
+"Gimn=abs((Gin-conj(Gs))./(1-Gin*Gs));\n",
+"Gomn=abs((Gout-conj(GL))./(1-Gout*GL));\n",
+"\n",
+"//and find the corresponding VSWRs\n",
+"VSWRin=(1+Gimn)./(1-Gimn)\n",
+"VSWRout=(1+Gomn)./(1-Gomn)\n",
+"\n",
+"//also compute the obtained noise figure\n",
+"F=Fmin+4*Rn/Z0*abs(Gs-Gopt)^2/(1-abs(Gs)^2)/abs(1+Gopt)^2;\n",
+"F_dB=10*log10(F)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1: Power_relations_for_an_RF_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//defining scattering parameters\n",
+"S11=0.102-%i*0.281;\n",
+"S21=0.305+%i*3.486;\n",
+"S12=0.196-%i*0.03471;\n",
+"S22=0.2828-%i*0.2828;\n",
+"\n",
+"Vs=5;\n",
+"Zs=40;\n",
+"Zl=73;\n",
+"Z0=50;\n",
+"\n",
+"Ts=(Zs-Z0)/(Zs+Z0);\n",
+"Tl=(Zl-Z0)/(Zl+Z0);\n",
+"Tin=S11+(S21*S12*Tl)/(1-S22*Tl);\n",
+"Tout=S22+(S12*S21*Ts)/(1-S11*Ts);\n",
+"\n",
+"a=S21^2;\n",
+"b=1-Ts^2;\n",
+"c=1-Tl^2;\n",
+"\n",
+"Gt=(c*a*b)/((1-Tl*Tout)^2*(1-S11*Ts)^2);\n",
+"Gtu=(c*a*b)/((1-Tl*S22)^2*(1-S11*Ts)^2);\n",
+"Ga=(a*b)/((1-Tout)^2*(1-S11*Ts)^2);\n",
+"G=(a*c)/((1-Tin)^2*(1-S22*Tl)^2);\n",
+"\n",
+"d=abs(Gt);\n",
+"\n",
+"Pin=(Z0*(Vs)^2)/((Zs+Z0)^2*(1-Tin*Ts)^2*2);\n",
+"pinR=real(Pin);\n",
+"pinI=imag(Pin);\n",
+"Pinc=sqrt(pinR^2+pinI^2);\n",
+"PA=78.1*10^-3;\n",
+"Pl=PA*d;\n",
+"disp(Pl,'Power delivered to load in watts');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7: Computation_of_source_gain_circles_for_a_unilateral_design.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"//define s11 parameter of the transistor\n",
+"s11=0.7*exp(%i*(125)/180*%pi);\n",
+"\n",
+"//compute the maximum gain achievable by the input matching network\n",
+"Gs_max=1/(1-abs(s11)^2);\n",
+"Gs_max_dB=10*log10(Gs_max)\n",
+"\n",
+"//find the reflection coefficient for the maximum gain\n",
+"Gs_opt=conj(s11);\n",
+"\n",
+"//draw a straight line connecting Gs_opt and the origin\n",
+"set(gca(),'auto_clear','off');\n",
+"plot([0 real(Gs_opt)],[0 imag(Gs_opt)],'b');\n",
+"plot(real(Gs_opt),imag(Gs_opt),'bo');\n",
+"\n",
+"//specify the angle for the constant gain circles\n",
+"a=(0:360)/180*%pi;\n",
+"\n",
+"//plot source gain circles\n",
+"gs_db=[-1 0 1 2 2.6];\n",
+"gs=exp(gs_db/10*log(10))/Gs_max;\n",
+"\n",
+"for n=1:length(gs)\n",
+" dg=gs(n)*conj(s11)/(1-abs(s11)^2*(1-gs(n)));\n",
+" rg=sqrt(1-gs(n))*(1-abs(s11)^2)/(1-abs(s11)^2*(1-gs(n)));\n",
+" plot(real(dg)+rg*cos(a),imag(dg)+rg*sin(a),'r','linewidth',2);\n",
+"end;"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8: Design_of_18_dB_single_stage_MESFET_amplifier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"s11=0.5*exp(%i*(-60)/180*%pi);\n",
+"s12=0.02*exp(%i*(-0)/180*%pi);\n",
+"s21=6.5*exp(%i*(+115)/180*%pi);\n",
+"s22=0.6*exp(%i*(-35)/180*%pi);\n",
+"\n",
+"Gs_max=1/(1-abs(s11)^2);\n",
+"Gl_max=1/(1-abs(s22)^2);\n",
+"\n",
+"G0=abs(s21)^2;\n",
+"\n",
+"Gmax=Gs_max*G0*Gl_max;\n",
+"Gs_max_dB=10*log10(Gs_max)\n",
+"Gl_max_dB=10*log10(Gl_max)\n",
+"G0_dB=10*log10(G0)\n",
+"Gmax_dB=10*log10(Gmax)\n",
+"Ggoal_dB=18;\n",
+"Gload_dB=Ggoal_dB-G0_dB-Gs_max_dB;\n",
+"Gl_opt=conj(s22);\n",
+"\n",
+"set(gca(),'auto_clear','off');\n",
+"plot([0 real(Gl_opt)],[0 imag(Gl_opt)],'b');\n",
+"plot(real(Gl_opt),imag(Gl_opt),'bo');\n",
+"a=(0:360)/180*%pi;\n",
+"gl=exp([Gload_dB]/10*log(10))/Gl_max;\n",
+"dg=gl*conj(s22)/(1-abs(s22)^2*(1-gl));\n",
+"rg=sqrt(1-gl)*(1-abs(s22)^2)/(1-abs(s22)^2*(1-gl));\n",
+"plot(real(dg)+rg*cos(a),imag(dg)+rg*sin(a),'b','linewidth',2);"
+ ]
+ }
+],
+"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
+}