ZIP with MATLAB scripts and note:
example 6.6
example 6.6 notes:
c0=299792458
L=21.75e-3 % resonator length
er=1.9 % resonator fill-up
Z0=50
f1=c0/(2*L*er^.5) % resonating frequency
cm2m=100 % dB/cm to dB/m
Np2db=10*log10(exp(1)^2);
alpha_dB=.01/.01; % .01dB/cm
Q0=pi*np2db/(2*L*alpha_dB) % lambdag=lambda0/er^.5
bc=(pi/(2*Q0))^.5 % for resonance R=Z0
g=2*Q0*bc^2/pi % coupling coefficient: g=Z0/R
C1=bc/(2*pi*f1*Z0) % [F]
bc_range=[0:.0001:.1];
g_range=2/pi*Q0*bc_range.^2;
figure;plot(bc_range,g_range);grid on
hold on
plot([0 .1],[1 1],'-r')
xlabel('bc');ylabel('g')
title('coupling coefficient: g=Z0/R=2/\pi*Q0*bc^2')
axis([0 .1 0 5])
ht1=text(.07,4,'overcoupled')
ht2=text(.07,.5,'undercoupled')
ht1.FontWeight='bold'
ht1.FontSize=12
ht1.HorizontalAlignment='center'
ht2.FontWeight='bold'
ht2.FontSize=12
ht2.HorizontalAlignment='center'
min(abs(g_range-1))
syms d % example of Newton-Raphson
target=1
fun1=@(d) 2/pi*Q0*d^2-target
fun1d=diff(fun1,d)
x0=.3;x=x0;
error=1;
n=0;
tol=0.0001;
disp(' n XN error')
while (error>=tol)
n=n+1;
Xn=x-fun1(x)/vpa(subs(fun1d,d,x));
error=abs((Xn-x)/Xn);
x=Xn;
fprintf('\t%i\t%3.5f\t%f\n', n, x, error);
end
x1=double(x)
hp2=plot(x1,fun1(x1)+target,'o')
hp2.MarkerSize=10
hp2.MarkerEdgeColor=[1 0 0]
hp2.MarkerFaceColor=[1 0 0]
f1 =
4.999823177956395e+09
Q0 =
6.272994730307318e+02
bc =
0.050040596405629
g =
1.000000000000000
C1 =
3.185795973079832e-14
= 0.001621880682179
n XN error
1 0.15417 0.945861
2 0.08521 0.809385
3 0.05730 0.487104
4 0.05050 0.134604
5 0.05004 0.009142
6 0.05004 0.000042
x1 =
0.050040596449323
Having found the normalised admittance between under-coupling and over-coupling, how to calculate the gap L distance had we started knowing bc
bc0=x1
C0=bc0/(2*pi*f1*Z0)
Q01=pi/(2*bc0^2)
L0=pi*Np2dB/(2*Q01*alpha_dB) % [m]
bc0 =
0.050040596449323
C0 =
3.185795975861569e-14
Q01 =
6.272994719352553e+02
L0 =
0.021750000037983
Example 6.6 adds Smith Chart plots for the following 3 values of capacitance modelled coupling gap:
C=[.06 .033 .02]*1e-12 % capacitance coupling gap
bc=2*pi*f0*Z0*C % normalised admittance
Q0=pi./(2*bc) % how sharp is the freq peak
Bc=bc/Z0 % normalised admittance
Z1=Z0./(2*pi*f1*C)/1e3
hf3=figure(2);sm1=smithchart; ax2=hf3.CurrentAxes;hold(ax2,'on')
[x_r1,y_r1,hL1]=Smith_plotRcircle(ax2,Z1(1),Z0,[1 .5 .5]);
hL1.LineWidth=1.5
[x_r2,y_r2,hL2]=Smith_plotRcircle(ax2,Z1(2),Z0,[.5 1 .5]);
hL2.LineWidth=1.5
[x_r3,y_r3,hL3]=Smith_plotRcircle(ax2,Z1(3),Z0,[.5 .5 1]);
hL3.LineWidth=1.5
str1=['C = ' num2str(round(C(1)*1e12,4)) ' pF']
str2=['C = ' num2str(round(C(2)*1e12,4)) ' pF']
str3=['C = ' num2str(round(C(3)*1e12,4)) ' pF']
legend(ax2,{str1,str2,str3},'Location','northeastoutside')
How to add annotations on Smith charts
n1 =[ -0.2000 0.4000; 0 0.2000; 0.3000 -0.2000]
plot(ax2,n1(:,1),n1(:,2),'sb','MarkerSize',10, ...
'MarkerFaceColor','b')
dx1=.5;dy1=.1;
dim11 = [abs(n1(1,1)-dx1-ax2.XLim(1))/...
abs(ax2.XLim(2)-ax2.XLim(1)) ...
1-abs(n1(1,2)-dy1-ax2.YLim(2))/...
abs(ax2.YLim(2)-ax2.YLim(1)) ]
dx2=.6;dy2=.1;
dim21 = [abs(n1(2,1)-dx2-ax2.XLim(1))/...
abs(ax2.XLim(2)-ax2.XLim(1)) ...
1-abs(n1(2,2)-dy2-ax2.YLim(2))/...
abs(ax2.YLim(2)-ax2.YLim(1)) ]
dx3=.7;dy3=.2;
dim31 = [abs(n1(3,1)-dx3-ax2.XLim(1))/...
abs(ax2.XLim(2)-ax2.XLim(1)) ...
1-abs(n1(3,2)-dy3-ax2.YLim(2))/...
abs(ax2.YLim(2)-ax2.YLim(1)) ]
annotation('textbox',[dim11 dx1 dy1], ...
'String',str1,'FitBoxToText','on')
annotation('textbox',[dim21 dx2 dy2], ...
'String',str2,'FitBoxToText','on')
annotation('textbox',[dim31 dx3 dy3], ...
'String',str3,'FitBoxToText','on')
C =
1.0e-13 *
0.600000000000000 0.330000000000000 0.200000000000000
bc =
0.094244446590695 0.051834445624882 0.031414815530232
Q0 =
16.667256094323445 30.304101989678990 50.001768282970332
Bc =
0.001884888931814 0.001036688912498 0.000628296310605
Z1 =
26.526761951900934 48.230476276183516 79.580285855702797