Index: work/fem/examples/koen/pcbrnd_direct/hairpinfilter/hairpinfilter.graph.m =================================================================== --- work/fem/examples/koen/pcbrnd_direct/hairpinfilter/hairpinfilter.graph.m (nonexistent) +++ work/fem/examples/koen/pcbrnd_direct/hairpinfilter/hairpinfilter.graph.m (revision 24653) @@ -0,0 +1,24 @@ + +CSXGeomPlot( [Sim_Path '/' Sim_CSX] ); +RunOpenEMS( Sim_Path, Sim_CSX ); + +%% post-processing +close all +f = linspace( 1e6, 2e9, 1601 ); +port = calcPort( port, Sim_Path, f, 'RefImpedance', 50); + +s11 = port{1}.uf.ref./ port{1}.uf.inc; +s21 = port{2}.uf.ref./ port{1}.uf.inc; + +plot(f/1e9,20*log10(abs(s11)),'k-','LineWidth',2); +hold on; +grid on; +plot(f/1e9,20*log10(abs(s21)),'r--','LineWidth',2); +legend('S_{11}','S_{21}'); +ylabel('S-Parameter (dB)','FontSize',12); +xlabel('frequency (GHz) \rightarrow','FontSize',12); +ylim([-60 2]); +print ('hairpinfilter_simulation.png', '-dpng'); + + + Index: work/fem/examples/koen/pcbrnd_direct/hairpinfilter/hairpinfilter.m =================================================================== --- work/fem/examples/koen/pcbrnd_direct/hairpinfilter/hairpinfilter.m (revision 24652) +++ work/fem/examples/koen/pcbrnd_direct/hairpinfilter/hairpinfilter.m (revision 24653) @@ -21,13 +21,14 @@ %%% Board mesh, part 2 -z_bottom_copper=0.0000 -mesh.y=[]; -mesh.x=[]; -mesh.z=[]; +z_bottom_copper=1.5000 +mesh.y=[4.4032 3.9832 0.0000 0.3983 0.7966 1.1950 1.5933 1.9916 2.3899 2.7882 3.1865 3.5849 4.8032 5.2032 5.2032 5.5598 5.9165 6.2732 6.6298 6.9865 7.3432 7.3432 7.4765 7.7432 7.7432 7.8765 7.8765 8.2723 8.6680 9.0638 9.4596 9.8553 10.2511 10.6469 11.0426 11.4384 11.8342 12.2299 12.6257 13.0215 13.4172 13.8130 14.2088 14.6045 15.0003 15.3961 15.7918 16.1876 16.5834 16.9791 17.3749 17.7707 18.1664 18.5622 18.9580 19.3538 19.7495 20.1453 20.5411 20.9368 21.3326 21.7284 22.1241 22.5199 22.9157 23.3114 23.7072 24.1030 24.4987 24.8945 25.2903 25.6860 26.0818 26.4776 26.8733 27.2691 27.6649 28.0606 28.4564 28.8522 29.2479 29.6437 30.0395 30.4352 30.8310 31.2268 31.6225 32.0183 32.4141 32.8098 32.8765 32.8765 33.2098 33.2765 33.2765 33.2765 33.6332 33.9898 34.3465 34.7032 35.0598 35.4165 35.8165 35.8165 36.2110 36.6055 37.0000 37.0000 37.3188 37.6377 37.9565 38.3565 38.3565 38.7565 39.1765 39.5769 39.9772 40.3776 40.7779 41.1783 41.5786 41.9789 42.3793 42.7796 43.1800]; +mesh.x=[7.9693 7.5493 0.0000 0.4194 0.8388 1.2582 1.6776 2.0970 2.5164 2.9358 3.3553 3.7747 4.1941 4.6135 5.0329 5.4523 5.8717 6.2911 6.7105 7.1299 8.3693 8.7693 8.7693 9.1462 9.5231 9.9000 9.9000 10.2007 10.5015 10.8023 11.1030 11.5030 11.5030 11.8919 12.2809 12.6698 13.0588 13.4477 13.8367 14.2367 14.2367 14.6113 14.9860 15.3607 15.7353 16.1353 16.1353 16.5142 16.8931 17.2720 17.6509 18.0298 18.4087 18.8087 18.8087 19.1833 19.5580 19.9327 20.3073 20.7073 20.7073 21.0862 21.4651 21.8440 22.2229 22.6018 22.9807 23.3807 23.3807 23.7553 24.1300 24.5047 24.8793 25.2793 25.2793 25.6582 26.0371 26.4160 26.7949 27.1738 27.5527 27.9527 27.9527 28.3273 28.7020 29.0767 29.4513 29.8513 29.8513 30.2302 30.6091 30.9880 31.3669 31.7458 32.1247 32.5247 32.5247 32.8993 33.2740 33.6487 34.0233 34.4233 34.4233 34.8123 35.2012 35.5902 35.9791 36.3681 36.7570 37.1570 37.1570 37.5547 37.9523 38.3500 38.3500 38.7302 39.1104 39.4907 39.8907 39.8907 40.2907 40.7107 41.1218 41.5329 41.9439 42.3550 42.7661 43.1772 43.5883 43.9994 44.4105 44.8216 45.2327 45.6438]; +mesh.z=[0.0000 0.2500 0.5000 0.7500 1.0000 1.2500 1.5000 -4.0000 -3.3333 -2.6667 -2.0000 -1.3333 -0.6667 1.5000 2.1667 2.8333 3.5000 4.1667 4.8333]; mesh.x = mesh.x .+ offset.x; mesh.y = offset.y .- mesh.y; mesh.z = z_bottom_copper .- mesh.z .+ offset.z; +mesh = AddPML(mesh, 8); CSX = DefineRectGrid(CSX, unit, mesh); %%% Layer mapping @@ -44,7 +45,7 @@ layers(2).clearn = 0; layer_types(2).name = 'SUBSTRATE_2'; layer_types(2).subtype = 3; -layer_types(2).thickness = 0.0500; +layer_types(2).thickness = 1.5000; layer_types(2).epsilon = 3.66; layer_types(2).mue = 0; layer_types(2).kappa = 0; @@ -131,10 +132,10 @@ CSX = AddPcbrndPoly(CSX, PCBRND, 1, poly7_xy, 1); %%% Port(s) on terminals -1_point(1, 1) = 9.9000; 1_point(2, 1) = -37.0000; -[1_start, 1_stop] = CalcPcbrnd2PortV(PCBRND, 1_point, 1, 3); -[CSX, port{1}] = AddLumpedPort(CSX, 999, 1, 50.000000, 1_start, 1_stop, [0 0 -1], true); +a1_point(1, 1) = 9.9000; a1_point(2, 1) = -37.0000; +[a1_start, a1_stop] = CalcPcbrnd2PortV(PCBRND, a1_point, 1, 3); +[CSX, port{1}] = AddLumpedPort(CSX, 999, 1, 50.000000, a1_start, a1_stop, [0 0 -1], true); -2_point(1, 1) = 38.3500; 2_point(2, 1) = -37.0000; -[2_start, 2_stop] = CalcPcbrnd2PortV(PCBRND, 2_point, 1, 3); -[CSX, port{2}] = AddLumpedPort(CSX, 999, 2, 50.000000, 2_start, 2_stop, [0 0 -1]); +a2_point(1, 1) = 38.3500; a2_point(2, 1) = -37.0000; +[a2_start, a2_stop] = CalcPcbrnd2PortV(PCBRND, a2_point, 1, 3); +[CSX, port{2}] = AddLumpedPort(CSX, 999, 2, 50.000000, a2_start, a2_stop, [0 0 -1]); Index: work/fem/examples/koen/pcbrnd_direct/hairpinfilter/hairpinfilter_simulation.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png