0% found this document useful (0 votes)
343 views85 pages

Radio Frequency Circuit Design - R. Ludwig and G. Bogdanov

This document provides a Scilab textbook companion for the book "Radio Frequency Circuit Design" by R. Ludwig And G. Bogdanov. It contains over 100 Scilab codes that correspond to examples and concepts from the textbook. The codes are organized by chapter and cover topics like transmission line analysis, the Smith Chart, RF filters, active RF components, amplifier design, and oscillators. Each code is accompanied by explanatory text that relates it back to the relevant section of the textbook. Figures and tables generated by the codes are also included to aid understanding of the concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
343 views85 pages

Radio Frequency Circuit Design - R. Ludwig and G. Bogdanov

This document provides a Scilab textbook companion for the book "Radio Frequency Circuit Design" by R. Ludwig And G. Bogdanov. It contains over 100 Scilab codes that correspond to examples and concepts from the textbook. The codes are organized by chapter and cover topics like transmission line analysis, the Smith Chart, RF filters, active RF components, amplifier design, and oscillators. Each code is accompanied by explanatory text that relates it back to the relevant section of the textbook. Figures and tables generated by the codes are also included to aid understanding of the concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Scilab Textbook Companion for

Radio Frequency Circuit Design


by R. Ludwig And G. Bogdanov1

Created by
Monisha Dhirmalani
Engineering
Others
Mumbai University
College Teacher
Monali Chaudhari
Cross-Checked by

July 30, 2019

1 Funded by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the ”Textbook Companion Project”
section at the website http://scilab.in
Book Description

Title: Radio Frequency Circuit Design

Author: R. Ludwig And G. Bogdanov

Publisher: Pearson Education India, New Delhi

Edition: 2

Year: 2011

ISBN: 978-81-317-6218-9

1
Scilab numbering policy used in this document and the relation to the
above book.

Exa Example (Solved example)

Eqn Equation (Particular equation of the above book)

AP Appendix to Example(Scilab Code that is an Appednix to a particular


Example of the above book)

For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

2
Contents

List of Scilab Codes 4

1 Introduction 6

2 Transmission line analysis 13

3 The Smith Chart 22

4 Single and Multiport Networks 25

5 An Overview of RF Filter Design 27

6 Active RF Components 32

7 Active RF Component Modelling 47

8 Matching and biasing networks 54

9 RF Transistor Amplifier Design 57

10 Oscillators and Mixers 73

3
List of Scilab Codes

Exa 1.1 Intrinsic wave impedance . . . . . . . . . . . 6


Exa 1.2 Comparing Inductances at different frequen-
cies . . . . . . . . . . . . . . . . . . . . . . . 6
Exa 1.3 Frequency response of high frequency resistor 7
Exa 1.4 Frequency response of high frequency capaci-
tor . . . . . . . . . . . . . . . . . . . . . . . 8
Exa 1.5 frequency response of high frequency inductor 10
Exa 2.1 Magnetic field inside and outside infinitely
long current carrying wire . . . . . . . . . . 13
Exa 2.3 Transmission line parameters of a parallel cop-
per plate transmission line . . . . . . . . . . 15
Exa 2.5 Phase velocity and Wavelength of PCB ma-
terial . . . . . . . . . . . . . . . . . . . . . . 15
Exa 2.6 Input Impedance for a short circuited trans-
mission line . . . . . . . . . . . . . . . . . . 16
Exa 2.7 Input impedance of open circuited transmis-
sion line . . . . . . . . . . . . . . . . . . . . 17
Exa 2.8 Quarter wave parallel plate line transformer 20
Exa 2.9 Power considerations of a transmission line . 20
Exa 2.10 Return Loss of Transmission line section . . 21
Exa 3.2 Input Impedance . . . . . . . . . . . . . . . 22
Exa 3.4 SWR circles . . . . . . . . . . . . . . . . . . 22
Exa 4.3 Internal resistances and current gain of BJT 25
Exa 4.7 S parameters and resistive elements of T net-
work . . . . . . . . . . . . . . . . . . . . . . 25
Exa 5.1 Resonance frequency of a Bandpass filter . . 27
Exa 5.2 Quality factors of a filter . . . . . . . . . . . 29
Exa 6.1 Conductivity of Si and Ge and GaAs . . . . 32

4
Exa 6.2 Barrier Voltage of a pn Junction . . . . . . 34
Exa 6.3 Depletion Layer Capacitance of a pn Junction 34
Exa 6.4 Parameters of a Schottky diode . . . . . . . 37
Exa 6.7 Maximum forward current gain of bipolar junc-
tion transistor . . . . . . . . . . . . . . . . . 37
Exa 6.8 Thermal analysis involving a BJT mounted
on a heat sink . . . . . . . . . . . . . . . . . 38
Exa 6.9 Drain saturation current in a MESFET . . . 38
Exa 6.10 Current Voltage characterisitcs of a MESFET 42
Exa 6.11 Computation of HEMT related electric char-
acteristics . . . . . . . . . . . . . . . . . . . 44
Exa 7.1 Small signal pn diode model . . . . . . . . . 47
Exa 7.4 Parameters of BJT . . . . . . . . . . . . . . 50
Exa 7.5 Cutoff frequency of GaAs MESFET . . . . . 52
Exa 7.6 Small signal Hybrid pi parameters without
Miller Effect . . . . . . . . . . . . . . . . . . 53
Exa 8.11 Efficiency of different types of amplifiers . . 54
Exa 8.12 Design of passive biasing networks for a BJT
in CE config . . . . . . . . . . . . . . . . . . 56
Exa 9.1 Power relations for an RF amplifier . . . . . 57
Exa 9.7 Computation of source gain circles for a uni-
lateral design . . . . . . . . . . . . . . . . . 58
Exa 9.8 Design of 18 dB single stage MESFET ampli-
fier . . . . . . . . . . . . . . . . . . . . . . . 59
Exa 9.13 Amplifier design using the constant operating
gain circles . . . . . . . . . . . . . . . . . . 61
Exa 9.14 Design of small signal amplifier for minimum
noise figure and specified gain . . . . . . . . 64
Exa 9.15 Constant VSWR design for given gain and
noise figure . . . . . . . . . . . . . . . . . . 67
Exa 10.1 Design of a Colpitt oscillator . . . . . . . . . 73
Exa 10.2 Prediction of resonance frequencies of quartz
crystal . . . . . . . . . . . . . . . . . . . . . 74
Exa 10.3 Adding a positive feedback element to initiate
oscillations . . . . . . . . . . . . . . . . . . 75
Exa 10.6 Dielectric resonator oscillator design . . . . 78
Exa 10.8 Local oscillator frequency selection . . . . . 80

5
List of Figures

1.1 Frequency response of high frequency resistor . . . . . . . . 8


1.2 Frequency response of high frequency capacitor . . . . . . . 9
1.3 frequency response of high frequency inductor . . . . . . . . 11

2.1 Magnetic field inside and outside infinitely long current carry-
ing wire . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2 Input Impedance for a short circuited transmission line . . . 16
2.3 Input impedance of open circuited transmission line . . . . . 18
2.4 Quarter wave parallel plate line transformer . . . . . . . . . 19

3.1 SWR circles . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.1 Resonance frequency of a Bandpass filter . . . . . . . . . . . 28


5.2 Quality factors of a filter . . . . . . . . . . . . . . . . . . . . 29

6.1 Conductivity of Si and Ge and GaAs . . . . . . . . . . . . . 33


6.2 Depletion Layer Capacitance of a pn Junction . . . . . . . . 35
6.3 Drain saturation current in a MESFET . . . . . . . . . . . . 39
6.4 Current Voltage characterisitcs of a MESFET . . . . . . . . 41
6.5 Computation of HEMT related electric characteristics . . . . 45

7.1 Small signal pn diode model . . . . . . . . . . . . . . . . . . 48

8.1 Efficiency of different types of amplifiers . . . . . . . . . . . 55

6
9.1 Computation of source gain circles for a unilateral design . . 58
9.2 Design of 18 dB single stage MESFET amplifier . . . . . . . 60
9.3 Amplifier design using the constant operating gain circles . . 62
9.4 Design of small signal amplifier for minimum noise figure and
specified gain . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9.5 Constant VSWR design for given gain and noise figure . . . 71
9.6 Constant VSWR design for given gain and noise figure . . . 72

10.1 Adding a positive feedback element to initiate oscillations . . 76


10.2 Dielectric resonator oscillator design . . . . . . . . . . . . . . 81
10.3 Dielectric resonator oscillator design . . . . . . . . . . . . . . 82

7
Chapter 1

Introduction

Scilab code Exa 1.1 Intrinsic wave impedance

1 mu0 =4* %pi *10^ -7; // d e f i n i n g permeability of free


space
2 epsilon0 =8.85*10^ -12; // d e f i n i n g p e r m i t t i v i t y o f
f r e e space
3 z0 = sqrt ( mu0 / epsilon0 ) ; // c a l c u l a t i n g i n t r i n s i c
impedance
4 epsilonr =4.6; // d e f i n i n g r e l a t i v e p e r m i t t i v i t y
5 vp =1/ sqrt ( mu0 * epsilon0 * epsilonr ) ; // c a l c u l a t i n g
phase v e l o c i t y
6 f1 =30*10^6;
7 f2 =3*10^9;
8 lambda1 = vp /( f1 ) ;
9 lambda2 = vp /( f2 ) ;
10 disp ( ’ m e t r e ’ , lambda1 , ’ Wavelength c o r r e s p o n d i n g t o f 1
’ ) ; // d i s p l a y i n g w a v e l e n g t h s
11 disp ( ’ m e t r e ’ , lambda2 , ” Wavelength c o r r e s p o n d i n g t o f 2
” ) ; // d i s p l a y i n g w a v e l e n g t h s

Scilab code Exa 1.2 Comparing Inductances at different frequencies

8
1 mu0 =4* %pi *10^ -7;
2 a =8*2.54*10^ -5; // r a d i u s o f c o p p e r w i r e
3 sigmac =64.5*10^6; // c o n d u c t i v i t y o f c o p p e r
4 l =2*10^ -2; // l e n g t h o f w i r e
5 rdc = l /( %pi * a * a * sigmac ) ;
6 f1 =100*10^6;
7 f2 =2*10^9;
8 f3 =5*10^9;
9 skindepth1 =1/ sqrt ( %pi * mu0 * f1 * sigmac ) ;
10 skindepth2 =1/ sqrt ( %pi * mu0 * f2 * sigmac ) ;
11 skindepth3 =1/ sqrt ( %pi * mu0 * f3 * sigmac ) ;
12 Lin1 =( a * rdc ) /(2* skindepth1 *2* %pi * f1 ) ; // i n t e r n a l
inductance
13 Lin2 =( a * rdc ) /(2* skindepth2 *2* %pi * f2 ) ; // i n t e r n a l
inductance
14 Lin3 =( a * rdc ) /(2* skindepth3 *2* %pi * f3 ) ; // i n t e r n a l
inductance
15 temp = log (2* l / a ) / log ( %e ) ;
16 Lex = mu0 * l *( temp -1) /(2* %pi ) ; // e x t e r n a l i n d u c t a n c e
17 disp ( ” m e t r e ” , skindepth1 , ” S k i n d e p t h a t f 1 ” ) ;
18 disp ( ” m e t r e ” , skindepth2 , ” S k i n d e p t h a t f 2 ” ) ;
19 disp ( ” m e t r e ” , skindepth3 , ” S k i n d e p t h a t f 3 ” ) ;
20 disp ( ” Henry ” , Lin1 , ” I n t e r n a l i n d u c t a n c e a t f 1 ” ) ;
21 disp ( ” Henry ” , Lin2 , ” I n t e r n a l i n d u c t a n c e a t f 2 ” ) ;
22 disp ( ” Henry ” , Lin3 , ” I n t e r n a l i n d u c t a n c e a t f 3 ” ) ;
23 disp ( ” Henry ” ,Lex , ” E x t e r n a l i n d u c t a n c e ” ) ;

Scilab code Exa 1.3 Frequency response of high frequency resistor

1 f =10^4:10^5:10^10;
2 w =2* %pi .* f ;
3 mu0 =4* %pi *10^ -7;
4 l =2*2.5*10^ -2;

9
Figure 1.1: Frequency response of high frequency resistor

5 a =2.032*10^ -4;
6 temp = log (2* l / a ) / log ( %e ) ;
7 lex = mu0 * l *( temp -1) /(2* %pi ) ; // e x t e r n a l i n d u c t a n c e
8 r =2*10^3; // r e s i s t a n c e
9 c =5*10^ -12; // c a p a c i t a n c e
10 z = w * lex * %i +1 ./( w * c * %i +1/ r ) ; // i m p e d a n c e
11 plot2d ( ” g l l ” ,f , abs ( z ) ) ;
12 title ( ” High f r e q u e n c y i m p e d a n c e b e h a v i o u r o f a 2 k
ohm m e t a l f i l m r e s i s t o r ” ) ;
13 xlabel ( ’ F r e q u e n c y ( f ) i n Hz ’ ) ;
14 ylabel ( ’ A b s o l u t e Impedance ( | Z | ) i n ohms ’ ) ;

Scilab code Exa 1.4 Frequency response of high frequency capacitor

1 f =10^6:10^7:10^10;
2 mu0 =4* %pi *10^ -7;

10
Figure 1.2: Frequency response of high frequency capacitor

11
3 rs =(4.8*10^ -6) .* sqrt ( f ) ;
4 re =(33.9*10^12) ./ f ;
5 c =47*10^ -12;
6 w =2* %pi .* f ;
7 l =2*1.25*10^ -2;
8 a =2.032*10^ -4;
9 temp = log (2* l / a ) / log ( %e ) ;
10 lex = mu0 * l *( temp -1) /(2* %pi ) ; // e x t e r n a l
inductance
11 z =1 ./(1 ./ re + w * c * %i ) + rs + w .* lex * %i ; // i m p e d a n c e o f
frequency dependent c a p a c i t o r
12 zideal =1 ./( w * c * %i ) ; // i m p e d a n c e o f an i d e a l
capacitor
13 plot2d ( ” g l l ” ,f , abs ( z ) ) ;
14 plot2d (f , abs ( zideal ) ) ;
15 title ( ” F r e q u e n c y r e s p o n c e o f a h i g h f r e q u e n c y
c a p a c i t o r ”);
16 xlabel ( ’ F r e q u e n c y ( f ) i n Hz ’ ) ;
17 ylabel ( ’ A b s o l u t e i m p e d a n c e ( | Z | ) i n ohms ’ ) ;

Scilab code Exa 1.5 frequency response of high frequency inductor

1 f =10^7:10^8:10^10;
2 w =2* %pi .* f ;
3 N =3.5; // number o f t u r n s
4 rad =0.05*0.0254;
5 len =0.05*0.0254; // l e n g t h o f w i r e
6 a =(5*0.0254*10^ -3) /2;
7 u0 =4* %pi *10^ -7;
8 sig_cu =64.516*10^6;
9 e0 =8.854*10^ -12;
10 l =( %pi * rad ^2* u0 *( N ^2) ) / len ;
11 c =( e0 *4* %pi * rad *( N ^2) * a ) / len ;

12
Figure 1.3: frequency response of high frequency inductor

13
12 r =(2* rad * N ) /( sig_cu *( a ^2) ) ;
13 z =1 ./((1 ./( r + w * %i * l ) ) + w * %i * c ) ; // i m p e d a n c e
14 zideal = w * %i .* l ; // i m p e d a n c e o f an
ideal inductor
15 plot2d ( ” g l l ” ,f , abs ( z ) ) ;
16 plot2d (f , abs ( zideal ) ) ;
17 title ( ” F r e q u e n c y r e s p o n s e o f t h e i m p e d a n c e o f an RFC
”);
18 xlabel ( ’ F r e q u e n c y ( f ) i n Hz ’ ) ;
19 ylabel ( ’ A b s o l u t e Impedance ( | Z | ) i n ohms ’ ) ;

14
Chapter 2

Transmission line analysis

Scilab code Exa 2.1 Magnetic field inside and outside infinitely long current carr

1 I =5; // c u r r e n t i n i n f i n i t e l y l o n g w i r e
2 a =0.005; // r a d i u s o f i n f i n i t e l y l o n g w i r e
3 r_max =10* a ;
4 N =100;
5 r =(0: N ) / N * r_max ;
6 for k =1: N +1
7 if ( r ( k ) <= a )
8 H ( k ) = I * r ( k ) /(2* %pi * a * a ) ;
9 else
10 H ( k ) = I /(2* %pi * r ( k ) ) ;
11 end ;
12 end ;
13 plot ( r *1000 , H ) ;
14 plot ([ a a ]*1000 ,[0 160] , ’ r : ’ ) ;
15 title ( ” M a g n e t i c f i e l d d i s t r i b u t i o n v s . d i s t a n c e from
the c e n t e r ”);
16 xlabel ( ” D i s t a n c e from t h e c e n t e r o f t h e w i r e ,mm” ) ;
17 ylabel ( ” M a g n e t i c f i e l d , A/m” ) ;

15
Figure 2.1: Magnetic field inside and outside infinitely long current carrying
wire

16
Scilab code Exa 2.3 Transmission line parameters of a parallel copper plate transm

1 f =1*10^9;
2 w =6*10^ -3; // w i d t h
3 d =1*10^ -3; // s e p e r a t i o n
4 epsilonr =2.25;
5 epsilon0 =8.85*10^ -12;
6 sigma_diel =0.125;
7 sigma_cond =64.5*10^6;
8 mu0 =4* %pi *10^ -7;
9 skindepth =1/ sqrt ( %pi * sigma_cond * mu0 * f ) ;
10 r =2/( w * sigma_cond * skindepth ) ;
11 L =2/( w * sigma_cond *2* %pi * f * skindepth ) ;
12 c = epsilon0 * epsilonr * w / d ;
13 G = sigma_diel * w / d ;
14 disp ( ”R , L , G, C p a r a m e t e r s o f a p a r a l l e l c o p p e r p l a t e
t r a n s m i s s i o n l i n e ”)
15 disp (r , ” R e s i s t a n c e i n ohm/m” ) ;
16 disp (L , ” I n d u c t a n c e i n Henry /m” ) ;
17 disp (c , ” C a p a c i t a n c e i n Farad /m” ) ;
18 disp (G , ” C o n d u c t a n c e i n mS/m” ) ;

Scilab code Exa 2.5 Phase velocity and Wavelength of PCB material

1 epsilonr =4.6;
2 f =2*10^9;
3 z0 =50; // l i n e i m p e d a n c e
4 mu0 =4* %pi *10^ -7;
5 epsilon0 =8.85*10^ -12;
6 zf = sqrt ( mu0 / epsilon0 ) ; // f r e e s p a c e i m p e d a n c e
7 temp =(( epsilonr -1) /( epsilonr +1) ) *(0.23+(0.11/
epsilonr ) ) ;

17
Figure 2.2: Input Impedance for a short circuited transmission line

8 temp1 =2* %pi *( z0 / zf ) * sqrt (( epsilonr +1) /2) ;


9 A = temp + temp1 ;
10 wtoh =(8* %e ^ A ) /(( %e ^2* A ) -2) ;
11 Eff =( epsilonr +1) /2+( epsilonr -1) /2*1/( sqrt (1+12*(1/(
wtoh ) ) ) ) ;
12 vp =3*10^8/ sqrt ( Eff ) ;
13 lambda = vp / f ;
14 disp ( ” m e t r e / s e c o n d ” ,vp , ” Phase v e l o c i t y ” ) ;
15 disp ( ” m e t r e ” , lambda , ” Wavelength ” ) ;

Scilab code Exa 2.6 Input Impedance for a short circuited transmission line

18
1 L =209.4*10^ -9; // l i n e i n d u c t a n c e i n H/m
2 C =119.5*10^ -12; // l i n e c a p a c i t a n c e i n F/m
3 vp =1/ sqrt ( L * C ) ; // p h a s e v e l o c i t y
4 Z0 = sqrt ( L / C ) ; // c h a r a c t e r i s t i c l i n e i m p e d a n c e
5 d =0.1; // l i n e l e n g t h
6 N =500; // number o f s a m p l i n g p o i n t s
7 f =1*10^9+3*10^9*(0: N ) / N ; // s e t f r e q u e n c y r a n g e
8 Z = tan (2* %pi * f * d / vp ) ; // s h o r t c i r c u i t i m p e d a n c e
9 plot ( f /1*10^9 , abs ( Z0 * Z ) ) ;
10 title ( ’ I n p u t i m p e d a n c e o f a s h o r t − c i r c u i t e d
t r a n s m i s s i o n l i n e ’ );
11 xlabel ( ” F r e q u e n c y , GHz” ) ;
12 ylabel ( ” I n p u t impedance , | Z” ) ;

Scilab code Exa 2.7 Input impedance of open circuited transmission line

1 L =209.4*10^ -9; // l i n e i n d u c t a n c e i n H/m


2 C =119.5*10^ -12; // l i n e c a p a c i t a n c e i n F/m
3 vp =1/ sqrt ( L * C ) ; // p h a s e v e l o c i t y
4 Z0 = sqrt ( L / C ) ; // c h a r a c t e r i s t i c l i n e i m p e d a n c e
5 d =0.1; // l i n e l e n g t h
6 N =500; // number o f s a m p l i n g p o i n t s
7 f =1 e9 +4 e9 *(0: N ) / N ; // s e t f r e q u e n c y r a n g e
8 Z = cotg (2* %pi * f * d / vp ) ; // s h o r t c i r c u i t i m p e d a n c e
9 plot ( f /1 e9 , abs ( Z0 * Z ) ) ;
10 title ( ’ I n p u t i m p e d a n c e o f an open− c i r c u i t e d l i n e ’ ) ;
11 xlabel ( ’ F r e q u e n c y , GHz ’ ) ;
12 ylabel ( ’ I n p u t i m p e d a n c e | Z | , {\Omega} ’ ) ;

19
Figure 2.3: Input impedance of open circuited transmission line

20
Figure 2.4: Quarter wave parallel plate line transformer

21
Scilab code Exa 2.8 Quarter wave parallel plate line transformer

1 ZL =25; // i n p u t i m p e d a n c e
2 Z0 =50; // c h a r a c t e r i s t i c i m p e d a n c e
3 epsilonr =4;
4 dp =0.001;
5 f0 =500 e6 ;
6 mu0 =4* %pi *1 e -7;
7 epsilon0 =8.85 e -12;
8 Zline = sqrt ( Z0 * ZL ) ; // l i n e i m p e d a n c e
9 w = dp / Zline * sqrt ( mu0 / epsilon0 / epsilonr ) ;
10 L = mu0 * dp / w ; // i n d u c t a n c e
11 C = epsilon0 * epsilonr * w / dp ; // c a p a c i t a n c e
12 vp =1/ sqrt ( L * C ) ; // p h a s e v e l o c i t y
13 Z0 = sqrt ( L / C ) ;
14 d =1/(4* f0 * sqrt ( L * C ) ) ;
15 N =100;
16 f =2 e9 *(0: N ) / N ;
17 betta =2* %pi * f / vp ;
18 Z = Zline *(( ZL + %i * Zline * tan ( betta * d ) ) ./( Zline + %i * ZL *
tan ( betta * d ) ) ) ;
19 plot ( f /1 e9 , real ( Z ) ) ;
20 title ( ’ I n p u t i m p e d a n c e o f t h e q u a r t e r −wave
t r a n s f o r m e r ’ );
21 xlabel ( ’ F r e q u e n c y {\ i t f } , GHz ’ ) ;
22 ylabel ( ’ I n p u t i m p e d a n c e | Z { i n } | , {\Omega} ’ ) ;

Scilab code Exa 2.9 Power considerations of a transmission line

1 Zg =50; // g e n e r a t o r i m p e d a n c e
2 Zo =75; // i n t r i n s i c i m p e d a n c e
3 Zl =40; // l i n e i m p e d a n c e
4 Vg =5; // g e n e r a t o r v o l t a g e
5 Ts =( Zg - Zo ) /( Zg + Zo ) ; // r e f l e c t i o n c o e f f i c i e n t at
source

22
6 To =( Zl - Zo ) /( Zl + Zo ) ; // r e f l e c t i o n c o e f f i c i e n t a t l o a d
7 temp =1 -( To ^2) ;
8 temp1 =(1 - Ts ) ^2;
9 temp2 =(1 - Ts * To ) ^2;
10 Pin =(( Vg ) ^2* temp1 * temp2 ) /(8* Zo * temp ) ; // i n p u t power
11 Pl = Pin ; // power d e l i v e r e d t o t h e l o a d
12 disp ( ” Watts ” ,Pl , ” The Power d e l i v e r e d t o t h e l o a d i s
same a s t h a t a t t h e i n p u t −−>” ) ;

Scilab code Exa 2.10 Return Loss of Transmission line section

1 RL =20; // l o a d r e s i s t a n c e
2 Zo =50; // i n t r i n s i c i m p e d a n c e
3 Rin =50; // i n p u t r e s i s t a n c e
4 Tin =10^( - RL /20) ; // r e f l e c t i o n c o e f f i c i e n t a t i n p u t
5 Rg1 = Rin *(1+ Tin ) /(1 - Tin ) ;
6 Rg2 = Rin *(1 - Tin ) /(1+ Tin ) ;
7 disp ( ”Ohms” ,Rg1 , ” S o u r c e r e s i s t a n c e f o r p o s i t i v e Tin=
”);
8 disp ( ”Ohms” ,Rg2 , ” S o u r c e r e s i s t a n c e f o r n e g a t i v e Tin=
”);

23
Chapter 3

The Smith Chart

Scilab code Exa 3.2 Input Impedance

1 Zl =30+ %i *60; // l o a d i m p e d a n c e
2 Z0 =50; // i n t r i n s i c i m p e d a n c e
3 d =2*10^ -2; // l e n g t h o f w i r e
4 f =2*10^9;
5 c =3*10^8;
6 T0 =(( Zl - Z0 ) /( Zl + Z0 ) ) ; // l o a d r e f l e c t i o n c o e f f i c i e n t
7 beta =((2* %pi * f ) /(0.5* c ) ) ;
8 T = -0.32 - %i *0.55;
9 Zin = Z0 *((1+ T ) /(1 - T ) ) ; // i n p u t i m p e d a n c e
10 disp ( ”Ohms” ,Zin , ” I n p u t impedance −−>” ) ;

Scilab code Exa 3.4 SWR circles

1 Z0 =50; // d e f i n e 50 Ohm c h a r a c t e r i s t i c i m p e d a n c e
2 Z =[50 48.5 75+ %i *25 10 - %i *5]; // d e f i n e i m p e d a n c e s
f o r t h i s example

24
Figure 3.1: SWR circles

25
3 Gamma =( Z - Z0 ) ./( Z + Z0 ) // compute c o r r e s p o n d i n g
reflection coefficients
4 SWR =(1+ abs ( Gamma ) ) ./(1 - abs ( Gamma ) ) ; // f i n d t h e SWRs
5 a =0:0.01:2* %pi ;
6 for n =1: length ( Z )
7
8 plot ( abs ( Gamma ( n ) ) * cos ( a ) , abs ( Gamma ( n ) ) * sin ( a ) , ’ b ’ , ’
l i n e w i d t h ’ ,2) ;
9 plot ( real ( Gamma ( n ) ) , imag ( Gamma ( n ) ) , ’ r o ’ ) ;
10 end ;
11
12 for n =1: length ( Z )
13 if n ~=1
14 end ;
15 end ;

26
Chapter 4

Single and Multiport Networks

Scilab code Exa 4.3 Internal resistances and current gain of BJT

1 hie =5*10^3; // i n p u t i m p e d a n c e
2 hre =2*10^ -4; // v o l t a g e f e e d b a c k r a t i o
3 hfe =250; // s m a l l s i g n a l c u r r e n t g a i n
4 hoe =20*10^ -6; // o u t p u t a d m i t t a n c e
5 rbc = hie / hre ; // c a l c u l a t i n g b a s e − c o l l e c t o r
resistance
6 rbe = hie /(1 - hre ) ; // c a l c u l a t i n g b a s e −e m i t t e r
resistance
7 beta =( hre + hfe ) /(1 - hre ) ; // c c a l c u l a t i n g u r r e n t g a i n
8 rce = hie /( hoe * hie - hre * hfe - hre ) ; // c o l l e c t o r −e m i t t e r
resistance
9 disp ( ”Ohms” ,rbc , ” b a s e c o l l e c t o r r e s i s t a n c e ” ) ;
10 disp ( ”Ohms” ,rbe , ” b a s e e m i t t e r r e s i s t a n c e ” ) ;
11 disp ( ”Ohms” ,rce , ” c o l l e c t o r e m i t t e r r e s i s t a n c e ” ) ;
12 disp ( beta , ” c u r r e n t g a i n ” ) ;

Scilab code Exa 4.7 S parameters and resistive elements of T network

27
1 Zin =50; // i n p u t i m p e d a n c e
2 Z0 =50;
3 // d e f i n i n g s c a t t e r i n g p a r a m e t e r s
4 S11 =0;
5 S22 =0;
6 S21 =1/ sqrt (2) ;
7 S12 =1/ sqrt (2) ;
8 R1 =(( sqrt (2) -1) /( sqrt (2) +1) ) * Z0 ;
9 R2 = R1 ;
10 R3 =2* sqrt (2) * Z0 ;
11 disp ( S21 , S12 , S22 , S11 , ” S c a t t e r i n g p a r a m e t e r s ” ) ;
12 disp ( ”Ohms” ,R3 , ”Ohms” ,R2 , ”Ohms” ,R1 , ” R e s i s t a n c e
v a l u e s R1 , R2 , R3 : ” ) ;

28
Chapter 5

An Overview of RF Filter
Design

Scilab code Exa 5.1 Resonance frequency of a Bandpass filter

1 stacksize ( ’ max ’ ) ;
2 C =2*10^ -12;
3 L =5*10^ -9;
4 R =20;
5 Z0 =50;
6 // f = [ 1 0 ˆ 7 : 1 0 ˆ 8 : 1 0 ˆ 1 1 ] ;
7 // d e f i n e f r e q u e n c y r a n g e
8 f_min =10 e6 ; // l o w e r f r e q u e n c y l i m i t
9 f_max =100 e9 ; // u p p e r f r e q u e n c y l i m i t
10 N =100; // number o f p o i n t s i n t h e g r a p h
11 f = f_min *(( f_max / f_min ) .^((0: N ) / N ) ) ; // compute
f r e q u e n c y p o i n t s on l o g s c a l e
12 w =2* %pi .* f ;
13 A =( w .* w * L *C -1) /( w * C ) ;
14 S21 =2* Z0 ./(2* Z0 + R + %i * A ) ;
15 f0 =1./(2* %pi * sqrt ( L * C ) ) ;
16 disp ( ” H e r t z ” ,f0 , ” R e s o n a n c e f r e q u e n c y ” ) ;

29
Figure 5.1: Resonance frequency of a Bandpass filter

30
Figure 5.2: Quality factors of a filter

Scilab code Exa 5.2 Quality factors of a filter

1 // d e f i n e p r o b l e m p a r a m e t e r s
2
3 Z0 =50; // c h a r a c t e r i s t i c l i n e i m p e d a n c e
4 ZG =50; // s o u r c e i m p e d a n c e
5 ZL =50; // l o a d i m p e d a n c e
6
7 // s e r i e s RLC f i l t e r p a r a m e t e r s
8 R =10;

31
9 L =50 e -9;
10 C =0.47 e -12;
11
12 VG =5; // g e n e r a t o r v o l t a g e
13
14 // compute s e r i e s r e s o n a n c e f r e q u e n c y
15 w0 =1/ sqrt ( L * C ) ;
16 f0 = w0 /(2* %pi ) ;
17
18 // d e f i n e a f r e q u e n c y r a n g e
19 delta =0.2;
20 w =((1 - delta ) :2* delta /1000:(1+ delta ) ) * w0 ;
21
22 // compute q u a l i t y f a c t o r s
23 Q_LD = w0 * L /( R +2* ZL ) // l o a d e d q u a l i t y f a c t o r
24 Q_F = w0 * L / R // f i l t e r q u a l i t y f a c t o r
25 Q_E = w0 * L /(2* ZL ) // e x t e r n a l q u a l i t y f a c t o r
26
27 // compute Bandwidth
28 BW = f0 / Q_LD
29
30 // compute i n p u t and l o a d power
31 P_in = VG ^2/(8* Z0 )
32 P_L = P_in * Q_LD ^2/ Q_E ^2
33
34 // compute i n s e r t i o n l o s s and l o a d f a c t o r
35 epsilon = w / w0 - w0 ./ w ;
36 LF =(1+ epsilon .^2* Q_LD ^2) /(1 - Q_LD / Q_F ) ^2;
37 IL =10* log10 ( LF ) ;
38
39 disp ( Q_LD , ” Loaded Q u a l i t y F a c t o r ” ) ;
40 disp ( Q_F , ” F i l t e r Q u a l i t y F a c t o r ” ) ;
41 disp ( Q_E , ” E x t e r n a l Q u a l i t y F a c t o r ” ) ;
42 disp ( ” Watts ” , P_in , ” I n p u t Power ” ) ;
43 disp ( ” Watts ” ,P_L , ” Power d e l i v e r e d t o t h e l o a d ” ) ;
44 disp ( ” H e r t z ” ,f0 , ” r e s o n a n c e f r e q u e n c y o f t h e f i l t e r ” )
;
45 disp ( ” H e r t z ” ,BW , ” Bandwidth o f t h e f i l t e r ” ) ;

32
46 plot ( w /2/ %pi /1 e9 , IL ) ;
47 title ( ’ I n s e r t i o n l o s s v e r s u s f r e q u e n c y ’ ) ;
48 xlabel ( ’ F r e q u e n c y , GHz ’ ) ;
49 ylabel ( ’ I n s e r t i o n l o s s , dB ’ ) ;

33
Chapter 6

Active RF Components

Scilab code Exa 6.1 Conductivity of Si and Ge and GaAs

1 // d e f i n e p h y s i c a l c o n s t a n t s
2 q =1.60218 e -19;
3 k =1.38066 e -23;
4
5 // d e f i n e m a t e r i a l p r o p e r t i e s
6 Nc_300 =[1.04 e19 2.8 e19 4.7 e17 ];
7 Nv_300 =[6 e18 1.04 e19 7 e18 ];
8 mu_n = [3900 1500 8500];
9 mu_p = [1900 450 400];
10 Wg = [0.66 1.12 1.424];
11
12 T0 =273;
13 T = -50:250; // t e m p e r a t u r e r a n g e i n c e n t i g r a d e
14
15 sigma = zeros (3 , length ( T ) ) ;
16
17 for s =1:3 // l o o p t h r o u g h a l l s e m i c o n d u c t o r
materials
18 Nc = Nc_300 ( s ) *(( T + T0 ) /300) .^(3/2) ;

34
Figure 6.1: Conductivity of Si and Ge and GaAs

35
19 Nv = Nv_300 ( s ) *(( T + T0 ) /300) .^(3/2) ;
20 sigma (s ,:) =[ q * sqrt ( Nc .* Nv ) .*( exp ( - Wg ( s ) ./(2* k *( T + T0 )
/ q ) ) ) *( mu_n ( s ) + mu_p ( s ) ) ];
21 end ;
22
23 plot (T , sigma (1 ,:) , ’ r ’ ) ;
24 mtlb_hold on
25 plot (T , sigma (2 ,:) , ’ b ’ )
26 plot (T , sigma (3 ,:) , ’ g ’ )
27 legend ( ’ Ge ’ , ’ S i ’ , ’ GaAs ’ ,2) ;
28 title ( ’ C o n d u c t i v i t y o f s e m i c o n d u c t o r a t d i f f e r e n t
t e m p e r a t u r e s ’ );
29 xlabel ( ’ Temperature , {\ c i r c }C ’ ) ;
30 ylabel ( ’ C o n d u c t i v i t y \ sigma , \Omegaˆ{−1}cmˆ{−1} ’ ) ;

Scilab code Exa 6.2 Barrier Voltage of a pn Junction

1 // d o p i n g c o n c e n t r a t i o n s
2 Na =1*10^18;
3 Nd =5*10^15;
4 // i n t r i n s i c c o n c e n t r a t i o n s
5 ni =1.5*10^10;
6 T =300;
7 term =( Na * Nd ) /( ni * ni ) ;
8 k =1.38*10^ -23;
9 q =1.6*10^ -19;
10 Vdiff =( k * T ) * log ( term ) / q ;
11 disp ( ” V o l t s ” , Vdiff , ” B a r r i e r v o l t a g e ” ) ;

Scilab code Exa 6.3 Depletion Layer Capacitance of a pn Junction

36
Figure 6.2: Depletion Layer Capacitance of a pn Junction

37
1 // d e f i n e p r o b l e m p a r a m e t e r s
2
3 ni =1.5 e10 *1 e6 ; // i n t r i n s i c c a r r i e r concentration in
S i [mˆ( −3) ]
4 Na =1 e15 *1 e6 ; // a c c e p t o r d o p i n g c o n c e n t r a t i o n [mˆ( −3)
]
5 Nd =5 e15 *1 e6 ; // d o n o r c o n c e n t r a t i o n [mˆ( −3) ]
6 A =1 e -4*1 e -4; // c r o s s s e c t i o n a l a r e a [mˆ 2 ]
7 eps_r =11.9; // c r o s s s e c t i o n a l a r e a [mˆ 2 ]
8
9 // d e f i n e p h y s i c a l c o n s t a n t s ( S I u n i t s )
10 q =1.60218 e -19; // e l e c t r o n c h a r g e
11 k =1.38066 e -23; // Boltzmann ’ s c o n s t a n t
12 eps0 =8.85 e -12; // p e r m i t t i v i t y o f f r e e s p a c e
13
14 eps = eps_r * eps0 ;
15
16 T =300; // t e m p e r a t u u r e
17
18 // compute d i f f u s i o n b a r r i e r v o l t a g e
19 Vdiff = k * T / q * log ( Na * Nd / ni ^2)
20
21 // j u n c t i o n c a p a c i t a n c e a t z e r o a p p l i e d v o l t a g e
22 C0 = A * sqrt ( q * eps /(1/ Na +1/ Nd ) /2/ Vdiff )
23
24 // e x t e n t s o f t h e s p a c e c h a r g e r e g i o n
25 dn = sqrt (2* eps * Vdiff / q * Na / Nd /( Na + Nd ) ) ;
26 dp = sqrt (2* eps * Vdiff / q * Nd / Na /( Na + Nd ) ) ;
27
28 // d e f i n e r a n g e f o r a p p l i e d v o l t a g e
29 VA = -5:0.1: Vdiff ;
30
31 // compute j u n c t i o n c a p a c i t a n c e
32 C = C0 *(1 - VA / Vdiff ) .^( -1/2) ;
33
34 plot ( VA , C /1 e -12) ;
35 title ( ’ J u n c t i o n c a p a c i t a n c e o f a b r u p t S i pn−c o n t a c t ’
);

38
36 xlabel ( ’ A p p l i e d j u n c t i o n v o l t a g e V A , V o l t s ’ ) ;
37 ylabel ( ’ J u n c t i o n c a p a c i t a n c e C , pF ’ ) ;

Scilab code Exa 6.4 Parameters of a Schottky diode

1 clc
2 clear
3 T =300;
4 // d o p i n g c o n c e n t r a t i o n s
5 Nc =2.8*10^19;
6 Nd =1*10^16;
7 term = Nc / Nd ;
8 k =1.38*10^ -23; // Boltzman ’ s c o n s t a n t
9 q =1.6*10^ -19; // c h a r g e
10 Vc =( k * T ) * log ( term ) / q ;
11 Vm =5.1; // w o r k f u n c t i o n
12 X =4.05; // a f f i n i t y
13 Vd =( Vm - X ) - Vc ; // B a r r i e r V o l t a g e
14 Epsilon =11.9*8.854*10^ -12;
15 ds = sqrt ((2* Epsilon * Vd ) /( q * Nd ) ) ;
16 A =1*10^ -4; // c r o s s − s e c t i o n a l a r e a
17 Cj =( A * Epsilon ) /( ds ) ; // j u n c t i o n c a p a c i t a n c e
18 disp ( ” V o l t s ” ,Vc , ” C o n d u c t i o n Band p o t e n t i a l ” ) ;
19 disp ( ” V o l t s ” ,Vd , ” B u i l t i n B a r r i e r V o l t a g e ” ) ;
20 disp ( ” m e t r e ” ,ds , ” S p a c e Charge Width ” ) ;
21 disp ( ” F a r a d s ” ,Cj , ” J u n c t i o n C a p a c i t a n c e ” ) ;

Scilab code Exa 6.7 Maximum forward current gain of bipolar junction transistor

1 Ndemitter =1*10^19; // d o n o r c o n c e n t r a t i o n i n e m i t t e r
2 Nabase =1*10^17; // a c c e p t o r c o n c e n t r a t i o n i n b a s e
3 de =0.8*10^ -6; // s p a t i a l e x t e n t o f t h e e m i t t e r
4 db =1.2*10^ -6; // s p a t i a l e x t e n t o f t h e b a s e

39
5 alpha =2.8125;
6 beta =( alpha * Ndemitter * de ) /( Nabase * db ) ;
7 disp ( beta , ”Maximum f o r w a r d c u r r e n t g a i n ” ) ;

Scilab code Exa 6.8 Thermal analysis involving a BJT mounted on a heat sink

1 Tj =150;
2 Ts =25;
3 Pw =15;
4 Rthjs =( Tj - Ts ) / Pw ; // J u n c t i o n −to −s o l d e r
point
resistance
5 Rthca =2;
6 Rthhs =10;
7 Ta =60;
8 Rthtot = Rthjs + Rthca + Rthhs ; // t o t a l t h e r m a l r e s i s t a n c e
9 Pth =( Tj - Ta ) /( Rthtot ) ; // d i s s i p a t e d power
10 disp ( ” Watts ” ,Pth , ”Maximum d i s s i p a t e d power ” ) ;

Scilab code Exa 6.9 Drain saturation current in a MESFET

1 // d e f i n e p r o b l e m p a r a m e t e r s
2 Nd =1 e16 *1 e6 ;
3 d =0.75 e -6;
4 W =10 e -6;
5 L =2 e -6;
6 eps_r =12;
7 Vd =0.8;
8 mu_n =8500 e -4;
9 Vgs =0: -0.01: -4;
10
11 // d e f i n e p h y s i c a l c o n s t a n t s

40
Figure 6.3: Drain saturation current in a MESFET

41
12 q =1.60218 e -19; // e l e c t r o n c h a r g e
13 eps0 =8.85 e -12; // p e r m i t t i v i t y o f f r e e s p a c e
14
15 eps = eps_r * eps0 ;
16
17 // p i n c h − o f f v o l t a g e
18 Vp = q * Nd * d ^2/(2* eps )
19
20 // t h r e s h o l d v o l t a g e
21 Vt0 = Vd - Vp
22
23 // c o n d u c t i v i t y o f t h e c h a n n e l
24 sigma = q * mu_n * Nd
25
26 // Channel c o n d u c t a n c e
27 G0 = q * sigma * Nd * W * d / L
28
29 // s a t u r a t i o n c u r r e n t u s i n g t h e e x a c t f o r m u l a
30 Id_sat = G0 *( Vp /3 -( Vd - Vgs ) +2/(3* sqrt ( Vp ) ) *( Vd - Vgs )
.^(3/2) ) .*(1 -( Vgs < Vt0 ) ) ;
31 Idss = Id_sat (1)
32
33 // s a t u r a t i o n c u r r e n t u s i n g t h e q u a d r a t i c law
approximation
34 Id_sat_square = Idss *(1 - Vgs / Vt0 ) ^2;
35
36 plot ( Vgs , Id_sat , Vgs , Id_sat_square ) ;
37 legend ( ’ e x a c t f o r m u l a ’ , ’ q u a d r a t i c a p p r o x i m a t i o n ’ ,2)
;
38 title ( ’FET s a t u r a t i o n c u r r e n t a s a f u n c t i o n o f t h e
g a t e −s o u r c e v o l t a g e ’ ) ;
39 xlabel ( ’ Gate−s o u r c e v o l t a g e V {GS} , V ’ ) ;
40 ylabel ( ’ D r a i n s a t u r a t i o n c u r r e n t I { DSat } , A ’ ) ;

42
Figure 6.4: Current Voltage characterisitcs of a MESFET

43
Scilab code Exa 6.10 Current Voltage characterisitcs of a MESFET

1 // d e f i n e p r o b l e m p a r a m e t e r s
2 Nd =1 e16 *1 e6 ;
3 d =0.75 e -6;
4 W =10 e -6;
5 L =2 e -6;
6 eps_r =12;
7 Vd =0.8;
8 mu_n =8500*1 e -4;
9 lambda =0.03;
10
11 // d e f i n e p h y s i c a l c o n s t a n t s
12 q =1.60218 e -19; // e l e c t r o n c h a r g e
13 eps0 =8.85 e -12; // p e r m i t t i v i t y o f f r e e s p a c e
14
15 eps = eps_r * eps0 ;
16
17 // p i n c h − o f f v o l t a g e
18 Vp = q * Nd * d ^2/(2* eps )
19
20 // t h r e s h o l d v o l t a g e
21 Vt0 = Vd - Vp
22
23 // c o n d u c t i v i t y o f t h e c h a n n e l
24 sigma = q * mu_n * Nd
25
26 // c h a n n e l c o n d u c t a n c e
27 G0 = q * sigma * Nd * W * d / L
28
29 // d e f i n e t h e r a n g e f o r g a t e s o u r c e v o l t a g e
30 Vgs_min = -2.5;
31 Vgs_max = -1;
32 Vgs = Vgs_max : -0.5: Vgs_min ;
33
34 // d r a i n s o u r c e v o l t a g e
35 Vds =0:0.01:5;
36

44
37 // compute d r a i n s a t u r a t i o n v o l t a g e
38 Vds_sat = Vgs - Vt0 ;
39
40 // f i r s t t h e d r a i n c u r r e n t i s t a k e n i n t o a c c o u n t t h e
channel length modulation
41 for n =1: length ( Vgs )
42 if Vgs ( n ) > Vt0
43 Id_sat = G0 *( Vp /3 -( Vd - Vgs ( n ) ) +2/(3* sqrt ( Vp ) ) *( Vd
- Vgs ( n ) ) ^(3/2) ) ;
44 else
45 Id_sat =0;
46 end ;
47
48 Id_linear = G0 *( Vds -2/(3* sqrt ( Vp ) ) .*(( Vds + Vd - Vgs ( n )
) .^(3/2) -( Vd - Vgs ( n ) ) ^(3/2) ) ) .*(1+ lambda * Vds ) ;
49 Id_saturation = Id_sat *(1+ lambda * Vds ) ;
50 Id = Id_linear .*( Vds <= Vds_sat ( n ) ) + Id_saturation .*(
Vds > Vds_sat ( n ) ) ;
51 plot ( Vds , Id ) ;
52 set ( gca () ,” a u t o c l e a r ” ,” o f f ” ) ;
53 end ;
54
55 // n e x t t h e c h a n n e l l e n g t h m o d u l a t i o n i s n o t t a k e n
into account
56 for n =1: length ( Vgs )
57 if Vgs ( n ) > Vt0
58 Id_sat = G0 *( Vp /3 -( Vd - Vgs ( n ) ) +2/(3* sqrt ( Vp ) ) *( Vd
- Vgs ( n ) ) ^(3/2) ) ;
59 else
60 Id_sat =0;
61 end ;
62
63 Id_linear = G0 *( Vds -2/(3* sqrt ( Vp ) ) .*(( Vds + Vd - Vgs ( n )
) .^(3/2) -( Vd - Vgs ( n ) ) ^(3/2) ) ) ;
64 Id_saturation = Id_sat ;
65 Id = Id_linear .*( Vds <= Vds_sat ( n ) ) + Id_saturation .*(
Vds > Vds_sat ( n ) ) ;
66 plot ( Vds , Id ) ;

45
67 end ;
68
69 // c o m p u t a t i o n o f d r a i n s a t u r a t i o n c u r r e n t
70
71 Vgs =0: -0.01: -4;
72 Vds_sat = Vgs - Vt0 ;
73
74 Id_sat = G0 *( Vp /3 -( Vd - Vgs ) +2/(3* sqrt ( Vp ) ) *( Vd - Vgs )
.^(3/2) ) .*(1+ lambda * Vds_sat ) .*(1 -( Vgs < Vt0 ) ) ;
75
76 plot ( Vds_sat , Id_sat ) ;
77
78 mtlb_axis ([0 5 0 4]) ;
79 title ( ’ D r a i n c u r r e n t v s . V {DS} p l o t t e d f o r
d i f f e r e n t V {GS} ’ ) ;
80 xlabel ( ’ Drain −s o u r c e v o l t a g e V {DS} , V ’ ) ;
81 ylabel ( ’ D r a i n c u r r e n t I {D} , A ’ ) ;

Scilab code Exa 6.11 Computation of HEMT related electric characteristics

1 // d e f i n e p r o b l e m p a r a m e t e r s
2 Nd =1 e18 *1 e6 ;
3 Vb =0.81;
4 eps_r =12.5;
5 d =50 e -9;
6 dWc =3.5 e -20;
7 W =10 e -6;
8 L =0.5 e -6;
9 mu_n =8500*1 e -4;
10
11 // d e f i n e p h y s i c a l c o n s t a n t s
12 q =1.60218 e -19; // e l e c t r o n c h a r g e
13 eps0 =8.85 e -12; // p e r m i t t i v i t y o f f r e e s p a c e

46
Figure 6.5: Computation of HEMT related electric characteristics

47
14
15 eps = eps_r * eps0 ;
16
17 // p i n c h − o f f v o l t a g e
18 Vp = q * Nd * d ^2/(2* eps )
19
20 // t h r e s h o l d v o l t a g e
21 Vth = Vb - dWc /q - Vp
22
23 // d r a i n −s o u r c e a p p l i e d v o l t a g e r a n g e
24 Vds =0:0.01:5;
25
26 // g a t e −s o u r c e v o l t a g e s
27 Vgs_r = -1:0.25:0;
28
29
30
31
32 for n =1: length ( Vgs_r )
33 Vgs = Vgs_r ( n ) ;
34 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 ) ) ) ) ;
35 plot ( Vds , Id /1 e -3) ;
36 set ( gca () ,” a u t o c l e a r ” ,” o f f ” ) ;
37 end ;
38
39
40 title ( ’ D r a i n c u r r e n t v s . V {DS} p l o t t e d f o r
d i f f e r e n t V {GS} ’ ) ;
41 xlabel ( ’ Drain −s o u r c e v o l t a g e V {DS} , V ’ ) ;
42 ylabel ( ’ D r a i n c u r r e n t I {D} , mA ’ ) ;

48
Chapter 7

Active RF Component
Modelling

Scilab code Exa 7.1 Small signal pn diode model

1 // d e f i n e p r o b l e m p a r a m e t e r s
2 TT =500 e -12; // t r a n s i t t i m e
3 T0 =300; // t e m p e r a t u r e
4 Is0 =5 e -15; // r e v e r s e s a t u r a t i o n c u r r e n t a t 300K
5 Rs =1.5; // s e r i e s r e s i s t a n c e
6 nn =1.16; // e m i s s i o n c o e f f i c i e n t
7
8 // p a r a m e t e r s n e e d e d t o d e s c r i b e t e m p e r a t u r e
behavior of
9 // t h e band−gap e n e r g y i n S i
10 alpha =7.02 e -4;
11 beta =1108;
12 Wg0 =1.16;
13 pt =3;
14
15 // q u i e s c e n t current
16 Iq =50 e -3;

49
Figure 7.1: Small signal pn diode model

50
17
18 // f r e q u e n c y r a n g e 10MHz t o 1GHz
19 f_min =10 e6 ; // l o w e r l i m i t
20 f_max =1 e9 ; // u p p e r l i m i t
21 N =300; // number o f p o i n t s i n t h e g r a p h
22 f = f_min *(( f_max / f_min ) .^((0: N ) / N ) ) ; // compute
f r e q u e n c y p o i n t s on l o g s c a l e
23
24 // t e m p e r a t u r e s f o r which a n a l y s i s w i l l be p e r f o r m e d
25 T_points =[250 300 350 400];
26
27 // d e f i n e p h y s i c a l c o n s t a n t s
28 q =1.60218 e -19; // e l e c t r o n c h a r g e
29 k =1.38066 e -23; // Boltzmann ’ s c o n s t a n t
30
31 for n =1: length ( T_points )
32 T = T_points ( n ) ;
33 s = sprintf ( ’T=%. f \n ’ ,T ) ;
34 Vt = k * T / q ;
35
36 Wg = Wg0 - alpha * T ^2/( beta + T ) ;
37 s = sprintf ( ’ %s Wg(T)=%f\n ’ ,s , Wg ) ;
38
39 Is = Is0 *( T / T0 ) ^( pt / nn ) * exp ( - Wg / Vt *(1 - T / T0 ) ) ;
40 s = sprintf ( ’ %s I s (T)=%e\n ’ ,s , Is ) ;
41
42 Vq = nn * Vt * log (1+ Iq / Is ) ;
43 s = sprintf ( ’ %s Vq (T)=%f\n ’ ,s , Vq ) ;
44
45 Rd = nn * Vt / Iq ;
46 s = sprintf ( ’ %s Rd (T)=%f\n ’ ,s , Rd ) ;
47
48 Cd = Is * TT / nn / Vt * exp ( Vq / nn / Vt ) ;
49 s = sprintf ( ’ %s Cd (T)=%fpF\n ’ ,s , Cd /1 e -12)
50
51 Zc =1./( %i *2* %pi * f * Cd ) ;
52
53 Zin = Rs + Rd * Zc ./( Rd + Zc ) ;

51
54
55 plot ( f /1 e6 , abs ( Zin ) ) ;
56 set ( gca () ,” a u t o c l e a r ” ,” o f f ” ) ;
57 end ;
58
59 title ( ’ F r e q u e n c y b e h a v i o r o f s m a l l −s i g n a l diode
model ’ ) ;
60 xlabel ( ’ F r e q u e n c y {\ i t f } , MHz ’ ) ;
61 ylabel ( ’ Impedance | Z | , \Omega ’ ) ;

Scilab code Exa 7.4 Parameters of BJT

1 // f i r s t we d e f i n e a l l p a r a m e t e r s f o r t h e t r a n s i s t o r
and t h e c i r c u i t
2 Z0 =50; // c h a r a c t e r i s t i c i m e d a n c e o f t h e s y s t e m
3
4 Vcc =3.6; // power s u p p l y v o l t a g e
5 Vce =2; // c o l l e c t o r v o l t a g e
6 Ic =10 e -3; // c o l l e c t o r c u r r e n t
7
8 T =300; // a m b i e n t t e m p e r a t u r e ( 3 0 0K)
9
10 // t r a n s i s t o r parameters ( they are very s i m i l a r to
BFG403W)
11 beta =145; // current gain
12 Is =5.5 e -18; // saturation current
13 VAN = 30; // forward Early voltage
14 tau_f =4 e -12; // forward t r a n s i t i o n time
15 rb =125; // base r e s i s t a n c e
16 rc =15; // collector resistance
17 re =1.5; // emitter resistance
18 Lb =1.1 e -9; // base inductance
19 Lc =1.1 e -9; // c o l l e c t o r inductance
20 Le =0.5 e -9; // emitter inductance
21 Cjc =16 e -15; // c o l l e c t o r j u n c t i o n capacitance at

52
zero applied voltage
22 mc =0.2; // c o l l e c t o r j u n c t i o n g r a d i n g
coefficient
23 Cje =37 e -15; // e m i t t e r j u n c t i o n c a p a c i t a n c e a t z e r o
applied voltage
24 me =0.35; // e m i t t e r j u n c t i o n g r a d i n g c o e f f i c i e n t
25 phi_be =0.9; // b a s e −e m i t t e r d i f f u s i o n p o t e n t i a l
26 phi_bc =0.6; // b a s e − c o l l e c t o r d i f f u s i o n p o t e n t i a l
27 Vbe = phi_be ; // b a s e −e m i t t e r v o l t a g e
28
29 // some p h y s i c a l constants
30 k =1.38 e -23; // Boltzmann ’ s c o n s t a n t
31 q =1.6 e -19; // elementary charge
32 VT = k * T / q ; // thermal p o t e n t i a l
33
34 disp ( ’DC b i a s i n g p a r a m e t e r s ’ ) ;
35
36 Ib = Ic / beta ;
37 disp ( ” Amperes ” ,Ib , ” Base c u r r e n t ” ) ;
38
39 Rc =( Vcc - Vce ) / Ic ;
40 disp ( ”Ohms” ,Rc , ” C o l l e c t o r r e s i s t a n c e ” ) ;
41
42 Rb =( Vcc - Vbe ) / Ib ;
43 disp ( ”Ohms” ,Rb , ” Base r e s i s t a n c e ” ) ;
44
45
46 r_pi = VT / Ib ;
47 disp ( ”Ohms” , r_pi , ” Rpi ” ) ;
48
49 r0 = VAN / Ic ;
50 disp ( ”Ohms” ,r0 , ”R0” ) ;
51
52 gm = beta / r_pi ;
53 disp ( ”Mho” ,gm , ”Gm” ) ;
54
55 Vbc = Vbe - Vce ;
56 Cmu = Cjc *(1 - Vbc / phi_bc ) ^( - mc ) ;

53
57 disp ( ” F a r a d s ” ,Cmu , ” b a s e c o l l e c t o r c a p a c i t a n c e ” ) ;
58
59 if ( Vbe <0.5* phi_be )
60 Cpi_junct = Cje *(1 - Vbe / phi_be ) ^( - me ) ;
61 else
62 C_middle = Cje *0.5^( - me ) ;
63 k_middle =1 -0.5* me ;
64 Cpi_junct = C_middle *( k_middle + me * Vbe / phi_be ) ;
65 end ;
66
67 disp ( ” F a r a d s ” , Cpi_junct , ” J u n c t i o n C a p a c i t a n c e ” ) ;
68
69 Cpi_diff = Is * tau_f / VT * exp ( Vbe / VT ) ;
70 disp ( ” F a r a d s ” , Cpi_diff , ” D i f f e r e n t i a l c a p a c i t a n c e ” ) ;
71
72 Cpi = Cpi_junct + Cpi_diff ;
73 disp ( ” F a r a d s ” ,Cpi , ” T o t a l C a p a c i t a n c e ” ) ;
74
75 C_miller = Cmu *(1+ gm * r_pi /( r_pi + rb ) * Z0 * r0 /( r0 + rc + Z0 ) ) ;
76 disp ( ” F a r a d s ” , C_miller , ” M i l l e r C a p a c i t a n c e ” ) ;
77
78 C_input = Cpi + C_miller ;
79 disp ( ” F a r a d s ” , C_input , ” T o t a l i n p u t c a p a c i t a n c e ” ) ;

Scilab code Exa 7.5 Cutoff frequency of GaAs MESFET

1 l =1*10^ -6; // l e n g t h
2 w =200*10^ -6; // w i d t h
3 d =0.5*10^ -6; // d e p t h
4 E0 =8.854*10^ -12;
5 Er =13.1;
6 q =1.6*10^ -19; // e l e c t r o n c h a r g e
7 Nd =1*10^16; // d o p i n g c o n c e n t r a t i o n
8 mun =8500;
9 Vp =( q * Nd * d ^2) /(2* Er * E0 ) ;

54
10 G0 =( q * mun * Nd * w ) / l ;
11 gm =0.0358;
12 Cap =( E0 * Er * w * l ) / d ;
13 fT = gm /(2* %pi * Cap ) ;
14 disp ( ” H e r t z ” ,fT , ” Cut o f f f r e q u e n c y ” ) ;

Scilab code Exa 7.6 Small signal Hybrid pi parameters without Miller Effect

1 Icq =6*10^ -3;


2 Ibq =40*10^ -6;
3 Van =30; // E a r l y v o l t a g e
4 q =1.6*10^ -19;
5 k =1.38*10^ -23;
6 T =300;
7 fT =37*10^9; // T r a n s i t i o n f r e q u e n c y
8 gm =( Icq * q ) /( k * T ) ;
9 beta0 = Icq / Ibq ;
10 r0 = Van / Icq ;
11 rpi = beta0 / gm ;
12 Cpi =( beta0 ) /(2* %pi * fT * rpi ) ;
13 disp ( ” H y b r i d p i p a r a m e t r s w i t h o u t M i l l e r e f f e c t ” ) ;
14 disp ( ”Mho” ,gm , ”gm” ) ;
15 disp ( ”Ohms” ,rpi , ” Rpi ” ) ;
16 disp ( ” F a r a d s ” ,Cpi , ” Cpi ” ) ;
17 disp ( ”Ohms” ,r0 , ”R0” ) ;
18 disp ( beta0 , ” Beta0 ” ) ;

55
Chapter 8

Matching and biasing networks

Scilab code Exa 8.11 Efficiency of different types of amplifiers

1 theta =(1:1:360) /180* %pi ; // d e f i n e c o n d u c t i o n a n g l e


2
3 // compute e f f i c i e n c y
4 nu = -1/2*( theta - sin ( theta ) ) ./( theta .* cos ( theta /2) -2*
sin ( theta /2) ) ;
5
6 plot ( theta / %pi *180 , nu *100 , ’ r ’ , ’ l i n e w i d t h ’ ,2) ;
7 set ( gca () ,” a u t o c l e a r ” ,” o f f ” ) ;
8 plot ([0 180] ,[ %pi /4*100 %pi /4*100] , ’ b : ’ ) ;
9 plot ([180 180] ,[0 %pi /4*100] , ’ b : ’ ) ;
10 plot (180 , %pi /4*100 , ’ bo ’ ) ;
11 plot (360 ,50 , ’ bo ’ ) ;
12 mtlb_axis ([0 360 50 100]) ;
13 title ( ’ Maximum t h e o r e t i c a l e f f i c i e n c y o f t h e
a m p l i f i e r ’ );
14 xlabel ( ’ C o n d u c t i o n a n g l e \ T h e t a 0 , deg . ’ ) ;
15 ylabel ( ’ E f f i c i e n c y \ e t a , % ’ ) ;

56
Figure 8.1: Efficiency of different types of amplifiers

57
Scilab code Exa 8.12 Design of passive biasing networks for a BJT in CE config

1 Ic =10*10^ -3; // C o l l e c t o r c u r r e n t
2 Vce =3;
3 Vcc =5;
4 beta =100; // c u r r e n t g a i n
5 Vbe =0.8;
6 I1 = Ic + Ic / beta ;
7 R1 =( Vcc - Vce ) / I1 ;
8 R2 =( Vce - Vbe ) /( Ic / beta ) ;
9 Vx =1.5;
10 R3 =( Vx - Vbe ) /( Ic / beta ) ;
11 Ix =10*( Ic / beta ) ;
12 R11 =( Vx / Ix ) ;
13 R22 =( Vcc - Vx ) /( Ix +( Ic / beta ) ) ;
14 R4 =( Vcc - Vce ) / Ic ;
15 disp ( ” Amperes ” ,I1 , ” I 1 ” ,”Ohms” ,R1 , ”R1” ,”Ohms” ,R2 , ”R2”
,”Ohms” ,R3 , ”R3” ,”Ohms” ,R11 , ” R11 ” ,”Ohms” ,R22 , ” R22 ”
,”Ohms” ,R4 , ”R4” ) ;

58
Chapter 9

RF Transistor Amplifier Design

Scilab code Exa 9.1 Power relations for an RF amplifier

1 // d e f i n i n g s c a t t e r i n g p a r a m e t e r s
2 S11 =0.102 - %i *0.281;
3 S21 =0.305+ %i *3.486;
4 S12 =0.196 - %i *0.03471;
5 S22 =0.2828 - %i *0.2828;
6
7 Vs =5;
8 Zs =40;
9 Zl =73;
10 Z0 =50;
11
12 Ts =( Zs - Z0 ) /( Zs + Z0 ) ;
13 Tl =( Zl - Z0 ) /( Zl + Z0 ) ;
14 Tin = S11 +( S21 * S12 * Tl ) /(1 - S22 * Tl ) ;
15 Tout = S22 +( S12 * S21 * Ts ) /(1 - S11 * Ts ) ;
16
17 a = S21 ^2;
18 b =1 - Ts ^2;
19 c =1 - Tl ^2;
20
21 Gt =( c * a * b ) /((1 - Tl * Tout ) ^2*(1 - S11 * Ts ) ^2) ;

59
Figure 9.1: Computation of source gain circles for a unilateral design

22 Gtu =( c * a * b ) /((1 - Tl * S22 ) ^2*(1 - S11 * Ts ) ^2) ;


23 Ga =( a * b ) /((1 - Tout ) ^2*(1 - S11 * Ts ) ^2) ;
24 G =( a * c ) /((1 - Tin ) ^2*(1 - S22 * Tl ) ^2) ;
25
26 d = abs ( Gt ) ;
27
28 Pin =( Z0 *( Vs ) ^2) /(( Zs + Z0 ) ^2*(1 - Tin * Ts ) ^2*2) ;
29 pinR = real ( Pin ) ;
30 pinI = imag ( Pin ) ;
31 Pinc = sqrt ( pinR ^2+ pinI ^2) ;
32 PA =78.1*10^ -3;
33 Pl = PA * d ;
34 disp ( Pl , ” Power d e l i v e r e d t o l o a d i n w a t t s ” ) ;

Scilab code Exa 9.7 Computation of source gain circles for a unilateral design

1 // d e f i n e s 1 1 p a r a m e t e r o f t h e t r a n s i s t o r
2 s11 =0.7* exp ( %i *(125) /180* %pi ) ;
3

60
4 // compute t h e maximum g a i n a c h i e v a b l e by t h e i n p u t
matching network
5 Gs_max =1/(1 - abs ( s11 ) ^2) ;
6 Gs_max_dB =10* log10 ( Gs_max )
7
8 // f i n d t h e r e f l e c t i o n c o e f f i c i e n t f o r t h e maximum
gain
9 Gs_opt = conj ( s11 ) ;
10
11 // draw a s t r a i g h t l i n e c o n n e c t i n g G s o p t and t h e
origin
12 set ( gca () ,” a u t o c l e a r ” ,” o f f ” ) ;
13 plot ([0 real ( Gs_opt ) ] ,[0 imag ( Gs_opt ) ] , ’ b ’ ) ;
14 plot ( real ( Gs_opt ) , imag ( Gs_opt ) , ’ bo ’ ) ;
15
16 // s p e c i f y t h e a n g l e f o r t h e c o n s t a n t g a i n c i r c l e s
17 a =(0:360) /180* %pi ;
18
19 // p l o t s o u r c e g a i n c i r c l e s
20 gs_db =[ -1 0 1 2 2.6];
21 gs = exp ( gs_db /10* log (10) ) / Gs_max ;
22
23 for n =1: length ( gs )
24 dg = gs ( n ) * conj ( s11 ) /(1 - abs ( s11 ) ^2*(1 - gs ( n ) ) ) ;
25 rg = sqrt (1 - gs ( n ) ) *(1 - abs ( s11 ) ^2) /(1 - abs ( s11 ) ^2*(1 -
gs ( n ) ) ) ;
26 plot ( real ( dg ) + rg * cos ( a ) , imag ( dg ) + rg * sin ( a ) , ’ r ’ , ’
l i n e w i d t h ’ ,2) ;
27 end ;

Scilab code Exa 9.8 Design of 18 dB single stage MESFET amplifier

1 s11 =0.5* exp ( %i *( -60) /180* %pi ) ;

61
Figure 9.2: Design of 18 dB single stage MESFET amplifier

62
2 s12 =0.02* exp ( %i *( -0) /180* %pi ) ;
3 s21 =6.5* exp ( %i *(+115) /180* %pi ) ;
4 s22 =0.6* exp ( %i *( -35) /180* %pi ) ;
5
6 Gs_max =1/(1 - abs ( s11 ) ^2) ;
7 Gl_max =1/(1 - abs ( s22 ) ^2) ;
8
9 G0 = abs ( s21 ) ^2;
10
11 Gmax = Gs_max * G0 * Gl_max ;
12 Gs_max_dB =10* log10 ( Gs_max )
13 Gl_max_dB =10* log10 ( Gl_max )
14 G0_dB =10* log10 ( G0 )
15 Gmax_dB =10* log10 ( Gmax )
16 Ggoal_dB =18;
17 Gload_dB = Ggoal_dB - G0_dB - Gs_max_dB ;
18 Gl_opt = conj ( s22 ) ;
19
20 set ( gca () ,” a u t o c l e a r ” ,” o f f ” ) ;
21 plot ([0 real ( Gl_opt ) ] ,[0 imag ( Gl_opt ) ] , ’ b ’ ) ;
22 plot ( real ( Gl_opt ) , imag ( Gl_opt ) , ’ bo ’ ) ;
23 a =(0:360) /180* %pi ;
24 gl = exp ([ Gload_dB ]/10* log (10) ) / Gl_max ;
25 dg = gl * conj ( s22 ) /(1 - abs ( s22 ) ^2*(1 - gl ) ) ;
26 rg = sqrt (1 - gl ) *(1 - abs ( s22 ) ^2) /(1 - abs ( s22 ) ^2*(1 - gl ) ) ;
27 plot ( real ( dg ) + rg * cos ( a ) , imag ( dg ) + rg * sin ( a ) , ’ b ’ , ’
l i n e w i d t h ’ ,2) ;

Scilab code Exa 9.13 Amplifier design using the constant operating gain circles

1 // d e f i n e t h e S−p a r a m e t e r s o f t h e transistor
2 s11 =0.3* exp ( %i *(+30) /180* %pi ) ;
3 s12 =0.2* exp ( %i *( -60) /180* %pi ) ;

63
Figure 9.3: Amplifier design using the constant operating gain circles

64
4 s21 =2.5* exp ( %i *( -80) /180* %pi ) ;
5 s22 =0.2* exp ( %i *( -15) /180* %pi ) ;
6
7 K =1.18
8
9 // f i n d t h e maximum g a i n
10 Gmax = abs ( s21 / s12 ) *( K - sqrt ( K ^2 -1) ) ;
11 Gmax_dB =10* log10 ( Gmax )
12
13 // s p e c i f y t h e t a r g e t g a i n
14 G_goal_dB =8; // would l i k e t o b u i l d an a m p l i f i e r w i t h
8dB g a i n
15 G_goal =10^( G_goal_dB /10) ; // c o n v e r t from dB t o
normal u n i t s
16
17 // f i n d c o n s t a n t o p e r a t i n g power g a i n c i r c l e s
18 go = G_goal / abs ( s21 ) ^2;
19
20 // f i n d t h e c e n t e r o f t h e c o n s t a n t o p e r a t i n g power
gain c i r c l e
21 dgo = go * conj ( s22 - conj ( s11 ) ) /(1+ go *( abs ( s22 ) ^2) ) ;
22
23
24 // f i n d t h e r a d i u s o f t h e c i r c l e
25 rgo1 = sqrt (1 -2* K * go * abs ( s12 * s21 ) + go ^2* abs ( s12 * s21 ) ^2)
;
26 rgo = rgo1 / abs (1+ go *( abs ( s22 ) ^2) ) ;
27
28 // p l o t a c i r c l e i n t h e Smith Chart
29 a =(0:360) /180* %pi ;
30
31 mtlb_hold on
32 plot ( real ( dgo ) + rgo * cos ( a ) , imag ( dgo ) + rgo * sin ( a ) , ’ r ’ , ’
l i n e w i d t h ’ ,2) ;
33
34 // c h o o s e t h e l o a d r e f l e c t i o n coefficient
35 zL =1 - %i *0.53
36 GL =( zL -1) /( zL +1) ;

65
Figure 9.4: Design of small signal amplifier for minimum noise figure and
specified gain

37
38 plot ( real ( GL ) , imag ( GL ) , ’ bo ’ ) ;
39 Gin = s11 + s12 * s21 * GL /(1 - s22 * GL ) ;
40 Gs = conj ( Gin ) ;
41 Gs_abs = abs ( Gs )
42 [ Ro , Theta ]= polar ( atan ( imag ( Gs ) , real ( Gs ) ) ) ;
43 Gs_angle =( Theta / %pi ) *180;
44
45 zs =(1+ Gs ) /(1 - Gs ) ;

66
Scilab code Exa 9.14 Design of small signal amplifier for minimum noise figure and

1 global Z0 ;
2 Z0 =50;
3
4 // d e f i n e t h e S−p a r a m e t e r s o f t h e t r a n s i s t o r
5 s11 =0.3* exp ( %i *(+30) /180* %pi ) ;
6 s12 =0.2* exp ( %i *( -60) /180* %pi ) ;
7 s21 =2.5* exp ( %i *( -80) /180* %pi ) ;
8 s22 =0.2* exp ( %i *( -15) /180* %pi ) ;
9
10 // p i c k t h e n o i s e p a r a m e t e r s o f t h e t r a n s i s t o r
11 Fmin_dB =1.5
12 Fmin =10^( Fmin_dB /10) ;
13 Rn =4;
14 Gopt =0.5* exp ( %i *45/180* %pi ) ;
15
16 // compute a n o i s e c i r c l e
17 Fk_dB =1.6;
18 Fk =10^( Fk_dB /10) ;
19
20
21 Qk = abs (1+ Gopt ) ^2*( Fk - Fmin ) /(4* Rn / Z0 ) // n o i s e c i r c l e
parameter
22 dfk = Gopt /(1+ Qk ) ; // c i r c l e c e n t e r l o c a t i o n
23 rfk = sqrt ((1 - abs ( Gopt ) ^2) * Qk + Qk ^2) /(1+ Qk ) // c i r c l e
radius
24
25
26 // p l o t a n o i s e c i r c l e
27 a =[0:360]/180* %pi ;
28 mtlb_hold on
29 plot ( real ( dfk ) + rfk * cos ( a ) , imag ( dfk ) + rfk * sin ( a ) , ’ b ’ , ’
l i n e w i d t h ’ ,2) ;
30
31 // p l o t o p t i m a l r e f l e c t i o n c o e f f i c i e n t
32 plot ( real ( Gopt ) , imag ( Gopt ) , ’ bo ’ ) ;
33

67
34
35 // s p e c i f y t h e d e s i r e d g a i n
36 G_goal_dB =8;
37 G_goal =10^( G_goal_dB /10) ;
38 K = 1.18;
39 // f i n d t h e c o n s t a n t o p e r a t i n g power g a i n c i r c l e s
40 go = G_goal / abs ( s21 ) ^2; // n o r m a l i z e d t h e g a i n
41 dgo = go * conj ( s22 - conj ( s11 ) ) /(1+ go *( abs ( s22 ) ^2) ) ; //
center
42
43 rgo = sqrt (1 -2* K * go * abs ( s12 * s21 ) + go ^2* abs ( s12 * s21 ) ^2) ;
44 rgo = rgo / abs (1+ go *( abs ( s22 ) ^2) ) ;
45
46 //map a c o n s t a n t g a i n c i r c l e i n t o t h e Gs p l a n e
47 rgs = rgo * abs ( s12 * s21 /( abs (1 - s22 * dgo ) ^2 - rgo ^2* abs ( s22 )
^2) ) ;
48 dgs =((1 - s22 * dgo ) * conj ( s11 - dgo ) - rgo ^2* s22 ) /( abs (1 - s22
* dgo ) ^2 - rgo ^2* abs ( s22 ) ^2) ;
49
50 // p l o t a c o n s t a n t g a i n c i r c l e i n t h e Smith Chart
51 mtlb_hold on
52 plot ( real ( dgs ) + rgs * cos ( a ) , imag ( dgs ) + rgs * sin ( a ) , ’ r ’ , ’
l i n e w i d t h ’ ,2) ;
53
54
55
56 // c h o o s e a s o u r c e r e f l e c t i o n c o e f f i c i e n t Gs
57 Gs = dgs + %i * rgs ;
58 plot ( real ( Gs ) , imag ( Gs ) , ’ r o ’ ) ;
59 // t e x t ( r e a l ( Gs ) − 0 . 0 5 , imag ( Gs ) + 0 . 0 8 , ’ \ b f \Gamma S ’ ) ;
60
61 // f i n d t h e a c t u a l n o i s e f i g u r e
62 F = Fmin +4* Rn / Z0 * abs ( Gs - Gopt ) ^2/(1 - abs ( Gs ) ^2) / abs (1+
Gopt ) ^2;
63
64 // p r i n t o u t t h e a c t u a l n o i s e f i g u r e
65 Actual_F_dB =10* log10 ( F )

68
Scilab code Exa 9.15 Constant VSWR design for given gain and noise figure

1 global Z0 ;
2 Z0 =50;
3 // d e f i n e t h e S−p a r a m e t e r s o f t h e t r a n s i s t o r
4 s11 =0.3* exp ( %i *(+30) /180* %pi ) ;
5 s12 =0.2* exp ( %i *( -60) /180* %pi ) ;
6 s21 =2.5* exp ( %i *( -80) /180* %pi ) ;
7 s22 =0.2* exp ( %i *( -15) /180* %pi ) ;
8 s_param = [ s11 s12 ; s21 s22 ]
9 delta = abs ( det ( s_param ) ) ;
10 k = (1 - abs ( s11 ) ^2 - abs ( s22 ) ^2 + delta ^2) ./(2* abs (
s12 * s21 ) ) ;
11
12 // n o i s e p a r a m e t e r s o f t h e t r a n s i s t o r
13 Fmin_dB =1.5
14 Fmin =10^( Fmin_dB /10) ;
15 Rn =4;
16 Gopt =0.5* exp ( %i *45/180* %pi ) ;
17
18
19 // compute a n o i s e c i r c l e
20 Fk_dB =1.6; // d e s i r e d n o i s e p e r f o r m a n c e
21 Fk =10^( Fk_dB /10) ;
22
23 Qk = abs (1+ Gopt ) ^2*( Fk - Fmin ) /(4* Rn / Z0 ) ; // n o i s e circle
parameter
24 dfk = Gopt /(1+ Qk ) ; // c i r c l e c e n t e r l o c a t i o n
25 rfk = sqrt ((1 - abs ( Gopt ) ^2) * Qk + Qk ^2) /(1+ Qk ) ; // c i r c l e
radius
26
27
28 // p l o t a n o i s e c i r c l e
29 a =[0:360]/180* %pi ;

69
30 mtlb_hold on
31 plot ( real ( dfk ) + rfk * cos ( a ) , imag ( dfk ) + rfk * sin ( a ) , ’ b ’ , ’
l i n e w i d t h ’ ,2) ;
32
33 // s p e c i f y t h e g o a l g a i n
34 G_goal_dB =8;
35 G_goal =10^( G_goal_dB /10) ;
36
37
38 // f i n d c o n s t a n t o p e r a t i n g power g a i n c i r c l e s
39 go = G_goal / abs ( s21 ) ^2; // n o r m a l i z e d g a i n
40 dgo = go * conj ( s22 - delta * conj ( s11 ) ) /(1+ go *( abs ( s22 ) ^2) )
; // c e n t e r
41
42 rgo = sqrt (1 -2* K * go * abs ( s12 * s21 ) + go ^2* abs ( s12 * s21 ) ^2) ;
43 rgo = rgo / abs (1+ go *( abs ( s22 ) ^2) ) ; // r a d i u s
44
45 //map a c o n s t a n t g a i n c i r c l e i n t o t h e Gs p l a n e
46 rgs = rgo * abs ( s12 * s21 /( abs (1 - s22 * dgo ) ^2 - rgo ^2* abs ( s22 )
^2) ) ;
47 dgs =((1 - s22 * dgo ) * conj ( s11 - delta * dgo ) - rgo ^2* s22 ) /( abs
(1 - s22 * dgo ) ^2 - rgo ^2* abs ( s22 ) ^2) ;
48
49 // p l o t c o n s t a n t g a i n c i r c l e i n t h e Smith Chart
50 mtlb_hold on
51 plot ( real ( dgs ) + rgs * cos ( a ) , imag ( dgs ) + rgs * sin ( a ) , ’ r ’ , ’
l i n e w i d t h ’ ,2) ;
52
53
54 // c h o o s e a s o u r c e r e f l e c t i o n c o e f f i c i e n t Gs
55 Gs = dgs + %i * rgs ;
56
57 // f i n d t h e c o r r e s p o n d i n g GL
58 GL =( s11 - conj ( Gs ) ) /( delta - s22 * conj ( Gs ) ) ;
59
60 // f i n d t h e a c t u a l n o i s e f i g u r e
61 F = Fmin +4* Rn / Z0 * abs ( Gs - Gopt ) ^2/(1 - abs ( Gs ) ^2) / abs (1+
Gopt ) ^2;

70
62
63 //% p r i n t o u t t h e a c t u a l n o i s e f i g u r e
64 Actual_F_dB =10* log10 ( F )
65
66 // f i n d t h e i n p u t and o u t p u t r e f l e c t i o n c o e f f i c i e n t s
67 Gin = s11 + s12 * s21 * GL /(1 - s22 * GL ) ;
68 Gout = s22 + s12 * s21 * Gs /(1 - s11 * Gs ) ;
69
70
71 // f i n d t h e VSWRin and VSWRout
72 Gimn = abs (( Gin - conj ( Gs ) ) /(1 - Gin * Gs ) ) ;
73 Gomn = abs (( Gout - conj ( GL ) ) /(1 - Gout * GL ) ) ;
74
75 VSWRin =(1+ Gimn ) /(1 - Gimn ) ; //VSWRin s h o u l d be u n i t y
s i n c e we u s e d t h e c o n s t a n t o p e r a t i n g g a i n
approach
76 VSWRout =(1+ Gomn ) /(1 - Gomn ) ;
77
78 // s p e c i f y t h e d e s i r e d VSWRin
79 VSWRin =1.5;
80
81 // f i n d p a r a m e t e r s f o r c o n s t a n t VSWR c i r c l e
82 Gimn =(1 - VSWRin ) /(1+ VSWRin )
83 dvimn =(1 - Gimn ^2) * conj ( Gin ) /(1 - abs ( Gimn * Gin ) ^2) ; //
c i r c l e center
84 rvimn =(1 - abs ( Gin ) ^2) * abs ( Gimn ) /(1 - abs ( Gimn * Gin ) ^2) ;
// c i r c l e r a d i u s
85
86 // p l o t VSWRin=1.5 c i r c l e i n t h e Smith Chart
87 plot ( real ( dvimn ) + rvimn * cos ( a ) , imag ( dvimn ) + rvimn * sin (
a ) , ’ g ’ , ’ l i n e w i d t h ’ ,2) ;
88
89
90 // p l o t a g r a p h o f t h e o u t p u t VSWR a s a f u n c t i o n o f
t h e Gs p o s i t i o n on t h e c o n s t a n t VSWRin c i r c l e
91 Gs = dvimn + rvimn * exp ( %i * a ) ;
92 Gout = s22 + s12 * s21 * Gs ./(1 - s11 * Gs ) ;
93

71
94 // f i n d t h e r e f l e c t i o n c o e f f i c i e n t s a t t h e i n p u t and
output matching networks
95 Gimn = abs (( Gin - conj ( Gs ) ) ./(1 - Gin * Gs ) ) ;
96 Gomn = abs (( Gout - conj ( GL ) ) ./(1 - Gout * GL ) ) ;
97
98 // and f i n d t h e c o r r e s p o n d i n g VSWRs
99 VSWRin =(1+ Gimn ) ./(1 - Gimn ) ;
100 VSWRout =(1+ Gomn ) ./(1 - Gomn ) ;
101
102 figure ; // open new f i g u r e f o r t h e VSWR p l o t
103 plot ( a / %pi *180 , VSWRout , ’ r ’ ,a / %pi *180 , VSWRin , ’ b ’ , ’
l i n e w i d t h ’ ,2) ;
104 legend ( ’VSWR { o u t } ’ , ’VSWR { i n } ’ ) ;
105 title ( ’ I n p u t and o u t p u t VSWR a s a f u n c t i o n o f \
Gamma S p o s i t i o n ’ ) ;
106 xlabel ( ’ A n g l e \ a l p h a , deg . ’ ) ;
107 ylabel ( ’ I n p u t and o u t p u t VSWRs ’ ) ;
108 mtlb_axis ([0 360 1.3 2.3])
109
110
111 // c h o o s e a new s o u r c e r e f l e c t i o n c o e f f i c i e n t
112 Gs = dvimn + rvimn * exp ( %i *85/180* %pi ) ;
113
114 // f i n d t h e c o r r e s p o n d i n g o u t p u t r e f l e c t i o n
coefficient
115 Gout = s22 + s12 * s21 * Gs ./(1 - s11 * Gs ) ;
116
117 // compute t h e t r a n s d u c e r g a i n i n t h i s c a s e
118 GT =(1 - abs ( GL ) ^2) * abs ( s21 ) ^2.*(1 - abs ( Gs ) .^2) ./ abs (1 -
GL * Gout ) .^2./ abs (1 - Gs * s11 ) .^2;
119 GT_dB =10* log10 ( GT )
120
121 // f i n d t h e i n p u t and o u t p u t m a t c h i n g n e t w o r k
reflection coefficients
122 Gimn = abs (( Gin - conj ( Gs ) ) ./(1 - Gin * Gs ) ) ;
123 Gomn = abs (( Gout - conj ( GL ) ) ./(1 - Gout * GL ) ) ;
124
125 // and f i n d t h e c o r r e s p o n d i n g VSWRs

72
Figure 9.5: Constant VSWR design for given gain and noise figure

126 VSWRin =(1+ Gimn ) ./(1 - Gimn )


127 VSWRout =(1+ Gomn ) ./(1 - Gomn )
128
129 // a l s o compute t h e o b t a i n e d n o i s e f i g u r e
130 F = Fmin +4* Rn / Z0 * abs ( Gs - Gopt ) ^2/(1 - abs ( Gs ) ^2) / abs (1+
Gopt ) ^2;
131 F_dB =10* log10 ( F )

73
Figure 9.6: Constant VSWR design for given gain and noise figure

74
Chapter 10

Oscillators and Mixers

Scilab code Exa 10.1 Design of a Colpitt oscillator

1 fo =200*10^6;
2 Vce =3;
3 Ic =3*10^ -3;
4
5 Cbc =0.1*10^ -15;
6 rBE =2*10^3;
7 rCE =10*10^3;
8 Cbe =100*10^ -15;
9 L3 =50*10^ -9;
10 L =50*10^ -9;
11 gm =0.11666;
12
13 disp ( ”DC v a l u e s o f H p a r a m e t e r s a r e ” ) ;
14 h11 = rBE ;
15 h12 =0;
16 h21 = rBE * gm ;
17 h22 =1/ rCE ;
18
19 disp ( ”Mho” ,h22 , ” h22 ” ,h21 , ” h21 ” ,h12 , ” h12 ” ,”Ohms” ,h11 ,
” h11 ” ) ;
20 k = h21 /( h11 * h22 - h21 * h12 ) ;

75
21 A =(1+ k ) / L ;
22 B = A ^2;
23 C =16* k *( %pi ) ^2* fo ^2*( h22 / h11 ) ;
24 D =8* k *( %pi ) ^2* fo ^2;
25 C2 =( A + sqrt ( B + C ) ) / D ;
26 C1 = k * C2 ;
27
28 disp ( ”H p a r a m e t e r s a t r e s o n a n c e f r e q u e n c y ” ) ;
29 w =2* %pi * fo ;
30 E =1+ %i * w *( Cbe + Cbc ) * rBE ;
31
32 hie = rBE / E ;
33 hre =( %i * w * Cbc * rBE ) / E ;
34 hfe =( rBE *( gm - %i * w * Cbc ) ) / E ;
35 hoe = h22 +( %i * w * Cbc *(1+ gm * rBE + %i * w * Cbe * rBE ) ) / E ;
36 disp ( ”Mho” ,hoe , ” hoe ” ,hfe , ” h f e ” ,hre , ” h r e ” ,”Ohms” ,hie ,
” h i e ”);

Scilab code Exa 10.2 Prediction of resonance frequencies of quartz crystal

1 stacksize ( ”max” ) ;
2 // d e f i n e c r y s t a l p a r a m e t e r s
3 Lq =0.1;
4 Rq =25;
5 Cq =0.3*10^ -12;
6 C0 =1*10^ -12;
7
8 // f i n d s e r i e s r e s o n a n c e f r e q u e n c y
9 ws0 =1/ sqrt ( Lq * Cq ) ;
10 disp ( ws0 ) ;
11 ws = ws0 *(1+ Rq ^2/2* C0 / Lq ) ;
12 fs = ws /2/ %pi
13
14 // f i n d p a r a l l e l r e s o n a n c e f r e q u e n c y
15 wp0 = sqrt (( Cq + C0 ) /( Lq * Cq * C0 ) ) ;

76
16 wp = wp0 *(1 - Rq ^2/2* C0 / Lq ) ;
17 fp = wp /2/ %pi
18
19 // d e f i n e f r e q u e n c y r a n g e f o r t h i s p l o t
20 f =(0.9:0.00001:1.1) *1 e6 ;
21 w =2* %pi * f ;
22
23 // f i n d a b m i t t a n c e o f t h e r e s o n a t o r
24 Y = %i .* w * C0 +1.0./( Rq + %i *( w * Lq -1.0./( w * Cq ) ) ) ;
25
26 plot ( f /1 e6 , abs ( imag ( Y ) ) ) ;
27 mtlb_axis ([0.9 1.1 1e -10 1e -1]) ;
28 title ( ’ A d m i t t a n c e o f t h e q u a r t z c r y s t a l r e s o n a t o r ’ ) ;
29 xlabel ( ’ F r e q u e n c y {\ i t f } , MHz ’ ) ;
30 ylabel ( ’ S u s c e p t a n c e | B | , \Omega ’ ) ;

Scilab code Exa 10.3 Adding a positive feedback element to initiate oscillations

1 Z0 =50;
2 // o s c i l l a t i o n f r e q u e n c y
3 f =2*10^9;
4 w =2* %pi * f ;
5 // t r a n s i s t o r S−p a r a m e t e r s a t o s c i l l a t i o n f r e q u e n c y
6
7 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 ) ];
8 s11 = ss2tf (1 ,1) ;
9 s12 = ss2tf (1 ,2) ;
10 s21 = ss2tf (2 ,1) ;
11 s22 = ss2tf (2 ,2) ;
12
13 // f i n d t h e Z−p a r a m e t e r s o f t h e t r a n s i s t o r

77
Figure 10.1: Adding a positive feedback element to initiate oscillations

78
14 z_tr = ss2tf ( s_tr , Z0 ) ;
15
16 // a t t e m p t t o add i n d u c t o r t o b a s e i n o r d e r t o
increase instability
17 L =(0:0.01:2) *1 e -9;
18
19 Z_L = %i * w * L ;
20 z_L =[1 ,1;1 ,1];
21
22 N = length ( L ) ;
23
f o r the S parameters of the
24 // c r e a t e v a r i a b l e s
transistor with the i n d u c t o r
25 s11 = zeros ([1 N ]) ;
26 s12 = zeros ([1 N ]) ;
27 s21 = zeros ([1 N ]) ;
28 s22 = zeros ([1 N ]) ;
29
30 // R o l l e t t s t a b i l i t y f a c t o r
31 K = zeros ([1 N ]) ;
32
33 for n =1: N
34 z_total = z_tr + z_L * Z_L ( n ) ;
35 s_total = ss2tf ( z_total , Z0 ) ;
36 s11 ( n ) = s_total (1 ,1) ;
37 s12 ( n ) = s_total (1 ,2) ;
38 s21 ( n ) = s_total (2 ,1) ;
39 s22 ( n ) = s_total (2 ,2) ;
40 K ( n ) =(1 - abs ( s11 ( n ) ) ^2 - abs ( s22 ( n ) ) ^2+ abs ( det (
s_total ) ) ^2) /2/ abs ( s12 ( n ) * s21 ( n ) ) ;
41 end ;
42
43 plot ( L /1 e -9 , K ) ;
44 title ( ’ S t a b i l i t yf a c t o r o f t h e t r a n s i s t o r i n common−
b a s e mode v s . b a s e i n d u c t a n c e ’ ) ;
45 xlabel ( ’ Base i n d u c t a n c e L , nH ’ ) ;
46 ylabel ( ’ R o l l e t t s t a b i l i t y f a c t o r \ i t k ’ )

79
Scilab code Exa 10.6 Dielectric resonator oscillator design

1 // d e f i n e t h e S−p a r a m t e r s o f t h e t r a n s i s t o r a t
resonance frequency
2 s11 =1.1* exp ( %i *(170) /180* %pi ) ;
3 s12 =0.4* exp ( %i *( -98) /180* %pi ) ;
4 s21 =1.5* exp ( %i *( -163) /180* %pi ) ;
5 s22 =0.9* exp ( %i *( -170) /180* %pi ) ;
6
7 s =[ s11 , s12 ; s21 , s22 ];
8
9 // d e f i n e o s c i l l a t i o n f r e q u e n c y
10 f0 =8 e9 ;
11 w0 =2* %pi * f0 ;
12
13 // d e f i n e p a r a m e t e r s o f t h e d i e l e c t r i c r e s o n a t o r
14 Z0 =50;
15 beta =7;
16 R = beta *2* Z0 ;
17 Qu =5 e3 ;
18
19 // compute e q u i v a l e n t L and C
20 L = R /( Qu * w0 ) ;
21 C =1/( L * w0 ^2) ;
22
23 // f i n d o u t p u t r e f l e c t i o n c o e f f i c i e n t o f t h e DR
24 Gout_abs = beta /(1+ beta ) ;
25 Gout_angle = - atan ( imag ( s11 ) , real ( s11 ) ) / %pi *180;
26
27 // compute e l e c t r i c a l l e n g t h o f t h e t r a n s m i s s i o n l i n e
f o r t h e DR
28 theta0 = -1/2* Gout_angle
29 Gout = Gout_abs * exp ( %i * Gout_angle * %pi /180) ;
30

80
31 // f i n d t h e o u t p u t i m p e d a n c e o f t h e DR
32 Zout = Z0 *(1+ Gout ) /(1 - Gout )
33
34
35 // f i n d t h e e q u i v a l e n t c a p a c i t a n c e ( i t w i l l be
n e c e s s a r y f o r the computation of the o s c i l l a t o r
w i t h o u t DR)
36 CC = -1/( w0 * imag ( Zout ) )
37
38 Rs =50;
39
40 // d e f i n e t h e f r e q u e n c y f o r t h e p l o t
41 delta_f =0.05 e9 ; // f r e q u e n c y r a n g e
42 f = f0 - delta_f /2 : delta_f /100 : f0 + delta_f /2;
43 w =2* %pi * f ;
44
45 if theta0 <0
46 theta0 =360+ theta0 ;
47 end ;
48
49 theta = theta0 * f / f0 /180* %pi ;
50
51 // r e p e a t t h e same c o m p u t a t i o n s a s above , but f o r
s p e c i f i e d frequency range
52 Gs =( Rs - Z0 ) /( Rs + Z0 ) ;
53 G1 = Gs * exp ( - %i *2* theta ) ;
54 R1 = Z0 *(1+ G1 ) ./(1 - G1 ) ;
55 Zd =1./(1/ R +1./( %i * w * L + %i * w * C ) ) ;
56 R1d = R1 + Zd ;
57 G1d =( R1d - Z0 ) ./( R1d + Z0 ) ;
58 G2 = G1d .* exp ( - %i *2* theta ) ;
59
60 // compute t h e o u t p u t r e f l e c t i o n c o e f f i c i e n t ( we have
o s c i l l a t i o n s i f | Gout | >1)
61 Gout = s22 + s12 * s21 * G2 ./(1 - s11 * G2 ) ;
62
63 figure ;
64 plot ( f /1 e9 , abs ( Gout ) , ’ b ’ , ’ l i n e w i d t h ’ ,2) ;

81
65 title ( ’ Output r e f l e c t i o n c o e f f i c i e n t o f t h e
o s c i l l a t o r w i t h DR ’ ) ;
66 xlabel ( ’ F r e q u e n c y f , GHz ’ ) ;
67 ylabel ( ’ Output r e f l e c t i o n c o e f f i c i e n t | \ Gamma { o u t } |
’ );
68 mtlb_axis ([7.975 8.025 0 14]) ;
69
70
71 // R e d e f i n e t h e f r e q u e n c y r a n g e ( we have t o i n c r e a s e
i t i n o r d e r t o be a b l e t o o b s e r v e any v a r i a t i o n s
in the response
72 delta_f =5 e9 ;
73 f = f0 - delta_f /2 : delta_f /100 : f0 + delta_f /2;
74 w =2* %pi * f ;
75
76 // Compute t h e o u t p u t r e f l e c t i o n c o e f f i c i e n t o f t h e
o s c i l l a t o r but w i t h DR r e p l a c e d by a s e r i e s
c o m b i n a t i o n o f r e s i s t a n c e and c a p a c i t a n c e
77 ZZ2 = real ( Zout ) +1./( %i * w * CC ) ;
78 GG2 =( ZZ2 - Z0 ) ./( ZZ2 + Z0 ) ;
79 GG = s22 + s12 * s21 * GG2 ./(1 - s11 * GG2 ) ;
80
81 figure ;
82 plot ( f /1 e9 , abs ( GG ) , ’ r ’ , ’ l i n e w i d t h ’ ,2) ;
83 title ( ’ Output r e f l e c t i o n c o e f f i c i e n t o f t h e
o s c i l l a t o r w i t h o u t DR ’ ) ;
84 xlabel ( ’ F r e q u e n c y f , GHz ’ ) ;
85 ylabel ( ’ Output r e f l e c t i o n c o e f f i c i e n t | \ Gamma { o u t } |
’ );

Scilab code Exa 10.8 Local oscillator frequency selection

82
Figure 10.2: Dielectric resonator oscillator design

83
Figure 10.3: Dielectric resonator oscillator design

1 fRF =1.89*10^9; //RF f r e q u e n c y


2 BW =20*10^6; // Bandwidth
3 fIF =200*10^6; // I n t e r m e d i a t e F r e q u e n c y
4 flo = fRF + fIF ; // L o c a l o s c i l l a t o r f r e q u e n c y
5 Q = fIF / BW ; // Q u a l i t y f a c t o t r
6 disp (Q , ” Q u a l i t y F a c t o r ” ) ;

84

You might also like