How to solve Microwave Engineering Pozar chapter 03 exercise 09 with MATLAB

Published by John_2016 in the blog blog title. Views: 72


Question

[​IMG]


the literature source is available here:
https://www.amazon.co.uk/Microwave-Engineering-David-M-Pozar/dp/0470631554

There's also a solutions manual available here:
https://www.scribd.com/doc/176505749/Microwave-engineering-pozar-4th-Ed-solutions-manual

attached .zip pack including:
  • MATLAB script pozar_03_exercise_09.m
  • results in pozar_03_exercise_09_vars.mat
  • explanation in Adobe format pozar_03_exercise_09.pdf
  • all support function needed to run the main MATLAB script
  • picture with [POZAR] question of exercise 3.9
  • picture with answer header.
Answer

[​IMG]

This exercise shows how cut-off frequency significantly varies with varying relative permittivity of a rectangular waveguide filling material.
A solid slab of thickness equal to a fraction of rectangular waveguide dimension a is used to add another relative permittivity > 1 inside the waveguide.

[​IMG]

er=2.25
a=2.286e-2
Znull=k0.*tan(k0*er^.5*a/2)+er^.5*k0.*tan(k0*a/2)
plot(k0,Znull);grid on


Next, narrowing k0 to possible values, the waveguide can be completely empty, or completely full of dielectric er=2.25

do not apply

fc_TE01=c0/(2*pi*er^.5)*((n*pi/a)^2+m*pi/b)^2).^.5

directly, because the waveguide is only partially filled with dielectric

m=0;n=1
c0=299792856

b=a/2
% assume

er=1;
k_100pc_empty_TE01=((n*pi/a)^2+(m*pi/b)^2).^.5

er=2.25;
k_100pc_full_TE01=1/er^.5*((n*pi/a)^2+(m*pi/b)^2).^.5

k0=linspace(k_100pc_full_TE01, k_100pc_empty_TE01,250)

Znull=k0.*tan(k0*er^.5*a/2)+er^.5*k0.*tan(k0*a/2)
plot(k0,Znull);grid on


narrow a bit further

k0=linspace(95,135,250)
Znull=k0.*tan(k0*er^.5*a/2)+er^.5*k0.*tan(k0*a/2)
plot(k0,Znull);grid on


it looks like there's no root but there is a zero crossing

axis([95 135 -2000 8000])

Trying different start points to test the solver:

syms x;eq1= x*tan(x*er^.5*a/2)+er^.5*x*tan(x*a/2)==0
kc_half_full=eval(solve(eq1,x))

znull=@(k0)k0*tan(k0*er^.5*a/2)+er^.5*k0*tan(k0*a/2)
kc_half_full=fsolve(znull, k_100pc_empty_TE01-1)
fsolve(znull, k_100pc_empty_TE01-1)
fsolve(znull, k_100pc_full_TE01)


kc_half_full = 0
kc_half_full = 1.059496190161356e+02
= 1.059496190161356e+02
= 1.059496190161246e+02


and the cut-off frequency for this waveguide half full of er=2.25 dielectric is:

fc_half_full=kc_half_full*c0/(2*pi)
kc_over_t=[]
for t=0:a/100:a
znull=@(k0) k0*tan(k0*er^.5*t)+er^.5*k0*tan(k0*(a-t))
kc_over_t=[kc_over_t fsolve(znull,k_100pc_full_TE01)];
end
fc_over_t=kc_over_t*c0/(2*pi)
plot(fc_over_t);grid on


fc_half_full = 5.055228729393790e+09
= 2.266616158763929e+02
fc_half_full = 5.055228729393790e+09


[​IMG]

Apparently, there seems to be a range of t dielectric depth that when partially obstructing the waveguide cross-section with such percentage of dielectric, which would be equivalent to cutting the waveguide at all. But this doesn't make sense; wave don't stop flow for such small variation of dielectric depth. It has to do with a limitation of the solver.

Actually, the solver fsolve produces outputs too dependent on start point

kc_over_t=[]
x0=50
for t=0:a/100:a
znull=@(k0) k0*tan(k0*er^.5*t)+er^.5*k0*tan(k0*(a-t))
kc_over_t=[kc_over_t fsolve(znull,k_100pc_full_TE01+x0)];
end


fc_over_t=kc_over_t*c0/(2*pi)
subplot(2,2,1);plot(fc_over_t);grid on
title(['x0=' num2str(x0)])


kc_over_t=[]
x0=100
for t=0:a/100:a
znull=@(k0) k0*tan(k0*er^.5*t)+er^.5*k0*tan(k0*(a-t))
kc_over_t=[kc_over_t fsolve(znull,k_100pc_full_TE01+x0)];
end


fc_over_t=kc_over_t*c0/(2*pi)
subplot(2,2,3);plot(fc_over_t);grid on
title(['x0=' num2str(x0)])


kc_over_t=[]
x0=0
for t=0:a/100:a
znull=@(k0) k0*tan(k0*er^.5*t)+er^.5*k0*tan(k0*(a-t))
kc_over_t=[kc_over_t fsolve(znull,k_100pc_full_TE01+x0)];
end


fc_over_t=kc_over_t*c0/(2*pi)
subplot(2,2,2);plot(fc_over_t);grid on
title(['x0=' num2str(x0)])


kc_over_t=[]
x0=-10
for t=0:a/100:a
znull=@(k0) k0*tan(k0*er^.5*t)+er^.5*k0*tan(k0*(a-t))
kc_over_t=[kc_over_t fsolve(znull,k_100pc_full_TE01+x0)];
end


fc_over_t=kc_over_t*c0/(2*pi)
subplot(2,2,4);plot(fc_over_t);grid on
title(['x0=' num2str(x0)])


[​IMG]

Tried alternative procedure but it doesn't work

kc_over_t=[]
k0=[k01:.01:k02];
a_range=[0:a/100:a];
for s=1:1:numel(a_range) % t=0:a/100:a
t1=a_range(s)
znull=@(k0) real(k0.*tan(k0*er^.5*t1)+er^.5*k0.*tan(k0*(a-t1)));
y_znull=znull(k0);
plot(k0,y_znull);grid on % check
hold on
plot([95 135],[0 0],'r-')
[n1,v]=find(y_znull(y_znull<1e-5));
[n2,v]=find(y_znull(y_znull>-1e-5));
if numel(union(n1,n2))==1
rot1=k0(union(n1,n2))
end
if isempty(numel(union(n1,n2)))

rot1=[]
end
if numel(union(n1,n2))>1
nu=union(n1,n2);
rot1=k0(floor(.5*(min(nu)+max(n2))))
end
kc_over_t=[kc_over_t rot1];
end


because the cut-off frequency is supposed to change over dielectric depth, but it shows as constant.

figure;plot(kc_over_t)
fc_over_t=kc_over_t*c0/(2*pi)
figure;plot(fc_over_t);grid on


1st correction to split Zleft+Zright into real and imaginary. Trying different dielectric slab thickness, one at a time:

t=a/2


Real(Z_left+Z_right) shouldn't have more than one root, the other asymptotes cannot be considered a roots since value they randomly point up or down, towards Inf of -Inf, sign and amount of asymptotes should always converge to a constant amount and values, regardless of span.

er=2.25
a=2.286e-2
k0=[0:.0001:150];


Znull=k0.*tan(k0*er^.5*a/2)+er^.5*k0.*tan(k0*a/2);
L1=10*log10(abs(real(Znull)));
figure;
subplot(2,1,1);plot(k0,10*log10(real(Znull)),'b');
grid on;
title('10*log10 Real(Zleft+Zright)'); axis tight
hold on;plot([0 150],[0 0],'r-')
subplot(2,1,2);plot(k0,imag(Znull));
grid on;
title('Imag(Zleft+Zright)'); axis([0 150 -.1000 .1000])



the notch just above k0=100 the zero crossing that is going to give use the varying cut-off frequency as function of the dielectric depth t. Following a few sample values to show that the cut-off frequency cannot be constant with varying dielectric depth t:


t=a/4
Znull=k0.*tan(k0*er^.5*t)+er^.5*k0.*tan(k0*(a-t));
L1=10*log10(real(Znull));
plot(k0,10*log10(real(Znull)),'b');
grid on;title('10*log10 Real(Zleft+Zright)'); %axis tight
hold on;plot([0 150],[0 0],'r-')
text(100,-60,'t=a/4')

t=a/8
Znull=k0.*tan(k0*er^.5*t)+er^.5*k0.*tan(k0*(a-t));
L1=10*log10(real(Znull));
plot(k0,10*log10(real(Znull)),'b');
grid on;title('10*log10 Real(Z_left+Z_right)');
text(100,-60,'t=a/8')



t=3*a/4
Znull=k0.*tan(k0*er^.5*t)+er^.5*k0.*tan(k0*(a-t));
L1=10*log10(real(Znull));
plot(k0,10*log10(real(Znull)),'b');
grid on;title('10*log10 Real(Zleft+Zright)');
hold on;plot([0 150],[0 0],'r-')
text(100,-60,'t=3/4*a')


t=a*7/8
Znull=k0.*tan(k0*er^.5*t)+er^.5*k0.*tan(k0*(a-t));
L1=10*log10(real(Znull));
plot(k0,10*log10(real(Znull)),'b');
grid on;title('10*log10 Real(Zleft+Zright)');
hold on;plot([0 150],[0 0],'r-')
text(100,-60,'t=7/8*a')


t=0.99*a
Znull=k0.*tan(k0*er^.5*t)+er^.5*k0.*tan(k0*(a-t));
L1=10*log10(real(Znull));
plot(k0,10*log10(real(Znull)),'b');
grid on;title('10*log10 Real(Zleft+Zright)');
hold on;plot([0 150],[0 0],'r-')
text(100,-60,'t=.99*a')


Some of the results:

[​IMG]


Now let's find k0(t) and fc(t), t range resolution N=1e3 steps.

t range resolution 1/N, N being N=1e4, but it took around 5 minutes. To remove the narrow notch, it seems that increasing the resolution works on that direction but the cost of longer computation time.

narrowing k0 values to those between waveguide completely empty and completely full of (uniform) dielectric.

N=1e3 % N=1e4 may take over 5 minutes
k0=linspace(k_100pc_full_TE01,k_100pc_empty_TE01,N);
t=a*linspace(0,1,N)

kc_over_t=[];
for p=1:1:N
Znull=k0.*tan(k0*er^.5*t(p))+er^.5*k0.*tan(k0*(a-t(p)));
L1=10*log10(abs(real(Znull)));
figure(13);
plot(k0,10*log10(abs(real(Znull))),'b');
grid on;title('10*log10 Real(Zleft+Zright)');
hold on;plot([0 150],[0 0],'r-');
text(100,-60,['t=' num2str(p) '*a']);
kc_over_t=[kc_over_t k0(find(L1==min(L1)))];
end


propagation constant (wave number) as function of dielectric slab thickness:

figure(14);
yyaxis left
plot(t/a,kc_over_t);grid on
ylabel('kc(t)');xlabel('t/a')


cut-off frequency over dielectric slab thickness:

fc_over_t=kc_over_t*c0/(2*pi);
% figure(15);
yyaxis right
plot(t/a,fc_over_t);grid on
ylabel('fc(t)');xlabel('t/a')


there may be a way to remove the glitch with a limit on a Taylor approximation of the tangent expressions inside an if clause that runs when derivative sudden step takes place, but it's going to be easier to just interpolate:


Simply decimating and again interpolating doesn't work, it actually widens the gap.

P=10 % tried 4 to 10
kc_over_t2=kc_over_t([1: P:end]);
fc_over_t2=fc_over_t([1: P:end]);
dkc_over_t=diff(kc_over_t)
dfc_over_t=diff(fc_over_t)
dt=t([1:1:end-1])
figure(15);
yyaxis left
plot(dt/a,dkc_over_t);grid on
ylabel('kc(t)');xlabel('t/a')
yyaxis right

plot(dt/a,dfc_over_t);grid on
ylabel('fc(t)');xlabel('t/a')

The peaks are exactly on the same points for both kv and fc, so getting one min max pair is enough

n1=find(dkc_over_t==min(dkc_over_t))
n2=find(dkc_over_t==max(dkc_over_t))
kc_over_t([n1-1:n2+1])=linspace(kc_over_t(n1-1),kc_over_t(n2+1),n2-n1+1+2)
fc_over_t([n1-1:n2+1])=linspace(fc_over_t(n1-1),fc_over_t(n2+1),n2-n1+1+2

figure(15);
% glitch corrected
yyaxis left
plot(t/a,kc_over_t);grid on
ylabel('kc(t)');xlabel('t/a')

% cut-off frequency over dielectric slab thickness:
fc_over_t=kc_over_t*c0/(2*pi);
yyaxis right
plot(t/a,fc_over_t);grid on
ylabel('fc(t)');xlabel('t/a')


[​IMG]


And following, variation of rectangular waveguide TE01 cut-off frequencies for the 18 common rectangular waveguides listed in [POZAR] Appendix I pg720.

The main script pozar_03_exercise_09.m already loads the 18 common rectangular waveguides listed in [POZAR] Appendix I pg720 but if you are running chunks of code instead of running the entire script, load the waveguide details with waveguide_struct_container.m for the next lines of code.

hf16=figure(16);ax16=gca
for s=1:1:size(WG,2)

k_100pc_full_TE01= 1/er^.5*((n*pi/(WG(s).a*1e-2))^2+(m*pi/(WG(s).b*1e-2))^2).^.5
k_100pc_empty_TE01=((n*pi/(WG(s).a*1e-2))^2+(m*pi/(WG(s).b*1e-2))^2).^.5

N=1e3 % N: resolution
k0=linspace(k_100pc_full_TE01,k_100pc_empty_TE01,N)
t=WG(s).a*1e-2*linspace(0,1,N)
kc_over_t=[];
for p=1:1:N

Znull=k0.*tan(k0*er^.5*t(p))+er^.5*k0.*tan(k0*(WG(s).a*1e-2-t(p)));
L1=10*log10(abs(real(Znull)));
kc_over_t=[kc_over_t k0(find(L1==min(L1)))];
end
fc_over_t=kc_over_t*c0/(2*pi);

dfc_over_t=diff(fc_over_t)
% glitch fixer
dt=t([1:1:end-1])
n1=find(dfc_over_t==min(dfc_over_t))
n2=find(dfc_over_t==max(dfc_over_t))

fc_over_t([n1-1:n2+1])=linspace(fc_over_t(n1-1),fc_over_t(n2+1),n2-n1+1+2)
plot(ax16,t./(WG(s).a*1e-2),fc_over_t);grid(ax16,'on');
grid(ax16,'minor')
hold on;
end

title(ax16,['TE01 cut-off frequencies variation with t thick dielectric slab er =' num2str(er)])
ylabel(ax16,'fc(t) [Hz]');xlabel(ax16,'t/a')
str10={};
for s=1:1:size(WG,2)
str10{s}=WG(s).bw_name
end
legend(str10,'Location','northwestoutside')


[​IMG]


Filling waveguides with slabs is not the same as inserting Irises:

Slabs are compact material physically sizing waveguide volume. Symmetrical or asymmetrical irises are usually really thin, the sized volume by each iris may be neglected.

Example waveguide band bass filter implemented with a series of dielectric irises. Read more about irises in rectangular waveguides here:

http://www.microwavejournal.com/art...-structures-using-simple-neural-architectures
You need to be logged in to comment