下载此文档

MATLAB仿真平面电磁波在不同媒介分界面上的入射.pdf


文档分类:通信/电子 | 页数:约12页 举报非法文档有奖
1/12
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/12 下载此文档
文档列表 文档介绍
该【MATLAB仿真平面电磁波在不同媒介分界面上的入射 】是由【花开花落】上传分享,文档一共【12】页,该文档可以免费在线阅读,需要了解更多关于【MATLAB仿真平面电磁波在不同媒介分界面上的入射 】的内容,可以使用淘豆网的站内搜索功能,选择自己适合的文档,以下文字是截取该文章内的部分文字,如需要获得完整电子版,请下载此文档到您的设备,方便您编辑和打印。:.
.
MATLAB仿真平面电磁波在不同媒介分界面上的入射、反射和折射
一、实验目的:
1、进一步学****MATLAB,初步掌握GUI界面的编程。
2、通过编程实现电磁波仿真效果图。
3、进一步理解平面电磁波的入射、反射和折射现象
二、实验要求:
1、以电场为例,动态演示平面电磁波的传播情况。
2、可以任意设置媒介的介电常数和入射角。
3、考虑金属导体和空气的分界面平面电磁波的入射、反射情况。
三、实验原理:
电磁波从一种媒质入射到第二种媒质时,分界面使一部分能量反射回第一种
媒质,另一部分能量折射到第二种媒质中,反射波和折射波得大小和相位取决于
分界面两侧的媒质特性、极化方向和入射角大小等,当电磁波入射到理想导体表
面时,会发生全反射。这一过程中包括的主要原理有以下三点。
1、正弦平面波在媒质分界面的反射和折射规律
波对分界面的入射是任意的,但为了方便,我们假设入射面与zox面重合。
波在z>0时发生入射和反射,在z<0时发生折射并令空间任意一点r处的入射
波、反射波和折射波场强为:
EEejKrEejK(xsinzcos)
i1ii
ii0i0

EEejKrEejK(xsinzcos)
i1rr
rr0r0
jKrjK(xsinzcos)
EEeiEe1tt
tt0t0
图表1正弦波斜入射示意图
根据在z=0的界面上电场强度的切线分量相等的边界条件,有
E(x,y,0)E(x,y,0)E(x,y,0)
irt
故必有ksinksinksin
1i1r2t
反射定律:
ir
折射定律:ksinksin
1i2r
2、正弦平面波对理想介质的斜入射
①垂直极化波
垂直极化波对理想介质斜入射如图所示,由折射和反射定律,我们可以得到
在任意媒质中的场强。
在第一煤质中
.:.
.
EE(ejkzcosRejkzcos)ejkxsin
111111
1yi0
H(Hcos)(ejkzcosRejkzcos)ejkxsin
111111
1xi01

H(Hsin)(ejk1zcos1Rejk1zcos1)ejk1xsin1

1zi01
在第二煤质中
coscos
E2112E
r0coscosi0
2112
2cos
E21E
t0coscosi0
2112
EEejk(xsinxcos)
222
2yt0
H(Hcos)ejk(xsinxcos)
222
2xt02

H(Hsin)ejk2(xsin2xcos2)

2zt02
图表2垂直极化波斜入射
②平行极化波
平行极化波对理想介质斜入射如图所示,由折射和反射定律,我们可以得到
在任意媒质中的场强。
在第一煤质中
E(Ecos)(ejkzcosRejkzcos)ejkxsin
111111
1xi01
E(Esin)(ejk1zcos1Rejk1zcos1)ejk1xsin1
1zi01
jkzcosjkzcosjkxsin
HH(e11Re11)e11
1yi0
在第二煤质中
.:.
.
coscos
E2211E
r0coscosi0
2211
2cos
E21E
t0coscosi0
2211
E(Ecos)ejk(xsinzcos)
222
2xt02
E(Esin)ejk(xsinzcos)
222
2zt01
jk(xsinzcos)
HHe222
2yt0
图表3平行极化波斜入射
3、正弦平面波对理想导体表面的斜入射
①垂直极化波
垂直极化波对理想导体斜入射如图所示,入射波在导体表面发生全反射,我
们可以得到在任意媒质中的场强。
EEEE(ejkxcosejkxcos)ejkzsin
yiri0

j2Esin(kxcos)ejkzsin
i0

HHsinHsinHsin[ejkxcosejkxcos]ejkzsin
xiri0

j2Hsinsin(kxcos)ejkzsin

i0

HHcosHcosHcos[ejkxcosejkxcos]ejkzsin
ziri0
2Hcoscos(kxcos)ejkzsin
i0
②平行极化波
.:.
.
垂直极化波对理想导体斜入射如图所示,入射波在导体表面发生全反射,我
们可以得到在任意媒质中的场强。
E2Esincos(kxcos)ejkzsin
xi0
Ej2Ecossin(kxcos)ejkzsin
zi0
jkzsin
H2Hcos(kxcos)e
yi0
四、实验程序;
实验程序比较长,。(附件)
生成的界面:
五、实验总结;
这次实验总体感觉收获比较大。
首先,之前学****的MATLAB都是基于图片之类的编程,没有学****过GUI的使用。通过这
次实验,我初步学****了一下GUI,算是现学现卖吧。虽然学的不是很深,但是对于基本的功
能的使用应该还是可以的。
再次,对于电磁场地学****都是停留在书面作业上,通过这次实验,加深了我对电磁场传
播的理解。
最后,其实如果只有我一个人,应该是很难完成这次实验的,在这期间有同学的帮忙和
合作。通过这次实验,感受到合作的力量,不懂要问呐。
程序代码:
.:.
.
functionvarargout=jm(varargin)
%JMM-
%JM,byitself,createsanewJMorraisestheexisting
%singleton*.
%
%H=JMreturnsthehandletoanewJMorthehandleto
%theexistingsingleton*.
%
%JM('CALLBACK',hObject,eventData,handles,...)callsthelocal
%.
%
%JM('Property','Value',...)createsanewJMorraisesthe
%existingsingleton*.Startingfromtheleft,propertyvaluepairs
are
%
%unrecognizedpropertynameorinvalidvaluemakesproperty
application
%.
%
%*SeeGUIOptionsonGUIDE'"GUIallowsonly
one
%instancetorun(singleton)".
%
%Seealso:GUIDE,GUIDATA,GUIHANDLES
%Edittheabovetexttomodifytheresponsetohelpjm
%-May-201100:01:24
%Begininitializationcode-DONOTEDIT
gui_Singleton=1;
gui_State=struct('gui_Name',mfilename,...
'gui_Singleton',gui_Singleton,...
'gui_OpeningFcn',***@jm_OpeningFcn,...
'gui_OutputFcn',***@jm_OutputFcn,...
'gui_LayoutFcn',[],...
'gui_Callback',[]);
ifnargin&&ischar(varargin{1})
=str2func(varargin{1});
end
ifnargout
[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});
else
.:.
.
gui_mainfcn(gui_State,varargin{:});
end
%Endinitializationcode-DONOTEDIT
%---Executesjustbeforejmismadevisible.
functionjm_OpeningFcn(hObject,eventdata,handles,varargin)
%Thisfunctionhasnooutputargs,seeOutputFcn.
%hObjecthandletofigure
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%varargincommandlineargumentstojm(seeVARARGIN)
%Choosedefaultcommandlineoutputforjm
=hObject;
%Updatehandlesstructure
guidata(hObject,handles);
%UIWAITmakesjmwaitforuserresponse(seeUIRESUME)
%uiwait();
%---Outputsfromthisfunctionarereturnedtothecommandline.
functionvarargout=jm_OutputFcn(hObject,eventdata,handles)
%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);
%hObjecthandletofigure
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Getdefaultcommandlineoutputfromhandlesstructure
varargout{1}=;
%---Executesonbuttonpressinpushbutton1.
functionpushbutton1_Callback(hObject,eventdata,handles)
axes();
mu1=1;%c´Åµ¼ÂÊ1
mu2=1;%c´Åµ¼ÂÊ2
w=get();
w=str2num();%¼«»¯ÆµÂÊ
a=get();
epsilon1=str2num();%½éÖÊ1µÄÏà¶Ô½éµç³£Êý
.:.
.
b=get();
epsilon2=str2num()%½éÖÊ2µÄÏà¶Ô½éµç³£Êý;
k1=w*sqrt(mu1*epsilon1);
k2=w*sqrt(mu2*epsilon2);
sita=get();
sita=str2num();
sita1=asind(k1*sind(sita)./k2);
xv=0:pi/10:20*pi;
ym=xv;
%plot(ym)
er=;
fori=1:900
yv=sin(xv+pi/30*i);%%>>>>²¨Ðκ¯Êý
x=-xv*sind(sita);
y=xv*cosd(sita);
x=x+cosd(sita)*yv;
y=y+sind(sita)*yv;
xv1=0:pi/10:20*pi;
yv1=sqrt(1-er*er)*sin(xv-pi/30*i);%%>>>·´É䲨Ðκ¯Êý
x1=xv1*sind(sita);
y1=xv1*cosd(sita);
x1=x1-2*cosd(sita)*yv1;
y1=y1+sind(sita)*yv1;
xv2=0:pi/10:20*pi;
yv2=er*sin(xv-pi/30*i);%%>>>ÕÛÉ䲨Ðκ¯Êý
x2=xv2*sind(sita1);
y2=xv2*cosd(sita1);
x2=x2-cosd(sita1)*yv2;
y2=y2+sind(sita1)*yv2;
%plot(zeros(1:81))
%plot(-40::40,0)
%holdon
%plot(0,-60::60)
.:.
.
%holdon
plot(x,y,x1,y1,x2,-y2,[-5050],[00],'k',[00],[-5050],'k');
su=get();
su=str2num();
sudu=1/su;
pause(sudu)
end
functionedit2_Callback(hObject,eventdata,handles)
%hObjecthandletoedit2(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Hints:get(hObject,'String')returnscontentsofedit2astext
%str2double(get(hObject,'String'))returnscontentsofedit2as
adouble
%---Executesduringobjectcreation,aftersettingallproperties.
functionedit2_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoedit2(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
%hObjecthandletopushbutton1(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
functionedit3_Callback(hObject,eventdata,handles)
.:.
.
%hObjecthandletoedit3(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Hints:get(hObject,'String')returnscontentsofedit3astext
%str2double(get(hObject,'String'))returnscontentsofedit3as
adouble
%---Executesduringobjectcreation,aftersettingallproperties.
functionedit3_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoedit3(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
functionedit1_Callback(hObject,eventdata,handles)
%hObjecthandletoedit1(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Hints:get(hObject,'String')returnscontentsofedit1astext
%str2double(get(hObject,'String'))returnscontentsofedit1as
adouble
%---Executesduringobjectcreation,aftersettingallproperties.
functionedit1_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoedit1(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
.:.
.
set(hObject,'BackgroundColor','white');
end
functionedit5_Callback(hObject,eventdata,handles)
%hObjecthandletoedit2(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Hints:get(hObject,'String')returnscontentsofedit2astext
%str2double(get(hObject,'String'))returnscontentsofedit2as
adouble
%---Executesduringobjectcreation,aftersettingallproperties.
functionedit5_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoedit2(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
functionedit8_Callback(hObject,eventdata,handles)
%hObjecthandletoedit8(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Hints:get(hObject,'String')returnscontentsofedit8astext
%str2double(get(hObject,'String'))returnscontentsofedit8as
adouble
%---Executesduringobjectcreation,aftersettingallproperties.
functionedit8_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoedit8(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
.:.
.
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
functionedit10_Callback(hObject,eventdata,handles)
%hObjecthandletoedit2(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Hints:get(hObject,'String')returnscontentsofedit2astext
%str2double(get(hObject,'String'))returnscontentsofedit2as
adouble
%---Executesduringobjectcreation,aftersettingallproperties.
functionedit10_CreateFcn(hObject,eventdata,handles)
%hObjecthandletoedit2(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled
%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.
%SeeISPCandCOMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
functionedit4_Callback(hObject,eventdata,handles)
%hObjecthandletoedit4(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%Hints:get(hObject,'String')returnscontentsofedit4astext
%str2double(get(hObject,'String'))returnscontentsofedit4as
adouble
.:.
.
%---Executesduringobjectcreation,aftersettingallproperties

MATLAB仿真平面电磁波在不同媒介分界面上的入射 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数12
  • 收藏数0 收藏
  • 顶次数0
  • 上传人花开花落
  • 文件大小623 KB
  • 时间2023-03-18