Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am trying to replicate a graph learning matLab. The graph is close but it is o

ID: 2291729 • Letter: I

Question

I am trying to replicate a graph learning matLab. The graph is close but it is off either in calculations or something.

% L MATCHING CODE FOR REFLECTION COEFFICIENT WITH FREQUENCY

clearall;

clc;

ZL=200-j*100;%Load Impedance

Z0=100;%Z0

f=0:0.1:1;%Frequency Range

w=2*pi.*f*1e9;%Omega

%Solution 1

C1=0.92e-12;%Value of C1

L1=38.8e-9;%Value of L1

Zc1=1./(j*w*C1);%Impedance of Capacitor 1

Zl1=j*w*L1;%Impedance of Inductor 1

parallel1=(ZL*Zc1)./(ZL+Zc1);%Parallel Impedance 1

Zin1=Zl1+parallel1;%Ztotal1=Zin1

Ref1=(Zin1-Z0)./(Z0+Zin1);%Refflection Coefficient 1

%Solution 2

C2=2.61e-12;%Value of C2

L2=46.1e-9;%Value of L2

Zc2=1./(j.*w.*C2);%Impedance of Capacitor 2

Zl1=j.*w.*L2;%Impedance of Inductor 2

parallel2=(ZL.*Zl1)./(ZL+Zl1);%Parallel Impedance 2

Zin2=Zc2+parallel2;%Ztotal2=Zin2

Ref2=(Zin2-Z0)./(Z0+Zin2);%Refflection Coefficient 2

%Result

plot(f,abs(Ref1),f,abs(Ref2));

legend('Solution #1','Solution #2','Location','NorthEast');

title('Reflection Coefficient Vs Frequency (GHz)');

xlabel('f (GHz)');

ylabel(' Reflection Coefficient Magnitude');

Graph shoould look like this below.

Figure 1 File Edit View Insert Tools Desktop Window Help Reflection Coefficient Vs Frequency (GHz) Solution #1 0.9 0.8 0.7 S 0.6 0.5 0.4 03 0.2 0.1 02 0.3 0.4 0.5 0.6 0.7 0.8 0.9 f (GHz)

Explanation / Answer

% L MATCHING CODE FOR REFLECTION COEFFICIENT WITH FREQUENCY

clear all;

clc;

ZL=200-j*100;%Load Impedance

Z0=100;%Z0

f=0:0.0001:1;%Frequency Range

w=2*pi.*f*1e9;%Omega

%Solution 1

C1=0.92e-12;%Value of C1

L1=38.8e-9;%Value of L1

Zc1=1./(j*w*C1);%Impedance of Capacitor 1

Zl1=j*w*L1;%Impedance of Inductor 1

parallel1=(ZL*Zc1)./(ZL+Zc1);%Parallel Impedance 1

Zin1=Zl1+parallel1;%Ztotal1=Zin1

Ref1=(Zin1-Z0)./(Z0+Zin1);%Refflection Coefficient 1

%Solution 2

C2=2.61e-12;%Value of C2

L2=46.1e-9;%Value of L2

Zc2=1./(j.*w.*C2);%Impedance of Capacitor 2

Zl1=j.*w.*L2;%Impedance of Inductor 2

parallel2=(ZL.*Zl1)./(ZL+Zl1);%Parallel Impedance 2

Zin2=Zc2+parallel2;%Ztotal2=Zin2

Ref2=(Zin2-Z0)./(Z0+Zin2);%Refflection Coefficient 2

%Result

plot(f,abs(Ref1),f,abs(Ref2),'--');

%legend('Solution #1','Solution #2','Location','NorthEast');

text(0.35,0.6,'Solution 2')
text(0.58,0.4,'Solution 1')
title('Reflection Coefficient Vs Frequency (GHz)');

xlabel('f (GHz)');

ylabel(' Reflection Coefficient Magnitude');

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote