I am not getting the exact reactance part value j1.8 (mentioned in BOOK) using my code , I am getting zero for my reactance part code, Can anybody help me out?
Show older comments
I am here mentioning my code , using this code my input imedance should be 233.9_j1.8 ohm, I am getting 234 ohm for the real part but my reactance part of the input impedance is zero. Here, i am attaching the equations which I am using in my code for imedance calculation and I am also providing the code output plot from the book here. I am mainly using equation 25 to get output. I need exactly that figure value in output plot. I am getting exactly same for the real part by my reactance part is showing 0 value.Kindly fix my code so that I can get exact value for the reactance part.
%Parameters TE10
c= 299792458;
m=1;
n=0;
h= 0.0795e-2;
dm=2;
dn=1;
eps0= 8.85418782e-12;
epsR= 2.32;
eps= eps0*epsR;
a= 10e-2;
b= 1.5e-2;
theta1 =2e-2/(a+h);
z_p =-1.5e-2;
phi_p =1e-2/(a+h);
w= 5e-3;
Qf= 112.4;
del_eff= 1/Qf;
fr=[2349:1:2549]*1e+6;
fmn=c/(2*sqrt(epsR))*sqrt((m/(2*(a+h)*theta1)^2)+(n/(2*b))^2);
%fmn= 2449e+6;
befn= sin(m*pi*w/(4*a*theta1))/(m*pi*w/(4*a*theta1));
%Z= ((h*dm*dn)/(8*pi*a*b*theta1))*((cos (n*pi*z_p)/(2*b))^2)*((cos(m*pi*phi_p)/(2*theta1))^2)*((bessel(j0,m*pi*w)/(4*a*theta1)).^2)* ((del_eff^3)-i(freq)(freq^2-fmn^2))/(del_eff^4+)
Zin= h*dm*dn/(8*pi*eps*a*b*theta1)*cos(n*pi*z_p/(2*b))^2*cos(m*pi*phi_p/(2*theta1))^2*befn^2.*(del_eff*fr.^3-1i*fr.*(fr.^2-fmn^2))./(del_eff^2*fr.^4+(fr.^2-fmn^2).^2)
figure(1)
plot(fr*1e-6,real(Zin),'b','LineWidth',3);
hold on
plot(fr*1e-6,imag(Zin),'r','LineWidth',3);
set(gcf,'color',[1 1 1]);
set(gca,'fontsize',18);
xlabel('freq [MHz]')
ylabel('R and X [ohm]');
xlim([2349 2549]);
%ylim([1480 1560]);
legend('R','X');
for k=1:length(fr)
if(fr(k)==fmn) % replace fmn with any desired frequency to get the imput impedance at this freq.
Zin_res=complex(real(Zin(k))+imag(Zin(k)));
end
end
k
Zin_res
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!