微带线matlab程序.docx
- 文档编号:29236703
- 上传时间:2023-07-21
- 格式:DOCX
- 页数:18
- 大小:213.79KB
微带线matlab程序.docx
《微带线matlab程序.docx》由会员分享,可在线阅读,更多相关《微带线matlab程序.docx(18页珍藏版)》请在冰豆网上搜索。
微带线matlab程序
作业二十矩量法计算带状线的电容、电感及特征阻抗
一、已知:
带状线宽度为W,上下接地板之间的距离为b
待求:
带状线的电容、电感及特征阻抗
图1
二、计算结果
1、上下接地板间的距离取b=0.5m时,带状线电容随其宽度W变化曲线
图2
2、上下接地板间的距离取b=0.5m时,带状线电感随其宽度W变化曲线
图3
3、上下接地板间的距离取b=0.5m时,带状线特征阻抗随其宽度W变化曲线
图4
4、带状线宽度W=0.1m时,带状线电容随上下接地板间的距离b的变化曲线
图5
5、带状线宽度W=0.1m时,带状线电感随上下接地板间的距离b的变化曲线
图6
6、带状线宽度W=0.1m时,带状线特征阻抗随上下接地板间的距离b的变化曲线
图7
三、讨论
1、矩量法求得的电容、电感、特征阻抗与解析公式求得的结果是相同的。
2、当带状线的宽度越小、上下接地板间距离越小、上接地板宽度取值越大时求得的结果误差越小。
四、程序
1、随W变化
clear;
clc;
ep=1e-9/(36*pi);
mu=4*pi*1e-7;
W1=0.05:
0.05:
0.5;
W2=1;
b=0.5;
N1=50;
N2=150;
dl1=W1/N1;
dl2=W2/N2;
N=N1+N2;
fori=1:
length(W1)
form=1:
N
ifm<=N1
y(i,m)=b/2;
x(i,m)=-W1(i)/2+dl1(i)/2+(m-1)*dl1(i);%每段中点坐标
dy(i,m)=0;
dx(i,m)=dl1(i);
dl(i,m)=dl1(i);
else
y(i,m)=b;
x(i,m)=-W2/2+dl2/2+(m-1)*dl2;%每段中点坐标
dy(i,m)=0;
dx(i,m)=dl2;
dl(i,m)=dl2;
end
end
end
B1=4*pi*ep*ones(N,1);
B1((N1+1):
(N1+N2))=0;
B2=4*pi*ep*ones(N,1);
B2(1:
N1)=0;
S=zeros(N,N,length(W1));
A1=zeros(N,length(W1));
A2=zeros(N,length(W1));
fori=1:
length(W1)
form=1:
N
forn=1:
N
a1=(x(i,m)-x(i,n))^2+(y(i,m)+y(i,n))^2;
b1=-2*(x(i,m)-x(i,n))*dx(i,n)+2*(y(i,m)+y(i,n))*dy(i,n);
c1=dl(i,n)^2;
a2=(x(i,m)-x(i,n))^2+(y(i,m)-y(i,n))^2;
b2=-2*(x(i,m)-x(i,n))*dx(i,n)-2*(y(i,m)-y(i,n))*dy(i,n);
c2=dl(i,n)^2;
daerta1=b1^2-4*a1*c1;
daerta2=b2^2-4*a2*c2;
if(daerta1>=0)&&(daerta2>=0)
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(daerta1)/c1*atanh((b1+c1)/sqrt(daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(daerta1)/c1*atanh((b1-c1)/sqrt(daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(daerta2)/c2*atanh((b2+c2)/sqrt(daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(daerta2)/c2*atanh((b2-c2)/sqrt(daerta2+eps)));
elseif(daerta1>=0)&&(daerta2<=0)
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(daerta1)/c1*atanh((b1+c1)/sqrt(daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(daerta1)/c1*atanh((b1-c1)/sqrt(daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(-daerta2)/c2*atan((b2+c2)/sqrt(-daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(-daerta2)/c2*atan((b2-c2)/sqrt(-daerta2+eps)));
elseif(daerta1<=0)&&(daerta2>=0)
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(-daerta1)/c1*atan((b1+c1)/sqrt(-daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(-daerta1)/c1*atan((b1-c1)/sqrt(-daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(daerta2)/c2*atanh((b2+c2)/sqrt(daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(daerta2)/c2*atanh((b2-c2)/sqrt(daerta2+eps)));
else
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(-daerta1)/c1*atan((b1+c1)/sqrt(-daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(-daerta1)/c1*atan((b1-c1)/sqrt(-daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(-daerta2)/c2*atan((b2+c2)/sqrt(-daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(-daerta2)/c2*atan((b2-c2)/sqrt(-daerta2+eps)));
end
S(m,n,i)=s1(i,m,n)-s2(i,m,n);
end
end
A1(:
i)=S(:
:
i)\B1;
A2(:
i)=S(:
:
i)\B2;
%%%%%%%%%%%%%%%%%%%%%%%%
C11(i)=sum(A1((1:
N1),i))*dl1(i);
C21(i)=sum(A1(((N1+1):
(N1+N2)),i))*dl2;
C12(i)=sum(A2((1:
N1),i))*dl1(i);
C22(i)=sum(A2(((N1+1):
(N1+N2)),i))*dl2;
L(i)=mu*ep/C11(i);
Zc(i)=sqrt(L(i)/C11(i));
end
figure
(1)
plot(W1,C11,'*-r');
title('带状线电容随其宽度W的变化');
xlabel('带状线的宽度W');
ylabel('电容(F/m)');
gridon
holdon
figure
(2)
plot(W1,L,'*-r');
title('带状线电感随其宽度W的变化');
xlabel('带状线的宽度W');
ylabel('电容(H/m)');
gridon
holdon
figure(3)
plot(W1,Zc,'*-r');
title('带状线特征阻抗随其宽度W的变化');
xlabel('带状线的宽度W');
ylabel('特征阻抗(Ω)');
gridon
holdon
%%%%%%%%%%%%%%%%%%%%%%%%
form=1:
length(W1)
ifW1(m)/b>=0.35
We(m)=W1(m);
C0(m)=4*ep*(We(m)+0.441*b)/b;
L0(m)=mu*b/(4*(We(m)+0.441*b));
Zc0(m)=sqrt(mu/ep)*b/(4*(We(m)+0.441*b));
else
We(m)=b*(W1(m)/b-(0.35-W1(m)/b)^2);
C0(m)=4*ep*(We(m)+0.441*b)/b;
L0(m)=mu*b/(4*(We(m)+0.441*b));
Zc0(m)=sqrt(mu/ep)*b/(4*(We(m)+0.441*b));
end
end
figure
(1)
plot(W1,C0,'-b');
gridon
holdon
figure
(2)
plot(W1,L0,'-b');
gridon
holdon
figure(3)
plot(W1,Zc0,'-b');
gridon
holdon
2、随b变化
clear;
clc;
ep=1e-9/(36*pi);
mu=4*pi*1e-7;
W1=0.1;
W2=1;
b=0.05:
0.05:
0.5;
N1=50;
N2=150;
dl1=W1/N1;
dl2=W2/N2;
N=N1+N2;
fori=1:
length(b)
form=1:
N
ifm<=N1
y(i,m)=b(i)/2;
x(i,m)=-W1/2+dl1/2+(m-1)*dl1;%每段中点坐标
dy(i,m)=0;
dx(i,m)=dl1;
dl(i,m)=dl1;
else
y(i,m)=b(i);
x(i,m)=-W2/2+dl2/2+(m-1)*dl2;%每段中点坐标
dy(i,m)=0;
dx(i,m)=dl2;
dl(i,m)=dl2;
end
end
end
B1=4*pi*ep*ones(N,1);
B1((N1+1):
(N1+N2))=0;
B2=4*pi*ep*ones(N,1);
B2(1:
N1)=0;
S=zeros(N,N,length(b));
A1=zeros(N,length(b));
A2=zeros(N,length(b));
fori=1:
length(b)
form=1:
N
forn=1:
N
a1=(x(i,m)-x(i,n))^2+(y(i,m)+y(i,n))^2;
b1=-2*(x(i,m)-x(i,n))*dx(i,n)+2*(y(i,m)+y(i,n))*dy(i,n);
c1=dl(i,n)^2;
a2=(x(i,m)-x(i,n))^2+(y(i,m)-y(i,n))^2;
b2=-2*(x(i,m)-x(i,n))*dx(i,n)-2*(y(i,m)-y(i,n))*dy(i,n);
c2=dl(i,n)^2;
daerta1=b1^2-4*a1*c1;
daerta2=b2^2-4*a2*c2;
if(daerta1>=0)&&(daerta2>=0)
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(daerta1)/c1*atanh((b1+c1)/sqrt(daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(daerta1)/c1*atanh((b1-c1)/sqrt(daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(daerta2)/c2*atanh((b2+c2)/sqrt(daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(daerta2)/c2*atanh((b2-c2)/sqrt(daerta2+eps)));
elseif(daerta1>=0)&&(daerta2<=0)
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(daerta1)/c1*atanh((b1+c1)/sqrt(daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(daerta1)/c1*atanh((b1-c1)/sqrt(daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(-daerta2)/c2*atan((b2+c2)/sqrt(-daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(-daerta2)/c2*atan((b2-c2)/sqrt(-daerta2+eps)));
elseif(daerta1<=0)&&(daerta2>=0)
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(-daerta1)/c1*atan((b1+c1)/sqrt(-daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(-daerta1)/c1*atan((b1-c1)/sqrt(-daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(daerta2)/c2*atanh((b2+c2)/sqrt(daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(daerta2)/c2*atanh((b2-c2)/sqrt(daerta2+eps)));
else
s1(i,m,n)=dl(i,n)*((1/2+b1/(2*c1))*log(a1+1/2*b1+1/4*c1)-1+sqrt(-daerta1)/c1*atan((b1+c1)/sqrt(-daerta1+eps)))-...
dl(i,n)*((-1/2+b1/(2*c1))*log(a1-1/2*b1+1/4*c1)+1+sqrt(-daerta1)/c1*atan((b1-c1)/sqrt(-daerta1+eps)));
s2(i,m,n)=dl(i,n)*((1/2+b2/(2*c2))*log(a2+1/2*b2+1/4*c2)-1+sqrt(-daerta2)/c2*atan((b2+c2)/sqrt(-daerta2+eps)))-...
dl(i,n)*((-1/2+b2/(2*c2))*log(a2-1/2*b2+1/4*c2)+1+sqrt(-daerta2)/c2*atan((b2-c2)/sqrt(-daerta2+eps)));
end
S(m,n,i)=s1(i,m,n)-s2(i,m,n);
end
end
A1(:
i)=S(:
:
i)\B1;
A2(:
i)=S(:
:
i)\B2;
%%%%%%%%%%%%%%%%%%%%%%%%
C11(i)=sum(A1((1:
N1),i))*dl1;
C21(i)=sum(A1(((N1+1):
(N1+N2)),i))*dl2;
C12(i)=sum(A2((1:
N1),i))*dl1;
C22(i)=sum(A2(((N1+1):
(N1+N2)),i))*dl2;
L(i)=mu*ep/C11(i);
Zc(i)=sqrt(L(i)/C11(i));
end
figure
(1)
plot(b,C11,'*-r');
title('带状线电容随b的变化');
xlabel('上下接地板间的距离b');
ylabel('电容(F/m)');
gridon
holdon
figure
(2)
plot(b,L,'*-r');
title('带状线电感随b的变化');
xlabel('上下接地板间的距离b');
ylabel('电感(H/m)');
gridon
holdon
figure(3)
plot(b,Zc,'*-r');
title('带状线特征阻抗随b的变化');
xlabel('上下接地板间的距离b');
ylabel('特征阻抗(Ω)');
gridon
holdon
%%%%%%%%%%%%%%%%%%%%%%%%
form=1:
length(b)
ifW1/b(m)>=0.35
We=W1;
C0(m)=4*ep*(We+0.441*b(m))/b(m);
L0(m)=mu*b(m)/(4*(We+0.441*b(m)));
Zc0(m)=sqrt(mu/ep)*b(m)/(4*(We+0.441*b(m)));
else
We(m)=b(m)*(W1/b(m)-(0.35-W1/b(m))^2);
C0(m)=4*ep*(We(m)+0.441*b(m))/b(m);
L0(m)=mu*b(m)/(4*(We(m)+0.441*b(m)));
Zc0(m)=sqrt(mu/ep)*b(m)/(4*(We(m)+0.441*b(m)));
end
end
figure
(1)
plot(b,C0,'*-b');
gridon
holdon
figure
(2)
plot(b,L0,'*-b');
gridon
holdon
figure(3)
plot(b,Zc0,'*-b');
gridon
holdon
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 微带 matlab 程序
![提示](https://static.bdocx.com/images/bang_tan.gif)