Problem of simulating s parameters of branch line coupler
I am stimulating the branch line coupler in the first ppt you have given, and I found that while it could stimulate S11 and S31 in different wavelength, I found it could not stimulate S21 and S41 correctly, instead they overlap with S31 and S21 respectively.
This is my code:
Z=50;
Z1=Z/sqrt(2);
omega=0:0.01:2;
syms S11 S21 S31 S41;
for i=1:1:201
resOdd=1;
Odd1=[1,0;-1i/Z,1];
Odd2=[cos(pi/2/omega(i)),1i*Z1*sin(pi/2/omega(i));1i*sin(pi/2/omega(i))/Z1,cos(pi/2/omega(i))];
resOdd=resOdd*Odd1*Odd2*Odd1;
AOdd=resOdd(1,1);
BOdd=resOdd(1,2);
COdd=resOdd(2,1);
DOdd=resOdd(2,2);
S11Odd=(-DOdd+AOdd-Z*COdd+BOdd/Z)/(DOdd+AOdd+Z*COdd+BOdd/Z);
S21Odd=2*Z/(Z*DOdd+Z*AOdd+Z^2*COdd+BOdd);
resEven=1;
Even1=[1,0;1i/Z,1];
Even2=[cos(pi/2/omega(i)),1i*Z1*sin(pi/2/omega(i));1i*sin(pi/2/omega(i))/Z1,cos(pi/2/omega(i))];
resEven=resEven*Even1*Even2*Even1;
AEven=resEven(1,1);
BEven=resEven(1,2);
CEven=resEven(2,1);
DEven=resEven(2,2);
S11Even=(-DEven+AEven-Z*CEven+BEven/Z)/(DEven+AEven+Z*CEven+BEven/Z);
S21Even=2*Z/(Z*DEven+Z*AEven+Z^2*CEven+BEven);
S11a=abs((S11Even+S11Odd)/2);
S21a=abs((S21Even+S21Odd)/2);
S31a=abs((S21Even-S21Odd)/2);
S41a=abs((S11Even-S11Odd)/2);
S11(i)=20*log10(S11a);
S21(i)=20*log10(S21a);
S31(i)=20*log10(S31a);
S41(i)=20*log10(S41a);
end
plot(omega,S11)
hold on
plot(omega,S21)
hold on
plot(omega,S31)
hold on
plot(omega,S41)
hold off
P1 is my stimulation result:
and P2&P3 is the stimulation result from other research of branch line coupler:
I have checked both my code and the scale conversion between frequency and wavelength, from which I still could not understand how the results are not matched.I am stimulating the branch line coupler in the first ppt you have given, and I found that while it could stimulate S11 and S31 in different wavelength, I found it could not stimulate S21 and S41 correctly, instead they overlap with S31 and S21 respectively.
This is my code:
Z=50;
Z1=Z/sqrt(2);
omega=0:0.01:2;
syms S11 S21 S31 S41;
for i=1:1:201
resOdd=1;
Odd1=[1,0;-1i/Z,1];
Odd2=[cos(pi/2/omega(i)),1i*Z1*sin(pi/2/omega(i));1i*sin(pi/2/omega(i))/Z1,cos(pi/2/omega(i))];
resOdd=resOdd*Odd1*Odd2*Odd1;
AOdd=resOdd(1,1);
BOdd=resOdd(1,2);
COdd=resOdd(2,1);
DOdd=resOdd(2,2);
S11Odd=(-DOdd+AOdd-Z*COdd+BOdd/Z)/(DOdd+AOdd+Z*COdd+BOdd/Z);
S21Odd=2*Z/(Z*DOdd+Z*AOdd+Z^2*COdd+BOdd);
resEven=1;
Even1=[1,0;1i/Z,1];
Even2=[cos(pi/2/omega(i)),1i*Z1*sin(pi/2/omega(i));1i*sin(pi/2/omega(i))/Z1,cos(pi/2/omega(i))];
resEven=resEven*Even1*Even2*Even1;
AEven=resEven(1,1);
BEven=resEven(1,2);
CEven=resEven(2,1);
DEven=resEven(2,2);
S11Even=(-DEven+AEven-Z*CEven+BEven/Z)/(DEven+AEven+Z*CEven+BEven/Z);
S21Even=2*Z/(Z*DEven+Z*AEven+Z^2*CEven+BEven);
S11a=abs((S11Even+S11Odd)/2);
S21a=abs((S21Even+S21Odd)/2);
S31a=abs((S21Even-S21Odd)/2);
S41a=abs((S11Even-S11Odd)/2);
S11(i)=20*log10(S11a);
S21(i)=20*log10(S21a);
S31(i)=20*log10(S31a);
S41(i)=20*log10(S41a);
end
plot(omega,S11)
hold on
plot(omega,S21)
hold on
plot(omega,S31)
hold on
plot(omega,S41)
hold off
P1 is my stimulation result:
and P2&P3 is the stimulation result from other research of branch line coupler:
I have checked both my code and the scale conversion between frequency and wavelength, from which I still could not understand how the results are not matched. I am stimulating the branch line coupler in the first ppt you have given, and I found that while it could stimulate S11 and S31 in different wavelength, I found it could not stimulate S21 and S41 correctly, instead they overlap with S31 and S21 respectively.
This is my code:
Z=50;
Z1=Z/sqrt(2);
omega=0:0.01:2;
syms S11 S21 S31 S41;
for i=1:1:201
resOdd=1;
Odd1=[1,0;-1i/Z,1];
Odd2=[cos(pi/2/omega(i)),1i*Z1*sin(pi/2/omega(i));1i*sin(pi/2/omega(i))/Z1,cos(pi/2/omega(i))];
resOdd=resOdd*Odd1*Odd2*Odd1;
AOdd=resOdd(1,1);
BOdd=resOdd(1,2);
COdd=resOdd(2,1);
DOdd=resOdd(2,2);
S11Odd=(-DOdd+AOdd-Z*COdd+BOdd/Z)/(DOdd+AOdd+Z*COdd+BOdd/Z);
S21Odd=2*Z/(Z*DOdd+Z*AOdd+Z^2*COdd+BOdd);
resEven=1;
Even1=[1,0;1i/Z,1];
Even2=[cos(pi/2/omega(i)),1i*Z1*sin(pi/2/omega(i));1i*sin(pi/2/omega(i))/Z1,cos(pi/2/omega(i))];
resEven=resEven*Even1*Even2*Even1;
AEven=resEven(1,1);
BEven=resEven(1,2);
CEven=resEven(2,1);
DEven=resEven(2,2);
S11Even=(-DEven+AEven-Z*CEven+BEven/Z)/(DEven+AEven+Z*CEven+BEven/Z);
S21Even=2*Z/(Z*DEven+Z*AEven+Z^2*CEven+BEven);
S11a=abs((S11Even+S11Odd)/2);
S21a=abs((S21Even+S21Odd)/2);
S31a=abs((S21Even-S21Odd)/2);
S41a=abs((S11Even-S11Odd)/2);
S11(i)=20*log10(S11a);
S21(i)=20*log10(S21a);
S31(i)=20*log10(S31a);
S41(i)=20*log10(S41a);
end
plot(omega,S11)
hold on
plot(omega,S21)
hold on
plot(omega,S31)
hold on
plot(omega,S41)
hold off
P1 is my stimulation result:
and P2&P3 is the stimulation result from other research of branch line coupler:
I have checked both my code and the scale conversion between frequency and wavelength, from which I still could not understand how the results are not matched. branchline coupler, s-parameter MATLAB Answers — New Questions