impedance matching single stub
Afficher commentaires plus anciens
I am trying to plot the reflection coefficient magnitude from 1 to 3 GHz for a single stub Short circuit to get the result below.
I worked on the code but I am not getting the same result.
clear all;
close all;
clc;
f = linspace(1e9, 3e9, 2000);
omega = 2 * pi * f; % Angular frequency
Z0 = 50;
R_load = 60;
C_load = 0.995e-12;
Gamma1 = zeros(size(f));
Gamma2 = zeros(size(f));
c = 3e8;
lambda = c ./ f
l_stub1 = 0.110*(c./2e9);
l_stub2 = 0.260*(c./2e9);
for i = 1:length(f)
lambda = c / f(i); % Wavelength
beta = 2 * pi / lambda; % Phase constant
% Load impedance (complex due to capacitor)
ZL = R_load - 1i./(omega(i) * C_load)*l_stub1;
ZL1 = R_load - 1i./(omega(i) * C_load)*l_stub2;
% Stub impedances (short-circuited stub)
Z_stub1 = -1i * Z0 * tan(beta * l_stub1); % Solution #1
Z_stub2 = -1i * Z0 * tan(beta * l_stub2); % Solution #2
% Total impedance at the point where the stub connects
Z_total1 = 1 ./ (1./ZL + 1./Z_stub1);
Z_total2 = 1 ./ (1./ZL + 1./Z_stub2);
% Reflection coefficients
Gamma1(i) = (Z_total1 - Z0) / (Z_total1 + Z0);
Gamma2(i) = (Z_total2 - Z0) / (Z_total2 + Z0);
end
absGamma1 = abs(Gamma1);
absGamma2 = abs(Gamma2);
figure;
plot(f / 1e9, absGamma1, 'b', f / 1e9, absGamma2, 'r--');
xlabel('Frequency (GHz)');
ylabel('|Γ|');
title('Magnitude of Reflection Coefficient |Γ| versus Frequency');
legend('Solution #1', 'Solution #2');
grid on;

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Circuit Envelope Simulation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!