0% found this document useful (0 votes)
23 views15 pages

RF Lab Manual

Uploaded by

gurjumunirathnam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views15 pages

RF Lab Manual

Uploaded by

gurjumunirathnam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NAME OF THE EXP NO: 4

DESIGN OF IMPEDANCE MATCHING


EXPERIMENT DATE:
NETWORK
AIM:
To design a impedance matching network using MATLAB.
PRE-REQUISITE:

 Basics of Open circuited Transmission Line


 Input impedance calculations
 Programming in MATLAB

SOFTWARE USED:

 MATLAB

DESIGN REQUIREMENTS & PROCEDURE:

 Highlight commands from the command History, right-click and select Create Script.
 On the Home tab, click the New Script button.
 Use the edit function.
 After you create a script, you can add code to the script and save it.
 Type the script name on the command line and press Enter.
 On the Editor tab, click the Run button.
 When execution of the script completes, the variables remain in the MATLAB
workspace.
CIRCUIT DIAGRAM:
The input impedance of a terminated lossless line is given as,

The input impedance of an open circuited transmission line is obtained by replacing ZL


with infinity,

CODING
Impedence matching network
clear all
close all
clc
z0=50
d=1
c=3*10e8
B=-500:10:500
zin= -(1i*(z0*cotd(rad2deg(B*d))));
figure
plot(B,abs(zin))
xlabel('B')
ylabel('Zin')
title('Input impedance of an open circuited Tx line')

Input impedance of an open circuited Tx line


1200

1000

800
Zin

600

400

200

0
-500 -400 -300 -200 -100 0 100 200 300 400 500
B
RESULT:
NAME OF THE EXP NO: 5
DESIGN AND CHARACTERIZATION
EXPERIMENT DATE:
OF RF BJT AMPLIFIER AND LNA

AIM:
To design and characterization of RF BJT Amplifier and LNA using MATLAB.

PRE-REQUISITE:

 Amplifier design Concepts.


 Programming in MATLAB

SOFTWARE USED:

 MATLAB

DESIGN REQUIREMENTS & PROCEDURE:

 Highlight commands from the command History, right-click and select Create Script.
 On the Home tab, click the New Script button.
 Use the edit function.
 After you create a script, you can add code to the script and save it.
 Type the script name on the command line and press Enter.
 On the Editor tab, click the Run button.
 When execution of the script completes, the variables remain in the MATLAB
workspace.
BLOCK DIAGRAM:
CIRCUIT DIAGRAM:

Figure: Circuit Diagram of an Amplifier

Figure: Circuit Diagram of an LNA (Low Noise Amplifier)

CODING FOR AMPLIFIER:


Rfamplifier

clear all
close all
clc
h=rfckt.amplifier()
s=sparameters(h);
figure(),
subplot(2,2,1)
plot(h,'S11','dB')
title('Amplifier S11'),
subplot(2,2,2),
plot(h,'S12','dB')
title('Amplifier S12')
subplot(2,2,3),
plot(h,'S21','dB')
title('Amplifier S11')
subplot(2,2,4),
plot(h,'S22','dB')
title('Amplifier S12')
figure();
plot(h,'Gt','dB');
title('Amplifier gain');

Amplifier S11 Amplifier S12


0 0
S 11 S 12
-1000
-5
Magnitude (decibels)

Magnitude (decibels)
-2000
-10 -3000

-15 -4000

-5000
-20
-6000

-25 -7000
1 1.5 2 2.5 3 1 1.5 2 2.5 3
Freq [GHz] Freq [GHz]

Amplifier S11 Amplifier S12


25 0
S 21 S 22
20
Magnitude (decibels)

Magnitude (decibels)

-5

15
-10
10

-15
5

0 -20
1 1.5 2 2.5 3 1 1.5 2 2.5 3
Freq [GHz] Freq [GHz]
Amplifier gain
22
G
t

20

18

16
Magnitude (decibels)

14

12

10

2
1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3
Freq [GHz]

CODING FOR LNA:


clear all
close all
clc
TL1=txlineMicrostrip('Width',3.41730e-3,
'Height',1.524e-3,
'EpsilonR',3.48,
'LossTangent',0.0037,
'LineLength',8.9e-3,
'Thickness',0.0035e-3,
'StubMode',
'Shunt','
Termination',
'Open');
TL2 = txlineMicrostrip('Width',3.41730e-3,
'Height',1.524e-3,
'EpsilonR',3.48,
'LossTangent',0.0037,
'LineLength',14.7e3,
'Thickness',0.0035e-3);
freq = 2e9:10e6:3e9;
casamp = circuit([amp1,clone(amp1)],'amplifiers'); % amplifier ciruit without MNW.
S2 = sparameters(casamp,freq);
TL3 = txlineMicrostrip('Width',3.41730e-3,
'Height',1.524e-3,
'EpsilonR',3.48,
'LossTangent',0.0037,
'LineLength',22.47e-3,
'Thickness',0.0035e-3);
TL4 = txlineMicrostrip('Width',3.41730e-3,
'Height',1.524e-3,
'EpsilonR',3.48,
'LossTangent',0.0037,
'LineLength',5.66e-3,
'Thickness',0.0035e-3,
'StubMode',
'Shunt',
'Termination',
'Open');
c = circuit([TL1, TL2,clone(amp1),
clone(amp1),TL3, TL4]); % two-stage LNA with MNW
figure
S3 = sparameters(c,freq);
rfplot(S2,1,1)
hold on;
rfplot(S3,1,1)
legend('|S11| of Two-Stage LNA Without MNW','|S11| of Two-Stage LNA with MNW');
title('Input Reflection Coefficients of Two-Stage LNA');
grid on;
figure
rfplot(S2,2,2)
hold on;
rfplot(S3,2,2)
legend('|S22| of Without MNW','|S22| of With MNW');
title('Output Reflection Coefficients of Two-Stage LNA');
grid on;

RESULT
NAME OF THE EXP NO: 6
DESIGN OF LOW PASS, HIGH PASS,
EXPERIMENT DATE:
BAND PASS AND BAND STOP FILTER
AT RF

AIM:

To design of low pass, high pass, band pass and band stop filter at RF using
MATLAB.

PRE-REQUISITE:

 Basics of filter design.


 Programming in MATLAB

SOFTWARE USED:

 MATLAB

DESIGN REQUIREMENTS & PROCEDURE:

 Highlight commands from the command History, right-click and select Create Script.
 On the Home tab, click the New Script button.
 Use the edit function.
 After you create a script, you can add code to the script and save it.
 Type the script name on the command line and press Enter.
 On the Editor tab, click the Run button.
 When execution of the script completes, the variables remain in the MATLAB
workspace.
EQUATIONS FOR LPF, HPF:
FREQUENCY RESPONSE FOR LPF, HPF, BPF & BSF:

CODING For BAND PASS AND STOP BAND

clear all
close all
clc
filter1 = rfckt.lcbandpasspi('C',[1e-12 4e-12],'L',[2e-9 2.5e-9]);
analyze(filter1,logspace(5,10,1000));
filter2 = rfckt.lcbandstoppi('C',[1e-12 4e-12],'L',[2e-9 2.5e-9]);
analyze(filter2,logspace(5,10,1000));
s1=sparameters(filter1);
s2=sparameters(filter2);
figure()
subplot(2,2,1);
plot(filter1,'S11','dB');
title('BANDPASS');
subplot(2,2,2);
plot(filter1,'S12','dB');
title('BANDPASS');
subplot(2,2,3);
plot(filter1,'S21','dB');
title('BANDPASS');
subplot(2,2,4);
plot(filter1,'S22','dB');
title('BANDPASS');
figure()
subplot(2,2,1);
plot(filter2,'S11','dB');
title('BANDSTOP');
subplot(2,2,2);
plot(filter2,'S12','dB');
title('BANDSTOP');
subplot(2,2,3);
plot(filter2,'S21','dB');
title('BANDSTOP');
subplot(2,2,4);
plot(filter2,'S22','dB');
title('BANDSTOP');

filter1 = rfckt.lcbandpasspi with properties:


L: [2×1 double]
C: [2×1 double]
nPort: 2
AnalyzedResult: []
Name: 'LC Bandpass Pi'
ans = rfckt.lcbandpasspi with properties:
L: [2×1 double]
C: [2×1 double]
nPort: 2
AnalyzedResult: [1×1 rfdata.data]
Name: 'LC Bandpass Pi'
filter2 = rfckt.lcbandstoppi with properties:
L: [2×1 double]
C: [2×1 double]
nPort: 2
AnalyzedResult: []
Name: 'LC Bandstop Pi'
ans = rfckt.lcbandstoppi with properties:
L: [2×1 double]
C: [2×1 double]
nPort: 2
AnalyzedResult: [1×1 rfdata.data]
Name: 'LC Bandstop Pi'
s1 = sparameters: S-parameters object
NumPorts: 2
Frequencies: [1000×1 double]
Parameters: [2×2×1000 double]
Impedance: 50.0000 + 0.0000i
rfparam(obj,i,j) returns S-parameter Sij
s2 = sparameters: S-parameters object
NumPorts: 2
Frequencies: [1000×1 double]
Parameters: [2×2×1000 double]
Impedance: 50.0000 + 0.0000i
rfparam(obj,i,j) returns S-parameter Sij
BANDPASS BANDPASS
2 0
S 11 S 12
0
Magnitude (decibels)

Magnitude (decibels)
-50
-2

-4 -100

-6
BANDSTOP BANDSTOP
0 0
-150
S 11 S 12
-8
Magnitude (decibels)

Magnitude (decibels)
-50 -10
-10 -200
0 2 4 6 8 10 0 2 4 6 8 10
Freq [GHz] Freq [GHz]
-100 -20
BANDPASS BANDPASS
0 0
-150 S 21 -30 S 22
-2
Magnitude (decibels)

Magnitude (decibels)
-50

-200 -4 -40
0 2 4 6 8 10 0 2 4 6 8 10
-100
Freq [GHz] Freq [GHz]
-6

-150 BANDSTOP BANDSTOP


0 -8 0
S 21 S 22
-200 -10
Magnitude (decibels)

Magnitude (decibels)
0 2 4 -10 6 8 10 0 2 4
-50 6 8 10
Freq [GHz] Freq [GHz]

-20 -100

-30 -150

-40 -200
0 2 4 6 8 10 0 2 4 6 8 10
Freq [GHz] Freq [GHz]

CODING FOR LPF & HPF:


clear all
close all
clc

h = rfckt.lclowpasstee('C',20e-12,'L',10e-10)
m = analyze(h,logspace(1,9,1000))

s = extract(h,'S-parameters',75);

l = rfckt.lchighpasstee('C',2e-5,'L',5e-7)
n = analyze(l,logspace(1,9,1000))

figure
subplot(2,2,1)
plot(h,'S11','dB')
title('S11 lowpass')
subplot(2,2,2)
semilogy(h,'S12','dB')
title('S12 lowpass')

subplot(2,2,3)
semilogy(h,'S21','dB')
title('S21 lowpass')
subplot(2,2,4)
plot(h,'S22','dB') title('S22
lowpass') figure

subplot(2,2,1)
plot(l,'S11','dB')
title('S11 highpass')
subplot(2,2,2)
semilogy(l,'S12','dB')
title('S12 highpass')
subplot(2,2,3)
semilogy(l,'S21','dB')
title('S21 highpass')
subplot(2,2,4)
plot(l,'S22','dB')
title('S22 highpass')
RESULT

You might also like