资源简介
书《MATLAB模拟的电磁学时域有限差分方法》中的一个课后习题,仿真一个简单的矩形微带天线,程序计算了天线的回波损耗,画出了其方向图。内附HFSS工程文件,可仿真对比。
代码片段和文件信息
% This file calls the routines necessary for calculating
% farfield patterns in xy xz and yz plane cuts and displays them.
% The display can be modified as desired.
% You will find the instructions the formats for
% radiation pattern plots can be set by the user.
if number_of_farfield_frequencies == 0
return;
end
calculate_radiated_power;
%calculate_incident_plane_wave_power;
j = sqrt(-1);
number_of_angles = 360;
% parameters used by polar plotting functions
step_size = 10; % increment between the rings in the polar grid
Nrings = 4; % number of rings in the polar grid
line_style1 = ‘b-‘; % line style for theta component
line_style2 = ‘r--‘; % line style for phi component
scale_type = ‘dB‘; % linear or dB
plot_type = ‘D‘;
%if incident_plane_wave.enabled == false
% plot_type = ‘D‘;
%else
% plot_type = ‘RCS‘;
%end
% xy plane
% ===============================================
farfield_theta = zeros(number_of_angles 1);
farfield_phi = zeros(number_of_angles 1);
farfield_theta = farfield_theta + pi/2;
farfield_phi = (pi/180)*[-180:1:179].‘;
const_theta = 90; % used for plot
% calculate farfields
calculate_farfields_per_plane;
% plotting the farfield data
for mi=1:number_of_farfield_frequencies
f = figure;
pat1 = farfield_dataTheta(mi:).‘;
pat2 = farfield_dataPhi(mi:).‘;
% if scale_type is db use these otherwise comment these two lines
pat1 = 10*log10(pat1);
pat2 = 10*log10(pat2);
max_val = max(max([pat1 pat2]));
max_val = step_size * ceil(max_val/step_size);
legend_str1 = ...
[plot_type ‘_{\theta} f=‘ num2str(farfield.frequencies(mi)*1e-9) ‘ GHz‘];
legend_str2 = ...
[plot_type ‘_{\phi} f=‘ num2str(farfield.frequencies(mi)*1e-9) ‘ GHz‘];
polar_plot_constant_theta(farfield_phipat1pat2max_val ...
step_size Nringsline_style1line_style2const_theta ...
legend_str1legend_str2scale_type);
end
% xz plane
% ===============================================
farfield_theta = zeros(number_of_angles 1);
farfield_phi = zeros(number_of_angles 1);
farfield_theta = (pi/180)*[-180:1:179].‘;
const_phi = 0; % used for plot
% calculate farfields
calculate_farfields_per_plane;
% plotting the farfield data
for mi=1:number_of_farfield_frequencies
f = figure;
pat1 = farfield_dataTheta(mi:).‘;
pat2 = farfield_dataPhi(mi:).‘;
% if scale_type is db use these otherwise comment these two lines
pat1 = 10*log10(pat1);
pat2 = 10*log10(pat2);
max_val = max(max([pat1 pat2]));
max_val = step_size * ceil(max_val/step_size);
legend_str1 = ...
[plot_type ‘_{\theta} f=‘ num2str(farfield.frequencies(mi)*1e-9) ‘ GHz‘];
legend_str2 = ...
[plot_type ‘_{\phi} f=‘ num2str(farfield.frequencies(mi)*1e-9) ‘ GHz‘];
polar_plot_constant_phi(farfield_thetapat1pat2max_val ...
step_size
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-25 13:32 Microstrip antenna\
文件 162535 2019-04-25 13:32 Microstrip antenna\Project1.aedt
文件 4669 2019-04-23 09:44 Microstrip antenna\calculate_JandM.m
文件 4206 2019-04-23 10:39 Microstrip antenna\calculate_and_display_farfields.m
文件 4819 2019-04-25 11:05 Microstrip antenna\calculate_domain_size.m
文件 7759 2019-04-25 11:09 Microstrip antenna\calculate_farfields_per_plane.m
文件 2988 2019-04-25 11:09 Microstrip antenna\calculate_frequency_domain_outputs.m
文件 5281 2019-04-22 16:00 Microstrip antenna\calculate_material_component_values.m
文件 1188 2019-04-23 10:06 Microstrip antenna\calculate_radiated_power.m
文件 1206 2019-04-15 13:54 Microstrip antenna\capture_sampled_currents.m
文件 812 2019-04-15 13:55 Microstrip antenna\capture_sampled_electric_fields.m
文件 891 2019-04-15 13:54 Microstrip antenna\capture_sampled_magnetic_fields.m
文件 470 2019-04-18 11:20 Microstrip antenna\capture_sampled_voltages.m
文件 557 2019-04-25 11:05 Microstrip antenna\constants_and_empty_arrays.m
文件 1128 2019-04-22 15:58 Microstrip antenna\create_PEC_plates.m
文件 684 2019-04-22 16:01 Microstrip antenna\create_bricks.m
文件 659 2019-04-18 09:22 Microstrip antenna\create_linear_index_list.m
文件 746 2019-04-24 10:30 Microstrip antenna\define_geometry.m
文件 1610 2019-04-25 10:23 Microstrip antenna\define_output_parameters.m
文件 2698 2019-04-25 10:50 Microstrip antenna\define_problem_space_parameters.m
文件 914 2019-04-25 10:17 Microstrip antenna\define_sources_and_lumped_elements.m
文件 8763 2019-04-25 13:16 Microstrip antenna\display_3D_geometry.m
文件 805 2019-04-18 11:53 Microstrip antenna\display_frequency_domain_outputs.m
文件 423 2019-04-18 13:21 Microstrip antenna\display_material_mesh.m
文件 35545 2019-04-18 13:22 Microstrip antenna\display_material_mesh_gui.m
文件 11536 2019-04-18 13:07 Microstrip antenna\display_problem_space.m
文件 734 2019-04-22 15:32 Microstrip antenna\fdtd_solve.m
文件 367 2019-04-18 10:49 Microstrip antenna\frequency_to_time_domain.m
文件 15619 2019-04-22 10:50 Microstrip antenna\initialize_CPML_ABC.m
文件 1320 2019-04-22 10:50 Microstrip antenna\initialize_boundary_conditions.m
文件 2002 2019-04-15 13:41 Microstrip antenna\initialize_current_source_updating_coefficients.m
............此处省略21个文件信息
- 上一篇:恒功率负载CPL等效模型
- 下一篇:遗传算法解决6自由度机器人机械臂运动路径问题
相关资源
- FDTD 的经典英文书籍
- Matlab模拟的电磁学时域有限差分法电
- 时域有限差分FDTD分析二维圆柱散射问
- FDTD_二维_高斯激励源_matlab源文件
- fdtd实现代码
- FDTD算法源代码
- 利用时域有限差分FDTD仿真三维3D电磁
- MATLAB时域有限差分法程序
- 基于matlab的FDTD程序实现
- 计算电磁学王秉中矩形波导基膜和第
- FDTD 2Dmatlab实现
- Matlab一维FDTD卷积边界条件CPML
- 二维FDTD圆柱散射问题RCS计算matlab代码
- FDTD(时域有限差分法)算法的Matlab源
- FDTD算法的Matlab源程序
- PML吸收边界三维FDTD算法MATLAB代码
- 模拟光束在二维三维介质中传输,用
- FDTD3维matlab程序
- 用matlab实现一维fdtd 仿真
- 带Mur吸收边界的3DFDTD程序
- 一维fdtd的程序
- FDTD 一维 高斯激励源 matlab源文件 动态
- 2D FDTD + PML ABC
- 2维FDTD+摩尔吸收边界,遇金属块反射
- PML边界三维FDTD
评论
共有 条评论